@markusylisiurunen/tau 0.2.85 → 0.2.87

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.
@@ -1,28 +1,28 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-D4QpJJKB.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-B12qg9BL.js","assets/ruby-Dw2BHqvy.js","assets/haml-B8DHNrY2.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-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/just-Cw27pwNe.js","assets/perl-C0TMdlhV.js","assets/latex-CWtU0Tv5.js","assets/tex-idrVyKtj.js","assets/liquid-DYVedYrR.js","assets/marko-CnJfTvn9.js","assets/less-B1dDrJ26.js","assets/mdc-BMNejdWA.js","assets/nextflow-Zz6hmt5N.js","assets/nextflow-groovy-BeH2EWoN.js","assets/nginx-BpAMiNFr.js","assets/nim-CVrawwO9.js","assets/php-Dhbhpdrm.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-Uh8Bk_45.js","assets/csharp-COcwbKMJ.js","assets/rst-BrH8l1NY.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-C_ipcX3V.js","assets/templ-P3uqSqPl.js","assets/go-CxLEBnE3.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-DNn4PbVi.js","assets/vue-DN_0RTcg.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-CQOfvN7w.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
2
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function i(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(o){if(o.ep)return;o.ep=!0;const s=i(o);fetch(o.href,s)}})();function Eb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gf={exports:{}},fl={};var fy;function GS(){if(fy)return fl;fy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(a,o,s){var c=null;if(s!==void 0&&(c=""+s),o.key!==void 0&&(c=""+o.key),"key"in o){s={};for(var f in o)f!=="key"&&(s[f]=o[f])}else s=o;return o=s.ref,{$$typeof:e,type:a,key:c,ref:o!==void 0?o:null,props:s}}return fl.Fragment=t,fl.jsx=i,fl.jsxs=i,fl}var dy;function $S(){return dy||(dy=1,gf.exports=GS()),gf.exports}var q=$S(),yf={exports:{}},Se={};var hy;function qS(){if(hy)return Se;hy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function v(N){return N===null||typeof N!="object"?null:(N=b&&N[b]||N["@@iterator"],typeof N=="function"?N:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,L={};function A(N,F,w){this.props=N,this.context=F,this.refs=L,this.updater=w||S}A.prototype.isReactComponent={},A.prototype.setState=function(N,F){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,F,"setState")},A.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function k(){}k.prototype=A.prototype;function C(N,F,w){this.props=N,this.context=F,this.refs=L,this.updater=w||S}var z=C.prototype=new k;z.constructor=C,T(z,A.prototype),z.isPureReactComponent=!0;var U=Array.isArray;function O(){}var j={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function ie(N,F,w){var le=w.ref;return{$$typeof:e,type:N,key:F,ref:le!==void 0?le:null,props:w}}function ne(N,F){return ie(N.type,F,N.props)}function W(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function J(N){var F={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(w){return F[w]})}var fe=/\/+/g;function ee(N,F){return typeof N=="object"&&N!==null&&N.key!=null?J(""+N.key):F.toString(36)}function te(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(O,O):(N.status="pending",N.then(function(F){N.status==="pending"&&(N.status="fulfilled",N.value=F)},function(F){N.status==="pending"&&(N.status="rejected",N.reason=F)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function H(N,F,w,le,he){var ce=typeof N;(ce==="undefined"||ce==="boolean")&&(N=null);var ye=!1;if(N===null)ye=!0;else switch(ce){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(N.$$typeof){case e:case t:ye=!0;break;case g:return ye=N._init,H(ye(N._payload),F,w,le,he)}}if(ye)return he=he(N),ye=le===""?"."+ee(N,0):le,U(he)?(w="",ye!=null&&(w=ye.replace(fe,"$&/")+"/"),H(he,F,w,"",function(Qe){return Qe})):he!=null&&(W(he)&&(he=ne(he,w+(he.key==null||N&&N.key===he.key?"":(""+he.key).replace(fe,"$&/")+"/")+ye)),F.push(he)),1;ye=0;var ke=le===""?".":le+":";if(U(N))for(var Te=0;Te<N.length;Te++)le=N[Te],ce=ke+ee(le,Te),ye+=H(le,F,w,ce,he);else if(Te=v(N),typeof Te=="function")for(N=Te.call(N),Te=0;!(le=N.next()).done;)le=le.value,ce=ke+ee(le,Te++),ye+=H(le,F,w,ce,he);else if(ce==="object"){if(typeof N.then=="function")return H(te(N),F,w,le,he);throw F=String(N),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return ye}function X(N,F,w){if(N==null)return N;var le=[],he=0;return H(N,le,"","",function(ce){return F.call(w,ce,he++)}),le}function oe(N){if(N._status===-1){var F=N._result;F=F(),F.then(function(w){(N._status===0||N._status===-1)&&(N._status=1,N._result=w)},function(w){(N._status===0||N._status===-1)&&(N._status=2,N._result=w)}),N._status===-1&&(N._status=0,N._result=F)}if(N._status===1)return N._result.default;throw N._result}var me=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},R={map:X,forEach:function(N,F,w){X(N,function(){F.apply(this,arguments)},w)},count:function(N){var F=0;return X(N,function(){F++}),F},toArray:function(N){return X(N,function(F){return F})||[]},only:function(N){if(!W(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Se.Activity=y,Se.Children=R,Se.Component=A,Se.Fragment=i,Se.Profiler=o,Se.PureComponent=C,Se.StrictMode=a,Se.Suspense=d,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,Se.__COMPILER_RUNTIME={__proto__:null,c:function(N){return j.H.useMemoCache(N)}},Se.cache=function(N){return function(){return N.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(N,F,w){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var le=T({},N.props),he=N.key;if(F!=null)for(ce in F.key!==void 0&&(he=""+F.key),F)!$.call(F,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&F.ref===void 0||(le[ce]=F[ce]);var ce=arguments.length-2;if(ce===1)le.children=w;else if(1<ce){for(var ye=Array(ce),ke=0;ke<ce;ke++)ye[ke]=arguments[ke+2];le.children=ye}return ie(N.type,he,le)},Se.createContext=function(N){return N={$$typeof:c,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:s,_context:N},N},Se.createElement=function(N,F,w){var le,he={},ce=null;if(F!=null)for(le in F.key!==void 0&&(ce=""+F.key),F)$.call(F,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(he[le]=F[le]);var ye=arguments.length-2;if(ye===1)he.children=w;else if(1<ye){for(var ke=Array(ye),Te=0;Te<ye;Te++)ke[Te]=arguments[Te+2];he.children=ke}if(N&&N.defaultProps)for(le in ye=N.defaultProps,ye)he[le]===void 0&&(he[le]=ye[le]);return ie(N,ce,he)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(N){return{$$typeof:f,render:N}},Se.isValidElement=W,Se.lazy=function(N){return{$$typeof:g,_payload:{_status:-1,_result:N},_init:oe}},Se.memo=function(N,F){return{$$typeof:p,type:N,compare:F===void 0?null:F}},Se.startTransition=function(N){var F=j.T,w={};j.T=w;try{var le=N(),he=j.S;he!==null&&he(w,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(O,me)}catch(ce){me(ce)}finally{F!==null&&w.types!==null&&(F.types=w.types),j.T=F}},Se.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},Se.use=function(N){return j.H.use(N)},Se.useActionState=function(N,F,w){return j.H.useActionState(N,F,w)},Se.useCallback=function(N,F){return j.H.useCallback(N,F)},Se.useContext=function(N){return j.H.useContext(N)},Se.useDebugValue=function(){},Se.useDeferredValue=function(N,F){return j.H.useDeferredValue(N,F)},Se.useEffect=function(N,F){return j.H.useEffect(N,F)},Se.useEffectEvent=function(N){return j.H.useEffectEvent(N)},Se.useId=function(){return j.H.useId()},Se.useImperativeHandle=function(N,F,w){return j.H.useImperativeHandle(N,F,w)},Se.useInsertionEffect=function(N,F){return j.H.useInsertionEffect(N,F)},Se.useLayoutEffect=function(N,F){return j.H.useLayoutEffect(N,F)},Se.useMemo=function(N,F){return j.H.useMemo(N,F)},Se.useOptimistic=function(N,F){return j.H.useOptimistic(N,F)},Se.useReducer=function(N,F,w){return j.H.useReducer(N,F,w)},Se.useRef=function(N){return j.H.useRef(N)},Se.useState=function(N){return j.H.useState(N)},Se.useSyncExternalStore=function(N,F,w){return j.H.useSyncExternalStore(N,F,w)},Se.useTransition=function(){return j.H.useTransition()},Se.version="19.2.4",Se}var py;function Ud(){return py||(py=1,yf.exports=qS()),yf.exports}var ue=Ud(),bf={exports:{}},dl={},vf={exports:{}},_f={};var my;function FS(){return my||(my=1,(function(e){function t(H,X){var oe=H.length;H.push(X);e:for(;0<oe;){var me=oe-1>>>1,R=H[me];if(0<o(R,X))H[me]=X,H[oe]=R,oe=me;else break e}}function i(H){return H.length===0?null:H[0]}function a(H){if(H.length===0)return null;var X=H[0],oe=H.pop();if(oe!==X){H[0]=oe;e:for(var me=0,R=H.length,N=R>>>1;me<N;){var F=2*(me+1)-1,w=H[F],le=F+1,he=H[le];if(0>o(w,oe))le<R&&0>o(he,w)?(H[me]=he,H[le]=oe,me=le):(H[me]=w,H[F]=oe,me=F);else if(le<R&&0>o(he,oe))H[me]=he,H[le]=oe,me=le;else break e}}return X}function o(H,X){var oe=H.sortIndex-X.sortIndex;return oe!==0?oe:H.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],p=[],g=1,y=null,b=3,v=!1,S=!1,T=!1,L=!1,A=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function z(H){for(var X=i(p);X!==null;){if(X.callback===null)a(p);else if(X.startTime<=H)a(p),X.sortIndex=X.expirationTime,t(d,X);else break;X=i(p)}}function U(H){if(T=!1,z(H),!S)if(i(d)!==null)S=!0,O||(O=!0,J());else{var X=i(p);X!==null&&te(U,X.startTime-H)}}var O=!1,j=-1,$=5,ie=-1;function ne(){return L?!0:!(e.unstable_now()-ie<$)}function W(){if(L=!1,O){var H=e.unstable_now();ie=H;var X=!0;try{e:{S=!1,T&&(T=!1,k(j),j=-1),v=!0;var oe=b;try{t:{for(z(H),y=i(d);y!==null&&!(y.expirationTime>H&&ne());){var me=y.callback;if(typeof me=="function"){y.callback=null,b=y.priorityLevel;var R=me(y.expirationTime<=H);if(H=e.unstable_now(),typeof R=="function"){y.callback=R,z(H),X=!0;break t}y===i(d)&&a(d),z(H)}else a(d);y=i(d)}if(y!==null)X=!0;else{var N=i(p);N!==null&&te(U,N.startTime-H),X=!1}}break e}finally{y=null,b=oe,v=!1}X=void 0}}finally{X?J():O=!1}}}var J;if(typeof C=="function")J=function(){C(W)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,ee=fe.port2;fe.port1.onmessage=W,J=function(){ee.postMessage(null)}}else J=function(){A(W,0)};function te(H,X){j=A(function(){H(e.unstable_now())},X)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(H){switch(b){case 1:case 2:case 3:var X=3;break;default:X=b}var oe=b;b=X;try{return H()}finally{b=oe}},e.unstable_requestPaint=function(){L=!0},e.unstable_runWithPriority=function(H,X){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var oe=b;b=H;try{return X()}finally{b=oe}},e.unstable_scheduleCallback=function(H,X,oe){var me=e.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?me+oe:me):oe=me,H){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=oe+R,H={id:g++,callback:X,priorityLevel:H,startTime:oe,expirationTime:R,sortIndex:-1},oe>me?(H.sortIndex=oe,t(p,H),i(d)===null&&H===i(p)&&(T?(k(j),j=-1):T=!0,te(U,oe-me))):(H.sortIndex=R,t(d,H),S||v||(S=!0,O||(O=!0,J()))),H},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(H){var X=b;return function(){var oe=b;b=X;try{return H.apply(this,arguments)}finally{b=oe}}}})(_f)),_f}var gy;function YS(){return gy||(gy=1,vf.exports=FS()),vf.exports}var Sf={exports:{}},kt={};var yy;function XS(){if(yy)return kt;yy=1;var e=Ud();function t(d){var p="https://react.dev/errors/"+d;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+d+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={d:{f:i,r:function(){throw Error(t(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(d,p,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:d,containerInfo:p,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,p){if(d==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,kt.createPortal=function(d,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return s(d,p,null,g)},kt.flushSync=function(d){var p=c.T,g=a.p;try{if(c.T=null,a.p=2,d)return d()}finally{c.T=p,a.p=g,a.d.f()}},kt.preconnect=function(d,p){typeof d=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(d,p))},kt.prefetchDNS=function(d){typeof d=="string"&&a.d.D(d)},kt.preinit=function(d,p){if(typeof d=="string"&&p&&typeof p.as=="string"){var g=p.as,y=f(g,p.crossOrigin),b=typeof p.integrity=="string"?p.integrity:void 0,v=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?a.d.S(d,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:v}):g==="script"&&a.d.X(d,{crossOrigin:y,integrity:b,fetchPriority:v,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},kt.preinitModule=function(d,p){if(typeof d=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=f(p.as,p.crossOrigin);a.d.M(d,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(d)},kt.preload=function(d,p){if(typeof d=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,y=f(g,p.crossOrigin);a.d.L(d,g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},kt.preloadModule=function(d,p){if(typeof d=="string")if(p){var g=f(p.as,p.crossOrigin);a.d.m(d,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(d)},kt.requestFormReset=function(d){a.d.r(d)},kt.unstable_batchedUpdates=function(d,p){return d(p)},kt.useFormState=function(d,p,g){return c.H.useFormState(d,p,g)},kt.useFormStatus=function(){return c.H.useHostTransitionStatus()},kt.version="19.2.4",kt}var by;function QS(){if(by)return Sf.exports;by=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Sf.exports=XS(),Sf.exports}var vy;function ZS(){if(vy)return dl;vy=1;var e=YS(),t=Ud(),i=QS();function a(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function s(n){var r=n,l=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(l=r.return),n=r.return;while(n)}return r.tag===3?l:null}function c(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function f(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function d(n){if(s(n)!==n)throw Error(a(188))}function p(n){var r=n.alternate;if(!r){if(r=s(n),r===null)throw Error(a(188));return r!==n?null:n}for(var l=n,u=r;;){var h=l.return;if(h===null)break;var m=h.alternate;if(m===null){if(u=h.return,u!==null){l=u;continue}break}if(h.child===m.child){for(m=h.child;m;){if(m===l)return d(h),n;if(m===u)return d(h),r;m=m.sibling}throw Error(a(188))}if(l.return!==u.return)l=h,u=m;else{for(var _=!1,E=h.child;E;){if(E===l){_=!0,l=h,u=m;break}if(E===u){_=!0,u=h,l=m;break}E=E.sibling}if(!_){for(E=m.child;E;){if(E===l){_=!0,l=m,u=h;break}if(E===u){_=!0,u=m,l=h;break}E=E.sibling}if(!_)throw Error(a(189))}}if(l.alternate!==u)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?n:r}function g(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=g(n),r!==null)return r;n=n.sibling}return null}var y=Object.assign,b=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),C=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function J(n){return n===null||typeof n!="object"?null:(n=W&&n[W]||n["@@iterator"],typeof n=="function"?n:null)}var fe=Symbol.for("react.client.reference");function ee(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===fe?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case T:return"Fragment";case A:return"Profiler";case L:return"StrictMode";case U:return"Suspense";case O:return"SuspenseList";case ie:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case C:return n.displayName||"Context";case k:return(n._context.displayName||"Context")+".Consumer";case z:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case j:return r=n.displayName||null,r!==null?r:ee(n.type)||"Memo";case $:r=n._payload,n=n._init;try{return ee(n(r))}catch{}}return null}var te=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},me=[],R=-1;function N(n){return{current:n}}function F(n){0>R||(n.current=me[R],me[R]=null,R--)}function w(n,r){R++,me[R]=n.current,n.current=r}var le=N(null),he=N(null),ce=N(null),ye=N(null);function ke(n,r){switch(w(ce,r),w(he,n),w(le,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?Mg(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=Mg(r),n=Ig(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}F(le),w(le,n)}function Te(){F(le),F(he),F(ce)}function Qe(n){n.memoizedState!==null&&w(ye,n);var r=le.current,l=Ig(r,n.type);r!==l&&(w(he,n),w(le,l))}function re(n){he.current===n&&(F(le),F(he)),ye.current===n&&(F(ye),ol._currentValue=oe)}var xe,Le;function dt(n){if(xe===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);xe=r&&r[1]||"",Le=-1<l.stack.indexOf(`
2
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function i(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(o){if(o.ep)return;o.ep=!0;const s=i(o);fetch(o.href,s)}})();function Eb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gf={exports:{}},pl={};var dy;function $S(){if(dy)return pl;dy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(a,o,s){var c=null;if(s!==void 0&&(c=""+s),o.key!==void 0&&(c=""+o.key),"key"in o){s={};for(var f in o)f!=="key"&&(s[f]=o[f])}else s=o;return o=s.ref,{$$typeof:e,type:a,key:c,ref:o!==void 0?o:null,props:s}}return pl.Fragment=t,pl.jsx=i,pl.jsxs=i,pl}var hy;function qS(){return hy||(hy=1,gf.exports=$S()),gf.exports}var $=qS(),yf={exports:{}},Se={};var py;function FS(){if(py)return Se;py=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function b(O){return O===null||typeof O!="object"?null:(O=v&&O[v]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,L={};function C(O,F,w){this.props=O,this.context=F,this.refs=L,this.updater=w||S}C.prototype.isReactComponent={},C.prototype.setState=function(O,F){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,F,"setState")},C.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function A(){}A.prototype=C.prototype;function T(O,F,w){this.props=O,this.context=F,this.refs=L,this.updater=w||S}var I=T.prototype=new A;I.constructor=T,k(I,C.prototype),I.isPureReactComponent=!0;var z=Array.isArray;function D(){}var j={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function ie(O,F,w){var le=w.ref;return{$$typeof:e,type:O,key:F,ref:le!==void 0?le:null,props:w}}function ne(O,F){return ie(O.type,F,O.props)}function J(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function W(O){var F={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(w){return F[w]})}var fe=/\/+/g;function ee(O,F){return typeof O=="object"&&O!==null&&O.key!=null?W(""+O.key):F.toString(36)}function te(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(D,D):(O.status="pending",O.then(function(F){O.status==="pending"&&(O.status="fulfilled",O.value=F)},function(F){O.status==="pending"&&(O.status="rejected",O.reason=F)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function H(O,F,w,le,he){var ce=typeof O;(ce==="undefined"||ce==="boolean")&&(O=null);var ye=!1;if(O===null)ye=!0;else switch(ce){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(O.$$typeof){case e:case t:ye=!0;break;case g:return ye=O._init,H(ye(O._payload),F,w,le,he)}}if(ye)return he=he(O),ye=le===""?"."+ee(O,0):le,z(he)?(w="",ye!=null&&(w=ye.replace(fe,"$&/")+"/"),H(he,F,w,"",function(Qe){return Qe})):he!=null&&(J(he)&&(he=ne(he,w+(he.key==null||O&&O.key===he.key?"":(""+he.key).replace(fe,"$&/")+"/")+ye)),F.push(he)),1;ye=0;var Ae=le===""?".":le+":";if(z(O))for(var ke=0;ke<O.length;ke++)le=O[ke],ce=Ae+ee(le,ke),ye+=H(le,F,w,ce,he);else if(ke=b(O),typeof ke=="function")for(O=ke.call(O),ke=0;!(le=O.next()).done;)le=le.value,ce=Ae+ee(le,ke++),ye+=H(le,F,w,ce,he);else if(ce==="object"){if(typeof O.then=="function")return H(te(O),F,w,le,he);throw F=String(O),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return ye}function X(O,F,w){if(O==null)return O;var le=[],he=0;return H(O,le,"","",function(ce){return F.call(w,ce,he++)}),le}function oe(O){if(O._status===-1){var F=O._result;F=F(),F.then(function(w){(O._status===0||O._status===-1)&&(O._status=1,O._result=w)},function(w){(O._status===0||O._status===-1)&&(O._status=2,O._result=w)}),O._status===-1&&(O._status=0,O._result=F)}if(O._status===1)return O._result.default;throw O._result}var me=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},R={map:X,forEach:function(O,F,w){X(O,function(){F.apply(this,arguments)},w)},count:function(O){var F=0;return X(O,function(){F++}),F},toArray:function(O){return X(O,function(F){return F})||[]},only:function(O){if(!J(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Se.Activity=y,Se.Children=R,Se.Component=C,Se.Fragment=i,Se.Profiler=o,Se.PureComponent=T,Se.StrictMode=a,Se.Suspense=d,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,Se.__COMPILER_RUNTIME={__proto__:null,c:function(O){return j.H.useMemoCache(O)}},Se.cache=function(O){return function(){return O.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(O,F,w){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var le=k({},O.props),he=O.key;if(F!=null)for(ce in F.key!==void 0&&(he=""+F.key),F)!G.call(F,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&F.ref===void 0||(le[ce]=F[ce]);var ce=arguments.length-2;if(ce===1)le.children=w;else if(1<ce){for(var ye=Array(ce),Ae=0;Ae<ce;Ae++)ye[Ae]=arguments[Ae+2];le.children=ye}return ie(O.type,he,le)},Se.createContext=function(O){return O={$$typeof:c,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:s,_context:O},O},Se.createElement=function(O,F,w){var le,he={},ce=null;if(F!=null)for(le in F.key!==void 0&&(ce=""+F.key),F)G.call(F,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(he[le]=F[le]);var ye=arguments.length-2;if(ye===1)he.children=w;else if(1<ye){for(var Ae=Array(ye),ke=0;ke<ye;ke++)Ae[ke]=arguments[ke+2];he.children=Ae}if(O&&O.defaultProps)for(le in ye=O.defaultProps,ye)he[le]===void 0&&(he[le]=ye[le]);return ie(O,ce,he)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(O){return{$$typeof:f,render:O}},Se.isValidElement=J,Se.lazy=function(O){return{$$typeof:g,_payload:{_status:-1,_result:O},_init:oe}},Se.memo=function(O,F){return{$$typeof:p,type:O,compare:F===void 0?null:F}},Se.startTransition=function(O){var F=j.T,w={};j.T=w;try{var le=O(),he=j.S;he!==null&&he(w,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(D,me)}catch(ce){me(ce)}finally{F!==null&&w.types!==null&&(F.types=w.types),j.T=F}},Se.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},Se.use=function(O){return j.H.use(O)},Se.useActionState=function(O,F,w){return j.H.useActionState(O,F,w)},Se.useCallback=function(O,F){return j.H.useCallback(O,F)},Se.useContext=function(O){return j.H.useContext(O)},Se.useDebugValue=function(){},Se.useDeferredValue=function(O,F){return j.H.useDeferredValue(O,F)},Se.useEffect=function(O,F){return j.H.useEffect(O,F)},Se.useEffectEvent=function(O){return j.H.useEffectEvent(O)},Se.useId=function(){return j.H.useId()},Se.useImperativeHandle=function(O,F,w){return j.H.useImperativeHandle(O,F,w)},Se.useInsertionEffect=function(O,F){return j.H.useInsertionEffect(O,F)},Se.useLayoutEffect=function(O,F){return j.H.useLayoutEffect(O,F)},Se.useMemo=function(O,F){return j.H.useMemo(O,F)},Se.useOptimistic=function(O,F){return j.H.useOptimistic(O,F)},Se.useReducer=function(O,F,w){return j.H.useReducer(O,F,w)},Se.useRef=function(O){return j.H.useRef(O)},Se.useState=function(O){return j.H.useState(O)},Se.useSyncExternalStore=function(O,F,w){return j.H.useSyncExternalStore(O,F,w)},Se.useTransition=function(){return j.H.useTransition()},Se.version="19.2.4",Se}var my;function Hd(){return my||(my=1,yf.exports=FS()),yf.exports}var ae=Hd(),bf={exports:{}},ml={},vf={exports:{}},_f={};var gy;function YS(){return gy||(gy=1,(function(e){function t(H,X){var oe=H.length;H.push(X);e:for(;0<oe;){var me=oe-1>>>1,R=H[me];if(0<o(R,X))H[me]=X,H[oe]=R,oe=me;else break e}}function i(H){return H.length===0?null:H[0]}function a(H){if(H.length===0)return null;var X=H[0],oe=H.pop();if(oe!==X){H[0]=oe;e:for(var me=0,R=H.length,O=R>>>1;me<O;){var F=2*(me+1)-1,w=H[F],le=F+1,he=H[le];if(0>o(w,oe))le<R&&0>o(he,w)?(H[me]=he,H[le]=oe,me=le):(H[me]=w,H[F]=oe,me=F);else if(le<R&&0>o(he,oe))H[me]=he,H[le]=oe,me=le;else break e}}return X}function o(H,X){var oe=H.sortIndex-X.sortIndex;return oe!==0?oe:H.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],p=[],g=1,y=null,v=3,b=!1,S=!1,k=!1,L=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function I(H){for(var X=i(p);X!==null;){if(X.callback===null)a(p);else if(X.startTime<=H)a(p),X.sortIndex=X.expirationTime,t(d,X);else break;X=i(p)}}function z(H){if(k=!1,I(H),!S)if(i(d)!==null)S=!0,D||(D=!0,W());else{var X=i(p);X!==null&&te(z,X.startTime-H)}}var D=!1,j=-1,G=5,ie=-1;function ne(){return L?!0:!(e.unstable_now()-ie<G)}function J(){if(L=!1,D){var H=e.unstable_now();ie=H;var X=!0;try{e:{S=!1,k&&(k=!1,A(j),j=-1),b=!0;var oe=v;try{t:{for(I(H),y=i(d);y!==null&&!(y.expirationTime>H&&ne());){var me=y.callback;if(typeof me=="function"){y.callback=null,v=y.priorityLevel;var R=me(y.expirationTime<=H);if(H=e.unstable_now(),typeof R=="function"){y.callback=R,I(H),X=!0;break t}y===i(d)&&a(d),I(H)}else a(d);y=i(d)}if(y!==null)X=!0;else{var O=i(p);O!==null&&te(z,O.startTime-H),X=!1}}break e}finally{y=null,v=oe,b=!1}X=void 0}}finally{X?W():D=!1}}}var W;if(typeof T=="function")W=function(){T(J)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,ee=fe.port2;fe.port1.onmessage=J,W=function(){ee.postMessage(null)}}else W=function(){C(J,0)};function te(H,X){j=C(function(){H(e.unstable_now())},X)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(H){switch(v){case 1:case 2:case 3:var X=3;break;default:X=v}var oe=v;v=X;try{return H()}finally{v=oe}},e.unstable_requestPaint=function(){L=!0},e.unstable_runWithPriority=function(H,X){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var oe=v;v=H;try{return X()}finally{v=oe}},e.unstable_scheduleCallback=function(H,X,oe){var me=e.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?me+oe:me):oe=me,H){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=oe+R,H={id:g++,callback:X,priorityLevel:H,startTime:oe,expirationTime:R,sortIndex:-1},oe>me?(H.sortIndex=oe,t(p,H),i(d)===null&&H===i(p)&&(k?(A(j),j=-1):k=!0,te(z,oe-me))):(H.sortIndex=R,t(d,H),S||b||(S=!0,D||(D=!0,W()))),H},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(H){var X=v;return function(){var oe=v;v=X;try{return H.apply(this,arguments)}finally{v=oe}}}})(_f)),_f}var yy;function XS(){return yy||(yy=1,vf.exports=YS()),vf.exports}var Sf={exports:{}},Tt={};var by;function QS(){if(by)return Tt;by=1;var e=Hd();function t(d){var p="https://react.dev/errors/"+d;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+d+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={d:{f:i,r:function(){throw Error(t(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(d,p,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:d,containerInfo:p,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,p){if(d==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Tt.createPortal=function(d,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return s(d,p,null,g)},Tt.flushSync=function(d){var p=c.T,g=a.p;try{if(c.T=null,a.p=2,d)return d()}finally{c.T=p,a.p=g,a.d.f()}},Tt.preconnect=function(d,p){typeof d=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(d,p))},Tt.prefetchDNS=function(d){typeof d=="string"&&a.d.D(d)},Tt.preinit=function(d,p){if(typeof d=="string"&&p&&typeof p.as=="string"){var g=p.as,y=f(g,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,b=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?a.d.S(d,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:b}):g==="script"&&a.d.X(d,{crossOrigin:y,integrity:v,fetchPriority:b,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Tt.preinitModule=function(d,p){if(typeof d=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=f(p.as,p.crossOrigin);a.d.M(d,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(d)},Tt.preload=function(d,p){if(typeof d=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,y=f(g,p.crossOrigin);a.d.L(d,g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Tt.preloadModule=function(d,p){if(typeof d=="string")if(p){var g=f(p.as,p.crossOrigin);a.d.m(d,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(d)},Tt.requestFormReset=function(d){a.d.r(d)},Tt.unstable_batchedUpdates=function(d,p){return d(p)},Tt.useFormState=function(d,p,g){return c.H.useFormState(d,p,g)},Tt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Tt.version="19.2.4",Tt}var vy;function ZS(){if(vy)return Sf.exports;vy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Sf.exports=QS(),Sf.exports}var _y;function KS(){if(_y)return ml;_y=1;var e=XS(),t=Hd(),i=ZS();function a(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function s(n){var r=n,l=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(l=r.return),n=r.return;while(n)}return r.tag===3?l:null}function c(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function f(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function d(n){if(s(n)!==n)throw Error(a(188))}function p(n){var r=n.alternate;if(!r){if(r=s(n),r===null)throw Error(a(188));return r!==n?null:n}for(var l=n,u=r;;){var h=l.return;if(h===null)break;var m=h.alternate;if(m===null){if(u=h.return,u!==null){l=u;continue}break}if(h.child===m.child){for(m=h.child;m;){if(m===l)return d(h),n;if(m===u)return d(h),r;m=m.sibling}throw Error(a(188))}if(l.return!==u.return)l=h,u=m;else{for(var _=!1,E=h.child;E;){if(E===l){_=!0,l=h,u=m;break}if(E===u){_=!0,u=h,l=m;break}E=E.sibling}if(!_){for(E=m.child;E;){if(E===l){_=!0,l=m,u=h;break}if(E===u){_=!0,u=m,l=h;break}E=E.sibling}if(!_)throw Error(a(189))}}if(l.alternate!==u)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?n:r}function g(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=g(n),r!==null)return r;n=n.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),T=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function W(n){return n===null||typeof n!="object"?null:(n=J&&n[J]||n["@@iterator"],typeof n=="function"?n:null)}var fe=Symbol.for("react.client.reference");function ee(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===fe?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case k:return"Fragment";case C:return"Profiler";case L:return"StrictMode";case z:return"Suspense";case D:return"SuspenseList";case ie:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case T:return n.displayName||"Context";case A:return(n._context.displayName||"Context")+".Consumer";case I:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case j:return r=n.displayName||null,r!==null?r:ee(n.type)||"Memo";case G:r=n._payload,n=n._init;try{return ee(n(r))}catch{}}return null}var te=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},me=[],R=-1;function O(n){return{current:n}}function F(n){0>R||(n.current=me[R],me[R]=null,R--)}function w(n,r){R++,me[R]=n.current,n.current=r}var le=O(null),he=O(null),ce=O(null),ye=O(null);function Ae(n,r){switch(w(ce,r),w(he,n),w(le,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?Ig(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=Ig(r),n=zg(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}F(le),w(le,n)}function ke(){F(le),F(he),F(ce)}function Qe(n){n.memoizedState!==null&&w(ye,n);var r=le.current,l=zg(r,n.type);r!==l&&(w(he,n),w(le,l))}function et(n){he.current===n&&(F(le),F(he)),ye.current===n&&(F(ye),cl._currentValue=oe)}var Yt,Et;function vn(n){if(Yt===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);Yt=r&&r[1]||"",Et=-1<l.stack.indexOf(`
3
3
  at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
4
- `+xe+n+Le}var ur=!1;function cr(n,r){if(!n||ur)return"";ur=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(G){var V=G}Reflect.construct(n,[],K)}else{try{K.call()}catch(G){V=G}n.call(K.prototype)}}else{try{throw Error()}catch(G){V=G}(K=n())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(G){if(G&&V&&typeof G.stack=="string")return[G.stack,V.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=u.DetermineComponentFrameRoot(),_=m[0],E=m[1];if(_&&E){var D=_.split(`
4
+ `+Yt+n+Et}var ue=!1;function Te(n,r){if(!n||ue)return"";ue=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(q){var V=q}Reflect.construct(n,[],K)}else{try{K.call()}catch(q){V=q}n.call(K.prototype)}}else{try{throw Error()}catch(q){V=q}(K=n())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(q){if(q&&V&&typeof q.stack=="string")return[q.stack,V.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=u.DetermineComponentFrameRoot(),_=m[0],E=m[1];if(_&&E){var N=_.split(`
5
5
  `),B=E.split(`
6
- `);for(h=u=0;u<D.length&&!D[u].includes("DetermineComponentFrameRoot");)u++;for(;h<B.length&&!B[h].includes("DetermineComponentFrameRoot");)h++;if(u===D.length||h===B.length)for(u=D.length-1,h=B.length-1;1<=u&&0<=h&&D[u]!==B[h];)h--;for(;1<=u&&0<=h;u--,h--)if(D[u]!==B[h]){if(u!==1||h!==1)do if(u--,h--,0>h||D[u]!==B[h]){var Y=`
7
- `+D[u].replace(" at new "," at ");return n.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",n.displayName)),Y}while(1<=u&&0<=h);break}}}finally{ur=!1,Error.prepareStackTrace=l}return(l=n?n.displayName||n.name:"")?dt(l):""}function Bl(n,r){switch(n.tag){case 26:case 27:case 5:return dt(n.type);case 16:return dt("Lazy");case 13:return n.child!==r&&r!==null?dt("Suspense Fallback"):dt("Suspense");case 19:return dt("SuspenseList");case 0:case 15:return cr(n.type,!1);case 11:return cr(n.type.render,!1);case 1:return cr(n.type,!0);case 31:return dt("Activity");default:return""}}function jl(n){try{var r="",l=null;do r+=Bl(n,l),l=n,n=n.return;while(n);return r}catch(u){return`
6
+ `);for(h=u=0;u<N.length&&!N[u].includes("DetermineComponentFrameRoot");)u++;for(;h<B.length&&!B[h].includes("DetermineComponentFrameRoot");)h++;if(u===N.length||h===B.length)for(u=N.length-1,h=B.length-1;1<=u&&0<=h&&N[u]!==B[h];)h--;for(;1<=u&&0<=h;u--,h--)if(N[u]!==B[h]){if(u!==1||h!==1)do if(u--,h--,0>h||N[u]!==B[h]){var Y=`
7
+ `+N[u].replace(" at new "," at ");return n.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",n.displayName)),Y}while(1<=u&&0<=h);break}}}finally{ue=!1,Error.prepareStackTrace=l}return(l=n?n.displayName||n.name:"")?vn(l):""}function je(n,r){switch(n.tag){case 26:case 27:case 5:return vn(n.type);case 16:return vn("Lazy");case 13:return n.child!==r&&r!==null?vn("Suspense Fallback"):vn("Suspense");case 19:return vn("SuspenseList");case 0:case 15:return Te(n.type,!1);case 11:return Te(n.type.render,!1);case 1:return Te(n.type,!0);case 31:return vn("Activity");default:return""}}function It(n){try{var r="",l=null;do r+=je(n,l),l=n,n=n.return;while(n);return r}catch(u){return`
8
8
  Error generating stack: `+u.message+`
9
- `+u.stack}}var fr=Object.prototype.hasOwnProperty,dr=e.unstable_scheduleCallback,va=e.unstable_cancelCallback,eu=e.unstable_shouldYield,tu=e.unstable_requestPaint,Dt=e.unstable_now,nu=e.unstable_getCurrentPriorityLevel,Q=e.unstable_ImmediatePriority,se=e.unstable_UserBlockingPriority,ve=e.unstable_NormalPriority,De=e.unstable_LowPriority,je=e.unstable_IdlePriority,qt=e.log,Un=e.unstable_setDisableYieldValue,Ot=null,ht=null;function Mt(n){if(typeof qt=="function"&&Un(n),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Ot,n)}catch{}}var Ye=Math.clz32?Math.clz32:L1,oi=Math.log,gn=Math.LN2;function L1(n){return n>>>=0,n===0?32:31-(oi(n)/gn|0)|0}var Vl=256,Gl=262144,$l=4194304;function Ui(n){var r=n&42;if(r!==0)return r;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function ql(n,r,l){var u=n.pendingLanes;if(u===0)return 0;var h=0,m=n.suspendedLanes,_=n.pingedLanes;n=n.warmLanes;var E=u&134217727;return E!==0?(u=E&~m,u!==0?h=Ui(u):(_&=E,_!==0?h=Ui(_):l||(l=E&~n,l!==0&&(h=Ui(l))))):(E=u&~m,E!==0?h=Ui(E):_!==0?h=Ui(_):l||(l=u&~n,l!==0&&(h=Ui(l)))),h===0?0:r!==0&&r!==h&&(r&m)===0&&(m=h&-h,l=r&-r,m>=l||m===32&&(l&4194048)!==0)?r:h}function _a(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function R1(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mh(){var n=$l;return $l<<=1,($l&62914560)===0&&($l=4194304),n}function iu(n){for(var r=[],l=0;31>l;l++)r.push(n);return r}function Sa(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function D1(n,r,l,u,h,m){var _=n.pendingLanes;n.pendingLanes=l,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=l,n.entangledLanes&=l,n.errorRecoveryDisabledLanes&=l,n.shellSuspendCounter=0;var E=n.entanglements,D=n.expirationTimes,B=n.hiddenUpdates;for(l=_&~l;0<l;){var Y=31-Ye(l),K=1<<Y;E[Y]=0,D[Y]=-1;var V=B[Y];if(V!==null)for(B[Y]=null,Y=0;Y<V.length;Y++){var G=V[Y];G!==null&&(G.lane&=-536870913)}l&=~K}u!==0&&gh(n,u,0),m!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=m&~(_&~r))}function gh(n,r,l){n.pendingLanes|=r,n.suspendedLanes&=~r;var u=31-Ye(r);n.entangledLanes|=r,n.entanglements[u]=n.entanglements[u]|1073741824|l&261930}function yh(n,r){var l=n.entangledLanes|=r;for(n=n.entanglements;l;){var u=31-Ye(l),h=1<<u;h&r|n[u]&r&&(n[u]|=r),l&=~h}}function bh(n,r){var l=r&-r;return l=(l&42)!==0?1:ru(l),(l&(n.suspendedLanes|r))!==0?0:l}function ru(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function au(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function vh(){var n=X.p;return n!==0?n:(n=window.event,n===void 0?32:ry(n.type))}function _h(n,r){var l=X.p;try{return X.p=n,r()}finally{X.p=l}}var si=Math.random().toString(36).slice(2),Et="__reactFiber$"+si,It="__reactProps$"+si,hr="__reactContainer$"+si,lu="__reactEvents$"+si,O1="__reactListeners$"+si,N1="__reactHandles$"+si,Sh="__reactResources$"+si,Ea="__reactMarker$"+si;function ou(n){delete n[Et],delete n[It],delete n[lu],delete n[O1],delete n[N1]}function pr(n){var r=n[Et];if(r)return r;for(var l=n.parentNode;l;){if(r=l[hr]||l[Et]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(n=Vg(n);n!==null;){if(l=n[Et])return l;n=Vg(n)}return r}n=l,l=n.parentNode}return null}function mr(n){if(n=n[Et]||n[hr]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function xa(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function gr(n){var r=n[Sh];return r||(r=n[Sh]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function bt(n){n[Ea]=!0}var Eh=new Set,xh={};function Hi(n,r){yr(n,r),yr(n+"Capture",r)}function yr(n,r){for(xh[n]=r,n=0;n<r.length;n++)Eh.add(r[n])}var M1=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ch={},wh={};function I1(n){return fr.call(wh,n)?!0:fr.call(Ch,n)?!1:M1.test(n)?wh[n]=!0:(Ch[n]=!0,!1)}function Fl(n,r,l){if(I1(r))if(l===null)n.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+l)}}function Yl(n,r,l){if(l===null)n.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+l)}}function Hn(n,r,l,u){if(u===null)n.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(l);return}n.setAttributeNS(r,l,""+u)}}function tn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Ah(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function z1(n,r,l){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var h=u.get,m=u.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return h.call(this)},set:function(_){l=""+_,m.call(this,_)}}),Object.defineProperty(n,r,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(_){l=""+_},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function su(n){if(!n._valueTracker){var r=Ah(n)?"checked":"value";n._valueTracker=z1(n,r,""+n[r])}}function kh(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return n&&(u=Ah(n)?n.checked?"true":"false":n.value),n=u,n!==l?(r.setValue(n),!0):!1}function Xl(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var U1=/[\n"\\]/g;function nn(n){return n.replace(U1,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function uu(n,r,l,u,h,m,_,E){n.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?n.type=_:n.removeAttribute("type"),r!=null?_==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+tn(r)):n.value!==""+tn(r)&&(n.value=""+tn(r)):_!=="submit"&&_!=="reset"||n.removeAttribute("value"),r!=null?cu(n,_,tn(r)):l!=null?cu(n,_,tn(l)):u!=null&&n.removeAttribute("value"),h==null&&m!=null&&(n.defaultChecked=!!m),h!=null&&(n.checked=h&&typeof h!="function"&&typeof h!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?n.name=""+tn(E):n.removeAttribute("name")}function Th(n,r,l,u,h,m,_,E){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(n.type=m),r!=null||l!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){su(n);return}l=l!=null?""+tn(l):"",r=r!=null?""+tn(r):l,E||r===n.value||(n.value=r),n.defaultValue=r}u=u??h,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=E?n.checked:!!u,n.defaultChecked=!!u,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(n.name=_),su(n)}function cu(n,r,l){r==="number"&&Xl(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function br(n,r,l,u){if(n=n.options,r){r={};for(var h=0;h<l.length;h++)r["$"+l[h]]=!0;for(l=0;l<n.length;l++)h=r.hasOwnProperty("$"+n[l].value),n[l].selected!==h&&(n[l].selected=h),h&&u&&(n[l].defaultSelected=!0)}else{for(l=""+tn(l),r=null,h=0;h<n.length;h++){if(n[h].value===l){n[h].selected=!0,u&&(n[h].defaultSelected=!0);return}r!==null||n[h].disabled||(r=n[h])}r!==null&&(r.selected=!0)}}function Lh(n,r,l){if(r!=null&&(r=""+tn(r),r!==n.value&&(n.value=r),l==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=l!=null?""+tn(l):""}function Rh(n,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(a(92));if(te(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=tn(r),n.defaultValue=l,u=n.textContent,u===l&&u!==""&&u!==null&&(n.value=u),su(n)}function vr(n,r){if(r){var l=n.firstChild;if(l&&l===n.lastChild&&l.nodeType===3){l.nodeValue=r;return}}n.textContent=r}var H1=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Dh(n,r,l){var u=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":u?n.setProperty(r,l):typeof l!="number"||l===0||H1.has(r)?r==="float"?n.cssFloat=l:n[r]=(""+l).trim():n[r]=l+"px"}function Oh(n,r,l){if(r!=null&&typeof r!="object")throw Error(a(62));if(n=n.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var h in r)u=r[h],r.hasOwnProperty(h)&&l[h]!==u&&Dh(n,h,u)}else for(var m in r)r.hasOwnProperty(m)&&Dh(n,m,r[m])}function fu(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var P1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),B1=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ql(n){return B1.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Pn(){}var du=null;function hu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var _r=null,Sr=null;function Nh(n){var r=mr(n);if(r&&(n=r.stateNode)){var l=n[It]||null;e:switch(n=r.stateNode,r.type){case"input":if(uu(n,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=n;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+nn(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==n&&u.form===n.form){var h=u[It]||null;if(!h)throw Error(a(90));uu(u,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<l.length;r++)u=l[r],u.form===n.form&&kh(u)}break e;case"textarea":Lh(n,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&br(n,!!l.multiple,r,!1)}}}var pu=!1;function Mh(n,r,l){if(pu)return n(r,l);pu=!0;try{var u=n(r);return u}finally{if(pu=!1,(_r!==null||Sr!==null)&&(Uo(),_r&&(r=_r,n=Sr,Sr=_r=null,Nh(r),n)))for(r=0;r<n.length;r++)Nh(n[r])}}function Ca(n,r){var l=n.stateNode;if(l===null)return null;var u=l[It]||null;if(u===null)return null;l=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(l&&typeof l!="function")throw Error(a(231,r,typeof l));return l}var Bn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mu=!1;if(Bn)try{var wa={};Object.defineProperty(wa,"passive",{get:function(){mu=!0}}),window.addEventListener("test",wa,wa),window.removeEventListener("test",wa,wa)}catch{mu=!1}var ui=null,gu=null,Zl=null;function Ih(){if(Zl)return Zl;var n,r=gu,l=r.length,u,h="value"in ui?ui.value:ui.textContent,m=h.length;for(n=0;n<l&&r[n]===h[n];n++);var _=l-n;for(u=1;u<=_&&r[l-u]===h[m-u];u++);return Zl=h.slice(n,1<u?1-u:void 0)}function Kl(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function Wl(){return!0}function zh(){return!1}function zt(n){function r(l,u,h,m,_){this._reactName=l,this._targetInst=h,this.type=u,this.nativeEvent=m,this.target=_,this.currentTarget=null;for(var E in n)n.hasOwnProperty(E)&&(l=n[E],this[E]=l?l(m):m[E]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Wl:zh,this.isPropagationStopped=zh,this}return y(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Wl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Wl)},persist:function(){},isPersistent:Wl}),r}var Pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jl=zt(Pi),Aa=y({},Pi,{view:0,detail:0}),j1=zt(Aa),yu,bu,ka,eo=y({},Aa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_u,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==ka&&(ka&&n.type==="mousemove"?(yu=n.screenX-ka.screenX,bu=n.screenY-ka.screenY):bu=yu=0,ka=n),yu)},movementY:function(n){return"movementY"in n?n.movementY:bu}}),Uh=zt(eo),V1=y({},eo,{dataTransfer:0}),G1=zt(V1),$1=y({},Aa,{relatedTarget:0}),vu=zt($1),q1=y({},Pi,{animationName:0,elapsedTime:0,pseudoElement:0}),F1=zt(q1),Y1=y({},Pi,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),X1=zt(Y1),Q1=y({},Pi,{data:0}),Hh=zt(Q1),Z1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},K1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},W1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function J1(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=W1[n])?!!r[n]:!1}function _u(){return J1}var e_=y({},Aa,{key:function(n){if(n.key){var r=Z1[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=Kl(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?K1[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_u,charCode:function(n){return n.type==="keypress"?Kl(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Kl(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),t_=zt(e_),n_=y({},eo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ph=zt(n_),i_=y({},Aa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_u}),r_=zt(i_),a_=y({},Pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),l_=zt(a_),o_=y({},eo,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),s_=zt(o_),u_=y({},Pi,{newState:0,oldState:0}),c_=zt(u_),f_=[9,13,27,32],Su=Bn&&"CompositionEvent"in window,Ta=null;Bn&&"documentMode"in document&&(Ta=document.documentMode);var d_=Bn&&"TextEvent"in window&&!Ta,Bh=Bn&&(!Su||Ta&&8<Ta&&11>=Ta),jh=" ",Vh=!1;function Gh(n,r){switch(n){case"keyup":return f_.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $h(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Er=!1;function h_(n,r){switch(n){case"compositionend":return $h(r);case"keypress":return r.which!==32?null:(Vh=!0,jh);case"textInput":return n=r.data,n===jh&&Vh?null:n;default:return null}}function p_(n,r){if(Er)return n==="compositionend"||!Su&&Gh(n,r)?(n=Ih(),Zl=gu=ui=null,Er=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Bh&&r.locale!=="ko"?null:r.data;default:return null}}var m_={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function qh(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!m_[n.type]:r==="textarea"}function Fh(n,r,l,u){_r?Sr?Sr.push(u):Sr=[u]:_r=u,r=$o(r,"onChange"),0<r.length&&(l=new Jl("onChange","change",null,l,u),n.push({event:l,listeners:r}))}var La=null,Ra=null;function g_(n){Tg(n,0)}function to(n){var r=xa(n);if(kh(r))return n}function Yh(n,r){if(n==="change")return r}var Xh=!1;if(Bn){var Eu;if(Bn){var xu="oninput"in document;if(!xu){var Qh=document.createElement("div");Qh.setAttribute("oninput","return;"),xu=typeof Qh.oninput=="function"}Eu=xu}else Eu=!1;Xh=Eu&&(!document.documentMode||9<document.documentMode)}function Zh(){La&&(La.detachEvent("onpropertychange",Kh),Ra=La=null)}function Kh(n){if(n.propertyName==="value"&&to(Ra)){var r=[];Fh(r,Ra,n,hu(n)),Mh(g_,r)}}function y_(n,r,l){n==="focusin"?(Zh(),La=r,Ra=l,La.attachEvent("onpropertychange",Kh)):n==="focusout"&&Zh()}function b_(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return to(Ra)}function v_(n,r){if(n==="click")return to(r)}function __(n,r){if(n==="input"||n==="change")return to(r)}function S_(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Ft=typeof Object.is=="function"?Object.is:S_;function Da(n,r){if(Ft(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var l=Object.keys(n),u=Object.keys(r);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var h=l[u];if(!fr.call(r,h)||!Ft(n[h],r[h]))return!1}return!0}function Wh(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Jh(n,r){var l=Wh(n);n=0;for(var u;l;){if(l.nodeType===3){if(u=n+l.textContent.length,n<=r&&u>=r)return{node:l,offset:r-n};n=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Wh(l)}}function ep(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?ep(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function tp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Xl(n.document);r instanceof n.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)n=r.contentWindow;else break;r=Xl(n.document)}return r}function Cu(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var E_=Bn&&"documentMode"in document&&11>=document.documentMode,xr=null,wu=null,Oa=null,Au=!1;function np(n,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Au||xr==null||xr!==Xl(u)||(u=xr,"selectionStart"in u&&Cu(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Oa&&Da(Oa,u)||(Oa=u,u=$o(wu,"onSelect"),0<u.length&&(r=new Jl("onSelect","select",null,r,l),n.push({event:r,listeners:u}),r.target=xr)))}function Bi(n,r){var l={};return l[n.toLowerCase()]=r.toLowerCase(),l["Webkit"+n]="webkit"+r,l["Moz"+n]="moz"+r,l}var Cr={animationend:Bi("Animation","AnimationEnd"),animationiteration:Bi("Animation","AnimationIteration"),animationstart:Bi("Animation","AnimationStart"),transitionrun:Bi("Transition","TransitionRun"),transitionstart:Bi("Transition","TransitionStart"),transitioncancel:Bi("Transition","TransitionCancel"),transitionend:Bi("Transition","TransitionEnd")},ku={},ip={};Bn&&(ip=document.createElement("div").style,"AnimationEvent"in window||(delete Cr.animationend.animation,delete Cr.animationiteration.animation,delete Cr.animationstart.animation),"TransitionEvent"in window||delete Cr.transitionend.transition);function ji(n){if(ku[n])return ku[n];if(!Cr[n])return n;var r=Cr[n],l;for(l in r)if(r.hasOwnProperty(l)&&l in ip)return ku[n]=r[l];return n}var rp=ji("animationend"),ap=ji("animationiteration"),lp=ji("animationstart"),x_=ji("transitionrun"),C_=ji("transitionstart"),w_=ji("transitioncancel"),op=ji("transitionend"),sp=new Map,Tu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Tu.push("scrollEnd");function yn(n,r){sp.set(n,r),Hi(r,[n])}var no=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},rn=[],wr=0,Lu=0;function io(){for(var n=wr,r=Lu=wr=0;r<n;){var l=rn[r];rn[r++]=null;var u=rn[r];rn[r++]=null;var h=rn[r];rn[r++]=null;var m=rn[r];if(rn[r++]=null,u!==null&&h!==null){var _=u.pending;_===null?h.next=h:(h.next=_.next,_.next=h),u.pending=h}m!==0&&up(l,h,m)}}function ro(n,r,l,u){rn[wr++]=n,rn[wr++]=r,rn[wr++]=l,rn[wr++]=u,Lu|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function Ru(n,r,l,u){return ro(n,r,l,u),ao(n)}function Vi(n,r){return ro(n,null,null,r),ao(n)}function up(n,r,l){n.lanes|=l;var u=n.alternate;u!==null&&(u.lanes|=l);for(var h=!1,m=n.return;m!==null;)m.childLanes|=l,u=m.alternate,u!==null&&(u.childLanes|=l),m.tag===22&&(n=m.stateNode,n===null||n._visibility&1||(h=!0)),n=m,m=m.return;return n.tag===3?(m=n.stateNode,h&&r!==null&&(h=31-Ye(l),n=m.hiddenUpdates,u=n[h],u===null?n[h]=[r]:u.push(r),r.lane=l|536870912),m):null}function ao(n){if(50<el)throw el=0,Pc=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var Ar={};function A_(n,r,l,u){this.tag=n,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(n,r,l,u){return new A_(n,r,l,u)}function Du(n){return n=n.prototype,!(!n||!n.isReactComponent)}function jn(n,r){var l=n.alternate;return l===null?(l=Yt(n.tag,r,n.key,n.mode),l.elementType=n.elementType,l.type=n.type,l.stateNode=n.stateNode,l.alternate=n,n.alternate=l):(l.pendingProps=r,l.type=n.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=n.flags&65011712,l.childLanes=n.childLanes,l.lanes=n.lanes,l.child=n.child,l.memoizedProps=n.memoizedProps,l.memoizedState=n.memoizedState,l.updateQueue=n.updateQueue,r=n.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=n.sibling,l.index=n.index,l.ref=n.ref,l.refCleanup=n.refCleanup,l}function cp(n,r){n.flags&=65011714;var l=n.alternate;return l===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=l.childLanes,n.lanes=l.lanes,n.child=l.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=l.memoizedProps,n.memoizedState=l.memoizedState,n.updateQueue=l.updateQueue,n.type=l.type,r=l.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function lo(n,r,l,u,h,m){var _=0;if(u=n,typeof n=="function")Du(n)&&(_=1);else if(typeof n=="string")_=DS(n,l,le.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case ie:return n=Yt(31,l,r,h),n.elementType=ie,n.lanes=m,n;case T:return Gi(l.children,h,m,r);case L:_=8,h|=24;break;case A:return n=Yt(12,l,r,h|2),n.elementType=A,n.lanes=m,n;case U:return n=Yt(13,l,r,h),n.elementType=U,n.lanes=m,n;case O:return n=Yt(19,l,r,h),n.elementType=O,n.lanes=m,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case C:_=10;break e;case k:_=9;break e;case z:_=11;break e;case j:_=14;break e;case $:_=16,u=null;break e}_=29,l=Error(a(130,n===null?"null":typeof n,"")),u=null}return r=Yt(_,l,r,h),r.elementType=n,r.type=u,r.lanes=m,r}function Gi(n,r,l,u){return n=Yt(7,n,u,r),n.lanes=l,n}function Ou(n,r,l){return n=Yt(6,n,null,r),n.lanes=l,n}function fp(n){var r=Yt(18,null,null,0);return r.stateNode=n,r}function Nu(n,r,l){return r=Yt(4,n.children!==null?n.children:[],n.key,r),r.lanes=l,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var dp=new WeakMap;function an(n,r){if(typeof n=="object"&&n!==null){var l=dp.get(n);return l!==void 0?l:(r={value:n,source:r,stack:jl(r)},dp.set(n,r),r)}return{value:n,source:r,stack:jl(r)}}var kr=[],Tr=0,oo=null,Na=0,ln=[],on=0,ci=null,wn=1,An="";function Vn(n,r){kr[Tr++]=Na,kr[Tr++]=oo,oo=n,Na=r}function hp(n,r,l){ln[on++]=wn,ln[on++]=An,ln[on++]=ci,ci=n;var u=wn;n=An;var h=32-Ye(u)-1;u&=~(1<<h),l+=1;var m=32-Ye(r)+h;if(30<m){var _=h-h%5;m=(u&(1<<_)-1).toString(32),u>>=_,h-=_,wn=1<<32-Ye(r)+h|l<<h|u,An=m+n}else wn=1<<m|l<<h|u,An=n}function Mu(n){n.return!==null&&(Vn(n,1),hp(n,1,0))}function Iu(n){for(;n===oo;)oo=kr[--Tr],kr[Tr]=null,Na=kr[--Tr],kr[Tr]=null;for(;n===ci;)ci=ln[--on],ln[on]=null,An=ln[--on],ln[on]=null,wn=ln[--on],ln[on]=null}function pp(n,r){ln[on++]=wn,ln[on++]=An,ln[on++]=ci,wn=r.id,An=r.overflow,ci=n}var xt=null,We=null,ze=!1,fi=null,sn=!1,zu=Error(a(519));function di(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ma(an(r,n)),zu}function mp(n){var r=n.stateNode,l=n.type,u=n.memoizedProps;switch(r[Et]=n,r[It]=u,l){case"dialog":Ne("cancel",r),Ne("close",r);break;case"iframe":case"object":case"embed":Ne("load",r);break;case"video":case"audio":for(l=0;l<nl.length;l++)Ne(nl[l],r);break;case"source":Ne("error",r);break;case"img":case"image":case"link":Ne("error",r),Ne("load",r);break;case"details":Ne("toggle",r);break;case"input":Ne("invalid",r),Th(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Ne("invalid",r);break;case"textarea":Ne("invalid",r),Rh(r,u.value,u.defaultValue,u.children)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||u.suppressHydrationWarning===!0||Og(r.textContent,l)?(u.popover!=null&&(Ne("beforetoggle",r),Ne("toggle",r)),u.onScroll!=null&&Ne("scroll",r),u.onScrollEnd!=null&&Ne("scrollend",r),u.onClick!=null&&(r.onclick=Pn),r=!0):r=!1,r||di(n,!0)}function gp(n){for(xt=n.return;xt;)switch(xt.tag){case 5:case 31:case 13:sn=!1;return;case 27:case 3:sn=!0;return;default:xt=xt.return}}function Lr(n){if(n!==xt)return!1;if(!ze)return gp(n),ze=!0,!1;var r=n.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=n.type,l=!(l!=="form"&&l!=="button")||ef(n.type,n.memoizedProps)),l=!l),l&&We&&di(n),gp(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));We=jg(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));We=jg(n)}else r===27?(r=We,Ai(n.type)?(n=lf,lf=null,We=n):We=r):We=xt?cn(n.stateNode.nextSibling):null;return!0}function $i(){We=xt=null,ze=!1}function Uu(){var n=fi;return n!==null&&(Bt===null?Bt=n:Bt.push.apply(Bt,n),fi=null),n}function Ma(n){fi===null?fi=[n]:fi.push(n)}var Hu=N(null),qi=null,Gn=null;function hi(n,r,l){w(Hu,r._currentValue),r._currentValue=l}function $n(n){n._currentValue=Hu.current,F(Hu)}function Pu(n,r,l){for(;n!==null;){var u=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),n===l)break;n=n.return}}function Bu(n,r,l,u){var h=n.child;for(h!==null&&(h.return=n);h!==null;){var m=h.dependencies;if(m!==null){var _=h.child;m=m.firstContext;e:for(;m!==null;){var E=m;m=h;for(var D=0;D<r.length;D++)if(E.context===r[D]){m.lanes|=l,E=m.alternate,E!==null&&(E.lanes|=l),Pu(m.return,l,n),u||(_=null);break e}m=E.next}}else if(h.tag===18){if(_=h.return,_===null)throw Error(a(341));_.lanes|=l,m=_.alternate,m!==null&&(m.lanes|=l),Pu(_,l,n),_=null}else _=h.child;if(_!==null)_.return=h;else for(_=h;_!==null;){if(_===n){_=null;break}if(h=_.sibling,h!==null){h.return=_.return,_=h;break}_=_.return}h=_}}function Rr(n,r,l,u){n=null;for(var h=r,m=!1;h!==null;){if(!m){if((h.flags&524288)!==0)m=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var _=h.alternate;if(_===null)throw Error(a(387));if(_=_.memoizedProps,_!==null){var E=h.type;Ft(h.pendingProps.value,_.value)||(n!==null?n.push(E):n=[E])}}else if(h===ye.current){if(_=h.alternate,_===null)throw Error(a(387));_.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(n!==null?n.push(ol):n=[ol])}h=h.return}n!==null&&Bu(r,n,l,u),r.flags|=262144}function so(n){for(n=n.firstContext;n!==null;){if(!Ft(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Fi(n){qi=n,Gn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Ct(n){return yp(qi,n)}function uo(n,r){return qi===null&&Fi(n),yp(n,r)}function yp(n,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},Gn===null){if(n===null)throw Error(a(308));Gn=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else Gn=Gn.next=r;return l}var k_=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(l,u){n.push(u)}};this.abort=function(){r.aborted=!0,n.forEach(function(l){return l()})}},T_=e.unstable_scheduleCallback,L_=e.unstable_NormalPriority,lt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ju(){return{controller:new k_,data:new Map,refCount:0}}function Ia(n){n.refCount--,n.refCount===0&&T_(L_,function(){n.controller.abort()})}var za=null,Vu=0,Dr=0,Or=null;function R_(n,r){if(za===null){var l=za=[];Vu=0,Dr=qc(),Or={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Vu++,r.then(bp,bp),r}function bp(){if(--Vu===0&&za!==null){Or!==null&&(Or.status="fulfilled");var n=za;za=null,Dr=0,Or=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function D_(n,r){var l=[],u={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return n.then(function(){u.status="fulfilled",u.value=r;for(var h=0;h<l.length;h++)(0,l[h])(r)},function(h){for(u.status="rejected",u.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),u}var vp=H.S;H.S=function(n,r){ng=Dt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&R_(n,r),vp!==null&&vp(n,r)};var Yi=N(null);function Gu(){var n=Yi.current;return n!==null?n:Xe.pooledCache}function co(n,r){r===null?w(Yi,Yi.current):w(Yi,r.pool)}function _p(){var n=Gu();return n===null?null:{parent:lt._currentValue,pool:n}}var Nr=Error(a(460)),$u=Error(a(474)),fo=Error(a(542)),ho={then:function(){}};function Sp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Ep(n,r,l){switch(l=n[l],l===void 0?n.push(r):l!==r&&(r.then(Pn,Pn),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Cp(n),n;default:if(typeof r.status=="string")r.then(Pn,Pn);else{if(n=Xe,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.then(function(u){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=u}},function(u){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Cp(n),n}throw Qi=r,Nr}}function Xi(n){try{var r=n._init;return r(n._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Qi=l,Nr):l}}var Qi=null;function xp(){if(Qi===null)throw Error(a(459));var n=Qi;return Qi=null,n}function Cp(n){if(n===Nr||n===fo)throw Error(a(483))}var Mr=null,Ua=0;function po(n){var r=Ua;return Ua+=1,Mr===null&&(Mr=[]),Ep(Mr,n,r)}function Ha(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function mo(n,r){throw r.$$typeof===b?Error(a(525)):(n=Object.prototype.toString.call(r),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function wp(n){function r(I,M){if(n){var P=I.deletions;P===null?(I.deletions=[M],I.flags|=16):P.push(M)}}function l(I,M){if(!n)return null;for(;M!==null;)r(I,M),M=M.sibling;return null}function u(I){for(var M=new Map;I!==null;)I.key!==null?M.set(I.key,I):M.set(I.index,I),I=I.sibling;return M}function h(I,M){return I=jn(I,M),I.index=0,I.sibling=null,I}function m(I,M,P){return I.index=P,n?(P=I.alternate,P!==null?(P=P.index,P<M?(I.flags|=67108866,M):P):(I.flags|=67108866,M)):(I.flags|=1048576,M)}function _(I){return n&&I.alternate===null&&(I.flags|=67108866),I}function E(I,M,P,Z){return M===null||M.tag!==6?(M=Ou(P,I.mode,Z),M.return=I,M):(M=h(M,P),M.return=I,M)}function D(I,M,P,Z){var ge=P.type;return ge===T?Y(I,M,P.props.children,Z,P.key):M!==null&&(M.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===$&&Xi(ge)===M.type)?(M=h(M,P.props),Ha(M,P),M.return=I,M):(M=lo(P.type,P.key,P.props,null,I.mode,Z),Ha(M,P),M.return=I,M)}function B(I,M,P,Z){return M===null||M.tag!==4||M.stateNode.containerInfo!==P.containerInfo||M.stateNode.implementation!==P.implementation?(M=Nu(P,I.mode,Z),M.return=I,M):(M=h(M,P.children||[]),M.return=I,M)}function Y(I,M,P,Z,ge){return M===null||M.tag!==7?(M=Gi(P,I.mode,Z,ge),M.return=I,M):(M=h(M,P),M.return=I,M)}function K(I,M,P){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Ou(""+M,I.mode,P),M.return=I,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case v:return P=lo(M.type,M.key,M.props,null,I.mode,P),Ha(P,M),P.return=I,P;case S:return M=Nu(M,I.mode,P),M.return=I,M;case $:return M=Xi(M),K(I,M,P)}if(te(M)||J(M))return M=Gi(M,I.mode,P,null),M.return=I,M;if(typeof M.then=="function")return K(I,po(M),P);if(M.$$typeof===C)return K(I,uo(I,M),P);mo(I,M)}return null}function V(I,M,P,Z){var ge=M!==null?M.key:null;if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return ge!==null?null:E(I,M,""+P,Z);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case v:return P.key===ge?D(I,M,P,Z):null;case S:return P.key===ge?B(I,M,P,Z):null;case $:return P=Xi(P),V(I,M,P,Z)}if(te(P)||J(P))return ge!==null?null:Y(I,M,P,Z,null);if(typeof P.then=="function")return V(I,M,po(P),Z);if(P.$$typeof===C)return V(I,M,uo(I,P),Z);mo(I,P)}return null}function G(I,M,P,Z,ge){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return I=I.get(P)||null,E(M,I,""+Z,ge);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case v:return I=I.get(Z.key===null?P:Z.key)||null,D(M,I,Z,ge);case S:return I=I.get(Z.key===null?P:Z.key)||null,B(M,I,Z,ge);case $:return Z=Xi(Z),G(I,M,P,Z,ge)}if(te(Z)||J(Z))return I=I.get(P)||null,Y(M,I,Z,ge,null);if(typeof Z.then=="function")return G(I,M,P,po(Z),ge);if(Z.$$typeof===C)return G(I,M,P,uo(M,Z),ge);mo(M,Z)}return null}function de(I,M,P,Z){for(var ge=null,Ue=null,pe=M,we=M=0,Ie=null;pe!==null&&we<P.length;we++){pe.index>we?(Ie=pe,pe=null):Ie=pe.sibling;var He=V(I,pe,P[we],Z);if(He===null){pe===null&&(pe=Ie);break}n&&pe&&He.alternate===null&&r(I,pe),M=m(He,M,we),Ue===null?ge=He:Ue.sibling=He,Ue=He,pe=Ie}if(we===P.length)return l(I,pe),ze&&Vn(I,we),ge;if(pe===null){for(;we<P.length;we++)pe=K(I,P[we],Z),pe!==null&&(M=m(pe,M,we),Ue===null?ge=pe:Ue.sibling=pe,Ue=pe);return ze&&Vn(I,we),ge}for(pe=u(pe);we<P.length;we++)Ie=G(pe,I,we,P[we],Z),Ie!==null&&(n&&Ie.alternate!==null&&pe.delete(Ie.key===null?we:Ie.key),M=m(Ie,M,we),Ue===null?ge=Ie:Ue.sibling=Ie,Ue=Ie);return n&&pe.forEach(function(Di){return r(I,Di)}),ze&&Vn(I,we),ge}function be(I,M,P,Z){if(P==null)throw Error(a(151));for(var ge=null,Ue=null,pe=M,we=M=0,Ie=null,He=P.next();pe!==null&&!He.done;we++,He=P.next()){pe.index>we?(Ie=pe,pe=null):Ie=pe.sibling;var Di=V(I,pe,He.value,Z);if(Di===null){pe===null&&(pe=Ie);break}n&&pe&&Di.alternate===null&&r(I,pe),M=m(Di,M,we),Ue===null?ge=Di:Ue.sibling=Di,Ue=Di,pe=Ie}if(He.done)return l(I,pe),ze&&Vn(I,we),ge;if(pe===null){for(;!He.done;we++,He=P.next())He=K(I,He.value,Z),He!==null&&(M=m(He,M,we),Ue===null?ge=He:Ue.sibling=He,Ue=He);return ze&&Vn(I,we),ge}for(pe=u(pe);!He.done;we++,He=P.next())He=G(pe,I,we,He.value,Z),He!==null&&(n&&He.alternate!==null&&pe.delete(He.key===null?we:He.key),M=m(He,M,we),Ue===null?ge=He:Ue.sibling=He,Ue=He);return n&&pe.forEach(function(VS){return r(I,VS)}),ze&&Vn(I,we),ge}function Fe(I,M,P,Z){if(typeof P=="object"&&P!==null&&P.type===T&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case v:e:{for(var ge=P.key;M!==null;){if(M.key===ge){if(ge=P.type,ge===T){if(M.tag===7){l(I,M.sibling),Z=h(M,P.props.children),Z.return=I,I=Z;break e}}else if(M.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===$&&Xi(ge)===M.type){l(I,M.sibling),Z=h(M,P.props),Ha(Z,P),Z.return=I,I=Z;break e}l(I,M);break}else r(I,M);M=M.sibling}P.type===T?(Z=Gi(P.props.children,I.mode,Z,P.key),Z.return=I,I=Z):(Z=lo(P.type,P.key,P.props,null,I.mode,Z),Ha(Z,P),Z.return=I,I=Z)}return _(I);case S:e:{for(ge=P.key;M!==null;){if(M.key===ge)if(M.tag===4&&M.stateNode.containerInfo===P.containerInfo&&M.stateNode.implementation===P.implementation){l(I,M.sibling),Z=h(M,P.children||[]),Z.return=I,I=Z;break e}else{l(I,M);break}else r(I,M);M=M.sibling}Z=Nu(P,I.mode,Z),Z.return=I,I=Z}return _(I);case $:return P=Xi(P),Fe(I,M,P,Z)}if(te(P))return de(I,M,P,Z);if(J(P)){if(ge=J(P),typeof ge!="function")throw Error(a(150));return P=ge.call(P),be(I,M,P,Z)}if(typeof P.then=="function")return Fe(I,M,po(P),Z);if(P.$$typeof===C)return Fe(I,M,uo(I,P),Z);mo(I,P)}return typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint"?(P=""+P,M!==null&&M.tag===6?(l(I,M.sibling),Z=h(M,P),Z.return=I,I=Z):(l(I,M),Z=Ou(P,I.mode,Z),Z.return=I,I=Z),_(I)):l(I,M)}return function(I,M,P,Z){try{Ua=0;var ge=Fe(I,M,P,Z);return Mr=null,ge}catch(pe){if(pe===Nr||pe===fo)throw pe;var Ue=Yt(29,pe,null,I.mode);return Ue.lanes=Z,Ue.return=I,Ue}}}var Zi=wp(!0),Ap=wp(!1),pi=!1;function qu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fu(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function mi(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function gi(n,r,l){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(Pe&2)!==0){var h=u.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),u.pending=r,r=ao(n),up(n,null,l),r}return ro(n,u,r,l),ao(n)}function Pa(n,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,yh(n,l)}}function Yu(n,r){var l=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var h=null,m=null;if(l=l.firstBaseUpdate,l!==null){do{var _={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};m===null?h=m=_:m=m.next=_,l=l.next}while(l!==null);m===null?h=m=r:m=m.next=r}else h=m=r;l={baseState:u.baseState,firstBaseUpdate:h,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=r:n.next=r,l.lastBaseUpdate=r}var Xu=!1;function Ba(){if(Xu){var n=Or;if(n!==null)throw n}}function ja(n,r,l,u){Xu=!1;var h=n.updateQueue;pi=!1;var m=h.firstBaseUpdate,_=h.lastBaseUpdate,E=h.shared.pending;if(E!==null){h.shared.pending=null;var D=E,B=D.next;D.next=null,_===null?m=B:_.next=B,_=D;var Y=n.alternate;Y!==null&&(Y=Y.updateQueue,E=Y.lastBaseUpdate,E!==_&&(E===null?Y.firstBaseUpdate=B:E.next=B,Y.lastBaseUpdate=D))}if(m!==null){var K=h.baseState;_=0,Y=B=D=null,E=m;do{var V=E.lane&-536870913,G=V!==E.lane;if(G?(Me&V)===V:(u&V)===V){V!==0&&V===Dr&&(Xu=!0),Y!==null&&(Y=Y.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var de=n,be=E;V=r;var Fe=l;switch(be.tag){case 1:if(de=be.payload,typeof de=="function"){K=de.call(Fe,K,V);break e}K=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=be.payload,V=typeof de=="function"?de.call(Fe,K,V):de,V==null)break e;K=y({},K,V);break e;case 2:pi=!0}}V=E.callback,V!==null&&(n.flags|=64,G&&(n.flags|=8192),G=h.callbacks,G===null?h.callbacks=[V]:G.push(V))}else G={lane:V,tag:E.tag,payload:E.payload,callback:E.callback,next:null},Y===null?(B=Y=G,D=K):Y=Y.next=G,_|=V;if(E=E.next,E===null){if(E=h.shared.pending,E===null)break;G=E,E=G.next,G.next=null,h.lastBaseUpdate=G,h.shared.pending=null}}while(!0);Y===null&&(D=K),h.baseState=D,h.firstBaseUpdate=B,h.lastBaseUpdate=Y,m===null&&(h.shared.lanes=0),Si|=_,n.lanes=_,n.memoizedState=K}}function kp(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function Tp(n,r){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;n<l.length;n++)kp(l[n],r)}var Ir=N(null),go=N(0);function Lp(n,r){n=Jn,w(go,n),w(Ir,r),Jn=n|r.baseLanes}function Qu(){w(go,Jn),w(Ir,Ir.current)}function Zu(){Jn=go.current,F(Ir),F(go)}var Xt=N(null),un=null;function yi(n){var r=n.alternate;w(it,it.current&1),w(Xt,n),un===null&&(r===null||Ir.current!==null||r.memoizedState!==null)&&(un=n)}function Ku(n){w(it,it.current),w(Xt,n),un===null&&(un=n)}function Rp(n){n.tag===22?(w(it,it.current),w(Xt,n),un===null&&(un=n)):bi()}function bi(){w(it,it.current),w(Xt,Xt.current)}function Qt(n){F(Xt),un===n&&(un=null),F(it)}var it=N(0);function yo(n){for(var r=n;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||rf(l)||af(l)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var qn=0,Ce=null,$e=null,ot=null,bo=!1,zr=!1,Ki=!1,vo=0,Va=0,Ur=null,O_=0;function tt(){throw Error(a(321))}function Wu(n,r){if(r===null)return!1;for(var l=0;l<r.length&&l<n.length;l++)if(!Ft(n[l],r[l]))return!1;return!0}function Ju(n,r,l,u,h,m){return qn=m,Ce=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,H.H=n===null||n.memoizedState===null?hm:pc,Ki=!1,m=l(u,h),Ki=!1,zr&&(m=Op(r,l,u,h)),Dp(n),m}function Dp(n){H.H=qa;var r=$e!==null&&$e.next!==null;if(qn=0,ot=$e=Ce=null,bo=!1,Va=0,Ur=null,r)throw Error(a(300));n===null||st||(n=n.dependencies,n!==null&&so(n)&&(st=!0))}function Op(n,r,l,u){Ce=n;var h=0;do{if(zr&&(Ur=null),Va=0,zr=!1,25<=h)throw Error(a(301));if(h+=1,ot=$e=null,n.updateQueue!=null){var m=n.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}H.H=pm,m=r(l,u)}while(zr);return m}function N_(){var n=H.H,r=n.useState()[0];return r=typeof r.then=="function"?Ga(r):r,n=n.useState()[0],($e!==null?$e.memoizedState:null)!==n&&(Ce.flags|=1024),r}function ec(){var n=vo!==0;return vo=0,n}function tc(n,r,l){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~l}function nc(n){if(bo){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}bo=!1}qn=0,ot=$e=Ce=null,zr=!1,Va=vo=0,Ur=null}function Nt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?Ce.memoizedState=ot=n:ot=ot.next=n,ot}function rt(){if($e===null){var n=Ce.alternate;n=n!==null?n.memoizedState:null}else n=$e.next;var r=ot===null?Ce.memoizedState:ot.next;if(r!==null)ot=r,$e=n;else{if(n===null)throw Ce.alternate===null?Error(a(467)):Error(a(310));$e=n,n={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},ot===null?Ce.memoizedState=ot=n:ot=ot.next=n}return ot}function _o(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ga(n){var r=Va;return Va+=1,Ur===null&&(Ur=[]),n=Ep(Ur,n,r),r=Ce,(ot===null?r.memoizedState:ot.next)===null&&(r=r.alternate,H.H=r===null||r.memoizedState===null?hm:pc),n}function So(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Ga(n);if(n.$$typeof===C)return Ct(n)}throw Error(a(438,String(n)))}function ic(n){var r=null,l=Ce.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=Ce.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=_o(),Ce.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(n),u=0;u<n;u++)l[u]=ne;return r.index++,l}function Fn(n,r){return typeof r=="function"?r(n):r}function Eo(n){var r=rt();return rc(r,$e,n)}function rc(n,r,l){var u=n.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var h=n.baseQueue,m=u.pending;if(m!==null){if(h!==null){var _=h.next;h.next=m.next,m.next=_}r.baseQueue=h=m,u.pending=null}if(m=n.baseState,h===null)n.memoizedState=m;else{r=h.next;var E=_=null,D=null,B=r,Y=!1;do{var K=B.lane&-536870913;if(K!==B.lane?(Me&K)===K:(qn&K)===K){var V=B.revertLane;if(V===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),K===Dr&&(Y=!0);else if((qn&V)===V){B=B.next,V===Dr&&(Y=!0);continue}else K={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},D===null?(E=D=K,_=m):D=D.next=K,Ce.lanes|=V,Si|=V;K=B.action,Ki&&l(m,K),m=B.hasEagerState?B.eagerState:l(m,K)}else V={lane:K,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},D===null?(E=D=V,_=m):D=D.next=V,Ce.lanes|=K,Si|=K;B=B.next}while(B!==null&&B!==r);if(D===null?_=m:D.next=E,!Ft(m,n.memoizedState)&&(st=!0,Y&&(l=Or,l!==null)))throw l;n.memoizedState=m,n.baseState=_,n.baseQueue=D,u.lastRenderedState=m}return h===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function ac(n){var r=rt(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=n;var u=l.dispatch,h=l.pending,m=r.memoizedState;if(h!==null){l.pending=null;var _=h=h.next;do m=n(m,_.action),_=_.next;while(_!==h);Ft(m,r.memoizedState)||(st=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),l.lastRenderedState=m}return[m,u]}function Np(n,r,l){var u=Ce,h=rt(),m=ze;if(m){if(l===void 0)throw Error(a(407));l=l()}else l=r();var _=!Ft(($e||h).memoizedState,l);if(_&&(h.memoizedState=l,st=!0),h=h.queue,sc(zp.bind(null,u,h,n),[n]),h.getSnapshot!==r||_||ot!==null&&ot.memoizedState.tag&1){if(u.flags|=2048,Hr(9,{destroy:void 0},Ip.bind(null,u,h,l,r),null),Xe===null)throw Error(a(349));m||(qn&127)!==0||Mp(u,r,l)}return l}function Mp(n,r,l){n.flags|=16384,n={getSnapshot:r,value:l},r=Ce.updateQueue,r===null?(r=_o(),Ce.updateQueue=r,r.stores=[n]):(l=r.stores,l===null?r.stores=[n]:l.push(n))}function Ip(n,r,l,u){r.value=l,r.getSnapshot=u,Up(r)&&Hp(n)}function zp(n,r,l){return l(function(){Up(r)&&Hp(n)})}function Up(n){var r=n.getSnapshot;n=n.value;try{var l=r();return!Ft(n,l)}catch{return!0}}function Hp(n){var r=Vi(n,2);r!==null&&jt(r,n,2)}function lc(n){var r=Nt();if(typeof n=="function"){var l=n;if(n=l(),Ki){Mt(!0);try{l()}finally{Mt(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:n},r}function Pp(n,r,l,u){return n.baseState=l,rc(n,$e,typeof u=="function"?u:Fn)}function M_(n,r,l,u,h){if(wo(n))throw Error(a(485));if(n=r.action,n!==null){var m={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){m.listeners.push(_)}};H.T!==null?l(!0):m.isTransition=!1,u(m),l=r.pending,l===null?(m.next=r.pending=m,Bp(r,m)):(m.next=l.next,r.pending=l.next=m)}}function Bp(n,r){var l=r.action,u=r.payload,h=n.state;if(r.isTransition){var m=H.T,_={};H.T=_;try{var E=l(h,u),D=H.S;D!==null&&D(_,E),jp(n,r,E)}catch(B){oc(n,r,B)}finally{m!==null&&_.types!==null&&(m.types=_.types),H.T=m}}else try{m=l(h,u),jp(n,r,m)}catch(B){oc(n,r,B)}}function jp(n,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){Vp(n,r,u)},function(u){return oc(n,r,u)}):Vp(n,r,l)}function Vp(n,r,l){r.status="fulfilled",r.value=l,Gp(r),n.state=l,r=n.pending,r!==null&&(l=r.next,l===r?n.pending=null:(l=l.next,r.next=l,Bp(n,l)))}function oc(n,r,l){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=l,Gp(r),r=r.next;while(r!==u)}n.action=null}function Gp(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function $p(n,r){return r}function qp(n,r){if(ze){var l=Xe.formState;if(l!==null){e:{var u=Ce;if(ze){if(We){t:{for(var h=We,m=sn;h.nodeType!==8;){if(!m){h=null;break t}if(h=cn(h.nextSibling),h===null){h=null;break t}}m=h.data,h=m==="F!"||m==="F"?h:null}if(h){We=cn(h.nextSibling),u=h.data==="F!";break e}}di(u)}u=!1}u&&(r=l[0])}}return l=Nt(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$p,lastRenderedState:r},l.queue=u,l=cm.bind(null,Ce,u),u.dispatch=l,u=lc(!1),m=hc.bind(null,Ce,!1,u.queue),u=Nt(),h={state:r,dispatch:null,action:n,pending:null},u.queue=h,l=M_.bind(null,Ce,h,m,l),h.dispatch=l,u.memoizedState=n,[r,l,!1]}function Fp(n){var r=rt();return Yp(r,$e,n)}function Yp(n,r,l){if(r=rc(n,r,$p)[0],n=Eo(Fn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=Ga(r)}catch(_){throw _===Nr?fo:_}else u=r;r=rt();var h=r.queue,m=h.dispatch;return l!==r.memoizedState&&(Ce.flags|=2048,Hr(9,{destroy:void 0},I_.bind(null,h,l),null)),[u,m,n]}function I_(n,r){n.action=r}function Xp(n){var r=rt(),l=$e;if(l!==null)return Yp(r,l,n);rt(),r=r.memoizedState,l=rt();var u=l.queue.dispatch;return l.memoizedState=n,[r,u,!1]}function Hr(n,r,l,u){return n={tag:n,create:l,deps:u,inst:r,next:null},r=Ce.updateQueue,r===null&&(r=_o(),Ce.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=n.next=n:(u=l.next,l.next=n,n.next=u,r.lastEffect=n),n}function Qp(){return rt().memoizedState}function xo(n,r,l,u){var h=Nt();Ce.flags|=n,h.memoizedState=Hr(1|r,{destroy:void 0},l,u===void 0?null:u)}function Co(n,r,l,u){var h=rt();u=u===void 0?null:u;var m=h.memoizedState.inst;$e!==null&&u!==null&&Wu(u,$e.memoizedState.deps)?h.memoizedState=Hr(r,m,l,u):(Ce.flags|=n,h.memoizedState=Hr(1|r,m,l,u))}function Zp(n,r){xo(8390656,8,n,r)}function sc(n,r){Co(2048,8,n,r)}function z_(n){Ce.flags|=4;var r=Ce.updateQueue;if(r===null)r=_o(),Ce.updateQueue=r,r.events=[n];else{var l=r.events;l===null?r.events=[n]:l.push(n)}}function Kp(n){var r=rt().memoizedState;return z_({ref:r,nextImpl:n}),function(){if((Pe&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function Wp(n,r){return Co(4,2,n,r)}function Jp(n,r){return Co(4,4,n,r)}function em(n,r){if(typeof r=="function"){n=n();var l=r(n);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function tm(n,r,l){l=l!=null?l.concat([n]):null,Co(4,4,em.bind(null,r,n),l)}function uc(){}function nm(n,r){var l=rt();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&Wu(r,u[1])?u[0]:(l.memoizedState=[n,r],n)}function im(n,r){var l=rt();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&Wu(r,u[1]))return u[0];if(u=n(),Ki){Mt(!0);try{n()}finally{Mt(!1)}}return l.memoizedState=[u,r],u}function cc(n,r,l){return l===void 0||(qn&1073741824)!==0&&(Me&261930)===0?n.memoizedState=r:(n.memoizedState=l,n=rg(),Ce.lanes|=n,Si|=n,l)}function rm(n,r,l,u){return Ft(l,r)?l:Ir.current!==null?(n=cc(n,l,u),Ft(n,r)||(st=!0),n):(qn&42)===0||(qn&1073741824)!==0&&(Me&261930)===0?(st=!0,n.memoizedState=l):(n=rg(),Ce.lanes|=n,Si|=n,r)}function am(n,r,l,u,h){var m=X.p;X.p=m!==0&&8>m?m:8;var _=H.T,E={};H.T=E,hc(n,!1,r,l);try{var D=h(),B=H.S;if(B!==null&&B(E,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var Y=D_(D,u);$a(n,r,Y,Wt(n))}else $a(n,r,u,Wt(n))}catch(K){$a(n,r,{then:function(){},status:"rejected",reason:K},Wt())}finally{X.p=m,_!==null&&E.types!==null&&(_.types=E.types),H.T=_}}function U_(){}function fc(n,r,l,u){if(n.tag!==5)throw Error(a(476));var h=lm(n).queue;am(n,h,r,oe,l===null?U_:function(){return om(n),l(u)})}function lm(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:oe},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:l},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function om(n){var r=lm(n);r.next===null&&(r=n.alternate.memoizedState),$a(n,r.next.queue,{},Wt())}function dc(){return Ct(ol)}function sm(){return rt().memoizedState}function um(){return rt().memoizedState}function H_(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var l=Wt();n=mi(l);var u=gi(r,n,l);u!==null&&(jt(u,r,l),Pa(u,r,l)),r={cache:ju()},n.payload=r;return}r=r.return}}function P_(n,r,l){var u=Wt();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},wo(n)?fm(r,l):(l=Ru(n,r,l,u),l!==null&&(jt(l,n,u),dm(l,r,u)))}function cm(n,r,l){var u=Wt();$a(n,r,l,u)}function $a(n,r,l,u){var h={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(wo(n))fm(r,h);else{var m=n.alternate;if(n.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var _=r.lastRenderedState,E=m(_,l);if(h.hasEagerState=!0,h.eagerState=E,Ft(E,_))return ro(n,r,h,0),Xe===null&&io(),!1}catch{}if(l=Ru(n,r,h,u),l!==null)return jt(l,n,u),dm(l,r,u),!0}return!1}function hc(n,r,l,u){if(u={lane:2,revertLane:qc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},wo(n)){if(r)throw Error(a(479))}else r=Ru(n,l,u,2),r!==null&&jt(r,n,2)}function wo(n){var r=n.alternate;return n===Ce||r!==null&&r===Ce}function fm(n,r){zr=bo=!0;var l=n.pending;l===null?r.next=r:(r.next=l.next,l.next=r),n.pending=r}function dm(n,r,l){if((l&4194048)!==0){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,yh(n,l)}}var qa={readContext:Ct,use:So,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};qa.useEffectEvent=tt;var hm={readContext:Ct,use:So,useCallback:function(n,r){return Nt().memoizedState=[n,r===void 0?null:r],n},useContext:Ct,useEffect:Zp,useImperativeHandle:function(n,r,l){l=l!=null?l.concat([n]):null,xo(4194308,4,em.bind(null,r,n),l)},useLayoutEffect:function(n,r){return xo(4194308,4,n,r)},useInsertionEffect:function(n,r){xo(4,2,n,r)},useMemo:function(n,r){var l=Nt();r=r===void 0?null:r;var u=n();if(Ki){Mt(!0);try{n()}finally{Mt(!1)}}return l.memoizedState=[u,r],u},useReducer:function(n,r,l){var u=Nt();if(l!==void 0){var h=l(r);if(Ki){Mt(!0);try{l(r)}finally{Mt(!1)}}}else h=r;return u.memoizedState=u.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},u.queue=n,n=n.dispatch=P_.bind(null,Ce,n),[u.memoizedState,n]},useRef:function(n){var r=Nt();return n={current:n},r.memoizedState=n},useState:function(n){n=lc(n);var r=n.queue,l=cm.bind(null,Ce,r);return r.dispatch=l,[n.memoizedState,l]},useDebugValue:uc,useDeferredValue:function(n,r){var l=Nt();return cc(l,n,r)},useTransition:function(){var n=lc(!1);return n=am.bind(null,Ce,n.queue,!0,!1),Nt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,l){var u=Ce,h=Nt();if(ze){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),Xe===null)throw Error(a(349));(Me&127)!==0||Mp(u,r,l)}h.memoizedState=l;var m={value:l,getSnapshot:r};return h.queue=m,Zp(zp.bind(null,u,m,n),[n]),u.flags|=2048,Hr(9,{destroy:void 0},Ip.bind(null,u,m,l,r),null),l},useId:function(){var n=Nt(),r=Xe.identifierPrefix;if(ze){var l=An,u=wn;l=(u&~(1<<32-Ye(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=vo++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=O_++,r="_"+r+"r_"+l.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:dc,useFormState:qp,useActionState:qp,useOptimistic:function(n){var r=Nt();r.memoizedState=r.baseState=n;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=hc.bind(null,Ce,!0,l),l.dispatch=r,[n,r]},useMemoCache:ic,useCacheRefresh:function(){return Nt().memoizedState=H_.bind(null,Ce)},useEffectEvent:function(n){var r=Nt(),l={impl:n};return r.memoizedState=l,function(){if((Pe&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},pc={readContext:Ct,use:So,useCallback:nm,useContext:Ct,useEffect:sc,useImperativeHandle:tm,useInsertionEffect:Wp,useLayoutEffect:Jp,useMemo:im,useReducer:Eo,useRef:Qp,useState:function(){return Eo(Fn)},useDebugValue:uc,useDeferredValue:function(n,r){var l=rt();return rm(l,$e.memoizedState,n,r)},useTransition:function(){var n=Eo(Fn)[0],r=rt().memoizedState;return[typeof n=="boolean"?n:Ga(n),r]},useSyncExternalStore:Np,useId:sm,useHostTransitionStatus:dc,useFormState:Fp,useActionState:Fp,useOptimistic:function(n,r){var l=rt();return Pp(l,$e,n,r)},useMemoCache:ic,useCacheRefresh:um};pc.useEffectEvent=Kp;var pm={readContext:Ct,use:So,useCallback:nm,useContext:Ct,useEffect:sc,useImperativeHandle:tm,useInsertionEffect:Wp,useLayoutEffect:Jp,useMemo:im,useReducer:ac,useRef:Qp,useState:function(){return ac(Fn)},useDebugValue:uc,useDeferredValue:function(n,r){var l=rt();return $e===null?cc(l,n,r):rm(l,$e.memoizedState,n,r)},useTransition:function(){var n=ac(Fn)[0],r=rt().memoizedState;return[typeof n=="boolean"?n:Ga(n),r]},useSyncExternalStore:Np,useId:sm,useHostTransitionStatus:dc,useFormState:Xp,useActionState:Xp,useOptimistic:function(n,r){var l=rt();return $e!==null?Pp(l,$e,n,r):(l.baseState=n,[n,l.queue.dispatch])},useMemoCache:ic,useCacheRefresh:um};pm.useEffectEvent=Kp;function mc(n,r,l,u){r=n.memoizedState,l=l(u,r),l=l==null?r:y({},r,l),n.memoizedState=l,n.lanes===0&&(n.updateQueue.baseState=l)}var gc={enqueueSetState:function(n,r,l){n=n._reactInternals;var u=Wt(),h=mi(u);h.payload=r,l!=null&&(h.callback=l),r=gi(n,h,u),r!==null&&(jt(r,n,u),Pa(r,n,u))},enqueueReplaceState:function(n,r,l){n=n._reactInternals;var u=Wt(),h=mi(u);h.tag=1,h.payload=r,l!=null&&(h.callback=l),r=gi(n,h,u),r!==null&&(jt(r,n,u),Pa(r,n,u))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var l=Wt(),u=mi(l);u.tag=2,r!=null&&(u.callback=r),r=gi(n,u,l),r!==null&&(jt(r,n,l),Pa(r,n,l))}};function mm(n,r,l,u,h,m,_){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,m,_):r.prototype&&r.prototype.isPureReactComponent?!Da(l,u)||!Da(h,m):!0}function gm(n,r,l,u){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,u),r.state!==n&&gc.enqueueReplaceState(r,r.state,null)}function Wi(n,r){var l=r;if("ref"in r){l={};for(var u in r)u!=="ref"&&(l[u]=r[u])}if(n=n.defaultProps){l===r&&(l=y({},l));for(var h in n)l[h]===void 0&&(l[h]=n[h])}return l}function ym(n){no(n)}function bm(n){console.error(n)}function vm(n){no(n)}function Ao(n,r){try{var l=n.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function _m(n,r,l){try{var u=n.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function yc(n,r,l){return l=mi(l),l.tag=3,l.payload={element:null},l.callback=function(){Ao(n,r)},l}function Sm(n){return n=mi(n),n.tag=3,n}function Em(n,r,l,u){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var m=u.value;n.payload=function(){return h(m)},n.callback=function(){_m(r,l,u)}}var _=l.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(n.callback=function(){_m(r,l,u),typeof h!="function"&&(Ei===null?Ei=new Set([this]):Ei.add(this));var E=u.stack;this.componentDidCatch(u.value,{componentStack:E!==null?E:""})})}function B_(n,r,l,u,h){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&Rr(r,l,h,!0),l=Xt.current,l!==null){switch(l.tag){case 31:case 13:return un===null?Ho():l.alternate===null&&nt===0&&(nt=3),l.flags&=-257,l.flags|=65536,l.lanes=h,u===ho?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),Vc(n,u,h)),!1;case 22:return l.flags|=65536,u===ho?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([u]):l.add(u)),Vc(n,u,h)),!1}throw Error(a(435,l.tag))}return Vc(n,u,h),Ho(),!1}if(ze)return r=Xt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,u!==zu&&(n=Error(a(422),{cause:u}),Ma(an(n,l)))):(u!==zu&&(r=Error(a(423),{cause:u}),Ma(an(r,l))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,u=an(u,l),h=yc(n.stateNode,u,h),Yu(n,h),nt!==4&&(nt=2)),!1;var m=Error(a(520),{cause:u});if(m=an(m,l),Ja===null?Ja=[m]:Ja.push(m),nt!==4&&(nt=2),r===null)return!0;u=an(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,n=h&-h,l.lanes|=n,n=yc(l.stateNode,u,n),Yu(l,n),!1;case 1:if(r=l.type,m=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Ei===null||!Ei.has(m))))return l.flags|=65536,h&=-h,l.lanes|=h,h=Sm(h),Em(h,n,l,u),Yu(l,h),!1}l=l.return}while(l!==null);return!1}var bc=Error(a(461)),st=!1;function wt(n,r,l,u){r.child=n===null?Ap(r,null,l,u):Zi(r,n.child,l,u)}function xm(n,r,l,u,h){l=l.render;var m=r.ref;if("ref"in u){var _={};for(var E in u)E!=="ref"&&(_[E]=u[E])}else _=u;return Fi(r),u=Ju(n,r,l,_,m,h),E=ec(),n!==null&&!st?(tc(n,r,h),Yn(n,r,h)):(ze&&E&&Mu(r),r.flags|=1,wt(n,r,u,h),r.child)}function Cm(n,r,l,u,h){if(n===null){var m=l.type;return typeof m=="function"&&!Du(m)&&m.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=m,wm(n,r,m,u,h)):(n=lo(l.type,null,u,r,r.mode,h),n.ref=r.ref,n.return=r,r.child=n)}if(m=n.child,!Ac(n,h)){var _=m.memoizedProps;if(l=l.compare,l=l!==null?l:Da,l(_,u)&&n.ref===r.ref)return Yn(n,r,h)}return r.flags|=1,n=jn(m,u),n.ref=r.ref,n.return=r,r.child=n}function wm(n,r,l,u,h){if(n!==null){var m=n.memoizedProps;if(Da(m,u)&&n.ref===r.ref)if(st=!1,r.pendingProps=u=m,Ac(n,h))(n.flags&131072)!==0&&(st=!0);else return r.lanes=n.lanes,Yn(n,r,h)}return vc(n,r,l,u,h)}function Am(n,r,l,u){var h=u.children,m=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((r.flags&128)!==0){if(m=m!==null?m.baseLanes|l:l,n!==null){for(u=r.child=n.child,h=0;u!==null;)h=h|u.lanes|u.childLanes,u=u.sibling;u=h&~m}else u=0,r.child=null;return km(n,r,m,l,u)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&co(r,m!==null?m.cachePool:null),m!==null?Lp(r,m):Qu(),Rp(r);else return u=r.lanes=536870912,km(n,r,m!==null?m.baseLanes|l:l,l,u)}else m!==null?(co(r,m.cachePool),Lp(r,m),bi(),r.memoizedState=null):(n!==null&&co(r,null),Qu(),bi());return wt(n,r,h,l),r.child}function Fa(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function km(n,r,l,u,h){var m=Gu();return m=m===null?null:{parent:lt._currentValue,pool:m},r.memoizedState={baseLanes:l,cachePool:m},n!==null&&co(r,null),Qu(),Rp(r),n!==null&&Rr(n,r,u,!0),r.childLanes=h,null}function ko(n,r){return r=Lo({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Tm(n,r,l){return Zi(r,n.child,null,l),n=ko(r,r.pendingProps),n.flags|=2,Qt(r),r.memoizedState=null,n}function j_(n,r,l){var u=r.pendingProps,h=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(ze){if(u.mode==="hidden")return n=ko(r,u),r.lanes=536870912,Fa(null,n);if(Ku(r),(n=We)?(n=Bg(n,sn),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:ci!==null?{id:wn,overflow:An}:null,retryLane:536870912,hydrationErrors:null},l=fp(n),l.return=r,r.child=l,xt=r,We=null)):n=null,n===null)throw di(r);return r.lanes=536870912,null}return ko(r,u)}var m=n.memoizedState;if(m!==null){var _=m.dehydrated;if(Ku(r),h)if(r.flags&256)r.flags&=-257,r=Tm(n,r,l);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(st||Rr(n,r,l,!1),h=(l&n.childLanes)!==0,st||h){if(u=Xe,u!==null&&(_=bh(u,l),_!==0&&_!==m.retryLane))throw m.retryLane=_,Vi(n,_),jt(u,n,_),bc;Ho(),r=Tm(n,r,l)}else n=m.treeContext,We=cn(_.nextSibling),xt=r,ze=!0,fi=null,sn=!1,n!==null&&pp(r,n),r=ko(r,u),r.flags|=4096;return r}return n=jn(n.child,{mode:u.mode,children:u.children}),n.ref=r.ref,r.child=n,n.return=r,n}function To(n,r){var l=r.ref;if(l===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(n===null||n.ref!==l)&&(r.flags|=4194816)}}function vc(n,r,l,u,h){return Fi(r),l=Ju(n,r,l,u,void 0,h),u=ec(),n!==null&&!st?(tc(n,r,h),Yn(n,r,h)):(ze&&u&&Mu(r),r.flags|=1,wt(n,r,l,h),r.child)}function Lm(n,r,l,u,h,m){return Fi(r),r.updateQueue=null,l=Op(r,u,l,h),Dp(n),u=ec(),n!==null&&!st?(tc(n,r,m),Yn(n,r,m)):(ze&&u&&Mu(r),r.flags|=1,wt(n,r,l,m),r.child)}function Rm(n,r,l,u,h){if(Fi(r),r.stateNode===null){var m=Ar,_=l.contextType;typeof _=="object"&&_!==null&&(m=Ct(_)),m=new l(u,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=gc,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=u,m.state=r.memoizedState,m.refs={},qu(r),_=l.contextType,m.context=typeof _=="object"&&_!==null?Ct(_):Ar,m.state=r.memoizedState,_=l.getDerivedStateFromProps,typeof _=="function"&&(mc(r,l,_,u),m.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(_=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),_!==m.state&&gc.enqueueReplaceState(m,m.state,null),ja(r,u,m,h),Ba(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(n===null){m=r.stateNode;var E=r.memoizedProps,D=Wi(l,E);m.props=D;var B=m.context,Y=l.contextType;_=Ar,typeof Y=="object"&&Y!==null&&(_=Ct(Y));var K=l.getDerivedStateFromProps;Y=typeof K=="function"||typeof m.getSnapshotBeforeUpdate=="function",E=r.pendingProps!==E,Y||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(E||B!==_)&&gm(r,m,u,_),pi=!1;var V=r.memoizedState;m.state=V,ja(r,u,m,h),Ba(),B=r.memoizedState,E||V!==B||pi?(typeof K=="function"&&(mc(r,l,K,u),B=r.memoizedState),(D=pi||mm(r,l,D,u,V,B,_))?(Y||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=B),m.props=u,m.state=B,m.context=_,u=D):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{m=r.stateNode,Fu(n,r),_=r.memoizedProps,Y=Wi(l,_),m.props=Y,K=r.pendingProps,V=m.context,B=l.contextType,D=Ar,typeof B=="object"&&B!==null&&(D=Ct(B)),E=l.getDerivedStateFromProps,(B=typeof E=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(_!==K||V!==D)&&gm(r,m,u,D),pi=!1,V=r.memoizedState,m.state=V,ja(r,u,m,h),Ba();var G=r.memoizedState;_!==K||V!==G||pi||n!==null&&n.dependencies!==null&&so(n.dependencies)?(typeof E=="function"&&(mc(r,l,E,u),G=r.memoizedState),(Y=pi||mm(r,l,Y,u,V,G,D)||n!==null&&n.dependencies!==null&&so(n.dependencies))?(B||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(u,G,D),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(u,G,D)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||_===n.memoizedProps&&V===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&V===n.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=G),m.props=u,m.state=G,m.context=D,u=Y):(typeof m.componentDidUpdate!="function"||_===n.memoizedProps&&V===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&V===n.memoizedState||(r.flags|=1024),u=!1)}return m=u,To(n,r),u=(r.flags&128)!==0,m||u?(m=r.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,n!==null&&u?(r.child=Zi(r,n.child,null,h),r.child=Zi(r,null,l,h)):wt(n,r,l,h),r.memoizedState=m.state,n=r.child):n=Yn(n,r,h),n}function Dm(n,r,l,u){return $i(),r.flags|=256,wt(n,r,l,u),r.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(n){return{baseLanes:n,cachePool:_p()}}function Ec(n,r,l){return n=n!==null?n.childLanes&~l:0,r&&(n|=Kt),n}function Om(n,r,l){var u=r.pendingProps,h=!1,m=(r.flags&128)!==0,_;if((_=m)||(_=n!==null&&n.memoizedState===null?!1:(it.current&2)!==0),_&&(h=!0,r.flags&=-129),_=(r.flags&32)!==0,r.flags&=-33,n===null){if(ze){if(h?yi(r):bi(),(n=We)?(n=Bg(n,sn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:ci!==null?{id:wn,overflow:An}:null,retryLane:536870912,hydrationErrors:null},l=fp(n),l.return=r,r.child=l,xt=r,We=null)):n=null,n===null)throw di(r);return af(n)?r.lanes=32:r.lanes=536870912,null}var E=u.children;return u=u.fallback,h?(bi(),h=r.mode,E=Lo({mode:"hidden",children:E},h),u=Gi(u,h,l,null),E.return=r,u.return=r,E.sibling=u,r.child=E,u=r.child,u.memoizedState=Sc(l),u.childLanes=Ec(n,_,l),r.memoizedState=_c,Fa(null,u)):(yi(r),xc(r,E))}var D=n.memoizedState;if(D!==null&&(E=D.dehydrated,E!==null)){if(m)r.flags&256?(yi(r),r.flags&=-257,r=Cc(n,r,l)):r.memoizedState!==null?(bi(),r.child=n.child,r.flags|=128,r=null):(bi(),E=u.fallback,h=r.mode,u=Lo({mode:"visible",children:u.children},h),E=Gi(E,h,l,null),E.flags|=2,u.return=r,E.return=r,u.sibling=E,r.child=u,Zi(r,n.child,null,l),u=r.child,u.memoizedState=Sc(l),u.childLanes=Ec(n,_,l),r.memoizedState=_c,r=Fa(null,u));else if(yi(r),af(E)){if(_=E.nextSibling&&E.nextSibling.dataset,_)var B=_.dgst;_=B,u=Error(a(419)),u.stack="",u.digest=_,Ma({value:u,source:null,stack:null}),r=Cc(n,r,l)}else if(st||Rr(n,r,l,!1),_=(l&n.childLanes)!==0,st||_){if(_=Xe,_!==null&&(u=bh(_,l),u!==0&&u!==D.retryLane))throw D.retryLane=u,Vi(n,u),jt(_,n,u),bc;rf(E)||Ho(),r=Cc(n,r,l)}else rf(E)?(r.flags|=192,r.child=n.child,r=null):(n=D.treeContext,We=cn(E.nextSibling),xt=r,ze=!0,fi=null,sn=!1,n!==null&&pp(r,n),r=xc(r,u.children),r.flags|=4096);return r}return h?(bi(),E=u.fallback,h=r.mode,D=n.child,B=D.sibling,u=jn(D,{mode:"hidden",children:u.children}),u.subtreeFlags=D.subtreeFlags&65011712,B!==null?E=jn(B,E):(E=Gi(E,h,l,null),E.flags|=2),E.return=r,u.return=r,u.sibling=E,r.child=u,Fa(null,u),u=r.child,E=n.child.memoizedState,E===null?E=Sc(l):(h=E.cachePool,h!==null?(D=lt._currentValue,h=h.parent!==D?{parent:D,pool:D}:h):h=_p(),E={baseLanes:E.baseLanes|l,cachePool:h}),u.memoizedState=E,u.childLanes=Ec(n,_,l),r.memoizedState=_c,Fa(n.child,u)):(yi(r),l=n.child,n=l.sibling,l=jn(l,{mode:"visible",children:u.children}),l.return=r,l.sibling=null,n!==null&&(_=r.deletions,_===null?(r.deletions=[n],r.flags|=16):_.push(n)),r.child=l,r.memoizedState=null,l)}function xc(n,r){return r=Lo({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function Lo(n,r){return n=Yt(22,n,null,r),n.lanes=0,n}function Cc(n,r,l){return Zi(r,n.child,null,l),n=xc(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function Nm(n,r,l){n.lanes|=r;var u=n.alternate;u!==null&&(u.lanes|=r),Pu(n.return,r,l)}function wc(n,r,l,u,h,m){var _=n.memoizedState;_===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:h,treeForkCount:m}:(_.isBackwards=r,_.rendering=null,_.renderingStartTime=0,_.last=u,_.tail=l,_.tailMode=h,_.treeForkCount=m)}function Mm(n,r,l){var u=r.pendingProps,h=u.revealOrder,m=u.tail;u=u.children;var _=it.current,E=(_&2)!==0;if(E?(_=_&1|2,r.flags|=128):_&=1,w(it,_),wt(n,r,u,l),u=ze?Na:0,!E&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Nm(n,l,r);else if(n.tag===19)Nm(n,l,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(h){case"forwards":for(l=r.child,h=null;l!==null;)n=l.alternate,n!==null&&yo(n)===null&&(h=l),l=l.sibling;l=h,l===null?(h=r.child,r.child=null):(h=l.sibling,l.sibling=null),wc(r,!1,h,l,m,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,h=r.child,r.child=null;h!==null;){if(n=h.alternate,n!==null&&yo(n)===null){r.child=h;break}n=h.sibling,h.sibling=l,l=h,h=n}wc(r,!0,l,null,m,u);break;case"together":wc(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function Yn(n,r,l){if(n!==null&&(r.dependencies=n.dependencies),Si|=r.lanes,(l&r.childLanes)===0)if(n!==null){if(Rr(n,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(a(153));if(r.child!==null){for(n=r.child,l=jn(n,n.pendingProps),r.child=l,l.return=r;n.sibling!==null;)n=n.sibling,l=l.sibling=jn(n,n.pendingProps),l.return=r;l.sibling=null}return r.child}function Ac(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&so(n)))}function V_(n,r,l){switch(r.tag){case 3:ke(r,r.stateNode.containerInfo),hi(r,lt,n.memoizedState.cache),$i();break;case 27:case 5:Qe(r);break;case 4:ke(r,r.stateNode.containerInfo);break;case 10:hi(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Ku(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(yi(r),r.flags|=128,null):(l&r.child.childLanes)!==0?Om(n,r,l):(yi(r),n=Yn(n,r,l),n!==null?n.sibling:null);yi(r);break;case 19:var h=(n.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(Rr(n,r,l,!1),u=(l&r.childLanes)!==0),h){if(u)return Mm(n,r,l);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),w(it,it.current),u)break;return null;case 22:return r.lanes=0,Am(n,r,l,r.pendingProps);case 24:hi(r,lt,n.memoizedState.cache)}return Yn(n,r,l)}function Im(n,r,l){if(n!==null)if(n.memoizedProps!==r.pendingProps)st=!0;else{if(!Ac(n,l)&&(r.flags&128)===0)return st=!1,V_(n,r,l);st=(n.flags&131072)!==0}else st=!1,ze&&(r.flags&1048576)!==0&&hp(r,Na,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(n=Xi(r.elementType),r.type=n,typeof n=="function")Du(n)?(u=Wi(n,u),r.tag=1,r=Rm(null,r,n,u,l)):(r.tag=0,r=vc(null,r,n,u,l));else{if(n!=null){var h=n.$$typeof;if(h===z){r.tag=11,r=xm(null,r,n,u,l);break e}else if(h===j){r.tag=14,r=Cm(null,r,n,u,l);break e}}throw r=ee(n)||n,Error(a(306,r,""))}}return r;case 0:return vc(n,r,r.type,r.pendingProps,l);case 1:return u=r.type,h=Wi(u,r.pendingProps),Rm(n,r,u,h,l);case 3:e:{if(ke(r,r.stateNode.containerInfo),n===null)throw Error(a(387));u=r.pendingProps;var m=r.memoizedState;h=m.element,Fu(n,r),ja(r,u,null,l);var _=r.memoizedState;if(u=_.cache,hi(r,lt,u),u!==m.cache&&Bu(r,[lt],l,!0),Ba(),u=_.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:_.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=Dm(n,r,u,l);break e}else if(u!==h){h=an(Error(a(424)),r),Ma(h),r=Dm(n,r,u,l);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,We=cn(n.firstChild),xt=r,ze=!0,fi=null,sn=!0,l=Ap(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if($i(),u===h){r=Yn(n,r,l);break e}wt(n,r,u,l)}r=r.child}return r;case 26:return To(n,r),n===null?(l=Fg(r.type,null,r.pendingProps,null))?r.memoizedState=l:ze||(l=r.type,n=r.pendingProps,u=qo(ce.current).createElement(l),u[Et]=r,u[It]=n,At(u,l,n),bt(u),r.stateNode=u):r.memoizedState=Fg(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return Qe(r),n===null&&ze&&(u=r.stateNode=Gg(r.type,r.pendingProps,ce.current),xt=r,sn=!0,h=We,Ai(r.type)?(lf=h,We=cn(u.firstChild)):We=h),wt(n,r,r.pendingProps.children,l),To(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&ze&&((h=u=We)&&(u=bS(u,r.type,r.pendingProps,sn),u!==null?(r.stateNode=u,xt=r,We=cn(u.firstChild),sn=!1,h=!0):h=!1),h||di(r)),Qe(r),h=r.type,m=r.pendingProps,_=n!==null?n.memoizedProps:null,u=m.children,ef(h,m)?u=null:_!==null&&ef(h,_)&&(r.flags|=32),r.memoizedState!==null&&(h=Ju(n,r,N_,null,null,l),ol._currentValue=h),To(n,r),wt(n,r,u,l),r.child;case 6:return n===null&&ze&&((n=l=We)&&(l=vS(l,r.pendingProps,sn),l!==null?(r.stateNode=l,xt=r,We=null,n=!0):n=!1),n||di(r)),null;case 13:return Om(n,r,l);case 4:return ke(r,r.stateNode.containerInfo),u=r.pendingProps,n===null?r.child=Zi(r,null,u,l):wt(n,r,u,l),r.child;case 11:return xm(n,r,r.type,r.pendingProps,l);case 7:return wt(n,r,r.pendingProps,l),r.child;case 8:return wt(n,r,r.pendingProps.children,l),r.child;case 12:return wt(n,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,hi(r,r.type,u.value),wt(n,r,u.children,l),r.child;case 9:return h=r.type._context,u=r.pendingProps.children,Fi(r),h=Ct(h),u=u(h),r.flags|=1,wt(n,r,u,l),r.child;case 14:return Cm(n,r,r.type,r.pendingProps,l);case 15:return wm(n,r,r.type,r.pendingProps,l);case 19:return Mm(n,r,l);case 31:return j_(n,r,l);case 22:return Am(n,r,l,r.pendingProps);case 24:return Fi(r),u=Ct(lt),n===null?(h=Gu(),h===null&&(h=Xe,m=ju(),h.pooledCache=m,m.refCount++,m!==null&&(h.pooledCacheLanes|=l),h=m),r.memoizedState={parent:u,cache:h},qu(r),hi(r,lt,h)):((n.lanes&l)!==0&&(Fu(n,r),ja(r,null,null,l),Ba()),h=n.memoizedState,m=r.memoizedState,h.parent!==u?(h={parent:u,cache:u},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),hi(r,lt,u)):(u=m.cache,hi(r,lt,u),u!==h.cache&&Bu(r,[lt],l,!0))),wt(n,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function Xn(n){n.flags|=4}function kc(n,r,l,u,h){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(h&335544128)===h)if(n.stateNode.complete)n.flags|=8192;else if(sg())n.flags|=8192;else throw Qi=ho,$u}else n.flags&=-16777217}function zm(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Kg(r))if(sg())n.flags|=8192;else throw Qi=ho,$u}function Ro(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?mh():536870912,n.lanes|=r,Vr|=r)}function Ya(n,r){if(!ze)switch(n.tailMode){case"hidden":r=n.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?n.tail=null:l.sibling=null;break;case"collapsed":l=n.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function Je(n){var r=n.alternate!==null&&n.alternate.child===n.child,l=0,u=0;if(r)for(var h=n.child;h!==null;)l|=h.lanes|h.childLanes,u|=h.subtreeFlags&65011712,u|=h.flags&65011712,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)l|=h.lanes|h.childLanes,u|=h.subtreeFlags,u|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=u,n.childLanes=l,r}function G_(n,r,l){var u=r.pendingProps;switch(Iu(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(r),null;case 1:return Je(r),null;case 3:return l=r.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),$n(lt),Te(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(n===null||n.child===null)&&(Lr(r)?Xn(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Uu())),Je(r),null;case 26:var h=r.type,m=r.memoizedState;return n===null?(Xn(r),m!==null?(Je(r),zm(r,m)):(Je(r),kc(r,h,null,u,l))):m?m!==n.memoizedState?(Xn(r),Je(r),zm(r,m)):(Je(r),r.flags&=-16777217):(n=n.memoizedProps,n!==u&&Xn(r),Je(r),kc(r,h,n,u,l)),null;case 27:if(re(r),l=ce.current,h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&Xn(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return Je(r),null}n=le.current,Lr(r)?mp(r):(n=Gg(h,u,l),r.stateNode=n,Xn(r))}return Je(r),null;case 5:if(re(r),h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&Xn(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return Je(r),null}if(m=le.current,Lr(r))mp(r);else{var _=qo(ce.current);switch(m){case 1:m=_.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:m=_.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":m=_.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":m=_.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":m=_.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof u.is=="string"?_.createElement("select",{is:u.is}):_.createElement("select"),u.multiple?m.multiple=!0:u.size&&(m.size=u.size);break;default:m=typeof u.is=="string"?_.createElement(h,{is:u.is}):_.createElement(h)}}m[Et]=r,m[It]=u;e:for(_=r.child;_!==null;){if(_.tag===5||_.tag===6)m.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===r)break e;for(;_.sibling===null;){if(_.return===null||_.return===r)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}r.stateNode=m;e:switch(At(m,h,u),h){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Xn(r)}}return Je(r),kc(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,l),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==u&&Xn(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(n=ce.current,Lr(r)){if(n=r.stateNode,l=r.memoizedProps,u=null,h=xt,h!==null)switch(h.tag){case 27:case 5:u=h.memoizedProps}n[Et]=r,n=!!(n.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||Og(n.nodeValue,l)),n||di(r,!0)}else n=qo(n).createTextNode(u),n[Et]=r,r.stateNode=n}return Je(r),null;case 31:if(l=r.memoizedState,n===null||n.memoizedState!==null){if(u=Lr(r),l!==null){if(n===null){if(!u)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Et]=r}else $i(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Je(r),n=!1}else l=Uu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return r.flags&256?(Qt(r),r):(Qt(r),null);if((r.flags&128)!==0)throw Error(a(558))}return Je(r),null;case 13:if(u=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=Lr(r),u!==null&&u.dehydrated!==null){if(n===null){if(!h)throw Error(a(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(a(317));h[Et]=r}else $i(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Je(r),h=!1}else h=Uu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Qt(r),r):(Qt(r),null)}return Qt(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,n=n!==null&&n.memoizedState!==null,l&&(u=r.child,h=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(h=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==h&&(u.flags|=2048)),l!==n&&l&&(r.child.flags|=8192),Ro(r,r.updateQueue),Je(r),null);case 4:return Te(),n===null&&Qc(r.stateNode.containerInfo),Je(r),null;case 10:return $n(r.type),Je(r),null;case 19:if(F(it),u=r.memoizedState,u===null)return Je(r),null;if(h=(r.flags&128)!==0,m=u.rendering,m===null)if(h)Ya(u,!1);else{if(nt!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(m=yo(n),m!==null){for(r.flags|=128,Ya(u,!1),n=m.updateQueue,r.updateQueue=n,Ro(r,n),r.subtreeFlags=0,n=l,l=r.child;l!==null;)cp(l,n),l=l.sibling;return w(it,it.current&1|2),ze&&Vn(r,u.treeForkCount),r.child}n=n.sibling}u.tail!==null&&Dt()>Io&&(r.flags|=128,h=!0,Ya(u,!1),r.lanes=4194304)}else{if(!h)if(n=yo(m),n!==null){if(r.flags|=128,h=!0,n=n.updateQueue,r.updateQueue=n,Ro(r,n),Ya(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!ze)return Je(r),null}else 2*Dt()-u.renderingStartTime>Io&&l!==536870912&&(r.flags|=128,h=!0,Ya(u,!1),r.lanes=4194304);u.isBackwards?(m.sibling=r.child,r.child=m):(n=u.last,n!==null?n.sibling=m:r.child=m,u.last=m)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Dt(),n.sibling=null,l=it.current,w(it,h?l&1|2:l&1),ze&&Vn(r,u.treeForkCount),n):(Je(r),null);case 22:case 23:return Qt(r),Zu(),u=r.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(l&536870912)!==0&&(r.flags&128)===0&&(Je(r),r.subtreeFlags&6&&(r.flags|=8192)):Je(r),l=r.updateQueue,l!==null&&Ro(r,l.retryQueue),l=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==l&&(r.flags|=2048),n!==null&&F(Yi),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),$n(lt),Je(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function $_(n,r){switch(Iu(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return $n(lt),Te(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return re(r),null;case 31:if(r.memoizedState!==null){if(Qt(r),r.alternate===null)throw Error(a(340));$i()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(Qt(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));$i()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return F(it),null;case 4:return Te(),null;case 10:return $n(r.type),null;case 22:case 23:return Qt(r),Zu(),n!==null&&F(Yi),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return $n(lt),null;case 25:return null;default:return null}}function Um(n,r){switch(Iu(r),r.tag){case 3:$n(lt),Te();break;case 26:case 27:case 5:re(r);break;case 4:Te();break;case 31:r.memoizedState!==null&&Qt(r);break;case 13:Qt(r);break;case 19:F(it);break;case 10:$n(r.type);break;case 22:case 23:Qt(r),Zu(),n!==null&&F(Yi);break;case 24:$n(lt)}}function Xa(n,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var h=u.next;l=h;do{if((l.tag&n)===n){u=void 0;var m=l.create,_=l.inst;u=m(),_.destroy=u}l=l.next}while(l!==h)}}catch(E){Ge(r,r.return,E)}}function vi(n,r,l){try{var u=r.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var m=h.next;u=m;do{if((u.tag&n)===n){var _=u.inst,E=_.destroy;if(E!==void 0){_.destroy=void 0,h=r;var D=l,B=E;try{B()}catch(Y){Ge(h,D,Y)}}}u=u.next}while(u!==m)}}catch(Y){Ge(r,r.return,Y)}}function Hm(n){var r=n.updateQueue;if(r!==null){var l=n.stateNode;try{Tp(r,l)}catch(u){Ge(n,n.return,u)}}}function Pm(n,r,l){l.props=Wi(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(u){Ge(n,r,u)}}function Qa(n,r){try{var l=n.ref;if(l!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof l=="function"?n.refCleanup=l(u):l.current=u}}catch(h){Ge(n,r,h)}}function kn(n,r){var l=n.ref,u=n.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(h){Ge(n,r,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){Ge(n,r,h)}else l.current=null}function Bm(n){var r=n.type,l=n.memoizedProps,u=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(h){Ge(n,n.return,h)}}function Tc(n,r,l){try{var u=n.stateNode;dS(u,n.type,l,r),u[It]=r}catch(h){Ge(n,n.return,h)}}function jm(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Ai(n.type)||n.tag===4}function Lc(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||jm(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Ai(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Rc(n,r,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(n),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=Pn));else if(u!==4&&(u===27&&Ai(n.type)&&(l=n.stateNode,r=null),n=n.child,n!==null))for(Rc(n,r,l),n=n.sibling;n!==null;)Rc(n,r,l),n=n.sibling}function Do(n,r,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?l.insertBefore(n,r):l.appendChild(n);else if(u!==4&&(u===27&&Ai(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(Do(n,r,l),n=n.sibling;n!==null;)Do(n,r,l),n=n.sibling}function Vm(n){var r=n.stateNode,l=n.memoizedProps;try{for(var u=n.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);At(r,u,l),r[Et]=n,r[It]=l}catch(m){Ge(n,n.return,m)}}var Qn=!1,ut=!1,Dc=!1,Gm=typeof WeakSet=="function"?WeakSet:Set,vt=null;function q_(n,r){if(n=n.containerInfo,Wc=Wo,n=tp(n),Cu(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var h=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{l.nodeType,m.nodeType}catch{l=null;break e}var _=0,E=-1,D=-1,B=0,Y=0,K=n,V=null;t:for(;;){for(var G;K!==l||h!==0&&K.nodeType!==3||(E=_+h),K!==m||u!==0&&K.nodeType!==3||(D=_+u),K.nodeType===3&&(_+=K.nodeValue.length),(G=K.firstChild)!==null;)V=K,K=G;for(;;){if(K===n)break t;if(V===l&&++B===h&&(E=_),V===m&&++Y===u&&(D=_),(G=K.nextSibling)!==null)break;K=V,V=K.parentNode}K=G}l=E===-1||D===-1?null:{start:E,end:D}}else l=null}l=l||{start:0,end:0}}else l=null;for(Jc={focusedElem:n,selectionRange:l},Wo=!1,vt=r;vt!==null;)if(r=vt,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,vt=n;else for(;vt!==null;){switch(r=vt,m=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(l=0;l<n.length;l++)h=n[l],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&m!==null){n=void 0,l=r,h=m.memoizedProps,m=m.memoizedState,u=l.stateNode;try{var de=Wi(l.type,h);n=u.getSnapshotBeforeUpdate(de,m),u.__reactInternalSnapshotBeforeUpdate=n}catch(be){Ge(l,l.return,be)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,l=n.nodeType,l===9)nf(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":nf(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=r.sibling,n!==null){n.return=r.return,vt=n;break}vt=r.return}}function $m(n,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:Kn(n,l),u&4&&Xa(5,l);break;case 1:if(Kn(n,l),u&4)if(n=l.stateNode,r===null)try{n.componentDidMount()}catch(_){Ge(l,l.return,_)}else{var h=Wi(l.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(h,r,n.__reactInternalSnapshotBeforeUpdate)}catch(_){Ge(l,l.return,_)}}u&64&&Hm(l),u&512&&Qa(l,l.return);break;case 3:if(Kn(n,l),u&64&&(n=l.updateQueue,n!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{Tp(n,r)}catch(_){Ge(l,l.return,_)}}break;case 27:r===null&&u&4&&Vm(l);case 26:case 5:Kn(n,l),r===null&&u&4&&Bm(l),u&512&&Qa(l,l.return);break;case 12:Kn(n,l);break;case 31:Kn(n,l),u&4&&Ym(n,l);break;case 13:Kn(n,l),u&4&&Xm(n,l),u&64&&(n=l.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(l=eS.bind(null,l),_S(n,l))));break;case 22:if(u=l.memoizedState!==null||Qn,!u){r=r!==null&&r.memoizedState!==null||ut,h=Qn;var m=ut;Qn=u,(ut=r)&&!m?Wn(n,l,(l.subtreeFlags&8772)!==0):Kn(n,l),Qn=h,ut=m}break;case 30:break;default:Kn(n,l)}}function qm(n){var r=n.alternate;r!==null&&(n.alternate=null,qm(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&ou(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var et=null,Ut=!1;function Zn(n,r,l){for(l=l.child;l!==null;)Fm(n,r,l),l=l.sibling}function Fm(n,r,l){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Ot,l)}catch{}switch(l.tag){case 26:ut||kn(l,r),Zn(n,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:ut||kn(l,r);var u=et,h=Ut;Ai(l.type)&&(et=l.stateNode,Ut=!1),Zn(n,r,l),rl(l.stateNode),et=u,Ut=h;break;case 5:ut||kn(l,r);case 6:if(u=et,h=Ut,et=null,Zn(n,r,l),et=u,Ut=h,et!==null)if(Ut)try{(et.nodeType===9?et.body:et.nodeName==="HTML"?et.ownerDocument.body:et).removeChild(l.stateNode)}catch(m){Ge(l,r,m)}else try{et.removeChild(l.stateNode)}catch(m){Ge(l,r,m)}break;case 18:et!==null&&(Ut?(n=et,Hg(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,l.stateNode),Zr(n)):Hg(et,l.stateNode));break;case 4:u=et,h=Ut,et=l.stateNode.containerInfo,Ut=!0,Zn(n,r,l),et=u,Ut=h;break;case 0:case 11:case 14:case 15:vi(2,l,r),ut||vi(4,l,r),Zn(n,r,l);break;case 1:ut||(kn(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&Pm(l,r,u)),Zn(n,r,l);break;case 21:Zn(n,r,l);break;case 22:ut=(u=ut)||l.memoizedState!==null,Zn(n,r,l),ut=u;break;default:Zn(n,r,l)}}function Ym(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Zr(n)}catch(l){Ge(r,r.return,l)}}}function Xm(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Zr(n)}catch(l){Ge(r,r.return,l)}}function F_(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new Gm),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new Gm),r;default:throw Error(a(435,n.tag))}}function Oo(n,r){var l=F_(n);r.forEach(function(u){if(!l.has(u)){l.add(u);var h=tS.bind(null,n,u);u.then(h,h)}})}function Ht(n,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var h=l[u],m=n,_=r,E=_;e:for(;E!==null;){switch(E.tag){case 27:if(Ai(E.type)){et=E.stateNode,Ut=!1;break e}break;case 5:et=E.stateNode,Ut=!1;break e;case 3:case 4:et=E.stateNode.containerInfo,Ut=!0;break e}E=E.return}if(et===null)throw Error(a(160));Fm(m,_,h),et=null,Ut=!1,m=h.alternate,m!==null&&(m.return=null),h.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Qm(r,n),r=r.sibling}var bn=null;function Qm(n,r){var l=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Ht(r,n),Pt(n),u&4&&(vi(3,n,n.return),Xa(3,n),vi(5,n,n.return));break;case 1:Ht(r,n),Pt(n),u&512&&(ut||l===null||kn(l,l.return)),u&64&&Qn&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(l=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var h=bn;if(Ht(r,n),Pt(n),u&512&&(ut||l===null||kn(l,l.return)),u&4){var m=l!==null?l.memoizedState:null;if(u=n.memoizedState,l===null)if(u===null)if(n.stateNode===null){e:{u=n.type,l=n.memoizedProps,h=h.ownerDocument||h;t:switch(u){case"title":m=h.getElementsByTagName("title")[0],(!m||m[Ea]||m[Et]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=h.createElement(u),h.head.insertBefore(m,h.querySelector("head > title"))),At(m,u,l),m[Et]=n,bt(m),u=m;break e;case"link":var _=Qg("link","href",h).get(u+(l.href||""));if(_){for(var E=0;E<_.length;E++)if(m=_[E],m.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&m.getAttribute("rel")===(l.rel==null?null:l.rel)&&m.getAttribute("title")===(l.title==null?null:l.title)&&m.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){_.splice(E,1);break t}}m=h.createElement(u),At(m,u,l),h.head.appendChild(m);break;case"meta":if(_=Qg("meta","content",h).get(u+(l.content||""))){for(E=0;E<_.length;E++)if(m=_[E],m.getAttribute("content")===(l.content==null?null:""+l.content)&&m.getAttribute("name")===(l.name==null?null:l.name)&&m.getAttribute("property")===(l.property==null?null:l.property)&&m.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&m.getAttribute("charset")===(l.charSet==null?null:l.charSet)){_.splice(E,1);break t}}m=h.createElement(u),At(m,u,l),h.head.appendChild(m);break;default:throw Error(a(468,u))}m[Et]=n,bt(m),u=m}n.stateNode=u}else Zg(h,n.type,n.stateNode);else n.stateNode=Xg(h,u,n.memoizedProps);else m!==u?(m===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):m.count--,u===null?Zg(h,n.type,n.stateNode):Xg(h,u,n.memoizedProps)):u===null&&n.stateNode!==null&&Tc(n,n.memoizedProps,l.memoizedProps)}break;case 27:Ht(r,n),Pt(n),u&512&&(ut||l===null||kn(l,l.return)),l!==null&&u&4&&Tc(n,n.memoizedProps,l.memoizedProps);break;case 5:if(Ht(r,n),Pt(n),u&512&&(ut||l===null||kn(l,l.return)),n.flags&32){h=n.stateNode;try{vr(h,"")}catch(de){Ge(n,n.return,de)}}u&4&&n.stateNode!=null&&(h=n.memoizedProps,Tc(n,h,l!==null?l.memoizedProps:h)),u&1024&&(Dc=!0);break;case 6:if(Ht(r,n),Pt(n),u&4){if(n.stateNode===null)throw Error(a(162));u=n.memoizedProps,l=n.stateNode;try{l.nodeValue=u}catch(de){Ge(n,n.return,de)}}break;case 3:if(Xo=null,h=bn,bn=Fo(r.containerInfo),Ht(r,n),bn=h,Pt(n),u&4&&l!==null&&l.memoizedState.isDehydrated)try{Zr(r.containerInfo)}catch(de){Ge(n,n.return,de)}Dc&&(Dc=!1,Zm(n));break;case 4:u=bn,bn=Fo(n.stateNode.containerInfo),Ht(r,n),Pt(n),bn=u;break;case 12:Ht(r,n),Pt(n);break;case 31:Ht(r,n),Pt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Oo(n,u)));break;case 13:Ht(r,n),Pt(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Mo=Dt()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Oo(n,u)));break;case 22:h=n.memoizedState!==null;var D=l!==null&&l.memoizedState!==null,B=Qn,Y=ut;if(Qn=B||h,ut=Y||D,Ht(r,n),ut=Y,Qn=B,Pt(n),u&8192)e:for(r=n.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(l===null||D||Qn||ut||Ji(n)),l=null,r=n;;){if(r.tag===5||r.tag===26){if(l===null){D=l=r;try{if(m=D.stateNode,h)_=m.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{E=D.stateNode;var K=D.memoizedProps.style,V=K!=null&&K.hasOwnProperty("display")?K.display:null;E.style.display=V==null||typeof V=="boolean"?"":(""+V).trim()}}catch(de){Ge(D,D.return,de)}}}else if(r.tag===6){if(l===null){D=r;try{D.stateNode.nodeValue=h?"":D.memoizedProps}catch(de){Ge(D,D.return,de)}}}else if(r.tag===18){if(l===null){D=r;try{var G=D.stateNode;h?Pg(G,!0):Pg(D.stateNode,!1)}catch(de){Ge(D,D.return,de)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=n.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,Oo(n,l))));break;case 19:Ht(r,n),Pt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Oo(n,u)));break;case 30:break;case 21:break;default:Ht(r,n),Pt(n)}}function Pt(n){var r=n.flags;if(r&2){try{for(var l,u=n.return;u!==null;){if(jm(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var h=l.stateNode,m=Lc(n);Do(n,m,h);break;case 5:var _=l.stateNode;l.flags&32&&(vr(_,""),l.flags&=-33);var E=Lc(n);Do(n,E,_);break;case 3:case 4:var D=l.stateNode.containerInfo,B=Lc(n);Rc(n,B,D);break;default:throw Error(a(161))}}catch(Y){Ge(n,n.return,Y)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function Zm(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;Zm(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function Kn(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)$m(n,r.alternate,r),r=r.sibling}function Ji(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:vi(4,r,r.return),Ji(r);break;case 1:kn(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Pm(r,r.return,l),Ji(r);break;case 27:rl(r.stateNode);case 26:case 5:kn(r,r.return),Ji(r);break;case 22:r.memoizedState===null&&Ji(r);break;case 30:Ji(r);break;default:Ji(r)}n=n.sibling}}function Wn(n,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,h=n,m=r,_=m.flags;switch(m.tag){case 0:case 11:case 15:Wn(h,m,l),Xa(4,m);break;case 1:if(Wn(h,m,l),u=m,h=u.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(B){Ge(u,u.return,B)}if(u=m,h=u.updateQueue,h!==null){var E=u.stateNode;try{var D=h.shared.hiddenCallbacks;if(D!==null)for(h.shared.hiddenCallbacks=null,h=0;h<D.length;h++)kp(D[h],E)}catch(B){Ge(u,u.return,B)}}l&&_&64&&Hm(m),Qa(m,m.return);break;case 27:Vm(m);case 26:case 5:Wn(h,m,l),l&&u===null&&_&4&&Bm(m),Qa(m,m.return);break;case 12:Wn(h,m,l);break;case 31:Wn(h,m,l),l&&_&4&&Ym(h,m);break;case 13:Wn(h,m,l),l&&_&4&&Xm(h,m);break;case 22:m.memoizedState===null&&Wn(h,m,l),Qa(m,m.return);break;case 30:break;default:Wn(h,m,l)}r=r.sibling}}function Oc(n,r){var l=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==l&&(n!=null&&n.refCount++,l!=null&&Ia(l))}function Nc(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Ia(n))}function vn(n,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Km(n,r,l,u),r=r.sibling}function Km(n,r,l,u){var h=r.flags;switch(r.tag){case 0:case 11:case 15:vn(n,r,l,u),h&2048&&Xa(9,r);break;case 1:vn(n,r,l,u);break;case 3:vn(n,r,l,u),h&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Ia(n)));break;case 12:if(h&2048){vn(n,r,l,u),n=r.stateNode;try{var m=r.memoizedProps,_=m.id,E=m.onPostCommit;typeof E=="function"&&E(_,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(D){Ge(r,r.return,D)}}else vn(n,r,l,u);break;case 31:vn(n,r,l,u);break;case 13:vn(n,r,l,u);break;case 23:break;case 22:m=r.stateNode,_=r.alternate,r.memoizedState!==null?m._visibility&2?vn(n,r,l,u):Za(n,r):m._visibility&2?vn(n,r,l,u):(m._visibility|=2,Pr(n,r,l,u,(r.subtreeFlags&10256)!==0||!1)),h&2048&&Oc(_,r);break;case 24:vn(n,r,l,u),h&2048&&Nc(r.alternate,r);break;default:vn(n,r,l,u)}}function Pr(n,r,l,u,h){for(h=h&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=n,_=r,E=l,D=u,B=_.flags;switch(_.tag){case 0:case 11:case 15:Pr(m,_,E,D,h),Xa(8,_);break;case 23:break;case 22:var Y=_.stateNode;_.memoizedState!==null?Y._visibility&2?Pr(m,_,E,D,h):Za(m,_):(Y._visibility|=2,Pr(m,_,E,D,h)),h&&B&2048&&Oc(_.alternate,_);break;case 24:Pr(m,_,E,D,h),h&&B&2048&&Nc(_.alternate,_);break;default:Pr(m,_,E,D,h)}r=r.sibling}}function Za(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=n,u=r,h=u.flags;switch(u.tag){case 22:Za(l,u),h&2048&&Oc(u.alternate,u);break;case 24:Za(l,u),h&2048&&Nc(u.alternate,u);break;default:Za(l,u)}r=r.sibling}}var Ka=8192;function Br(n,r,l){if(n.subtreeFlags&Ka)for(n=n.child;n!==null;)Wm(n,r,l),n=n.sibling}function Wm(n,r,l){switch(n.tag){case 26:Br(n,r,l),n.flags&Ka&&n.memoizedState!==null&&OS(l,bn,n.memoizedState,n.memoizedProps);break;case 5:Br(n,r,l);break;case 3:case 4:var u=bn;bn=Fo(n.stateNode.containerInfo),Br(n,r,l),bn=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=Ka,Ka=16777216,Br(n,r,l),Ka=u):Br(n,r,l));break;default:Br(n,r,l)}}function Jm(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function Wa(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];vt=u,tg(u,n)}Jm(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)eg(n),n=n.sibling}function eg(n){switch(n.tag){case 0:case 11:case 15:Wa(n),n.flags&2048&&vi(9,n,n.return);break;case 3:Wa(n);break;case 12:Wa(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,No(n)):Wa(n);break;default:Wa(n)}}function No(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];vt=u,tg(u,n)}Jm(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:vi(8,r,r.return),No(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,No(r));break;default:No(r)}n=n.sibling}}function tg(n,r){for(;vt!==null;){var l=vt;switch(l.tag){case 0:case 11:case 15:vi(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Ia(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,vt=u;else e:for(l=n;vt!==null;){u=vt;var h=u.sibling,m=u.return;if(qm(u),u===l){vt=null;break e}if(h!==null){h.return=m,vt=h;break e}vt=m}}}var Y_={getCacheForType:function(n){var r=Ct(lt),l=r.data.get(n);return l===void 0&&(l=n(),r.data.set(n,l)),l},cacheSignal:function(){return Ct(lt).controller.signal}},X_=typeof WeakMap=="function"?WeakMap:Map,Pe=0,Xe=null,Oe=null,Me=0,Ve=0,Zt=null,_i=!1,jr=!1,Mc=!1,Jn=0,nt=0,Si=0,er=0,Ic=0,Kt=0,Vr=0,Ja=null,Bt=null,zc=!1,Mo=0,ng=0,Io=1/0,zo=null,Ei=null,pt=0,xi=null,Gr=null,ei=0,Uc=0,Hc=null,ig=null,el=0,Pc=null;function Wt(){return(Pe&2)!==0&&Me!==0?Me&-Me:H.T!==null?qc():vh()}function rg(){if(Kt===0)if((Me&536870912)===0||ze){var n=Gl;Gl<<=1,(Gl&3932160)===0&&(Gl=262144),Kt=n}else Kt=536870912;return n=Xt.current,n!==null&&(n.flags|=32),Kt}function jt(n,r,l){(n===Xe&&(Ve===2||Ve===9)||n.cancelPendingCommit!==null)&&($r(n,0),Ci(n,Me,Kt,!1)),Sa(n,l),((Pe&2)===0||n!==Xe)&&(n===Xe&&((Pe&2)===0&&(er|=l),nt===4&&Ci(n,Me,Kt,!1)),Tn(n))}function ag(n,r,l){if((Pe&6)!==0)throw Error(a(327));var u=!l&&(r&127)===0&&(r&n.expiredLanes)===0||_a(n,r),h=u?K_(n,r):jc(n,r,!0),m=u;do{if(h===0){jr&&!u&&Ci(n,r,0,!1);break}else{if(l=n.current.alternate,m&&!Q_(l)){h=jc(n,r,!1),m=!1;continue}if(h===2){if(m=r,n.errorRecoveryDisabledLanes&m)var _=0;else _=n.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){r=_;e:{var E=n;h=Ja;var D=E.current.memoizedState.isDehydrated;if(D&&($r(E,_).flags|=256),_=jc(E,_,!1),_!==2){if(Mc&&!D){E.errorRecoveryDisabledLanes|=m,er|=m,h=4;break e}m=Bt,Bt=h,m!==null&&(Bt===null?Bt=m:Bt.push.apply(Bt,m))}h=_}if(m=!1,h!==2)continue}}if(h===1){$r(n,0),Ci(n,r,0,!0);break}e:{switch(u=n,m=h,m){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Ci(u,r,Kt,!_i);break e;case 2:Bt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(h=Mo+300-Dt(),10<h)){if(Ci(u,r,Kt,!_i),ql(u,0,!0)!==0)break e;ei=r,u.timeoutHandle=zg(lg.bind(null,u,l,Bt,zo,zc,r,Kt,er,Vr,_i,m,"Throttled",-0,0),h);break e}lg(u,l,Bt,zo,zc,r,Kt,er,Vr,_i,m,null,-0,0)}}break}while(!0);Tn(n)}function lg(n,r,l,u,h,m,_,E,D,B,Y,K,V,G){if(n.timeoutHandle=-1,K=r.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pn},Wm(r,m,K);var de=(m&62914560)===m?Mo-Dt():(m&4194048)===m?ng-Dt():0;if(de=NS(K,de),de!==null){ei=m,n.cancelPendingCommit=de(pg.bind(null,n,r,m,l,u,h,_,E,D,Y,K,null,V,G)),Ci(n,m,_,!B);return}}pg(n,r,m,l,u,h,_,E,D)}function Q_(n){for(var r=n;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var h=l[u],m=h.getSnapshot;h=h.value;try{if(!Ft(m(),h))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ci(n,r,l,u){r&=~Ic,r&=~er,n.suspendedLanes|=r,n.pingedLanes&=~r,u&&(n.warmLanes|=r),u=n.expirationTimes;for(var h=r;0<h;){var m=31-Ye(h),_=1<<m;u[m]=-1,h&=~_}l!==0&&gh(n,l,r)}function Uo(){return(Pe&6)===0?(tl(0),!1):!0}function Bc(){if(Oe!==null){if(Ve===0)var n=Oe.return;else n=Oe,Gn=qi=null,nc(n),Mr=null,Ua=0,n=Oe;for(;n!==null;)Um(n.alternate,n),n=n.return;Oe=null}}function $r(n,r){var l=n.timeoutHandle;l!==-1&&(n.timeoutHandle=-1,mS(l)),l=n.cancelPendingCommit,l!==null&&(n.cancelPendingCommit=null,l()),ei=0,Bc(),Xe=n,Oe=l=jn(n.current,null),Me=r,Ve=0,Zt=null,_i=!1,jr=_a(n,r),Mc=!1,Vr=Kt=Ic=er=Si=nt=0,Bt=Ja=null,zc=!1,(r&8)!==0&&(r|=r&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=r;0<u;){var h=31-Ye(u),m=1<<h;r|=n[h],u&=~m}return Jn=r,io(),l}function og(n,r){Ce=null,H.H=qa,r===Nr||r===fo?(r=xp(),Ve=3):r===$u?(r=xp(),Ve=4):Ve=r===bc?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Zt=r,Oe===null&&(nt=1,Ao(n,an(r,n.current)))}function sg(){var n=Xt.current;return n===null?!0:(Me&4194048)===Me?un===null:(Me&62914560)===Me||(Me&536870912)!==0?n===un:!1}function ug(){var n=H.H;return H.H=qa,n===null?qa:n}function cg(){var n=H.A;return H.A=Y_,n}function Ho(){nt=4,_i||(Me&4194048)!==Me&&Xt.current!==null||(jr=!0),(Si&134217727)===0&&(er&134217727)===0||Xe===null||Ci(Xe,Me,Kt,!1)}function jc(n,r,l){var u=Pe;Pe|=2;var h=ug(),m=cg();(Xe!==n||Me!==r)&&(zo=null,$r(n,r)),r=!1;var _=nt;e:do try{if(Ve!==0&&Oe!==null){var E=Oe,D=Zt;switch(Ve){case 8:Bc(),_=6;break e;case 3:case 2:case 9:case 6:Xt.current===null&&(r=!0);var B=Ve;if(Ve=0,Zt=null,qr(n,E,D,B),l&&jr){_=0;break e}break;default:B=Ve,Ve=0,Zt=null,qr(n,E,D,B)}}Z_(),_=nt;break}catch(Y){og(n,Y)}while(!0);return r&&n.shellSuspendCounter++,Gn=qi=null,Pe=u,H.H=h,H.A=m,Oe===null&&(Xe=null,Me=0,io()),_}function Z_(){for(;Oe!==null;)fg(Oe)}function K_(n,r){var l=Pe;Pe|=2;var u=ug(),h=cg();Xe!==n||Me!==r?(zo=null,Io=Dt()+500,$r(n,r)):jr=_a(n,r);e:do try{if(Ve!==0&&Oe!==null){r=Oe;var m=Zt;t:switch(Ve){case 1:Ve=0,Zt=null,qr(n,r,m,1);break;case 2:case 9:if(Sp(m)){Ve=0,Zt=null,dg(r);break}r=function(){Ve!==2&&Ve!==9||Xe!==n||(Ve=7),Tn(n)},m.then(r,r);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:Sp(m)?(Ve=0,Zt=null,dg(r)):(Ve=0,Zt=null,qr(n,r,m,7));break;case 5:var _=null;switch(Oe.tag){case 26:_=Oe.memoizedState;case 5:case 27:var E=Oe;if(_?Kg(_):E.stateNode.complete){Ve=0,Zt=null;var D=E.sibling;if(D!==null)Oe=D;else{var B=E.return;B!==null?(Oe=B,Po(B)):Oe=null}break t}}Ve=0,Zt=null,qr(n,r,m,5);break;case 6:Ve=0,Zt=null,qr(n,r,m,6);break;case 8:Bc(),nt=6;break e;default:throw Error(a(462))}}W_();break}catch(Y){og(n,Y)}while(!0);return Gn=qi=null,H.H=u,H.A=h,Pe=l,Oe!==null?0:(Xe=null,Me=0,io(),nt)}function W_(){for(;Oe!==null&&!eu();)fg(Oe)}function fg(n){var r=Im(n.alternate,n,Jn);n.memoizedProps=n.pendingProps,r===null?Po(n):Oe=r}function dg(n){var r=n,l=r.alternate;switch(r.tag){case 15:case 0:r=Lm(l,r,r.pendingProps,r.type,void 0,Me);break;case 11:r=Lm(l,r,r.pendingProps,r.type.render,r.ref,Me);break;case 5:nc(r);default:Um(l,r),r=Oe=cp(r,Jn),r=Im(l,r,Jn)}n.memoizedProps=n.pendingProps,r===null?Po(n):Oe=r}function qr(n,r,l,u){Gn=qi=null,nc(r),Mr=null,Ua=0;var h=r.return;try{if(B_(n,h,r,l,Me)){nt=1,Ao(n,an(l,n.current)),Oe=null;return}}catch(m){if(h!==null)throw Oe=h,m;nt=1,Ao(n,an(l,n.current)),Oe=null;return}r.flags&32768?(ze||u===1?n=!0:jr||(Me&536870912)!==0?n=!1:(_i=n=!0,(u===2||u===9||u===3||u===6)&&(u=Xt.current,u!==null&&u.tag===13&&(u.flags|=16384))),hg(r,n)):Po(r)}function Po(n){var r=n;do{if((r.flags&32768)!==0){hg(r,_i);return}n=r.return;var l=G_(r.alternate,r,Jn);if(l!==null){Oe=l;return}if(r=r.sibling,r!==null){Oe=r;return}Oe=r=n}while(r!==null);nt===0&&(nt=5)}function hg(n,r){do{var l=$_(n.alternate,n);if(l!==null){l.flags&=32767,Oe=l;return}if(l=n.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(n=n.sibling,n!==null)){Oe=n;return}Oe=n=l}while(n!==null);nt=6,Oe=null}function pg(n,r,l,u,h,m,_,E,D){n.cancelPendingCommit=null;do Bo();while(pt!==0);if((Pe&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));if(m=r.lanes|r.childLanes,m|=Lu,D1(n,l,m,_,E,D),n===Xe&&(Oe=Xe=null,Me=0),Gr=r,xi=n,ei=l,Uc=m,Hc=h,ig=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,nS(ve,function(){return vg(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=H.T,H.T=null,h=X.p,X.p=2,_=Pe,Pe|=4;try{q_(n,r,l)}finally{Pe=_,X.p=h,H.T=u}}pt=1,mg(),gg(),yg()}}function mg(){if(pt===1){pt=0;var n=xi,r=Gr,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=H.T,H.T=null;var u=X.p;X.p=2;var h=Pe;Pe|=4;try{Qm(r,n);var m=Jc,_=tp(n.containerInfo),E=m.focusedElem,D=m.selectionRange;if(_!==E&&E&&E.ownerDocument&&ep(E.ownerDocument.documentElement,E)){if(D!==null&&Cu(E)){var B=D.start,Y=D.end;if(Y===void 0&&(Y=B),"selectionStart"in E)E.selectionStart=B,E.selectionEnd=Math.min(Y,E.value.length);else{var K=E.ownerDocument||document,V=K&&K.defaultView||window;if(V.getSelection){var G=V.getSelection(),de=E.textContent.length,be=Math.min(D.start,de),Fe=D.end===void 0?be:Math.min(D.end,de);!G.extend&&be>Fe&&(_=Fe,Fe=be,be=_);var I=Jh(E,be),M=Jh(E,Fe);if(I&&M&&(G.rangeCount!==1||G.anchorNode!==I.node||G.anchorOffset!==I.offset||G.focusNode!==M.node||G.focusOffset!==M.offset)){var P=K.createRange();P.setStart(I.node,I.offset),G.removeAllRanges(),be>Fe?(G.addRange(P),G.extend(M.node,M.offset)):(P.setEnd(M.node,M.offset),G.addRange(P))}}}}for(K=[],G=E;G=G.parentNode;)G.nodeType===1&&K.push({element:G,left:G.scrollLeft,top:G.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<K.length;E++){var Z=K[E];Z.element.scrollLeft=Z.left,Z.element.scrollTop=Z.top}}Wo=!!Wc,Jc=Wc=null}finally{Pe=h,X.p=u,H.T=l}}n.current=r,pt=2}}function gg(){if(pt===2){pt=0;var n=xi,r=Gr,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=H.T,H.T=null;var u=X.p;X.p=2;var h=Pe;Pe|=4;try{$m(n,r.alternate,r)}finally{Pe=h,X.p=u,H.T=l}}pt=3}}function yg(){if(pt===4||pt===3){pt=0,tu();var n=xi,r=Gr,l=ei,u=ig;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?pt=5:(pt=0,Gr=xi=null,bg(n,n.pendingLanes));var h=n.pendingLanes;if(h===0&&(Ei=null),au(l),r=r.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(Ot,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=H.T,h=X.p,X.p=2,H.T=null;try{for(var m=n.onRecoverableError,_=0;_<u.length;_++){var E=u[_];m(E.value,{componentStack:E.stack})}}finally{H.T=r,X.p=h}}(ei&3)!==0&&Bo(),Tn(n),h=n.pendingLanes,(l&261930)!==0&&(h&42)!==0?n===Pc?el++:(el=0,Pc=n):el=0,tl(0)}}function bg(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,Ia(r)))}function Bo(){return mg(),gg(),yg(),vg()}function vg(){if(pt!==5)return!1;var n=xi,r=Uc;Uc=0;var l=au(ei),u=H.T,h=X.p;try{X.p=32>l?32:l,H.T=null,l=Hc,Hc=null;var m=xi,_=ei;if(pt=0,Gr=xi=null,ei=0,(Pe&6)!==0)throw Error(a(331));var E=Pe;if(Pe|=4,eg(m.current),Km(m,m.current,_,l),Pe=E,tl(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Ot,m)}catch{}return!0}finally{X.p=h,H.T=u,bg(n,r)}}function _g(n,r,l){r=an(l,r),r=yc(n.stateNode,r,2),n=gi(n,r,2),n!==null&&(Sa(n,2),Tn(n))}function Ge(n,r,l){if(n.tag===3)_g(n,n,l);else for(;r!==null;){if(r.tag===3){_g(r,n,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Ei===null||!Ei.has(u))){n=an(l,n),l=Sm(2),u=gi(r,l,2),u!==null&&(Em(l,u,r,n),Sa(u,2),Tn(u));break}}r=r.return}}function Vc(n,r,l){var u=n.pingCache;if(u===null){u=n.pingCache=new X_;var h=new Set;u.set(r,h)}else h=u.get(r),h===void 0&&(h=new Set,u.set(r,h));h.has(l)||(Mc=!0,h.add(l),n=J_.bind(null,n,r,l),r.then(n,n))}function J_(n,r,l){var u=n.pingCache;u!==null&&u.delete(r),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,Xe===n&&(Me&l)===l&&(nt===4||nt===3&&(Me&62914560)===Me&&300>Dt()-Mo?(Pe&2)===0&&$r(n,0):Ic|=l,Vr===Me&&(Vr=0)),Tn(n)}function Sg(n,r){r===0&&(r=mh()),n=Vi(n,r),n!==null&&(Sa(n,r),Tn(n))}function eS(n){var r=n.memoizedState,l=0;r!==null&&(l=r.retryLane),Sg(n,l)}function tS(n,r){var l=0;switch(n.tag){case 31:case 13:var u=n.stateNode,h=n.memoizedState;h!==null&&(l=h.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),Sg(n,l)}function nS(n,r){return dr(n,r)}var jo=null,Fr=null,Gc=!1,Vo=!1,$c=!1,wi=0;function Tn(n){n!==Fr&&n.next===null&&(Fr===null?jo=Fr=n:Fr=Fr.next=n),Vo=!0,Gc||(Gc=!0,rS())}function tl(n,r){if(!$c&&Vo){$c=!0;do for(var l=!1,u=jo;u!==null;){if(n!==0){var h=u.pendingLanes;if(h===0)var m=0;else{var _=u.suspendedLanes,E=u.pingedLanes;m=(1<<31-Ye(42|n)+1)-1,m&=h&~(_&~E),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(l=!0,wg(u,m))}else m=Me,m=ql(u,u===Xe?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||_a(u,m)||(l=!0,wg(u,m));u=u.next}while(l);$c=!1}}function iS(){Eg()}function Eg(){Vo=Gc=!1;var n=0;wi!==0&&pS()&&(n=wi);for(var r=Dt(),l=null,u=jo;u!==null;){var h=u.next,m=xg(u,r);m===0?(u.next=null,l===null?jo=h:l.next=h,h===null&&(Fr=l)):(l=u,(n!==0||(m&3)!==0)&&(Vo=!0)),u=h}pt!==0&&pt!==5||tl(n),wi!==0&&(wi=0)}function xg(n,r){for(var l=n.suspendedLanes,u=n.pingedLanes,h=n.expirationTimes,m=n.pendingLanes&-62914561;0<m;){var _=31-Ye(m),E=1<<_,D=h[_];D===-1?((E&l)===0||(E&u)!==0)&&(h[_]=R1(E,r)):D<=r&&(n.expiredLanes|=E),m&=~E}if(r=Xe,l=Me,l=ql(n,n===r?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,l===0||n===r&&(Ve===2||Ve===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&va(u),n.callbackNode=null,n.callbackPriority=0;if((l&3)===0||_a(n,l)){if(r=l&-l,r===n.callbackPriority)return r;switch(u!==null&&va(u),au(l)){case 2:case 8:l=se;break;case 32:l=ve;break;case 268435456:l=je;break;default:l=ve}return u=Cg.bind(null,n),l=dr(l,u),n.callbackPriority=r,n.callbackNode=l,r}return u!==null&&u!==null&&va(u),n.callbackPriority=2,n.callbackNode=null,2}function Cg(n,r){if(pt!==0&&pt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var l=n.callbackNode;if(Bo()&&n.callbackNode!==l)return null;var u=Me;return u=ql(n,n===Xe?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(ag(n,u,r),xg(n,Dt()),n.callbackNode!=null&&n.callbackNode===l?Cg.bind(null,n):null)}function wg(n,r){if(Bo())return null;ag(n,r,!0)}function rS(){gS(function(){(Pe&6)!==0?dr(Q,iS):Eg()})}function qc(){if(wi===0){var n=Dr;n===0&&(n=Vl,Vl<<=1,(Vl&261888)===0&&(Vl=256)),wi=n}return wi}function Ag(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Ql(""+n)}function kg(n,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,n.id&&l.setAttribute("form",n.id),r.parentNode.insertBefore(l,r),n=new FormData(n),l.parentNode.removeChild(l),n}function aS(n,r,l,u,h){if(r==="submit"&&l&&l.stateNode===h){var m=Ag((h[It]||null).action),_=u.submitter;_&&(r=(r=_[It]||null)?Ag(r.formAction):_.getAttribute("formAction"),r!==null&&(m=r,_=null));var E=new Jl("action","action",null,u,h);n.push({event:E,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(wi!==0){var D=_?kg(h,_):new FormData(h);fc(l,{pending:!0,data:D,method:h.method,action:m},null,D)}}else typeof m=="function"&&(E.preventDefault(),D=_?kg(h,_):new FormData(h),fc(l,{pending:!0,data:D,method:h.method,action:m},m,D))},currentTarget:h}]})}}for(var Fc=0;Fc<Tu.length;Fc++){var Yc=Tu[Fc],lS=Yc.toLowerCase(),oS=Yc[0].toUpperCase()+Yc.slice(1);yn(lS,"on"+oS)}yn(rp,"onAnimationEnd"),yn(ap,"onAnimationIteration"),yn(lp,"onAnimationStart"),yn("dblclick","onDoubleClick"),yn("focusin","onFocus"),yn("focusout","onBlur"),yn(x_,"onTransitionRun"),yn(C_,"onTransitionStart"),yn(w_,"onTransitionCancel"),yn(op,"onTransitionEnd"),yr("onMouseEnter",["mouseout","mouseover"]),yr("onMouseLeave",["mouseout","mouseover"]),yr("onPointerEnter",["pointerout","pointerover"]),yr("onPointerLeave",["pointerout","pointerover"]),Hi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var nl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),sS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(nl));function Tg(n,r){r=(r&4)!==0;for(var l=0;l<n.length;l++){var u=n[l],h=u.event;u=u.listeners;e:{var m=void 0;if(r)for(var _=u.length-1;0<=_;_--){var E=u[_],D=E.instance,B=E.currentTarget;if(E=E.listener,D!==m&&h.isPropagationStopped())break e;m=E,h.currentTarget=B;try{m(h)}catch(Y){no(Y)}h.currentTarget=null,m=D}else for(_=0;_<u.length;_++){if(E=u[_],D=E.instance,B=E.currentTarget,E=E.listener,D!==m&&h.isPropagationStopped())break e;m=E,h.currentTarget=B;try{m(h)}catch(Y){no(Y)}h.currentTarget=null,m=D}}}}function Ne(n,r){var l=r[lu];l===void 0&&(l=r[lu]=new Set);var u=n+"__bubble";l.has(u)||(Lg(r,n,2,!1),l.add(u))}function Xc(n,r,l){var u=0;r&&(u|=4),Lg(l,n,u,r)}var Go="_reactListening"+Math.random().toString(36).slice(2);function Qc(n){if(!n[Go]){n[Go]=!0,Eh.forEach(function(l){l!=="selectionchange"&&(sS.has(l)||Xc(l,!1,n),Xc(l,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Go]||(r[Go]=!0,Xc("selectionchange",!1,r))}}function Lg(n,r,l,u){switch(ry(r)){case 2:var h=zS;break;case 8:h=US;break;default:h=ff}l=h.bind(null,r,l,n),h=void 0,!mu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),u?h!==void 0?n.addEventListener(r,l,{capture:!0,passive:h}):n.addEventListener(r,l,!0):h!==void 0?n.addEventListener(r,l,{passive:h}):n.addEventListener(r,l,!1)}function Zc(n,r,l,u,h){var m=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var _=u.tag;if(_===3||_===4){var E=u.stateNode.containerInfo;if(E===h)break;if(_===4)for(_=u.return;_!==null;){var D=_.tag;if((D===3||D===4)&&_.stateNode.containerInfo===h)return;_=_.return}for(;E!==null;){if(_=pr(E),_===null)return;if(D=_.tag,D===5||D===6||D===26||D===27){u=m=_;continue e}E=E.parentNode}}u=u.return}Mh(function(){var B=m,Y=hu(l),K=[];e:{var V=sp.get(n);if(V!==void 0){var G=Jl,de=n;switch(n){case"keypress":if(Kl(l)===0)break e;case"keydown":case"keyup":G=t_;break;case"focusin":de="focus",G=vu;break;case"focusout":de="blur",G=vu;break;case"beforeblur":case"afterblur":G=vu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":G=Uh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":G=G1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":G=r_;break;case rp:case ap:case lp:G=F1;break;case op:G=l_;break;case"scroll":case"scrollend":G=j1;break;case"wheel":G=s_;break;case"copy":case"cut":case"paste":G=X1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":G=Ph;break;case"toggle":case"beforetoggle":G=c_}var be=(r&4)!==0,Fe=!be&&(n==="scroll"||n==="scrollend"),I=be?V!==null?V+"Capture":null:V;be=[];for(var M=B,P;M!==null;){var Z=M;if(P=Z.stateNode,Z=Z.tag,Z!==5&&Z!==26&&Z!==27||P===null||I===null||(Z=Ca(M,I),Z!=null&&be.push(il(M,Z,P))),Fe)break;M=M.return}0<be.length&&(V=new G(V,de,null,l,Y),K.push({event:V,listeners:be}))}}if((r&7)===0){e:{if(V=n==="mouseover"||n==="pointerover",G=n==="mouseout"||n==="pointerout",V&&l!==du&&(de=l.relatedTarget||l.fromElement)&&(pr(de)||de[hr]))break e;if((G||V)&&(V=Y.window===Y?Y:(V=Y.ownerDocument)?V.defaultView||V.parentWindow:window,G?(de=l.relatedTarget||l.toElement,G=B,de=de?pr(de):null,de!==null&&(Fe=s(de),be=de.tag,de!==Fe||be!==5&&be!==27&&be!==6)&&(de=null)):(G=null,de=B),G!==de)){if(be=Uh,Z="onMouseLeave",I="onMouseEnter",M="mouse",(n==="pointerout"||n==="pointerover")&&(be=Ph,Z="onPointerLeave",I="onPointerEnter",M="pointer"),Fe=G==null?V:xa(G),P=de==null?V:xa(de),V=new be(Z,M+"leave",G,l,Y),V.target=Fe,V.relatedTarget=P,Z=null,pr(Y)===B&&(be=new be(I,M+"enter",de,l,Y),be.target=P,be.relatedTarget=Fe,Z=be),Fe=Z,G&&de)t:{for(be=uS,I=G,M=de,P=0,Z=I;Z;Z=be(Z))P++;Z=0;for(var ge=M;ge;ge=be(ge))Z++;for(;0<P-Z;)I=be(I),P--;for(;0<Z-P;)M=be(M),Z--;for(;P--;){if(I===M||M!==null&&I===M.alternate){be=I;break t}I=be(I),M=be(M)}be=null}else be=null;G!==null&&Rg(K,V,G,be,!1),de!==null&&Fe!==null&&Rg(K,Fe,de,be,!0)}}e:{if(V=B?xa(B):window,G=V.nodeName&&V.nodeName.toLowerCase(),G==="select"||G==="input"&&V.type==="file")var Ue=Yh;else if(qh(V))if(Xh)Ue=__;else{Ue=b_;var pe=y_}else G=V.nodeName,!G||G.toLowerCase()!=="input"||V.type!=="checkbox"&&V.type!=="radio"?B&&fu(B.elementType)&&(Ue=Yh):Ue=v_;if(Ue&&(Ue=Ue(n,B))){Fh(K,Ue,l,Y);break e}pe&&pe(n,V,B),n==="focusout"&&B&&V.type==="number"&&B.memoizedProps.value!=null&&cu(V,"number",V.value)}switch(pe=B?xa(B):window,n){case"focusin":(qh(pe)||pe.contentEditable==="true")&&(xr=pe,wu=B,Oa=null);break;case"focusout":Oa=wu=xr=null;break;case"mousedown":Au=!0;break;case"contextmenu":case"mouseup":case"dragend":Au=!1,np(K,l,Y);break;case"selectionchange":if(E_)break;case"keydown":case"keyup":np(K,l,Y)}var we;if(Su)e:{switch(n){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else Er?Gh(n,l)&&(Ie="onCompositionEnd"):n==="keydown"&&l.keyCode===229&&(Ie="onCompositionStart");Ie&&(Bh&&l.locale!=="ko"&&(Er||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&Er&&(we=Ih()):(ui=Y,gu="value"in ui?ui.value:ui.textContent,Er=!0)),pe=$o(B,Ie),0<pe.length&&(Ie=new Hh(Ie,n,null,l,Y),K.push({event:Ie,listeners:pe}),we?Ie.data=we:(we=$h(l),we!==null&&(Ie.data=we)))),(we=d_?h_(n,l):p_(n,l))&&(Ie=$o(B,"onBeforeInput"),0<Ie.length&&(pe=new Hh("onBeforeInput","beforeinput",null,l,Y),K.push({event:pe,listeners:Ie}),pe.data=we)),aS(K,n,B,l,Y)}Tg(K,r)})}function il(n,r,l){return{instance:n,listener:r,currentTarget:l}}function $o(n,r){for(var l=r+"Capture",u=[];n!==null;){var h=n,m=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||m===null||(h=Ca(n,l),h!=null&&u.unshift(il(n,h,m)),h=Ca(n,r),h!=null&&u.push(il(n,h,m))),n.tag===3)return u;n=n.return}return[]}function uS(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Rg(n,r,l,u,h){for(var m=r._reactName,_=[];l!==null&&l!==u;){var E=l,D=E.alternate,B=E.stateNode;if(E=E.tag,D!==null&&D===u)break;E!==5&&E!==26&&E!==27||B===null||(D=B,h?(B=Ca(l,m),B!=null&&_.unshift(il(l,B,D))):h||(B=Ca(l,m),B!=null&&_.push(il(l,B,D)))),l=l.return}_.length!==0&&n.push({event:r,listeners:_})}var cS=/\r\n?/g,fS=/\u0000|\uFFFD/g;function Dg(n){return(typeof n=="string"?n:""+n).replace(cS,`
10
- `).replace(fS,"")}function Og(n,r){return r=Dg(r),Dg(n)===r}function qe(n,r,l,u,h,m){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||vr(n,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&vr(n,""+u);break;case"className":Yl(n,"class",u);break;case"tabIndex":Yl(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Yl(n,l,u);break;case"style":Oh(n,u,m);break;case"data":if(r!=="object"){Yl(n,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||l!=="href")){n.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=Ql(""+u),n.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(l==="formAction"?(r!=="input"&&qe(n,r,"name",h.name,h,null),qe(n,r,"formEncType",h.formEncType,h,null),qe(n,r,"formMethod",h.formMethod,h,null),qe(n,r,"formTarget",h.formTarget,h,null)):(qe(n,r,"encType",h.encType,h,null),qe(n,r,"method",h.method,h,null),qe(n,r,"target",h.target,h,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=Ql(""+u),n.setAttribute(l,u);break;case"onClick":u!=null&&(n.onclick=Pn);break;case"onScroll":u!=null&&Ne("scroll",n);break;case"onScrollEnd":u!=null&&Ne("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(h.children!=null)throw Error(a(60));n.innerHTML=l}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}l=Ql(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,""+u):n.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,""):n.removeAttribute(l);break;case"capture":case"download":u===!0?n.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,u):n.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(l,u):n.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(l):n.setAttribute(l,u);break;case"popover":Ne("beforetoggle",n),Ne("toggle",n),Fl(n,"popover",u);break;case"xlinkActuate":Hn(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Hn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Hn(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Hn(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Hn(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Hn(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Hn(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Hn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Hn(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Fl(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=P1.get(l)||l,Fl(n,l,u))}}function Kc(n,r,l,u,h,m){switch(l){case"style":Oh(n,u,m);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(h.children!=null)throw Error(a(60));n.innerHTML=l}}break;case"children":typeof u=="string"?vr(n,u):(typeof u=="number"||typeof u=="bigint")&&vr(n,""+u);break;case"onScroll":u!=null&&Ne("scroll",n);break;case"onScrollEnd":u!=null&&Ne("scrollend",n);break;case"onClick":u!=null&&(n.onclick=Pn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!xh.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),r=l.slice(2,h?l.length-7:void 0),m=n[It]||null,m=m!=null?m[l]:null,typeof m=="function"&&n.removeEventListener(r,m,h),typeof u=="function")){typeof m!="function"&&m!==null&&(l in n?n[l]=null:n.hasAttribute(l)&&n.removeAttribute(l)),n.addEventListener(r,u,h);break e}l in n?n[l]=u:u===!0?n.setAttribute(l,""):Fl(n,l,u)}}}function At(n,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",n),Ne("load",n);var u=!1,h=!1,m;for(m in l)if(l.hasOwnProperty(m)){var _=l[m];if(_!=null)switch(m){case"src":u=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:qe(n,r,m,_,l,null)}}h&&qe(n,r,"srcSet",l.srcSet,l,null),u&&qe(n,r,"src",l.src,l,null);return;case"input":Ne("invalid",n);var E=m=_=h=null,D=null,B=null;for(u in l)if(l.hasOwnProperty(u)){var Y=l[u];if(Y!=null)switch(u){case"name":h=Y;break;case"type":_=Y;break;case"checked":D=Y;break;case"defaultChecked":B=Y;break;case"value":m=Y;break;case"defaultValue":E=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(a(137,r));break;default:qe(n,r,u,Y,l,null)}}Th(n,m,E,D,B,_,h,!1);return;case"select":Ne("invalid",n),u=_=m=null;for(h in l)if(l.hasOwnProperty(h)&&(E=l[h],E!=null))switch(h){case"value":m=E;break;case"defaultValue":_=E;break;case"multiple":u=E;default:qe(n,r,h,E,l,null)}r=m,l=_,n.multiple=!!u,r!=null?br(n,!!u,r,!1):l!=null&&br(n,!!u,l,!0);return;case"textarea":Ne("invalid",n),m=h=u=null;for(_ in l)if(l.hasOwnProperty(_)&&(E=l[_],E!=null))switch(_){case"value":u=E;break;case"defaultValue":h=E;break;case"children":m=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(a(91));break;default:qe(n,r,_,E,l,null)}Rh(n,u,h,m);return;case"option":for(D in l)l.hasOwnProperty(D)&&(u=l[D],u!=null)&&(D==="selected"?n.selected=u&&typeof u!="function"&&typeof u!="symbol":qe(n,r,D,u,l,null));return;case"dialog":Ne("beforetoggle",n),Ne("toggle",n),Ne("cancel",n),Ne("close",n);break;case"iframe":case"object":Ne("load",n);break;case"video":case"audio":for(u=0;u<nl.length;u++)Ne(nl[u],n);break;case"image":Ne("error",n),Ne("load",n);break;case"details":Ne("toggle",n);break;case"embed":case"source":case"link":Ne("error",n),Ne("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(B in l)if(l.hasOwnProperty(B)&&(u=l[B],u!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:qe(n,r,B,u,l,null)}return;default:if(fu(r)){for(Y in l)l.hasOwnProperty(Y)&&(u=l[Y],u!==void 0&&Kc(n,r,Y,u,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(u=l[E],u!=null&&qe(n,r,E,u,l,null))}function dS(n,r,l,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,m=null,_=null,E=null,D=null,B=null,Y=null;for(G in l){var K=l[G];if(l.hasOwnProperty(G)&&K!=null)switch(G){case"checked":break;case"value":break;case"defaultValue":D=K;default:u.hasOwnProperty(G)||qe(n,r,G,null,u,K)}}for(var V in u){var G=u[V];if(K=l[V],u.hasOwnProperty(V)&&(G!=null||K!=null))switch(V){case"type":m=G;break;case"name":h=G;break;case"checked":B=G;break;case"defaultChecked":Y=G;break;case"value":_=G;break;case"defaultValue":E=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(a(137,r));break;default:G!==K&&qe(n,r,V,G,u,K)}}uu(n,_,E,D,B,Y,m,h);return;case"select":G=_=E=V=null;for(m in l)if(D=l[m],l.hasOwnProperty(m)&&D!=null)switch(m){case"value":break;case"multiple":G=D;default:u.hasOwnProperty(m)||qe(n,r,m,null,u,D)}for(h in u)if(m=u[h],D=l[h],u.hasOwnProperty(h)&&(m!=null||D!=null))switch(h){case"value":V=m;break;case"defaultValue":E=m;break;case"multiple":_=m;default:m!==D&&qe(n,r,h,m,u,D)}r=E,l=_,u=G,V!=null?br(n,!!l,V,!1):!!u!=!!l&&(r!=null?br(n,!!l,r,!0):br(n,!!l,l?[]:"",!1));return;case"textarea":G=V=null;for(E in l)if(h=l[E],l.hasOwnProperty(E)&&h!=null&&!u.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:qe(n,r,E,null,u,h)}for(_ in u)if(h=u[_],m=l[_],u.hasOwnProperty(_)&&(h!=null||m!=null))switch(_){case"value":V=h;break;case"defaultValue":G=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(a(91));break;default:h!==m&&qe(n,r,_,h,u,m)}Lh(n,V,G);return;case"option":for(var de in l)V=l[de],l.hasOwnProperty(de)&&V!=null&&!u.hasOwnProperty(de)&&(de==="selected"?n.selected=!1:qe(n,r,de,null,u,V));for(D in u)V=u[D],G=l[D],u.hasOwnProperty(D)&&V!==G&&(V!=null||G!=null)&&(D==="selected"?n.selected=V&&typeof V!="function"&&typeof V!="symbol":qe(n,r,D,V,u,G));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var be in l)V=l[be],l.hasOwnProperty(be)&&V!=null&&!u.hasOwnProperty(be)&&qe(n,r,be,null,u,V);for(B in u)if(V=u[B],G=l[B],u.hasOwnProperty(B)&&V!==G&&(V!=null||G!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(a(137,r));break;default:qe(n,r,B,V,u,G)}return;default:if(fu(r)){for(var Fe in l)V=l[Fe],l.hasOwnProperty(Fe)&&V!==void 0&&!u.hasOwnProperty(Fe)&&Kc(n,r,Fe,void 0,u,V);for(Y in u)V=u[Y],G=l[Y],!u.hasOwnProperty(Y)||V===G||V===void 0&&G===void 0||Kc(n,r,Y,V,u,G);return}}for(var I in l)V=l[I],l.hasOwnProperty(I)&&V!=null&&!u.hasOwnProperty(I)&&qe(n,r,I,null,u,V);for(K in u)V=u[K],G=l[K],!u.hasOwnProperty(K)||V===G||V==null&&G==null||qe(n,r,K,V,u,G)}function Ng(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function hS(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var h=l[u],m=h.transferSize,_=h.initiatorType,E=h.duration;if(m&&E&&Ng(_)){for(_=0,E=h.responseEnd,u+=1;u<l.length;u++){var D=l[u],B=D.startTime;if(B>E)break;var Y=D.transferSize,K=D.initiatorType;Y&&Ng(K)&&(D=D.responseEnd,_+=Y*(D<E?1:(E-B)/(D-B)))}if(--u,r+=8*(m+_)/(h.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Wc=null,Jc=null;function qo(n){return n.nodeType===9?n:n.ownerDocument}function Mg(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ig(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function ef(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var tf=null;function pS(){var n=window.event;return n&&n.type==="popstate"?n===tf?!1:(tf=n,!0):(tf=null,!1)}var zg=typeof setTimeout=="function"?setTimeout:void 0,mS=typeof clearTimeout=="function"?clearTimeout:void 0,Ug=typeof Promise=="function"?Promise:void 0,gS=typeof queueMicrotask=="function"?queueMicrotask:typeof Ug<"u"?function(n){return Ug.resolve(null).then(n).catch(yS)}:zg;function yS(n){setTimeout(function(){throw n})}function Ai(n){return n==="head"}function Hg(n,r){var l=r,u=0;do{var h=l.nextSibling;if(n.removeChild(l),h&&h.nodeType===8)if(l=h.data,l==="/$"||l==="/&"){if(u===0){n.removeChild(h),Zr(r);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")rl(n.ownerDocument.documentElement);else if(l==="head"){l=n.ownerDocument.head,rl(l);for(var m=l.firstChild;m;){var _=m.nextSibling,E=m.nodeName;m[Ea]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&m.rel.toLowerCase()==="stylesheet"||l.removeChild(m),m=_}}else l==="body"&&rl(n.ownerDocument.body);l=h}while(l);Zr(r)}function Pg(n,r){var l=n;n=0;do{var u=l.nextSibling;if(l.nodeType===1?r?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(r?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),u&&u.nodeType===8)if(l=u.data,l==="/$"){if(n===0)break;n--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||n++;l=u}while(l)}function nf(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":nf(l),ou(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}n.removeChild(l)}}function bS(n,r,l,u){for(;n.nodeType===1;){var h=l;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[Ea])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(m=n.getAttribute("rel"),m==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(m!==h.rel||n.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||n.getAttribute("title")!==(h.title==null?null:h.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(m=n.getAttribute("src"),(m!==(h.src==null?null:h.src)||n.getAttribute("type")!==(h.type==null?null:h.type)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&m&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var m=h.name==null?null:""+h.name;if(h.type==="hidden"&&n.getAttribute("name")===m)return n}else return n;if(n=cn(n.nextSibling),n===null)break}return null}function vS(n,r,l){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!l||(n=cn(n.nextSibling),n===null))return null;return n}function Bg(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=cn(n.nextSibling),n===null))return null;return n}function rf(n){return n.data==="$?"||n.data==="$~"}function af(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function _S(n,r){var l=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||l.readyState!=="loading")r();else{var u=function(){r(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function cn(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var lf=null;function jg(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var l=n.data;if(l==="/$"||l==="/&"){if(r===0)return cn(n.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}n=n.nextSibling}return null}function Vg(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var l=n.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(r===0)return n;r--}else l!=="/$"&&l!=="/&"||r++}n=n.previousSibling}return null}function Gg(n,r,l){switch(r=qo(l),n){case"html":if(n=r.documentElement,!n)throw Error(a(452));return n;case"head":if(n=r.head,!n)throw Error(a(453));return n;case"body":if(n=r.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function rl(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);ou(n)}var fn=new Map,$g=new Set;function Fo(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var ti=X.d;X.d={f:SS,r:ES,D:xS,C:CS,L:wS,m:AS,X:TS,S:kS,M:LS};function SS(){var n=ti.f(),r=Uo();return n||r}function ES(n){var r=mr(n);r!==null&&r.tag===5&&r.type==="form"?om(r):ti.r(n)}var Yr=typeof document>"u"?null:document;function qg(n,r,l){var u=Yr;if(u&&typeof r=="string"&&r){var h=nn(r);h='link[rel="'+n+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),$g.has(h)||($g.add(h),n={rel:n,crossOrigin:l,href:r},u.querySelector(h)===null&&(r=u.createElement("link"),At(r,"link",n),bt(r),u.head.appendChild(r)))}}function xS(n){ti.D(n),qg("dns-prefetch",n,null)}function CS(n,r){ti.C(n,r),qg("preconnect",n,r)}function wS(n,r,l){ti.L(n,r,l);var u=Yr;if(u&&n&&r){var h='link[rel="preload"][as="'+nn(r)+'"]';r==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+nn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+nn(l.imageSizes)+'"]')):h+='[href="'+nn(n)+'"]';var m=h;switch(r){case"style":m=Xr(n);break;case"script":m=Qr(n)}fn.has(m)||(n=y({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:n,as:r},l),fn.set(m,n),u.querySelector(h)!==null||r==="style"&&u.querySelector(al(m))||r==="script"&&u.querySelector(ll(m))||(r=u.createElement("link"),At(r,"link",n),bt(r),u.head.appendChild(r)))}}function AS(n,r){ti.m(n,r);var l=Yr;if(l&&n){var u=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+nn(u)+'"][href="'+nn(n)+'"]',m=h;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Qr(n)}if(!fn.has(m)&&(n=y({rel:"modulepreload",href:n},r),fn.set(m,n),l.querySelector(h)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ll(m)))return}u=l.createElement("link"),At(u,"link",n),bt(u),l.head.appendChild(u)}}}function kS(n,r,l){ti.S(n,r,l);var u=Yr;if(u&&n){var h=gr(u).hoistableStyles,m=Xr(n);r=r||"default";var _=h.get(m);if(!_){var E={loading:0,preload:null};if(_=u.querySelector(al(m)))E.loading=5;else{n=y({rel:"stylesheet",href:n,"data-precedence":r},l),(l=fn.get(m))&&of(n,l);var D=_=u.createElement("link");bt(D),At(D,"link",n),D._p=new Promise(function(B,Y){D.onload=B,D.onerror=Y}),D.addEventListener("load",function(){E.loading|=1}),D.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Yo(_,r,u)}_={type:"stylesheet",instance:_,count:1,state:E},h.set(m,_)}}}function TS(n,r){ti.X(n,r);var l=Yr;if(l&&n){var u=gr(l).hoistableScripts,h=Qr(n),m=u.get(h);m||(m=l.querySelector(ll(h)),m||(n=y({src:n,async:!0},r),(r=fn.get(h))&&sf(n,r),m=l.createElement("script"),bt(m),At(m,"link",n),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(h,m))}}function LS(n,r){ti.M(n,r);var l=Yr;if(l&&n){var u=gr(l).hoistableScripts,h=Qr(n),m=u.get(h);m||(m=l.querySelector(ll(h)),m||(n=y({src:n,async:!0,type:"module"},r),(r=fn.get(h))&&sf(n,r),m=l.createElement("script"),bt(m),At(m,"link",n),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(h,m))}}function Fg(n,r,l,u){var h=(h=ce.current)?Fo(h):null;if(!h)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=Xr(l.href),l=gr(h).hoistableStyles,u=l.get(r),u||(u={type:"style",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){n=Xr(l.href);var m=gr(h).hoistableStyles,_=m.get(n);if(_||(h=h.ownerDocument||h,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(n,_),(m=h.querySelector(al(n)))&&!m._p&&(_.instance=m,_.state.loading=5),fn.has(n)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},fn.set(n,l),m||RS(h,n,l,_.state))),r&&u===null)throw Error(a(528,""));return _}if(r&&u!==null)throw Error(a(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Qr(l),l=gr(h).hoistableScripts,u=l.get(r),u||(u={type:"script",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Xr(n){return'href="'+nn(n)+'"'}function al(n){return'link[rel="stylesheet"]['+n+"]"}function Yg(n){return y({},n,{"data-precedence":n.precedence,precedence:null})}function RS(n,r,l,u){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=n.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),At(r,"link",l),bt(r),n.head.appendChild(r))}function Qr(n){return'[src="'+nn(n)+'"]'}function ll(n){return"script[async]"+n}function Xg(n,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=n.querySelector('style[data-href~="'+nn(l.href)+'"]');if(u)return r.instance=u,bt(u),u;var h=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),bt(u),At(u,"style",h),Yo(u,l.precedence,n),r.instance=u;case"stylesheet":h=Xr(l.href);var m=n.querySelector(al(h));if(m)return r.state.loading|=4,r.instance=m,bt(m),m;u=Yg(l),(h=fn.get(h))&&of(u,h),m=(n.ownerDocument||n).createElement("link"),bt(m);var _=m;return _._p=new Promise(function(E,D){_.onload=E,_.onerror=D}),At(m,"link",u),r.state.loading|=4,Yo(m,l.precedence,n),r.instance=m;case"script":return m=Qr(l.src),(h=n.querySelector(ll(m)))?(r.instance=h,bt(h),h):(u=l,(h=fn.get(m))&&(u=y({},l),sf(u,h)),n=n.ownerDocument||n,h=n.createElement("script"),bt(h),At(h,"link",u),n.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,Yo(u,l.precedence,n));return r.instance}function Yo(n,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=u.length?u[u.length-1]:null,m=h,_=0;_<u.length;_++){var E=u[_];if(E.dataset.precedence===r)m=E;else if(m!==h)break}m?m.parentNode.insertBefore(n,m.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(n,r.firstChild))}function of(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function sf(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Xo=null;function Qg(n,r,l){if(Xo===null){var u=new Map,h=Xo=new Map;h.set(l,u)}else h=Xo,u=h.get(l),u||(u=new Map,h.set(l,u));if(u.has(n))return u;for(u.set(n,null),l=l.getElementsByTagName(n),h=0;h<l.length;h++){var m=l[h];if(!(m[Ea]||m[Et]||n==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var _=m.getAttribute(r)||"";_=n+_;var E=u.get(_);E?E.push(m):u.set(_,[m])}}return u}function Zg(n,r,l){n=n.ownerDocument||n,n.head.insertBefore(l,r==="title"?n.querySelector("head > title"):null)}function DS(n,r,l){if(l===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(n=r.disabled,typeof r.precedence=="string"&&n==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Kg(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function OS(n,r,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var h=Xr(u.href),m=r.querySelector(al(h));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=Qo.bind(n),r.then(n,n)),l.state.loading|=4,l.instance=m,bt(m);return}m=r.ownerDocument||r,u=Yg(u),(h=fn.get(h))&&of(u,h),m=m.createElement("link"),bt(m);var _=m;_._p=new Promise(function(E,D){_.onload=E,_.onerror=D}),At(m,"link",u),l.instance=m}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(n.count++,l=Qo.bind(n),r.addEventListener("load",l),r.addEventListener("error",l))}}var uf=0;function NS(n,r){return n.stylesheets&&n.count===0&&Ko(n,n.stylesheets),0<n.count||0<n.imgCount?function(l){var u=setTimeout(function(){if(n.stylesheets&&Ko(n,n.stylesheets),n.unsuspend){var m=n.unsuspend;n.unsuspend=null,m()}},6e4+r);0<n.imgBytes&&uf===0&&(uf=62500*hS());var h=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Ko(n,n.stylesheets),n.unsuspend)){var m=n.unsuspend;n.unsuspend=null,m()}},(n.imgBytes>uf?50:800)+r);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(h)}}:null}function Qo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ko(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Zo=null;function Ko(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Zo=new Map,r.forEach(MS,n),Zo=null,Qo.call(n))}function MS(n,r){if(!(r.state.loading&4)){var l=Zo.get(n);if(l)var u=l.get(null);else{l=new Map,Zo.set(n,l);for(var h=n.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<h.length;m++){var _=h[m];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(l.set(_.dataset.precedence,_),u=_)}u&&l.set(null,u)}h=r.instance,_=h.getAttribute("data-precedence"),m=l.get(_)||u,m===u&&l.set(null,h),l.set(_,h),this.count++,u=Qo.bind(this),h.addEventListener("load",u),h.addEventListener("error",u),m?m.parentNode.insertBefore(h,m.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(h,n.firstChild)),r.state.loading|=4}}var ol={$$typeof:C,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function IS(n,r,l,u,h,m,_,E,D){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=iu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=iu(0),this.hiddenUpdates=iu(null),this.identifierPrefix=u,this.onUncaughtError=h,this.onCaughtError=m,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map}function Wg(n,r,l,u,h,m,_,E,D,B,Y,K){return n=new IS(n,r,l,_,D,B,Y,K,E),r=1,m===!0&&(r|=24),m=Yt(3,null,null,r),n.current=m,m.stateNode=n,r=ju(),r.refCount++,n.pooledCache=r,r.refCount++,m.memoizedState={element:u,isDehydrated:l,cache:r},qu(m),n}function Jg(n){return n?(n=Ar,n):Ar}function ey(n,r,l,u,h,m){h=Jg(h),u.context===null?u.context=h:u.pendingContext=h,u=mi(r),u.payload={element:l},m=m===void 0?null:m,m!==null&&(u.callback=m),l=gi(n,u,r),l!==null&&(jt(l,n,r),Pa(l,n,r))}function ty(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var l=n.retryLane;n.retryLane=l!==0&&l<r?l:r}}function cf(n,r){ty(n,r),(n=n.alternate)&&ty(n,r)}function ny(n){if(n.tag===13||n.tag===31){var r=Vi(n,67108864);r!==null&&jt(r,n,67108864),cf(n,67108864)}}function iy(n){if(n.tag===13||n.tag===31){var r=Wt();r=ru(r);var l=Vi(n,r);l!==null&&jt(l,n,r),cf(n,r)}}var Wo=!0;function zS(n,r,l,u){var h=H.T;H.T=null;var m=X.p;try{X.p=2,ff(n,r,l,u)}finally{X.p=m,H.T=h}}function US(n,r,l,u){var h=H.T;H.T=null;var m=X.p;try{X.p=8,ff(n,r,l,u)}finally{X.p=m,H.T=h}}function ff(n,r,l,u){if(Wo){var h=df(u);if(h===null)Zc(n,r,u,Jo,l),ay(n,u);else if(PS(h,n,r,l,u))u.stopPropagation();else if(ay(n,u),r&4&&-1<HS.indexOf(n)){for(;h!==null;){var m=mr(h);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var _=Ui(m.pendingLanes);if(_!==0){var E=m;for(E.pendingLanes|=2,E.entangledLanes|=2;_;){var D=1<<31-Ye(_);E.entanglements[1]|=D,_&=~D}Tn(m),(Pe&6)===0&&(Io=Dt()+500,tl(0))}}break;case 31:case 13:E=Vi(m,2),E!==null&&jt(E,m,2),Uo(),cf(m,2)}if(m=df(u),m===null&&Zc(n,r,u,Jo,l),m===h)break;h=m}h!==null&&u.stopPropagation()}else Zc(n,r,u,null,l)}}function df(n){return n=hu(n),hf(n)}var Jo=null;function hf(n){if(Jo=null,n=pr(n),n!==null){var r=s(n);if(r===null)n=null;else{var l=r.tag;if(l===13){if(n=c(r),n!==null)return n;n=null}else if(l===31){if(n=f(r),n!==null)return n;n=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return Jo=n,null}function ry(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(nu()){case Q:return 2;case se:return 8;case ve:case De:return 32;case je:return 268435456;default:return 32}default:return 32}}var pf=!1,ki=null,Ti=null,Li=null,sl=new Map,ul=new Map,Ri=[],HS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ay(n,r){switch(n){case"focusin":case"focusout":ki=null;break;case"dragenter":case"dragleave":Ti=null;break;case"mouseover":case"mouseout":Li=null;break;case"pointerover":case"pointerout":sl.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":ul.delete(r.pointerId)}}function cl(n,r,l,u,h,m){return n===null||n.nativeEvent!==m?(n={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:m,targetContainers:[h]},r!==null&&(r=mr(r),r!==null&&ny(r)),n):(n.eventSystemFlags|=u,r=n.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),n)}function PS(n,r,l,u,h){switch(r){case"focusin":return ki=cl(ki,n,r,l,u,h),!0;case"dragenter":return Ti=cl(Ti,n,r,l,u,h),!0;case"mouseover":return Li=cl(Li,n,r,l,u,h),!0;case"pointerover":var m=h.pointerId;return sl.set(m,cl(sl.get(m)||null,n,r,l,u,h)),!0;case"gotpointercapture":return m=h.pointerId,ul.set(m,cl(ul.get(m)||null,n,r,l,u,h)),!0}return!1}function ly(n){var r=pr(n.target);if(r!==null){var l=s(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){n.blockedOn=r,_h(n.priority,function(){iy(l)});return}}else if(r===31){if(r=f(l),r!==null){n.blockedOn=r,_h(n.priority,function(){iy(l)});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){n.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}n.blockedOn=null}function es(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var l=df(n.nativeEvent);if(l===null){l=n.nativeEvent;var u=new l.constructor(l.type,l);du=u,l.target.dispatchEvent(u),du=null}else return r=mr(l),r!==null&&ny(r),n.blockedOn=l,!1;r.shift()}return!0}function oy(n,r,l){es(n)&&l.delete(r)}function BS(){pf=!1,ki!==null&&es(ki)&&(ki=null),Ti!==null&&es(Ti)&&(Ti=null),Li!==null&&es(Li)&&(Li=null),sl.forEach(oy),ul.forEach(oy)}function ts(n,r){n.blockedOn===r&&(n.blockedOn=null,pf||(pf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,BS)))}var ns=null;function sy(n){ns!==n&&(ns=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ns===n&&(ns=null);for(var r=0;r<n.length;r+=3){var l=n[r],u=n[r+1],h=n[r+2];if(typeof u!="function"){if(hf(u||l)===null)continue;break}var m=mr(l);m!==null&&(n.splice(r,3),r-=3,fc(m,{pending:!0,data:h,method:l.method,action:u},u,h))}}))}function Zr(n){function r(D){return ts(D,n)}ki!==null&&ts(ki,n),Ti!==null&&ts(Ti,n),Li!==null&&ts(Li,n),sl.forEach(r),ul.forEach(r);for(var l=0;l<Ri.length;l++){var u=Ri[l];u.blockedOn===n&&(u.blockedOn=null)}for(;0<Ri.length&&(l=Ri[0],l.blockedOn===null);)ly(l),l.blockedOn===null&&Ri.shift();if(l=(n.ownerDocument||n).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var h=l[u],m=l[u+1],_=h[It]||null;if(typeof m=="function")_||sy(l);else if(_){var E=null;if(m&&m.hasAttribute("formAction")){if(h=m,_=m[It]||null)E=_.formAction;else if(hf(h)!==null)continue}else E=_.action;typeof E=="function"?l[u+1]=E:(l.splice(u,3),u-=3),sy(l)}}}function uy(){function n(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(_){return h=_})},focusReset:"manual",scroll:"manual"})}function r(){h!==null&&(h(),h=null),u||setTimeout(l,20)}function l(){if(!u&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,h=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),h!==null&&(h(),h=null)}}}function mf(n){this._internalRoot=n}is.prototype.render=mf.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,u=Wt();ey(l,u,n,r,null,null)},is.prototype.unmount=mf.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;ey(n.current,2,null,n,null,null),Uo(),r[hr]=null}};function is(n){this._internalRoot=n}is.prototype.unstable_scheduleHydration=function(n){if(n){var r=vh();n={blockedOn:null,target:n,priority:r};for(var l=0;l<Ri.length&&r!==0&&r<Ri[l].priority;l++);Ri.splice(l,0,n),l===0&&ly(n)}};var cy=t.version;if(cy!=="19.2.4")throw Error(a(527,cy,"19.2.4"));X.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=p(r),n=n!==null?g(n):null,n=n===null?null:n.stateNode,n};var jS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rs.isDisabled&&rs.supportsFiber)try{Ot=rs.inject(jS),ht=rs}catch{}}return dl.createRoot=function(n,r){if(!o(n))throw Error(a(299));var l=!1,u="",h=ym,m=bm,_=vm;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(_=r.onRecoverableError)),r=Wg(n,1,!1,null,null,l,u,null,h,m,_,uy),n[hr]=r.current,Qc(n),new mf(r)},dl.hydrateRoot=function(n,r,l){if(!o(n))throw Error(a(299));var u=!1,h="",m=ym,_=bm,E=vm,D=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(m=l.onUncaughtError),l.onCaughtError!==void 0&&(_=l.onCaughtError),l.onRecoverableError!==void 0&&(E=l.onRecoverableError),l.formState!==void 0&&(D=l.formState)),r=Wg(n,1,!0,r,l??null,u,h,D,m,_,E,uy),r.context=Jg(null),l=r.current,u=Wt(),u=ru(u),h=mi(u),h.callback=null,gi(l,h,u),l=u,r.current.lanes=l,Sa(r,l),Tn(r),n[hr]=r.current,Qc(n),new is(r)},dl.version="19.2.4",dl}var _y;function KS(){if(_y)return bf.exports;_y=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),bf.exports=ZS(),bf.exports}var WS=KS();async function Cn(e,t={}){const i=await fetch(e,{headers:{"content-type":"application/json",...t.headers},...t}),a=await JS(i);if(!i.ok)throw new Error(a.error||i.statusText||`request to ${e} failed`);return a}async function JS(e){const t=await e.text();if(!t)return{};try{return JSON.parse(t)}catch{throw new Error("server returned an invalid JSON response")}}async function eE(){return Cn("/api/bootstrap")}async function tE(e){return Cn("/api/diff")}async function nE(e){return Cn("/api/state",{method:"POST",body:JSON.stringify(e)})}async function iE(e){return Cn("/api/thread",{method:"POST",body:JSON.stringify(e)})}async function rE(e){return Cn("/api/thread/reply",{method:"POST",body:JSON.stringify(e)})}async function aE(e){return Cn("/api/thread-message",{method:"POST",body:JSON.stringify({id:e})})}async function lE(e){return Cn("/api/thread/resolve",{method:"POST",body:JSON.stringify(e)})}async function oE(e){return Cn("/api/thread/collapse",{method:"POST",body:JSON.stringify(e)})}async function sE(){return Cn("/api/brief/generate",{method:"POST"})}async function uE(){return Cn("/api/review",{method:"POST"})}async function cE(){return Cn("/api/cancel",{method:"POST"})}const fE={diffStyle:"split",overflowMode:"wrap",sidebarOpen:!1,collapsedFileIds:[],viewedFileIds:[],threads:[],brief:{content:"",loading:!1}};function dE(e){return{...e,diffStyle:e.diffStyle==="split"?"split":"stacked",overflowMode:e.overflowMode==="scroll"?"scroll":"wrap",threads:e.threads.map(t=>({...t,resolved:!!t.resolved,collapsed:!!t.collapsed})),brief:{...e.brief.threadId?{threadId:e.brief.threadId}:{},content:e.brief.content,loading:!!e.brief.loading}}}function Sy(e){return Object.fromEntries(e.map(t=>[t,!0]))}function Ey(e,t){return e.includes(t)?e.filter(i=>i!==t):[...e,t]}function xy(e){return[...new Set(e)]}function hE(e,t){const i=e.findIndex(a=>a.id===t);return i===-1?null:e[i+1]?.id??e[i-1]?.id??null}function pE(e,t){return{additions:e.additions+t.additions,deletions:e.deletions+t.deletions}}function mE(e){const t=new Map;for(const i of e){const a={lineNumber:i.lineNumber,side:i.side,metadata:{type:"thread",thread:i}},o=t.get(i.fileId);o?o.push(a):t.set(i.fileId,[a])}return t}function gE(e,t,i,a){return!a||i?.fileId!==t?e:[...e,a]}function yE(e,t,i){return{...e,threads:e.threads.map(a=>a.id===t?{...a,loading:i}:a)}}function bE(e,t){return{...e,brief:{...e.brief,loading:t}}}function vE(e,t){const i=t.find(a=>a.id===e.fileId);return e.side==="deletions"?i?.oldRepoPath??i?.newRepoPath??e.fileId:i?.newRepoPath??i?.oldRepoPath??e.fileId}const xb=(...e)=>e.filter((t,i,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===i).join(" ").trim();const _E=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const SE=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,i,a)=>a?a.toUpperCase():i.toLowerCase());const Cy=e=>{const t=SE(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Ef={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const EE=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},xE=ue.createContext({}),CE=()=>ue.useContext(xE),wE=ue.forwardRef(({color:e,size:t,strokeWidth:i,absoluteStrokeWidth:a,className:o="",children:s,iconNode:c,...f},d)=>{const{size:p=24,strokeWidth:g=2,absoluteStrokeWidth:y=!1,color:b="currentColor",className:v=""}=CE()??{},S=a??y?Number(i??g)*24/Number(t??p):i??g;return ue.createElement("svg",{ref:d,...Ef,width:t??p??Ef.width,height:t??p??Ef.height,stroke:e??b,strokeWidth:S,className:xb("lucide",v,o),...!s&&!EE(f)&&{"aria-hidden":"true"},...f},[...c.map(([T,L])=>ue.createElement(T,L)),...Array.isArray(s)?s:[s]])});const zn=(e,t)=>{const i=ue.forwardRef(({className:a,...o},s)=>ue.createElement(wE,{ref:s,iconNode:t,className:xb(`lucide-${_E(Cy(e))}`,`lucide-${e}`,a),...o}));return i.displayName=Cy(e),i};const AE=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],kE=zn("check",AE);const TE=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],LE=zn("chevron-down",TE);const RE=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],DE=zn("chevron-right",RE);const OE=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],Cb=zn("chevrons-down-up",OE);const NE=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],wb=zn("chevrons-up-down",NE);const ME=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],IE=zn("eye-off",ME);const zE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],UE=zn("panel-left",zE);const HE=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],PE=zn("scroll-text",HE);const BE=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],jE=zn("sparkles",BE);const VE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ab=zn("x",VE);function _l({icon:e,label:t,size:i=14,className:a="",...o}){return q.jsx("button",{type:"button",className:`icon-btn ${a}`,"aria-label":t,...o,children:q.jsx(e,{size:i})})}function kb(e,t){const i=t||{};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const GE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$E=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qE={};function wy(e,t){return(qE.jsx?$E:GE).test(e)}const FE=/[ \t\n\f\r]/g;function js(e){return typeof e=="object"?e.type==="text"?Ay(e.value):!1:Ay(e)}function Ay(e){return e.replace(FE,"")===""}class Il{constructor(t,i,a){this.normal=i,this.property=t,a&&(this.space=a)}}Il.prototype.normal={};Il.prototype.property={};Il.prototype.space=void 0;function Tb(e,t){const i={},a={};for(const o of e)Object.assign(i,o.property),Object.assign(a,o.normal);return new Il(i,a,t)}function od(e){return e.toLowerCase()}class $t{constructor(t,i){this.attribute=i,this.property=t}}$t.prototype.attribute="";$t.prototype.booleanish=!1;$t.prototype.boolean=!1;$t.prototype.commaOrSpaceSeparated=!1;$t.prototype.commaSeparated=!1;$t.prototype.defined=!1;$t.prototype.mustUseProperty=!1;$t.prototype.number=!1;$t.prototype.overloadedBoolean=!1;$t.prototype.property="";$t.prototype.spaceSeparated=!1;$t.prototype.space=void 0;let YE=0;const Ae=sr(),ct=sr(),sd=sr(),ae=sr(),Ze=sr(),la=sr(),Jt=sr();function sr(){return 2**++YE}const ud=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ae,booleanish:ct,commaOrSpaceSeparated:Jt,commaSeparated:la,number:ae,overloadedBoolean:sd,spaceSeparated:Ze},Symbol.toStringTag,{value:"Module"})),xf=Object.keys(ud);class Hd extends $t{constructor(t,i,a,o){let s=-1;if(super(t,i),ky(this,"space",o),typeof a=="number")for(;++s<xf.length;){const c=xf[s];ky(this,xf[s],(a&ud[c])===ud[c])}}}Hd.prototype.defined=!0;function ky(e,t,i){i&&(e[t]=i)}function pa(e){const t={},i={};for(const[a,o]of Object.entries(e.properties)){const s=new Hd(a,e.transform(e.attributes||{},a),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(s.mustUseProperty=!0),t[a]=s,i[od(a)]=a,i[od(s.attribute)]=a}return new Il(t,i,e.space)}const Lb=pa({properties:{ariaActiveDescendant:null,ariaAtomic:ct,ariaAutoComplete:null,ariaBusy:ct,ariaChecked:ct,ariaColCount:ae,ariaColIndex:ae,ariaColSpan:ae,ariaControls:Ze,ariaCurrent:null,ariaDescribedBy:Ze,ariaDetails:null,ariaDisabled:ct,ariaDropEffect:Ze,ariaErrorMessage:null,ariaExpanded:ct,ariaFlowTo:Ze,ariaGrabbed:ct,ariaHasPopup:null,ariaHidden:ct,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ze,ariaLevel:ae,ariaLive:null,ariaModal:ct,ariaMultiLine:ct,ariaMultiSelectable:ct,ariaOrientation:null,ariaOwns:Ze,ariaPlaceholder:null,ariaPosInSet:ae,ariaPressed:ct,ariaReadOnly:ct,ariaRelevant:null,ariaRequired:ct,ariaRoleDescription:Ze,ariaRowCount:ae,ariaRowIndex:ae,ariaRowSpan:ae,ariaSelected:ct,ariaSetSize:ae,ariaSort:null,ariaValueMax:ae,ariaValueMin:ae,ariaValueNow:ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Rb(e,t){return t in e?e[t]:t}function Db(e,t){return Rb(e,t.toLowerCase())}const XE=pa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:la,acceptCharset:Ze,accessKey:Ze,action:null,allow:null,allowFullScreen:Ae,allowPaymentRequest:Ae,allowUserMedia:Ae,alt:null,as:null,async:Ae,autoCapitalize:null,autoComplete:Ze,autoFocus:Ae,autoPlay:Ae,blocking:Ze,capture:null,charSet:null,checked:Ae,cite:null,className:Ze,cols:ae,colSpan:null,content:null,contentEditable:ct,controls:Ae,controlsList:Ze,coords:ae|la,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ae,defer:Ae,dir:null,dirName:null,disabled:Ae,download:sd,draggable:ct,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ae,formTarget:null,headers:Ze,height:ae,hidden:sd,high:ae,href:null,hrefLang:null,htmlFor:Ze,httpEquiv:Ze,id:null,imageSizes:null,imageSrcSet:null,inert:Ae,inputMode:null,integrity:null,is:null,isMap:Ae,itemId:null,itemProp:Ze,itemRef:Ze,itemScope:Ae,itemType:Ze,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ae,low:ae,manifest:null,max:null,maxLength:ae,media:null,method:null,min:null,minLength:ae,multiple:Ae,muted:Ae,name:null,nonce:null,noModule:Ae,noValidate:Ae,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:Ae,optimum:ae,pattern:null,ping:Ze,placeholder:null,playsInline:Ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ae,referrerPolicy:null,rel:Ze,required:Ae,reversed:Ae,rows:ae,rowSpan:ae,sandbox:Ze,scope:null,scoped:Ae,seamless:Ae,selected:Ae,shadowRootClonable:Ae,shadowRootDelegatesFocus:Ae,shadowRootMode:null,shape:null,size:ae,sizes:null,slot:null,span:ae,spellCheck:ct,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ae,step:null,style:null,tabIndex:ae,target:null,title:null,translate:null,type:null,typeMustMatch:Ae,useMap:null,value:ct,width:ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ze,axis:null,background:null,bgColor:null,border:ae,borderColor:null,bottomMargin:ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ae,declare:Ae,event:null,face:null,frame:null,frameBorder:null,hSpace:ae,leftMargin:ae,link:null,longDesc:null,lowSrc:null,marginHeight:ae,marginWidth:ae,noResize:Ae,noHref:Ae,noShade:Ae,noWrap:Ae,object:null,profile:null,prompt:null,rev:null,rightMargin:ae,rules:null,scheme:null,scrolling:ct,standby:null,summary:null,text:null,topMargin:ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ae,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ae,disableRemotePlayback:Ae,prefix:null,property:null,results:ae,security:null,unselectable:null},space:"html",transform:Db}),QE=pa({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",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:Jt,accentHeight:ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ae,amplitude:ae,arabicForm:null,ascent:ae,attributeName:null,attributeType:null,azimuth:ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ae,by:null,calcMode:null,capHeight:ae,className:Ze,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:ae,diffuseConstant:ae,direction:null,display:null,dur:null,divisor:ae,dominantBaseline:null,download:Ae,dx:null,dy:null,edgeMode:null,editable:null,elevation:ae,enableBackground:null,end:null,event:null,exponent:ae,externalResourcesRequired:null,fill:null,fillOpacity:ae,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:la,g2:la,glyphName:la,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ae,horizOriginX:ae,horizOriginY:ae,id:null,ideographic:ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ae,k:ae,k1:ae,k2:ae,k3:ae,k4:ae,kernelMatrix:Jt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ae,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ae,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:ae,overlineThickness:ae,paintOrder:null,panose1:null,path:null,pathLength:ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ze,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ae,pointsAtY:ae,pointsAtZ:ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jt,rev:Jt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jt,requiredFeatures:Jt,requiredFonts:Jt,requiredFormats:Jt,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:ae,specularExponent:ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ae,strikethroughThickness:ae,string:null,stroke:null,strokeDashArray:Jt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ae,strokeOpacity:ae,strokeWidth:null,style:null,surfaceScale:ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jt,tabIndex:ae,tableValues:null,target:null,targetX:ae,targetY:ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ae,underlineThickness:ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ae,values:null,vAlphabetic:ae,vMathematical:ae,vectorEffect:null,vHanging:ae,vIdeographic:ae,version:null,vertAdvY:ae,vertOriginX:ae,vertOriginY:ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Rb}),Ob=pa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Nb=pa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Db}),Mb=pa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ZE={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},KE=/[A-Z]/g,Ty=/-[a-z]/g,WE=/^data[-\w.:]+$/i;function Ib(e,t){const i=od(t);let a=t,o=$t;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&WE.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Ty,ex);a="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Ty.test(s)){let c=s.replace(KE,JE);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}o=Hd}return new o(a,t)}function JE(e){return"-"+e.toLowerCase()}function ex(e){return e.charAt(1).toUpperCase()}const zb=Tb([Lb,XE,Ob,Nb,Mb],"html"),zl=Tb([Lb,QE,Ob,Nb,Mb],"svg");function Ub(e){return e.join(" ").trim()}var Kr={},Cf,Ly;function tx(){if(Ly)return Cf;Ly=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
11
- `,p="/",g="*",y="",b="comment",v="declaration";function S(L,A){if(typeof L!="string")throw new TypeError("First argument must be a string");if(!L)return[];A=A||{};var k=1,C=1;function z(ee){var te=ee.match(t);te&&(k+=te.length);var H=ee.lastIndexOf(d);C=~H?ee.length-H:C+ee.length}function U(){var ee={line:k,column:C};return function(te){return te.position=new O(ee),ie(),te}}function O(ee){this.start=ee,this.end={line:k,column:C},this.source=A.source}O.prototype.content=L;function j(ee){var te=new Error(A.source+":"+k+":"+C+": "+ee);if(te.reason=ee,te.filename=A.source,te.line=k,te.column=C,te.source=L,!A.silent)throw te}function $(ee){var te=ee.exec(L);if(te){var H=te[0];return z(H),L=L.slice(H.length),te}}function ie(){$(i)}function ne(ee){var te;for(ee=ee||[];te=W();)te!==!1&&ee.push(te);return ee}function W(){var ee=U();if(!(p!=L.charAt(0)||g!=L.charAt(1))){for(var te=2;y!=L.charAt(te)&&(g!=L.charAt(te)||p!=L.charAt(te+1));)++te;if(te+=2,y===L.charAt(te-1))return j("End of comment missing");var H=L.slice(2,te-2);return C+=2,z(H),L=L.slice(te),C+=2,ee({type:b,comment:H})}}function J(){var ee=U(),te=$(a);if(te){if(W(),!$(o))return j("property missing ':'");var H=$(s),X=ee({type:v,property:T(te[0].replace(e,y)),value:H?T(H[0].replace(e,y)):y});return $(c),X}}function fe(){var ee=[];ne(ee);for(var te;te=J();)te!==!1&&(ee.push(te),ne(ee));return ee}return ie(),fe()}function T(L){return L?L.replace(f,y):y}return Cf=S,Cf}var Ry;function nx(){if(Ry)return Kr;Ry=1;var e=Kr&&Kr.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.default=i;const t=e(tx());function i(a,o){let s=null;if(!a||typeof a!="string")return s;const c=(0,t.default)(a),f=typeof o=="function";return c.forEach(d=>{if(d.type!=="declaration")return;const{property:p,value:g}=d;f?o(p,g,d):g&&(s=s||{},s[p]=g)}),s}return Kr}var hl={},Dy;function ix(){if(Dy)return hl;Dy=1,Object.defineProperty(hl,"__esModule",{value:!0}),hl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(p){return!p||i.test(p)||e.test(p)},c=function(p,g){return g.toUpperCase()},f=function(p,g){return"".concat(g,"-")},d=function(p,g){return g===void 0&&(g={}),s(p)?p:(p=p.toLowerCase(),g.reactCompat?p=p.replace(o,f):p=p.replace(a,f),p.replace(t,c))};return hl.camelCase=d,hl}var pl,Oy;function rx(){if(Oy)return pl;Oy=1;var e=pl&&pl.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(nx()),i=ix();function a(o,s){var c={};return!o||typeof o!="string"||(0,t.default)(o,function(f,d){f&&d&&(c[(0,i.camelCase)(f,s)]=d)}),c}return a.default=a,pl=a,pl}var ax=rx();const lx=Eb(ax),Hb=Pb("end"),Pd=Pb("start");function Pb(e){return t;function t(i){const a=i&&i.position&&i.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function ox(e){const t=Pd(e),i=Hb(e);if(t&&i)return{start:t,end:i}}function El(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ny(e.position):"start"in e||"end"in e?Ny(e):"line"in e||"column"in e?cd(e):""}function cd(e){return My(e&&e.line)+":"+My(e&&e.column)}function Ny(e){return cd(e&&e.start)+"-"+cd(e&&e.end)}function My(e){return e&&typeof e=="number"?e:1}class Rt extends Error{constructor(t,i,a){super(),typeof i=="string"&&(a=i,i=void 0);let o="",s={},c=!1;if(i&&("line"in i&&"column"in i?s={place:i}:"start"in i&&"end"in i?s={place:i}:"type"in i?s={ancestors:[i],place:i.position}:s={...i}),typeof t=="string"?o=t:!s.cause&&t&&(c=!0,o=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof a=="string"){const d=a.indexOf(":");d===-1?s.ruleId=a:(s.source=a.slice(0,d),s.ruleId=a.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=El(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Rt.prototype.file="";Rt.prototype.name="";Rt.prototype.reason="";Rt.prototype.message="";Rt.prototype.stack="";Rt.prototype.column=void 0;Rt.prototype.line=void 0;Rt.prototype.ancestors=void 0;Rt.prototype.cause=void 0;Rt.prototype.fatal=void 0;Rt.prototype.place=void 0;Rt.prototype.ruleId=void 0;Rt.prototype.source=void 0;const Bd={}.hasOwnProperty,sx=new Map,ux=/[A-Z]/g,cx=new Set(["table","tbody","thead","tfoot","tr"]),fx=new Set(["td","th"]),Bb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function dx(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=_x(i,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=vx(i,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?zl:zb,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=jb(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function jb(e,t,i){if(t.type==="element")return hx(e,t,i);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return px(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return gx(e,t,i);if(t.type==="mdxjsEsm")return mx(e,t);if(t.type==="root")return yx(e,t,i);if(t.type==="text")return bx(e,t)}function hx(e,t,i){const a=e.schema;let o=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(o=zl,e.schema=o),e.ancestors.push(t);const s=Gb(e,t.tagName,!1),c=Sx(e,t);let f=Vd(e,t);return cx.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!js(d):!0})),Vb(e,c,s,t),jd(c,f),e.ancestors.pop(),e.schema=a,e.create(t,s,c,i)}function px(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}kl(e,t.position)}function mx(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);kl(e,t.position)}function gx(e,t,i){const a=e.schema;let o=a;t.name==="svg"&&a.space==="html"&&(o=zl,e.schema=o),e.ancestors.push(t);const s=t.name===null?e.Fragment:Gb(e,t.name,!0),c=Ex(e,t),f=Vd(e,t);return Vb(e,c,s,t),jd(c,f),e.ancestors.pop(),e.schema=a,e.create(t,s,c,i)}function yx(e,t,i){const a={};return jd(a,Vd(e,t)),e.create(t,e.Fragment,a,i)}function bx(e,t){return t.value}function Vb(e,t,i,a){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(t.node=a)}function jd(e,t){if(t.length>0){const i=t.length>1?t:t[0];i&&(e.children=i)}}function vx(e,t,i){return a;function a(o,s,c,f){const p=Array.isArray(c.children)?i:t;return f?p(s,c,f):p(s,c)}}function _x(e,t){return i;function i(a,o,s,c){const f=Array.isArray(s.children),d=Pd(a);return t(o,s,c,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function Sx(e,t){const i={};let a,o;for(o in t.properties)if(o!=="children"&&Bd.call(t.properties,o)){const s=xx(e,o,t.properties[o]);if(s){const[c,f]=s;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&fx.has(t.tagName)?a=f:i[c]=f}}if(a){const s=i.style||(i.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return i}function Ex(e,t){const i={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const s=a.data.estree.body[0];s.type;const c=s.expression;c.type;const f=c.properties[0];f.type,Object.assign(i,e.evaluater.evaluateExpression(f.argument))}else kl(e,t.position);else{const o=a.name;let s;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else kl(e,t.position);else s=a.value===null?!0:a.value;i[o]=s}return i}function Vd(e,t){const i=[];let a=-1;const o=e.passKeys?new Map:sx;for(;++a<t.children.length;){const s=t.children[a];let c;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const p=o.get(d)||0;c=d+"-"+p,o.set(d,p+1)}}const f=jb(e,s,c);f!==void 0&&i.push(f)}return i}function xx(e,t,i){const a=Ib(e.schema,t);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=a.commaSeparated?kb(i):Ub(i)),a.property==="style"){let o=typeof i=="object"?i:Cx(e,String(i));return e.stylePropertyNameCase==="css"&&(o=wx(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&a.space?ZE[a.property]||a.property:a.attribute,i]}}function Cx(e,t){try{return lx(t,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const a=i,o=new Rt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Bb+"#cannot-parse-style-attribute",o}}function Gb(e,t,i){let a;if(!i)a={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let s=-1,c;for(;++s<o.length;){const f=wy(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}a=c}else a=wy(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const o=a.value;return Bd.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(a);kl(e)}function kl(e,t){const i=new Rt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Bb+"#cannot-handle-mdx-estrees-without-createevaluater",i}function wx(e){const t={};let i;for(i in e)Bd.call(e,i)&&(t[Ax(i)]=e[i]);return t}function Ax(e){let t=e.replace(ux,kx);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function kx(e){return"-"+e.toLowerCase()}const wf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Tx={};function Lx(e,t){const i=Tx,a=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return $b(e,a,o)}function $b(e,t,i){if(Rx(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Iy(e.children,t,i)}return Array.isArray(e)?Iy(e,t,i):""}function Iy(e,t,i){const a=[];let o=-1;for(;++o<e.length;)a[o]=$b(e[o],t,i);return a.join("")}function Rx(e){return!!(e&&typeof e=="object")}const zy=document.createElement("i");function Gd(e){const t="&"+e+";";zy.innerHTML=t;const i=zy.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===t?!1:i}function In(e,t,i,a){const o=e.length;let s=0,c;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,i=i>0?i:0,a.length<1e4)c=Array.from(a),c.unshift(t,i),e.splice(...c);else for(i&&e.splice(t,i);s<a.length;)c=a.slice(s,s+1e4),c.unshift(t,0),e.splice(...c),s+=1e4,t+=1e4}function hn(e,t){return e.length>0?(In(e,e.length,0,t),e):t}const Uy={}.hasOwnProperty;function Dx(e){const t={};let i=-1;for(;++i<e.length;)Ox(t,e[i]);return t}function Ox(e,t){let i;for(i in t){const o=(Uy.call(e,i)?e[i]:void 0)||(e[i]={}),s=t[i];let c;if(s)for(c in s){Uy.call(o,c)||(o[c]=[]);const f=s[c];Nx(o[c],Array.isArray(f)?f:f?[f]:[])}}}function Nx(e,t){let i=-1;const a=[];for(;++i<t.length;)(t[i].add==="after"?e:a).push(t[i]);In(e,0,0,a)}function qb(e,t){const i=Number.parseInt(e,t);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function oa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Nn=zi(/[A-Za-z]/),en=zi(/[\dA-Za-z]/),Mx=zi(/[#-'*+\--9=?A-Z^-~]/);function fd(e){return e!==null&&(e<32||e===127)}const dd=zi(/\d/),Ix=zi(/[\dA-Fa-f]/),zx=zi(/[!-/:-@[-`{-~]/);function _e(e){return e!==null&&e<-2}function Gt(e){return e!==null&&(e<0||e===32)}function Be(e){return e===-2||e===-1||e===32}const Ux=zi(new RegExp("\\p{P}|\\p{S}","u")),Hx=zi(/\s/);function zi(e){return t;function t(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function ma(e){const t=[];let i=-1,a=0,o=0;for(;++i<e.length;){const s=e.charCodeAt(i);let c="";if(s===37&&en(e.charCodeAt(i+1))&&en(e.charCodeAt(i+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(i+1);s<56320&&f>56319&&f<57344?(c=String.fromCharCode(s,f),o=1):c="�"}else c=String.fromCharCode(s);c&&(t.push(e.slice(a,i),encodeURIComponent(c)),a=i+o+1,c=""),o&&(i+=o,o=0)}return t.join("")+e.slice(a)}function Ke(e,t,i,a){const o=a?a-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(d){return Be(d)?(e.enter(i),f(d)):t(d)}function f(d){return Be(d)&&s++<o?(e.consume(d),f):(e.exit(i),t(d))}}const Px={tokenize:Bx};function Bx(e){const t=e.attempt(this.parser.constructs.contentInitial,a,o);let i;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ke(e,t,"linePrefix")}function o(f){return e.enter("paragraph"),s(f)}function s(f){const d=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=d),i=d,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return _e(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),c)}}const jx={tokenize:Vx},Hy={tokenize:Gx};function Vx(e){const t=this,i=[];let a=0,o,s,c;return f;function f(C){if(a<i.length){const z=i[a];return t.containerState=z[1],e.attempt(z[0].continuation,d,p)(C)}return p(C)}function d(C){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&k();const z=t.events.length;let U=z,O;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){O=t.events[U][1].end;break}A(a);let j=z;for(;j<t.events.length;)t.events[j][1].end={...O},j++;return In(t.events,U+1,0,t.events.slice(z)),t.events.length=j,p(C)}return f(C)}function p(C){if(a===i.length){if(!o)return b(C);if(o.currentConstruct&&o.currentConstruct.concrete)return S(C);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Hy,g,y)(C)}function g(C){return o&&k(),A(a),b(C)}function y(C){return t.parser.lazy[t.now().line]=a!==i.length,c=t.now().offset,S(C)}function b(C){return t.containerState={},e.attempt(Hy,v,S)(C)}function v(C){return a++,i.push([t.currentConstruct,t.containerState]),b(C)}function S(C){if(C===null){o&&k(),A(0),e.consume(C);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),T(C)}function T(C){if(C===null){L(e.exit("chunkFlow"),!0),A(0),e.consume(C);return}return _e(C)?(e.consume(C),L(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(C),T)}function L(C,z){const U=t.sliceStream(C);if(z&&U.push(null),C.previous=s,s&&(s.next=C),s=C,o.defineSkip(C.start),o.write(U),t.parser.lazy[C.start.line]){let O=o.events.length;for(;O--;)if(o.events[O][1].start.offset<c&&(!o.events[O][1].end||o.events[O][1].end.offset>c))return;const j=t.events.length;let $=j,ie,ne;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(ie){ne=t.events[$][1].end;break}ie=!0}for(A(a),O=j;O<t.events.length;)t.events[O][1].end={...ne},O++;In(t.events,$+1,0,t.events.slice(j)),t.events.length=O}}function A(C){let z=i.length;for(;z-- >C;){const U=i[z];t.containerState=U[1],U[0].exit.call(t,e)}i.length=C}function k(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Gx(e,t,i){return Ke(e,e.attempt(this.parser.constructs.document,t,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Py(e){if(e===null||Gt(e)||Hx(e))return 1;if(Ux(e))return 2}function $d(e,t,i){const a=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!a.includes(s)&&(t=s(t,i),a.push(s))}return t}const hd={name:"attention",resolveAll:$x,tokenize:qx};function $x(e,t){let i=-1,a,o,s,c,f,d,p,g;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(a=i;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[a][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;d=e[a][1].end.offset-e[a][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const y={...e[a][1].end},b={...e[i][1].start};By(y,-d),By(b,d),c={type:d>1?"strongSequence":"emphasisSequence",start:y,end:{...e[a][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:b},s={type:d>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[i][1].start}},o={type:d>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[i][1].start={...f.end},p=[],e[a][1].end.offset-e[a][1].start.offset&&(p=hn(p,[["enter",e[a][1],t],["exit",e[a][1],t]])),p=hn(p,[["enter",o,t],["enter",c,t],["exit",c,t],["enter",s,t]]),p=hn(p,$d(t.parser.constructs.insideSpan.null,e.slice(a+1,i),t)),p=hn(p,[["exit",s,t],["enter",f,t],["exit",f,t],["exit",o,t]]),e[i][1].end.offset-e[i][1].start.offset?(g=2,p=hn(p,[["enter",e[i][1],t],["exit",e[i][1],t]])):g=0,In(e,a-1,i-a+3,p),i=a+p.length-g-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function qx(e,t){const i=this.parser.constructs.attentionMarkers.null,a=this.previous,o=Py(a);let s;return c;function c(d){return s=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===s)return e.consume(d),f;const p=e.exit("attentionSequence"),g=Py(d),y=!g||g===2&&o||i.includes(d),b=!o||o===2&&g||i.includes(a);return p._open=!!(s===42?y:y&&(o||!b)),p._close=!!(s===42?b:b&&(g||!y)),t(d)}}function By(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Fx={name:"autolink",tokenize:Yx};function Yx(e,t,i){let a=0;return o;function o(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(v){return Nn(v)?(e.consume(v),c):v===64?i(v):p(v)}function c(v){return v===43||v===45||v===46||en(v)?(a=1,f(v)):p(v)}function f(v){return v===58?(e.consume(v),a=0,d):(v===43||v===45||v===46||en(v))&&a++<32?(e.consume(v),f):(a=0,p(v))}function d(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||fd(v)?i(v):(e.consume(v),d)}function p(v){return v===64?(e.consume(v),g):Mx(v)?(e.consume(v),p):i(v)}function g(v){return en(v)?y(v):i(v)}function y(v){return v===46?(e.consume(v),a=0,g):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):b(v)}function b(v){if((v===45||en(v))&&a++<63){const S=v===45?b:y;return e.consume(v),S}return i(v)}}const Vs={partial:!0,tokenize:Xx};function Xx(e,t,i){return a;function a(s){return Be(s)?Ke(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||_e(s)?t(s):i(s)}}const Fb={continuation:{tokenize:Zx},exit:Kx,name:"blockQuote",tokenize:Qx};function Qx(e,t,i){const a=this;return o;function o(c){if(c===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),s}return i(c)}function s(c){return Be(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function Zx(e,t,i){const a=this;return o;function o(c){return Be(c)?Ke(e,s,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt(Fb,t,i)(c)}}function Kx(e){e.exit("blockQuote")}const Yb={name:"characterEscape",tokenize:Wx};function Wx(e,t,i){return a;function a(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return zx(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):i(s)}}const Xb={name:"characterReference",tokenize:Jx};function Jx(e,t,i){const a=this;let o=0,s,c;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),d}function d(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),s=31,c=en,g(y))}function p(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,c=Ix,g):(e.enter("characterReferenceValue"),s=7,c=dd,g(y))}function g(y){if(y===59&&o){const b=e.exit("characterReferenceValue");return c===en&&!Gd(a.sliceSerialize(b))?i(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(y)&&o++<s?(e.consume(y),g):i(y)}}const jy={partial:!0,tokenize:tC},Vy={concrete:!0,name:"codeFenced",tokenize:eC};function eC(e,t,i){const a=this,o={partial:!0,tokenize:U};let s=0,c=0,f;return d;function d(O){return p(O)}function p(O){const j=a.events[a.events.length-1];return s=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,f=O,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(O)}function g(O){return O===f?(c++,e.consume(O),g):c<3?i(O):(e.exit("codeFencedFenceSequence"),Be(O)?Ke(e,y,"whitespace")(O):y(O))}function y(O){return O===null||_e(O)?(e.exit("codeFencedFence"),a.interrupt?t(O):e.check(jy,T,z)(O)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(O))}function b(O){return O===null||_e(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(O)):Be(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,v,"whitespace")(O)):O===96&&O===f?i(O):(e.consume(O),b)}function v(O){return O===null||_e(O)?y(O):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(O))}function S(O){return O===null||_e(O)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(O)):O===96&&O===f?i(O):(e.consume(O),S)}function T(O){return e.attempt(o,z,L)(O)}function L(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),A}function A(O){return s>0&&Be(O)?Ke(e,k,"linePrefix",s+1)(O):k(O)}function k(O){return O===null||_e(O)?e.check(jy,T,z)(O):(e.enter("codeFlowValue"),C(O))}function C(O){return O===null||_e(O)?(e.exit("codeFlowValue"),k(O)):(e.consume(O),C)}function z(O){return e.exit("codeFenced"),t(O)}function U(O,j,$){let ie=0;return ne;function ne(te){return O.enter("lineEnding"),O.consume(te),O.exit("lineEnding"),W}function W(te){return O.enter("codeFencedFence"),Be(te)?Ke(O,J,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):J(te)}function J(te){return te===f?(O.enter("codeFencedFenceSequence"),fe(te)):$(te)}function fe(te){return te===f?(ie++,O.consume(te),fe):ie>=c?(O.exit("codeFencedFenceSequence"),Be(te)?Ke(O,ee,"whitespace")(te):ee(te)):$(te)}function ee(te){return te===null||_e(te)?(O.exit("codeFencedFence"),j(te)):$(te)}}}function tC(e,t,i){const a=this;return o;function o(c){return c===null?i(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s)}function s(c){return a.parser.lazy[a.now().line]?i(c):t(c)}}const Af={name:"codeIndented",tokenize:iC},nC={partial:!0,tokenize:rC};function iC(e,t,i){const a=this;return o;function o(p){return e.enter("codeIndented"),Ke(e,s,"linePrefix",5)(p)}function s(p){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(p):i(p)}function c(p){return p===null?d(p):_e(p)?e.attempt(nC,c,d)(p):(e.enter("codeFlowValue"),f(p))}function f(p){return p===null||_e(p)?(e.exit("codeFlowValue"),c(p)):(e.consume(p),f)}function d(p){return e.exit("codeIndented"),t(p)}}function rC(e,t,i){const a=this;return o;function o(c){return a.parser.lazy[a.now().line]?i(c):_e(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):Ke(e,s,"linePrefix",5)(c)}function s(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):_e(c)?o(c):i(c)}}const aC={name:"codeText",previous:oC,resolve:lC,tokenize:sC};function lC(e){let t=e.length-4,i=3,a,o;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=i;++a<t;)if(e[a][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[t][1].type="codeTextPadding",i+=2,t-=2;break}}for(a=i-1,t++;++a<=t;)o===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(o=a):(a===t||e[a][1].type==="lineEnding")&&(e[o][1].type="codeTextData",a!==o+2&&(e[o][1].end=e[a-1][1].end,e.splice(o+2,a-o-2),t-=a-o-2,a=o+2),o=void 0);return e}function oC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sC(e,t,i){let a=0,o,s;return c;function c(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),a++,f):(e.exit("codeTextSequence"),d(y))}function d(y){return y===null?i(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),d):y===96?(s=e.enter("codeTextSequence"),o=0,g(y)):_e(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),d):(e.enter("codeTextData"),p(y))}function p(y){return y===null||y===32||y===96||_e(y)?(e.exit("codeTextData"),d(y)):(e.consume(y),p)}function g(y){return y===96?(e.consume(y),o++,g):o===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(y)):(s.type="codeTextData",p(y))}}class uC{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,i){const a=i??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,i,a){const o=i||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return a&&ml(this.left,a),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ml(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ml(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const i=this.left.splice(t,Number.POSITIVE_INFINITY);ml(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ml(this.left,i.reverse())}}}function ml(e,t){let i=0;if(t.length<1e4)e.push(...t);else for(;i<t.length;)e.push(...t.slice(i,i+1e4)),i+=1e4}function Qb(e){const t={};let i=-1,a,o,s,c,f,d,p;const g=new uC(e);for(;++i<g.length;){for(;i in t;)i=t[i];if(a=g.get(i),i&&a[1].type==="chunkFlow"&&g.get(i-1)[1].type==="listItemPrefix"&&(d=a[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,cC(g,i)),i=t[i],p=!0);else if(a[1]._container){for(s=i,o=void 0;s--;)if(c=g.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(g.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(a[1].end={...g.get(o)[1].start},f=g.slice(o,i),f.unshift(a),g.splice(o,i-o+1,f))}}return In(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!p}function cC(e,t){const i=e.get(t)[1],a=e.get(t)[2];let o=t-1;const s=[];let c=i._tokenizer;c||(c=a.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,d=[],p={};let g,y,b=-1,v=i,S=0,T=0;const L=[T];for(;v;){for(;e.get(++o)[1]!==v;);s.push(o),v._tokenizer||(g=a.sliceStream(v),v.next||g.push(null),y&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=v,v=v.next}for(v=i;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(T=b+1,L.push(T),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):L.pop(),b=L.length;b--;){const A=f.slice(L[b],L[b+1]),k=s.pop();d.push([k,k+A.length-1]),e.splice(k,2,A)}for(d.reverse(),b=-1;++b<d.length;)p[S+d[b][0]]=S+d[b][1],S+=d[b][1]-d[b][0]-1;return p}const fC={resolve:hC,tokenize:pC},dC={partial:!0,tokenize:mC};function hC(e){return Qb(e),e}function pC(e,t){let i;return a;function a(f){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?s(f):_e(f)?e.check(dC,c,s)(f):(e.consume(f),o)}function s(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function mC(e,t,i){const a=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ke(e,s,"linePrefix")}function s(c){if(c===null||_e(c))return i(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,i,t)(c)}}function Zb(e,t,i,a,o,s,c,f,d){const p=d||Number.POSITIVE_INFINITY;let g=0;return y;function y(A){return A===60?(e.enter(a),e.enter(o),e.enter(s),e.consume(A),e.exit(s),b):A===null||A===32||A===41||fd(A)?i(A):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),T(A))}function b(A){return A===62?(e.enter(s),e.consume(A),e.exit(s),e.exit(o),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(A))}function v(A){return A===62?(e.exit("chunkString"),e.exit(f),b(A)):A===null||A===60||_e(A)?i(A):(e.consume(A),A===92?S:v)}function S(A){return A===60||A===62||A===92?(e.consume(A),v):v(A)}function T(A){return!g&&(A===null||A===41||Gt(A))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(A)):g<p&&A===40?(e.consume(A),g++,T):A===41?(e.consume(A),g--,T):A===null||A===32||A===40||fd(A)?i(A):(e.consume(A),A===92?L:T)}function L(A){return A===40||A===41||A===92?(e.consume(A),T):T(A)}}function Kb(e,t,i,a,o,s){const c=this;let f=0,d;return p;function p(v){return e.enter(a),e.enter(o),e.consume(v),e.exit(o),e.enter(s),g}function g(v){return f>999||v===null||v===91||v===93&&!d||v===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(v):v===93?(e.exit(s),e.enter(o),e.consume(v),e.exit(o),e.exit(a),t):_e(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===null||v===91||v===93||_e(v)||f++>999?(e.exit("chunkString"),g(v)):(e.consume(v),d||(d=!Be(v)),v===92?b:y)}function b(v){return v===91||v===92||v===93?(e.consume(v),f++,y):y(v)}}function Wb(e,t,i,a,o,s){let c;return f;function f(b){return b===34||b===39||b===40?(e.enter(a),e.enter(o),e.consume(b),e.exit(o),c=b===40?41:b,d):i(b)}function d(b){return b===c?(e.enter(o),e.consume(b),e.exit(o),e.exit(a),t):(e.enter(s),p(b))}function p(b){return b===c?(e.exit(s),d(c)):b===null?i(b):_e(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Ke(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===c||b===null||_e(b)?(e.exit("chunkString"),p(b)):(e.consume(b),b===92?y:g)}function y(b){return b===c||b===92?(e.consume(b),g):g(b)}}function xl(e,t){let i;return a;function a(o){return _e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,a):Be(o)?Ke(e,a,i?"linePrefix":"lineSuffix")(o):t(o)}}const gC={name:"definition",tokenize:bC},yC={partial:!0,tokenize:vC};function bC(e,t,i){const a=this;let o;return s;function s(v){return e.enter("definition"),c(v)}function c(v){return Kb.call(a,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return o=oa(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),d):i(v)}function d(v){return Gt(v)?xl(e,p)(v):p(v)}function p(v){return Zb(e,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return e.attempt(yC,y,y)(v)}function y(v){return Be(v)?Ke(e,b,"whitespace")(v):b(v)}function b(v){return v===null||_e(v)?(e.exit("definition"),a.parser.defined.push(o),t(v)):i(v)}}function vC(e,t,i){return a;function a(f){return Gt(f)?xl(e,o)(f):i(f)}function o(f){return Wb(e,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return Be(f)?Ke(e,c,"whitespace")(f):c(f)}function c(f){return f===null||_e(f)?t(f):i(f)}}const _C={name:"hardBreakEscape",tokenize:SC};function SC(e,t,i){return a;function a(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return _e(s)?(e.exit("hardBreakEscape"),t(s)):i(s)}}const EC={name:"headingAtx",resolve:xC,tokenize:CC};function xC(e,t){let i=e.length-2,a=3,o,s;return e[a][1].type==="whitespace"&&(a+=2),i-2>a&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(a===i-1||i-4>a&&e[i-2][1].type==="whitespace")&&(i-=a+1===i?2:4),i>a&&(o={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},s={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},In(e,a,i-a+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function CC(e,t,i){let a=0;return o;function o(g){return e.enter("atxHeading"),s(g)}function s(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(e.consume(g),c):g===null||Gt(g)?(e.exit("atxHeadingSequence"),f(g)):i(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),d(g)):g===null||_e(g)?(e.exit("atxHeading"),t(g)):Be(g)?Ke(e,f,"whitespace")(g):(e.enter("atxHeadingText"),p(g))}function d(g){return g===35?(e.consume(g),d):(e.exit("atxHeadingSequence"),f(g))}function p(g){return g===null||g===35||Gt(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),p)}}const wC=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Gy=["pre","script","style","textarea"],AC={concrete:!0,name:"htmlFlow",resolveTo:LC,tokenize:RC},kC={partial:!0,tokenize:OC},TC={partial:!0,tokenize:DC};function LC(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function RC(e,t,i){const a=this;let o,s,c,f,d;return p;function p(w){return g(w)}function g(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),y}function y(w){return w===33?(e.consume(w),b):w===47?(e.consume(w),s=!0,T):w===63?(e.consume(w),o=3,a.interrupt?t:R):Nn(w)?(e.consume(w),c=String.fromCharCode(w),L):i(w)}function b(w){return w===45?(e.consume(w),o=2,v):w===91?(e.consume(w),o=5,f=0,S):Nn(w)?(e.consume(w),o=4,a.interrupt?t:R):i(w)}function v(w){return w===45?(e.consume(w),a.interrupt?t:R):i(w)}function S(w){const le="CDATA[";return w===le.charCodeAt(f++)?(e.consume(w),f===le.length?a.interrupt?t:J:S):i(w)}function T(w){return Nn(w)?(e.consume(w),c=String.fromCharCode(w),L):i(w)}function L(w){if(w===null||w===47||w===62||Gt(w)){const le=w===47,he=c.toLowerCase();return!le&&!s&&Gy.includes(he)?(o=1,a.interrupt?t(w):J(w)):wC.includes(c.toLowerCase())?(o=6,le?(e.consume(w),A):a.interrupt?t(w):J(w)):(o=7,a.interrupt&&!a.parser.lazy[a.now().line]?i(w):s?k(w):C(w))}return w===45||en(w)?(e.consume(w),c+=String.fromCharCode(w),L):i(w)}function A(w){return w===62?(e.consume(w),a.interrupt?t:J):i(w)}function k(w){return Be(w)?(e.consume(w),k):ne(w)}function C(w){return w===47?(e.consume(w),ne):w===58||w===95||Nn(w)?(e.consume(w),z):Be(w)?(e.consume(w),C):ne(w)}function z(w){return w===45||w===46||w===58||w===95||en(w)?(e.consume(w),z):U(w)}function U(w){return w===61?(e.consume(w),O):Be(w)?(e.consume(w),U):C(w)}function O(w){return w===null||w===60||w===61||w===62||w===96?i(w):w===34||w===39?(e.consume(w),d=w,j):Be(w)?(e.consume(w),O):$(w)}function j(w){return w===d?(e.consume(w),d=null,ie):w===null||_e(w)?i(w):(e.consume(w),j)}function $(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||Gt(w)?U(w):(e.consume(w),$)}function ie(w){return w===47||w===62||Be(w)?C(w):i(w)}function ne(w){return w===62?(e.consume(w),W):i(w)}function W(w){return w===null||_e(w)?J(w):Be(w)?(e.consume(w),W):i(w)}function J(w){return w===45&&o===2?(e.consume(w),H):w===60&&o===1?(e.consume(w),X):w===62&&o===4?(e.consume(w),N):w===63&&o===3?(e.consume(w),R):w===93&&o===5?(e.consume(w),me):_e(w)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(kC,F,fe)(w)):w===null||_e(w)?(e.exit("htmlFlowData"),fe(w)):(e.consume(w),J)}function fe(w){return e.check(TC,ee,F)(w)}function ee(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),te}function te(w){return w===null||_e(w)?fe(w):(e.enter("htmlFlowData"),J(w))}function H(w){return w===45?(e.consume(w),R):J(w)}function X(w){return w===47?(e.consume(w),c="",oe):J(w)}function oe(w){if(w===62){const le=c.toLowerCase();return Gy.includes(le)?(e.consume(w),N):J(w)}return Nn(w)&&c.length<8?(e.consume(w),c+=String.fromCharCode(w),oe):J(w)}function me(w){return w===93?(e.consume(w),R):J(w)}function R(w){return w===62?(e.consume(w),N):w===45&&o===2?(e.consume(w),R):J(w)}function N(w){return w===null||_e(w)?(e.exit("htmlFlowData"),F(w)):(e.consume(w),N)}function F(w){return e.exit("htmlFlow"),t(w)}}function DC(e,t,i){const a=this;return o;function o(c){return _e(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):i(c)}function s(c){return a.parser.lazy[a.now().line]?i(c):t(c)}}function OC(e,t,i){return a;function a(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Vs,t,i)}}const NC={name:"htmlText",tokenize:MC};function MC(e,t,i){const a=this;let o,s,c;return f;function f(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),d}function d(R){return R===33?(e.consume(R),p):R===47?(e.consume(R),U):R===63?(e.consume(R),C):Nn(R)?(e.consume(R),$):i(R)}function p(R){return R===45?(e.consume(R),g):R===91?(e.consume(R),s=0,S):Nn(R)?(e.consume(R),k):i(R)}function g(R){return R===45?(e.consume(R),v):i(R)}function y(R){return R===null?i(R):R===45?(e.consume(R),b):_e(R)?(c=y,X(R)):(e.consume(R),y)}function b(R){return R===45?(e.consume(R),v):y(R)}function v(R){return R===62?H(R):R===45?b(R):y(R)}function S(R){const N="CDATA[";return R===N.charCodeAt(s++)?(e.consume(R),s===N.length?T:S):i(R)}function T(R){return R===null?i(R):R===93?(e.consume(R),L):_e(R)?(c=T,X(R)):(e.consume(R),T)}function L(R){return R===93?(e.consume(R),A):T(R)}function A(R){return R===62?H(R):R===93?(e.consume(R),A):T(R)}function k(R){return R===null||R===62?H(R):_e(R)?(c=k,X(R)):(e.consume(R),k)}function C(R){return R===null?i(R):R===63?(e.consume(R),z):_e(R)?(c=C,X(R)):(e.consume(R),C)}function z(R){return R===62?H(R):C(R)}function U(R){return Nn(R)?(e.consume(R),O):i(R)}function O(R){return R===45||en(R)?(e.consume(R),O):j(R)}function j(R){return _e(R)?(c=j,X(R)):Be(R)?(e.consume(R),j):H(R)}function $(R){return R===45||en(R)?(e.consume(R),$):R===47||R===62||Gt(R)?ie(R):i(R)}function ie(R){return R===47?(e.consume(R),H):R===58||R===95||Nn(R)?(e.consume(R),ne):_e(R)?(c=ie,X(R)):Be(R)?(e.consume(R),ie):H(R)}function ne(R){return R===45||R===46||R===58||R===95||en(R)?(e.consume(R),ne):W(R)}function W(R){return R===61?(e.consume(R),J):_e(R)?(c=W,X(R)):Be(R)?(e.consume(R),W):ie(R)}function J(R){return R===null||R===60||R===61||R===62||R===96?i(R):R===34||R===39?(e.consume(R),o=R,fe):_e(R)?(c=J,X(R)):Be(R)?(e.consume(R),J):(e.consume(R),ee)}function fe(R){return R===o?(e.consume(R),o=void 0,te):R===null?i(R):_e(R)?(c=fe,X(R)):(e.consume(R),fe)}function ee(R){return R===null||R===34||R===39||R===60||R===61||R===96?i(R):R===47||R===62||Gt(R)?ie(R):(e.consume(R),ee)}function te(R){return R===47||R===62||Gt(R)?ie(R):i(R)}function H(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):i(R)}function X(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),oe}function oe(R){return Be(R)?Ke(e,me,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):me(R)}function me(R){return e.enter("htmlTextData"),c(R)}}const qd={name:"labelEnd",resolveAll:HC,resolveTo:PC,tokenize:BC},IC={tokenize:jC},zC={tokenize:VC},UC={tokenize:GC};function HC(e){let t=-1;const i=[];for(;++t<e.length;){const a=e[t][1];if(i.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const o=a.type==="labelImage"?4:2;a.type="data",t+=o}}return e.length!==i.length&&In(e,0,e.length,i),e}function PC(e,t){let i=e.length,a=0,o,s,c,f;for(;i--;)if(o=e[i][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[i][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[i][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=i,o.type!=="labelLink")){a=2;break}}else o.type==="labelEnd"&&(c=i);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[s][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[s+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",d,t],["enter",p,t]],f=hn(f,e.slice(s+1,s+a+3)),f=hn(f,[["enter",g,t]]),f=hn(f,$d(t.parser.constructs.insideSpan.null,e.slice(s+a+4,c-3),t)),f=hn(f,[["exit",g,t],e[c-2],e[c-1],["exit",p,t]]),f=hn(f,e.slice(c+1)),f=hn(f,[["exit",d,t]]),In(e,s,e.length,f),e}function BC(e,t,i){const a=this;let o=a.events.length,s,c;for(;o--;)if((a.events[o][1].type==="labelImage"||a.events[o][1].type==="labelLink")&&!a.events[o][1]._balanced){s=a.events[o][1];break}return f;function f(b){return s?s._inactive?y(b):(c=a.parser.defined.includes(oa(a.sliceSerialize({start:s.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):i(b)}function d(b){return b===40?e.attempt(IC,g,c?g:y)(b):b===91?e.attempt(zC,g,c?p:y)(b):c?g(b):y(b)}function p(b){return e.attempt(UC,g,y)(b)}function g(b){return t(b)}function y(b){return s._balanced=!0,i(b)}}function jC(e,t,i){return a;function a(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),o}function o(y){return Gt(y)?xl(e,s)(y):s(y)}function s(y){return y===41?g(y):Zb(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Gt(y)?xl(e,d)(y):g(y)}function f(y){return i(y)}function d(y){return y===34||y===39||y===40?Wb(e,p,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function p(y){return Gt(y)?xl(e,g)(y):g(y)}function g(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),t):i(y)}}function VC(e,t,i){const a=this;return o;function o(f){return Kb.call(a,e,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return a.parser.defined.includes(oa(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):i(f)}function c(f){return i(f)}}function GC(e,t,i){return a;function a(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):i(s)}}const $C={name:"labelStartImage",resolveAll:qd.resolveAll,tokenize:qC};function qC(e,t,i){const a=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):i(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(f):t(f)}}const FC={name:"labelStartLink",resolveAll:qd.resolveAll,tokenize:YC};function YC(e,t,i){const a=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(c):t(c)}}const kf={name:"lineEnding",tokenize:XC};function XC(e,t){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ke(e,t,"linePrefix")}}const _s={name:"thematicBreak",tokenize:QC};function QC(e,t,i){let a=0,o;return s;function s(p){return e.enter("thematicBreak"),c(p)}function c(p){return o=p,f(p)}function f(p){return p===o?(e.enter("thematicBreakSequence"),d(p)):a>=3&&(p===null||_e(p))?(e.exit("thematicBreak"),t(p)):i(p)}function d(p){return p===o?(e.consume(p),a++,d):(e.exit("thematicBreakSequence"),Be(p)?Ke(e,f,"whitespace")(p):f(p))}}const Vt={continuation:{tokenize:JC},exit:tw,name:"list",tokenize:WC},ZC={partial:!0,tokenize:nw},KC={partial:!0,tokenize:ew};function WC(e,t,i){const a=this,o=a.events[a.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return f;function f(v){const S=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:dd(v)){if(a.containerState.type||(a.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(_s,i,p)(v):p(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(v)}return i(v)}function d(v){return dd(v)&&++c<10?(e.consume(v),d):(!a.interrupt||c<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),p(v)):i(v)}function p(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(Vs,a.interrupt?i:g,e.attempt(ZC,b,y))}function g(v){return a.containerState.initialBlankLine=!0,s++,b(v)}function y(v){return Be(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),b):i(v)}function b(v){return a.containerState.size=s+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function JC(e,t,i){const a=this;return a.containerState._closeFlow=void 0,e.check(Vs,o,s);function o(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Ke(e,t,"listItemIndent",a.containerState.size+1)(f)}function s(f){return a.containerState.furtherBlankLines||!Be(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(KC,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,Ke(e,e.attempt(Vt,t,i),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function ew(e,t,i){const a=this;return Ke(e,o,"listItemIndent",a.containerState.size+1);function o(s){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(s):i(s)}}function tw(e){e.exit(this.containerState.type)}function nw(e,t,i){const a=this;return Ke(e,o,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const c=a.events[a.events.length-1];return!Be(s)&&c&&c[1].type==="listItemPrefixWhitespace"?t(s):i(s)}}const $y={name:"setextUnderline",resolveTo:iw,tokenize:rw};function iw(e,t){let i=e.length,a,o,s;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){a=i;break}e[i][1].type==="paragraph"&&(o=i)}else e[i][1].type==="content"&&e.splice(i,1),!s&&e[i][1].type==="definition"&&(s=i);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",c,t]),e.splice(s+1,0,["exit",e[a][1],t]),e[a][1].end={...e[s][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function rw(e,t,i){const a=this;let o;return s;function s(p){let g=a.events.length,y;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){y=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||y)?(e.enter("setextHeadingLine"),o=p,c(p)):i(p)}function c(p){return e.enter("setextHeadingLineSequence"),f(p)}function f(p){return p===o?(e.consume(p),f):(e.exit("setextHeadingLineSequence"),Be(p)?Ke(e,d,"lineSuffix")(p):d(p))}function d(p){return p===null||_e(p)?(e.exit("setextHeadingLine"),t(p)):i(p)}}const aw={tokenize:lw};function lw(e){const t=this,i=e.attempt(Vs,a,e.attempt(this.parser.constructs.flowInitial,o,Ke(e,e.attempt(this.parser.constructs.flow,o,e.attempt(fC,o)),"linePrefix")));return i;function a(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,i}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,i}}const ow={resolveAll:ev()},sw=Jb("string"),uw=Jb("text");function Jb(e){return{resolveAll:ev(e==="text"?cw:void 0),tokenize:t};function t(i){const a=this,o=this.parser.constructs[e],s=i.attempt(o,c,f);return c;function c(g){return p(g)?s(g):f(g)}function f(g){if(g===null){i.consume(g);return}return i.enter("data"),i.consume(g),d}function d(g){return p(g)?(i.exit("data"),s(g)):(i.consume(g),d)}function p(g){if(g===null)return!0;const y=o[g];let b=-1;if(y)for(;++b<y.length;){const v=y[b];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function ev(e){return t;function t(i,a){let o=-1,s;for(;++o<=i.length;)s===void 0?i[o]&&i[o][1].type==="data"&&(s=o,o++):(!i[o]||i[o][1].type!=="data")&&(o!==s+2&&(i[s][1].end=i[o-1][1].end,i.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(i,a):i}}function cw(e,t){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const a=e[i-1][1],o=t.sliceStream(a);let s=o.length,c=-1,f=0,d;for(;s--;){const p=o[s];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(p===-2)d=!0,f++;else if(p!==-1){s++;break}}if(t._contentTypeTextTrailing&&i===e.length&&(f=0),f){const p={type:i===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:a.start._bufferIndex+c,_index:a.start._index+s,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...p.start},a.start.offset===a.end.offset?Object.assign(a,p):(e.splice(i,0,["enter",p,t],["exit",p,t]),i+=2)}i++}return e}const fw={42:Vt,43:Vt,45:Vt,48:Vt,49:Vt,50:Vt,51:Vt,52:Vt,53:Vt,54:Vt,55:Vt,56:Vt,57:Vt,62:Fb},dw={91:gC},hw={[-2]:Af,[-1]:Af,32:Af},pw={35:EC,42:_s,45:[$y,_s],60:AC,61:$y,95:_s,96:Vy,126:Vy},mw={38:Xb,92:Yb},gw={[-5]:kf,[-4]:kf,[-3]:kf,33:$C,38:Xb,42:hd,60:[Fx,NC],91:FC,92:[_C,Yb],93:qd,95:hd,96:aC},yw={null:[hd,ow]},bw={null:[42,95]},vw={null:[]},_w=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:bw,contentInitial:dw,disable:vw,document:fw,flow:pw,flowInitial:hw,insideSpan:yw,string:mw,text:gw},Symbol.toStringTag,{value:"Module"}));function Sw(e,t,i){let a={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const o={},s=[];let c=[],f=[];const d={attempt:j(U),check:j(O),consume:k,enter:C,exit:z,interrupt:j(O,{interrupt:!0})},p={code:null,containerState:{},defineSkip:T,events:[],now:S,parser:e,previous:null,sliceSerialize:b,sliceStream:v,write:y};let g=t.tokenize.call(p,d);return t.resolveAll&&s.push(t),p;function y(W){return c=hn(c,W),L(),c[c.length-1]!==null?[]:($(t,0),p.events=$d(s,p.events,p),p.events)}function b(W,J){return xw(v(W),J)}function v(W){return Ew(c,W)}function S(){const{_bufferIndex:W,_index:J,line:fe,column:ee,offset:te}=a;return{_bufferIndex:W,_index:J,line:fe,column:ee,offset:te}}function T(W){o[W.line]=W.column,ne()}function L(){let W;for(;a._index<c.length;){const J=c[a._index];if(typeof J=="string")for(W=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===W&&a._bufferIndex<J.length;)A(J.charCodeAt(a._bufferIndex));else A(J)}}function A(W){g=g(W)}function k(W){_e(W)?(a.line++,a.column=1,a.offset+=W===-3?2:1,ne()):W!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),p.previous=W}function C(W,J){const fe=J||{};return fe.type=W,fe.start=S(),p.events.push(["enter",fe,p]),f.push(fe),fe}function z(W){const J=f.pop();return J.end=S(),p.events.push(["exit",J,p]),J}function U(W,J){$(W,J.from)}function O(W,J){J.restore()}function j(W,J){return fe;function fe(ee,te,H){let X,oe,me,R;return Array.isArray(ee)?F(ee):"tokenize"in ee?F([ee]):N(ee);function N(ce){return ye;function ye(ke){const Te=ke!==null&&ce[ke],Qe=ke!==null&&ce.null,re=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(Qe)?Qe:Qe?[Qe]:[]];return F(re)(ke)}}function F(ce){return X=ce,oe=0,ce.length===0?H:w(ce[oe])}function w(ce){return ye;function ye(ke){return R=ie(),me=ce,ce.partial||(p.currentConstruct=ce),ce.name&&p.parser.constructs.disable.null.includes(ce.name)?he():ce.tokenize.call(J?Object.assign(Object.create(p),J):p,d,le,he)(ke)}}function le(ce){return W(me,R),te}function he(ce){return R.restore(),++oe<X.length?w(X[oe]):H}}}function $(W,J){W.resolveAll&&!s.includes(W)&&s.push(W),W.resolve&&In(p.events,J,p.events.length-J,W.resolve(p.events.slice(J),p)),W.resolveTo&&(p.events=W.resolveTo(p.events,p))}function ie(){const W=S(),J=p.previous,fe=p.currentConstruct,ee=p.events.length,te=Array.from(f);return{from:ee,restore:H};function H(){a=W,p.previous=J,p.currentConstruct=fe,p.events.length=ee,f=te,ne()}}function ne(){a.line in o&&a.column<2&&(a.column=o[a.line],a.offset+=o[a.line]-1)}}function Ew(e,t){const i=t.start._index,a=t.start._bufferIndex,o=t.end._index,s=t.end._bufferIndex;let c;if(i===o)c=[e[i].slice(a,s)];else{if(c=e.slice(i,o),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}s>0&&c.push(e[o].slice(0,s))}return c}function xw(e,t){let i=-1;const a=[];let o;for(;++i<e.length;){const s=e[i];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
9
+ `+u.stack}}var hr=Object.prototype.hasOwnProperty,pr=e.unstable_scheduleCallback,Ea=e.unstable_cancelCallback,eu=e.unstable_shouldYield,tu=e.unstable_requestPaint,Nt=e.unstable_now,nu=e.unstable_getCurrentPriorityLevel,Q=e.unstable_ImmediatePriority,se=e.unstable_UserBlockingPriority,ve=e.unstable_NormalPriority,Re=e.unstable_LowPriority,Be=e.unstable_IdlePriority,Xt=e.log,jn=e.unstable_setDisableYieldValue,Ot=null,ht=null;function zt(n){if(typeof Xt=="function"&&jn(n),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Ot,n)}catch{}}var Ye=Math.clz32?Math.clz32:R1,fi=Math.log,_n=Math.LN2;function R1(n){return n>>>=0,n===0?32:31-(fi(n)/_n|0)|0}var Vl=256,Gl=262144,$l=4194304;function ji(n){var r=n&42;if(r!==0)return r;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function ql(n,r,l){var u=n.pendingLanes;if(u===0)return 0;var h=0,m=n.suspendedLanes,_=n.pingedLanes;n=n.warmLanes;var E=u&134217727;return E!==0?(u=E&~m,u!==0?h=ji(u):(_&=E,_!==0?h=ji(_):l||(l=E&~n,l!==0&&(h=ji(l))))):(E=u&~m,E!==0?h=ji(E):_!==0?h=ji(_):l||(l=u&~n,l!==0&&(h=ji(l)))),h===0?0:r!==0&&r!==h&&(r&m)===0&&(m=h&-h,l=r&-r,m>=l||m===32&&(l&4194048)!==0)?r:h}function xa(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function D1(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gh(){var n=$l;return $l<<=1,($l&62914560)===0&&($l=4194304),n}function iu(n){for(var r=[],l=0;31>l;l++)r.push(n);return r}function Ca(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function N1(n,r,l,u,h,m){var _=n.pendingLanes;n.pendingLanes=l,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=l,n.entangledLanes&=l,n.errorRecoveryDisabledLanes&=l,n.shellSuspendCounter=0;var E=n.entanglements,N=n.expirationTimes,B=n.hiddenUpdates;for(l=_&~l;0<l;){var Y=31-Ye(l),K=1<<Y;E[Y]=0,N[Y]=-1;var V=B[Y];if(V!==null)for(B[Y]=null,Y=0;Y<V.length;Y++){var q=V[Y];q!==null&&(q.lane&=-536870913)}l&=~K}u!==0&&yh(n,u,0),m!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=m&~(_&~r))}function yh(n,r,l){n.pendingLanes|=r,n.suspendedLanes&=~r;var u=31-Ye(r);n.entangledLanes|=r,n.entanglements[u]=n.entanglements[u]|1073741824|l&261930}function bh(n,r){var l=n.entangledLanes|=r;for(n=n.entanglements;l;){var u=31-Ye(l),h=1<<u;h&r|n[u]&r&&(n[u]|=r),l&=~h}}function vh(n,r){var l=r&-r;return l=(l&42)!==0?1:ru(l),(l&(n.suspendedLanes|r))!==0?0:l}function ru(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function au(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function _h(){var n=X.p;return n!==0?n:(n=window.event,n===void 0?32:ay(n.type))}function Sh(n,r){var l=X.p;try{return X.p=n,r()}finally{X.p=l}}var di=Math.random().toString(36).slice(2),xt="__reactFiber$"+di,Ut="__reactProps$"+di,mr="__reactContainer$"+di,lu="__reactEvents$"+di,O1="__reactListeners$"+di,M1="__reactHandles$"+di,Eh="__reactResources$"+di,wa="__reactMarker$"+di;function ou(n){delete n[xt],delete n[Ut],delete n[lu],delete n[O1],delete n[M1]}function gr(n){var r=n[xt];if(r)return r;for(var l=n.parentNode;l;){if(r=l[mr]||l[xt]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(n=Gg(n);n!==null;){if(l=n[xt])return l;n=Gg(n)}return r}n=l,l=n.parentNode}return null}function yr(n){if(n=n[xt]||n[mr]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function Aa(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function br(n){var r=n[Eh];return r||(r=n[Eh]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function bt(n){n[wa]=!0}var xh=new Set,Ch={};function Vi(n,r){vr(n,r),vr(n+"Capture",r)}function vr(n,r){for(Ch[n]=r,n=0;n<r.length;n++)xh.add(r[n])}var I1=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),wh={},Ah={};function z1(n){return hr.call(Ah,n)?!0:hr.call(wh,n)?!1:I1.test(n)?Ah[n]=!0:(wh[n]=!0,!1)}function Fl(n,r,l){if(z1(r))if(l===null)n.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+l)}}function Yl(n,r,l){if(l===null)n.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+l)}}function Vn(n,r,l,u){if(u===null)n.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(l);return}n.setAttributeNS(r,l,""+u)}}function an(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function kh(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function U1(n,r,l){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var h=u.get,m=u.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return h.call(this)},set:function(_){l=""+_,m.call(this,_)}}),Object.defineProperty(n,r,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(_){l=""+_},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function su(n){if(!n._valueTracker){var r=kh(n)?"checked":"value";n._valueTracker=U1(n,r,""+n[r])}}function Th(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return n&&(u=kh(n)?n.checked?"true":"false":n.value),n=u,n!==l?(r.setValue(n),!0):!1}function Xl(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var H1=/[\n"\\]/g;function ln(n){return n.replace(H1,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function uu(n,r,l,u,h,m,_,E){n.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?n.type=_:n.removeAttribute("type"),r!=null?_==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+an(r)):n.value!==""+an(r)&&(n.value=""+an(r)):_!=="submit"&&_!=="reset"||n.removeAttribute("value"),r!=null?cu(n,_,an(r)):l!=null?cu(n,_,an(l)):u!=null&&n.removeAttribute("value"),h==null&&m!=null&&(n.defaultChecked=!!m),h!=null&&(n.checked=h&&typeof h!="function"&&typeof h!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?n.name=""+an(E):n.removeAttribute("name")}function Lh(n,r,l,u,h,m,_,E){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(n.type=m),r!=null||l!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){su(n);return}l=l!=null?""+an(l):"",r=r!=null?""+an(r):l,E||r===n.value||(n.value=r),n.defaultValue=r}u=u??h,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=E?n.checked:!!u,n.defaultChecked=!!u,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(n.name=_),su(n)}function cu(n,r,l){r==="number"&&Xl(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function _r(n,r,l,u){if(n=n.options,r){r={};for(var h=0;h<l.length;h++)r["$"+l[h]]=!0;for(l=0;l<n.length;l++)h=r.hasOwnProperty("$"+n[l].value),n[l].selected!==h&&(n[l].selected=h),h&&u&&(n[l].defaultSelected=!0)}else{for(l=""+an(l),r=null,h=0;h<n.length;h++){if(n[h].value===l){n[h].selected=!0,u&&(n[h].defaultSelected=!0);return}r!==null||n[h].disabled||(r=n[h])}r!==null&&(r.selected=!0)}}function Rh(n,r,l){if(r!=null&&(r=""+an(r),r!==n.value&&(n.value=r),l==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=l!=null?""+an(l):""}function Dh(n,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(a(92));if(te(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=an(r),n.defaultValue=l,u=n.textContent,u===l&&u!==""&&u!==null&&(n.value=u),su(n)}function Sr(n,r){if(r){var l=n.firstChild;if(l&&l===n.lastChild&&l.nodeType===3){l.nodeValue=r;return}}n.textContent=r}var P1=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Nh(n,r,l){var u=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":u?n.setProperty(r,l):typeof l!="number"||l===0||P1.has(r)?r==="float"?n.cssFloat=l:n[r]=(""+l).trim():n[r]=l+"px"}function Oh(n,r,l){if(r!=null&&typeof r!="object")throw Error(a(62));if(n=n.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var h in r)u=r[h],r.hasOwnProperty(h)&&l[h]!==u&&Nh(n,h,u)}else for(var m in r)r.hasOwnProperty(m)&&Nh(n,m,r[m])}function fu(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var B1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),j1=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ql(n){return j1.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Gn(){}var du=null;function hu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Er=null,xr=null;function Mh(n){var r=yr(n);if(r&&(n=r.stateNode)){var l=n[Ut]||null;e:switch(n=r.stateNode,r.type){case"input":if(uu(n,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=n;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+ln(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==n&&u.form===n.form){var h=u[Ut]||null;if(!h)throw Error(a(90));uu(u,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<l.length;r++)u=l[r],u.form===n.form&&Th(u)}break e;case"textarea":Rh(n,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&_r(n,!!l.multiple,r,!1)}}}var pu=!1;function Ih(n,r,l){if(pu)return n(r,l);pu=!0;try{var u=n(r);return u}finally{if(pu=!1,(Er!==null||xr!==null)&&(Uo(),Er&&(r=Er,n=xr,xr=Er=null,Mh(r),n)))for(r=0;r<n.length;r++)Mh(n[r])}}function ka(n,r){var l=n.stateNode;if(l===null)return null;var u=l[Ut]||null;if(u===null)return null;l=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(l&&typeof l!="function")throw Error(a(231,r,typeof l));return l}var $n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mu=!1;if($n)try{var Ta={};Object.defineProperty(Ta,"passive",{get:function(){mu=!0}}),window.addEventListener("test",Ta,Ta),window.removeEventListener("test",Ta,Ta)}catch{mu=!1}var hi=null,gu=null,Zl=null;function zh(){if(Zl)return Zl;var n,r=gu,l=r.length,u,h="value"in hi?hi.value:hi.textContent,m=h.length;for(n=0;n<l&&r[n]===h[n];n++);var _=l-n;for(u=1;u<=_&&r[l-u]===h[m-u];u++);return Zl=h.slice(n,1<u?1-u:void 0)}function Kl(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function Wl(){return!0}function Uh(){return!1}function Ht(n){function r(l,u,h,m,_){this._reactName=l,this._targetInst=h,this.type=u,this.nativeEvent=m,this.target=_,this.currentTarget=null;for(var E in n)n.hasOwnProperty(E)&&(l=n[E],this[E]=l?l(m):m[E]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Wl:Uh,this.isPropagationStopped=Uh,this}return y(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Wl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Wl)},persist:function(){},isPersistent:Wl}),r}var Gi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jl=Ht(Gi),La=y({},Gi,{view:0,detail:0}),V1=Ht(La),yu,bu,Ra,eo=y({},La,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_u,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Ra&&(Ra&&n.type==="mousemove"?(yu=n.screenX-Ra.screenX,bu=n.screenY-Ra.screenY):bu=yu=0,Ra=n),yu)},movementY:function(n){return"movementY"in n?n.movementY:bu}}),Hh=Ht(eo),G1=y({},eo,{dataTransfer:0}),$1=Ht(G1),q1=y({},La,{relatedTarget:0}),vu=Ht(q1),F1=y({},Gi,{animationName:0,elapsedTime:0,pseudoElement:0}),Y1=Ht(F1),X1=y({},Gi,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Q1=Ht(X1),Z1=y({},Gi,{data:0}),Ph=Ht(Z1),K1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},W1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},J1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function e_(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=J1[n])?!!r[n]:!1}function _u(){return e_}var t_=y({},La,{key:function(n){if(n.key){var r=K1[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=Kl(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?W1[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_u,charCode:function(n){return n.type==="keypress"?Kl(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Kl(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),n_=Ht(t_),i_=y({},eo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bh=Ht(i_),r_=y({},La,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_u}),a_=Ht(r_),l_=y({},Gi,{propertyName:0,elapsedTime:0,pseudoElement:0}),o_=Ht(l_),s_=y({},eo,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),u_=Ht(s_),c_=y({},Gi,{newState:0,oldState:0}),f_=Ht(c_),d_=[9,13,27,32],Su=$n&&"CompositionEvent"in window,Da=null;$n&&"documentMode"in document&&(Da=document.documentMode);var h_=$n&&"TextEvent"in window&&!Da,jh=$n&&(!Su||Da&&8<Da&&11>=Da),Vh=" ",Gh=!1;function $h(n,r){switch(n){case"keyup":return d_.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qh(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Cr=!1;function p_(n,r){switch(n){case"compositionend":return qh(r);case"keypress":return r.which!==32?null:(Gh=!0,Vh);case"textInput":return n=r.data,n===Vh&&Gh?null:n;default:return null}}function m_(n,r){if(Cr)return n==="compositionend"||!Su&&$h(n,r)?(n=zh(),Zl=gu=hi=null,Cr=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return jh&&r.locale!=="ko"?null:r.data;default:return null}}var g_={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Fh(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!g_[n.type]:r==="textarea"}function Yh(n,r,l,u){Er?xr?xr.push(u):xr=[u]:Er=u,r=$o(r,"onChange"),0<r.length&&(l=new Jl("onChange","change",null,l,u),n.push({event:l,listeners:r}))}var Na=null,Oa=null;function y_(n){Lg(n,0)}function to(n){var r=Aa(n);if(Th(r))return n}function Xh(n,r){if(n==="change")return r}var Qh=!1;if($n){var Eu;if($n){var xu="oninput"in document;if(!xu){var Zh=document.createElement("div");Zh.setAttribute("oninput","return;"),xu=typeof Zh.oninput=="function"}Eu=xu}else Eu=!1;Qh=Eu&&(!document.documentMode||9<document.documentMode)}function Kh(){Na&&(Na.detachEvent("onpropertychange",Wh),Oa=Na=null)}function Wh(n){if(n.propertyName==="value"&&to(Oa)){var r=[];Yh(r,Oa,n,hu(n)),Ih(y_,r)}}function b_(n,r,l){n==="focusin"?(Kh(),Na=r,Oa=l,Na.attachEvent("onpropertychange",Wh)):n==="focusout"&&Kh()}function v_(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return to(Oa)}function __(n,r){if(n==="click")return to(r)}function S_(n,r){if(n==="input"||n==="change")return to(r)}function E_(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Qt=typeof Object.is=="function"?Object.is:E_;function Ma(n,r){if(Qt(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var l=Object.keys(n),u=Object.keys(r);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var h=l[u];if(!hr.call(r,h)||!Qt(n[h],r[h]))return!1}return!0}function Jh(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function ep(n,r){var l=Jh(n);n=0;for(var u;l;){if(l.nodeType===3){if(u=n+l.textContent.length,n<=r&&u>=r)return{node:l,offset:r-n};n=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Jh(l)}}function tp(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?tp(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function np(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Xl(n.document);r instanceof n.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)n=r.contentWindow;else break;r=Xl(n.document)}return r}function Cu(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var x_=$n&&"documentMode"in document&&11>=document.documentMode,wr=null,wu=null,Ia=null,Au=!1;function ip(n,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Au||wr==null||wr!==Xl(u)||(u=wr,"selectionStart"in u&&Cu(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ia&&Ma(Ia,u)||(Ia=u,u=$o(wu,"onSelect"),0<u.length&&(r=new Jl("onSelect","select",null,r,l),n.push({event:r,listeners:u}),r.target=wr)))}function $i(n,r){var l={};return l[n.toLowerCase()]=r.toLowerCase(),l["Webkit"+n]="webkit"+r,l["Moz"+n]="moz"+r,l}var Ar={animationend:$i("Animation","AnimationEnd"),animationiteration:$i("Animation","AnimationIteration"),animationstart:$i("Animation","AnimationStart"),transitionrun:$i("Transition","TransitionRun"),transitionstart:$i("Transition","TransitionStart"),transitioncancel:$i("Transition","TransitionCancel"),transitionend:$i("Transition","TransitionEnd")},ku={},rp={};$n&&(rp=document.createElement("div").style,"AnimationEvent"in window||(delete Ar.animationend.animation,delete Ar.animationiteration.animation,delete Ar.animationstart.animation),"TransitionEvent"in window||delete Ar.transitionend.transition);function qi(n){if(ku[n])return ku[n];if(!Ar[n])return n;var r=Ar[n],l;for(l in r)if(r.hasOwnProperty(l)&&l in rp)return ku[n]=r[l];return n}var ap=qi("animationend"),lp=qi("animationiteration"),op=qi("animationstart"),C_=qi("transitionrun"),w_=qi("transitionstart"),A_=qi("transitioncancel"),sp=qi("transitionend"),up=new Map,Tu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Tu.push("scrollEnd");function Sn(n,r){up.set(n,r),Vi(r,[n])}var no=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},on=[],kr=0,Lu=0;function io(){for(var n=kr,r=Lu=kr=0;r<n;){var l=on[r];on[r++]=null;var u=on[r];on[r++]=null;var h=on[r];on[r++]=null;var m=on[r];if(on[r++]=null,u!==null&&h!==null){var _=u.pending;_===null?h.next=h:(h.next=_.next,_.next=h),u.pending=h}m!==0&&cp(l,h,m)}}function ro(n,r,l,u){on[kr++]=n,on[kr++]=r,on[kr++]=l,on[kr++]=u,Lu|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function Ru(n,r,l,u){return ro(n,r,l,u),ao(n)}function Fi(n,r){return ro(n,null,null,r),ao(n)}function cp(n,r,l){n.lanes|=l;var u=n.alternate;u!==null&&(u.lanes|=l);for(var h=!1,m=n.return;m!==null;)m.childLanes|=l,u=m.alternate,u!==null&&(u.childLanes|=l),m.tag===22&&(n=m.stateNode,n===null||n._visibility&1||(h=!0)),n=m,m=m.return;return n.tag===3?(m=n.stateNode,h&&r!==null&&(h=31-Ye(l),n=m.hiddenUpdates,u=n[h],u===null?n[h]=[r]:u.push(r),r.lane=l|536870912),m):null}function ao(n){if(50<il)throw il=0,Pc=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var Tr={};function k_(n,r,l,u){this.tag=n,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zt(n,r,l,u){return new k_(n,r,l,u)}function Du(n){return n=n.prototype,!(!n||!n.isReactComponent)}function qn(n,r){var l=n.alternate;return l===null?(l=Zt(n.tag,r,n.key,n.mode),l.elementType=n.elementType,l.type=n.type,l.stateNode=n.stateNode,l.alternate=n,n.alternate=l):(l.pendingProps=r,l.type=n.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=n.flags&65011712,l.childLanes=n.childLanes,l.lanes=n.lanes,l.child=n.child,l.memoizedProps=n.memoizedProps,l.memoizedState=n.memoizedState,l.updateQueue=n.updateQueue,r=n.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=n.sibling,l.index=n.index,l.ref=n.ref,l.refCleanup=n.refCleanup,l}function fp(n,r){n.flags&=65011714;var l=n.alternate;return l===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=l.childLanes,n.lanes=l.lanes,n.child=l.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=l.memoizedProps,n.memoizedState=l.memoizedState,n.updateQueue=l.updateQueue,n.type=l.type,r=l.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function lo(n,r,l,u,h,m){var _=0;if(u=n,typeof n=="function")Du(n)&&(_=1);else if(typeof n=="string")_=NS(n,l,le.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case ie:return n=Zt(31,l,r,h),n.elementType=ie,n.lanes=m,n;case k:return Yi(l.children,h,m,r);case L:_=8,h|=24;break;case C:return n=Zt(12,l,r,h|2),n.elementType=C,n.lanes=m,n;case z:return n=Zt(13,l,r,h),n.elementType=z,n.lanes=m,n;case D:return n=Zt(19,l,r,h),n.elementType=D,n.lanes=m,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case T:_=10;break e;case A:_=9;break e;case I:_=11;break e;case j:_=14;break e;case G:_=16,u=null;break e}_=29,l=Error(a(130,n===null?"null":typeof n,"")),u=null}return r=Zt(_,l,r,h),r.elementType=n,r.type=u,r.lanes=m,r}function Yi(n,r,l,u){return n=Zt(7,n,u,r),n.lanes=l,n}function Nu(n,r,l){return n=Zt(6,n,null,r),n.lanes=l,n}function dp(n){var r=Zt(18,null,null,0);return r.stateNode=n,r}function Ou(n,r,l){return r=Zt(4,n.children!==null?n.children:[],n.key,r),r.lanes=l,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var hp=new WeakMap;function sn(n,r){if(typeof n=="object"&&n!==null){var l=hp.get(n);return l!==void 0?l:(r={value:n,source:r,stack:It(r)},hp.set(n,r),r)}return{value:n,source:r,stack:It(r)}}var Lr=[],Rr=0,oo=null,za=0,un=[],cn=0,pi=null,Rn=1,Dn="";function Fn(n,r){Lr[Rr++]=za,Lr[Rr++]=oo,oo=n,za=r}function pp(n,r,l){un[cn++]=Rn,un[cn++]=Dn,un[cn++]=pi,pi=n;var u=Rn;n=Dn;var h=32-Ye(u)-1;u&=~(1<<h),l+=1;var m=32-Ye(r)+h;if(30<m){var _=h-h%5;m=(u&(1<<_)-1).toString(32),u>>=_,h-=_,Rn=1<<32-Ye(r)+h|l<<h|u,Dn=m+n}else Rn=1<<m|l<<h|u,Dn=n}function Mu(n){n.return!==null&&(Fn(n,1),pp(n,1,0))}function Iu(n){for(;n===oo;)oo=Lr[--Rr],Lr[Rr]=null,za=Lr[--Rr],Lr[Rr]=null;for(;n===pi;)pi=un[--cn],un[cn]=null,Dn=un[--cn],un[cn]=null,Rn=un[--cn],un[cn]=null}function mp(n,r){un[cn++]=Rn,un[cn++]=Dn,un[cn++]=pi,Rn=r.id,Dn=r.overflow,pi=n}var Ct=null,We=null,Ie=!1,mi=null,fn=!1,zu=Error(a(519));function gi(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ua(sn(r,n)),zu}function gp(n){var r=n.stateNode,l=n.type,u=n.memoizedProps;switch(r[xt]=n,r[Ut]=u,l){case"dialog":Ne("cancel",r),Ne("close",r);break;case"iframe":case"object":case"embed":Ne("load",r);break;case"video":case"audio":for(l=0;l<al.length;l++)Ne(al[l],r);break;case"source":Ne("error",r);break;case"img":case"image":case"link":Ne("error",r),Ne("load",r);break;case"details":Ne("toggle",r);break;case"input":Ne("invalid",r),Lh(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Ne("invalid",r);break;case"textarea":Ne("invalid",r),Dh(r,u.value,u.defaultValue,u.children)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||u.suppressHydrationWarning===!0||Og(r.textContent,l)?(u.popover!=null&&(Ne("beforetoggle",r),Ne("toggle",r)),u.onScroll!=null&&Ne("scroll",r),u.onScrollEnd!=null&&Ne("scrollend",r),u.onClick!=null&&(r.onclick=Gn),r=!0):r=!1,r||gi(n,!0)}function yp(n){for(Ct=n.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:fn=!1;return;case 27:case 3:fn=!0;return;default:Ct=Ct.return}}function Dr(n){if(n!==Ct)return!1;if(!Ie)return yp(n),Ie=!0,!1;var r=n.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=n.type,l=!(l!=="form"&&l!=="button")||ef(n.type,n.memoizedProps)),l=!l),l&&We&&gi(n),yp(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));We=Vg(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));We=Vg(n)}else r===27?(r=We,Ri(n.type)?(n=lf,lf=null,We=n):We=r):We=Ct?hn(n.stateNode.nextSibling):null;return!0}function Xi(){We=Ct=null,Ie=!1}function Uu(){var n=mi;return n!==null&&(Vt===null?Vt=n:Vt.push.apply(Vt,n),mi=null),n}function Ua(n){mi===null?mi=[n]:mi.push(n)}var Hu=O(null),Qi=null,Yn=null;function yi(n,r,l){w(Hu,r._currentValue),r._currentValue=l}function Xn(n){n._currentValue=Hu.current,F(Hu)}function Pu(n,r,l){for(;n!==null;){var u=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),n===l)break;n=n.return}}function Bu(n,r,l,u){var h=n.child;for(h!==null&&(h.return=n);h!==null;){var m=h.dependencies;if(m!==null){var _=h.child;m=m.firstContext;e:for(;m!==null;){var E=m;m=h;for(var N=0;N<r.length;N++)if(E.context===r[N]){m.lanes|=l,E=m.alternate,E!==null&&(E.lanes|=l),Pu(m.return,l,n),u||(_=null);break e}m=E.next}}else if(h.tag===18){if(_=h.return,_===null)throw Error(a(341));_.lanes|=l,m=_.alternate,m!==null&&(m.lanes|=l),Pu(_,l,n),_=null}else _=h.child;if(_!==null)_.return=h;else for(_=h;_!==null;){if(_===n){_=null;break}if(h=_.sibling,h!==null){h.return=_.return,_=h;break}_=_.return}h=_}}function Nr(n,r,l,u){n=null;for(var h=r,m=!1;h!==null;){if(!m){if((h.flags&524288)!==0)m=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var _=h.alternate;if(_===null)throw Error(a(387));if(_=_.memoizedProps,_!==null){var E=h.type;Qt(h.pendingProps.value,_.value)||(n!==null?n.push(E):n=[E])}}else if(h===ye.current){if(_=h.alternate,_===null)throw Error(a(387));_.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(n!==null?n.push(cl):n=[cl])}h=h.return}n!==null&&Bu(r,n,l,u),r.flags|=262144}function so(n){for(n=n.firstContext;n!==null;){if(!Qt(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Zi(n){Qi=n,Yn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function wt(n){return bp(Qi,n)}function uo(n,r){return Qi===null&&Zi(n),bp(n,r)}function bp(n,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},Yn===null){if(n===null)throw Error(a(308));Yn=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else Yn=Yn.next=r;return l}var T_=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(l,u){n.push(u)}};this.abort=function(){r.aborted=!0,n.forEach(function(l){return l()})}},L_=e.unstable_scheduleCallback,R_=e.unstable_NormalPriority,ot={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ju(){return{controller:new T_,data:new Map,refCount:0}}function Ha(n){n.refCount--,n.refCount===0&&L_(R_,function(){n.controller.abort()})}var Pa=null,Vu=0,Or=0,Mr=null;function D_(n,r){if(Pa===null){var l=Pa=[];Vu=0,Or=qc(),Mr={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Vu++,r.then(vp,vp),r}function vp(){if(--Vu===0&&Pa!==null){Mr!==null&&(Mr.status="fulfilled");var n=Pa;Pa=null,Or=0,Mr=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function N_(n,r){var l=[],u={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return n.then(function(){u.status="fulfilled",u.value=r;for(var h=0;h<l.length;h++)(0,l[h])(r)},function(h){for(u.status="rejected",u.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),u}var _p=H.S;H.S=function(n,r){ig=Nt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&D_(n,r),_p!==null&&_p(n,r)};var Ki=O(null);function Gu(){var n=Ki.current;return n!==null?n:Xe.pooledCache}function co(n,r){r===null?w(Ki,Ki.current):w(Ki,r.pool)}function Sp(){var n=Gu();return n===null?null:{parent:ot._currentValue,pool:n}}var Ir=Error(a(460)),$u=Error(a(474)),fo=Error(a(542)),ho={then:function(){}};function Ep(n){return n=n.status,n==="fulfilled"||n==="rejected"}function xp(n,r,l){switch(l=n[l],l===void 0?n.push(r):l!==r&&(r.then(Gn,Gn),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,wp(n),n;default:if(typeof r.status=="string")r.then(Gn,Gn);else{if(n=Xe,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.then(function(u){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=u}},function(u){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,wp(n),n}throw Ji=r,Ir}}function Wi(n){try{var r=n._init;return r(n._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ji=l,Ir):l}}var Ji=null;function Cp(){if(Ji===null)throw Error(a(459));var n=Ji;return Ji=null,n}function wp(n){if(n===Ir||n===fo)throw Error(a(483))}var zr=null,Ba=0;function po(n){var r=Ba;return Ba+=1,zr===null&&(zr=[]),xp(zr,n,r)}function ja(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function mo(n,r){throw r.$$typeof===v?Error(a(525)):(n=Object.prototype.toString.call(r),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function Ap(n){function r(U,M){if(n){var P=U.deletions;P===null?(U.deletions=[M],U.flags|=16):P.push(M)}}function l(U,M){if(!n)return null;for(;M!==null;)r(U,M),M=M.sibling;return null}function u(U){for(var M=new Map;U!==null;)U.key!==null?M.set(U.key,U):M.set(U.index,U),U=U.sibling;return M}function h(U,M){return U=qn(U,M),U.index=0,U.sibling=null,U}function m(U,M,P){return U.index=P,n?(P=U.alternate,P!==null?(P=P.index,P<M?(U.flags|=67108866,M):P):(U.flags|=67108866,M)):(U.flags|=1048576,M)}function _(U){return n&&U.alternate===null&&(U.flags|=67108866),U}function E(U,M,P,Z){return M===null||M.tag!==6?(M=Nu(P,U.mode,Z),M.return=U,M):(M=h(M,P),M.return=U,M)}function N(U,M,P,Z){var ge=P.type;return ge===k?Y(U,M,P.props.children,Z,P.key):M!==null&&(M.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===G&&Wi(ge)===M.type)?(M=h(M,P.props),ja(M,P),M.return=U,M):(M=lo(P.type,P.key,P.props,null,U.mode,Z),ja(M,P),M.return=U,M)}function B(U,M,P,Z){return M===null||M.tag!==4||M.stateNode.containerInfo!==P.containerInfo||M.stateNode.implementation!==P.implementation?(M=Ou(P,U.mode,Z),M.return=U,M):(M=h(M,P.children||[]),M.return=U,M)}function Y(U,M,P,Z,ge){return M===null||M.tag!==7?(M=Yi(P,U.mode,Z,ge),M.return=U,M):(M=h(M,P),M.return=U,M)}function K(U,M,P){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Nu(""+M,U.mode,P),M.return=U,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case b:return P=lo(M.type,M.key,M.props,null,U.mode,P),ja(P,M),P.return=U,P;case S:return M=Ou(M,U.mode,P),M.return=U,M;case G:return M=Wi(M),K(U,M,P)}if(te(M)||W(M))return M=Yi(M,U.mode,P,null),M.return=U,M;if(typeof M.then=="function")return K(U,po(M),P);if(M.$$typeof===T)return K(U,uo(U,M),P);mo(U,M)}return null}function V(U,M,P,Z){var ge=M!==null?M.key:null;if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return ge!==null?null:E(U,M,""+P,Z);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case b:return P.key===ge?N(U,M,P,Z):null;case S:return P.key===ge?B(U,M,P,Z):null;case G:return P=Wi(P),V(U,M,P,Z)}if(te(P)||W(P))return ge!==null?null:Y(U,M,P,Z,null);if(typeof P.then=="function")return V(U,M,po(P),Z);if(P.$$typeof===T)return V(U,M,uo(U,P),Z);mo(U,P)}return null}function q(U,M,P,Z,ge){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return U=U.get(P)||null,E(M,U,""+Z,ge);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case b:return U=U.get(Z.key===null?P:Z.key)||null,N(M,U,Z,ge);case S:return U=U.get(Z.key===null?P:Z.key)||null,B(M,U,Z,ge);case G:return Z=Wi(Z),q(U,M,P,Z,ge)}if(te(Z)||W(Z))return U=U.get(P)||null,Y(M,U,Z,ge,null);if(typeof Z.then=="function")return q(U,M,P,po(Z),ge);if(Z.$$typeof===T)return q(U,M,P,uo(M,Z),ge);mo(M,Z)}return null}function de(U,M,P,Z){for(var ge=null,ze=null,pe=M,Ce=M=0,Me=null;pe!==null&&Ce<P.length;Ce++){pe.index>Ce?(Me=pe,pe=null):Me=pe.sibling;var Ue=V(U,pe,P[Ce],Z);if(Ue===null){pe===null&&(pe=Me);break}n&&pe&&Ue.alternate===null&&r(U,pe),M=m(Ue,M,Ce),ze===null?ge=Ue:ze.sibling=Ue,ze=Ue,pe=Me}if(Ce===P.length)return l(U,pe),Ie&&Fn(U,Ce),ge;if(pe===null){for(;Ce<P.length;Ce++)pe=K(U,P[Ce],Z),pe!==null&&(M=m(pe,M,Ce),ze===null?ge=pe:ze.sibling=pe,ze=pe);return Ie&&Fn(U,Ce),ge}for(pe=u(pe);Ce<P.length;Ce++)Me=q(pe,U,Ce,P[Ce],Z),Me!==null&&(n&&Me.alternate!==null&&pe.delete(Me.key===null?Ce:Me.key),M=m(Me,M,Ce),ze===null?ge=Me:ze.sibling=Me,ze=Me);return n&&pe.forEach(function(Ii){return r(U,Ii)}),Ie&&Fn(U,Ce),ge}function be(U,M,P,Z){if(P==null)throw Error(a(151));for(var ge=null,ze=null,pe=M,Ce=M=0,Me=null,Ue=P.next();pe!==null&&!Ue.done;Ce++,Ue=P.next()){pe.index>Ce?(Me=pe,pe=null):Me=pe.sibling;var Ii=V(U,pe,Ue.value,Z);if(Ii===null){pe===null&&(pe=Me);break}n&&pe&&Ii.alternate===null&&r(U,pe),M=m(Ii,M,Ce),ze===null?ge=Ii:ze.sibling=Ii,ze=Ii,pe=Me}if(Ue.done)return l(U,pe),Ie&&Fn(U,Ce),ge;if(pe===null){for(;!Ue.done;Ce++,Ue=P.next())Ue=K(U,Ue.value,Z),Ue!==null&&(M=m(Ue,M,Ce),ze===null?ge=Ue:ze.sibling=Ue,ze=Ue);return Ie&&Fn(U,Ce),ge}for(pe=u(pe);!Ue.done;Ce++,Ue=P.next())Ue=q(pe,U,Ce,Ue.value,Z),Ue!==null&&(n&&Ue.alternate!==null&&pe.delete(Ue.key===null?Ce:Ue.key),M=m(Ue,M,Ce),ze===null?ge=Ue:ze.sibling=Ue,ze=Ue);return n&&pe.forEach(function(GS){return r(U,GS)}),Ie&&Fn(U,Ce),ge}function Fe(U,M,P,Z){if(typeof P=="object"&&P!==null&&P.type===k&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case b:e:{for(var ge=P.key;M!==null;){if(M.key===ge){if(ge=P.type,ge===k){if(M.tag===7){l(U,M.sibling),Z=h(M,P.props.children),Z.return=U,U=Z;break e}}else if(M.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===G&&Wi(ge)===M.type){l(U,M.sibling),Z=h(M,P.props),ja(Z,P),Z.return=U,U=Z;break e}l(U,M);break}else r(U,M);M=M.sibling}P.type===k?(Z=Yi(P.props.children,U.mode,Z,P.key),Z.return=U,U=Z):(Z=lo(P.type,P.key,P.props,null,U.mode,Z),ja(Z,P),Z.return=U,U=Z)}return _(U);case S:e:{for(ge=P.key;M!==null;){if(M.key===ge)if(M.tag===4&&M.stateNode.containerInfo===P.containerInfo&&M.stateNode.implementation===P.implementation){l(U,M.sibling),Z=h(M,P.children||[]),Z.return=U,U=Z;break e}else{l(U,M);break}else r(U,M);M=M.sibling}Z=Ou(P,U.mode,Z),Z.return=U,U=Z}return _(U);case G:return P=Wi(P),Fe(U,M,P,Z)}if(te(P))return de(U,M,P,Z);if(W(P)){if(ge=W(P),typeof ge!="function")throw Error(a(150));return P=ge.call(P),be(U,M,P,Z)}if(typeof P.then=="function")return Fe(U,M,po(P),Z);if(P.$$typeof===T)return Fe(U,M,uo(U,P),Z);mo(U,P)}return typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint"?(P=""+P,M!==null&&M.tag===6?(l(U,M.sibling),Z=h(M,P),Z.return=U,U=Z):(l(U,M),Z=Nu(P,U.mode,Z),Z.return=U,U=Z),_(U)):l(U,M)}return function(U,M,P,Z){try{Ba=0;var ge=Fe(U,M,P,Z);return zr=null,ge}catch(pe){if(pe===Ir||pe===fo)throw pe;var ze=Zt(29,pe,null,U.mode);return ze.lanes=Z,ze.return=U,ze}}}var er=Ap(!0),kp=Ap(!1),bi=!1;function qu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fu(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function vi(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function _i(n,r,l){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(He&2)!==0){var h=u.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),u.pending=r,r=ao(n),cp(n,null,l),r}return ro(n,u,r,l),ao(n)}function Va(n,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,bh(n,l)}}function Yu(n,r){var l=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var h=null,m=null;if(l=l.firstBaseUpdate,l!==null){do{var _={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};m===null?h=m=_:m=m.next=_,l=l.next}while(l!==null);m===null?h=m=r:m=m.next=r}else h=m=r;l={baseState:u.baseState,firstBaseUpdate:h,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=r:n.next=r,l.lastBaseUpdate=r}var Xu=!1;function Ga(){if(Xu){var n=Mr;if(n!==null)throw n}}function $a(n,r,l,u){Xu=!1;var h=n.updateQueue;bi=!1;var m=h.firstBaseUpdate,_=h.lastBaseUpdate,E=h.shared.pending;if(E!==null){h.shared.pending=null;var N=E,B=N.next;N.next=null,_===null?m=B:_.next=B,_=N;var Y=n.alternate;Y!==null&&(Y=Y.updateQueue,E=Y.lastBaseUpdate,E!==_&&(E===null?Y.firstBaseUpdate=B:E.next=B,Y.lastBaseUpdate=N))}if(m!==null){var K=h.baseState;_=0,Y=B=N=null,E=m;do{var V=E.lane&-536870913,q=V!==E.lane;if(q?(Oe&V)===V:(u&V)===V){V!==0&&V===Or&&(Xu=!0),Y!==null&&(Y=Y.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var de=n,be=E;V=r;var Fe=l;switch(be.tag){case 1:if(de=be.payload,typeof de=="function"){K=de.call(Fe,K,V);break e}K=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=be.payload,V=typeof de=="function"?de.call(Fe,K,V):de,V==null)break e;K=y({},K,V);break e;case 2:bi=!0}}V=E.callback,V!==null&&(n.flags|=64,q&&(n.flags|=8192),q=h.callbacks,q===null?h.callbacks=[V]:q.push(V))}else q={lane:V,tag:E.tag,payload:E.payload,callback:E.callback,next:null},Y===null?(B=Y=q,N=K):Y=Y.next=q,_|=V;if(E=E.next,E===null){if(E=h.shared.pending,E===null)break;q=E,E=q.next,q.next=null,h.lastBaseUpdate=q,h.shared.pending=null}}while(!0);Y===null&&(N=K),h.baseState=N,h.firstBaseUpdate=B,h.lastBaseUpdate=Y,m===null&&(h.shared.lanes=0),wi|=_,n.lanes=_,n.memoizedState=K}}function Tp(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function Lp(n,r){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;n<l.length;n++)Tp(l[n],r)}var Ur=O(null),go=O(0);function Rp(n,r){n=ii,w(go,n),w(Ur,r),ii=n|r.baseLanes}function Qu(){w(go,ii),w(Ur,Ur.current)}function Zu(){ii=go.current,F(Ur),F(go)}var Kt=O(null),dn=null;function Si(n){var r=n.alternate;w(rt,rt.current&1),w(Kt,n),dn===null&&(r===null||Ur.current!==null||r.memoizedState!==null)&&(dn=n)}function Ku(n){w(rt,rt.current),w(Kt,n),dn===null&&(dn=n)}function Dp(n){n.tag===22?(w(rt,rt.current),w(Kt,n),dn===null&&(dn=n)):Ei()}function Ei(){w(rt,rt.current),w(Kt,Kt.current)}function Wt(n){F(Kt),dn===n&&(dn=null),F(rt)}var rt=O(0);function yo(n){for(var r=n;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||rf(l)||af(l)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Qn=0,xe=null,$e=null,st=null,bo=!1,Hr=!1,tr=!1,vo=0,qa=0,Pr=null,O_=0;function nt(){throw Error(a(321))}function Wu(n,r){if(r===null)return!1;for(var l=0;l<r.length&&l<n.length;l++)if(!Qt(n[l],r[l]))return!1;return!0}function Ju(n,r,l,u,h,m){return Qn=m,xe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,H.H=n===null||n.memoizedState===null?pm:pc,tr=!1,m=l(u,h),tr=!1,Hr&&(m=Op(r,l,u,h)),Np(n),m}function Np(n){H.H=Xa;var r=$e!==null&&$e.next!==null;if(Qn=0,st=$e=xe=null,bo=!1,qa=0,Pr=null,r)throw Error(a(300));n===null||ut||(n=n.dependencies,n!==null&&so(n)&&(ut=!0))}function Op(n,r,l,u){xe=n;var h=0;do{if(Hr&&(Pr=null),qa=0,Hr=!1,25<=h)throw Error(a(301));if(h+=1,st=$e=null,n.updateQueue!=null){var m=n.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}H.H=mm,m=r(l,u)}while(Hr);return m}function M_(){var n=H.H,r=n.useState()[0];return r=typeof r.then=="function"?Fa(r):r,n=n.useState()[0],($e!==null?$e.memoizedState:null)!==n&&(xe.flags|=1024),r}function ec(){var n=vo!==0;return vo=0,n}function tc(n,r,l){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~l}function nc(n){if(bo){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}bo=!1}Qn=0,st=$e=xe=null,Hr=!1,qa=vo=0,Pr=null}function Mt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?xe.memoizedState=st=n:st=st.next=n,st}function at(){if($e===null){var n=xe.alternate;n=n!==null?n.memoizedState:null}else n=$e.next;var r=st===null?xe.memoizedState:st.next;if(r!==null)st=r,$e=n;else{if(n===null)throw xe.alternate===null?Error(a(467)):Error(a(310));$e=n,n={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},st===null?xe.memoizedState=st=n:st=st.next=n}return st}function _o(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Fa(n){var r=qa;return qa+=1,Pr===null&&(Pr=[]),n=xp(Pr,n,r),r=xe,(st===null?r.memoizedState:st.next)===null&&(r=r.alternate,H.H=r===null||r.memoizedState===null?pm:pc),n}function So(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Fa(n);if(n.$$typeof===T)return wt(n)}throw Error(a(438,String(n)))}function ic(n){var r=null,l=xe.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=xe.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=_o(),xe.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(n),u=0;u<n;u++)l[u]=ne;return r.index++,l}function Zn(n,r){return typeof r=="function"?r(n):r}function Eo(n){var r=at();return rc(r,$e,n)}function rc(n,r,l){var u=n.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var h=n.baseQueue,m=u.pending;if(m!==null){if(h!==null){var _=h.next;h.next=m.next,m.next=_}r.baseQueue=h=m,u.pending=null}if(m=n.baseState,h===null)n.memoizedState=m;else{r=h.next;var E=_=null,N=null,B=r,Y=!1;do{var K=B.lane&-536870913;if(K!==B.lane?(Oe&K)===K:(Qn&K)===K){var V=B.revertLane;if(V===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),K===Or&&(Y=!0);else if((Qn&V)===V){B=B.next,V===Or&&(Y=!0);continue}else K={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},N===null?(E=N=K,_=m):N=N.next=K,xe.lanes|=V,wi|=V;K=B.action,tr&&l(m,K),m=B.hasEagerState?B.eagerState:l(m,K)}else V={lane:K,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},N===null?(E=N=V,_=m):N=N.next=V,xe.lanes|=K,wi|=K;B=B.next}while(B!==null&&B!==r);if(N===null?_=m:N.next=E,!Qt(m,n.memoizedState)&&(ut=!0,Y&&(l=Mr,l!==null)))throw l;n.memoizedState=m,n.baseState=_,n.baseQueue=N,u.lastRenderedState=m}return h===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function ac(n){var r=at(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=n;var u=l.dispatch,h=l.pending,m=r.memoizedState;if(h!==null){l.pending=null;var _=h=h.next;do m=n(m,_.action),_=_.next;while(_!==h);Qt(m,r.memoizedState)||(ut=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),l.lastRenderedState=m}return[m,u]}function Mp(n,r,l){var u=xe,h=at(),m=Ie;if(m){if(l===void 0)throw Error(a(407));l=l()}else l=r();var _=!Qt(($e||h).memoizedState,l);if(_&&(h.memoizedState=l,ut=!0),h=h.queue,sc(Up.bind(null,u,h,n),[n]),h.getSnapshot!==r||_||st!==null&&st.memoizedState.tag&1){if(u.flags|=2048,Br(9,{destroy:void 0},zp.bind(null,u,h,l,r),null),Xe===null)throw Error(a(349));m||(Qn&127)!==0||Ip(u,r,l)}return l}function Ip(n,r,l){n.flags|=16384,n={getSnapshot:r,value:l},r=xe.updateQueue,r===null?(r=_o(),xe.updateQueue=r,r.stores=[n]):(l=r.stores,l===null?r.stores=[n]:l.push(n))}function zp(n,r,l,u){r.value=l,r.getSnapshot=u,Hp(r)&&Pp(n)}function Up(n,r,l){return l(function(){Hp(r)&&Pp(n)})}function Hp(n){var r=n.getSnapshot;n=n.value;try{var l=r();return!Qt(n,l)}catch{return!0}}function Pp(n){var r=Fi(n,2);r!==null&&Gt(r,n,2)}function lc(n){var r=Mt();if(typeof n=="function"){var l=n;if(n=l(),tr){zt(!0);try{l()}finally{zt(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:n},r}function Bp(n,r,l,u){return n.baseState=l,rc(n,$e,typeof u=="function"?u:Zn)}function I_(n,r,l,u,h){if(wo(n))throw Error(a(485));if(n=r.action,n!==null){var m={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){m.listeners.push(_)}};H.T!==null?l(!0):m.isTransition=!1,u(m),l=r.pending,l===null?(m.next=r.pending=m,jp(r,m)):(m.next=l.next,r.pending=l.next=m)}}function jp(n,r){var l=r.action,u=r.payload,h=n.state;if(r.isTransition){var m=H.T,_={};H.T=_;try{var E=l(h,u),N=H.S;N!==null&&N(_,E),Vp(n,r,E)}catch(B){oc(n,r,B)}finally{m!==null&&_.types!==null&&(m.types=_.types),H.T=m}}else try{m=l(h,u),Vp(n,r,m)}catch(B){oc(n,r,B)}}function Vp(n,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){Gp(n,r,u)},function(u){return oc(n,r,u)}):Gp(n,r,l)}function Gp(n,r,l){r.status="fulfilled",r.value=l,$p(r),n.state=l,r=n.pending,r!==null&&(l=r.next,l===r?n.pending=null:(l=l.next,r.next=l,jp(n,l)))}function oc(n,r,l){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=l,$p(r),r=r.next;while(r!==u)}n.action=null}function $p(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function qp(n,r){return r}function Fp(n,r){if(Ie){var l=Xe.formState;if(l!==null){e:{var u=xe;if(Ie){if(We){t:{for(var h=We,m=fn;h.nodeType!==8;){if(!m){h=null;break t}if(h=hn(h.nextSibling),h===null){h=null;break t}}m=h.data,h=m==="F!"||m==="F"?h:null}if(h){We=hn(h.nextSibling),u=h.data==="F!";break e}}gi(u)}u=!1}u&&(r=l[0])}}return l=Mt(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qp,lastRenderedState:r},l.queue=u,l=fm.bind(null,xe,u),u.dispatch=l,u=lc(!1),m=hc.bind(null,xe,!1,u.queue),u=Mt(),h={state:r,dispatch:null,action:n,pending:null},u.queue=h,l=I_.bind(null,xe,h,m,l),h.dispatch=l,u.memoizedState=n,[r,l,!1]}function Yp(n){var r=at();return Xp(r,$e,n)}function Xp(n,r,l){if(r=rc(n,r,qp)[0],n=Eo(Zn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=Fa(r)}catch(_){throw _===Ir?fo:_}else u=r;r=at();var h=r.queue,m=h.dispatch;return l!==r.memoizedState&&(xe.flags|=2048,Br(9,{destroy:void 0},z_.bind(null,h,l),null)),[u,m,n]}function z_(n,r){n.action=r}function Qp(n){var r=at(),l=$e;if(l!==null)return Xp(r,l,n);at(),r=r.memoizedState,l=at();var u=l.queue.dispatch;return l.memoizedState=n,[r,u,!1]}function Br(n,r,l,u){return n={tag:n,create:l,deps:u,inst:r,next:null},r=xe.updateQueue,r===null&&(r=_o(),xe.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=n.next=n:(u=l.next,l.next=n,n.next=u,r.lastEffect=n),n}function Zp(){return at().memoizedState}function xo(n,r,l,u){var h=Mt();xe.flags|=n,h.memoizedState=Br(1|r,{destroy:void 0},l,u===void 0?null:u)}function Co(n,r,l,u){var h=at();u=u===void 0?null:u;var m=h.memoizedState.inst;$e!==null&&u!==null&&Wu(u,$e.memoizedState.deps)?h.memoizedState=Br(r,m,l,u):(xe.flags|=n,h.memoizedState=Br(1|r,m,l,u))}function Kp(n,r){xo(8390656,8,n,r)}function sc(n,r){Co(2048,8,n,r)}function U_(n){xe.flags|=4;var r=xe.updateQueue;if(r===null)r=_o(),xe.updateQueue=r,r.events=[n];else{var l=r.events;l===null?r.events=[n]:l.push(n)}}function Wp(n){var r=at().memoizedState;return U_({ref:r,nextImpl:n}),function(){if((He&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function Jp(n,r){return Co(4,2,n,r)}function em(n,r){return Co(4,4,n,r)}function tm(n,r){if(typeof r=="function"){n=n();var l=r(n);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function nm(n,r,l){l=l!=null?l.concat([n]):null,Co(4,4,tm.bind(null,r,n),l)}function uc(){}function im(n,r){var l=at();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&Wu(r,u[1])?u[0]:(l.memoizedState=[n,r],n)}function rm(n,r){var l=at();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&Wu(r,u[1]))return u[0];if(u=n(),tr){zt(!0);try{n()}finally{zt(!1)}}return l.memoizedState=[u,r],u}function cc(n,r,l){return l===void 0||(Qn&1073741824)!==0&&(Oe&261930)===0?n.memoizedState=r:(n.memoizedState=l,n=ag(),xe.lanes|=n,wi|=n,l)}function am(n,r,l,u){return Qt(l,r)?l:Ur.current!==null?(n=cc(n,l,u),Qt(n,r)||(ut=!0),n):(Qn&42)===0||(Qn&1073741824)!==0&&(Oe&261930)===0?(ut=!0,n.memoizedState=l):(n=ag(),xe.lanes|=n,wi|=n,r)}function lm(n,r,l,u,h){var m=X.p;X.p=m!==0&&8>m?m:8;var _=H.T,E={};H.T=E,hc(n,!1,r,l);try{var N=h(),B=H.S;if(B!==null&&B(E,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var Y=N_(N,u);Ya(n,r,Y,tn(n))}else Ya(n,r,u,tn(n))}catch(K){Ya(n,r,{then:function(){},status:"rejected",reason:K},tn())}finally{X.p=m,_!==null&&E.types!==null&&(_.types=E.types),H.T=_}}function H_(){}function fc(n,r,l,u){if(n.tag!==5)throw Error(a(476));var h=om(n).queue;lm(n,h,r,oe,l===null?H_:function(){return sm(n),l(u)})}function om(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:oe},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:l},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function sm(n){var r=om(n);r.next===null&&(r=n.alternate.memoizedState),Ya(n,r.next.queue,{},tn())}function dc(){return wt(cl)}function um(){return at().memoizedState}function cm(){return at().memoizedState}function P_(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var l=tn();n=vi(l);var u=_i(r,n,l);u!==null&&(Gt(u,r,l),Va(u,r,l)),r={cache:ju()},n.payload=r;return}r=r.return}}function B_(n,r,l){var u=tn();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},wo(n)?dm(r,l):(l=Ru(n,r,l,u),l!==null&&(Gt(l,n,u),hm(l,r,u)))}function fm(n,r,l){var u=tn();Ya(n,r,l,u)}function Ya(n,r,l,u){var h={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(wo(n))dm(r,h);else{var m=n.alternate;if(n.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var _=r.lastRenderedState,E=m(_,l);if(h.hasEagerState=!0,h.eagerState=E,Qt(E,_))return ro(n,r,h,0),Xe===null&&io(),!1}catch{}if(l=Ru(n,r,h,u),l!==null)return Gt(l,n,u),hm(l,r,u),!0}return!1}function hc(n,r,l,u){if(u={lane:2,revertLane:qc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},wo(n)){if(r)throw Error(a(479))}else r=Ru(n,l,u,2),r!==null&&Gt(r,n,2)}function wo(n){var r=n.alternate;return n===xe||r!==null&&r===xe}function dm(n,r){Hr=bo=!0;var l=n.pending;l===null?r.next=r:(r.next=l.next,l.next=r),n.pending=r}function hm(n,r,l){if((l&4194048)!==0){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,bh(n,l)}}var Xa={readContext:wt,use:So,useCallback:nt,useContext:nt,useEffect:nt,useImperativeHandle:nt,useLayoutEffect:nt,useInsertionEffect:nt,useMemo:nt,useReducer:nt,useRef:nt,useState:nt,useDebugValue:nt,useDeferredValue:nt,useTransition:nt,useSyncExternalStore:nt,useId:nt,useHostTransitionStatus:nt,useFormState:nt,useActionState:nt,useOptimistic:nt,useMemoCache:nt,useCacheRefresh:nt};Xa.useEffectEvent=nt;var pm={readContext:wt,use:So,useCallback:function(n,r){return Mt().memoizedState=[n,r===void 0?null:r],n},useContext:wt,useEffect:Kp,useImperativeHandle:function(n,r,l){l=l!=null?l.concat([n]):null,xo(4194308,4,tm.bind(null,r,n),l)},useLayoutEffect:function(n,r){return xo(4194308,4,n,r)},useInsertionEffect:function(n,r){xo(4,2,n,r)},useMemo:function(n,r){var l=Mt();r=r===void 0?null:r;var u=n();if(tr){zt(!0);try{n()}finally{zt(!1)}}return l.memoizedState=[u,r],u},useReducer:function(n,r,l){var u=Mt();if(l!==void 0){var h=l(r);if(tr){zt(!0);try{l(r)}finally{zt(!1)}}}else h=r;return u.memoizedState=u.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},u.queue=n,n=n.dispatch=B_.bind(null,xe,n),[u.memoizedState,n]},useRef:function(n){var r=Mt();return n={current:n},r.memoizedState=n},useState:function(n){n=lc(n);var r=n.queue,l=fm.bind(null,xe,r);return r.dispatch=l,[n.memoizedState,l]},useDebugValue:uc,useDeferredValue:function(n,r){var l=Mt();return cc(l,n,r)},useTransition:function(){var n=lc(!1);return n=lm.bind(null,xe,n.queue,!0,!1),Mt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,l){var u=xe,h=Mt();if(Ie){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),Xe===null)throw Error(a(349));(Oe&127)!==0||Ip(u,r,l)}h.memoizedState=l;var m={value:l,getSnapshot:r};return h.queue=m,Kp(Up.bind(null,u,m,n),[n]),u.flags|=2048,Br(9,{destroy:void 0},zp.bind(null,u,m,l,r),null),l},useId:function(){var n=Mt(),r=Xe.identifierPrefix;if(Ie){var l=Dn,u=Rn;l=(u&~(1<<32-Ye(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=vo++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=O_++,r="_"+r+"r_"+l.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:dc,useFormState:Fp,useActionState:Fp,useOptimistic:function(n){var r=Mt();r.memoizedState=r.baseState=n;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=hc.bind(null,xe,!0,l),l.dispatch=r,[n,r]},useMemoCache:ic,useCacheRefresh:function(){return Mt().memoizedState=P_.bind(null,xe)},useEffectEvent:function(n){var r=Mt(),l={impl:n};return r.memoizedState=l,function(){if((He&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},pc={readContext:wt,use:So,useCallback:im,useContext:wt,useEffect:sc,useImperativeHandle:nm,useInsertionEffect:Jp,useLayoutEffect:em,useMemo:rm,useReducer:Eo,useRef:Zp,useState:function(){return Eo(Zn)},useDebugValue:uc,useDeferredValue:function(n,r){var l=at();return am(l,$e.memoizedState,n,r)},useTransition:function(){var n=Eo(Zn)[0],r=at().memoizedState;return[typeof n=="boolean"?n:Fa(n),r]},useSyncExternalStore:Mp,useId:um,useHostTransitionStatus:dc,useFormState:Yp,useActionState:Yp,useOptimistic:function(n,r){var l=at();return Bp(l,$e,n,r)},useMemoCache:ic,useCacheRefresh:cm};pc.useEffectEvent=Wp;var mm={readContext:wt,use:So,useCallback:im,useContext:wt,useEffect:sc,useImperativeHandle:nm,useInsertionEffect:Jp,useLayoutEffect:em,useMemo:rm,useReducer:ac,useRef:Zp,useState:function(){return ac(Zn)},useDebugValue:uc,useDeferredValue:function(n,r){var l=at();return $e===null?cc(l,n,r):am(l,$e.memoizedState,n,r)},useTransition:function(){var n=ac(Zn)[0],r=at().memoizedState;return[typeof n=="boolean"?n:Fa(n),r]},useSyncExternalStore:Mp,useId:um,useHostTransitionStatus:dc,useFormState:Qp,useActionState:Qp,useOptimistic:function(n,r){var l=at();return $e!==null?Bp(l,$e,n,r):(l.baseState=n,[n,l.queue.dispatch])},useMemoCache:ic,useCacheRefresh:cm};mm.useEffectEvent=Wp;function mc(n,r,l,u){r=n.memoizedState,l=l(u,r),l=l==null?r:y({},r,l),n.memoizedState=l,n.lanes===0&&(n.updateQueue.baseState=l)}var gc={enqueueSetState:function(n,r,l){n=n._reactInternals;var u=tn(),h=vi(u);h.payload=r,l!=null&&(h.callback=l),r=_i(n,h,u),r!==null&&(Gt(r,n,u),Va(r,n,u))},enqueueReplaceState:function(n,r,l){n=n._reactInternals;var u=tn(),h=vi(u);h.tag=1,h.payload=r,l!=null&&(h.callback=l),r=_i(n,h,u),r!==null&&(Gt(r,n,u),Va(r,n,u))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var l=tn(),u=vi(l);u.tag=2,r!=null&&(u.callback=r),r=_i(n,u,l),r!==null&&(Gt(r,n,l),Va(r,n,l))}};function gm(n,r,l,u,h,m,_){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,m,_):r.prototype&&r.prototype.isPureReactComponent?!Ma(l,u)||!Ma(h,m):!0}function ym(n,r,l,u){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,u),r.state!==n&&gc.enqueueReplaceState(r,r.state,null)}function nr(n,r){var l=r;if("ref"in r){l={};for(var u in r)u!=="ref"&&(l[u]=r[u])}if(n=n.defaultProps){l===r&&(l=y({},l));for(var h in n)l[h]===void 0&&(l[h]=n[h])}return l}function bm(n){no(n)}function vm(n){console.error(n)}function _m(n){no(n)}function Ao(n,r){try{var l=n.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function Sm(n,r,l){try{var u=n.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function yc(n,r,l){return l=vi(l),l.tag=3,l.payload={element:null},l.callback=function(){Ao(n,r)},l}function Em(n){return n=vi(n),n.tag=3,n}function xm(n,r,l,u){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var m=u.value;n.payload=function(){return h(m)},n.callback=function(){Sm(r,l,u)}}var _=l.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(n.callback=function(){Sm(r,l,u),typeof h!="function"&&(Ai===null?Ai=new Set([this]):Ai.add(this));var E=u.stack;this.componentDidCatch(u.value,{componentStack:E!==null?E:""})})}function j_(n,r,l,u,h){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&Nr(r,l,h,!0),l=Kt.current,l!==null){switch(l.tag){case 31:case 13:return dn===null?Ho():l.alternate===null&&it===0&&(it=3),l.flags&=-257,l.flags|=65536,l.lanes=h,u===ho?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),Vc(n,u,h)),!1;case 22:return l.flags|=65536,u===ho?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([u]):l.add(u)),Vc(n,u,h)),!1}throw Error(a(435,l.tag))}return Vc(n,u,h),Ho(),!1}if(Ie)return r=Kt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,u!==zu&&(n=Error(a(422),{cause:u}),Ua(sn(n,l)))):(u!==zu&&(r=Error(a(423),{cause:u}),Ua(sn(r,l))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,u=sn(u,l),h=yc(n.stateNode,u,h),Yu(n,h),it!==4&&(it=2)),!1;var m=Error(a(520),{cause:u});if(m=sn(m,l),nl===null?nl=[m]:nl.push(m),it!==4&&(it=2),r===null)return!0;u=sn(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,n=h&-h,l.lanes|=n,n=yc(l.stateNode,u,n),Yu(l,n),!1;case 1:if(r=l.type,m=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Ai===null||!Ai.has(m))))return l.flags|=65536,h&=-h,l.lanes|=h,h=Em(h),xm(h,n,l,u),Yu(l,h),!1}l=l.return}while(l!==null);return!1}var bc=Error(a(461)),ut=!1;function At(n,r,l,u){r.child=n===null?kp(r,null,l,u):er(r,n.child,l,u)}function Cm(n,r,l,u,h){l=l.render;var m=r.ref;if("ref"in u){var _={};for(var E in u)E!=="ref"&&(_[E]=u[E])}else _=u;return Zi(r),u=Ju(n,r,l,_,m,h),E=ec(),n!==null&&!ut?(tc(n,r,h),Kn(n,r,h)):(Ie&&E&&Mu(r),r.flags|=1,At(n,r,u,h),r.child)}function wm(n,r,l,u,h){if(n===null){var m=l.type;return typeof m=="function"&&!Du(m)&&m.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=m,Am(n,r,m,u,h)):(n=lo(l.type,null,u,r,r.mode,h),n.ref=r.ref,n.return=r,r.child=n)}if(m=n.child,!Ac(n,h)){var _=m.memoizedProps;if(l=l.compare,l=l!==null?l:Ma,l(_,u)&&n.ref===r.ref)return Kn(n,r,h)}return r.flags|=1,n=qn(m,u),n.ref=r.ref,n.return=r,r.child=n}function Am(n,r,l,u,h){if(n!==null){var m=n.memoizedProps;if(Ma(m,u)&&n.ref===r.ref)if(ut=!1,r.pendingProps=u=m,Ac(n,h))(n.flags&131072)!==0&&(ut=!0);else return r.lanes=n.lanes,Kn(n,r,h)}return vc(n,r,l,u,h)}function km(n,r,l,u){var h=u.children,m=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((r.flags&128)!==0){if(m=m!==null?m.baseLanes|l:l,n!==null){for(u=r.child=n.child,h=0;u!==null;)h=h|u.lanes|u.childLanes,u=u.sibling;u=h&~m}else u=0,r.child=null;return Tm(n,r,m,l,u)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&co(r,m!==null?m.cachePool:null),m!==null?Rp(r,m):Qu(),Dp(r);else return u=r.lanes=536870912,Tm(n,r,m!==null?m.baseLanes|l:l,l,u)}else m!==null?(co(r,m.cachePool),Rp(r,m),Ei(),r.memoizedState=null):(n!==null&&co(r,null),Qu(),Ei());return At(n,r,h,l),r.child}function Qa(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Tm(n,r,l,u,h){var m=Gu();return m=m===null?null:{parent:ot._currentValue,pool:m},r.memoizedState={baseLanes:l,cachePool:m},n!==null&&co(r,null),Qu(),Dp(r),n!==null&&Nr(n,r,u,!0),r.childLanes=h,null}function ko(n,r){return r=Lo({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Lm(n,r,l){return er(r,n.child,null,l),n=ko(r,r.pendingProps),n.flags|=2,Wt(r),r.memoizedState=null,n}function V_(n,r,l){var u=r.pendingProps,h=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Ie){if(u.mode==="hidden")return n=ko(r,u),r.lanes=536870912,Qa(null,n);if(Ku(r),(n=We)?(n=jg(n,fn),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:pi!==null?{id:Rn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},l=dp(n),l.return=r,r.child=l,Ct=r,We=null)):n=null,n===null)throw gi(r);return r.lanes=536870912,null}return ko(r,u)}var m=n.memoizedState;if(m!==null){var _=m.dehydrated;if(Ku(r),h)if(r.flags&256)r.flags&=-257,r=Lm(n,r,l);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(ut||Nr(n,r,l,!1),h=(l&n.childLanes)!==0,ut||h){if(u=Xe,u!==null&&(_=vh(u,l),_!==0&&_!==m.retryLane))throw m.retryLane=_,Fi(n,_),Gt(u,n,_),bc;Ho(),r=Lm(n,r,l)}else n=m.treeContext,We=hn(_.nextSibling),Ct=r,Ie=!0,mi=null,fn=!1,n!==null&&mp(r,n),r=ko(r,u),r.flags|=4096;return r}return n=qn(n.child,{mode:u.mode,children:u.children}),n.ref=r.ref,r.child=n,n.return=r,n}function To(n,r){var l=r.ref;if(l===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(n===null||n.ref!==l)&&(r.flags|=4194816)}}function vc(n,r,l,u,h){return Zi(r),l=Ju(n,r,l,u,void 0,h),u=ec(),n!==null&&!ut?(tc(n,r,h),Kn(n,r,h)):(Ie&&u&&Mu(r),r.flags|=1,At(n,r,l,h),r.child)}function Rm(n,r,l,u,h,m){return Zi(r),r.updateQueue=null,l=Op(r,u,l,h),Np(n),u=ec(),n!==null&&!ut?(tc(n,r,m),Kn(n,r,m)):(Ie&&u&&Mu(r),r.flags|=1,At(n,r,l,m),r.child)}function Dm(n,r,l,u,h){if(Zi(r),r.stateNode===null){var m=Tr,_=l.contextType;typeof _=="object"&&_!==null&&(m=wt(_)),m=new l(u,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=gc,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=u,m.state=r.memoizedState,m.refs={},qu(r),_=l.contextType,m.context=typeof _=="object"&&_!==null?wt(_):Tr,m.state=r.memoizedState,_=l.getDerivedStateFromProps,typeof _=="function"&&(mc(r,l,_,u),m.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(_=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),_!==m.state&&gc.enqueueReplaceState(m,m.state,null),$a(r,u,m,h),Ga(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(n===null){m=r.stateNode;var E=r.memoizedProps,N=nr(l,E);m.props=N;var B=m.context,Y=l.contextType;_=Tr,typeof Y=="object"&&Y!==null&&(_=wt(Y));var K=l.getDerivedStateFromProps;Y=typeof K=="function"||typeof m.getSnapshotBeforeUpdate=="function",E=r.pendingProps!==E,Y||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(E||B!==_)&&ym(r,m,u,_),bi=!1;var V=r.memoizedState;m.state=V,$a(r,u,m,h),Ga(),B=r.memoizedState,E||V!==B||bi?(typeof K=="function"&&(mc(r,l,K,u),B=r.memoizedState),(N=bi||gm(r,l,N,u,V,B,_))?(Y||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=B),m.props=u,m.state=B,m.context=_,u=N):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{m=r.stateNode,Fu(n,r),_=r.memoizedProps,Y=nr(l,_),m.props=Y,K=r.pendingProps,V=m.context,B=l.contextType,N=Tr,typeof B=="object"&&B!==null&&(N=wt(B)),E=l.getDerivedStateFromProps,(B=typeof E=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(_!==K||V!==N)&&ym(r,m,u,N),bi=!1,V=r.memoizedState,m.state=V,$a(r,u,m,h),Ga();var q=r.memoizedState;_!==K||V!==q||bi||n!==null&&n.dependencies!==null&&so(n.dependencies)?(typeof E=="function"&&(mc(r,l,E,u),q=r.memoizedState),(Y=bi||gm(r,l,Y,u,V,q,N)||n!==null&&n.dependencies!==null&&so(n.dependencies))?(B||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(u,q,N),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(u,q,N)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||_===n.memoizedProps&&V===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&V===n.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=q),m.props=u,m.state=q,m.context=N,u=Y):(typeof m.componentDidUpdate!="function"||_===n.memoizedProps&&V===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&V===n.memoizedState||(r.flags|=1024),u=!1)}return m=u,To(n,r),u=(r.flags&128)!==0,m||u?(m=r.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,n!==null&&u?(r.child=er(r,n.child,null,h),r.child=er(r,null,l,h)):At(n,r,l,h),r.memoizedState=m.state,n=r.child):n=Kn(n,r,h),n}function Nm(n,r,l,u){return Xi(),r.flags|=256,At(n,r,l,u),r.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(n){return{baseLanes:n,cachePool:Sp()}}function Ec(n,r,l){return n=n!==null?n.childLanes&~l:0,r&&(n|=en),n}function Om(n,r,l){var u=r.pendingProps,h=!1,m=(r.flags&128)!==0,_;if((_=m)||(_=n!==null&&n.memoizedState===null?!1:(rt.current&2)!==0),_&&(h=!0,r.flags&=-129),_=(r.flags&32)!==0,r.flags&=-33,n===null){if(Ie){if(h?Si(r):Ei(),(n=We)?(n=jg(n,fn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:pi!==null?{id:Rn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},l=dp(n),l.return=r,r.child=l,Ct=r,We=null)):n=null,n===null)throw gi(r);return af(n)?r.lanes=32:r.lanes=536870912,null}var E=u.children;return u=u.fallback,h?(Ei(),h=r.mode,E=Lo({mode:"hidden",children:E},h),u=Yi(u,h,l,null),E.return=r,u.return=r,E.sibling=u,r.child=E,u=r.child,u.memoizedState=Sc(l),u.childLanes=Ec(n,_,l),r.memoizedState=_c,Qa(null,u)):(Si(r),xc(r,E))}var N=n.memoizedState;if(N!==null&&(E=N.dehydrated,E!==null)){if(m)r.flags&256?(Si(r),r.flags&=-257,r=Cc(n,r,l)):r.memoizedState!==null?(Ei(),r.child=n.child,r.flags|=128,r=null):(Ei(),E=u.fallback,h=r.mode,u=Lo({mode:"visible",children:u.children},h),E=Yi(E,h,l,null),E.flags|=2,u.return=r,E.return=r,u.sibling=E,r.child=u,er(r,n.child,null,l),u=r.child,u.memoizedState=Sc(l),u.childLanes=Ec(n,_,l),r.memoizedState=_c,r=Qa(null,u));else if(Si(r),af(E)){if(_=E.nextSibling&&E.nextSibling.dataset,_)var B=_.dgst;_=B,u=Error(a(419)),u.stack="",u.digest=_,Ua({value:u,source:null,stack:null}),r=Cc(n,r,l)}else if(ut||Nr(n,r,l,!1),_=(l&n.childLanes)!==0,ut||_){if(_=Xe,_!==null&&(u=vh(_,l),u!==0&&u!==N.retryLane))throw N.retryLane=u,Fi(n,u),Gt(_,n,u),bc;rf(E)||Ho(),r=Cc(n,r,l)}else rf(E)?(r.flags|=192,r.child=n.child,r=null):(n=N.treeContext,We=hn(E.nextSibling),Ct=r,Ie=!0,mi=null,fn=!1,n!==null&&mp(r,n),r=xc(r,u.children),r.flags|=4096);return r}return h?(Ei(),E=u.fallback,h=r.mode,N=n.child,B=N.sibling,u=qn(N,{mode:"hidden",children:u.children}),u.subtreeFlags=N.subtreeFlags&65011712,B!==null?E=qn(B,E):(E=Yi(E,h,l,null),E.flags|=2),E.return=r,u.return=r,u.sibling=E,r.child=u,Qa(null,u),u=r.child,E=n.child.memoizedState,E===null?E=Sc(l):(h=E.cachePool,h!==null?(N=ot._currentValue,h=h.parent!==N?{parent:N,pool:N}:h):h=Sp(),E={baseLanes:E.baseLanes|l,cachePool:h}),u.memoizedState=E,u.childLanes=Ec(n,_,l),r.memoizedState=_c,Qa(n.child,u)):(Si(r),l=n.child,n=l.sibling,l=qn(l,{mode:"visible",children:u.children}),l.return=r,l.sibling=null,n!==null&&(_=r.deletions,_===null?(r.deletions=[n],r.flags|=16):_.push(n)),r.child=l,r.memoizedState=null,l)}function xc(n,r){return r=Lo({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function Lo(n,r){return n=Zt(22,n,null,r),n.lanes=0,n}function Cc(n,r,l){return er(r,n.child,null,l),n=xc(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function Mm(n,r,l){n.lanes|=r;var u=n.alternate;u!==null&&(u.lanes|=r),Pu(n.return,r,l)}function wc(n,r,l,u,h,m){var _=n.memoizedState;_===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:h,treeForkCount:m}:(_.isBackwards=r,_.rendering=null,_.renderingStartTime=0,_.last=u,_.tail=l,_.tailMode=h,_.treeForkCount=m)}function Im(n,r,l){var u=r.pendingProps,h=u.revealOrder,m=u.tail;u=u.children;var _=rt.current,E=(_&2)!==0;if(E?(_=_&1|2,r.flags|=128):_&=1,w(rt,_),At(n,r,u,l),u=Ie?za:0,!E&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Mm(n,l,r);else if(n.tag===19)Mm(n,l,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(h){case"forwards":for(l=r.child,h=null;l!==null;)n=l.alternate,n!==null&&yo(n)===null&&(h=l),l=l.sibling;l=h,l===null?(h=r.child,r.child=null):(h=l.sibling,l.sibling=null),wc(r,!1,h,l,m,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,h=r.child,r.child=null;h!==null;){if(n=h.alternate,n!==null&&yo(n)===null){r.child=h;break}n=h.sibling,h.sibling=l,l=h,h=n}wc(r,!0,l,null,m,u);break;case"together":wc(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function Kn(n,r,l){if(n!==null&&(r.dependencies=n.dependencies),wi|=r.lanes,(l&r.childLanes)===0)if(n!==null){if(Nr(n,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(a(153));if(r.child!==null){for(n=r.child,l=qn(n,n.pendingProps),r.child=l,l.return=r;n.sibling!==null;)n=n.sibling,l=l.sibling=qn(n,n.pendingProps),l.return=r;l.sibling=null}return r.child}function Ac(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&so(n)))}function G_(n,r,l){switch(r.tag){case 3:Ae(r,r.stateNode.containerInfo),yi(r,ot,n.memoizedState.cache),Xi();break;case 27:case 5:Qe(r);break;case 4:Ae(r,r.stateNode.containerInfo);break;case 10:yi(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Ku(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Si(r),r.flags|=128,null):(l&r.child.childLanes)!==0?Om(n,r,l):(Si(r),n=Kn(n,r,l),n!==null?n.sibling:null);Si(r);break;case 19:var h=(n.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(Nr(n,r,l,!1),u=(l&r.childLanes)!==0),h){if(u)return Im(n,r,l);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),w(rt,rt.current),u)break;return null;case 22:return r.lanes=0,km(n,r,l,r.pendingProps);case 24:yi(r,ot,n.memoizedState.cache)}return Kn(n,r,l)}function zm(n,r,l){if(n!==null)if(n.memoizedProps!==r.pendingProps)ut=!0;else{if(!Ac(n,l)&&(r.flags&128)===0)return ut=!1,G_(n,r,l);ut=(n.flags&131072)!==0}else ut=!1,Ie&&(r.flags&1048576)!==0&&pp(r,za,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(n=Wi(r.elementType),r.type=n,typeof n=="function")Du(n)?(u=nr(n,u),r.tag=1,r=Dm(null,r,n,u,l)):(r.tag=0,r=vc(null,r,n,u,l));else{if(n!=null){var h=n.$$typeof;if(h===I){r.tag=11,r=Cm(null,r,n,u,l);break e}else if(h===j){r.tag=14,r=wm(null,r,n,u,l);break e}}throw r=ee(n)||n,Error(a(306,r,""))}}return r;case 0:return vc(n,r,r.type,r.pendingProps,l);case 1:return u=r.type,h=nr(u,r.pendingProps),Dm(n,r,u,h,l);case 3:e:{if(Ae(r,r.stateNode.containerInfo),n===null)throw Error(a(387));u=r.pendingProps;var m=r.memoizedState;h=m.element,Fu(n,r),$a(r,u,null,l);var _=r.memoizedState;if(u=_.cache,yi(r,ot,u),u!==m.cache&&Bu(r,[ot],l,!0),Ga(),u=_.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:_.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=Nm(n,r,u,l);break e}else if(u!==h){h=sn(Error(a(424)),r),Ua(h),r=Nm(n,r,u,l);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,We=hn(n.firstChild),Ct=r,Ie=!0,mi=null,fn=!0,l=kp(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Xi(),u===h){r=Kn(n,r,l);break e}At(n,r,u,l)}r=r.child}return r;case 26:return To(n,r),n===null?(l=Yg(r.type,null,r.pendingProps,null))?r.memoizedState=l:Ie||(l=r.type,n=r.pendingProps,u=qo(ce.current).createElement(l),u[xt]=r,u[Ut]=n,kt(u,l,n),bt(u),r.stateNode=u):r.memoizedState=Yg(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return Qe(r),n===null&&Ie&&(u=r.stateNode=$g(r.type,r.pendingProps,ce.current),Ct=r,fn=!0,h=We,Ri(r.type)?(lf=h,We=hn(u.firstChild)):We=h),At(n,r,r.pendingProps.children,l),To(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Ie&&((h=u=We)&&(u=vS(u,r.type,r.pendingProps,fn),u!==null?(r.stateNode=u,Ct=r,We=hn(u.firstChild),fn=!1,h=!0):h=!1),h||gi(r)),Qe(r),h=r.type,m=r.pendingProps,_=n!==null?n.memoizedProps:null,u=m.children,ef(h,m)?u=null:_!==null&&ef(h,_)&&(r.flags|=32),r.memoizedState!==null&&(h=Ju(n,r,M_,null,null,l),cl._currentValue=h),To(n,r),At(n,r,u,l),r.child;case 6:return n===null&&Ie&&((n=l=We)&&(l=_S(l,r.pendingProps,fn),l!==null?(r.stateNode=l,Ct=r,We=null,n=!0):n=!1),n||gi(r)),null;case 13:return Om(n,r,l);case 4:return Ae(r,r.stateNode.containerInfo),u=r.pendingProps,n===null?r.child=er(r,null,u,l):At(n,r,u,l),r.child;case 11:return Cm(n,r,r.type,r.pendingProps,l);case 7:return At(n,r,r.pendingProps,l),r.child;case 8:return At(n,r,r.pendingProps.children,l),r.child;case 12:return At(n,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,yi(r,r.type,u.value),At(n,r,u.children,l),r.child;case 9:return h=r.type._context,u=r.pendingProps.children,Zi(r),h=wt(h),u=u(h),r.flags|=1,At(n,r,u,l),r.child;case 14:return wm(n,r,r.type,r.pendingProps,l);case 15:return Am(n,r,r.type,r.pendingProps,l);case 19:return Im(n,r,l);case 31:return V_(n,r,l);case 22:return km(n,r,l,r.pendingProps);case 24:return Zi(r),u=wt(ot),n===null?(h=Gu(),h===null&&(h=Xe,m=ju(),h.pooledCache=m,m.refCount++,m!==null&&(h.pooledCacheLanes|=l),h=m),r.memoizedState={parent:u,cache:h},qu(r),yi(r,ot,h)):((n.lanes&l)!==0&&(Fu(n,r),$a(r,null,null,l),Ga()),h=n.memoizedState,m=r.memoizedState,h.parent!==u?(h={parent:u,cache:u},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),yi(r,ot,u)):(u=m.cache,yi(r,ot,u),u!==h.cache&&Bu(r,[ot],l,!0))),At(n,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function Wn(n){n.flags|=4}function kc(n,r,l,u,h){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(h&335544128)===h)if(n.stateNode.complete)n.flags|=8192;else if(ug())n.flags|=8192;else throw Ji=ho,$u}else n.flags&=-16777217}function Um(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Wg(r))if(ug())n.flags|=8192;else throw Ji=ho,$u}function Ro(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?gh():536870912,n.lanes|=r,$r|=r)}function Za(n,r){if(!Ie)switch(n.tailMode){case"hidden":r=n.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?n.tail=null:l.sibling=null;break;case"collapsed":l=n.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function Je(n){var r=n.alternate!==null&&n.alternate.child===n.child,l=0,u=0;if(r)for(var h=n.child;h!==null;)l|=h.lanes|h.childLanes,u|=h.subtreeFlags&65011712,u|=h.flags&65011712,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)l|=h.lanes|h.childLanes,u|=h.subtreeFlags,u|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=u,n.childLanes=l,r}function $_(n,r,l){var u=r.pendingProps;switch(Iu(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(r),null;case 1:return Je(r),null;case 3:return l=r.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),Xn(ot),ke(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(n===null||n.child===null)&&(Dr(r)?Wn(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Uu())),Je(r),null;case 26:var h=r.type,m=r.memoizedState;return n===null?(Wn(r),m!==null?(Je(r),Um(r,m)):(Je(r),kc(r,h,null,u,l))):m?m!==n.memoizedState?(Wn(r),Je(r),Um(r,m)):(Je(r),r.flags&=-16777217):(n=n.memoizedProps,n!==u&&Wn(r),Je(r),kc(r,h,n,u,l)),null;case 27:if(et(r),l=ce.current,h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&Wn(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return Je(r),null}n=le.current,Dr(r)?gp(r):(n=$g(h,u,l),r.stateNode=n,Wn(r))}return Je(r),null;case 5:if(et(r),h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&Wn(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return Je(r),null}if(m=le.current,Dr(r))gp(r);else{var _=qo(ce.current);switch(m){case 1:m=_.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:m=_.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":m=_.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":m=_.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":m=_.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof u.is=="string"?_.createElement("select",{is:u.is}):_.createElement("select"),u.multiple?m.multiple=!0:u.size&&(m.size=u.size);break;default:m=typeof u.is=="string"?_.createElement(h,{is:u.is}):_.createElement(h)}}m[xt]=r,m[Ut]=u;e:for(_=r.child;_!==null;){if(_.tag===5||_.tag===6)m.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===r)break e;for(;_.sibling===null;){if(_.return===null||_.return===r)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}r.stateNode=m;e:switch(kt(m,h,u),h){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Wn(r)}}return Je(r),kc(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,l),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==u&&Wn(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(n=ce.current,Dr(r)){if(n=r.stateNode,l=r.memoizedProps,u=null,h=Ct,h!==null)switch(h.tag){case 27:case 5:u=h.memoizedProps}n[xt]=r,n=!!(n.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||Og(n.nodeValue,l)),n||gi(r,!0)}else n=qo(n).createTextNode(u),n[xt]=r,r.stateNode=n}return Je(r),null;case 31:if(l=r.memoizedState,n===null||n.memoizedState!==null){if(u=Dr(r),l!==null){if(n===null){if(!u)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[xt]=r}else Xi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Je(r),n=!1}else l=Uu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return r.flags&256?(Wt(r),r):(Wt(r),null);if((r.flags&128)!==0)throw Error(a(558))}return Je(r),null;case 13:if(u=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=Dr(r),u!==null&&u.dehydrated!==null){if(n===null){if(!h)throw Error(a(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(a(317));h[xt]=r}else Xi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Je(r),h=!1}else h=Uu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Wt(r),r):(Wt(r),null)}return Wt(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,n=n!==null&&n.memoizedState!==null,l&&(u=r.child,h=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(h=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==h&&(u.flags|=2048)),l!==n&&l&&(r.child.flags|=8192),Ro(r,r.updateQueue),Je(r),null);case 4:return ke(),n===null&&Qc(r.stateNode.containerInfo),Je(r),null;case 10:return Xn(r.type),Je(r),null;case 19:if(F(rt),u=r.memoizedState,u===null)return Je(r),null;if(h=(r.flags&128)!==0,m=u.rendering,m===null)if(h)Za(u,!1);else{if(it!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(m=yo(n),m!==null){for(r.flags|=128,Za(u,!1),n=m.updateQueue,r.updateQueue=n,Ro(r,n),r.subtreeFlags=0,n=l,l=r.child;l!==null;)fp(l,n),l=l.sibling;return w(rt,rt.current&1|2),Ie&&Fn(r,u.treeForkCount),r.child}n=n.sibling}u.tail!==null&&Nt()>Io&&(r.flags|=128,h=!0,Za(u,!1),r.lanes=4194304)}else{if(!h)if(n=yo(m),n!==null){if(r.flags|=128,h=!0,n=n.updateQueue,r.updateQueue=n,Ro(r,n),Za(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!Ie)return Je(r),null}else 2*Nt()-u.renderingStartTime>Io&&l!==536870912&&(r.flags|=128,h=!0,Za(u,!1),r.lanes=4194304);u.isBackwards?(m.sibling=r.child,r.child=m):(n=u.last,n!==null?n.sibling=m:r.child=m,u.last=m)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Nt(),n.sibling=null,l=rt.current,w(rt,h?l&1|2:l&1),Ie&&Fn(r,u.treeForkCount),n):(Je(r),null);case 22:case 23:return Wt(r),Zu(),u=r.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(l&536870912)!==0&&(r.flags&128)===0&&(Je(r),r.subtreeFlags&6&&(r.flags|=8192)):Je(r),l=r.updateQueue,l!==null&&Ro(r,l.retryQueue),l=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==l&&(r.flags|=2048),n!==null&&F(Ki),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),Xn(ot),Je(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function q_(n,r){switch(Iu(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return Xn(ot),ke(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return et(r),null;case 31:if(r.memoizedState!==null){if(Wt(r),r.alternate===null)throw Error(a(340));Xi()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(Wt(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Xi()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return F(rt),null;case 4:return ke(),null;case 10:return Xn(r.type),null;case 22:case 23:return Wt(r),Zu(),n!==null&&F(Ki),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return Xn(ot),null;case 25:return null;default:return null}}function Hm(n,r){switch(Iu(r),r.tag){case 3:Xn(ot),ke();break;case 26:case 27:case 5:et(r);break;case 4:ke();break;case 31:r.memoizedState!==null&&Wt(r);break;case 13:Wt(r);break;case 19:F(rt);break;case 10:Xn(r.type);break;case 22:case 23:Wt(r),Zu(),n!==null&&F(Ki);break;case 24:Xn(ot)}}function Ka(n,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var h=u.next;l=h;do{if((l.tag&n)===n){u=void 0;var m=l.create,_=l.inst;u=m(),_.destroy=u}l=l.next}while(l!==h)}}catch(E){Ge(r,r.return,E)}}function xi(n,r,l){try{var u=r.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var m=h.next;u=m;do{if((u.tag&n)===n){var _=u.inst,E=_.destroy;if(E!==void 0){_.destroy=void 0,h=r;var N=l,B=E;try{B()}catch(Y){Ge(h,N,Y)}}}u=u.next}while(u!==m)}}catch(Y){Ge(r,r.return,Y)}}function Pm(n){var r=n.updateQueue;if(r!==null){var l=n.stateNode;try{Lp(r,l)}catch(u){Ge(n,n.return,u)}}}function Bm(n,r,l){l.props=nr(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(u){Ge(n,r,u)}}function Wa(n,r){try{var l=n.ref;if(l!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof l=="function"?n.refCleanup=l(u):l.current=u}}catch(h){Ge(n,r,h)}}function Nn(n,r){var l=n.ref,u=n.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(h){Ge(n,r,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){Ge(n,r,h)}else l.current=null}function jm(n){var r=n.type,l=n.memoizedProps,u=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(h){Ge(n,n.return,h)}}function Tc(n,r,l){try{var u=n.stateNode;hS(u,n.type,l,r),u[Ut]=r}catch(h){Ge(n,n.return,h)}}function Vm(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Ri(n.type)||n.tag===4}function Lc(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Vm(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Ri(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Rc(n,r,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(n),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=Gn));else if(u!==4&&(u===27&&Ri(n.type)&&(l=n.stateNode,r=null),n=n.child,n!==null))for(Rc(n,r,l),n=n.sibling;n!==null;)Rc(n,r,l),n=n.sibling}function Do(n,r,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?l.insertBefore(n,r):l.appendChild(n);else if(u!==4&&(u===27&&Ri(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(Do(n,r,l),n=n.sibling;n!==null;)Do(n,r,l),n=n.sibling}function Gm(n){var r=n.stateNode,l=n.memoizedProps;try{for(var u=n.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);kt(r,u,l),r[xt]=n,r[Ut]=l}catch(m){Ge(n,n.return,m)}}var Jn=!1,ct=!1,Dc=!1,$m=typeof WeakSet=="function"?WeakSet:Set,vt=null;function F_(n,r){if(n=n.containerInfo,Wc=Wo,n=np(n),Cu(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var h=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{l.nodeType,m.nodeType}catch{l=null;break e}var _=0,E=-1,N=-1,B=0,Y=0,K=n,V=null;t:for(;;){for(var q;K!==l||h!==0&&K.nodeType!==3||(E=_+h),K!==m||u!==0&&K.nodeType!==3||(N=_+u),K.nodeType===3&&(_+=K.nodeValue.length),(q=K.firstChild)!==null;)V=K,K=q;for(;;){if(K===n)break t;if(V===l&&++B===h&&(E=_),V===m&&++Y===u&&(N=_),(q=K.nextSibling)!==null)break;K=V,V=K.parentNode}K=q}l=E===-1||N===-1?null:{start:E,end:N}}else l=null}l=l||{start:0,end:0}}else l=null;for(Jc={focusedElem:n,selectionRange:l},Wo=!1,vt=r;vt!==null;)if(r=vt,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,vt=n;else for(;vt!==null;){switch(r=vt,m=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(l=0;l<n.length;l++)h=n[l],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&m!==null){n=void 0,l=r,h=m.memoizedProps,m=m.memoizedState,u=l.stateNode;try{var de=nr(l.type,h);n=u.getSnapshotBeforeUpdate(de,m),u.__reactInternalSnapshotBeforeUpdate=n}catch(be){Ge(l,l.return,be)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,l=n.nodeType,l===9)nf(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":nf(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=r.sibling,n!==null){n.return=r.return,vt=n;break}vt=r.return}}function qm(n,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:ti(n,l),u&4&&Ka(5,l);break;case 1:if(ti(n,l),u&4)if(n=l.stateNode,r===null)try{n.componentDidMount()}catch(_){Ge(l,l.return,_)}else{var h=nr(l.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(h,r,n.__reactInternalSnapshotBeforeUpdate)}catch(_){Ge(l,l.return,_)}}u&64&&Pm(l),u&512&&Wa(l,l.return);break;case 3:if(ti(n,l),u&64&&(n=l.updateQueue,n!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{Lp(n,r)}catch(_){Ge(l,l.return,_)}}break;case 27:r===null&&u&4&&Gm(l);case 26:case 5:ti(n,l),r===null&&u&4&&jm(l),u&512&&Wa(l,l.return);break;case 12:ti(n,l);break;case 31:ti(n,l),u&4&&Xm(n,l);break;case 13:ti(n,l),u&4&&Qm(n,l),u&64&&(n=l.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(l=tS.bind(null,l),SS(n,l))));break;case 22:if(u=l.memoizedState!==null||Jn,!u){r=r!==null&&r.memoizedState!==null||ct,h=Jn;var m=ct;Jn=u,(ct=r)&&!m?ni(n,l,(l.subtreeFlags&8772)!==0):ti(n,l),Jn=h,ct=m}break;case 30:break;default:ti(n,l)}}function Fm(n){var r=n.alternate;r!==null&&(n.alternate=null,Fm(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&ou(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var tt=null,Pt=!1;function ei(n,r,l){for(l=l.child;l!==null;)Ym(n,r,l),l=l.sibling}function Ym(n,r,l){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Ot,l)}catch{}switch(l.tag){case 26:ct||Nn(l,r),ei(n,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:ct||Nn(l,r);var u=tt,h=Pt;Ri(l.type)&&(tt=l.stateNode,Pt=!1),ei(n,r,l),ol(l.stateNode),tt=u,Pt=h;break;case 5:ct||Nn(l,r);case 6:if(u=tt,h=Pt,tt=null,ei(n,r,l),tt=u,Pt=h,tt!==null)if(Pt)try{(tt.nodeType===9?tt.body:tt.nodeName==="HTML"?tt.ownerDocument.body:tt).removeChild(l.stateNode)}catch(m){Ge(l,r,m)}else try{tt.removeChild(l.stateNode)}catch(m){Ge(l,r,m)}break;case 18:tt!==null&&(Pt?(n=tt,Pg(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,l.stateNode),Wr(n)):Pg(tt,l.stateNode));break;case 4:u=tt,h=Pt,tt=l.stateNode.containerInfo,Pt=!0,ei(n,r,l),tt=u,Pt=h;break;case 0:case 11:case 14:case 15:xi(2,l,r),ct||xi(4,l,r),ei(n,r,l);break;case 1:ct||(Nn(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&Bm(l,r,u)),ei(n,r,l);break;case 21:ei(n,r,l);break;case 22:ct=(u=ct)||l.memoizedState!==null,ei(n,r,l),ct=u;break;default:ei(n,r,l)}}function Xm(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Wr(n)}catch(l){Ge(r,r.return,l)}}}function Qm(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Wr(n)}catch(l){Ge(r,r.return,l)}}function Y_(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new $m),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new $m),r;default:throw Error(a(435,n.tag))}}function No(n,r){var l=Y_(n);r.forEach(function(u){if(!l.has(u)){l.add(u);var h=nS.bind(null,n,u);u.then(h,h)}})}function Bt(n,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var h=l[u],m=n,_=r,E=_;e:for(;E!==null;){switch(E.tag){case 27:if(Ri(E.type)){tt=E.stateNode,Pt=!1;break e}break;case 5:tt=E.stateNode,Pt=!1;break e;case 3:case 4:tt=E.stateNode.containerInfo,Pt=!0;break e}E=E.return}if(tt===null)throw Error(a(160));Ym(m,_,h),tt=null,Pt=!1,m=h.alternate,m!==null&&(m.return=null),h.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Zm(r,n),r=r.sibling}var En=null;function Zm(n,r){var l=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Bt(r,n),jt(n),u&4&&(xi(3,n,n.return),Ka(3,n),xi(5,n,n.return));break;case 1:Bt(r,n),jt(n),u&512&&(ct||l===null||Nn(l,l.return)),u&64&&Jn&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(l=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var h=En;if(Bt(r,n),jt(n),u&512&&(ct||l===null||Nn(l,l.return)),u&4){var m=l!==null?l.memoizedState:null;if(u=n.memoizedState,l===null)if(u===null)if(n.stateNode===null){e:{u=n.type,l=n.memoizedProps,h=h.ownerDocument||h;t:switch(u){case"title":m=h.getElementsByTagName("title")[0],(!m||m[wa]||m[xt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=h.createElement(u),h.head.insertBefore(m,h.querySelector("head > title"))),kt(m,u,l),m[xt]=n,bt(m),u=m;break e;case"link":var _=Zg("link","href",h).get(u+(l.href||""));if(_){for(var E=0;E<_.length;E++)if(m=_[E],m.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&m.getAttribute("rel")===(l.rel==null?null:l.rel)&&m.getAttribute("title")===(l.title==null?null:l.title)&&m.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){_.splice(E,1);break t}}m=h.createElement(u),kt(m,u,l),h.head.appendChild(m);break;case"meta":if(_=Zg("meta","content",h).get(u+(l.content||""))){for(E=0;E<_.length;E++)if(m=_[E],m.getAttribute("content")===(l.content==null?null:""+l.content)&&m.getAttribute("name")===(l.name==null?null:l.name)&&m.getAttribute("property")===(l.property==null?null:l.property)&&m.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&m.getAttribute("charset")===(l.charSet==null?null:l.charSet)){_.splice(E,1);break t}}m=h.createElement(u),kt(m,u,l),h.head.appendChild(m);break;default:throw Error(a(468,u))}m[xt]=n,bt(m),u=m}n.stateNode=u}else Kg(h,n.type,n.stateNode);else n.stateNode=Qg(h,u,n.memoizedProps);else m!==u?(m===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):m.count--,u===null?Kg(h,n.type,n.stateNode):Qg(h,u,n.memoizedProps)):u===null&&n.stateNode!==null&&Tc(n,n.memoizedProps,l.memoizedProps)}break;case 27:Bt(r,n),jt(n),u&512&&(ct||l===null||Nn(l,l.return)),l!==null&&u&4&&Tc(n,n.memoizedProps,l.memoizedProps);break;case 5:if(Bt(r,n),jt(n),u&512&&(ct||l===null||Nn(l,l.return)),n.flags&32){h=n.stateNode;try{Sr(h,"")}catch(de){Ge(n,n.return,de)}}u&4&&n.stateNode!=null&&(h=n.memoizedProps,Tc(n,h,l!==null?l.memoizedProps:h)),u&1024&&(Dc=!0);break;case 6:if(Bt(r,n),jt(n),u&4){if(n.stateNode===null)throw Error(a(162));u=n.memoizedProps,l=n.stateNode;try{l.nodeValue=u}catch(de){Ge(n,n.return,de)}}break;case 3:if(Xo=null,h=En,En=Fo(r.containerInfo),Bt(r,n),En=h,jt(n),u&4&&l!==null&&l.memoizedState.isDehydrated)try{Wr(r.containerInfo)}catch(de){Ge(n,n.return,de)}Dc&&(Dc=!1,Km(n));break;case 4:u=En,En=Fo(n.stateNode.containerInfo),Bt(r,n),jt(n),En=u;break;case 12:Bt(r,n),jt(n);break;case 31:Bt(r,n),jt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,No(n,u)));break;case 13:Bt(r,n),jt(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Mo=Nt()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,No(n,u)));break;case 22:h=n.memoizedState!==null;var N=l!==null&&l.memoizedState!==null,B=Jn,Y=ct;if(Jn=B||h,ct=Y||N,Bt(r,n),ct=Y,Jn=B,jt(n),u&8192)e:for(r=n.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(l===null||N||Jn||ct||ir(n)),l=null,r=n;;){if(r.tag===5||r.tag===26){if(l===null){N=l=r;try{if(m=N.stateNode,h)_=m.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{E=N.stateNode;var K=N.memoizedProps.style,V=K!=null&&K.hasOwnProperty("display")?K.display:null;E.style.display=V==null||typeof V=="boolean"?"":(""+V).trim()}}catch(de){Ge(N,N.return,de)}}}else if(r.tag===6){if(l===null){N=r;try{N.stateNode.nodeValue=h?"":N.memoizedProps}catch(de){Ge(N,N.return,de)}}}else if(r.tag===18){if(l===null){N=r;try{var q=N.stateNode;h?Bg(q,!0):Bg(N.stateNode,!1)}catch(de){Ge(N,N.return,de)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=n.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,No(n,l))));break;case 19:Bt(r,n),jt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,No(n,u)));break;case 30:break;case 21:break;default:Bt(r,n),jt(n)}}function jt(n){var r=n.flags;if(r&2){try{for(var l,u=n.return;u!==null;){if(Vm(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var h=l.stateNode,m=Lc(n);Do(n,m,h);break;case 5:var _=l.stateNode;l.flags&32&&(Sr(_,""),l.flags&=-33);var E=Lc(n);Do(n,E,_);break;case 3:case 4:var N=l.stateNode.containerInfo,B=Lc(n);Rc(n,B,N);break;default:throw Error(a(161))}}catch(Y){Ge(n,n.return,Y)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function Km(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;Km(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function ti(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)qm(n,r.alternate,r),r=r.sibling}function ir(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:xi(4,r,r.return),ir(r);break;case 1:Nn(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Bm(r,r.return,l),ir(r);break;case 27:ol(r.stateNode);case 26:case 5:Nn(r,r.return),ir(r);break;case 22:r.memoizedState===null&&ir(r);break;case 30:ir(r);break;default:ir(r)}n=n.sibling}}function ni(n,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,h=n,m=r,_=m.flags;switch(m.tag){case 0:case 11:case 15:ni(h,m,l),Ka(4,m);break;case 1:if(ni(h,m,l),u=m,h=u.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(B){Ge(u,u.return,B)}if(u=m,h=u.updateQueue,h!==null){var E=u.stateNode;try{var N=h.shared.hiddenCallbacks;if(N!==null)for(h.shared.hiddenCallbacks=null,h=0;h<N.length;h++)Tp(N[h],E)}catch(B){Ge(u,u.return,B)}}l&&_&64&&Pm(m),Wa(m,m.return);break;case 27:Gm(m);case 26:case 5:ni(h,m,l),l&&u===null&&_&4&&jm(m),Wa(m,m.return);break;case 12:ni(h,m,l);break;case 31:ni(h,m,l),l&&_&4&&Xm(h,m);break;case 13:ni(h,m,l),l&&_&4&&Qm(h,m);break;case 22:m.memoizedState===null&&ni(h,m,l),Wa(m,m.return);break;case 30:break;default:ni(h,m,l)}r=r.sibling}}function Nc(n,r){var l=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==l&&(n!=null&&n.refCount++,l!=null&&Ha(l))}function Oc(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Ha(n))}function xn(n,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Wm(n,r,l,u),r=r.sibling}function Wm(n,r,l,u){var h=r.flags;switch(r.tag){case 0:case 11:case 15:xn(n,r,l,u),h&2048&&Ka(9,r);break;case 1:xn(n,r,l,u);break;case 3:xn(n,r,l,u),h&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Ha(n)));break;case 12:if(h&2048){xn(n,r,l,u),n=r.stateNode;try{var m=r.memoizedProps,_=m.id,E=m.onPostCommit;typeof E=="function"&&E(_,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(N){Ge(r,r.return,N)}}else xn(n,r,l,u);break;case 31:xn(n,r,l,u);break;case 13:xn(n,r,l,u);break;case 23:break;case 22:m=r.stateNode,_=r.alternate,r.memoizedState!==null?m._visibility&2?xn(n,r,l,u):Ja(n,r):m._visibility&2?xn(n,r,l,u):(m._visibility|=2,jr(n,r,l,u,(r.subtreeFlags&10256)!==0||!1)),h&2048&&Nc(_,r);break;case 24:xn(n,r,l,u),h&2048&&Oc(r.alternate,r);break;default:xn(n,r,l,u)}}function jr(n,r,l,u,h){for(h=h&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=n,_=r,E=l,N=u,B=_.flags;switch(_.tag){case 0:case 11:case 15:jr(m,_,E,N,h),Ka(8,_);break;case 23:break;case 22:var Y=_.stateNode;_.memoizedState!==null?Y._visibility&2?jr(m,_,E,N,h):Ja(m,_):(Y._visibility|=2,jr(m,_,E,N,h)),h&&B&2048&&Nc(_.alternate,_);break;case 24:jr(m,_,E,N,h),h&&B&2048&&Oc(_.alternate,_);break;default:jr(m,_,E,N,h)}r=r.sibling}}function Ja(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=n,u=r,h=u.flags;switch(u.tag){case 22:Ja(l,u),h&2048&&Nc(u.alternate,u);break;case 24:Ja(l,u),h&2048&&Oc(u.alternate,u);break;default:Ja(l,u)}r=r.sibling}}var el=8192;function Vr(n,r,l){if(n.subtreeFlags&el)for(n=n.child;n!==null;)Jm(n,r,l),n=n.sibling}function Jm(n,r,l){switch(n.tag){case 26:Vr(n,r,l),n.flags&el&&n.memoizedState!==null&&OS(l,En,n.memoizedState,n.memoizedProps);break;case 5:Vr(n,r,l);break;case 3:case 4:var u=En;En=Fo(n.stateNode.containerInfo),Vr(n,r,l),En=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=el,el=16777216,Vr(n,r,l),el=u):Vr(n,r,l));break;default:Vr(n,r,l)}}function eg(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function tl(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];vt=u,ng(u,n)}eg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)tg(n),n=n.sibling}function tg(n){switch(n.tag){case 0:case 11:case 15:tl(n),n.flags&2048&&xi(9,n,n.return);break;case 3:tl(n);break;case 12:tl(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,Oo(n)):tl(n);break;default:tl(n)}}function Oo(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];vt=u,ng(u,n)}eg(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:xi(8,r,r.return),Oo(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,Oo(r));break;default:Oo(r)}n=n.sibling}}function ng(n,r){for(;vt!==null;){var l=vt;switch(l.tag){case 0:case 11:case 15:xi(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Ha(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,vt=u;else e:for(l=n;vt!==null;){u=vt;var h=u.sibling,m=u.return;if(Fm(u),u===l){vt=null;break e}if(h!==null){h.return=m,vt=h;break e}vt=m}}}var X_={getCacheForType:function(n){var r=wt(ot),l=r.data.get(n);return l===void 0&&(l=n(),r.data.set(n,l)),l},cacheSignal:function(){return wt(ot).controller.signal}},Q_=typeof WeakMap=="function"?WeakMap:Map,He=0,Xe=null,De=null,Oe=0,Ve=0,Jt=null,Ci=!1,Gr=!1,Mc=!1,ii=0,it=0,wi=0,rr=0,Ic=0,en=0,$r=0,nl=null,Vt=null,zc=!1,Mo=0,ig=0,Io=1/0,zo=null,Ai=null,pt=0,ki=null,qr=null,ri=0,Uc=0,Hc=null,rg=null,il=0,Pc=null;function tn(){return(He&2)!==0&&Oe!==0?Oe&-Oe:H.T!==null?qc():_h()}function ag(){if(en===0)if((Oe&536870912)===0||Ie){var n=Gl;Gl<<=1,(Gl&3932160)===0&&(Gl=262144),en=n}else en=536870912;return n=Kt.current,n!==null&&(n.flags|=32),en}function Gt(n,r,l){(n===Xe&&(Ve===2||Ve===9)||n.cancelPendingCommit!==null)&&(Fr(n,0),Ti(n,Oe,en,!1)),Ca(n,l),((He&2)===0||n!==Xe)&&(n===Xe&&((He&2)===0&&(rr|=l),it===4&&Ti(n,Oe,en,!1)),On(n))}function lg(n,r,l){if((He&6)!==0)throw Error(a(327));var u=!l&&(r&127)===0&&(r&n.expiredLanes)===0||xa(n,r),h=u?W_(n,r):jc(n,r,!0),m=u;do{if(h===0){Gr&&!u&&Ti(n,r,0,!1);break}else{if(l=n.current.alternate,m&&!Z_(l)){h=jc(n,r,!1),m=!1;continue}if(h===2){if(m=r,n.errorRecoveryDisabledLanes&m)var _=0;else _=n.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){r=_;e:{var E=n;h=nl;var N=E.current.memoizedState.isDehydrated;if(N&&(Fr(E,_).flags|=256),_=jc(E,_,!1),_!==2){if(Mc&&!N){E.errorRecoveryDisabledLanes|=m,rr|=m,h=4;break e}m=Vt,Vt=h,m!==null&&(Vt===null?Vt=m:Vt.push.apply(Vt,m))}h=_}if(m=!1,h!==2)continue}}if(h===1){Fr(n,0),Ti(n,r,0,!0);break}e:{switch(u=n,m=h,m){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Ti(u,r,en,!Ci);break e;case 2:Vt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(h=Mo+300-Nt(),10<h)){if(Ti(u,r,en,!Ci),ql(u,0,!0)!==0)break e;ri=r,u.timeoutHandle=Ug(og.bind(null,u,l,Vt,zo,zc,r,en,rr,$r,Ci,m,"Throttled",-0,0),h);break e}og(u,l,Vt,zo,zc,r,en,rr,$r,Ci,m,null,-0,0)}}break}while(!0);On(n)}function og(n,r,l,u,h,m,_,E,N,B,Y,K,V,q){if(n.timeoutHandle=-1,K=r.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Gn},Jm(r,m,K);var de=(m&62914560)===m?Mo-Nt():(m&4194048)===m?ig-Nt():0;if(de=MS(K,de),de!==null){ri=m,n.cancelPendingCommit=de(mg.bind(null,n,r,m,l,u,h,_,E,N,Y,K,null,V,q)),Ti(n,m,_,!B);return}}mg(n,r,m,l,u,h,_,E,N)}function Z_(n){for(var r=n;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var h=l[u],m=h.getSnapshot;h=h.value;try{if(!Qt(m(),h))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ti(n,r,l,u){r&=~Ic,r&=~rr,n.suspendedLanes|=r,n.pingedLanes&=~r,u&&(n.warmLanes|=r),u=n.expirationTimes;for(var h=r;0<h;){var m=31-Ye(h),_=1<<m;u[m]=-1,h&=~_}l!==0&&yh(n,l,r)}function Uo(){return(He&6)===0?(rl(0),!1):!0}function Bc(){if(De!==null){if(Ve===0)var n=De.return;else n=De,Yn=Qi=null,nc(n),zr=null,Ba=0,n=De;for(;n!==null;)Hm(n.alternate,n),n=n.return;De=null}}function Fr(n,r){var l=n.timeoutHandle;l!==-1&&(n.timeoutHandle=-1,gS(l)),l=n.cancelPendingCommit,l!==null&&(n.cancelPendingCommit=null,l()),ri=0,Bc(),Xe=n,De=l=qn(n.current,null),Oe=r,Ve=0,Jt=null,Ci=!1,Gr=xa(n,r),Mc=!1,$r=en=Ic=rr=wi=it=0,Vt=nl=null,zc=!1,(r&8)!==0&&(r|=r&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=r;0<u;){var h=31-Ye(u),m=1<<h;r|=n[h],u&=~m}return ii=r,io(),l}function sg(n,r){xe=null,H.H=Xa,r===Ir||r===fo?(r=Cp(),Ve=3):r===$u?(r=Cp(),Ve=4):Ve=r===bc?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Jt=r,De===null&&(it=1,Ao(n,sn(r,n.current)))}function ug(){var n=Kt.current;return n===null?!0:(Oe&4194048)===Oe?dn===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?n===dn:!1}function cg(){var n=H.H;return H.H=Xa,n===null?Xa:n}function fg(){var n=H.A;return H.A=X_,n}function Ho(){it=4,Ci||(Oe&4194048)!==Oe&&Kt.current!==null||(Gr=!0),(wi&134217727)===0&&(rr&134217727)===0||Xe===null||Ti(Xe,Oe,en,!1)}function jc(n,r,l){var u=He;He|=2;var h=cg(),m=fg();(Xe!==n||Oe!==r)&&(zo=null,Fr(n,r)),r=!1;var _=it;e:do try{if(Ve!==0&&De!==null){var E=De,N=Jt;switch(Ve){case 8:Bc(),_=6;break e;case 3:case 2:case 9:case 6:Kt.current===null&&(r=!0);var B=Ve;if(Ve=0,Jt=null,Yr(n,E,N,B),l&&Gr){_=0;break e}break;default:B=Ve,Ve=0,Jt=null,Yr(n,E,N,B)}}K_(),_=it;break}catch(Y){sg(n,Y)}while(!0);return r&&n.shellSuspendCounter++,Yn=Qi=null,He=u,H.H=h,H.A=m,De===null&&(Xe=null,Oe=0,io()),_}function K_(){for(;De!==null;)dg(De)}function W_(n,r){var l=He;He|=2;var u=cg(),h=fg();Xe!==n||Oe!==r?(zo=null,Io=Nt()+500,Fr(n,r)):Gr=xa(n,r);e:do try{if(Ve!==0&&De!==null){r=De;var m=Jt;t:switch(Ve){case 1:Ve=0,Jt=null,Yr(n,r,m,1);break;case 2:case 9:if(Ep(m)){Ve=0,Jt=null,hg(r);break}r=function(){Ve!==2&&Ve!==9||Xe!==n||(Ve=7),On(n)},m.then(r,r);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:Ep(m)?(Ve=0,Jt=null,hg(r)):(Ve=0,Jt=null,Yr(n,r,m,7));break;case 5:var _=null;switch(De.tag){case 26:_=De.memoizedState;case 5:case 27:var E=De;if(_?Wg(_):E.stateNode.complete){Ve=0,Jt=null;var N=E.sibling;if(N!==null)De=N;else{var B=E.return;B!==null?(De=B,Po(B)):De=null}break t}}Ve=0,Jt=null,Yr(n,r,m,5);break;case 6:Ve=0,Jt=null,Yr(n,r,m,6);break;case 8:Bc(),it=6;break e;default:throw Error(a(462))}}J_();break}catch(Y){sg(n,Y)}while(!0);return Yn=Qi=null,H.H=u,H.A=h,He=l,De!==null?0:(Xe=null,Oe=0,io(),it)}function J_(){for(;De!==null&&!eu();)dg(De)}function dg(n){var r=zm(n.alternate,n,ii);n.memoizedProps=n.pendingProps,r===null?Po(n):De=r}function hg(n){var r=n,l=r.alternate;switch(r.tag){case 15:case 0:r=Rm(l,r,r.pendingProps,r.type,void 0,Oe);break;case 11:r=Rm(l,r,r.pendingProps,r.type.render,r.ref,Oe);break;case 5:nc(r);default:Hm(l,r),r=De=fp(r,ii),r=zm(l,r,ii)}n.memoizedProps=n.pendingProps,r===null?Po(n):De=r}function Yr(n,r,l,u){Yn=Qi=null,nc(r),zr=null,Ba=0;var h=r.return;try{if(j_(n,h,r,l,Oe)){it=1,Ao(n,sn(l,n.current)),De=null;return}}catch(m){if(h!==null)throw De=h,m;it=1,Ao(n,sn(l,n.current)),De=null;return}r.flags&32768?(Ie||u===1?n=!0:Gr||(Oe&536870912)!==0?n=!1:(Ci=n=!0,(u===2||u===9||u===3||u===6)&&(u=Kt.current,u!==null&&u.tag===13&&(u.flags|=16384))),pg(r,n)):Po(r)}function Po(n){var r=n;do{if((r.flags&32768)!==0){pg(r,Ci);return}n=r.return;var l=$_(r.alternate,r,ii);if(l!==null){De=l;return}if(r=r.sibling,r!==null){De=r;return}De=r=n}while(r!==null);it===0&&(it=5)}function pg(n,r){do{var l=q_(n.alternate,n);if(l!==null){l.flags&=32767,De=l;return}if(l=n.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(n=n.sibling,n!==null)){De=n;return}De=n=l}while(n!==null);it=6,De=null}function mg(n,r,l,u,h,m,_,E,N){n.cancelPendingCommit=null;do Bo();while(pt!==0);if((He&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));if(m=r.lanes|r.childLanes,m|=Lu,N1(n,l,m,_,E,N),n===Xe&&(De=Xe=null,Oe=0),qr=r,ki=n,ri=l,Uc=m,Hc=h,rg=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,iS(ve,function(){return _g(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=H.T,H.T=null,h=X.p,X.p=2,_=He,He|=4;try{F_(n,r,l)}finally{He=_,X.p=h,H.T=u}}pt=1,gg(),yg(),bg()}}function gg(){if(pt===1){pt=0;var n=ki,r=qr,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=H.T,H.T=null;var u=X.p;X.p=2;var h=He;He|=4;try{Zm(r,n);var m=Jc,_=np(n.containerInfo),E=m.focusedElem,N=m.selectionRange;if(_!==E&&E&&E.ownerDocument&&tp(E.ownerDocument.documentElement,E)){if(N!==null&&Cu(E)){var B=N.start,Y=N.end;if(Y===void 0&&(Y=B),"selectionStart"in E)E.selectionStart=B,E.selectionEnd=Math.min(Y,E.value.length);else{var K=E.ownerDocument||document,V=K&&K.defaultView||window;if(V.getSelection){var q=V.getSelection(),de=E.textContent.length,be=Math.min(N.start,de),Fe=N.end===void 0?be:Math.min(N.end,de);!q.extend&&be>Fe&&(_=Fe,Fe=be,be=_);var U=ep(E,be),M=ep(E,Fe);if(U&&M&&(q.rangeCount!==1||q.anchorNode!==U.node||q.anchorOffset!==U.offset||q.focusNode!==M.node||q.focusOffset!==M.offset)){var P=K.createRange();P.setStart(U.node,U.offset),q.removeAllRanges(),be>Fe?(q.addRange(P),q.extend(M.node,M.offset)):(P.setEnd(M.node,M.offset),q.addRange(P))}}}}for(K=[],q=E;q=q.parentNode;)q.nodeType===1&&K.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<K.length;E++){var Z=K[E];Z.element.scrollLeft=Z.left,Z.element.scrollTop=Z.top}}Wo=!!Wc,Jc=Wc=null}finally{He=h,X.p=u,H.T=l}}n.current=r,pt=2}}function yg(){if(pt===2){pt=0;var n=ki,r=qr,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=H.T,H.T=null;var u=X.p;X.p=2;var h=He;He|=4;try{qm(n,r.alternate,r)}finally{He=h,X.p=u,H.T=l}}pt=3}}function bg(){if(pt===4||pt===3){pt=0,tu();var n=ki,r=qr,l=ri,u=rg;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?pt=5:(pt=0,qr=ki=null,vg(n,n.pendingLanes));var h=n.pendingLanes;if(h===0&&(Ai=null),au(l),r=r.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(Ot,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=H.T,h=X.p,X.p=2,H.T=null;try{for(var m=n.onRecoverableError,_=0;_<u.length;_++){var E=u[_];m(E.value,{componentStack:E.stack})}}finally{H.T=r,X.p=h}}(ri&3)!==0&&Bo(),On(n),h=n.pendingLanes,(l&261930)!==0&&(h&42)!==0?n===Pc?il++:(il=0,Pc=n):il=0,rl(0)}}function vg(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,Ha(r)))}function Bo(){return gg(),yg(),bg(),_g()}function _g(){if(pt!==5)return!1;var n=ki,r=Uc;Uc=0;var l=au(ri),u=H.T,h=X.p;try{X.p=32>l?32:l,H.T=null,l=Hc,Hc=null;var m=ki,_=ri;if(pt=0,qr=ki=null,ri=0,(He&6)!==0)throw Error(a(331));var E=He;if(He|=4,tg(m.current),Wm(m,m.current,_,l),He=E,rl(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Ot,m)}catch{}return!0}finally{X.p=h,H.T=u,vg(n,r)}}function Sg(n,r,l){r=sn(l,r),r=yc(n.stateNode,r,2),n=_i(n,r,2),n!==null&&(Ca(n,2),On(n))}function Ge(n,r,l){if(n.tag===3)Sg(n,n,l);else for(;r!==null;){if(r.tag===3){Sg(r,n,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Ai===null||!Ai.has(u))){n=sn(l,n),l=Em(2),u=_i(r,l,2),u!==null&&(xm(l,u,r,n),Ca(u,2),On(u));break}}r=r.return}}function Vc(n,r,l){var u=n.pingCache;if(u===null){u=n.pingCache=new Q_;var h=new Set;u.set(r,h)}else h=u.get(r),h===void 0&&(h=new Set,u.set(r,h));h.has(l)||(Mc=!0,h.add(l),n=eS.bind(null,n,r,l),r.then(n,n))}function eS(n,r,l){var u=n.pingCache;u!==null&&u.delete(r),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,Xe===n&&(Oe&l)===l&&(it===4||it===3&&(Oe&62914560)===Oe&&300>Nt()-Mo?(He&2)===0&&Fr(n,0):Ic|=l,$r===Oe&&($r=0)),On(n)}function Eg(n,r){r===0&&(r=gh()),n=Fi(n,r),n!==null&&(Ca(n,r),On(n))}function tS(n){var r=n.memoizedState,l=0;r!==null&&(l=r.retryLane),Eg(n,l)}function nS(n,r){var l=0;switch(n.tag){case 31:case 13:var u=n.stateNode,h=n.memoizedState;h!==null&&(l=h.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),Eg(n,l)}function iS(n,r){return pr(n,r)}var jo=null,Xr=null,Gc=!1,Vo=!1,$c=!1,Li=0;function On(n){n!==Xr&&n.next===null&&(Xr===null?jo=Xr=n:Xr=Xr.next=n),Vo=!0,Gc||(Gc=!0,aS())}function rl(n,r){if(!$c&&Vo){$c=!0;do for(var l=!1,u=jo;u!==null;){if(n!==0){var h=u.pendingLanes;if(h===0)var m=0;else{var _=u.suspendedLanes,E=u.pingedLanes;m=(1<<31-Ye(42|n)+1)-1,m&=h&~(_&~E),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(l=!0,Ag(u,m))}else m=Oe,m=ql(u,u===Xe?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||xa(u,m)||(l=!0,Ag(u,m));u=u.next}while(l);$c=!1}}function rS(){xg()}function xg(){Vo=Gc=!1;var n=0;Li!==0&&mS()&&(n=Li);for(var r=Nt(),l=null,u=jo;u!==null;){var h=u.next,m=Cg(u,r);m===0?(u.next=null,l===null?jo=h:l.next=h,h===null&&(Xr=l)):(l=u,(n!==0||(m&3)!==0)&&(Vo=!0)),u=h}pt!==0&&pt!==5||rl(n),Li!==0&&(Li=0)}function Cg(n,r){for(var l=n.suspendedLanes,u=n.pingedLanes,h=n.expirationTimes,m=n.pendingLanes&-62914561;0<m;){var _=31-Ye(m),E=1<<_,N=h[_];N===-1?((E&l)===0||(E&u)!==0)&&(h[_]=D1(E,r)):N<=r&&(n.expiredLanes|=E),m&=~E}if(r=Xe,l=Oe,l=ql(n,n===r?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,l===0||n===r&&(Ve===2||Ve===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&Ea(u),n.callbackNode=null,n.callbackPriority=0;if((l&3)===0||xa(n,l)){if(r=l&-l,r===n.callbackPriority)return r;switch(u!==null&&Ea(u),au(l)){case 2:case 8:l=se;break;case 32:l=ve;break;case 268435456:l=Be;break;default:l=ve}return u=wg.bind(null,n),l=pr(l,u),n.callbackPriority=r,n.callbackNode=l,r}return u!==null&&u!==null&&Ea(u),n.callbackPriority=2,n.callbackNode=null,2}function wg(n,r){if(pt!==0&&pt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var l=n.callbackNode;if(Bo()&&n.callbackNode!==l)return null;var u=Oe;return u=ql(n,n===Xe?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(lg(n,u,r),Cg(n,Nt()),n.callbackNode!=null&&n.callbackNode===l?wg.bind(null,n):null)}function Ag(n,r){if(Bo())return null;lg(n,r,!0)}function aS(){yS(function(){(He&6)!==0?pr(Q,rS):xg()})}function qc(){if(Li===0){var n=Or;n===0&&(n=Vl,Vl<<=1,(Vl&261888)===0&&(Vl=256)),Li=n}return Li}function kg(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Ql(""+n)}function Tg(n,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,n.id&&l.setAttribute("form",n.id),r.parentNode.insertBefore(l,r),n=new FormData(n),l.parentNode.removeChild(l),n}function lS(n,r,l,u,h){if(r==="submit"&&l&&l.stateNode===h){var m=kg((h[Ut]||null).action),_=u.submitter;_&&(r=(r=_[Ut]||null)?kg(r.formAction):_.getAttribute("formAction"),r!==null&&(m=r,_=null));var E=new Jl("action","action",null,u,h);n.push({event:E,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Li!==0){var N=_?Tg(h,_):new FormData(h);fc(l,{pending:!0,data:N,method:h.method,action:m},null,N)}}else typeof m=="function"&&(E.preventDefault(),N=_?Tg(h,_):new FormData(h),fc(l,{pending:!0,data:N,method:h.method,action:m},m,N))},currentTarget:h}]})}}for(var Fc=0;Fc<Tu.length;Fc++){var Yc=Tu[Fc],oS=Yc.toLowerCase(),sS=Yc[0].toUpperCase()+Yc.slice(1);Sn(oS,"on"+sS)}Sn(ap,"onAnimationEnd"),Sn(lp,"onAnimationIteration"),Sn(op,"onAnimationStart"),Sn("dblclick","onDoubleClick"),Sn("focusin","onFocus"),Sn("focusout","onBlur"),Sn(C_,"onTransitionRun"),Sn(w_,"onTransitionStart"),Sn(A_,"onTransitionCancel"),Sn(sp,"onTransitionEnd"),vr("onMouseEnter",["mouseout","mouseover"]),vr("onMouseLeave",["mouseout","mouseover"]),vr("onPointerEnter",["pointerout","pointerover"]),vr("onPointerLeave",["pointerout","pointerover"]),Vi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var al="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),uS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(al));function Lg(n,r){r=(r&4)!==0;for(var l=0;l<n.length;l++){var u=n[l],h=u.event;u=u.listeners;e:{var m=void 0;if(r)for(var _=u.length-1;0<=_;_--){var E=u[_],N=E.instance,B=E.currentTarget;if(E=E.listener,N!==m&&h.isPropagationStopped())break e;m=E,h.currentTarget=B;try{m(h)}catch(Y){no(Y)}h.currentTarget=null,m=N}else for(_=0;_<u.length;_++){if(E=u[_],N=E.instance,B=E.currentTarget,E=E.listener,N!==m&&h.isPropagationStopped())break e;m=E,h.currentTarget=B;try{m(h)}catch(Y){no(Y)}h.currentTarget=null,m=N}}}}function Ne(n,r){var l=r[lu];l===void 0&&(l=r[lu]=new Set);var u=n+"__bubble";l.has(u)||(Rg(r,n,2,!1),l.add(u))}function Xc(n,r,l){var u=0;r&&(u|=4),Rg(l,n,u,r)}var Go="_reactListening"+Math.random().toString(36).slice(2);function Qc(n){if(!n[Go]){n[Go]=!0,xh.forEach(function(l){l!=="selectionchange"&&(uS.has(l)||Xc(l,!1,n),Xc(l,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Go]||(r[Go]=!0,Xc("selectionchange",!1,r))}}function Rg(n,r,l,u){switch(ay(r)){case 2:var h=US;break;case 8:h=HS;break;default:h=ff}l=h.bind(null,r,l,n),h=void 0,!mu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),u?h!==void 0?n.addEventListener(r,l,{capture:!0,passive:h}):n.addEventListener(r,l,!0):h!==void 0?n.addEventListener(r,l,{passive:h}):n.addEventListener(r,l,!1)}function Zc(n,r,l,u,h){var m=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var _=u.tag;if(_===3||_===4){var E=u.stateNode.containerInfo;if(E===h)break;if(_===4)for(_=u.return;_!==null;){var N=_.tag;if((N===3||N===4)&&_.stateNode.containerInfo===h)return;_=_.return}for(;E!==null;){if(_=gr(E),_===null)return;if(N=_.tag,N===5||N===6||N===26||N===27){u=m=_;continue e}E=E.parentNode}}u=u.return}Ih(function(){var B=m,Y=hu(l),K=[];e:{var V=up.get(n);if(V!==void 0){var q=Jl,de=n;switch(n){case"keypress":if(Kl(l)===0)break e;case"keydown":case"keyup":q=n_;break;case"focusin":de="focus",q=vu;break;case"focusout":de="blur",q=vu;break;case"beforeblur":case"afterblur":q=vu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=Hh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=$1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=a_;break;case ap:case lp:case op:q=Y1;break;case sp:q=o_;break;case"scroll":case"scrollend":q=V1;break;case"wheel":q=u_;break;case"copy":case"cut":case"paste":q=Q1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Bh;break;case"toggle":case"beforetoggle":q=f_}var be=(r&4)!==0,Fe=!be&&(n==="scroll"||n==="scrollend"),U=be?V!==null?V+"Capture":null:V;be=[];for(var M=B,P;M!==null;){var Z=M;if(P=Z.stateNode,Z=Z.tag,Z!==5&&Z!==26&&Z!==27||P===null||U===null||(Z=ka(M,U),Z!=null&&be.push(ll(M,Z,P))),Fe)break;M=M.return}0<be.length&&(V=new q(V,de,null,l,Y),K.push({event:V,listeners:be}))}}if((r&7)===0){e:{if(V=n==="mouseover"||n==="pointerover",q=n==="mouseout"||n==="pointerout",V&&l!==du&&(de=l.relatedTarget||l.fromElement)&&(gr(de)||de[mr]))break e;if((q||V)&&(V=Y.window===Y?Y:(V=Y.ownerDocument)?V.defaultView||V.parentWindow:window,q?(de=l.relatedTarget||l.toElement,q=B,de=de?gr(de):null,de!==null&&(Fe=s(de),be=de.tag,de!==Fe||be!==5&&be!==27&&be!==6)&&(de=null)):(q=null,de=B),q!==de)){if(be=Hh,Z="onMouseLeave",U="onMouseEnter",M="mouse",(n==="pointerout"||n==="pointerover")&&(be=Bh,Z="onPointerLeave",U="onPointerEnter",M="pointer"),Fe=q==null?V:Aa(q),P=de==null?V:Aa(de),V=new be(Z,M+"leave",q,l,Y),V.target=Fe,V.relatedTarget=P,Z=null,gr(Y)===B&&(be=new be(U,M+"enter",de,l,Y),be.target=P,be.relatedTarget=Fe,Z=be),Fe=Z,q&&de)t:{for(be=cS,U=q,M=de,P=0,Z=U;Z;Z=be(Z))P++;Z=0;for(var ge=M;ge;ge=be(ge))Z++;for(;0<P-Z;)U=be(U),P--;for(;0<Z-P;)M=be(M),Z--;for(;P--;){if(U===M||M!==null&&U===M.alternate){be=U;break t}U=be(U),M=be(M)}be=null}else be=null;q!==null&&Dg(K,V,q,be,!1),de!==null&&Fe!==null&&Dg(K,Fe,de,be,!0)}}e:{if(V=B?Aa(B):window,q=V.nodeName&&V.nodeName.toLowerCase(),q==="select"||q==="input"&&V.type==="file")var ze=Xh;else if(Fh(V))if(Qh)ze=S_;else{ze=v_;var pe=b_}else q=V.nodeName,!q||q.toLowerCase()!=="input"||V.type!=="checkbox"&&V.type!=="radio"?B&&fu(B.elementType)&&(ze=Xh):ze=__;if(ze&&(ze=ze(n,B))){Yh(K,ze,l,Y);break e}pe&&pe(n,V,B),n==="focusout"&&B&&V.type==="number"&&B.memoizedProps.value!=null&&cu(V,"number",V.value)}switch(pe=B?Aa(B):window,n){case"focusin":(Fh(pe)||pe.contentEditable==="true")&&(wr=pe,wu=B,Ia=null);break;case"focusout":Ia=wu=wr=null;break;case"mousedown":Au=!0;break;case"contextmenu":case"mouseup":case"dragend":Au=!1,ip(K,l,Y);break;case"selectionchange":if(x_)break;case"keydown":case"keyup":ip(K,l,Y)}var Ce;if(Su)e:{switch(n){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else Cr?$h(n,l)&&(Me="onCompositionEnd"):n==="keydown"&&l.keyCode===229&&(Me="onCompositionStart");Me&&(jh&&l.locale!=="ko"&&(Cr||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&Cr&&(Ce=zh()):(hi=Y,gu="value"in hi?hi.value:hi.textContent,Cr=!0)),pe=$o(B,Me),0<pe.length&&(Me=new Ph(Me,n,null,l,Y),K.push({event:Me,listeners:pe}),Ce?Me.data=Ce:(Ce=qh(l),Ce!==null&&(Me.data=Ce)))),(Ce=h_?p_(n,l):m_(n,l))&&(Me=$o(B,"onBeforeInput"),0<Me.length&&(pe=new Ph("onBeforeInput","beforeinput",null,l,Y),K.push({event:pe,listeners:Me}),pe.data=Ce)),lS(K,n,B,l,Y)}Lg(K,r)})}function ll(n,r,l){return{instance:n,listener:r,currentTarget:l}}function $o(n,r){for(var l=r+"Capture",u=[];n!==null;){var h=n,m=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||m===null||(h=ka(n,l),h!=null&&u.unshift(ll(n,h,m)),h=ka(n,r),h!=null&&u.push(ll(n,h,m))),n.tag===3)return u;n=n.return}return[]}function cS(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Dg(n,r,l,u,h){for(var m=r._reactName,_=[];l!==null&&l!==u;){var E=l,N=E.alternate,B=E.stateNode;if(E=E.tag,N!==null&&N===u)break;E!==5&&E!==26&&E!==27||B===null||(N=B,h?(B=ka(l,m),B!=null&&_.unshift(ll(l,B,N))):h||(B=ka(l,m),B!=null&&_.push(ll(l,B,N)))),l=l.return}_.length!==0&&n.push({event:r,listeners:_})}var fS=/\r\n?/g,dS=/\u0000|\uFFFD/g;function Ng(n){return(typeof n=="string"?n:""+n).replace(fS,`
10
+ `).replace(dS,"")}function Og(n,r){return r=Ng(r),Ng(n)===r}function qe(n,r,l,u,h,m){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||Sr(n,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&Sr(n,""+u);break;case"className":Yl(n,"class",u);break;case"tabIndex":Yl(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Yl(n,l,u);break;case"style":Oh(n,u,m);break;case"data":if(r!=="object"){Yl(n,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||l!=="href")){n.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=Ql(""+u),n.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(l==="formAction"?(r!=="input"&&qe(n,r,"name",h.name,h,null),qe(n,r,"formEncType",h.formEncType,h,null),qe(n,r,"formMethod",h.formMethod,h,null),qe(n,r,"formTarget",h.formTarget,h,null)):(qe(n,r,"encType",h.encType,h,null),qe(n,r,"method",h.method,h,null),qe(n,r,"target",h.target,h,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=Ql(""+u),n.setAttribute(l,u);break;case"onClick":u!=null&&(n.onclick=Gn);break;case"onScroll":u!=null&&Ne("scroll",n);break;case"onScrollEnd":u!=null&&Ne("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(h.children!=null)throw Error(a(60));n.innerHTML=l}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}l=Ql(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,""+u):n.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,""):n.removeAttribute(l);break;case"capture":case"download":u===!0?n.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,u):n.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(l,u):n.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(l):n.setAttribute(l,u);break;case"popover":Ne("beforetoggle",n),Ne("toggle",n),Fl(n,"popover",u);break;case"xlinkActuate":Vn(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Vn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Vn(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Vn(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Vn(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Vn(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Vn(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Vn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Vn(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Fl(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=B1.get(l)||l,Fl(n,l,u))}}function Kc(n,r,l,u,h,m){switch(l){case"style":Oh(n,u,m);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(h.children!=null)throw Error(a(60));n.innerHTML=l}}break;case"children":typeof u=="string"?Sr(n,u):(typeof u=="number"||typeof u=="bigint")&&Sr(n,""+u);break;case"onScroll":u!=null&&Ne("scroll",n);break;case"onScrollEnd":u!=null&&Ne("scrollend",n);break;case"onClick":u!=null&&(n.onclick=Gn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ch.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),r=l.slice(2,h?l.length-7:void 0),m=n[Ut]||null,m=m!=null?m[l]:null,typeof m=="function"&&n.removeEventListener(r,m,h),typeof u=="function")){typeof m!="function"&&m!==null&&(l in n?n[l]=null:n.hasAttribute(l)&&n.removeAttribute(l)),n.addEventListener(r,u,h);break e}l in n?n[l]=u:u===!0?n.setAttribute(l,""):Fl(n,l,u)}}}function kt(n,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",n),Ne("load",n);var u=!1,h=!1,m;for(m in l)if(l.hasOwnProperty(m)){var _=l[m];if(_!=null)switch(m){case"src":u=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:qe(n,r,m,_,l,null)}}h&&qe(n,r,"srcSet",l.srcSet,l,null),u&&qe(n,r,"src",l.src,l,null);return;case"input":Ne("invalid",n);var E=m=_=h=null,N=null,B=null;for(u in l)if(l.hasOwnProperty(u)){var Y=l[u];if(Y!=null)switch(u){case"name":h=Y;break;case"type":_=Y;break;case"checked":N=Y;break;case"defaultChecked":B=Y;break;case"value":m=Y;break;case"defaultValue":E=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(a(137,r));break;default:qe(n,r,u,Y,l,null)}}Lh(n,m,E,N,B,_,h,!1);return;case"select":Ne("invalid",n),u=_=m=null;for(h in l)if(l.hasOwnProperty(h)&&(E=l[h],E!=null))switch(h){case"value":m=E;break;case"defaultValue":_=E;break;case"multiple":u=E;default:qe(n,r,h,E,l,null)}r=m,l=_,n.multiple=!!u,r!=null?_r(n,!!u,r,!1):l!=null&&_r(n,!!u,l,!0);return;case"textarea":Ne("invalid",n),m=h=u=null;for(_ in l)if(l.hasOwnProperty(_)&&(E=l[_],E!=null))switch(_){case"value":u=E;break;case"defaultValue":h=E;break;case"children":m=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(a(91));break;default:qe(n,r,_,E,l,null)}Dh(n,u,h,m);return;case"option":for(N in l)l.hasOwnProperty(N)&&(u=l[N],u!=null)&&(N==="selected"?n.selected=u&&typeof u!="function"&&typeof u!="symbol":qe(n,r,N,u,l,null));return;case"dialog":Ne("beforetoggle",n),Ne("toggle",n),Ne("cancel",n),Ne("close",n);break;case"iframe":case"object":Ne("load",n);break;case"video":case"audio":for(u=0;u<al.length;u++)Ne(al[u],n);break;case"image":Ne("error",n),Ne("load",n);break;case"details":Ne("toggle",n);break;case"embed":case"source":case"link":Ne("error",n),Ne("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(B in l)if(l.hasOwnProperty(B)&&(u=l[B],u!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:qe(n,r,B,u,l,null)}return;default:if(fu(r)){for(Y in l)l.hasOwnProperty(Y)&&(u=l[Y],u!==void 0&&Kc(n,r,Y,u,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(u=l[E],u!=null&&qe(n,r,E,u,l,null))}function hS(n,r,l,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,m=null,_=null,E=null,N=null,B=null,Y=null;for(q in l){var K=l[q];if(l.hasOwnProperty(q)&&K!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":N=K;default:u.hasOwnProperty(q)||qe(n,r,q,null,u,K)}}for(var V in u){var q=u[V];if(K=l[V],u.hasOwnProperty(V)&&(q!=null||K!=null))switch(V){case"type":m=q;break;case"name":h=q;break;case"checked":B=q;break;case"defaultChecked":Y=q;break;case"value":_=q;break;case"defaultValue":E=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(a(137,r));break;default:q!==K&&qe(n,r,V,q,u,K)}}uu(n,_,E,N,B,Y,m,h);return;case"select":q=_=E=V=null;for(m in l)if(N=l[m],l.hasOwnProperty(m)&&N!=null)switch(m){case"value":break;case"multiple":q=N;default:u.hasOwnProperty(m)||qe(n,r,m,null,u,N)}for(h in u)if(m=u[h],N=l[h],u.hasOwnProperty(h)&&(m!=null||N!=null))switch(h){case"value":V=m;break;case"defaultValue":E=m;break;case"multiple":_=m;default:m!==N&&qe(n,r,h,m,u,N)}r=E,l=_,u=q,V!=null?_r(n,!!l,V,!1):!!u!=!!l&&(r!=null?_r(n,!!l,r,!0):_r(n,!!l,l?[]:"",!1));return;case"textarea":q=V=null;for(E in l)if(h=l[E],l.hasOwnProperty(E)&&h!=null&&!u.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:qe(n,r,E,null,u,h)}for(_ in u)if(h=u[_],m=l[_],u.hasOwnProperty(_)&&(h!=null||m!=null))switch(_){case"value":V=h;break;case"defaultValue":q=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(a(91));break;default:h!==m&&qe(n,r,_,h,u,m)}Rh(n,V,q);return;case"option":for(var de in l)V=l[de],l.hasOwnProperty(de)&&V!=null&&!u.hasOwnProperty(de)&&(de==="selected"?n.selected=!1:qe(n,r,de,null,u,V));for(N in u)V=u[N],q=l[N],u.hasOwnProperty(N)&&V!==q&&(V!=null||q!=null)&&(N==="selected"?n.selected=V&&typeof V!="function"&&typeof V!="symbol":qe(n,r,N,V,u,q));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var be in l)V=l[be],l.hasOwnProperty(be)&&V!=null&&!u.hasOwnProperty(be)&&qe(n,r,be,null,u,V);for(B in u)if(V=u[B],q=l[B],u.hasOwnProperty(B)&&V!==q&&(V!=null||q!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(a(137,r));break;default:qe(n,r,B,V,u,q)}return;default:if(fu(r)){for(var Fe in l)V=l[Fe],l.hasOwnProperty(Fe)&&V!==void 0&&!u.hasOwnProperty(Fe)&&Kc(n,r,Fe,void 0,u,V);for(Y in u)V=u[Y],q=l[Y],!u.hasOwnProperty(Y)||V===q||V===void 0&&q===void 0||Kc(n,r,Y,V,u,q);return}}for(var U in l)V=l[U],l.hasOwnProperty(U)&&V!=null&&!u.hasOwnProperty(U)&&qe(n,r,U,null,u,V);for(K in u)V=u[K],q=l[K],!u.hasOwnProperty(K)||V===q||V==null&&q==null||qe(n,r,K,V,u,q)}function Mg(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function pS(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var h=l[u],m=h.transferSize,_=h.initiatorType,E=h.duration;if(m&&E&&Mg(_)){for(_=0,E=h.responseEnd,u+=1;u<l.length;u++){var N=l[u],B=N.startTime;if(B>E)break;var Y=N.transferSize,K=N.initiatorType;Y&&Mg(K)&&(N=N.responseEnd,_+=Y*(N<E?1:(E-B)/(N-B)))}if(--u,r+=8*(m+_)/(h.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Wc=null,Jc=null;function qo(n){return n.nodeType===9?n:n.ownerDocument}function Ig(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zg(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function ef(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var tf=null;function mS(){var n=window.event;return n&&n.type==="popstate"?n===tf?!1:(tf=n,!0):(tf=null,!1)}var Ug=typeof setTimeout=="function"?setTimeout:void 0,gS=typeof clearTimeout=="function"?clearTimeout:void 0,Hg=typeof Promise=="function"?Promise:void 0,yS=typeof queueMicrotask=="function"?queueMicrotask:typeof Hg<"u"?function(n){return Hg.resolve(null).then(n).catch(bS)}:Ug;function bS(n){setTimeout(function(){throw n})}function Ri(n){return n==="head"}function Pg(n,r){var l=r,u=0;do{var h=l.nextSibling;if(n.removeChild(l),h&&h.nodeType===8)if(l=h.data,l==="/$"||l==="/&"){if(u===0){n.removeChild(h),Wr(r);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")ol(n.ownerDocument.documentElement);else if(l==="head"){l=n.ownerDocument.head,ol(l);for(var m=l.firstChild;m;){var _=m.nextSibling,E=m.nodeName;m[wa]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&m.rel.toLowerCase()==="stylesheet"||l.removeChild(m),m=_}}else l==="body"&&ol(n.ownerDocument.body);l=h}while(l);Wr(r)}function Bg(n,r){var l=n;n=0;do{var u=l.nextSibling;if(l.nodeType===1?r?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(r?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),u&&u.nodeType===8)if(l=u.data,l==="/$"){if(n===0)break;n--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||n++;l=u}while(l)}function nf(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":nf(l),ou(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}n.removeChild(l)}}function vS(n,r,l,u){for(;n.nodeType===1;){var h=l;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[wa])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(m=n.getAttribute("rel"),m==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(m!==h.rel||n.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||n.getAttribute("title")!==(h.title==null?null:h.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(m=n.getAttribute("src"),(m!==(h.src==null?null:h.src)||n.getAttribute("type")!==(h.type==null?null:h.type)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&m&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var m=h.name==null?null:""+h.name;if(h.type==="hidden"&&n.getAttribute("name")===m)return n}else return n;if(n=hn(n.nextSibling),n===null)break}return null}function _S(n,r,l){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!l||(n=hn(n.nextSibling),n===null))return null;return n}function jg(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=hn(n.nextSibling),n===null))return null;return n}function rf(n){return n.data==="$?"||n.data==="$~"}function af(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function SS(n,r){var l=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||l.readyState!=="loading")r();else{var u=function(){r(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function hn(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var lf=null;function Vg(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var l=n.data;if(l==="/$"||l==="/&"){if(r===0)return hn(n.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}n=n.nextSibling}return null}function Gg(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var l=n.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(r===0)return n;r--}else l!=="/$"&&l!=="/&"||r++}n=n.previousSibling}return null}function $g(n,r,l){switch(r=qo(l),n){case"html":if(n=r.documentElement,!n)throw Error(a(452));return n;case"head":if(n=r.head,!n)throw Error(a(453));return n;case"body":if(n=r.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function ol(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);ou(n)}var pn=new Map,qg=new Set;function Fo(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var ai=X.d;X.d={f:ES,r:xS,D:CS,C:wS,L:AS,m:kS,X:LS,S:TS,M:RS};function ES(){var n=ai.f(),r=Uo();return n||r}function xS(n){var r=yr(n);r!==null&&r.tag===5&&r.type==="form"?sm(r):ai.r(n)}var Qr=typeof document>"u"?null:document;function Fg(n,r,l){var u=Qr;if(u&&typeof r=="string"&&r){var h=ln(r);h='link[rel="'+n+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),qg.has(h)||(qg.add(h),n={rel:n,crossOrigin:l,href:r},u.querySelector(h)===null&&(r=u.createElement("link"),kt(r,"link",n),bt(r),u.head.appendChild(r)))}}function CS(n){ai.D(n),Fg("dns-prefetch",n,null)}function wS(n,r){ai.C(n,r),Fg("preconnect",n,r)}function AS(n,r,l){ai.L(n,r,l);var u=Qr;if(u&&n&&r){var h='link[rel="preload"][as="'+ln(r)+'"]';r==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+ln(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+ln(l.imageSizes)+'"]')):h+='[href="'+ln(n)+'"]';var m=h;switch(r){case"style":m=Zr(n);break;case"script":m=Kr(n)}pn.has(m)||(n=y({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:n,as:r},l),pn.set(m,n),u.querySelector(h)!==null||r==="style"&&u.querySelector(sl(m))||r==="script"&&u.querySelector(ul(m))||(r=u.createElement("link"),kt(r,"link",n),bt(r),u.head.appendChild(r)))}}function kS(n,r){ai.m(n,r);var l=Qr;if(l&&n){var u=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+ln(u)+'"][href="'+ln(n)+'"]',m=h;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Kr(n)}if(!pn.has(m)&&(n=y({rel:"modulepreload",href:n},r),pn.set(m,n),l.querySelector(h)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ul(m)))return}u=l.createElement("link"),kt(u,"link",n),bt(u),l.head.appendChild(u)}}}function TS(n,r,l){ai.S(n,r,l);var u=Qr;if(u&&n){var h=br(u).hoistableStyles,m=Zr(n);r=r||"default";var _=h.get(m);if(!_){var E={loading:0,preload:null};if(_=u.querySelector(sl(m)))E.loading=5;else{n=y({rel:"stylesheet",href:n,"data-precedence":r},l),(l=pn.get(m))&&of(n,l);var N=_=u.createElement("link");bt(N),kt(N,"link",n),N._p=new Promise(function(B,Y){N.onload=B,N.onerror=Y}),N.addEventListener("load",function(){E.loading|=1}),N.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Yo(_,r,u)}_={type:"stylesheet",instance:_,count:1,state:E},h.set(m,_)}}}function LS(n,r){ai.X(n,r);var l=Qr;if(l&&n){var u=br(l).hoistableScripts,h=Kr(n),m=u.get(h);m||(m=l.querySelector(ul(h)),m||(n=y({src:n,async:!0},r),(r=pn.get(h))&&sf(n,r),m=l.createElement("script"),bt(m),kt(m,"link",n),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(h,m))}}function RS(n,r){ai.M(n,r);var l=Qr;if(l&&n){var u=br(l).hoistableScripts,h=Kr(n),m=u.get(h);m||(m=l.querySelector(ul(h)),m||(n=y({src:n,async:!0,type:"module"},r),(r=pn.get(h))&&sf(n,r),m=l.createElement("script"),bt(m),kt(m,"link",n),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(h,m))}}function Yg(n,r,l,u){var h=(h=ce.current)?Fo(h):null;if(!h)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=Zr(l.href),l=br(h).hoistableStyles,u=l.get(r),u||(u={type:"style",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){n=Zr(l.href);var m=br(h).hoistableStyles,_=m.get(n);if(_||(h=h.ownerDocument||h,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(n,_),(m=h.querySelector(sl(n)))&&!m._p&&(_.instance=m,_.state.loading=5),pn.has(n)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},pn.set(n,l),m||DS(h,n,l,_.state))),r&&u===null)throw Error(a(528,""));return _}if(r&&u!==null)throw Error(a(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Kr(l),l=br(h).hoistableScripts,u=l.get(r),u||(u={type:"script",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Zr(n){return'href="'+ln(n)+'"'}function sl(n){return'link[rel="stylesheet"]['+n+"]"}function Xg(n){return y({},n,{"data-precedence":n.precedence,precedence:null})}function DS(n,r,l,u){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=n.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),kt(r,"link",l),bt(r),n.head.appendChild(r))}function Kr(n){return'[src="'+ln(n)+'"]'}function ul(n){return"script[async]"+n}function Qg(n,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=n.querySelector('style[data-href~="'+ln(l.href)+'"]');if(u)return r.instance=u,bt(u),u;var h=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),bt(u),kt(u,"style",h),Yo(u,l.precedence,n),r.instance=u;case"stylesheet":h=Zr(l.href);var m=n.querySelector(sl(h));if(m)return r.state.loading|=4,r.instance=m,bt(m),m;u=Xg(l),(h=pn.get(h))&&of(u,h),m=(n.ownerDocument||n).createElement("link"),bt(m);var _=m;return _._p=new Promise(function(E,N){_.onload=E,_.onerror=N}),kt(m,"link",u),r.state.loading|=4,Yo(m,l.precedence,n),r.instance=m;case"script":return m=Kr(l.src),(h=n.querySelector(ul(m)))?(r.instance=h,bt(h),h):(u=l,(h=pn.get(m))&&(u=y({},l),sf(u,h)),n=n.ownerDocument||n,h=n.createElement("script"),bt(h),kt(h,"link",u),n.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,Yo(u,l.precedence,n));return r.instance}function Yo(n,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=u.length?u[u.length-1]:null,m=h,_=0;_<u.length;_++){var E=u[_];if(E.dataset.precedence===r)m=E;else if(m!==h)break}m?m.parentNode.insertBefore(n,m.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(n,r.firstChild))}function of(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function sf(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Xo=null;function Zg(n,r,l){if(Xo===null){var u=new Map,h=Xo=new Map;h.set(l,u)}else h=Xo,u=h.get(l),u||(u=new Map,h.set(l,u));if(u.has(n))return u;for(u.set(n,null),l=l.getElementsByTagName(n),h=0;h<l.length;h++){var m=l[h];if(!(m[wa]||m[xt]||n==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var _=m.getAttribute(r)||"";_=n+_;var E=u.get(_);E?E.push(m):u.set(_,[m])}}return u}function Kg(n,r,l){n=n.ownerDocument||n,n.head.insertBefore(l,r==="title"?n.querySelector("head > title"):null)}function NS(n,r,l){if(l===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(n=r.disabled,typeof r.precedence=="string"&&n==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Wg(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function OS(n,r,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var h=Zr(u.href),m=r.querySelector(sl(h));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=Qo.bind(n),r.then(n,n)),l.state.loading|=4,l.instance=m,bt(m);return}m=r.ownerDocument||r,u=Xg(u),(h=pn.get(h))&&of(u,h),m=m.createElement("link"),bt(m);var _=m;_._p=new Promise(function(E,N){_.onload=E,_.onerror=N}),kt(m,"link",u),l.instance=m}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(n.count++,l=Qo.bind(n),r.addEventListener("load",l),r.addEventListener("error",l))}}var uf=0;function MS(n,r){return n.stylesheets&&n.count===0&&Ko(n,n.stylesheets),0<n.count||0<n.imgCount?function(l){var u=setTimeout(function(){if(n.stylesheets&&Ko(n,n.stylesheets),n.unsuspend){var m=n.unsuspend;n.unsuspend=null,m()}},6e4+r);0<n.imgBytes&&uf===0&&(uf=62500*pS());var h=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Ko(n,n.stylesheets),n.unsuspend)){var m=n.unsuspend;n.unsuspend=null,m()}},(n.imgBytes>uf?50:800)+r);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(h)}}:null}function Qo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ko(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Zo=null;function Ko(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Zo=new Map,r.forEach(IS,n),Zo=null,Qo.call(n))}function IS(n,r){if(!(r.state.loading&4)){var l=Zo.get(n);if(l)var u=l.get(null);else{l=new Map,Zo.set(n,l);for(var h=n.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<h.length;m++){var _=h[m];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(l.set(_.dataset.precedence,_),u=_)}u&&l.set(null,u)}h=r.instance,_=h.getAttribute("data-precedence"),m=l.get(_)||u,m===u&&l.set(null,h),l.set(_,h),this.count++,u=Qo.bind(this),h.addEventListener("load",u),h.addEventListener("error",u),m?m.parentNode.insertBefore(h,m.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(h,n.firstChild)),r.state.loading|=4}}var cl={$$typeof:T,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function zS(n,r,l,u,h,m,_,E,N){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=iu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=iu(0),this.hiddenUpdates=iu(null),this.identifierPrefix=u,this.onUncaughtError=h,this.onCaughtError=m,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function Jg(n,r,l,u,h,m,_,E,N,B,Y,K){return n=new zS(n,r,l,_,N,B,Y,K,E),r=1,m===!0&&(r|=24),m=Zt(3,null,null,r),n.current=m,m.stateNode=n,r=ju(),r.refCount++,n.pooledCache=r,r.refCount++,m.memoizedState={element:u,isDehydrated:l,cache:r},qu(m),n}function ey(n){return n?(n=Tr,n):Tr}function ty(n,r,l,u,h,m){h=ey(h),u.context===null?u.context=h:u.pendingContext=h,u=vi(r),u.payload={element:l},m=m===void 0?null:m,m!==null&&(u.callback=m),l=_i(n,u,r),l!==null&&(Gt(l,n,r),Va(l,n,r))}function ny(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var l=n.retryLane;n.retryLane=l!==0&&l<r?l:r}}function cf(n,r){ny(n,r),(n=n.alternate)&&ny(n,r)}function iy(n){if(n.tag===13||n.tag===31){var r=Fi(n,67108864);r!==null&&Gt(r,n,67108864),cf(n,67108864)}}function ry(n){if(n.tag===13||n.tag===31){var r=tn();r=ru(r);var l=Fi(n,r);l!==null&&Gt(l,n,r),cf(n,r)}}var Wo=!0;function US(n,r,l,u){var h=H.T;H.T=null;var m=X.p;try{X.p=2,ff(n,r,l,u)}finally{X.p=m,H.T=h}}function HS(n,r,l,u){var h=H.T;H.T=null;var m=X.p;try{X.p=8,ff(n,r,l,u)}finally{X.p=m,H.T=h}}function ff(n,r,l,u){if(Wo){var h=df(u);if(h===null)Zc(n,r,u,Jo,l),ly(n,u);else if(BS(h,n,r,l,u))u.stopPropagation();else if(ly(n,u),r&4&&-1<PS.indexOf(n)){for(;h!==null;){var m=yr(h);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var _=ji(m.pendingLanes);if(_!==0){var E=m;for(E.pendingLanes|=2,E.entangledLanes|=2;_;){var N=1<<31-Ye(_);E.entanglements[1]|=N,_&=~N}On(m),(He&6)===0&&(Io=Nt()+500,rl(0))}}break;case 31:case 13:E=Fi(m,2),E!==null&&Gt(E,m,2),Uo(),cf(m,2)}if(m=df(u),m===null&&Zc(n,r,u,Jo,l),m===h)break;h=m}h!==null&&u.stopPropagation()}else Zc(n,r,u,null,l)}}function df(n){return n=hu(n),hf(n)}var Jo=null;function hf(n){if(Jo=null,n=gr(n),n!==null){var r=s(n);if(r===null)n=null;else{var l=r.tag;if(l===13){if(n=c(r),n!==null)return n;n=null}else if(l===31){if(n=f(r),n!==null)return n;n=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return Jo=n,null}function ay(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(nu()){case Q:return 2;case se:return 8;case ve:case Re:return 32;case Be:return 268435456;default:return 32}default:return 32}}var pf=!1,Di=null,Ni=null,Oi=null,fl=new Map,dl=new Map,Mi=[],PS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ly(n,r){switch(n){case"focusin":case"focusout":Di=null;break;case"dragenter":case"dragleave":Ni=null;break;case"mouseover":case"mouseout":Oi=null;break;case"pointerover":case"pointerout":fl.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":dl.delete(r.pointerId)}}function hl(n,r,l,u,h,m){return n===null||n.nativeEvent!==m?(n={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:m,targetContainers:[h]},r!==null&&(r=yr(r),r!==null&&iy(r)),n):(n.eventSystemFlags|=u,r=n.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),n)}function BS(n,r,l,u,h){switch(r){case"focusin":return Di=hl(Di,n,r,l,u,h),!0;case"dragenter":return Ni=hl(Ni,n,r,l,u,h),!0;case"mouseover":return Oi=hl(Oi,n,r,l,u,h),!0;case"pointerover":var m=h.pointerId;return fl.set(m,hl(fl.get(m)||null,n,r,l,u,h)),!0;case"gotpointercapture":return m=h.pointerId,dl.set(m,hl(dl.get(m)||null,n,r,l,u,h)),!0}return!1}function oy(n){var r=gr(n.target);if(r!==null){var l=s(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){n.blockedOn=r,Sh(n.priority,function(){ry(l)});return}}else if(r===31){if(r=f(l),r!==null){n.blockedOn=r,Sh(n.priority,function(){ry(l)});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){n.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}n.blockedOn=null}function es(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var l=df(n.nativeEvent);if(l===null){l=n.nativeEvent;var u=new l.constructor(l.type,l);du=u,l.target.dispatchEvent(u),du=null}else return r=yr(l),r!==null&&iy(r),n.blockedOn=l,!1;r.shift()}return!0}function sy(n,r,l){es(n)&&l.delete(r)}function jS(){pf=!1,Di!==null&&es(Di)&&(Di=null),Ni!==null&&es(Ni)&&(Ni=null),Oi!==null&&es(Oi)&&(Oi=null),fl.forEach(sy),dl.forEach(sy)}function ts(n,r){n.blockedOn===r&&(n.blockedOn=null,pf||(pf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,jS)))}var ns=null;function uy(n){ns!==n&&(ns=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ns===n&&(ns=null);for(var r=0;r<n.length;r+=3){var l=n[r],u=n[r+1],h=n[r+2];if(typeof u!="function"){if(hf(u||l)===null)continue;break}var m=yr(l);m!==null&&(n.splice(r,3),r-=3,fc(m,{pending:!0,data:h,method:l.method,action:u},u,h))}}))}function Wr(n){function r(N){return ts(N,n)}Di!==null&&ts(Di,n),Ni!==null&&ts(Ni,n),Oi!==null&&ts(Oi,n),fl.forEach(r),dl.forEach(r);for(var l=0;l<Mi.length;l++){var u=Mi[l];u.blockedOn===n&&(u.blockedOn=null)}for(;0<Mi.length&&(l=Mi[0],l.blockedOn===null);)oy(l),l.blockedOn===null&&Mi.shift();if(l=(n.ownerDocument||n).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var h=l[u],m=l[u+1],_=h[Ut]||null;if(typeof m=="function")_||uy(l);else if(_){var E=null;if(m&&m.hasAttribute("formAction")){if(h=m,_=m[Ut]||null)E=_.formAction;else if(hf(h)!==null)continue}else E=_.action;typeof E=="function"?l[u+1]=E:(l.splice(u,3),u-=3),uy(l)}}}function cy(){function n(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(_){return h=_})},focusReset:"manual",scroll:"manual"})}function r(){h!==null&&(h(),h=null),u||setTimeout(l,20)}function l(){if(!u&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,h=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),h!==null&&(h(),h=null)}}}function mf(n){this._internalRoot=n}is.prototype.render=mf.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,u=tn();ty(l,u,n,r,null,null)},is.prototype.unmount=mf.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;ty(n.current,2,null,n,null,null),Uo(),r[mr]=null}};function is(n){this._internalRoot=n}is.prototype.unstable_scheduleHydration=function(n){if(n){var r=_h();n={blockedOn:null,target:n,priority:r};for(var l=0;l<Mi.length&&r!==0&&r<Mi[l].priority;l++);Mi.splice(l,0,n),l===0&&oy(n)}};var fy=t.version;if(fy!=="19.2.4")throw Error(a(527,fy,"19.2.4"));X.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=p(r),n=n!==null?g(n):null,n=n===null?null:n.stateNode,n};var VS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rs.isDisabled&&rs.supportsFiber)try{Ot=rs.inject(VS),ht=rs}catch{}}return ml.createRoot=function(n,r){if(!o(n))throw Error(a(299));var l=!1,u="",h=bm,m=vm,_=_m;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(_=r.onRecoverableError)),r=Jg(n,1,!1,null,null,l,u,null,h,m,_,cy),n[mr]=r.current,Qc(n),new mf(r)},ml.hydrateRoot=function(n,r,l){if(!o(n))throw Error(a(299));var u=!1,h="",m=bm,_=vm,E=_m,N=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(m=l.onUncaughtError),l.onCaughtError!==void 0&&(_=l.onCaughtError),l.onRecoverableError!==void 0&&(E=l.onRecoverableError),l.formState!==void 0&&(N=l.formState)),r=Jg(n,1,!0,r,l??null,u,h,N,m,_,E,cy),r.context=ey(null),l=r.current,u=tn(),u=ru(u),h=vi(u),h.callback=null,_i(l,h,u),l=u,r.current.lanes=l,Ca(r,l),On(r),n[mr]=r.current,Qc(n),new is(r)},ml.version="19.2.4",ml}var Sy;function WS(){if(Sy)return bf.exports;Sy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),bf.exports=KS(),bf.exports}var JS=WS();async function Tn(e,t={}){const i=await fetch(e,{headers:{"content-type":"application/json",...t.headers},...t}),a=await eE(i);if(!i.ok)throw new Error(a.error||i.statusText||`request to ${e} failed`);return a}async function eE(e){const t=await e.text();if(!t)return{};try{return JSON.parse(t)}catch{throw new Error("server returned an invalid JSON response")}}async function tE(){return Tn("/api/bootstrap")}async function nE(e){return Tn("/api/diff")}async function iE(e){return Tn("/api/state",{method:"POST",body:JSON.stringify(e)})}async function rE(e){return Tn("/api/thread",{method:"POST",body:JSON.stringify(e)})}async function aE(e){return Tn("/api/thread/reply",{method:"POST",body:JSON.stringify(e)})}async function lE(e){return Tn("/api/thread-message",{method:"POST",body:JSON.stringify({id:e})})}async function oE(e){return Tn("/api/thread/resolve",{method:"POST",body:JSON.stringify(e)})}async function sE(e){return Tn("/api/thread/collapse",{method:"POST",body:JSON.stringify(e)})}async function uE(){return Tn("/api/brief/generate",{method:"POST"})}async function cE(){return Tn("/api/review",{method:"POST"})}async function fE(){return Tn("/api/cancel",{method:"POST"})}const dE={diffStyle:"split",overflowMode:"wrap",sidebarOpen:!1,collapsedFileIds:[],viewedFileIds:[],threads:[],brief:{content:"",loading:!1}};function hE(e){return{...e,diffStyle:e.diffStyle==="split"?"split":"stacked",overflowMode:e.overflowMode==="scroll"?"scroll":"wrap",threads:e.threads.map(t=>({...t,resolved:!!t.resolved,collapsed:!!t.collapsed})),brief:{...e.brief.threadId?{threadId:e.brief.threadId}:{},content:e.brief.content,loading:!!e.brief.loading}}}function Ey(e){return Object.fromEntries(e.map(t=>[t,!0]))}function xy(e,t){return e.includes(t)?e.filter(i=>i!==t):[...e,t]}function Ef(e){return[...new Set(e)]}function pE(e,t){const i=e.findIndex(a=>a.id===t);return i===-1?null:e[i+1]?.id??e[i-1]?.id??null}function mE(e,t){return{additions:e.additions+t.additions,deletions:e.deletions+t.deletions}}function gE(e){const t=new Map;for(const i of e){const a={lineNumber:i.lineNumber,side:i.side,metadata:{type:"thread",thread:i}},o=t.get(i.fileId);o?o.push(a):t.set(i.fileId,[a])}return t}function yE(e){const t=new Map;for(const i of e)t.set(i.fileId,(t.get(i.fileId)??0)+1);return t}function bE(e,t,i,a){return!a||i?.fileId!==t?e:[...e,a]}function vE(e,t,i){return{...e,threads:e.threads.map(a=>a.id===t?{...a,loading:i}:a)}}function _E(e,t){return{...e,brief:{...e.brief,loading:t}}}function SE(e,t){const i=t.find(a=>a.id===e.fileId);return e.side==="deletions"?i?.oldRepoPath??i?.newRepoPath??e.fileId:i?.newRepoPath??i?.oldRepoPath??e.fileId}const xb=(...e)=>e.filter((t,i,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===i).join(" ").trim();const EE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const xE=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,i,a)=>a?a.toUpperCase():i.toLowerCase());const Cy=e=>{const t=xE(e);return t.charAt(0).toUpperCase()+t.slice(1)};var xf={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const CE=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},wE=ae.createContext({}),AE=()=>ae.useContext(wE),kE=ae.forwardRef(({color:e,size:t,strokeWidth:i,absoluteStrokeWidth:a,className:o="",children:s,iconNode:c,...f},d)=>{const{size:p=24,strokeWidth:g=2,absoluteStrokeWidth:y=!1,color:v="currentColor",className:b=""}=AE()??{},S=a??y?Number(i??g)*24/Number(t??p):i??g;return ae.createElement("svg",{ref:d,...xf,width:t??p??xf.width,height:t??p??xf.height,stroke:e??v,strokeWidth:S,className:xb("lucide",b,o),...!s&&!CE(f)&&{"aria-hidden":"true"},...f},[...c.map(([k,L])=>ae.createElement(k,L)),...Array.isArray(s)?s:[s]])});const Ln=(e,t)=>{const i=ae.forwardRef(({className:a,...o},s)=>ae.createElement(kE,{ref:s,iconNode:t,className:xb(`lucide-${EE(Cy(e))}`,`lucide-${e}`,a),...o}));return i.displayName=Cy(e),i};const TE=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],LE=Ln("check",TE);const RE=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],DE=Ln("chevron-down",RE);const NE=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],OE=Ln("chevron-right",NE);const ME=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],Cb=Ln("chevrons-down-up",ME);const IE=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],wb=Ln("chevrons-up-down",IE);const zE=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],UE=Ln("eye-off",zE);const HE=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Ab=Ln("message-square",HE);const PE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],BE=Ln("panel-left",PE);const jE=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],VE=Ln("scroll-text",jE);const GE=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],$E=Ln("sparkles",GE);const qE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],kb=Ln("x",qE);function aa({icon:e,label:t,size:i=14,className:a="",...o}){return $.jsx("button",{type:"button",className:`icon-btn ${a}`,"aria-label":t,...o,children:$.jsx(e,{size:i})})}function Tb(e,t){const i=t||{};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const FE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,XE={};function wy(e,t){return(XE.jsx?YE:FE).test(e)}const QE=/[ \t\n\f\r]/g;function js(e){return typeof e=="object"?e.type==="text"?Ay(e.value):!1:Ay(e)}function Ay(e){return e.replace(QE,"")===""}class Ul{constructor(t,i,a){this.normal=i,this.property=t,a&&(this.space=a)}}Ul.prototype.normal={};Ul.prototype.property={};Ul.prototype.space=void 0;function Lb(e,t){const i={},a={};for(const o of e)Object.assign(i,o.property),Object.assign(a,o.normal);return new Ul(i,a,t)}function sd(e){return e.toLowerCase()}class Ft{constructor(t,i){this.attribute=i,this.property=t}}Ft.prototype.attribute="";Ft.prototype.booleanish=!1;Ft.prototype.boolean=!1;Ft.prototype.commaOrSpaceSeparated=!1;Ft.prototype.commaSeparated=!1;Ft.prototype.defined=!1;Ft.prototype.mustUseProperty=!1;Ft.prototype.number=!1;Ft.prototype.overloadedBoolean=!1;Ft.prototype.property="";Ft.prototype.spaceSeparated=!1;Ft.prototype.space=void 0;let ZE=0;const we=dr(),ft=dr(),ud=dr(),re=dr(),Ze=dr(),ua=dr(),nn=dr();function dr(){return 2**++ZE}const cd=Object.freeze(Object.defineProperty({__proto__:null,boolean:we,booleanish:ft,commaOrSpaceSeparated:nn,commaSeparated:ua,number:re,overloadedBoolean:ud,spaceSeparated:Ze},Symbol.toStringTag,{value:"Module"})),Cf=Object.keys(cd);class Pd extends Ft{constructor(t,i,a,o){let s=-1;if(super(t,i),ky(this,"space",o),typeof a=="number")for(;++s<Cf.length;){const c=Cf[s];ky(this,Cf[s],(a&cd[c])===cd[c])}}}Pd.prototype.defined=!0;function ky(e,t,i){i&&(e[t]=i)}function ya(e){const t={},i={};for(const[a,o]of Object.entries(e.properties)){const s=new Pd(a,e.transform(e.attributes||{},a),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(s.mustUseProperty=!0),t[a]=s,i[sd(a)]=a,i[sd(s.attribute)]=a}return new Ul(t,i,e.space)}const Rb=ya({properties:{ariaActiveDescendant:null,ariaAtomic:ft,ariaAutoComplete:null,ariaBusy:ft,ariaChecked:ft,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:Ze,ariaCurrent:null,ariaDescribedBy:Ze,ariaDetails:null,ariaDisabled:ft,ariaDropEffect:Ze,ariaErrorMessage:null,ariaExpanded:ft,ariaFlowTo:Ze,ariaGrabbed:ft,ariaHasPopup:null,ariaHidden:ft,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ze,ariaLevel:re,ariaLive:null,ariaModal:ft,ariaMultiLine:ft,ariaMultiSelectable:ft,ariaOrientation:null,ariaOwns:Ze,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:ft,ariaReadOnly:ft,ariaRelevant:null,ariaRequired:ft,ariaRoleDescription:Ze,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:ft,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Db(e,t){return t in e?e[t]:t}function Nb(e,t){return Db(e,t.toLowerCase())}const KE=ya({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ua,acceptCharset:Ze,accessKey:Ze,action:null,allow:null,allowFullScreen:we,allowPaymentRequest:we,allowUserMedia:we,alt:null,as:null,async:we,autoCapitalize:null,autoComplete:Ze,autoFocus:we,autoPlay:we,blocking:Ze,capture:null,charSet:null,checked:we,cite:null,className:Ze,cols:re,colSpan:null,content:null,contentEditable:ft,controls:we,controlsList:Ze,coords:re|ua,crossOrigin:null,data:null,dateTime:null,decoding:null,default:we,defer:we,dir:null,dirName:null,disabled:we,download:ud,draggable:ft,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:we,formTarget:null,headers:Ze,height:re,hidden:ud,high:re,href:null,hrefLang:null,htmlFor:Ze,httpEquiv:Ze,id:null,imageSizes:null,imageSrcSet:null,inert:we,inputMode:null,integrity:null,is:null,isMap:we,itemId:null,itemProp:Ze,itemRef:Ze,itemScope:we,itemType:Ze,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:we,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:we,muted:we,name:null,nonce:null,noModule:we,noValidate:we,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:we,optimum:re,pattern:null,ping:Ze,placeholder:null,playsInline:we,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:we,referrerPolicy:null,rel:Ze,required:we,reversed:we,rows:re,rowSpan:re,sandbox:Ze,scope:null,scoped:we,seamless:we,selected:we,shadowRootClonable:we,shadowRootDelegatesFocus:we,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:ft,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:we,useMap:null,value:ft,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ze,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:we,declare:we,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:we,noHref:we,noShade:we,noWrap:we,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:ft,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:we,disableRemotePlayback:we,prefix:null,property:null,results:re,security:null,unselectable:null},space:"html",transform:Nb}),WE=ya({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",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:nn,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:Ze,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:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:we,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,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:ua,g2:ua,glyphName:ua,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:nn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:re,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:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ze,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:nn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:nn,rev:nn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:nn,requiredFeatures:nn,requiredFonts:nn,requiredFormats:nn,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:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:nn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:nn,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:nn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Db}),Ob=ya({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Mb=ya({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Nb}),Ib=ya({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),JE={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},ex=/[A-Z]/g,Ty=/-[a-z]/g,tx=/^data[-\w.:]+$/i;function zb(e,t){const i=sd(t);let a=t,o=Ft;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&tx.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Ty,ix);a="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Ty.test(s)){let c=s.replace(ex,nx);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}o=Pd}return new o(a,t)}function nx(e){return"-"+e.toLowerCase()}function ix(e){return e.charAt(1).toUpperCase()}const Ub=Lb([Rb,KE,Ob,Mb,Ib],"html"),Hl=Lb([Rb,WE,Ob,Mb,Ib],"svg");function Hb(e){return e.join(" ").trim()}var Jr={},wf,Ly;function rx(){if(Ly)return wf;Ly=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
11
+ `,p="/",g="*",y="",v="comment",b="declaration";function S(L,C){if(typeof L!="string")throw new TypeError("First argument must be a string");if(!L)return[];C=C||{};var A=1,T=1;function I(ee){var te=ee.match(t);te&&(A+=te.length);var H=ee.lastIndexOf(d);T=~H?ee.length-H:T+ee.length}function z(){var ee={line:A,column:T};return function(te){return te.position=new D(ee),ie(),te}}function D(ee){this.start=ee,this.end={line:A,column:T},this.source=C.source}D.prototype.content=L;function j(ee){var te=new Error(C.source+":"+A+":"+T+": "+ee);if(te.reason=ee,te.filename=C.source,te.line=A,te.column=T,te.source=L,!C.silent)throw te}function G(ee){var te=ee.exec(L);if(te){var H=te[0];return I(H),L=L.slice(H.length),te}}function ie(){G(i)}function ne(ee){var te;for(ee=ee||[];te=J();)te!==!1&&ee.push(te);return ee}function J(){var ee=z();if(!(p!=L.charAt(0)||g!=L.charAt(1))){for(var te=2;y!=L.charAt(te)&&(g!=L.charAt(te)||p!=L.charAt(te+1));)++te;if(te+=2,y===L.charAt(te-1))return j("End of comment missing");var H=L.slice(2,te-2);return T+=2,I(H),L=L.slice(te),T+=2,ee({type:v,comment:H})}}function W(){var ee=z(),te=G(a);if(te){if(J(),!G(o))return j("property missing ':'");var H=G(s),X=ee({type:b,property:k(te[0].replace(e,y)),value:H?k(H[0].replace(e,y)):y});return G(c),X}}function fe(){var ee=[];ne(ee);for(var te;te=W();)te!==!1&&(ee.push(te),ne(ee));return ee}return ie(),fe()}function k(L){return L?L.replace(f,y):y}return wf=S,wf}var Ry;function ax(){if(Ry)return Jr;Ry=1;var e=Jr&&Jr.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.default=i;const t=e(rx());function i(a,o){let s=null;if(!a||typeof a!="string")return s;const c=(0,t.default)(a),f=typeof o=="function";return c.forEach(d=>{if(d.type!=="declaration")return;const{property:p,value:g}=d;f?o(p,g,d):g&&(s=s||{},s[p]=g)}),s}return Jr}var gl={},Dy;function lx(){if(Dy)return gl;Dy=1,Object.defineProperty(gl,"__esModule",{value:!0}),gl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(p){return!p||i.test(p)||e.test(p)},c=function(p,g){return g.toUpperCase()},f=function(p,g){return"".concat(g,"-")},d=function(p,g){return g===void 0&&(g={}),s(p)?p:(p=p.toLowerCase(),g.reactCompat?p=p.replace(o,f):p=p.replace(a,f),p.replace(t,c))};return gl.camelCase=d,gl}var yl,Ny;function ox(){if(Ny)return yl;Ny=1;var e=yl&&yl.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(ax()),i=lx();function a(o,s){var c={};return!o||typeof o!="string"||(0,t.default)(o,function(f,d){f&&d&&(c[(0,i.camelCase)(f,s)]=d)}),c}return a.default=a,yl=a,yl}var sx=ox();const ux=Eb(sx),Pb=Bb("end"),Bd=Bb("start");function Bb(e){return t;function t(i){const a=i&&i.position&&i.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function cx(e){const t=Bd(e),i=Pb(e);if(t&&i)return{start:t,end:i}}function Cl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Oy(e.position):"start"in e||"end"in e?Oy(e):"line"in e||"column"in e?fd(e):""}function fd(e){return My(e&&e.line)+":"+My(e&&e.column)}function Oy(e){return fd(e&&e.start)+"-"+fd(e&&e.end)}function My(e){return e&&typeof e=="number"?e:1}class Dt extends Error{constructor(t,i,a){super(),typeof i=="string"&&(a=i,i=void 0);let o="",s={},c=!1;if(i&&("line"in i&&"column"in i?s={place:i}:"start"in i&&"end"in i?s={place:i}:"type"in i?s={ancestors:[i],place:i.position}:s={...i}),typeof t=="string"?o=t:!s.cause&&t&&(c=!0,o=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof a=="string"){const d=a.indexOf(":");d===-1?s.ruleId=a:(s.source=a.slice(0,d),s.ruleId=a.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=Cl(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Dt.prototype.file="";Dt.prototype.name="";Dt.prototype.reason="";Dt.prototype.message="";Dt.prototype.stack="";Dt.prototype.column=void 0;Dt.prototype.line=void 0;Dt.prototype.ancestors=void 0;Dt.prototype.cause=void 0;Dt.prototype.fatal=void 0;Dt.prototype.place=void 0;Dt.prototype.ruleId=void 0;Dt.prototype.source=void 0;const jd={}.hasOwnProperty,fx=new Map,dx=/[A-Z]/g,hx=new Set(["table","tbody","thead","tfoot","tr"]),px=new Set(["td","th"]),jb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function mx(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=xx(i,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=Ex(i,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Hl:Ub,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Vb(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function Vb(e,t,i){if(t.type==="element")return gx(e,t,i);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return yx(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return vx(e,t,i);if(t.type==="mdxjsEsm")return bx(e,t);if(t.type==="root")return _x(e,t,i);if(t.type==="text")return Sx(e,t)}function gx(e,t,i){const a=e.schema;let o=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(o=Hl,e.schema=o),e.ancestors.push(t);const s=$b(e,t.tagName,!1),c=Cx(e,t);let f=Gd(e,t);return hx.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!js(d):!0})),Gb(e,c,s,t),Vd(c,f),e.ancestors.pop(),e.schema=a,e.create(t,s,c,i)}function yx(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}Ll(e,t.position)}function bx(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ll(e,t.position)}function vx(e,t,i){const a=e.schema;let o=a;t.name==="svg"&&a.space==="html"&&(o=Hl,e.schema=o),e.ancestors.push(t);const s=t.name===null?e.Fragment:$b(e,t.name,!0),c=wx(e,t),f=Gd(e,t);return Gb(e,c,s,t),Vd(c,f),e.ancestors.pop(),e.schema=a,e.create(t,s,c,i)}function _x(e,t,i){const a={};return Vd(a,Gd(e,t)),e.create(t,e.Fragment,a,i)}function Sx(e,t){return t.value}function Gb(e,t,i,a){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(t.node=a)}function Vd(e,t){if(t.length>0){const i=t.length>1?t:t[0];i&&(e.children=i)}}function Ex(e,t,i){return a;function a(o,s,c,f){const p=Array.isArray(c.children)?i:t;return f?p(s,c,f):p(s,c)}}function xx(e,t){return i;function i(a,o,s,c){const f=Array.isArray(s.children),d=Bd(a);return t(o,s,c,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function Cx(e,t){const i={};let a,o;for(o in t.properties)if(o!=="children"&&jd.call(t.properties,o)){const s=Ax(e,o,t.properties[o]);if(s){const[c,f]=s;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&px.has(t.tagName)?a=f:i[c]=f}}if(a){const s=i.style||(i.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return i}function wx(e,t){const i={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const s=a.data.estree.body[0];s.type;const c=s.expression;c.type;const f=c.properties[0];f.type,Object.assign(i,e.evaluater.evaluateExpression(f.argument))}else Ll(e,t.position);else{const o=a.name;let s;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else Ll(e,t.position);else s=a.value===null?!0:a.value;i[o]=s}return i}function Gd(e,t){const i=[];let a=-1;const o=e.passKeys?new Map:fx;for(;++a<t.children.length;){const s=t.children[a];let c;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const p=o.get(d)||0;c=d+"-"+p,o.set(d,p+1)}}const f=Vb(e,s,c);f!==void 0&&i.push(f)}return i}function Ax(e,t,i){const a=zb(e.schema,t);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=a.commaSeparated?Tb(i):Hb(i)),a.property==="style"){let o=typeof i=="object"?i:kx(e,String(i));return e.stylePropertyNameCase==="css"&&(o=Tx(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&a.space?JE[a.property]||a.property:a.attribute,i]}}function kx(e,t){try{return ux(t,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const a=i,o=new Dt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=jb+"#cannot-parse-style-attribute",o}}function $b(e,t,i){let a;if(!i)a={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let s=-1,c;for(;++s<o.length;){const f=wy(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}a=c}else a=wy(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const o=a.value;return jd.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(a);Ll(e)}function Ll(e,t){const i=new Dt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=jb+"#cannot-handle-mdx-estrees-without-createevaluater",i}function Tx(e){const t={};let i;for(i in e)jd.call(e,i)&&(t[Lx(i)]=e[i]);return t}function Lx(e){let t=e.replace(dx,Rx);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Rx(e){return"-"+e.toLowerCase()}const Af={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Dx={};function Nx(e,t){const i=Dx,a=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return qb(e,a,o)}function qb(e,t,i){if(Ox(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Iy(e.children,t,i)}return Array.isArray(e)?Iy(e,t,i):""}function Iy(e,t,i){const a=[];let o=-1;for(;++o<e.length;)a[o]=qb(e[o],t,i);return a.join("")}function Ox(e){return!!(e&&typeof e=="object")}const zy=document.createElement("i");function $d(e){const t="&"+e+";";zy.innerHTML=t;const i=zy.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===t?!1:i}function Bn(e,t,i,a){const o=e.length;let s=0,c;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,i=i>0?i:0,a.length<1e4)c=Array.from(a),c.unshift(t,i),e.splice(...c);else for(i&&e.splice(t,i);s<a.length;)c=a.slice(s,s+1e4),c.unshift(t,0),e.splice(...c),s+=1e4,t+=1e4}function gn(e,t){return e.length>0?(Bn(e,e.length,0,t),e):t}const Uy={}.hasOwnProperty;function Mx(e){const t={};let i=-1;for(;++i<e.length;)Ix(t,e[i]);return t}function Ix(e,t){let i;for(i in t){const o=(Uy.call(e,i)?e[i]:void 0)||(e[i]={}),s=t[i];let c;if(s)for(c in s){Uy.call(o,c)||(o[c]=[]);const f=s[c];zx(o[c],Array.isArray(f)?f:f?[f]:[])}}}function zx(e,t){let i=-1;const a=[];for(;++i<t.length;)(t[i].add==="after"?e:a).push(t[i]);Bn(e,0,0,a)}function Fb(e,t){const i=Number.parseInt(e,t);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function ca(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Hn=Bi(/[A-Za-z]/),rn=Bi(/[\dA-Za-z]/),Ux=Bi(/[#-'*+\--9=?A-Z^-~]/);function dd(e){return e!==null&&(e<32||e===127)}const hd=Bi(/\d/),Hx=Bi(/[\dA-Fa-f]/),Px=Bi(/[!-/:-@[-`{-~]/);function _e(e){return e!==null&&e<-2}function qt(e){return e!==null&&(e<0||e===32)}function Pe(e){return e===-2||e===-1||e===32}const Bx=Bi(new RegExp("\\p{P}|\\p{S}","u")),jx=Bi(/\s/);function Bi(e){return t;function t(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function ba(e){const t=[];let i=-1,a=0,o=0;for(;++i<e.length;){const s=e.charCodeAt(i);let c="";if(s===37&&rn(e.charCodeAt(i+1))&&rn(e.charCodeAt(i+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(i+1);s<56320&&f>56319&&f<57344?(c=String.fromCharCode(s,f),o=1):c="�"}else c=String.fromCharCode(s);c&&(t.push(e.slice(a,i),encodeURIComponent(c)),a=i+o+1,c=""),o&&(i+=o,o=0)}return t.join("")+e.slice(a)}function Ke(e,t,i,a){const o=a?a-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(d){return Pe(d)?(e.enter(i),f(d)):t(d)}function f(d){return Pe(d)&&s++<o?(e.consume(d),f):(e.exit(i),t(d))}}const Vx={tokenize:Gx};function Gx(e){const t=e.attempt(this.parser.constructs.contentInitial,a,o);let i;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ke(e,t,"linePrefix")}function o(f){return e.enter("paragraph"),s(f)}function s(f){const d=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=d),i=d,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return _e(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),c)}}const $x={tokenize:qx},Hy={tokenize:Fx};function qx(e){const t=this,i=[];let a=0,o,s,c;return f;function f(T){if(a<i.length){const I=i[a];return t.containerState=I[1],e.attempt(I[0].continuation,d,p)(T)}return p(T)}function d(T){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&A();const I=t.events.length;let z=I,D;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){D=t.events[z][1].end;break}C(a);let j=I;for(;j<t.events.length;)t.events[j][1].end={...D},j++;return Bn(t.events,z+1,0,t.events.slice(I)),t.events.length=j,p(T)}return f(T)}function p(T){if(a===i.length){if(!o)return v(T);if(o.currentConstruct&&o.currentConstruct.concrete)return S(T);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Hy,g,y)(T)}function g(T){return o&&A(),C(a),v(T)}function y(T){return t.parser.lazy[t.now().line]=a!==i.length,c=t.now().offset,S(T)}function v(T){return t.containerState={},e.attempt(Hy,b,S)(T)}function b(T){return a++,i.push([t.currentConstruct,t.containerState]),v(T)}function S(T){if(T===null){o&&A(),C(0),e.consume(T);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),k(T)}function k(T){if(T===null){L(e.exit("chunkFlow"),!0),C(0),e.consume(T);return}return _e(T)?(e.consume(T),L(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(T),k)}function L(T,I){const z=t.sliceStream(T);if(I&&z.push(null),T.previous=s,s&&(s.next=T),s=T,o.defineSkip(T.start),o.write(z),t.parser.lazy[T.start.line]){let D=o.events.length;for(;D--;)if(o.events[D][1].start.offset<c&&(!o.events[D][1].end||o.events[D][1].end.offset>c))return;const j=t.events.length;let G=j,ie,ne;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){if(ie){ne=t.events[G][1].end;break}ie=!0}for(C(a),D=j;D<t.events.length;)t.events[D][1].end={...ne},D++;Bn(t.events,G+1,0,t.events.slice(j)),t.events.length=D}}function C(T){let I=i.length;for(;I-- >T;){const z=i[I];t.containerState=z[1],z[0].exit.call(t,e)}i.length=T}function A(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Fx(e,t,i){return Ke(e,e.attempt(this.parser.constructs.document,t,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Py(e){if(e===null||qt(e)||jx(e))return 1;if(Bx(e))return 2}function qd(e,t,i){const a=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!a.includes(s)&&(t=s(t,i),a.push(s))}return t}const pd={name:"attention",resolveAll:Yx,tokenize:Xx};function Yx(e,t){let i=-1,a,o,s,c,f,d,p,g;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(a=i;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[a][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;d=e[a][1].end.offset-e[a][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const y={...e[a][1].end},v={...e[i][1].start};By(y,-d),By(v,d),c={type:d>1?"strongSequence":"emphasisSequence",start:y,end:{...e[a][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:v},s={type:d>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[i][1].start}},o={type:d>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[i][1].start={...f.end},p=[],e[a][1].end.offset-e[a][1].start.offset&&(p=gn(p,[["enter",e[a][1],t],["exit",e[a][1],t]])),p=gn(p,[["enter",o,t],["enter",c,t],["exit",c,t],["enter",s,t]]),p=gn(p,qd(t.parser.constructs.insideSpan.null,e.slice(a+1,i),t)),p=gn(p,[["exit",s,t],["enter",f,t],["exit",f,t],["exit",o,t]]),e[i][1].end.offset-e[i][1].start.offset?(g=2,p=gn(p,[["enter",e[i][1],t],["exit",e[i][1],t]])):g=0,Bn(e,a-1,i-a+3,p),i=a+p.length-g-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function Xx(e,t){const i=this.parser.constructs.attentionMarkers.null,a=this.previous,o=Py(a);let s;return c;function c(d){return s=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===s)return e.consume(d),f;const p=e.exit("attentionSequence"),g=Py(d),y=!g||g===2&&o||i.includes(d),v=!o||o===2&&g||i.includes(a);return p._open=!!(s===42?y:y&&(o||!v)),p._close=!!(s===42?v:v&&(g||!y)),t(d)}}function By(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Qx={name:"autolink",tokenize:Zx};function Zx(e,t,i){let a=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(b){return Hn(b)?(e.consume(b),c):b===64?i(b):p(b)}function c(b){return b===43||b===45||b===46||rn(b)?(a=1,f(b)):p(b)}function f(b){return b===58?(e.consume(b),a=0,d):(b===43||b===45||b===46||rn(b))&&a++<32?(e.consume(b),f):(a=0,p(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||dd(b)?i(b):(e.consume(b),d)}function p(b){return b===64?(e.consume(b),g):Ux(b)?(e.consume(b),p):i(b)}function g(b){return rn(b)?y(b):i(b)}function y(b){return b===46?(e.consume(b),a=0,g):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):v(b)}function v(b){if((b===45||rn(b))&&a++<63){const S=b===45?v:y;return e.consume(b),S}return i(b)}}const Vs={partial:!0,tokenize:Kx};function Kx(e,t,i){return a;function a(s){return Pe(s)?Ke(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||_e(s)?t(s):i(s)}}const Yb={continuation:{tokenize:Jx},exit:eC,name:"blockQuote",tokenize:Wx};function Wx(e,t,i){const a=this;return o;function o(c){if(c===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),s}return i(c)}function s(c){return Pe(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function Jx(e,t,i){const a=this;return o;function o(c){return Pe(c)?Ke(e,s,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt(Yb,t,i)(c)}}function eC(e){e.exit("blockQuote")}const Xb={name:"characterEscape",tokenize:tC};function tC(e,t,i){return a;function a(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return Px(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):i(s)}}const Qb={name:"characterReference",tokenize:nC};function nC(e,t,i){const a=this;let o=0,s,c;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),d}function d(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),s=31,c=rn,g(y))}function p(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,c=Hx,g):(e.enter("characterReferenceValue"),s=7,c=hd,g(y))}function g(y){if(y===59&&o){const v=e.exit("characterReferenceValue");return c===rn&&!$d(a.sliceSerialize(v))?i(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(y)&&o++<s?(e.consume(y),g):i(y)}}const jy={partial:!0,tokenize:rC},Vy={concrete:!0,name:"codeFenced",tokenize:iC};function iC(e,t,i){const a=this,o={partial:!0,tokenize:z};let s=0,c=0,f;return d;function d(D){return p(D)}function p(D){const j=a.events[a.events.length-1];return s=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,f=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(D)}function g(D){return D===f?(c++,e.consume(D),g):c<3?i(D):(e.exit("codeFencedFenceSequence"),Pe(D)?Ke(e,y,"whitespace")(D):y(D))}function y(D){return D===null||_e(D)?(e.exit("codeFencedFence"),a.interrupt?t(D):e.check(jy,k,I)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(D))}function v(D){return D===null||_e(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(D)):Pe(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,b,"whitespace")(D)):D===96&&D===f?i(D):(e.consume(D),v)}function b(D){return D===null||_e(D)?y(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(D))}function S(D){return D===null||_e(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(D)):D===96&&D===f?i(D):(e.consume(D),S)}function k(D){return e.attempt(o,I,L)(D)}function L(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),C}function C(D){return s>0&&Pe(D)?Ke(e,A,"linePrefix",s+1)(D):A(D)}function A(D){return D===null||_e(D)?e.check(jy,k,I)(D):(e.enter("codeFlowValue"),T(D))}function T(D){return D===null||_e(D)?(e.exit("codeFlowValue"),A(D)):(e.consume(D),T)}function I(D){return e.exit("codeFenced"),t(D)}function z(D,j,G){let ie=0;return ne;function ne(te){return D.enter("lineEnding"),D.consume(te),D.exit("lineEnding"),J}function J(te){return D.enter("codeFencedFence"),Pe(te)?Ke(D,W,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):W(te)}function W(te){return te===f?(D.enter("codeFencedFenceSequence"),fe(te)):G(te)}function fe(te){return te===f?(ie++,D.consume(te),fe):ie>=c?(D.exit("codeFencedFenceSequence"),Pe(te)?Ke(D,ee,"whitespace")(te):ee(te)):G(te)}function ee(te){return te===null||_e(te)?(D.exit("codeFencedFence"),j(te)):G(te)}}}function rC(e,t,i){const a=this;return o;function o(c){return c===null?i(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s)}function s(c){return a.parser.lazy[a.now().line]?i(c):t(c)}}const kf={name:"codeIndented",tokenize:lC},aC={partial:!0,tokenize:oC};function lC(e,t,i){const a=this;return o;function o(p){return e.enter("codeIndented"),Ke(e,s,"linePrefix",5)(p)}function s(p){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(p):i(p)}function c(p){return p===null?d(p):_e(p)?e.attempt(aC,c,d)(p):(e.enter("codeFlowValue"),f(p))}function f(p){return p===null||_e(p)?(e.exit("codeFlowValue"),c(p)):(e.consume(p),f)}function d(p){return e.exit("codeIndented"),t(p)}}function oC(e,t,i){const a=this;return o;function o(c){return a.parser.lazy[a.now().line]?i(c):_e(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):Ke(e,s,"linePrefix",5)(c)}function s(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):_e(c)?o(c):i(c)}}const sC={name:"codeText",previous:cC,resolve:uC,tokenize:fC};function uC(e){let t=e.length-4,i=3,a,o;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=i;++a<t;)if(e[a][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[t][1].type="codeTextPadding",i+=2,t-=2;break}}for(a=i-1,t++;++a<=t;)o===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(o=a):(a===t||e[a][1].type==="lineEnding")&&(e[o][1].type="codeTextData",a!==o+2&&(e[o][1].end=e[a-1][1].end,e.splice(o+2,a-o-2),t-=a-o-2,a=o+2),o=void 0);return e}function cC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function fC(e,t,i){let a=0,o,s;return c;function c(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),a++,f):(e.exit("codeTextSequence"),d(y))}function d(y){return y===null?i(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),d):y===96?(s=e.enter("codeTextSequence"),o=0,g(y)):_e(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),d):(e.enter("codeTextData"),p(y))}function p(y){return y===null||y===32||y===96||_e(y)?(e.exit("codeTextData"),d(y)):(e.consume(y),p)}function g(y){return y===96?(e.consume(y),o++,g):o===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(y)):(s.type="codeTextData",p(y))}}class dC{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,i){const a=i??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,i,a){const o=i||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return a&&bl(this.left,a),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),bl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),bl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const i=this.left.splice(t,Number.POSITIVE_INFINITY);bl(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);bl(this.left,i.reverse())}}}function bl(e,t){let i=0;if(t.length<1e4)e.push(...t);else for(;i<t.length;)e.push(...t.slice(i,i+1e4)),i+=1e4}function Zb(e){const t={};let i=-1,a,o,s,c,f,d,p;const g=new dC(e);for(;++i<g.length;){for(;i in t;)i=t[i];if(a=g.get(i),i&&a[1].type==="chunkFlow"&&g.get(i-1)[1].type==="listItemPrefix"&&(d=a[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,hC(g,i)),i=t[i],p=!0);else if(a[1]._container){for(s=i,o=void 0;s--;)if(c=g.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(g.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(a[1].end={...g.get(o)[1].start},f=g.slice(o,i),f.unshift(a),g.splice(o,i-o+1,f))}}return Bn(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!p}function hC(e,t){const i=e.get(t)[1],a=e.get(t)[2];let o=t-1;const s=[];let c=i._tokenizer;c||(c=a.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,d=[],p={};let g,y,v=-1,b=i,S=0,k=0;const L=[k];for(;b;){for(;e.get(++o)[1]!==b;);s.push(o),b._tokenizer||(g=a.sliceStream(b),b.next||g.push(null),y&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=i;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(k=v+1,L.push(k),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):L.pop(),v=L.length;v--;){const C=f.slice(L[v],L[v+1]),A=s.pop();d.push([A,A+C.length-1]),e.splice(A,2,C)}for(d.reverse(),v=-1;++v<d.length;)p[S+d[v][0]]=S+d[v][1],S+=d[v][1]-d[v][0]-1;return p}const pC={resolve:gC,tokenize:yC},mC={partial:!0,tokenize:bC};function gC(e){return Zb(e),e}function yC(e,t){let i;return a;function a(f){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?s(f):_e(f)?e.check(mC,c,s)(f):(e.consume(f),o)}function s(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function bC(e,t,i){const a=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ke(e,s,"linePrefix")}function s(c){if(c===null||_e(c))return i(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,i,t)(c)}}function Kb(e,t,i,a,o,s,c,f,d){const p=d||Number.POSITIVE_INFINITY;let g=0;return y;function y(C){return C===60?(e.enter(a),e.enter(o),e.enter(s),e.consume(C),e.exit(s),v):C===null||C===32||C===41||dd(C)?i(C):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),k(C))}function v(C){return C===62?(e.enter(s),e.consume(C),e.exit(s),e.exit(o),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(C))}function b(C){return C===62?(e.exit("chunkString"),e.exit(f),v(C)):C===null||C===60||_e(C)?i(C):(e.consume(C),C===92?S:b)}function S(C){return C===60||C===62||C===92?(e.consume(C),b):b(C)}function k(C){return!g&&(C===null||C===41||qt(C))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(C)):g<p&&C===40?(e.consume(C),g++,k):C===41?(e.consume(C),g--,k):C===null||C===32||C===40||dd(C)?i(C):(e.consume(C),C===92?L:k)}function L(C){return C===40||C===41||C===92?(e.consume(C),k):k(C)}}function Wb(e,t,i,a,o,s){const c=this;let f=0,d;return p;function p(b){return e.enter(a),e.enter(o),e.consume(b),e.exit(o),e.enter(s),g}function g(b){return f>999||b===null||b===91||b===93&&!d||b===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(b):b===93?(e.exit(s),e.enter(o),e.consume(b),e.exit(o),e.exit(a),t):_e(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||_e(b)||f++>999?(e.exit("chunkString"),g(b)):(e.consume(b),d||(d=!Pe(b)),b===92?v:y)}function v(b){return b===91||b===92||b===93?(e.consume(b),f++,y):y(b)}}function Jb(e,t,i,a,o,s){let c;return f;function f(v){return v===34||v===39||v===40?(e.enter(a),e.enter(o),e.consume(v),e.exit(o),c=v===40?41:v,d):i(v)}function d(v){return v===c?(e.enter(o),e.consume(v),e.exit(o),e.exit(a),t):(e.enter(s),p(v))}function p(v){return v===c?(e.exit(s),d(c)):v===null?i(v):_e(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Ke(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===c||v===null||_e(v)?(e.exit("chunkString"),p(v)):(e.consume(v),v===92?y:g)}function y(v){return v===c||v===92?(e.consume(v),g):g(v)}}function wl(e,t){let i;return a;function a(o){return _e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,a):Pe(o)?Ke(e,a,i?"linePrefix":"lineSuffix")(o):t(o)}}const vC={name:"definition",tokenize:SC},_C={partial:!0,tokenize:EC};function SC(e,t,i){const a=this;let o;return s;function s(b){return e.enter("definition"),c(b)}function c(b){return Wb.call(a,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return o=ca(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):i(b)}function d(b){return qt(b)?wl(e,p)(b):p(b)}function p(b){return Kb(e,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return e.attempt(_C,y,y)(b)}function y(b){return Pe(b)?Ke(e,v,"whitespace")(b):v(b)}function v(b){return b===null||_e(b)?(e.exit("definition"),a.parser.defined.push(o),t(b)):i(b)}}function EC(e,t,i){return a;function a(f){return qt(f)?wl(e,o)(f):i(f)}function o(f){return Jb(e,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return Pe(f)?Ke(e,c,"whitespace")(f):c(f)}function c(f){return f===null||_e(f)?t(f):i(f)}}const xC={name:"hardBreakEscape",tokenize:CC};function CC(e,t,i){return a;function a(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return _e(s)?(e.exit("hardBreakEscape"),t(s)):i(s)}}const wC={name:"headingAtx",resolve:AC,tokenize:kC};function AC(e,t){let i=e.length-2,a=3,o,s;return e[a][1].type==="whitespace"&&(a+=2),i-2>a&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(a===i-1||i-4>a&&e[i-2][1].type==="whitespace")&&(i-=a+1===i?2:4),i>a&&(o={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},s={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},Bn(e,a,i-a+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function kC(e,t,i){let a=0;return o;function o(g){return e.enter("atxHeading"),s(g)}function s(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(e.consume(g),c):g===null||qt(g)?(e.exit("atxHeadingSequence"),f(g)):i(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),d(g)):g===null||_e(g)?(e.exit("atxHeading"),t(g)):Pe(g)?Ke(e,f,"whitespace")(g):(e.enter("atxHeadingText"),p(g))}function d(g){return g===35?(e.consume(g),d):(e.exit("atxHeadingSequence"),f(g))}function p(g){return g===null||g===35||qt(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),p)}}const TC=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Gy=["pre","script","style","textarea"],LC={concrete:!0,name:"htmlFlow",resolveTo:NC,tokenize:OC},RC={partial:!0,tokenize:IC},DC={partial:!0,tokenize:MC};function NC(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function OC(e,t,i){const a=this;let o,s,c,f,d;return p;function p(w){return g(w)}function g(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),y}function y(w){return w===33?(e.consume(w),v):w===47?(e.consume(w),s=!0,k):w===63?(e.consume(w),o=3,a.interrupt?t:R):Hn(w)?(e.consume(w),c=String.fromCharCode(w),L):i(w)}function v(w){return w===45?(e.consume(w),o=2,b):w===91?(e.consume(w),o=5,f=0,S):Hn(w)?(e.consume(w),o=4,a.interrupt?t:R):i(w)}function b(w){return w===45?(e.consume(w),a.interrupt?t:R):i(w)}function S(w){const le="CDATA[";return w===le.charCodeAt(f++)?(e.consume(w),f===le.length?a.interrupt?t:W:S):i(w)}function k(w){return Hn(w)?(e.consume(w),c=String.fromCharCode(w),L):i(w)}function L(w){if(w===null||w===47||w===62||qt(w)){const le=w===47,he=c.toLowerCase();return!le&&!s&&Gy.includes(he)?(o=1,a.interrupt?t(w):W(w)):TC.includes(c.toLowerCase())?(o=6,le?(e.consume(w),C):a.interrupt?t(w):W(w)):(o=7,a.interrupt&&!a.parser.lazy[a.now().line]?i(w):s?A(w):T(w))}return w===45||rn(w)?(e.consume(w),c+=String.fromCharCode(w),L):i(w)}function C(w){return w===62?(e.consume(w),a.interrupt?t:W):i(w)}function A(w){return Pe(w)?(e.consume(w),A):ne(w)}function T(w){return w===47?(e.consume(w),ne):w===58||w===95||Hn(w)?(e.consume(w),I):Pe(w)?(e.consume(w),T):ne(w)}function I(w){return w===45||w===46||w===58||w===95||rn(w)?(e.consume(w),I):z(w)}function z(w){return w===61?(e.consume(w),D):Pe(w)?(e.consume(w),z):T(w)}function D(w){return w===null||w===60||w===61||w===62||w===96?i(w):w===34||w===39?(e.consume(w),d=w,j):Pe(w)?(e.consume(w),D):G(w)}function j(w){return w===d?(e.consume(w),d=null,ie):w===null||_e(w)?i(w):(e.consume(w),j)}function G(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||qt(w)?z(w):(e.consume(w),G)}function ie(w){return w===47||w===62||Pe(w)?T(w):i(w)}function ne(w){return w===62?(e.consume(w),J):i(w)}function J(w){return w===null||_e(w)?W(w):Pe(w)?(e.consume(w),J):i(w)}function W(w){return w===45&&o===2?(e.consume(w),H):w===60&&o===1?(e.consume(w),X):w===62&&o===4?(e.consume(w),O):w===63&&o===3?(e.consume(w),R):w===93&&o===5?(e.consume(w),me):_e(w)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(RC,F,fe)(w)):w===null||_e(w)?(e.exit("htmlFlowData"),fe(w)):(e.consume(w),W)}function fe(w){return e.check(DC,ee,F)(w)}function ee(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),te}function te(w){return w===null||_e(w)?fe(w):(e.enter("htmlFlowData"),W(w))}function H(w){return w===45?(e.consume(w),R):W(w)}function X(w){return w===47?(e.consume(w),c="",oe):W(w)}function oe(w){if(w===62){const le=c.toLowerCase();return Gy.includes(le)?(e.consume(w),O):W(w)}return Hn(w)&&c.length<8?(e.consume(w),c+=String.fromCharCode(w),oe):W(w)}function me(w){return w===93?(e.consume(w),R):W(w)}function R(w){return w===62?(e.consume(w),O):w===45&&o===2?(e.consume(w),R):W(w)}function O(w){return w===null||_e(w)?(e.exit("htmlFlowData"),F(w)):(e.consume(w),O)}function F(w){return e.exit("htmlFlow"),t(w)}}function MC(e,t,i){const a=this;return o;function o(c){return _e(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):i(c)}function s(c){return a.parser.lazy[a.now().line]?i(c):t(c)}}function IC(e,t,i){return a;function a(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Vs,t,i)}}const zC={name:"htmlText",tokenize:UC};function UC(e,t,i){const a=this;let o,s,c;return f;function f(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),d}function d(R){return R===33?(e.consume(R),p):R===47?(e.consume(R),z):R===63?(e.consume(R),T):Hn(R)?(e.consume(R),G):i(R)}function p(R){return R===45?(e.consume(R),g):R===91?(e.consume(R),s=0,S):Hn(R)?(e.consume(R),A):i(R)}function g(R){return R===45?(e.consume(R),b):i(R)}function y(R){return R===null?i(R):R===45?(e.consume(R),v):_e(R)?(c=y,X(R)):(e.consume(R),y)}function v(R){return R===45?(e.consume(R),b):y(R)}function b(R){return R===62?H(R):R===45?v(R):y(R)}function S(R){const O="CDATA[";return R===O.charCodeAt(s++)?(e.consume(R),s===O.length?k:S):i(R)}function k(R){return R===null?i(R):R===93?(e.consume(R),L):_e(R)?(c=k,X(R)):(e.consume(R),k)}function L(R){return R===93?(e.consume(R),C):k(R)}function C(R){return R===62?H(R):R===93?(e.consume(R),C):k(R)}function A(R){return R===null||R===62?H(R):_e(R)?(c=A,X(R)):(e.consume(R),A)}function T(R){return R===null?i(R):R===63?(e.consume(R),I):_e(R)?(c=T,X(R)):(e.consume(R),T)}function I(R){return R===62?H(R):T(R)}function z(R){return Hn(R)?(e.consume(R),D):i(R)}function D(R){return R===45||rn(R)?(e.consume(R),D):j(R)}function j(R){return _e(R)?(c=j,X(R)):Pe(R)?(e.consume(R),j):H(R)}function G(R){return R===45||rn(R)?(e.consume(R),G):R===47||R===62||qt(R)?ie(R):i(R)}function ie(R){return R===47?(e.consume(R),H):R===58||R===95||Hn(R)?(e.consume(R),ne):_e(R)?(c=ie,X(R)):Pe(R)?(e.consume(R),ie):H(R)}function ne(R){return R===45||R===46||R===58||R===95||rn(R)?(e.consume(R),ne):J(R)}function J(R){return R===61?(e.consume(R),W):_e(R)?(c=J,X(R)):Pe(R)?(e.consume(R),J):ie(R)}function W(R){return R===null||R===60||R===61||R===62||R===96?i(R):R===34||R===39?(e.consume(R),o=R,fe):_e(R)?(c=W,X(R)):Pe(R)?(e.consume(R),W):(e.consume(R),ee)}function fe(R){return R===o?(e.consume(R),o=void 0,te):R===null?i(R):_e(R)?(c=fe,X(R)):(e.consume(R),fe)}function ee(R){return R===null||R===34||R===39||R===60||R===61||R===96?i(R):R===47||R===62||qt(R)?ie(R):(e.consume(R),ee)}function te(R){return R===47||R===62||qt(R)?ie(R):i(R)}function H(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):i(R)}function X(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),oe}function oe(R){return Pe(R)?Ke(e,me,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):me(R)}function me(R){return e.enter("htmlTextData"),c(R)}}const Fd={name:"labelEnd",resolveAll:jC,resolveTo:VC,tokenize:GC},HC={tokenize:$C},PC={tokenize:qC},BC={tokenize:FC};function jC(e){let t=-1;const i=[];for(;++t<e.length;){const a=e[t][1];if(i.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const o=a.type==="labelImage"?4:2;a.type="data",t+=o}}return e.length!==i.length&&Bn(e,0,e.length,i),e}function VC(e,t){let i=e.length,a=0,o,s,c,f;for(;i--;)if(o=e[i][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[i][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[i][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=i,o.type!=="labelLink")){a=2;break}}else o.type==="labelEnd"&&(c=i);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[s][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[s+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",d,t],["enter",p,t]],f=gn(f,e.slice(s+1,s+a+3)),f=gn(f,[["enter",g,t]]),f=gn(f,qd(t.parser.constructs.insideSpan.null,e.slice(s+a+4,c-3),t)),f=gn(f,[["exit",g,t],e[c-2],e[c-1],["exit",p,t]]),f=gn(f,e.slice(c+1)),f=gn(f,[["exit",d,t]]),Bn(e,s,e.length,f),e}function GC(e,t,i){const a=this;let o=a.events.length,s,c;for(;o--;)if((a.events[o][1].type==="labelImage"||a.events[o][1].type==="labelLink")&&!a.events[o][1]._balanced){s=a.events[o][1];break}return f;function f(v){return s?s._inactive?y(v):(c=a.parser.defined.includes(ca(a.sliceSerialize({start:s.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),d):i(v)}function d(v){return v===40?e.attempt(HC,g,c?g:y)(v):v===91?e.attempt(PC,g,c?p:y)(v):c?g(v):y(v)}function p(v){return e.attempt(BC,g,y)(v)}function g(v){return t(v)}function y(v){return s._balanced=!0,i(v)}}function $C(e,t,i){return a;function a(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),o}function o(y){return qt(y)?wl(e,s)(y):s(y)}function s(y){return y===41?g(y):Kb(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return qt(y)?wl(e,d)(y):g(y)}function f(y){return i(y)}function d(y){return y===34||y===39||y===40?Jb(e,p,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function p(y){return qt(y)?wl(e,g)(y):g(y)}function g(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),t):i(y)}}function qC(e,t,i){const a=this;return o;function o(f){return Wb.call(a,e,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return a.parser.defined.includes(ca(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):i(f)}function c(f){return i(f)}}function FC(e,t,i){return a;function a(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):i(s)}}const YC={name:"labelStartImage",resolveAll:Fd.resolveAll,tokenize:XC};function XC(e,t,i){const a=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):i(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(f):t(f)}}const QC={name:"labelStartLink",resolveAll:Fd.resolveAll,tokenize:ZC};function ZC(e,t,i){const a=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(c):t(c)}}const Tf={name:"lineEnding",tokenize:KC};function KC(e,t){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ke(e,t,"linePrefix")}}const _s={name:"thematicBreak",tokenize:WC};function WC(e,t,i){let a=0,o;return s;function s(p){return e.enter("thematicBreak"),c(p)}function c(p){return o=p,f(p)}function f(p){return p===o?(e.enter("thematicBreakSequence"),d(p)):a>=3&&(p===null||_e(p))?(e.exit("thematicBreak"),t(p)):i(p)}function d(p){return p===o?(e.consume(p),a++,d):(e.exit("thematicBreakSequence"),Pe(p)?Ke(e,f,"whitespace")(p):f(p))}}const $t={continuation:{tokenize:nw},exit:rw,name:"list",tokenize:tw},JC={partial:!0,tokenize:aw},ew={partial:!0,tokenize:iw};function tw(e,t,i){const a=this,o=a.events[a.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return f;function f(b){const S=a.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!a.containerState.marker||b===a.containerState.marker:hd(b)){if(a.containerState.type||(a.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(_s,i,p)(b):p(b);if(!a.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return i(b)}function d(b){return hd(b)&&++c<10?(e.consume(b),d):(!a.interrupt||c<2)&&(a.containerState.marker?b===a.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),p(b)):i(b)}function p(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||b,e.check(Vs,a.interrupt?i:g,e.attempt(JC,v,y))}function g(b){return a.containerState.initialBlankLine=!0,s++,v(b)}function y(b){return Pe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),v):i(b)}function v(b){return a.containerState.size=s+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function nw(e,t,i){const a=this;return a.containerState._closeFlow=void 0,e.check(Vs,o,s);function o(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Ke(e,t,"listItemIndent",a.containerState.size+1)(f)}function s(f){return a.containerState.furtherBlankLines||!Pe(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(ew,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,Ke(e,e.attempt($t,t,i),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function iw(e,t,i){const a=this;return Ke(e,o,"listItemIndent",a.containerState.size+1);function o(s){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(s):i(s)}}function rw(e){e.exit(this.containerState.type)}function aw(e,t,i){const a=this;return Ke(e,o,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const c=a.events[a.events.length-1];return!Pe(s)&&c&&c[1].type==="listItemPrefixWhitespace"?t(s):i(s)}}const $y={name:"setextUnderline",resolveTo:lw,tokenize:ow};function lw(e,t){let i=e.length,a,o,s;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){a=i;break}e[i][1].type==="paragraph"&&(o=i)}else e[i][1].type==="content"&&e.splice(i,1),!s&&e[i][1].type==="definition"&&(s=i);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",c,t]),e.splice(s+1,0,["exit",e[a][1],t]),e[a][1].end={...e[s][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function ow(e,t,i){const a=this;let o;return s;function s(p){let g=a.events.length,y;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){y=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||y)?(e.enter("setextHeadingLine"),o=p,c(p)):i(p)}function c(p){return e.enter("setextHeadingLineSequence"),f(p)}function f(p){return p===o?(e.consume(p),f):(e.exit("setextHeadingLineSequence"),Pe(p)?Ke(e,d,"lineSuffix")(p):d(p))}function d(p){return p===null||_e(p)?(e.exit("setextHeadingLine"),t(p)):i(p)}}const sw={tokenize:uw};function uw(e){const t=this,i=e.attempt(Vs,a,e.attempt(this.parser.constructs.flowInitial,o,Ke(e,e.attempt(this.parser.constructs.flow,o,e.attempt(pC,o)),"linePrefix")));return i;function a(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,i}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,i}}const cw={resolveAll:tv()},fw=ev("string"),dw=ev("text");function ev(e){return{resolveAll:tv(e==="text"?hw:void 0),tokenize:t};function t(i){const a=this,o=this.parser.constructs[e],s=i.attempt(o,c,f);return c;function c(g){return p(g)?s(g):f(g)}function f(g){if(g===null){i.consume(g);return}return i.enter("data"),i.consume(g),d}function d(g){return p(g)?(i.exit("data"),s(g)):(i.consume(g),d)}function p(g){if(g===null)return!0;const y=o[g];let v=-1;if(y)for(;++v<y.length;){const b=y[v];if(!b.previous||b.previous.call(a,a.previous))return!0}return!1}}}function tv(e){return t;function t(i,a){let o=-1,s;for(;++o<=i.length;)s===void 0?i[o]&&i[o][1].type==="data"&&(s=o,o++):(!i[o]||i[o][1].type!=="data")&&(o!==s+2&&(i[s][1].end=i[o-1][1].end,i.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(i,a):i}}function hw(e,t){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const a=e[i-1][1],o=t.sliceStream(a);let s=o.length,c=-1,f=0,d;for(;s--;){const p=o[s];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(p===-2)d=!0,f++;else if(p!==-1){s++;break}}if(t._contentTypeTextTrailing&&i===e.length&&(f=0),f){const p={type:i===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:a.start._bufferIndex+c,_index:a.start._index+s,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...p.start},a.start.offset===a.end.offset?Object.assign(a,p):(e.splice(i,0,["enter",p,t],["exit",p,t]),i+=2)}i++}return e}const pw={42:$t,43:$t,45:$t,48:$t,49:$t,50:$t,51:$t,52:$t,53:$t,54:$t,55:$t,56:$t,57:$t,62:Yb},mw={91:vC},gw={[-2]:kf,[-1]:kf,32:kf},yw={35:wC,42:_s,45:[$y,_s],60:LC,61:$y,95:_s,96:Vy,126:Vy},bw={38:Qb,92:Xb},vw={[-5]:Tf,[-4]:Tf,[-3]:Tf,33:YC,38:Qb,42:pd,60:[Qx,zC],91:QC,92:[xC,Xb],93:Fd,95:pd,96:sC},_w={null:[pd,cw]},Sw={null:[42,95]},Ew={null:[]},xw=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Sw,contentInitial:mw,disable:Ew,document:pw,flow:yw,flowInitial:gw,insideSpan:_w,string:bw,text:vw},Symbol.toStringTag,{value:"Module"}));function Cw(e,t,i){let a={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const o={},s=[];let c=[],f=[];const d={attempt:j(z),check:j(D),consume:A,enter:T,exit:I,interrupt:j(D,{interrupt:!0})},p={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:e,previous:null,sliceSerialize:v,sliceStream:b,write:y};let g=t.tokenize.call(p,d);return t.resolveAll&&s.push(t),p;function y(J){return c=gn(c,J),L(),c[c.length-1]!==null?[]:(G(t,0),p.events=qd(s,p.events,p),p.events)}function v(J,W){return Aw(b(J),W)}function b(J){return ww(c,J)}function S(){const{_bufferIndex:J,_index:W,line:fe,column:ee,offset:te}=a;return{_bufferIndex:J,_index:W,line:fe,column:ee,offset:te}}function k(J){o[J.line]=J.column,ne()}function L(){let J;for(;a._index<c.length;){const W=c[a._index];if(typeof W=="string")for(J=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===J&&a._bufferIndex<W.length;)C(W.charCodeAt(a._bufferIndex));else C(W)}}function C(J){g=g(J)}function A(J){_e(J)?(a.line++,a.column=1,a.offset+=J===-3?2:1,ne()):J!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),p.previous=J}function T(J,W){const fe=W||{};return fe.type=J,fe.start=S(),p.events.push(["enter",fe,p]),f.push(fe),fe}function I(J){const W=f.pop();return W.end=S(),p.events.push(["exit",W,p]),W}function z(J,W){G(J,W.from)}function D(J,W){W.restore()}function j(J,W){return fe;function fe(ee,te,H){let X,oe,me,R;return Array.isArray(ee)?F(ee):"tokenize"in ee?F([ee]):O(ee);function O(ce){return ye;function ye(Ae){const ke=Ae!==null&&ce[Ae],Qe=Ae!==null&&ce.null,et=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(Qe)?Qe:Qe?[Qe]:[]];return F(et)(Ae)}}function F(ce){return X=ce,oe=0,ce.length===0?H:w(ce[oe])}function w(ce){return ye;function ye(Ae){return R=ie(),me=ce,ce.partial||(p.currentConstruct=ce),ce.name&&p.parser.constructs.disable.null.includes(ce.name)?he():ce.tokenize.call(W?Object.assign(Object.create(p),W):p,d,le,he)(Ae)}}function le(ce){return J(me,R),te}function he(ce){return R.restore(),++oe<X.length?w(X[oe]):H}}}function G(J,W){J.resolveAll&&!s.includes(J)&&s.push(J),J.resolve&&Bn(p.events,W,p.events.length-W,J.resolve(p.events.slice(W),p)),J.resolveTo&&(p.events=J.resolveTo(p.events,p))}function ie(){const J=S(),W=p.previous,fe=p.currentConstruct,ee=p.events.length,te=Array.from(f);return{from:ee,restore:H};function H(){a=J,p.previous=W,p.currentConstruct=fe,p.events.length=ee,f=te,ne()}}function ne(){a.line in o&&a.column<2&&(a.column=o[a.line],a.offset+=o[a.line]-1)}}function ww(e,t){const i=t.start._index,a=t.start._bufferIndex,o=t.end._index,s=t.end._bufferIndex;let c;if(i===o)c=[e[i].slice(a,s)];else{if(c=e.slice(i,o),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}s>0&&c.push(e[o].slice(0,s))}return c}function Aw(e,t){let i=-1;const a=[];let o;for(;++i<e.length;){const s=e[i];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
12
12
  `;break}case-3:{c=`\r
13
- `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&o)continue;c=" ";break}default:c=String.fromCharCode(s)}o=s===-2,a.push(c)}return a.join("")}function Cw(e){const a={constructs:Dx([_w,...(e||{}).extensions||[]]),content:o(Px),defined:[],document:o(jx),flow:o(aw),lazy:{},string:o(sw),text:o(uw)};return a;function o(s){return c;function c(f){return Sw(a,s,f)}}}function ww(e){for(;!Qb(e););return e}const qy=/[\0\t\n\r]/g;function Aw(){let e=1,t="",i=!0,a;return o;function o(s,c,f){const d=[];let p,g,y,b,v;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),y=0,t="",i&&(s.charCodeAt(0)===65279&&y++,i=void 0);y<s.length;){if(qy.lastIndex=y,p=qy.exec(s),b=p&&p.index!==void 0?p.index:s.length,v=s.charCodeAt(b),!p){t=s.slice(y);break}if(v===10&&y===b&&a)d.push(-3),a=void 0;else switch(a&&(d.push(-5),a=void 0),y<b&&(d.push(s.slice(y,b)),e+=b-y),v){case 0:{d.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,d.push(-2);e++<g;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:a=!0,e=1}y=b+1}return f&&(a&&d.push(-5),t&&d.push(t),d.push(null)),d}}const kw=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Tw(e){return e.replace(kw,Lw)}function Lw(e,t,i){if(t)return t;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),s=o===120||o===88;return qb(i.slice(s?2:1),s?16:10)}return Gd(i)||e}const tv={}.hasOwnProperty;function Rw(e,t,i){return t&&typeof t=="object"&&(i=t,t=void 0),Dw(i)(ww(Cw(i).document().write(Aw()(e,t,!0))))}function Dw(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(fr),autolinkProtocol:ie,autolinkEmail:ie,atxHeading:s(ur),blockQuote:s(Qe),characterEscape:ie,characterReference:ie,codeFenced:s(re),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(re,c),codeText:s(xe,c),codeTextData:ie,data:ie,codeFlowValue:ie,definition:s(Le),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(dt),hardBreakEscape:s(cr),hardBreakTrailing:s(cr),htmlFlow:s(Bl,c),htmlFlowData:ie,htmlText:s(Bl,c),htmlTextData:ie,image:s(jl),label:c,link:s(fr),listItem:s(va),listItemValue:b,listOrdered:s(dr,y),listUnordered:s(dr),paragraph:s(eu),reference:w,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(ur),strong:s(tu),thematicBreak:s(nu)},exit:{atxHeading:d(),atxHeadingSequence:U,autolink:d(),autolinkEmail:Te,autolinkProtocol:ke,blockQuote:d(),characterEscapeValue:ne,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:ce,characterReference:ye,codeFenced:d(L),codeFencedFence:T,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:ne,codeIndented:d(A),codeText:d(te),codeTextData:ne,data:ne,definition:d(),definitionDestinationString:z,definitionLabelString:k,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(J),hardBreakTrailing:d(J),htmlFlow:d(fe),htmlFlowData:ne,htmlText:d(ee),htmlTextData:ne,image:d(X),label:me,labelText:oe,lineEnding:W,link:d(H),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:le,resourceDestinationString:R,resourceTitleString:N,resource:F,setextHeading:d($),setextHeadingLineSequence:j,setextHeadingText:O,strong:d(),thematicBreak:d()}};nv(t,(e||{}).mdastExtensions||[]);const i={};return a;function a(Q){let se={type:"root",children:[]};const ve={stack:[se],tokenStack:[],config:t,enter:f,exit:p,buffer:c,resume:g,data:i},De=[];let je=-1;for(;++je<Q.length;)if(Q[je][1].type==="listOrdered"||Q[je][1].type==="listUnordered")if(Q[je][0]==="enter")De.push(je);else{const qt=De.pop();je=o(Q,qt,je)}for(je=-1;++je<Q.length;){const qt=t[Q[je][0]];tv.call(qt,Q[je][1].type)&&qt[Q[je][1].type].call(Object.assign({sliceSerialize:Q[je][2].sliceSerialize},ve),Q[je][1])}if(ve.tokenStack.length>0){const qt=ve.tokenStack[ve.tokenStack.length-1];(qt[1]||Fy).call(ve,void 0,qt[0])}for(se.position={start:Oi(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:Oi(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},je=-1;++je<t.transforms.length;)se=t.transforms[je](se)||se;return se}function o(Q,se,ve){let De=se-1,je=-1,qt=!1,Un,Ot,ht,Mt;for(;++De<=ve;){const Ye=Q[De];switch(Ye[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ye[0]==="enter"?je++:je--,Mt=void 0;break}case"lineEndingBlank":{Ye[0]==="enter"&&(Un&&!Mt&&!je&&!ht&&(ht=De),Mt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Mt=void 0}if(!je&&Ye[0]==="enter"&&Ye[1].type==="listItemPrefix"||je===-1&&Ye[0]==="exit"&&(Ye[1].type==="listUnordered"||Ye[1].type==="listOrdered")){if(Un){let oi=De;for(Ot=void 0;oi--;){const gn=Q[oi];if(gn[1].type==="lineEnding"||gn[1].type==="lineEndingBlank"){if(gn[0]==="exit")continue;Ot&&(Q[Ot][1].type="lineEndingBlank",qt=!0),gn[1].type="lineEnding",Ot=oi}else if(!(gn[1].type==="linePrefix"||gn[1].type==="blockQuotePrefix"||gn[1].type==="blockQuotePrefixWhitespace"||gn[1].type==="blockQuoteMarker"||gn[1].type==="listItemIndent"))break}ht&&(!Ot||ht<Ot)&&(Un._spread=!0),Un.end=Object.assign({},Ot?Q[Ot][1].start:Ye[1].end),Q.splice(Ot||De,0,["exit",Un,Ye[2]]),De++,ve++}if(Ye[1].type==="listItemPrefix"){const oi={type:"listItem",_spread:!1,start:Object.assign({},Ye[1].start),end:void 0};Un=oi,Q.splice(De,0,["enter",oi,Ye[2]]),De++,ve++,ht=void 0,Mt=!0}}}return Q[se][1]._spread=qt,ve}function s(Q,se){return ve;function ve(De){f.call(this,Q(De),De),se&&se.call(this,De)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(Q,se,ve){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([se,ve||void 0]),Q.position={start:Oi(se.start),end:void 0}}function d(Q){return se;function se(ve){Q&&Q.call(this,ve),p.call(this,ve)}}function p(Q,se){const ve=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==Q.type&&(se?se.call(this,Q,De[0]):(De[1]||Fy).call(this,Q,De[0]));else throw new Error("Cannot close `"+Q.type+"` ("+El({start:Q.start,end:Q.end})+"): it’s not open");ve.position.end=Oi(Q.end)}function g(){return Lx(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function b(Q){if(this.data.expectingFirstListItemValue){const se=this.stack[this.stack.length-2];se.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function v(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.lang=Q}function S(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.meta=Q}function T(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function L(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.value=Q.replace(/(\r?\n|\r)$/g,"")}function k(Q){const se=this.resume(),ve=this.stack[this.stack.length-1];ve.label=se,ve.identifier=oa(this.sliceSerialize(Q)).toLowerCase()}function C(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.title=Q}function z(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.url=Q}function U(Q){const se=this.stack[this.stack.length-1];if(!se.depth){const ve=this.sliceSerialize(Q).length;se.depth=ve}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function j(Q){const se=this.stack[this.stack.length-1];se.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function ie(Q){const ve=this.stack[this.stack.length-1].children;let De=ve[ve.length-1];(!De||De.type!=="text")&&(De=Dt(),De.position={start:Oi(Q.start),end:void 0},ve.push(De)),this.stack.push(De)}function ne(Q){const se=this.stack.pop();se.value+=this.sliceSerialize(Q),se.position.end=Oi(Q.end)}function W(Q){const se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ve=se.children[se.children.length-1];ve.position.end=Oi(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(se.type)&&(ie.call(this,Q),ne.call(this,Q))}function J(){this.data.atHardBreak=!0}function fe(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.value=Q}function ee(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.value=Q}function te(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.value=Q}function H(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=se,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function X(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=se,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function oe(Q){const se=this.sliceSerialize(Q),ve=this.stack[this.stack.length-2];ve.label=Tw(se),ve.identifier=oa(se).toLowerCase()}function me(){const Q=this.stack[this.stack.length-1],se=this.resume(),ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,ve.type==="link"){const De=Q.children;ve.children=De}else ve.alt=se}function R(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.url=Q}function N(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.title=Q}function F(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function le(Q){const se=this.resume(),ve=this.stack[this.stack.length-1];ve.label=se,ve.identifier=oa(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function he(Q){this.data.characterReferenceType=Q.type}function ce(Q){const se=this.sliceSerialize(Q),ve=this.data.characterReferenceType;let De;ve?(De=qb(se,ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=Gd(se);const je=this.stack[this.stack.length-1];je.value+=De}function ye(Q){const se=this.stack.pop();se.position.end=Oi(Q.end)}function ke(Q){ne.call(this,Q);const se=this.stack[this.stack.length-1];se.url=this.sliceSerialize(Q)}function Te(Q){ne.call(this,Q);const se=this.stack[this.stack.length-1];se.url="mailto:"+this.sliceSerialize(Q)}function Qe(){return{type:"blockquote",children:[]}}function re(){return{type:"code",lang:null,meta:null,value:""}}function xe(){return{type:"inlineCode",value:""}}function Le(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function dt(){return{type:"emphasis",children:[]}}function ur(){return{type:"heading",depth:0,children:[]}}function cr(){return{type:"break"}}function Bl(){return{type:"html",value:""}}function jl(){return{type:"image",title:null,url:"",alt:null}}function fr(){return{type:"link",title:null,url:"",children:[]}}function dr(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function va(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function eu(){return{type:"paragraph",children:[]}}function tu(){return{type:"strong",children:[]}}function Dt(){return{type:"text",value:""}}function nu(){return{type:"thematicBreak"}}}function Oi(e){return{line:e.line,column:e.column,offset:e.offset}}function nv(e,t){let i=-1;for(;++i<t.length;){const a=t[i];Array.isArray(a)?nv(e,a):Ow(e,a)}}function Ow(e,t){let i;for(i in t)if(tv.call(t,i))switch(i){case"canContainEols":{const a=t[i];a&&e[i].push(...a);break}case"transforms":{const a=t[i];a&&e[i].push(...a);break}case"enter":case"exit":{const a=t[i];a&&Object.assign(e[i],a);break}}}function Fy(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+El({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+El({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+El({start:t.start,end:t.end})+") is still open")}function Nw(e){const t=this;t.parser=i;function i(a){return Rw(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Mw(e,t){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,i),e.applyData(t,i)}function Iw(e,t){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,i),[e.applyData(t,i),{type:"text",value:`
14
- `}]}function zw(e,t){const i=t.value?t.value+`
15
- `:"",a={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(a.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:a,children:[{type:"text",value:i}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function Uw(e,t){const i={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Hw(e,t){const i={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Pw(e,t){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),o=ma(a.toLowerCase()),s=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=s+1,f+=1,e.footnoteCounts.set(a,f);const d={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,d);const p={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,p),e.applyData(t,p)}function Bw(e,t){const i={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function jw(e,t){if(e.options.allowDangerousHtml){const i={type:"raw",value:t.value};return e.patch(t,i),e.applyData(t,i)}}function iv(e,t){const i=t.referenceType;let a="]";if(i==="collapsed"?a+="[]":i==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const o=e.all(t),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=a:o.push({type:"text",value:a}),o}function Vw(e,t){const i=String(t.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return iv(e,t);const o={src:ma(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(o.title=a.title);const s={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,s),e.applyData(t,s)}function Gw(e,t){const i={src:ma(t.url)};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),t.title!==null&&t.title!==void 0&&(i.title=t.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function $w(e,t){const i={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,i);const a={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(t,a),e.applyData(t,a)}function qw(e,t){const i=String(t.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return iv(e,t);const o={href:ma(a.url||"")};a.title!==null&&a.title!==void 0&&(o.title=a.title);const s={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Fw(e,t){const i={href:ma(t.url)};t.title!==null&&t.title!==void 0&&(i.title=t.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Yw(e,t,i){const a=e.all(t),o=i?Xw(i):rv(t),s={},c=[];if(typeof t.checked=="boolean"){const g=a[0];let y;g&&g.type==="element"&&g.tagName==="p"?y=g:(y={type:"element",tagName:"p",properties:{},children:[]},a.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const g=a[f];(o||f!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
13
+ `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&o)continue;c=" ";break}default:c=String.fromCharCode(s)}o=s===-2,a.push(c)}return a.join("")}function kw(e){const a={constructs:Mx([xw,...(e||{}).extensions||[]]),content:o(Vx),defined:[],document:o($x),flow:o(sw),lazy:{},string:o(fw),text:o(dw)};return a;function o(s){return c;function c(f){return Cw(a,s,f)}}}function Tw(e){for(;!Zb(e););return e}const qy=/[\0\t\n\r]/g;function Lw(){let e=1,t="",i=!0,a;return o;function o(s,c,f){const d=[];let p,g,y,v,b;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),y=0,t="",i&&(s.charCodeAt(0)===65279&&y++,i=void 0);y<s.length;){if(qy.lastIndex=y,p=qy.exec(s),v=p&&p.index!==void 0?p.index:s.length,b=s.charCodeAt(v),!p){t=s.slice(y);break}if(b===10&&y===v&&a)d.push(-3),a=void 0;else switch(a&&(d.push(-5),a=void 0),y<v&&(d.push(s.slice(y,v)),e+=v-y),b){case 0:{d.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,d.push(-2);e++<g;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:a=!0,e=1}y=v+1}return f&&(a&&d.push(-5),t&&d.push(t),d.push(null)),d}}const Rw=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Dw(e){return e.replace(Rw,Nw)}function Nw(e,t,i){if(t)return t;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),s=o===120||o===88;return Fb(i.slice(s?2:1),s?16:10)}return $d(i)||e}const nv={}.hasOwnProperty;function Ow(e,t,i){return t&&typeof t=="object"&&(i=t,t=void 0),Mw(i)(Tw(kw(i).document().write(Lw()(e,t,!0))))}function Mw(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(hr),autolinkProtocol:ie,autolinkEmail:ie,atxHeading:s(ue),blockQuote:s(Qe),characterEscape:ie,characterReference:ie,codeFenced:s(et),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(et,c),codeText:s(Yt,c),codeTextData:ie,data:ie,codeFlowValue:ie,definition:s(Et),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(vn),hardBreakEscape:s(Te),hardBreakTrailing:s(Te),htmlFlow:s(je,c),htmlFlowData:ie,htmlText:s(je,c),htmlTextData:ie,image:s(It),label:c,link:s(hr),listItem:s(Ea),listItemValue:v,listOrdered:s(pr,y),listUnordered:s(pr),paragraph:s(eu),reference:w,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(ue),strong:s(tu),thematicBreak:s(nu)},exit:{atxHeading:d(),atxHeadingSequence:z,autolink:d(),autolinkEmail:ke,autolinkProtocol:Ae,blockQuote:d(),characterEscapeValue:ne,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:ce,characterReference:ye,codeFenced:d(L),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:S,codeFlowValue:ne,codeIndented:d(C),codeText:d(te),codeTextData:ne,data:ne,definition:d(),definitionDestinationString:I,definitionLabelString:A,definitionTitleString:T,emphasis:d(),hardBreakEscape:d(W),hardBreakTrailing:d(W),htmlFlow:d(fe),htmlFlowData:ne,htmlText:d(ee),htmlTextData:ne,image:d(X),label:me,labelText:oe,lineEnding:J,link:d(H),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:le,resourceDestinationString:R,resourceTitleString:O,resource:F,setextHeading:d(G),setextHeadingLineSequence:j,setextHeadingText:D,strong:d(),thematicBreak:d()}};iv(t,(e||{}).mdastExtensions||[]);const i={};return a;function a(Q){let se={type:"root",children:[]};const ve={stack:[se],tokenStack:[],config:t,enter:f,exit:p,buffer:c,resume:g,data:i},Re=[];let Be=-1;for(;++Be<Q.length;)if(Q[Be][1].type==="listOrdered"||Q[Be][1].type==="listUnordered")if(Q[Be][0]==="enter")Re.push(Be);else{const Xt=Re.pop();Be=o(Q,Xt,Be)}for(Be=-1;++Be<Q.length;){const Xt=t[Q[Be][0]];nv.call(Xt,Q[Be][1].type)&&Xt[Q[Be][1].type].call(Object.assign({sliceSerialize:Q[Be][2].sliceSerialize},ve),Q[Be][1])}if(ve.tokenStack.length>0){const Xt=ve.tokenStack[ve.tokenStack.length-1];(Xt[1]||Fy).call(ve,void 0,Xt[0])}for(se.position={start:zi(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:zi(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Be=-1;++Be<t.transforms.length;)se=t.transforms[Be](se)||se;return se}function o(Q,se,ve){let Re=se-1,Be=-1,Xt=!1,jn,Ot,ht,zt;for(;++Re<=ve;){const Ye=Q[Re];switch(Ye[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ye[0]==="enter"?Be++:Be--,zt=void 0;break}case"lineEndingBlank":{Ye[0]==="enter"&&(jn&&!zt&&!Be&&!ht&&(ht=Re),zt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:zt=void 0}if(!Be&&Ye[0]==="enter"&&Ye[1].type==="listItemPrefix"||Be===-1&&Ye[0]==="exit"&&(Ye[1].type==="listUnordered"||Ye[1].type==="listOrdered")){if(jn){let fi=Re;for(Ot=void 0;fi--;){const _n=Q[fi];if(_n[1].type==="lineEnding"||_n[1].type==="lineEndingBlank"){if(_n[0]==="exit")continue;Ot&&(Q[Ot][1].type="lineEndingBlank",Xt=!0),_n[1].type="lineEnding",Ot=fi}else if(!(_n[1].type==="linePrefix"||_n[1].type==="blockQuotePrefix"||_n[1].type==="blockQuotePrefixWhitespace"||_n[1].type==="blockQuoteMarker"||_n[1].type==="listItemIndent"))break}ht&&(!Ot||ht<Ot)&&(jn._spread=!0),jn.end=Object.assign({},Ot?Q[Ot][1].start:Ye[1].end),Q.splice(Ot||Re,0,["exit",jn,Ye[2]]),Re++,ve++}if(Ye[1].type==="listItemPrefix"){const fi={type:"listItem",_spread:!1,start:Object.assign({},Ye[1].start),end:void 0};jn=fi,Q.splice(Re,0,["enter",fi,Ye[2]]),Re++,ve++,ht=void 0,zt=!0}}}return Q[se][1]._spread=Xt,ve}function s(Q,se){return ve;function ve(Re){f.call(this,Q(Re),Re),se&&se.call(this,Re)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(Q,se,ve){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([se,ve||void 0]),Q.position={start:zi(se.start),end:void 0}}function d(Q){return se;function se(ve){Q&&Q.call(this,ve),p.call(this,ve)}}function p(Q,se){const ve=this.stack.pop(),Re=this.tokenStack.pop();if(Re)Re[0].type!==Q.type&&(se?se.call(this,Q,Re[0]):(Re[1]||Fy).call(this,Q,Re[0]));else throw new Error("Cannot close `"+Q.type+"` ("+Cl({start:Q.start,end:Q.end})+"): it’s not open");ve.position.end=zi(Q.end)}function g(){return Nx(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function v(Q){if(this.data.expectingFirstListItemValue){const se=this.stack[this.stack.length-2];se.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function b(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.lang=Q}function S(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.meta=Q}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function L(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.value=Q.replace(/(\r?\n|\r)$/g,"")}function A(Q){const se=this.resume(),ve=this.stack[this.stack.length-1];ve.label=se,ve.identifier=ca(this.sliceSerialize(Q)).toLowerCase()}function T(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.title=Q}function I(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.url=Q}function z(Q){const se=this.stack[this.stack.length-1];if(!se.depth){const ve=this.sliceSerialize(Q).length;se.depth=ve}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function j(Q){const se=this.stack[this.stack.length-1];se.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function ie(Q){const ve=this.stack[this.stack.length-1].children;let Re=ve[ve.length-1];(!Re||Re.type!=="text")&&(Re=Nt(),Re.position={start:zi(Q.start),end:void 0},ve.push(Re)),this.stack.push(Re)}function ne(Q){const se=this.stack.pop();se.value+=this.sliceSerialize(Q),se.position.end=zi(Q.end)}function J(Q){const se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ve=se.children[se.children.length-1];ve.position.end=zi(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(se.type)&&(ie.call(this,Q),ne.call(this,Q))}function W(){this.data.atHardBreak=!0}function fe(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.value=Q}function ee(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.value=Q}function te(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.value=Q}function H(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=se,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function X(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=se,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function oe(Q){const se=this.sliceSerialize(Q),ve=this.stack[this.stack.length-2];ve.label=Dw(se),ve.identifier=ca(se).toLowerCase()}function me(){const Q=this.stack[this.stack.length-1],se=this.resume(),ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,ve.type==="link"){const Re=Q.children;ve.children=Re}else ve.alt=se}function R(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.url=Q}function O(){const Q=this.resume(),se=this.stack[this.stack.length-1];se.title=Q}function F(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function le(Q){const se=this.resume(),ve=this.stack[this.stack.length-1];ve.label=se,ve.identifier=ca(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function he(Q){this.data.characterReferenceType=Q.type}function ce(Q){const se=this.sliceSerialize(Q),ve=this.data.characterReferenceType;let Re;ve?(Re=Fb(se,ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Re=$d(se);const Be=this.stack[this.stack.length-1];Be.value+=Re}function ye(Q){const se=this.stack.pop();se.position.end=zi(Q.end)}function Ae(Q){ne.call(this,Q);const se=this.stack[this.stack.length-1];se.url=this.sliceSerialize(Q)}function ke(Q){ne.call(this,Q);const se=this.stack[this.stack.length-1];se.url="mailto:"+this.sliceSerialize(Q)}function Qe(){return{type:"blockquote",children:[]}}function et(){return{type:"code",lang:null,meta:null,value:""}}function Yt(){return{type:"inlineCode",value:""}}function Et(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function vn(){return{type:"emphasis",children:[]}}function ue(){return{type:"heading",depth:0,children:[]}}function Te(){return{type:"break"}}function je(){return{type:"html",value:""}}function It(){return{type:"image",title:null,url:"",alt:null}}function hr(){return{type:"link",title:null,url:"",children:[]}}function pr(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function Ea(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function eu(){return{type:"paragraph",children:[]}}function tu(){return{type:"strong",children:[]}}function Nt(){return{type:"text",value:""}}function nu(){return{type:"thematicBreak"}}}function zi(e){return{line:e.line,column:e.column,offset:e.offset}}function iv(e,t){let i=-1;for(;++i<t.length;){const a=t[i];Array.isArray(a)?iv(e,a):Iw(e,a)}}function Iw(e,t){let i;for(i in t)if(nv.call(t,i))switch(i){case"canContainEols":{const a=t[i];a&&e[i].push(...a);break}case"transforms":{const a=t[i];a&&e[i].push(...a);break}case"enter":case"exit":{const a=t[i];a&&Object.assign(e[i],a);break}}}function Fy(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Cl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Cl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Cl({start:t.start,end:t.end})+") is still open")}function zw(e){const t=this;t.parser=i;function i(a){return Ow(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Uw(e,t){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,i),e.applyData(t,i)}function Hw(e,t){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,i),[e.applyData(t,i),{type:"text",value:`
14
+ `}]}function Pw(e,t){const i=t.value?t.value+`
15
+ `:"",a={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(a.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:a,children:[{type:"text",value:i}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function Bw(e,t){const i={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function jw(e,t){const i={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Vw(e,t){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),o=ba(a.toLowerCase()),s=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=s+1,f+=1,e.footnoteCounts.set(a,f);const d={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,d);const p={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,p),e.applyData(t,p)}function Gw(e,t){const i={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function $w(e,t){if(e.options.allowDangerousHtml){const i={type:"raw",value:t.value};return e.patch(t,i),e.applyData(t,i)}}function rv(e,t){const i=t.referenceType;let a="]";if(i==="collapsed"?a+="[]":i==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const o=e.all(t),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=a:o.push({type:"text",value:a}),o}function qw(e,t){const i=String(t.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return rv(e,t);const o={src:ba(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(o.title=a.title);const s={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,s),e.applyData(t,s)}function Fw(e,t){const i={src:ba(t.url)};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),t.title!==null&&t.title!==void 0&&(i.title=t.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Yw(e,t){const i={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,i);const a={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(t,a),e.applyData(t,a)}function Xw(e,t){const i=String(t.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return rv(e,t);const o={href:ba(a.url||"")};a.title!==null&&a.title!==void 0&&(o.title=a.title);const s={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Qw(e,t){const i={href:ba(t.url)};t.title!==null&&t.title!==void 0&&(i.title=t.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Zw(e,t,i){const a=e.all(t),o=i?Kw(i):av(t),s={},c=[];if(typeof t.checked=="boolean"){const g=a[0];let y;g&&g.type==="element"&&g.tagName==="p"?y=g:(y={type:"element",tagName:"p",properties:{},children:[]},a.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const g=a[f];(o||f!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
16
16
  `}),g.type==="element"&&g.tagName==="p"&&!o?c.push(...g.children):c.push(g)}const d=a[a.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&c.push({type:"text",value:`
17
- `});const p={type:"element",tagName:"li",properties:s,children:c};return e.patch(t,p),e.applyData(t,p)}function Xw(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const i=e.children;let a=-1;for(;!t&&++a<i.length;)t=rv(i[a])}return t}function rv(e){const t=e.spread;return t??e.children.length>1}function Qw(e,t){const i={},a=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(i.start=t.start);++o<a.length;){const c=a[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:i,children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)}function Zw(e,t){const i={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Kw(e,t){const i={type:"root",children:e.wrap(e.all(t))};return e.patch(t,i),e.applyData(t,i)}function Ww(e,t){const i={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Jw(e,t){const i=e.all(t),a=i.shift(),o=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=Pd(t.children[1]),d=Hb(t.children[t.children.length-1]);f&&d&&(c.position={start:f,end:d}),o.push(c)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,s),e.applyData(t,s)}function eA(e,t,i){const a=i?i.children:void 0,s=(a?a.indexOf(t):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,f=c?c.length:t.children.length;let d=-1;const p=[];for(;++d<f;){const y=t.children[d],b={},v=c?c[d]:void 0;v&&(b.align=v);let S={type:"element",tagName:s,properties:b,children:[]};y&&(S.children=e.all(y),e.patch(y,S),S=e.applyData(y,S)),p.push(S)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,g),e.applyData(t,g)}function tA(e,t){const i={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}const Yy=9,Xy=32;function nA(e){const t=String(e),i=/\r?\n|\r/g;let a=i.exec(t),o=0;const s=[];for(;a;)s.push(Qy(t.slice(o,a.index),o>0,!0),a[0]),o=a.index+a[0].length,a=i.exec(t);return s.push(Qy(t.slice(o),o>0,!1)),s.join("")}function Qy(e,t,i){let a=0,o=e.length;if(t){let s=e.codePointAt(a);for(;s===Yy||s===Xy;)a++,s=e.codePointAt(a)}if(i){let s=e.codePointAt(o-1);for(;s===Yy||s===Xy;)o--,s=e.codePointAt(o-1)}return o>a?e.slice(a,o):""}function iA(e,t){const i={type:"text",value:nA(String(t.value))};return e.patch(t,i),e.applyData(t,i)}function rA(e,t){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,i),e.applyData(t,i)}const aA={blockquote:Mw,break:Iw,code:zw,delete:Uw,emphasis:Hw,footnoteReference:Pw,heading:Bw,html:jw,imageReference:Vw,image:Gw,inlineCode:$w,linkReference:qw,link:Fw,listItem:Yw,list:Qw,paragraph:Zw,root:Kw,strong:Ww,table:Jw,tableCell:tA,tableRow:eA,text:iA,thematicBreak:rA,toml:as,yaml:as,definition:as,footnoteDefinition:as};function as(){}const av=-1,Gs=0,Cl=1,ws=2,Fd=3,Yd=4,Xd=5,Qd=6,lv=7,ov=8,Zy=typeof self=="object"?self:globalThis,lA=(e,t)=>{const i=(o,s)=>(e.set(s,o),o),a=o=>{if(e.has(o))return e.get(o);const[s,c]=t[o];switch(s){case Gs:case av:return i(c,o);case Cl:{const f=i([],o);for(const d of c)f.push(a(d));return f}case ws:{const f=i({},o);for(const[d,p]of c)f[a(d)]=a(p);return f}case Fd:return i(new Date(c),o);case Yd:{const{source:f,flags:d}=c;return i(new RegExp(f,d),o)}case Xd:{const f=i(new Map,o);for(const[d,p]of c)f.set(a(d),a(p));return f}case Qd:{const f=i(new Set,o);for(const d of c)f.add(a(d));return f}case lv:{const{name:f,message:d}=c;return i(new Zy[f](d),o)}case ov:return i(BigInt(c),o);case"BigInt":return i(Object(BigInt(c)),o);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return i(new DataView(f),c)}}return i(new Zy[s](c),o)};return a},Ky=e=>lA(new Map,e)(0),Wr="",{toString:oA}={},{keys:sA}=Object,gl=e=>{const t=typeof e;if(t!=="object"||!e)return[Gs,t];const i=oA.call(e).slice(8,-1);switch(i){case"Array":return[Cl,Wr];case"Object":return[ws,Wr];case"Date":return[Fd,Wr];case"RegExp":return[Yd,Wr];case"Map":return[Xd,Wr];case"Set":return[Qd,Wr];case"DataView":return[Cl,i]}return i.includes("Array")?[Cl,i]:i.includes("Error")?[lv,i]:[ws,i]},ls=([e,t])=>e===Gs&&(t==="function"||t==="symbol"),uA=(e,t,i,a)=>{const o=(c,f)=>{const d=a.push(c)-1;return i.set(f,d),d},s=c=>{if(i.has(c))return i.get(c);let[f,d]=gl(c);switch(f){case Gs:{let g=c;switch(d){case"bigint":f=ov,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);g=null;break;case"undefined":return o([av],c)}return o([f,g],c)}case Cl:{if(d){let b=c;return d==="DataView"?b=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(c)),o([d,[...b]],c)}const g=[],y=o([f,g],c);for(const b of c)g.push(s(b));return y}case ws:{if(d)switch(d){case"BigInt":return o([d,c.toString()],c);case"Boolean":case"Number":case"String":return o([d,c.valueOf()],c)}if(t&&"toJSON"in c)return s(c.toJSON());const g=[],y=o([f,g],c);for(const b of sA(c))(e||!ls(gl(c[b])))&&g.push([s(b),s(c[b])]);return y}case Fd:return o([f,c.toISOString()],c);case Yd:{const{source:g,flags:y}=c;return o([f,{source:g,flags:y}],c)}case Xd:{const g=[],y=o([f,g],c);for(const[b,v]of c)(e||!(ls(gl(b))||ls(gl(v))))&&g.push([s(b),s(v)]);return y}case Qd:{const g=[],y=o([f,g],c);for(const b of c)(e||!ls(gl(b)))&&g.push(s(b));return y}}const{message:p}=c;return o([f,{name:d,message:p}],c)};return s},Wy=(e,{json:t,lossy:i}={})=>{const a=[];return uA(!(t||i),!!t,new Map,a)(e),a},As=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ky(Wy(e,t)):structuredClone(e):(e,t)=>Ky(Wy(e,t));function cA(e,t){const i=[{type:"text",value:"↩"}];return t>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),i}function fA(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function dA(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||cA,a=e.options.footnoteBackLabel||fA,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[d]);if(!p)continue;const g=e.all(p),y=String(p.identifier).toUpperCase(),b=ma(y.toLowerCase());let v=0;const S=[],T=e.footnoteCounts.get(y);for(;T!==void 0&&++v<=T;){S.length>0&&S.push({type:"text",value:" "});let k=typeof i=="string"?i:i(d,v);typeof k=="string"&&(k={type:"text",value:k}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(d,v),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const L=g[g.length-1];if(L&&L.type==="element"&&L.tagName==="p"){const k=L.children[L.children.length-1];k&&k.type==="text"?k.value+=" ":L.children.push({type:"text",value:" "}),L.children.push(...S)}else g.push(...S);const A={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(g,!0)};e.patch(p,A),f.push(A)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...As(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
17
+ `});const p={type:"element",tagName:"li",properties:s,children:c};return e.patch(t,p),e.applyData(t,p)}function Kw(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const i=e.children;let a=-1;for(;!t&&++a<i.length;)t=av(i[a])}return t}function av(e){const t=e.spread;return t??e.children.length>1}function Ww(e,t){const i={},a=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(i.start=t.start);++o<a.length;){const c=a[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:i,children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)}function Jw(e,t){const i={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function eA(e,t){const i={type:"root",children:e.wrap(e.all(t))};return e.patch(t,i),e.applyData(t,i)}function tA(e,t){const i={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function nA(e,t){const i=e.all(t),a=i.shift(),o=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=Bd(t.children[1]),d=Pb(t.children[t.children.length-1]);f&&d&&(c.position={start:f,end:d}),o.push(c)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,s),e.applyData(t,s)}function iA(e,t,i){const a=i?i.children:void 0,s=(a?a.indexOf(t):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,f=c?c.length:t.children.length;let d=-1;const p=[];for(;++d<f;){const y=t.children[d],v={},b=c?c[d]:void 0;b&&(v.align=b);let S={type:"element",tagName:s,properties:v,children:[]};y&&(S.children=e.all(y),e.patch(y,S),S=e.applyData(y,S)),p.push(S)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,g),e.applyData(t,g)}function rA(e,t){const i={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}const Yy=9,Xy=32;function aA(e){const t=String(e),i=/\r?\n|\r/g;let a=i.exec(t),o=0;const s=[];for(;a;)s.push(Qy(t.slice(o,a.index),o>0,!0),a[0]),o=a.index+a[0].length,a=i.exec(t);return s.push(Qy(t.slice(o),o>0,!1)),s.join("")}function Qy(e,t,i){let a=0,o=e.length;if(t){let s=e.codePointAt(a);for(;s===Yy||s===Xy;)a++,s=e.codePointAt(a)}if(i){let s=e.codePointAt(o-1);for(;s===Yy||s===Xy;)o--,s=e.codePointAt(o-1)}return o>a?e.slice(a,o):""}function lA(e,t){const i={type:"text",value:aA(String(t.value))};return e.patch(t,i),e.applyData(t,i)}function oA(e,t){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,i),e.applyData(t,i)}const sA={blockquote:Uw,break:Hw,code:Pw,delete:Bw,emphasis:jw,footnoteReference:Vw,heading:Gw,html:$w,imageReference:qw,image:Fw,inlineCode:Yw,linkReference:Xw,link:Qw,listItem:Zw,list:Ww,paragraph:Jw,root:eA,strong:tA,table:nA,tableCell:rA,tableRow:iA,text:lA,thematicBreak:oA,toml:as,yaml:as,definition:as,footnoteDefinition:as};function as(){}const lv=-1,Gs=0,Al=1,ws=2,Yd=3,Xd=4,Qd=5,Zd=6,ov=7,sv=8,Zy=typeof self=="object"?self:globalThis,uA=(e,t)=>{const i=(o,s)=>(e.set(s,o),o),a=o=>{if(e.has(o))return e.get(o);const[s,c]=t[o];switch(s){case Gs:case lv:return i(c,o);case Al:{const f=i([],o);for(const d of c)f.push(a(d));return f}case ws:{const f=i({},o);for(const[d,p]of c)f[a(d)]=a(p);return f}case Yd:return i(new Date(c),o);case Xd:{const{source:f,flags:d}=c;return i(new RegExp(f,d),o)}case Qd:{const f=i(new Map,o);for(const[d,p]of c)f.set(a(d),a(p));return f}case Zd:{const f=i(new Set,o);for(const d of c)f.add(a(d));return f}case ov:{const{name:f,message:d}=c;return i(new Zy[f](d),o)}case sv:return i(BigInt(c),o);case"BigInt":return i(Object(BigInt(c)),o);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return i(new DataView(f),c)}}return i(new Zy[s](c),o)};return a},Ky=e=>uA(new Map,e)(0),ea="",{toString:cA}={},{keys:fA}=Object,vl=e=>{const t=typeof e;if(t!=="object"||!e)return[Gs,t];const i=cA.call(e).slice(8,-1);switch(i){case"Array":return[Al,ea];case"Object":return[ws,ea];case"Date":return[Yd,ea];case"RegExp":return[Xd,ea];case"Map":return[Qd,ea];case"Set":return[Zd,ea];case"DataView":return[Al,i]}return i.includes("Array")?[Al,i]:i.includes("Error")?[ov,i]:[ws,i]},ls=([e,t])=>e===Gs&&(t==="function"||t==="symbol"),dA=(e,t,i,a)=>{const o=(c,f)=>{const d=a.push(c)-1;return i.set(f,d),d},s=c=>{if(i.has(c))return i.get(c);let[f,d]=vl(c);switch(f){case Gs:{let g=c;switch(d){case"bigint":f=sv,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);g=null;break;case"undefined":return o([lv],c)}return o([f,g],c)}case Al:{if(d){let v=c;return d==="DataView"?v=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(v=new Uint8Array(c)),o([d,[...v]],c)}const g=[],y=o([f,g],c);for(const v of c)g.push(s(v));return y}case ws:{if(d)switch(d){case"BigInt":return o([d,c.toString()],c);case"Boolean":case"Number":case"String":return o([d,c.valueOf()],c)}if(t&&"toJSON"in c)return s(c.toJSON());const g=[],y=o([f,g],c);for(const v of fA(c))(e||!ls(vl(c[v])))&&g.push([s(v),s(c[v])]);return y}case Yd:return o([f,c.toISOString()],c);case Xd:{const{source:g,flags:y}=c;return o([f,{source:g,flags:y}],c)}case Qd:{const g=[],y=o([f,g],c);for(const[v,b]of c)(e||!(ls(vl(v))||ls(vl(b))))&&g.push([s(v),s(b)]);return y}case Zd:{const g=[],y=o([f,g],c);for(const v of c)(e||!ls(vl(v)))&&g.push(s(v));return y}}const{message:p}=c;return o([f,{name:d,message:p}],c)};return s},Wy=(e,{json:t,lossy:i}={})=>{const a=[];return dA(!(t||i),!!t,new Map,a)(e),a},As=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ky(Wy(e,t)):structuredClone(e):(e,t)=>Ky(Wy(e,t));function hA(e,t){const i=[{type:"text",value:"↩"}];return t>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),i}function pA(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function mA(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||hA,a=e.options.footnoteBackLabel||pA,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[d]);if(!p)continue;const g=e.all(p),y=String(p.identifier).toUpperCase(),v=ba(y.toLowerCase());let b=0;const S=[],k=e.footnoteCounts.get(y);for(;k!==void 0&&++b<=k;){S.length>0&&S.push({type:"text",value:" "});let A=typeof i=="string"?i:i(d,b);typeof A=="string"&&(A={type:"text",value:A}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(d,b),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const L=g[g.length-1];if(L&&L.type==="element"&&L.tagName==="p"){const A=L.children[L.children.length-1];A&&A.type==="text"?A.value+=" ":L.children.push({type:"text",value:" "}),L.children.push(...S)}else g.push(...S);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(g,!0)};e.patch(p,C),f.push(C)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...As(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
18
18
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
19
- `}]}}const sv=(function(e){if(e==null)return gA;if(typeof e=="function")return $s(e);if(typeof e=="object")return Array.isArray(e)?hA(e):pA(e);if(typeof e=="string")return mA(e);throw new Error("Expected function, string, or object as test")});function hA(e){const t=[];let i=-1;for(;++i<e.length;)t[i]=sv(e[i]);return $s(a);function a(...o){let s=-1;for(;++s<t.length;)if(t[s].apply(this,o))return!0;return!1}}function pA(e){const t=e;return $s(i);function i(a){const o=a;let s;for(s in e)if(o[s]!==t[s])return!1;return!0}}function mA(e){return $s(t);function t(i){return i&&i.type===e}}function $s(e){return t;function t(i,a,o){return!!(yA(i)&&e.call(this,i,typeof a=="number"?a:void 0,o||void 0))}}function gA(){return!0}function yA(e){return e!==null&&typeof e=="object"&&"type"in e}const uv=[],bA=!0,Jy=!1,vA="skip";function _A(e,t,i,a){let o;typeof t=="function"&&typeof i!="function"?(a=i,i=t):o=t;const s=sv(o),c=a?-1:1;f(e,void 0,[])();function f(d,p,g){const y=d&&typeof d=="object"?d:{};if(typeof y.type=="string"){const v=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(v?"<"+v+">":""))+")"})}return b;function b(){let v=uv,S,T,L;if((!t||s(d,p,g[g.length-1]||void 0))&&(v=SA(i(d,g)),v[0]===Jy))return v;if("children"in d&&d.children){const A=d;if(A.children&&v[0]!==vA)for(T=(a?A.children.length:-1)+c,L=g.concat(A);T>-1&&T<A.children.length;){const k=A.children[T];if(S=f(k,T,L)(),S[0]===Jy)return S;T=typeof S[1]=="number"?S[1]:T+c}}return v}}}function SA(e){return Array.isArray(e)?e:typeof e=="number"?[bA,e]:e==null?uv:[e]}function cv(e,t,i,a){let o,s,c;typeof t=="function"&&typeof i!="function"?(s=void 0,c=t,o=i):(s=t,c=i,o=a),_A(e,s,f,o);function f(d,p){const g=p[p.length-1],y=g?g.children.indexOf(d):void 0;return c(d,y,g)}}const pd={}.hasOwnProperty,EA={};function xA(e,t){const i=t||EA,a=new Map,o=new Map,s=new Map,c={...aA,...i.handlers},f={all:p,applyData:wA,definitionById:a,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:d,options:i,patch:CA,wrap:kA};return cv(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?a:o,b=String(g.identifier).toUpperCase();y.has(b)||y.set(b,g)}}),f;function d(g,y){const b=g.type,v=f.handlers[b];if(pd.call(f.handlers,b)&&v)return v(f,g,y);if(f.options.passThrough&&f.options.passThrough.includes(b)){if("children"in g){const{children:T,...L}=g,A=As(L);return A.children=f.all(g),A}return As(g)}return(f.options.unknownHandler||AA)(f,g,y)}function p(g){const y=[];if("children"in g){const b=g.children;let v=-1;for(;++v<b.length;){const S=f.one(b[v],g);if(S){if(v&&b[v-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=e0(S.value)),!Array.isArray(S)&&S.type==="element")){const T=S.children[0];T&&T.type==="text"&&(T.value=e0(T.value))}Array.isArray(S)?y.push(...S):y.push(S)}}}return y}}function CA(e,t){e.position&&(t.position=ox(e))}function wA(e,t){let i=t;if(e&&e.data){const a=e.data.hName,o=e.data.hChildren,s=e.data.hProperties;if(typeof a=="string")if(i.type==="element")i.tagName=a;else{const c="children"in i?i.children:[i];i={type:"element",tagName:a,properties:{},children:c}}i.type==="element"&&s&&Object.assign(i.properties,As(s)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function AA(e,t){const i=t.data||{},a="value"in t&&!(pd.call(i,"hProperties")||pd.call(i,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function kA(e,t){const i=[];let a=-1;for(t&&i.push({type:"text",value:`
19
+ `}]}}const uv=(function(e){if(e==null)return vA;if(typeof e=="function")return $s(e);if(typeof e=="object")return Array.isArray(e)?gA(e):yA(e);if(typeof e=="string")return bA(e);throw new Error("Expected function, string, or object as test")});function gA(e){const t=[];let i=-1;for(;++i<e.length;)t[i]=uv(e[i]);return $s(a);function a(...o){let s=-1;for(;++s<t.length;)if(t[s].apply(this,o))return!0;return!1}}function yA(e){const t=e;return $s(i);function i(a){const o=a;let s;for(s in e)if(o[s]!==t[s])return!1;return!0}}function bA(e){return $s(t);function t(i){return i&&i.type===e}}function $s(e){return t;function t(i,a,o){return!!(_A(i)&&e.call(this,i,typeof a=="number"?a:void 0,o||void 0))}}function vA(){return!0}function _A(e){return e!==null&&typeof e=="object"&&"type"in e}const cv=[],SA=!0,Jy=!1,EA="skip";function xA(e,t,i,a){let o;typeof t=="function"&&typeof i!="function"?(a=i,i=t):o=t;const s=uv(o),c=a?-1:1;f(e,void 0,[])();function f(d,p,g){const y=d&&typeof d=="object"?d:{};if(typeof y.type=="string"){const b=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(d.type+(b?"<"+b+">":""))+")"})}return v;function v(){let b=cv,S,k,L;if((!t||s(d,p,g[g.length-1]||void 0))&&(b=CA(i(d,g)),b[0]===Jy))return b;if("children"in d&&d.children){const C=d;if(C.children&&b[0]!==EA)for(k=(a?C.children.length:-1)+c,L=g.concat(C);k>-1&&k<C.children.length;){const A=C.children[k];if(S=f(A,k,L)(),S[0]===Jy)return S;k=typeof S[1]=="number"?S[1]:k+c}}return b}}}function CA(e){return Array.isArray(e)?e:typeof e=="number"?[SA,e]:e==null?cv:[e]}function fv(e,t,i,a){let o,s,c;typeof t=="function"&&typeof i!="function"?(s=void 0,c=t,o=i):(s=t,c=i,o=a),xA(e,s,f,o);function f(d,p){const g=p[p.length-1],y=g?g.children.indexOf(d):void 0;return c(d,y,g)}}const md={}.hasOwnProperty,wA={};function AA(e,t){const i=t||wA,a=new Map,o=new Map,s=new Map,c={...sA,...i.handlers},f={all:p,applyData:TA,definitionById:a,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:d,options:i,patch:kA,wrap:RA};return fv(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?a:o,v=String(g.identifier).toUpperCase();y.has(v)||y.set(v,g)}}),f;function d(g,y){const v=g.type,b=f.handlers[v];if(md.call(f.handlers,v)&&b)return b(f,g,y);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in g){const{children:k,...L}=g,C=As(L);return C.children=f.all(g),C}return As(g)}return(f.options.unknownHandler||LA)(f,g,y)}function p(g){const y=[];if("children"in g){const v=g.children;let b=-1;for(;++b<v.length;){const S=f.one(v[b],g);if(S){if(b&&v[b-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=e0(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=e0(k.value))}Array.isArray(S)?y.push(...S):y.push(S)}}}return y}}function kA(e,t){e.position&&(t.position=cx(e))}function TA(e,t){let i=t;if(e&&e.data){const a=e.data.hName,o=e.data.hChildren,s=e.data.hProperties;if(typeof a=="string")if(i.type==="element")i.tagName=a;else{const c="children"in i?i.children:[i];i={type:"element",tagName:a,properties:{},children:c}}i.type==="element"&&s&&Object.assign(i.properties,As(s)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function LA(e,t){const i=t.data||{},a="value"in t&&!(md.call(i,"hProperties")||md.call(i,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function RA(e,t){const i=[];let a=-1;for(t&&i.push({type:"text",value:`
20
20
  `});++a<e.length;)a&&i.push({type:"text",value:`
21
21
  `}),i.push(e[a]);return t&&e.length>0&&i.push({type:"text",value:`
22
- `}),i}function e0(e){let t=0,i=e.charCodeAt(t);for(;i===9||i===32;)t++,i=e.charCodeAt(t);return e.slice(t)}function t0(e,t){const i=xA(e,t),a=i.one(e,void 0),o=dA(i),s=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
23
- `},o),s}function TA(e,t){return e&&"run"in e?async function(i,a){const o=t0(i,{file:a,...t});await e.run(o,a)}:function(i,a){return t0(i,{file:a,...e||t})}}function n0(e){if(e)throw e}var Tf,i0;function LA(){if(i0)return Tf;i0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},s=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var g=e.call(p,"constructor"),y=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!g&&!y)return!1;var b;for(b in p);return typeof b>"u"||e.call(p,b)},c=function(p,g){i&&g.name==="__proto__"?i(p,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):p[g.name]=g.newValue},f=function(p,g){if(g==="__proto__")if(e.call(p,g)){if(a)return a(p,g).value}else return;return p[g]};return Tf=function d(){var p,g,y,b,v,S,T=arguments[0],L=1,A=arguments.length,k=!1;for(typeof T=="boolean"&&(k=T,T=arguments[1]||{},L=2),(T==null||typeof T!="object"&&typeof T!="function")&&(T={});L<A;++L)if(p=arguments[L],p!=null)for(g in p)y=f(T,g),b=f(p,g),T!==b&&(k&&b&&(s(b)||(v=o(b)))?(v?(v=!1,S=y&&o(y)?y:[]):S=y&&s(y)?y:{},c(T,{name:g,newValue:d(k,S,b)})):typeof b<"u"&&c(T,{name:g,newValue:b}));return T},Tf}var RA=LA();const Lf=Eb(RA);function md(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function DA(){const e=[],t={run:i,use:a};return t;function i(...o){let s=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...o);function f(d,...p){const g=e[++s];let y=-1;if(d){c(d);return}for(;++y<o.length;)(p[y]===null||p[y]===void 0)&&(p[y]=o[y]);o=p,g?OA(g,f)(...p):c(null,...p)}}function a(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function OA(e,t){let i;return a;function a(...c){const f=e.length>c.length;let d;f&&c.push(o);try{d=e.apply(this,c)}catch(p){const g=p;if(f&&i)throw g;return o(g)}f||(d&&d.then&&typeof d.then=="function"?d.then(s,o):d instanceof Error?o(d):s(d))}function o(c,...f){i||(i=!0,t(c,...f))}function s(c){o(null,c)}}const Dn={basename:NA,dirname:MA,extname:IA,join:zA,sep:"/"};function NA(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ul(e);let i=0,a=-1,o=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){i=o+1;break}}else a<0&&(s=!0,a=o+1);return a<0?"":e.slice(i,a)}if(t===e)return"";let c=-1,f=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){i=o+1;break}}else c<0&&(s=!0,c=o+1),f>-1&&(e.codePointAt(o)===t.codePointAt(f--)?f<0&&(a=o):(f=-1,a=c));return i===a?a=c:a<0&&(a=e.length),e.slice(i,a)}function MA(e){if(Ul(e),e.length===0)return".";let t=-1,i=e.length,a;for(;--i;)if(e.codePointAt(i)===47){if(a){t=i;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function IA(e){Ul(e);let t=e.length,i=-1,a=0,o=-1,s=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}i<0&&(c=!0,i=t+1),f===46?o<0?o=t:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||i<0||s===0||s===1&&o===i-1&&o===a+1?"":e.slice(o,i)}function zA(...e){let t=-1,i;for(;++t<e.length;)Ul(e[t]),e[t]&&(i=i===void 0?e[t]:i+"/"+e[t]);return i===void 0?".":UA(i)}function UA(e){Ul(e);const t=e.codePointAt(0)===47;let i=HA(e,!t);return i.length===0&&!t&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),t?"/"+i:i}function HA(e,t){let i="",a=0,o=-1,s=0,c=-1,f,d;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(o===c-1||s===1))if(o!==c-1&&s===2){if(i.length<2||a!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(d=i.lastIndexOf("/"),d!==i.length-1){d<0?(i="",a=0):(i=i.slice(0,d),a=i.length-1-i.lastIndexOf("/")),o=c,s=0;continue}}else if(i.length>0){i="",a=0,o=c,s=0;continue}}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(o+1,c):i=e.slice(o+1,c),a=c-o-1;o=c,s=0}else f===46&&s>-1?s++:s=-1}return i}function Ul(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const PA={cwd:BA};function BA(){return"/"}function gd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function jA(e){if(typeof e=="string")e=new URL(e);else if(!gd(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return VA(e)}function VA(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let i=-1;for(;++i<t.length;)if(t.codePointAt(i)===37&&t.codePointAt(i+1)===50){const a=t.codePointAt(i+2);if(a===70||a===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Rf=["history","path","basename","stem","extname","dirname"];class fv{constructor(t){let i;t?gd(t)?i={path:t}:typeof t=="string"||GA(t)?i={value:t}:i=t:i={},this.cwd="cwd"in i?"":PA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Rf.length;){const s=Rf[a];s in i&&i[s]!==void 0&&i[s]!==null&&(this[s]=s==="history"?[...i[s]]:i[s])}let o;for(o in i)Rf.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?Dn.basename(this.path):void 0}set basename(t){Of(t,"basename"),Df(t,"basename"),this.path=Dn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Dn.dirname(this.path):void 0}set dirname(t){r0(this.basename,"dirname"),this.path=Dn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Dn.extname(this.path):void 0}set extname(t){if(Df(t,"extname"),r0(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Dn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){gd(t)&&(t=jA(t)),Of(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Dn.basename(this.path,this.extname):void 0}set stem(t){Of(t,"stem"),Df(t,"stem"),this.path=Dn.join(this.dirname||"",t+(this.extname||""))}fail(t,i,a){const o=this.message(t,i,a);throw o.fatal=!0,o}info(t,i,a){const o=this.message(t,i,a);return o.fatal=void 0,o}message(t,i,a){const o=new Rt(t,i,a);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Df(e,t){if(e&&e.includes(Dn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Dn.sep+"`")}function Of(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function r0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function GA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $A=(function(e){const a=this.constructor.prototype,o=a[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,a),s}),qA={}.hasOwnProperty;class Zd extends $A{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=DA()}copy(){const t=new Zd;let i=-1;for(;++i<this.attachers.length;){const a=this.attachers[i];t.use(...a)}return t.data(Lf(!0,{},this.namespace)),t}data(t,i){return typeof t=="string"?arguments.length===2?(If("data",this.frozen),this.namespace[t]=i,this):qA.call(this.namespace,t)&&this.namespace[t]||void 0:t?(If("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const o=i.call(t,...a);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const i=os(t),a=this.parser||this.Parser;return Nf("parse",a),a(String(i),i)}process(t,i){const a=this;return this.freeze(),Nf("process",this.parser||this.Parser),Mf("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(s,c){const f=os(t),d=a.parse(f);a.run(d,f,function(g,y,b){if(g||!y||!b)return p(g);const v=y,S=a.stringify(v,b);XA(S)?b.value=S:b.result=S,p(g,b)});function p(g,y){g||!y?c(g):s?s(y):i(void 0,y)}}}processSync(t){let i=!1,a;return this.freeze(),Nf("processSync",this.parser||this.Parser),Mf("processSync",this.compiler||this.Compiler),this.process(t,o),l0("processSync","process",i),a;function o(s,c){i=!0,n0(s),a=c}}run(t,i,a){a0(t),this.freeze();const o=this.transformers;return!a&&typeof i=="function"&&(a=i,i=void 0),a?s(void 0,a):new Promise(s);function s(c,f){const d=os(i);o.run(t,d,p);function p(g,y,b){const v=y||t;g?f(g):c?c(v):a(void 0,v,b)}}}runSync(t,i){let a=!1,o;return this.run(t,i,s),l0("runSync","run",a),o;function s(c,f){n0(c),o=f,a=!0}}stringify(t,i){this.freeze();const a=os(i),o=this.compiler||this.Compiler;return Mf("stringify",o),a0(t),o(t,a)}use(t,...i){const a=this.attachers,o=this.namespace;if(If("use",this.frozen),t!=null)if(typeof t=="function")d(t,i);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(p){if(typeof p=="function")d(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[g,...y]=p;d(g,y)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(p.plugins),p.settings&&(o.settings=Lf(!0,o.settings,p.settings))}function f(p){let g=-1;if(p!=null)if(Array.isArray(p))for(;++g<p.length;){const y=p[g];s(y)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function d(p,g){let y=-1,b=-1;for(;++y<a.length;)if(a[y][0]===p){b=y;break}if(b===-1)a.push([p,...g]);else if(g.length>0){let[v,...S]=g;const T=a[b][1];md(T)&&md(v)&&(v=Lf(!0,T,v)),a[b]=[p,v,...S]}}}}const FA=new Zd().freeze();function Nf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Mf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function If(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function a0(e){if(!md(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function l0(e,t,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function os(e){return YA(e)?e:new fv(e)}function YA(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function XA(e){return typeof e=="string"||QA(e)}function QA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ZA="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",o0=[],s0={allowDangerousHtml:!0},KA=/^(https?|ircs?|mailto|xmpp)$/i,WA=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function JA(e){const t=ek(e),i=tk(e);return nk(t.runSync(t.parse(i),i),e)}function ek(e){const t=e.rehypePlugins||o0,i=e.remarkPlugins||o0,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...s0}:s0;return FA().use(Nw).use(i).use(TA,a).use(t)}function tk(e){const t=e.children||"",i=new fv;return typeof t=="string"&&(i.value=t),i}function nk(e,t){const i=t.allowedElements,a=t.allowElement,o=t.components,s=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||ik;for(const g of WA)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+ZA+g.id,void 0);return cv(e,p),dx(e,{Fragment:q.Fragment,components:o,ignoreInvalidStyle:!0,jsx:q.jsx,jsxs:q.jsxs,passKeys:!0,passNode:!0});function p(g,y,b){if(g.type==="raw"&&b&&typeof y=="number")return c?b.children.splice(y,1):b.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let v;for(v in wf)if(Object.hasOwn(wf,v)&&Object.hasOwn(g.properties,v)){const S=g.properties[v],T=wf[v];(T===null||T.includes(g.tagName))&&(g.properties[v]=d(String(S||""),v,g))}}if(g.type==="element"){let v=i?!i.includes(g.tagName):s?s.includes(g.tagName):!1;if(!v&&a&&typeof y=="number"&&(v=!a(g,y,b)),v&&b&&typeof y=="number")return f&&g.children?b.children.splice(y,1,...g.children):b.children.splice(y,1),y}}}function ik(e){const t=e.indexOf(":"),i=e.indexOf("?"),a=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||i!==-1&&t>i||a!==-1&&t>a||KA.test(e.slice(0,t))?e:""}const rk="modulepreload",ak=function(e){return"/"+e},u0={},x=function(t,i,a){let o=Promise.resolve();if(i&&i.length>0){let p=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};var c=p;document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),d=f?.nonce||f?.getAttribute("nonce");o=p(i.map(g=>{if(g=ak(g),g in u0)return;u0[g]=!0;const y=g.endsWith(".css"),b=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${b}`))return;const v=document.createElement("link");if(v.rel=y?"stylesheet":rk,y||(v.as="script"),v.crossOrigin="",v.href=g,d&&v.setAttribute("nonce",d),document.head.appendChild(v),y)return new Promise((S,T)=>{v.addEventListener("load",S),v.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${g}`)))})}))}function s(f){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=f,window.dispatchEvent(d),!d.defaultPrevented)throw f}return o.then(f=>{for(const d of f||[])d.status==="rejected"&&s(d.reason);return t().catch(s)})};let ft=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function lk(e){return Kd(e)}function Kd(e){return Array.isArray(e)?ok(e):e instanceof RegExp?e:typeof e=="object"?sk(e):e}function ok(e){let t=[];for(let i=0,a=e.length;i<a;i++)t[i]=Kd(e[i]);return t}function sk(e){let t={};for(let i in e)t[i]=Kd(e[i]);return t}function dv(e,...t){return t.forEach(i=>{for(let a in i)e[a]=i[a]}),e}function hv(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?hv(e.substring(0,e.length-1)):e.substr(~t+1)}var zf=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ss=class{static hasCaptures(e){return e===null?!1:(zf.lastIndex=0,zf.test(e))}static replaceCaptures(e,t,i){return e.replace(zf,(a,o,s,c)=>{let f=i[parseInt(o||s,10)];if(f){let d=t.substring(f.start,f.end);for(;d[0]===".";)d=d.substring(1);switch(c){case"downcase":return d.toLowerCase();case"upcase":return d.toUpperCase();default:return d}}else return a})}};function pv(e,t){return e<t?-1:e>t?1:0}function mv(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let i=e.length,a=t.length;if(i===a){for(let o=0;o<i;o++){let s=pv(e[o],t[o]);if(s!==0)return s}return 0}return i-a}function c0(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function gv(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var yv=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},ks=class{constructor(e,t,i){this._colorMap=e,this._defaults=t,this._root=i}static createFromRawTheme(e,t){return this.createFromParsedTheme(fk(e),t)}static createFromParsedTheme(e,t){return hk(e,t)}_cachedMatchRoot=new yv(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,a=this._cachedMatchRoot.get(t).find(o=>uk(e.parent,o.parentScopes));return a?new bv(a.fontStyle,a.foreground,a.background):null}},Uf=class Ss{constructor(t,i){this.parent=t,this.scopeName=i}static push(t,i){for(const a of i)t=new Ss(t,a);return t}static from(...t){let i=null;for(let a=0;a<t.length;a++)i=new Ss(i,t[a]);return i}push(t){return new Ss(this,t)}getSegments(){let t=this;const i=[];for(;t;)i.push(t.scopeName),t=t.parent;return i.reverse(),i}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const i=[];let a=this;for(;a&&a!==t;)i.push(a.scopeName),a=a.parent;return a===t?i.reverse():void 0}};function uk(e,t){if(t.length===0)return!0;for(let i=0;i<t.length;i++){let a=t[i],o=!1;if(a===">"){if(i===t.length-1)return!1;a=t[++i],o=!0}for(;e&&!ck(e.scopeName,a);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function ck(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var bv=class{constructor(e,t,i){this.fontStyle=e,this.foregroundId=t,this.backgroundId=i}};function fk(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,i=[],a=0;for(let o=0,s=t.length;o<s;o++){let c=t[o];if(!c.settings)continue;let f;if(typeof c.scope=="string"){let y=c.scope;y=y.replace(/^[,]+/,""),y=y.replace(/[,]+$/,""),f=y.split(",")}else Array.isArray(c.scope)?f=c.scope:f=[""];let d=-1;if(typeof c.settings.fontStyle=="string"){d=0;let y=c.settings.fontStyle.split(" ");for(let b=0,v=y.length;b<v;b++)switch(y[b]){case"italic":d=d|1;break;case"bold":d=d|2;break;case"underline":d=d|4;break;case"strikethrough":d=d|8;break}}let p=null;typeof c.settings.foreground=="string"&&c0(c.settings.foreground)&&(p=c.settings.foreground);let g=null;typeof c.settings.background=="string"&&c0(c.settings.background)&&(g=c.settings.background);for(let y=0,b=f.length;y<b;y++){let S=f[y].trim().split(" "),T=S[S.length-1],L=null;S.length>1&&(L=S.slice(0,S.length-1),L.reverse()),i[a++]=new dk(T,L,o,d,p,g)}}return i}var dk=class{constructor(e,t,i,a,o,s){this.scope=e,this.parentScopes=t,this.index=i,this.fontStyle=a,this.foreground=o,this.background=s}},Lt=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Lt||{});function hk(e,t){e.sort((d,p)=>{let g=pv(d.scope,p.scope);return g!==0||(g=mv(d.parentScopes,p.parentScopes),g!==0)?g:d.index-p.index});let i=0,a="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let d=e.shift();d.fontStyle!==-1&&(i=d.fontStyle),d.foreground!==null&&(a=d.foreground),d.background!==null&&(o=d.background)}let s=new pk(t),c=new bv(i,s.getId(a),s.getId(o)),f=new gk(new yd(0,null,-1,0,0),[]);for(let d=0,p=e.length;d<p;d++){let g=e[d];f.insert(0,g.scope,g.parentScopes,g.fontStyle,s.getId(g.foreground),s.getId(g.background))}return new ks(s,c,f)}var pk=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,i=e.length;t<i;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},mk=Object.freeze([]),yd=class vv{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,i,a,o,s){this.scopeDepth=t,this.parentScopes=i||mk,this.fontStyle=a,this.foreground=o,this.background=s}clone(){return new vv(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let i=[];for(let a=0,o=t.length;a<o;a++)i[a]=t[a].clone();return i}acceptOverwrite(t,i,a,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,i!==-1&&(this.fontStyle=i),a!==0&&(this.foreground=a),o!==0&&(this.background=o)}},gk=class bd{constructor(t,i=[],a={}){this._mainRule=t,this._children=a,this._rulesWithParentScopes=i}_rulesWithParentScopes;static _cmpBySpecificity(t,i){if(t.scopeDepth!==i.scopeDepth)return i.scopeDepth-t.scopeDepth;let a=0,o=0;for(;t.parentScopes[a]===">"&&a++,i.parentScopes[o]===">"&&o++,!(a>=t.parentScopes.length||o>=i.parentScopes.length);){const s=i.parentScopes[o].length-t.parentScopes[a].length;if(s!==0)return s;a++,o++}return i.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let a=t.indexOf("."),o,s;if(a===-1?(o=t,s=""):(o=t.substring(0,a),s=t.substring(a+1)),this._children.hasOwnProperty(o))return this._children[o].match(s)}const i=this._rulesWithParentScopes.concat(this._mainRule);return i.sort(bd._cmpBySpecificity),i}insert(t,i,a,o,s,c){if(i===""){this._doInsertHere(t,a,o,s,c);return}let f=i.indexOf("."),d,p;f===-1?(d=i,p=""):(d=i.substring(0,f),p=i.substring(f+1));let g;this._children.hasOwnProperty(d)?g=this._children[d]:(g=new bd(this._mainRule.clone(),yd.cloneArr(this._rulesWithParentScopes)),this._children[d]=g),g.insert(t+1,p,a,o,s,c)}_doInsertHere(t,i,a,o,s){if(i===null){this._mainRule.acceptOverwrite(t,a,o,s);return}for(let c=0,f=this._rulesWithParentScopes.length;c<f;c++){let d=this._rulesWithParentScopes[c];if(mv(d.parentScopes,i)===0){d.acceptOverwrite(t,a,o,s);return}}a===-1&&(a=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new yd(t,i,a,o,s))}},fa=class dn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const i=dn.getLanguageId(t),a=dn.getTokenType(t),o=dn.getFontStyle(t),s=dn.getForeground(t),c=dn.getBackground(t);console.log({languageId:i,tokenType:a,fontStyle:o,foreground:s,background:c})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,i,a,o,s,c,f){let d=dn.getLanguageId(t),p=dn.getTokenType(t),g=dn.containsBalancedBrackets(t)?1:0,y=dn.getFontStyle(t),b=dn.getForeground(t),v=dn.getBackground(t);return i!==0&&(d=i),a!==8&&(p=a),o!==null&&(g=o?1:0),s!==-1&&(y=s),c!==0&&(b=c),f!==0&&(v=f),(d<<0|p<<8|g<<10|y<<11|b<<15|v<<24)>>>0}};function Ts(e,t){const i=[],a=yk(e);let o=a.next();for(;o!==null;){let d=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":d=1;break;case"L":d=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=a.next()}let p=c();if(i.push({matcher:p,priority:d}),o!==",")break;o=a.next()}return i;function s(){if(o==="-"){o=a.next();const d=s();return p=>!!d&&!d(p)}if(o==="("){o=a.next();const d=f();return o===")"&&(o=a.next()),d}if(f0(o)){const d=[];do d.push(o),o=a.next();while(f0(o));return p=>t(d,p)}return null}function c(){const d=[];let p=s();for(;p;)d.push(p),p=s();return g=>d.every(y=>y(g))}function f(){const d=[];let p=c();for(;p&&(d.push(p),o==="|"||o===",");){do o=a.next();while(o==="|"||o===",");p=c()}return g=>d.some(y=>y(g))}}function f0(e){return!!e&&!!e.match(/[\w\.:]+/)}function yk(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,i=t.exec(e);return{next:()=>{if(!i)return null;const a=i[0];return i=t.exec(e),a}}}function _v(e){typeof e.dispose=="function"&&e.dispose()}var Tl=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},bk=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},vk=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},_k=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Tl(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new vk;for(const i of e)Sk(i,this.initialScopeName,this.repo,t);for(const i of t.references)if(i instanceof Tl){if(this.seenFullScopeRequests.has(i.scopeName))continue;this.seenFullScopeRequests.add(i.scopeName),this.Q.push(i)}else{if(this.seenFullScopeRequests.has(i.scopeName)||this.seenPartialScopeRequests.has(i.toKey()))continue;this.seenPartialScopeRequests.add(i.toKey()),this.Q.push(i)}}};function Sk(e,t,i,a){const o=i.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=i.lookup(t);e instanceof Tl?Es({baseGrammar:s,selfGrammar:o},a):vd(e.ruleName,{baseGrammar:s,selfGrammar:o,repository:o.repository},a);const c=i.injections(e.scopeName);if(c)for(const f of c)a.add(new Tl(f))}function vd(e,t,i){if(t.repository&&t.repository[e]){const a=t.repository[e];Ls([a],t,i)}}function Es(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ls(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ls(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ls(e,t,i){for(const a of e){if(i.visitedRule.has(a))continue;i.visitedRule.add(a);const o=a.repository?dv({},t.repository,a.repository):t.repository;Array.isArray(a.patterns)&&Ls(a.patterns,{...t,repository:o},i);const s=a.include;if(!s)continue;const c=Sv(s);switch(c.kind){case 0:Es({...t,selfGrammar:t.baseGrammar},i);break;case 1:Es(t,i);break;case 2:vd(c.ruleName,{...t,repository:o},i);break;case 3:case 4:const f=c.scopeName===t.selfGrammar.scopeName?t.selfGrammar:c.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(f){const d={baseGrammar:t.baseGrammar,selfGrammar:f,repository:o};c.kind===4?vd(c.ruleName,d,i):Es(d,i)}else c.kind===4?i.add(new bk(c.scopeName,c.ruleName)):i.add(new Tl(c.scopeName));break}}}var Ek=class{kind=0},xk=class{kind=1},Ck=class{constructor(e){this.ruleName=e}kind=2},wk=class{constructor(e){this.scopeName=e}kind=3},Ak=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Sv(e){if(e==="$base")return new Ek;if(e==="$self")return new xk;const t=e.indexOf("#");if(t===-1)return new wk(e);if(t===0)return new Ck(e.substring(1));{const i=e.substring(0,t),a=e.substring(t+1);return new Ak(i,a)}}var kk=/\\(\d+)/,d0=/\\(\d+)/g,Tk=-1,Ev=-2;var Hl=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,i,a){this.$location=e,this.id=t,this._name=i||null,this._nameIsCapturing=ss.hasCaptures(this._name),this._contentName=a||null,this._contentNameIsCapturing=ss.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${hv(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:ss.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ss.replaceCaptures(this._contentName,e,t)}},Lk=class extends Hl{retokenizeCapturedWithRuleId;constructor(e,t,i,a,o){super(e,t,i,a),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,i,a){throw new Error("Not supported!")}},Rk=class extends Hl{_match;captures;_cachedCompiledPatterns;constructor(e,t,i,a,o){super(e,t,i,null),this._match=new Ll(a,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,i,a){return this._getCachedCompiledPatterns(e).compileAG(e,i,a)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Rl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},h0=class extends Hl{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,i,a,o){super(e,t,i,a),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const i of this.patterns)e.getRule(i).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,i,a){return this._getCachedCompiledPatterns(e).compileAG(e,i,a)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Rl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},_d=class extends Hl{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,i,a,o,s,c,f,d,p){super(e,t,i,a),this._begin=new Ll(o,this.id),this.beginCaptures=s,this._end=new Ll(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=f,this.applyEndPatternLast=d||!1,this.patterns=p.patterns,this.hasMissingPatterns=p.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,i,a){return this._getCachedCompiledPatterns(e,t).compileAG(e,i,a)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Rl;for(const i of this.patterns)e.getRule(i).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Rs=class extends Hl{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,i,a,o,s,c,f,d){super(e,t,i,a),this._begin=new Ll(o,this.id),this.beginCaptures=s,this.whileCaptures=f,this._while=new Ll(c,Ev),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,i,a){return this._getCachedCompiledPatterns(e).compileAG(e,i,a)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Rl;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,i,a){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,i,a)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Rl,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},xv=class Tt{static createCaptureRule(t,i,a,o,s){return t.registerRule(c=>new Lk(i,c,a,o,s))}static getCompiledRuleId(t,i,a){return t.id||i.registerRule(o=>{if(t.id=o,t.match)return new Rk(t.$vscodeTextmateLocation,t.id,t.name,t.match,Tt._compileCaptures(t.captures,i,a));if(typeof t.begin>"u"){t.repository&&(a=dv({},a,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new h0(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Tt._compilePatterns(s,i,a))}return t.while?new Rs(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Tt._compileCaptures(t.beginCaptures||t.captures,i,a),t.while,Tt._compileCaptures(t.whileCaptures||t.captures,i,a),Tt._compilePatterns(t.patterns,i,a)):new _d(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Tt._compileCaptures(t.beginCaptures||t.captures,i,a),t.end,Tt._compileCaptures(t.endCaptures||t.captures,i,a),t.applyEndPatternLast,Tt._compilePatterns(t.patterns,i,a))}),t.id}static _compileCaptures(t,i,a){let o=[];if(t){let s=0;for(const c in t){if(c==="$vscodeTextmateLocation")continue;const f=parseInt(c,10);f>s&&(s=f)}for(let c=0;c<=s;c++)o[c]=null;for(const c in t){if(c==="$vscodeTextmateLocation")continue;const f=parseInt(c,10);let d=0;t[c].patterns&&(d=Tt.getCompiledRuleId(t[c],i,a)),o[f]=Tt.createCaptureRule(i,t[c].$vscodeTextmateLocation,t[c].name,t[c].contentName,d)}}return o}static _compilePatterns(t,i,a){let o=[];if(t)for(let s=0,c=t.length;s<c;s++){const f=t[s];let d=-1;if(f.include){const p=Sv(f.include);switch(p.kind){case 0:case 1:d=Tt.getCompiledRuleId(a[f.include],i,a);break;case 2:let g=a[p.ruleName];g&&(d=Tt.getCompiledRuleId(g,i,a));break;case 3:case 4:const y=p.scopeName,b=p.kind===4?p.ruleName:null,v=i.getExternalGrammar(y,a);if(v)if(b){let S=v.repository[b];S&&(d=Tt.getCompiledRuleId(S,i,v.repository))}else d=Tt.getCompiledRuleId(v.repository.$self,i,v.repository);break}}else d=Tt.getCompiledRuleId(f,i,a);if(d!==-1){const p=i.getRule(d);let g=!1;if((p instanceof h0||p instanceof _d||p instanceof Rs)&&p.hasMissingPatterns&&p.patterns.length===0&&(g=!0),g)continue;o.push(d)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Ll=class Cv{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,i){if(t&&typeof t=="string"){const a=t.length;let o=0,s=[],c=!1;for(let f=0;f<a;f++)if(t.charAt(f)==="\\"&&f+1<a){const p=t.charAt(f+1);p==="z"?(s.push(t.substring(o,f)),s.push("$(?!\\n)(?<!\\n)"),o=f+2):(p==="A"||p==="G")&&(c=!0),f++}this.hasAnchor=c,o===0?this.source=t:(s.push(t.substring(o,a)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=i,typeof this.source=="string"?this.hasBackReferences=kk.test(this.source):this.hasBackReferences=!1}clone(){return new Cv(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,i){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let a=i.map(o=>t.substring(o.start,o.end));return d0.lastIndex=0,this.source.replace(d0,(o,s)=>gv(a[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],i=[],a=[],o=[],s,c,f,d;for(s=0,c=this.source.length;s<c;s++)f=this.source.charAt(s),t[s]=f,i[s]=f,a[s]=f,o[s]=f,f==="\\"&&s+1<c&&(d=this.source.charAt(s+1),d==="A"?(t[s+1]="￿",i[s+1]="￿",a[s+1]="A",o[s+1]="A"):d==="G"?(t[s+1]="￿",i[s+1]="G",a[s+1]="￿",o[s+1]="G"):(t[s+1]=d,i[s+1]=d,a[s+1]=d,o[s+1]=d),s++);return{A0_G0:t.join(""),A0_G1:i.join(""),A1_G0:a.join(""),A1_G1:o.join("")}}resolveAnchors(t,i){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?i?this._anchorCache.A1_G1:this._anchorCache.A1_G0:i?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Rl=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(i=>i.source);this._cached=new p0(e,t,this._items.map(i=>i.ruleId))}return this._cached}compileAG(e,t,i){return this._hasAnchors?t?i?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,i)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,i)),this._anchorCache.A1_G0):i?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,i)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,i)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,i){let a=this._items.map(o=>o.resolveAnchors(t,i));return new p0(e,a,this._items.map(o=>o.ruleId))}},p0=class{constructor(e,t,i){this.regExps=t,this.rules=i,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,i=this.rules.length;t<i;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
24
- `)}findNextMatchSync(e,t,i){const a=this.scanner.findNextMatchSync(e,t,i);return a?{ruleId:this.rules[a.index],captureIndices:a.captureIndices}:null}},Hf=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Dk=class Sd{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,i){this._defaultAttributes=new Hf(t,8),this._embeddedLanguagesMatcher=new Ok(Object.entries(i||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Sd._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Hf(0,0);_getBasicScopeAttributes=new yv(t=>{const i=this._scopeToLanguage(t),a=this._toStandardTokenType(t);return new Hf(i,a)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const i=t.match(Sd.STANDARD_TOKEN_TYPE_REGEXP);if(!i)return 8;switch(i[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Ok=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([i,a])=>gv(i));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},m0=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function wv(e,t,i,a,o,s,c,f){const d=t.content.length;let p=!1,g=-1;if(c){const v=Nk(e,t,i,a,o,s);o=v.stack,a=v.linePos,i=v.isFirstLine,g=v.anchorPosition}const y=Date.now();for(;!p;){if(f!==0&&Date.now()-y>f)return new m0(o,!0);b()}return new m0(o,!1);function b(){const v=Mk(e,t,i,a,o,g);if(!v){s.produce(o,d),p=!0;return}const S=v.captureIndices,T=v.matchedRuleId,L=S&&S.length>0?S[0].end>a:!1;if(T===Tk){const A=o.getRule(e);s.produce(o,S[0].start),o=o.withContentNameScopesList(o.nameScopesList),Sl(e,t,i,o,s,A.endCaptures,S),s.produce(o,S[0].end);const k=o;if(o=o.parent,g=k.getAnchorPos(),!L&&k.getEnterPos()===a){o=k,s.produce(o,d),p=!0;return}}else{const A=e.getRule(T);s.produce(o,S[0].start);const k=o,C=A.getName(t.content,S),z=o.contentNameScopesList.pushAttributed(C,e);if(o=o.push(T,a,g,S[0].end===d,null,z,z),A instanceof _d){const U=A;Sl(e,t,i,o,s,U.beginCaptures,S),s.produce(o,S[0].end),g=S[0].end;const O=U.getContentName(t.content,S),j=z.pushAttributed(O,e);if(o=o.withContentNameScopesList(j),U.endHasBackReferences&&(o=o.withEndRule(U.getEndWithResolvedBackReferences(t.content,S))),!L&&k.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),p=!0;return}}else if(A instanceof Rs){const U=A;Sl(e,t,i,o,s,U.beginCaptures,S),s.produce(o,S[0].end),g=S[0].end;const O=U.getContentName(t.content,S),j=z.pushAttributed(O,e);if(o=o.withContentNameScopesList(j),U.whileHasBackReferences&&(o=o.withEndRule(U.getWhileWithResolvedBackReferences(t.content,S))),!L&&k.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),p=!0;return}}else if(Sl(e,t,i,o,s,A.captures,S),s.produce(o,S[0].end),o=o.pop(),!L){o=o.safePop(),s.produce(o,d),p=!0;return}}S[0].end>a&&(a=S[0].end,i=!1)}}function Nk(e,t,i,a,o,s){let c=o.beginRuleCapturedEOL?0:-1;const f=[];for(let d=o;d;d=d.pop()){const p=d.getRule(e);p instanceof Rs&&f.push({rule:p,stack:d})}for(let d=f.pop();d;d=f.pop()){const{ruleScanner:p,findOptions:g}=Uk(d.rule,e,d.stack.endRule,i,a===c),y=p.findNextMatchSync(t,a,g);if(y){if(y.ruleId!==Ev){o=d.stack.pop();break}y.captureIndices&&y.captureIndices.length&&(s.produce(d.stack,y.captureIndices[0].start),Sl(e,t,i,d.stack,s,d.rule.whileCaptures,y.captureIndices),s.produce(d.stack,y.captureIndices[0].end),c=y.captureIndices[0].end,y.captureIndices[0].end>a&&(a=y.captureIndices[0].end,i=!1))}else{o=d.stack.pop();break}}return{stack:o,linePos:a,anchorPosition:c,isFirstLine:i}}function Mk(e,t,i,a,o,s){const c=Ik(e,t,i,a,o,s),f=e.getInjections();if(f.length===0)return c;const d=zk(f,e,t,i,a,o,s);if(!d)return c;if(!c)return d;const p=c.captureIndices[0].start,g=d.captureIndices[0].start;return g<p||d.priorityMatch&&g===p?d:c}function Ik(e,t,i,a,o,s){const c=o.getRule(e),{ruleScanner:f,findOptions:d}=Av(c,e,o.endRule,i,a===s),p=f.findNextMatchSync(t,a,d);return p?{captureIndices:p.captureIndices,matchedRuleId:p.ruleId}:null}function zk(e,t,i,a,o,s,c){let f=Number.MAX_VALUE,d=null,p,g=0;const y=s.contentNameScopesList.getScopeNames();for(let b=0,v=e.length;b<v;b++){const S=e[b];if(!S.matcher(y))continue;const T=t.getRule(S.ruleId),{ruleScanner:L,findOptions:A}=Av(T,t,null,a,o===c),k=L.findNextMatchSync(i,o,A);if(!k)continue;const C=k.captureIndices[0].start;if(!(C>=f)&&(f=C,d=k.captureIndices,p=k.ruleId,g=S.priority,f===o))break}return d?{priorityMatch:g===-1,captureIndices:d,matchedRuleId:p}:null}function Av(e,t,i,a,o){return{ruleScanner:e.compileAG(t,i,a,o),findOptions:0}}function Uk(e,t,i,a,o){return{ruleScanner:e.compileWhileAG(t,i,a,o),findOptions:0}}function Sl(e,t,i,a,o,s,c){if(s.length===0)return;const f=t.content,d=Math.min(s.length,c.length),p=[],g=c[0].end;for(let y=0;y<d;y++){const b=s[y];if(b===null)continue;const v=c[y];if(v.length===0)continue;if(v.start>g)break;for(;p.length>0&&p[p.length-1].endPos<=v.start;)o.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop();if(p.length>0?o.produceFromScopes(p[p.length-1].scopes,v.start):o.produce(a,v.start),b.retokenizeCapturedWithRuleId){const T=b.getName(f,c),L=a.contentNameScopesList.pushAttributed(T,e),A=b.getContentName(f,c),k=L.pushAttributed(A,e),C=a.push(b.retokenizeCapturedWithRuleId,v.start,-1,!1,null,L,k),z=e.createOnigString(f.substring(0,v.end));wv(e,z,i&&v.start===0,v.start,C,o,!1,0),_v(z);continue}const S=b.getName(f,c);if(S!==null){const L=(p.length>0?p[p.length-1].scopes:a.contentNameScopesList).pushAttributed(S,e);p.push(new Hk(L,v.end))}}for(;p.length>0;)o.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop()}var Hk=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Pk(e,t,i,a,o,s,c,f){return new jk(e,t,i,a,o,s,c,f)}function g0(e,t,i,a,o){const s=Ts(t,Ds),c=xv.getCompiledRuleId(i,a,o.repository);for(const f of s)e.push({debugSelector:t,matcher:f.matcher,ruleId:c,grammar:o,priority:f.priority})}function Ds(e,t){if(t.length<e.length)return!1;let i=0;return e.every(a=>{for(let o=i;o<t.length;o++)if(Bk(t[o],a))return i=o+1,!0;return!1})}function Bk(e,t){if(!e)return!1;if(e===t)return!0;const i=t.length;return e.length>i&&e.substr(0,i)===t&&e[i]==="."}var jk=class{constructor(e,t,i,a,o,s,c,f){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=f,this._basicScopeAttributesProvider=new Dk(i,a),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=c,this._grammar=y0(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const d of Object.keys(o)){const p=Ts(d,Ds);for(const g of p)this._tokenTypeMatchers.push({matcher:g.matcher,type:o[d]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},t=[],i=this._rootScopeName,a=e.lookup(i);if(a){const o=a.injections;if(o)for(let c in o)g0(t,c,o[c],this,a);const s=this._grammarRepository.injections(i);s&&s.forEach(c=>{const f=this.getExternalGrammar(c);if(f){const d=f.injectionSelector;d&&g0(t,d,f,this,f)}})}return t.sort((o,s)=>o.priority-s.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,i=e(t);return this._ruleId2desc[t]=i,i}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const i=this._grammarRepository.lookup(e);if(i)return this._includedGrammars[e]=y0(i,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,i=0){const a=this._tokenize(e,t,!1,i);return{tokens:a.lineTokens.getResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}tokenizeLine2(e,t,i=0){const a=this._tokenize(e,t,!0,i);return{tokens:a.lineTokens.getBinaryResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}_tokenize(e,t,i,a){this._rootId===-1&&(this._rootId=xv.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===Ed.NULL){o=!0;const p=this._basicScopeAttributesProvider.getDefaultAttributes(),g=this.themeProvider.getDefaults(),y=fa.set(0,p.languageId,p.tokenType,null,g.fontStyle,g.foregroundId,g.backgroundId),b=this.getRule(this._rootId).getName(null,null);let v;b?v=wl.createRootAndLookUpScopeName(b,y,this):v=wl.createRoot("unknown",y),t=new Ed(null,this._rootId,-1,-1,!1,null,v,v)}else o=!1,t.reset();e=e+`
25
- `;const s=this.createOnigString(e),c=s.content.length,f=new Gk(i,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=wv(this,s,o,0,t,f,!0,a);return _v(s),{lineLength:c,lineTokens:f,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function y0(e,t){return e=lk(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var wl=class Ln{constructor(t,i,a){this.parent=t,this.scopePath=i,this.tokenAttributes=a}static fromExtension(t,i){let a=t,o=t?.scopePath??null;for(const s of i)o=Uf.push(o,s.scopeNames),a=new Ln(a,o,s.encodedTokenAttributes);return a}static createRoot(t,i){return new Ln(null,new Uf(null,t),i)}static createRootAndLookUpScopeName(t,i,a){const o=a.getMetadataForScope(t),s=new Uf(null,t),c=a.themeProvider.themeMatch(s),f=Ln.mergeAttributes(i,o,c);return new Ln(null,s,f)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Ln.equals(this,t)}static equals(t,i){do{if(t===i||!t&&!i)return!0;if(!t||!i||t.scopeName!==i.scopeName||t.tokenAttributes!==i.tokenAttributes)return!1;t=t.parent,i=i.parent}while(!0)}static mergeAttributes(t,i,a){let o=-1,s=0,c=0;return a!==null&&(o=a.fontStyle,s=a.foregroundId,c=a.backgroundId),fa.set(t,i.languageId,i.tokenType,null,o,s,c)}pushAttributed(t,i){if(t===null)return this;if(t.indexOf(" ")===-1)return Ln._pushAttributed(this,t,i);const a=t.split(/ /g);let o=this;for(const s of a)o=Ln._pushAttributed(o,s,i);return o}static _pushAttributed(t,i,a){const o=a.getMetadataForScope(i),s=t.scopePath.push(i),c=a.themeProvider.themeMatch(s),f=Ln.mergeAttributes(t.tokenAttributes,o,c);return new Ln(t,s,f)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const i=[];let a=this;for(;a&&a!==t;)i.push({encodedTokenAttributes:a.tokenAttributes,scopeNames:a.scopePath.getExtensionIfDefined(a.parent?.scopePath??null)}),a=a.parent;return a===t?i.reverse():void 0}},Ed=class nr{constructor(t,i,a,o,s,c,f,d){this.parent=t,this.ruleId=i,this.beginRuleCapturedEOL=s,this.endRule=c,this.nameScopesList=f,this.contentNameScopesList=d,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=a,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new nr(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:nr._equals(this,t)}static _equals(t,i){return t===i?!0:this._structuralEquals(t,i)?wl.equals(t.contentNameScopesList,i.contentNameScopesList):!1}static _structuralEquals(t,i){do{if(t===i||!t&&!i)return!0;if(!t||!i||t.depth!==i.depth||t.ruleId!==i.ruleId||t.endRule!==i.endRule)return!1;t=t.parent,i=i.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){nr._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,i,a,o,s,c,f){return new nr(this,t,i,a,o,s,c,f)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,i){return this.parent&&(i=this.parent._writeString(t,i)),t[i++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,i}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new nr(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let i=this;for(;i&&i._enterPos===t._enterPos;){if(i.ruleId===t.ruleId)return!0;i=i.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,i){const a=wl.fromExtension(t?.nameScopesList??null,i.nameScopesList);return new nr(t,i.ruleId,i.enterPos??-1,i.anchorPos??-1,i.beginRuleCapturedEOL,i.endRule,a,wl.fromExtension(a,i.contentNameScopesList))}},Vk=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(i=>i==="*"?(this.allowAny=!0,[]):Ts(i,Ds).map(a=>a.matcher)),this.unbalancedBracketScopes=t.flatMap(i=>Ts(i,Ds).map(a=>a.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Gk=class{constructor(e,t,i,a){this.balancedBracketSelectors=a,this._emitBinaryTokens=e,this._tokenTypeOverrides=i,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let a=e?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=e?.getScopeNames()??[];for(const c of this._tokenTypeOverrides)c.matcher(s)&&(a=fa.set(a,0,c.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(a=fa.set(a,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===a){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(a),this._lastTokenEndIndex=t;return}const i=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:i}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const i=new Uint32Array(this._binaryTokens.length);for(let a=0,o=this._binaryTokens.length;a<o;a++)i[a]=this._binaryTokens[a];return i}},$k=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,i,a,o){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,Pk(e,s,t,i,a,o,this,this._onigLib))}return this._grammars.get(e)}},qk=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new $k(ks.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,i){this._syncRegistry.setTheme(ks.createFromRawTheme(t,i))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,i,a){return this.loadGrammarWithConfiguration(t,i,{embeddedLanguages:a})}loadGrammarWithConfiguration(t,i,a){return this._loadGrammar(t,i,a.embeddedLanguages,a.tokenTypes,new Vk(a.balancedBracketSelectors||[],a.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,i,a,o,s){const c=new _k(this._syncRegistry,t);for(;c.Q.length>0;)c.Q.map(f=>this._loadSingleGrammar(f.scopeName)),c.processQueue();return this._grammarForScopeName(t,i,a,o,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const i=this._options.loadGrammar(t);if(i){const a=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(i,a)}}addGrammar(t,i=[],a=0,o=null){return this._syncRegistry.addGrammar(t,i),this._grammarForScopeName(t.scopeName,a,o)}_grammarForScopeName(t,i=0,a=null,o=null,s=null){return this._syncRegistry.grammarForScopeName(t,i,a,o,s)}},xd=Ed.NULL;const Fk=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],b0={}.hasOwnProperty;function Yk(e,t){const i=t||{};function a(o,...s){let c=a.invalid;const f=a.handlers;if(o&&b0.call(o,e)){const d=String(o[e]);c=b0.call(f,d)?f[d]:a.unknown}if(c)return c.call(this,o,...s)}return a.handlers=i.handlers||{},a.invalid=i.invalid,a.unknown=i.unknown,a}const Xk=/["&'<>`]/g,Qk=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Zk=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Kk=/[|\\{}()[\]^$+*?.]/g,v0=new WeakMap;function Wk(e,t){if(e=e.replace(t.subset?Jk(t.subset):Xk,a),t.subset||t.escapeOnly)return e;return e.replace(Qk,i).replace(Zk,a);function i(o,s,c){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,c.charCodeAt(s+2),t)}function a(o,s,c){return t.format(o.charCodeAt(0),c.charCodeAt(s+1),t)}}function Jk(e){let t=v0.get(e);return t||(t=eT(e),v0.set(e,t)),t}function eT(e){const t=[];let i=-1;for(;++i<e.length;)t.push(e[i].replace(Kk,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const tT=/[\dA-Fa-f]/;function nT(e,t,i){const a="&#x"+e.toString(16).toUpperCase();return i&&t&&!tT.test(String.fromCharCode(t))?a:a+";"}const iT=/\d/;function rT(e,t,i){const a="&#"+String(e);return i&&t&&!iT.test(String.fromCharCode(t))?a:a+";"}const aT=["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"],Pf={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:"€"},lT=["cent","copy","divide","gt","lt","not","para","times"],kv={}.hasOwnProperty,Cd={};let us;for(us in Pf)kv.call(Pf,us)&&(Cd[Pf[us]]=us);const oT=/[^\dA-Za-z]/;function sT(e,t,i,a){const o=String.fromCharCode(e);if(kv.call(Cd,o)){const s=Cd[o],c="&"+s;return i&&aT.includes(s)&&!lT.includes(s)&&(!a||t&&t!==61&&oT.test(String.fromCharCode(t)))?c:c+";"}return""}function uT(e,t,i){let a=nT(e,t,i.omitOptionalSemicolons),o;if((i.useNamedReferences||i.useShortestReferences)&&(o=sT(e,t,i.omitOptionalSemicolons,i.attribute)),(i.useShortestReferences||!o)&&i.useShortestReferences){const s=rT(e,t,i.omitOptionalSemicolons);s.length<a.length&&(a=s)}return o&&(!i.useShortestReferences||o.length<a.length)?o:a}function sa(e,t){return Wk(e,Object.assign({format:uT},t))}const cT=/^>|^->|<!--|-->|--!>|<!-$/g,fT=[">"],dT=["<",">"];function hT(e,t,i,a){return a.settings.bogusComments?"<?"+sa(e.value,Object.assign({},a.settings.characterReferences,{subset:fT}))+">":"<!--"+e.value.replace(cT,o)+"-->";function o(s){return sa(s,Object.assign({},a.settings.characterReferences,{subset:dT}))}}function pT(e,t,i,a){return"<!"+(a.settings.upperDoctype?"DOCTYPE":"doctype")+(a.settings.tightDoctype?"":" ")+"html>"}function _0(e,t){const i=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,o=i.indexOf(t);for(;o!==-1;)a++,o=i.indexOf(t,o+t.length);return a}const yt=Lv(1),Tv=Lv(-1),mT=[];function Lv(e){return t;function t(i,a,o){const s=i?i.children:mT;let c=(a||0)+e,f=s[c];if(!o)for(;f&&js(f);)c+=e,f=s[c];return f}}const gT={}.hasOwnProperty;function Rv(e){return t;function t(i,a,o){return gT.call(e,i.tagName)&&e[i.tagName](i,a,o)}}const Wd=Rv({body:bT,caption:Bf,colgroup:Bf,dd:ET,dt:ST,head:Bf,html:yT,li:_T,optgroup:xT,option:CT,p:vT,rp:S0,rt:S0,tbody:AT,td:E0,tfoot:kT,th:E0,thead:wT,tr:TT});function Bf(e,t,i){const a=yt(i,t,!0);return!a||a.type!=="comment"&&!(a.type==="text"&&js(a.value.charAt(0)))}function yT(e,t,i){const a=yt(i,t);return!a||a.type!=="comment"}function bT(e,t,i){const a=yt(i,t);return!a||a.type!=="comment"}function vT(e,t,i){const a=yt(i,t);return a?a.type==="element"&&(a.tagName==="address"||a.tagName==="article"||a.tagName==="aside"||a.tagName==="blockquote"||a.tagName==="details"||a.tagName==="div"||a.tagName==="dl"||a.tagName==="fieldset"||a.tagName==="figcaption"||a.tagName==="figure"||a.tagName==="footer"||a.tagName==="form"||a.tagName==="h1"||a.tagName==="h2"||a.tagName==="h3"||a.tagName==="h4"||a.tagName==="h5"||a.tagName==="h6"||a.tagName==="header"||a.tagName==="hgroup"||a.tagName==="hr"||a.tagName==="main"||a.tagName==="menu"||a.tagName==="nav"||a.tagName==="ol"||a.tagName==="p"||a.tagName==="pre"||a.tagName==="section"||a.tagName==="table"||a.tagName==="ul"):!i||!(i.type==="element"&&(i.tagName==="a"||i.tagName==="audio"||i.tagName==="del"||i.tagName==="ins"||i.tagName==="map"||i.tagName==="noscript"||i.tagName==="video"))}function _T(e,t,i){const a=yt(i,t);return!a||a.type==="element"&&a.tagName==="li"}function ST(e,t,i){const a=yt(i,t);return!!(a&&a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd"))}function ET(e,t,i){const a=yt(i,t);return!a||a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd")}function S0(e,t,i){const a=yt(i,t);return!a||a.type==="element"&&(a.tagName==="rp"||a.tagName==="rt")}function xT(e,t,i){const a=yt(i,t);return!a||a.type==="element"&&a.tagName==="optgroup"}function CT(e,t,i){const a=yt(i,t);return!a||a.type==="element"&&(a.tagName==="option"||a.tagName==="optgroup")}function wT(e,t,i){const a=yt(i,t);return!!(a&&a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot"))}function AT(e,t,i){const a=yt(i,t);return!a||a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot")}function kT(e,t,i){return!yt(i,t)}function TT(e,t,i){const a=yt(i,t);return!a||a.type==="element"&&a.tagName==="tr"}function E0(e,t,i){const a=yt(i,t);return!a||a.type==="element"&&(a.tagName==="td"||a.tagName==="th")}const LT=Rv({body:OT,colgroup:NT,head:DT,html:RT,tbody:MT});function RT(e){const t=yt(e,-1);return!t||t.type!=="comment"}function DT(e){const t=new Set;for(const a of e.children)if(a.type==="element"&&(a.tagName==="base"||a.tagName==="title")){if(t.has(a.tagName))return!1;t.add(a.tagName)}const i=e.children[0];return!i||i.type==="element"}function OT(e){const t=yt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&js(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function NT(e,t,i){const a=Tv(i,t),o=yt(e,-1,!0);return i&&a&&a.type==="element"&&a.tagName==="colgroup"&&Wd(a,i.children.indexOf(a),i)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function MT(e,t,i){const a=Tv(i,t),o=yt(e,-1);return i&&a&&a.type==="element"&&(a.tagName==="thead"||a.tagName==="tbody")&&Wd(a,i.children.indexOf(a),i)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const cs={name:[[`
22
+ `}),i}function e0(e){let t=0,i=e.charCodeAt(t);for(;i===9||i===32;)t++,i=e.charCodeAt(t);return e.slice(t)}function t0(e,t){const i=AA(e,t),a=i.one(e,void 0),o=mA(i),s=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
23
+ `},o),s}function DA(e,t){return e&&"run"in e?async function(i,a){const o=t0(i,{file:a,...t});await e.run(o,a)}:function(i,a){return t0(i,{file:a,...e||t})}}function n0(e){if(e)throw e}var Lf,i0;function NA(){if(i0)return Lf;i0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},s=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var g=e.call(p,"constructor"),y=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!g&&!y)return!1;var v;for(v in p);return typeof v>"u"||e.call(p,v)},c=function(p,g){i&&g.name==="__proto__"?i(p,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):p[g.name]=g.newValue},f=function(p,g){if(g==="__proto__")if(e.call(p,g)){if(a)return a(p,g).value}else return;return p[g]};return Lf=function d(){var p,g,y,v,b,S,k=arguments[0],L=1,C=arguments.length,A=!1;for(typeof k=="boolean"&&(A=k,k=arguments[1]||{},L=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});L<C;++L)if(p=arguments[L],p!=null)for(g in p)y=f(k,g),v=f(p,g),k!==v&&(A&&v&&(s(v)||(b=o(v)))?(b?(b=!1,S=y&&o(y)?y:[]):S=y&&s(y)?y:{},c(k,{name:g,newValue:d(A,S,v)})):typeof v<"u"&&c(k,{name:g,newValue:v}));return k},Lf}var OA=NA();const Rf=Eb(OA);function gd(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function MA(){const e=[],t={run:i,use:a};return t;function i(...o){let s=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...o);function f(d,...p){const g=e[++s];let y=-1;if(d){c(d);return}for(;++y<o.length;)(p[y]===null||p[y]===void 0)&&(p[y]=o[y]);o=p,g?IA(g,f)(...p):c(null,...p)}}function a(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function IA(e,t){let i;return a;function a(...c){const f=e.length>c.length;let d;f&&c.push(o);try{d=e.apply(this,c)}catch(p){const g=p;if(f&&i)throw g;return o(g)}f||(d&&d.then&&typeof d.then=="function"?d.then(s,o):d instanceof Error?o(d):s(d))}function o(c,...f){i||(i=!0,t(c,...f))}function s(c){o(null,c)}}const zn={basename:zA,dirname:UA,extname:HA,join:PA,sep:"/"};function zA(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pl(e);let i=0,a=-1,o=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){i=o+1;break}}else a<0&&(s=!0,a=o+1);return a<0?"":e.slice(i,a)}if(t===e)return"";let c=-1,f=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){i=o+1;break}}else c<0&&(s=!0,c=o+1),f>-1&&(e.codePointAt(o)===t.codePointAt(f--)?f<0&&(a=o):(f=-1,a=c));return i===a?a=c:a<0&&(a=e.length),e.slice(i,a)}function UA(e){if(Pl(e),e.length===0)return".";let t=-1,i=e.length,a;for(;--i;)if(e.codePointAt(i)===47){if(a){t=i;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function HA(e){Pl(e);let t=e.length,i=-1,a=0,o=-1,s=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}i<0&&(c=!0,i=t+1),f===46?o<0?o=t:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||i<0||s===0||s===1&&o===i-1&&o===a+1?"":e.slice(o,i)}function PA(...e){let t=-1,i;for(;++t<e.length;)Pl(e[t]),e[t]&&(i=i===void 0?e[t]:i+"/"+e[t]);return i===void 0?".":BA(i)}function BA(e){Pl(e);const t=e.codePointAt(0)===47;let i=jA(e,!t);return i.length===0&&!t&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),t?"/"+i:i}function jA(e,t){let i="",a=0,o=-1,s=0,c=-1,f,d;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(o===c-1||s===1))if(o!==c-1&&s===2){if(i.length<2||a!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(d=i.lastIndexOf("/"),d!==i.length-1){d<0?(i="",a=0):(i=i.slice(0,d),a=i.length-1-i.lastIndexOf("/")),o=c,s=0;continue}}else if(i.length>0){i="",a=0,o=c,s=0;continue}}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(o+1,c):i=e.slice(o+1,c),a=c-o-1;o=c,s=0}else f===46&&s>-1?s++:s=-1}return i}function Pl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const VA={cwd:GA};function GA(){return"/"}function yd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function $A(e){if(typeof e=="string")e=new URL(e);else if(!yd(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return qA(e)}function qA(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let i=-1;for(;++i<t.length;)if(t.codePointAt(i)===37&&t.codePointAt(i+1)===50){const a=t.codePointAt(i+2);if(a===70||a===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Df=["history","path","basename","stem","extname","dirname"];class dv{constructor(t){let i;t?yd(t)?i={path:t}:typeof t=="string"||FA(t)?i={value:t}:i=t:i={},this.cwd="cwd"in i?"":VA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Df.length;){const s=Df[a];s in i&&i[s]!==void 0&&i[s]!==null&&(this[s]=s==="history"?[...i[s]]:i[s])}let o;for(o in i)Df.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?zn.basename(this.path):void 0}set basename(t){Of(t,"basename"),Nf(t,"basename"),this.path=zn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?zn.dirname(this.path):void 0}set dirname(t){r0(this.basename,"dirname"),this.path=zn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?zn.extname(this.path):void 0}set extname(t){if(Nf(t,"extname"),r0(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=zn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){yd(t)&&(t=$A(t)),Of(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?zn.basename(this.path,this.extname):void 0}set stem(t){Of(t,"stem"),Nf(t,"stem"),this.path=zn.join(this.dirname||"",t+(this.extname||""))}fail(t,i,a){const o=this.message(t,i,a);throw o.fatal=!0,o}info(t,i,a){const o=this.message(t,i,a);return o.fatal=void 0,o}message(t,i,a){const o=new Dt(t,i,a);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Nf(e,t){if(e&&e.includes(zn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+zn.sep+"`")}function Of(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function r0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function FA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const YA=(function(e){const a=this.constructor.prototype,o=a[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,a),s}),XA={}.hasOwnProperty;class Kd extends YA{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=MA()}copy(){const t=new Kd;let i=-1;for(;++i<this.attachers.length;){const a=this.attachers[i];t.use(...a)}return t.data(Rf(!0,{},this.namespace)),t}data(t,i){return typeof t=="string"?arguments.length===2?(zf("data",this.frozen),this.namespace[t]=i,this):XA.call(this.namespace,t)&&this.namespace[t]||void 0:t?(zf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const o=i.call(t,...a);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const i=os(t),a=this.parser||this.Parser;return Mf("parse",a),a(String(i),i)}process(t,i){const a=this;return this.freeze(),Mf("process",this.parser||this.Parser),If("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(s,c){const f=os(t),d=a.parse(f);a.run(d,f,function(g,y,v){if(g||!y||!v)return p(g);const b=y,S=a.stringify(b,v);KA(S)?v.value=S:v.result=S,p(g,v)});function p(g,y){g||!y?c(g):s?s(y):i(void 0,y)}}}processSync(t){let i=!1,a;return this.freeze(),Mf("processSync",this.parser||this.Parser),If("processSync",this.compiler||this.Compiler),this.process(t,o),l0("processSync","process",i),a;function o(s,c){i=!0,n0(s),a=c}}run(t,i,a){a0(t),this.freeze();const o=this.transformers;return!a&&typeof i=="function"&&(a=i,i=void 0),a?s(void 0,a):new Promise(s);function s(c,f){const d=os(i);o.run(t,d,p);function p(g,y,v){const b=y||t;g?f(g):c?c(b):a(void 0,b,v)}}}runSync(t,i){let a=!1,o;return this.run(t,i,s),l0("runSync","run",a),o;function s(c,f){n0(c),o=f,a=!0}}stringify(t,i){this.freeze();const a=os(i),o=this.compiler||this.Compiler;return If("stringify",o),a0(t),o(t,a)}use(t,...i){const a=this.attachers,o=this.namespace;if(zf("use",this.frozen),t!=null)if(typeof t=="function")d(t,i);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(p){if(typeof p=="function")d(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[g,...y]=p;d(g,y)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(p.plugins),p.settings&&(o.settings=Rf(!0,o.settings,p.settings))}function f(p){let g=-1;if(p!=null)if(Array.isArray(p))for(;++g<p.length;){const y=p[g];s(y)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function d(p,g){let y=-1,v=-1;for(;++y<a.length;)if(a[y][0]===p){v=y;break}if(v===-1)a.push([p,...g]);else if(g.length>0){let[b,...S]=g;const k=a[v][1];gd(k)&&gd(b)&&(b=Rf(!0,k,b)),a[v]=[p,b,...S]}}}}const QA=new Kd().freeze();function Mf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function If(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function zf(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function a0(e){if(!gd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function l0(e,t,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function os(e){return ZA(e)?e:new dv(e)}function ZA(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function KA(e){return typeof e=="string"||WA(e)}function WA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const JA="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",o0=[],s0={allowDangerousHtml:!0},ek=/^(https?|ircs?|mailto|xmpp)$/i,tk=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function nk(e){const t=ik(e),i=rk(e);return ak(t.runSync(t.parse(i),i),e)}function ik(e){const t=e.rehypePlugins||o0,i=e.remarkPlugins||o0,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...s0}:s0;return QA().use(zw).use(i).use(DA,a).use(t)}function rk(e){const t=e.children||"",i=new dv;return typeof t=="string"&&(i.value=t),i}function ak(e,t){const i=t.allowedElements,a=t.allowElement,o=t.components,s=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||lk;for(const g of tk)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+JA+g.id,void 0);return fv(e,p),mx(e,{Fragment:$.Fragment,components:o,ignoreInvalidStyle:!0,jsx:$.jsx,jsxs:$.jsxs,passKeys:!0,passNode:!0});function p(g,y,v){if(g.type==="raw"&&v&&typeof y=="number")return c?v.children.splice(y,1):v.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let b;for(b in Af)if(Object.hasOwn(Af,b)&&Object.hasOwn(g.properties,b)){const S=g.properties[b],k=Af[b];(k===null||k.includes(g.tagName))&&(g.properties[b]=d(String(S||""),b,g))}}if(g.type==="element"){let b=i?!i.includes(g.tagName):s?s.includes(g.tagName):!1;if(!b&&a&&typeof y=="number"&&(b=!a(g,y,v)),b&&v&&typeof y=="number")return f&&g.children?v.children.splice(y,1,...g.children):v.children.splice(y,1),y}}}function lk(e){const t=e.indexOf(":"),i=e.indexOf("?"),a=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||i!==-1&&t>i||a!==-1&&t>a||ek.test(e.slice(0,t))?e:""}const ok="modulepreload",sk=function(e){return"/"+e},u0={},x=function(t,i,a){let o=Promise.resolve();if(i&&i.length>0){let p=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};var c=p;document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),d=f?.nonce||f?.getAttribute("nonce");o=p(i.map(g=>{if(g=sk(g),g in u0)return;u0[g]=!0;const y=g.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${v}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":ok,y||(b.as="script"),b.crossOrigin="",b.href=g,d&&b.setAttribute("nonce",d),document.head.appendChild(b),y)return new Promise((S,k)=>{b.addEventListener("load",S),b.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${g}`)))})}))}function s(f){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=f,window.dispatchEvent(d),!d.defaultPrevented)throw f}return o.then(f=>{for(const d of f||[])d.status==="rejected"&&s(d.reason);return t().catch(s)})};let dt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function uk(e){return Wd(e)}function Wd(e){return Array.isArray(e)?ck(e):e instanceof RegExp?e:typeof e=="object"?fk(e):e}function ck(e){let t=[];for(let i=0,a=e.length;i<a;i++)t[i]=Wd(e[i]);return t}function fk(e){let t={};for(let i in e)t[i]=Wd(e[i]);return t}function hv(e,...t){return t.forEach(i=>{for(let a in i)e[a]=i[a]}),e}function pv(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?pv(e.substring(0,e.length-1)):e.substr(~t+1)}var Uf=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ss=class{static hasCaptures(e){return e===null?!1:(Uf.lastIndex=0,Uf.test(e))}static replaceCaptures(e,t,i){return e.replace(Uf,(a,o,s,c)=>{let f=i[parseInt(o||s,10)];if(f){let d=t.substring(f.start,f.end);for(;d[0]===".";)d=d.substring(1);switch(c){case"downcase":return d.toLowerCase();case"upcase":return d.toUpperCase();default:return d}}else return a})}};function mv(e,t){return e<t?-1:e>t?1:0}function gv(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let i=e.length,a=t.length;if(i===a){for(let o=0;o<i;o++){let s=mv(e[o],t[o]);if(s!==0)return s}return 0}return i-a}function c0(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function yv(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var bv=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},ks=class{constructor(e,t,i){this._colorMap=e,this._defaults=t,this._root=i}static createFromRawTheme(e,t){return this.createFromParsedTheme(pk(e),t)}static createFromParsedTheme(e,t){return gk(e,t)}_cachedMatchRoot=new bv(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,a=this._cachedMatchRoot.get(t).find(o=>dk(e.parent,o.parentScopes));return a?new vv(a.fontStyle,a.foreground,a.background):null}},Hf=class Ss{constructor(t,i){this.parent=t,this.scopeName=i}static push(t,i){for(const a of i)t=new Ss(t,a);return t}static from(...t){let i=null;for(let a=0;a<t.length;a++)i=new Ss(i,t[a]);return i}push(t){return new Ss(this,t)}getSegments(){let t=this;const i=[];for(;t;)i.push(t.scopeName),t=t.parent;return i.reverse(),i}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const i=[];let a=this;for(;a&&a!==t;)i.push(a.scopeName),a=a.parent;return a===t?i.reverse():void 0}};function dk(e,t){if(t.length===0)return!0;for(let i=0;i<t.length;i++){let a=t[i],o=!1;if(a===">"){if(i===t.length-1)return!1;a=t[++i],o=!0}for(;e&&!hk(e.scopeName,a);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function hk(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var vv=class{constructor(e,t,i){this.fontStyle=e,this.foregroundId=t,this.backgroundId=i}};function pk(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,i=[],a=0;for(let o=0,s=t.length;o<s;o++){let c=t[o];if(!c.settings)continue;let f;if(typeof c.scope=="string"){let y=c.scope;y=y.replace(/^[,]+/,""),y=y.replace(/[,]+$/,""),f=y.split(",")}else Array.isArray(c.scope)?f=c.scope:f=[""];let d=-1;if(typeof c.settings.fontStyle=="string"){d=0;let y=c.settings.fontStyle.split(" ");for(let v=0,b=y.length;v<b;v++)switch(y[v]){case"italic":d=d|1;break;case"bold":d=d|2;break;case"underline":d=d|4;break;case"strikethrough":d=d|8;break}}let p=null;typeof c.settings.foreground=="string"&&c0(c.settings.foreground)&&(p=c.settings.foreground);let g=null;typeof c.settings.background=="string"&&c0(c.settings.background)&&(g=c.settings.background);for(let y=0,v=f.length;y<v;y++){let S=f[y].trim().split(" "),k=S[S.length-1],L=null;S.length>1&&(L=S.slice(0,S.length-1),L.reverse()),i[a++]=new mk(k,L,o,d,p,g)}}return i}var mk=class{constructor(e,t,i,a,o,s){this.scope=e,this.parentScopes=t,this.index=i,this.fontStyle=a,this.foreground=o,this.background=s}},Rt=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Rt||{});function gk(e,t){e.sort((d,p)=>{let g=mv(d.scope,p.scope);return g!==0||(g=gv(d.parentScopes,p.parentScopes),g!==0)?g:d.index-p.index});let i=0,a="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let d=e.shift();d.fontStyle!==-1&&(i=d.fontStyle),d.foreground!==null&&(a=d.foreground),d.background!==null&&(o=d.background)}let s=new yk(t),c=new vv(i,s.getId(a),s.getId(o)),f=new vk(new bd(0,null,-1,0,0),[]);for(let d=0,p=e.length;d<p;d++){let g=e[d];f.insert(0,g.scope,g.parentScopes,g.fontStyle,s.getId(g.foreground),s.getId(g.background))}return new ks(s,c,f)}var yk=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,i=e.length;t<i;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},bk=Object.freeze([]),bd=class _v{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,i,a,o,s){this.scopeDepth=t,this.parentScopes=i||bk,this.fontStyle=a,this.foreground=o,this.background=s}clone(){return new _v(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let i=[];for(let a=0,o=t.length;a<o;a++)i[a]=t[a].clone();return i}acceptOverwrite(t,i,a,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,i!==-1&&(this.fontStyle=i),a!==0&&(this.foreground=a),o!==0&&(this.background=o)}},vk=class vd{constructor(t,i=[],a={}){this._mainRule=t,this._children=a,this._rulesWithParentScopes=i}_rulesWithParentScopes;static _cmpBySpecificity(t,i){if(t.scopeDepth!==i.scopeDepth)return i.scopeDepth-t.scopeDepth;let a=0,o=0;for(;t.parentScopes[a]===">"&&a++,i.parentScopes[o]===">"&&o++,!(a>=t.parentScopes.length||o>=i.parentScopes.length);){const s=i.parentScopes[o].length-t.parentScopes[a].length;if(s!==0)return s;a++,o++}return i.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let a=t.indexOf("."),o,s;if(a===-1?(o=t,s=""):(o=t.substring(0,a),s=t.substring(a+1)),this._children.hasOwnProperty(o))return this._children[o].match(s)}const i=this._rulesWithParentScopes.concat(this._mainRule);return i.sort(vd._cmpBySpecificity),i}insert(t,i,a,o,s,c){if(i===""){this._doInsertHere(t,a,o,s,c);return}let f=i.indexOf("."),d,p;f===-1?(d=i,p=""):(d=i.substring(0,f),p=i.substring(f+1));let g;this._children.hasOwnProperty(d)?g=this._children[d]:(g=new vd(this._mainRule.clone(),bd.cloneArr(this._rulesWithParentScopes)),this._children[d]=g),g.insert(t+1,p,a,o,s,c)}_doInsertHere(t,i,a,o,s){if(i===null){this._mainRule.acceptOverwrite(t,a,o,s);return}for(let c=0,f=this._rulesWithParentScopes.length;c<f;c++){let d=this._rulesWithParentScopes[c];if(gv(d.parentScopes,i)===0){d.acceptOverwrite(t,a,o,s);return}}a===-1&&(a=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new bd(t,i,a,o,s))}},pa=class mn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const i=mn.getLanguageId(t),a=mn.getTokenType(t),o=mn.getFontStyle(t),s=mn.getForeground(t),c=mn.getBackground(t);console.log({languageId:i,tokenType:a,fontStyle:o,foreground:s,background:c})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,i,a,o,s,c,f){let d=mn.getLanguageId(t),p=mn.getTokenType(t),g=mn.containsBalancedBrackets(t)?1:0,y=mn.getFontStyle(t),v=mn.getForeground(t),b=mn.getBackground(t);return i!==0&&(d=i),a!==8&&(p=a),o!==null&&(g=o?1:0),s!==-1&&(y=s),c!==0&&(v=c),f!==0&&(b=f),(d<<0|p<<8|g<<10|y<<11|v<<15|b<<24)>>>0}};function Ts(e,t){const i=[],a=_k(e);let o=a.next();for(;o!==null;){let d=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":d=1;break;case"L":d=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=a.next()}let p=c();if(i.push({matcher:p,priority:d}),o!==",")break;o=a.next()}return i;function s(){if(o==="-"){o=a.next();const d=s();return p=>!!d&&!d(p)}if(o==="("){o=a.next();const d=f();return o===")"&&(o=a.next()),d}if(f0(o)){const d=[];do d.push(o),o=a.next();while(f0(o));return p=>t(d,p)}return null}function c(){const d=[];let p=s();for(;p;)d.push(p),p=s();return g=>d.every(y=>y(g))}function f(){const d=[];let p=c();for(;p&&(d.push(p),o==="|"||o===",");){do o=a.next();while(o==="|"||o===",");p=c()}return g=>d.some(y=>y(g))}}function f0(e){return!!e&&!!e.match(/[\w\.:]+/)}function _k(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,i=t.exec(e);return{next:()=>{if(!i)return null;const a=i[0];return i=t.exec(e),a}}}function Sv(e){typeof e.dispose=="function"&&e.dispose()}var Rl=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Sk=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ek=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},xk=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Rl(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Ek;for(const i of e)Ck(i,this.initialScopeName,this.repo,t);for(const i of t.references)if(i instanceof Rl){if(this.seenFullScopeRequests.has(i.scopeName))continue;this.seenFullScopeRequests.add(i.scopeName),this.Q.push(i)}else{if(this.seenFullScopeRequests.has(i.scopeName)||this.seenPartialScopeRequests.has(i.toKey()))continue;this.seenPartialScopeRequests.add(i.toKey()),this.Q.push(i)}}};function Ck(e,t,i,a){const o=i.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=i.lookup(t);e instanceof Rl?Es({baseGrammar:s,selfGrammar:o},a):_d(e.ruleName,{baseGrammar:s,selfGrammar:o,repository:o.repository},a);const c=i.injections(e.scopeName);if(c)for(const f of c)a.add(new Rl(f))}function _d(e,t,i){if(t.repository&&t.repository[e]){const a=t.repository[e];Ls([a],t,i)}}function Es(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ls(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ls(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ls(e,t,i){for(const a of e){if(i.visitedRule.has(a))continue;i.visitedRule.add(a);const o=a.repository?hv({},t.repository,a.repository):t.repository;Array.isArray(a.patterns)&&Ls(a.patterns,{...t,repository:o},i);const s=a.include;if(!s)continue;const c=Ev(s);switch(c.kind){case 0:Es({...t,selfGrammar:t.baseGrammar},i);break;case 1:Es(t,i);break;case 2:_d(c.ruleName,{...t,repository:o},i);break;case 3:case 4:const f=c.scopeName===t.selfGrammar.scopeName?t.selfGrammar:c.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(f){const d={baseGrammar:t.baseGrammar,selfGrammar:f,repository:o};c.kind===4?_d(c.ruleName,d,i):Es(d,i)}else c.kind===4?i.add(new Sk(c.scopeName,c.ruleName)):i.add(new Rl(c.scopeName));break}}}var wk=class{kind=0},Ak=class{kind=1},kk=class{constructor(e){this.ruleName=e}kind=2},Tk=class{constructor(e){this.scopeName=e}kind=3},Lk=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Ev(e){if(e==="$base")return new wk;if(e==="$self")return new Ak;const t=e.indexOf("#");if(t===-1)return new Tk(e);if(t===0)return new kk(e.substring(1));{const i=e.substring(0,t),a=e.substring(t+1);return new Lk(i,a)}}var Rk=/\\(\d+)/,d0=/\\(\d+)/g,Dk=-1,xv=-2;var Bl=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,i,a){this.$location=e,this.id=t,this._name=i||null,this._nameIsCapturing=ss.hasCaptures(this._name),this._contentName=a||null,this._contentNameIsCapturing=ss.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${pv(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:ss.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ss.replaceCaptures(this._contentName,e,t)}},Nk=class extends Bl{retokenizeCapturedWithRuleId;constructor(e,t,i,a,o){super(e,t,i,a),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,i,a){throw new Error("Not supported!")}},Ok=class extends Bl{_match;captures;_cachedCompiledPatterns;constructor(e,t,i,a,o){super(e,t,i,null),this._match=new Dl(a,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,i,a){return this._getCachedCompiledPatterns(e).compileAG(e,i,a)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Nl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},h0=class extends Bl{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,i,a,o){super(e,t,i,a),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const i of this.patterns)e.getRule(i).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,i,a){return this._getCachedCompiledPatterns(e).compileAG(e,i,a)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Nl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Sd=class extends Bl{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,i,a,o,s,c,f,d,p){super(e,t,i,a),this._begin=new Dl(o,this.id),this.beginCaptures=s,this._end=new Dl(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=f,this.applyEndPatternLast=d||!1,this.patterns=p.patterns,this.hasMissingPatterns=p.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,i,a){return this._getCachedCompiledPatterns(e,t).compileAG(e,i,a)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Nl;for(const i of this.patterns)e.getRule(i).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Rs=class extends Bl{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,i,a,o,s,c,f,d){super(e,t,i,a),this._begin=new Dl(o,this.id),this.beginCaptures=s,this.whileCaptures=f,this._while=new Dl(c,xv),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,i,a){return this._getCachedCompiledPatterns(e).compileAG(e,i,a)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Nl;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,i,a){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,i,a)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Nl,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Cv=class Lt{static createCaptureRule(t,i,a,o,s){return t.registerRule(c=>new Nk(i,c,a,o,s))}static getCompiledRuleId(t,i,a){return t.id||i.registerRule(o=>{if(t.id=o,t.match)return new Ok(t.$vscodeTextmateLocation,t.id,t.name,t.match,Lt._compileCaptures(t.captures,i,a));if(typeof t.begin>"u"){t.repository&&(a=hv({},a,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new h0(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Lt._compilePatterns(s,i,a))}return t.while?new Rs(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Lt._compileCaptures(t.beginCaptures||t.captures,i,a),t.while,Lt._compileCaptures(t.whileCaptures||t.captures,i,a),Lt._compilePatterns(t.patterns,i,a)):new Sd(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Lt._compileCaptures(t.beginCaptures||t.captures,i,a),t.end,Lt._compileCaptures(t.endCaptures||t.captures,i,a),t.applyEndPatternLast,Lt._compilePatterns(t.patterns,i,a))}),t.id}static _compileCaptures(t,i,a){let o=[];if(t){let s=0;for(const c in t){if(c==="$vscodeTextmateLocation")continue;const f=parseInt(c,10);f>s&&(s=f)}for(let c=0;c<=s;c++)o[c]=null;for(const c in t){if(c==="$vscodeTextmateLocation")continue;const f=parseInt(c,10);let d=0;t[c].patterns&&(d=Lt.getCompiledRuleId(t[c],i,a)),o[f]=Lt.createCaptureRule(i,t[c].$vscodeTextmateLocation,t[c].name,t[c].contentName,d)}}return o}static _compilePatterns(t,i,a){let o=[];if(t)for(let s=0,c=t.length;s<c;s++){const f=t[s];let d=-1;if(f.include){const p=Ev(f.include);switch(p.kind){case 0:case 1:d=Lt.getCompiledRuleId(a[f.include],i,a);break;case 2:let g=a[p.ruleName];g&&(d=Lt.getCompiledRuleId(g,i,a));break;case 3:case 4:const y=p.scopeName,v=p.kind===4?p.ruleName:null,b=i.getExternalGrammar(y,a);if(b)if(v){let S=b.repository[v];S&&(d=Lt.getCompiledRuleId(S,i,b.repository))}else d=Lt.getCompiledRuleId(b.repository.$self,i,b.repository);break}}else d=Lt.getCompiledRuleId(f,i,a);if(d!==-1){const p=i.getRule(d);let g=!1;if((p instanceof h0||p instanceof Sd||p instanceof Rs)&&p.hasMissingPatterns&&p.patterns.length===0&&(g=!0),g)continue;o.push(d)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Dl=class wv{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,i){if(t&&typeof t=="string"){const a=t.length;let o=0,s=[],c=!1;for(let f=0;f<a;f++)if(t.charAt(f)==="\\"&&f+1<a){const p=t.charAt(f+1);p==="z"?(s.push(t.substring(o,f)),s.push("$(?!\\n)(?<!\\n)"),o=f+2):(p==="A"||p==="G")&&(c=!0),f++}this.hasAnchor=c,o===0?this.source=t:(s.push(t.substring(o,a)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=i,typeof this.source=="string"?this.hasBackReferences=Rk.test(this.source):this.hasBackReferences=!1}clone(){return new wv(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,i){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let a=i.map(o=>t.substring(o.start,o.end));return d0.lastIndex=0,this.source.replace(d0,(o,s)=>yv(a[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],i=[],a=[],o=[],s,c,f,d;for(s=0,c=this.source.length;s<c;s++)f=this.source.charAt(s),t[s]=f,i[s]=f,a[s]=f,o[s]=f,f==="\\"&&s+1<c&&(d=this.source.charAt(s+1),d==="A"?(t[s+1]="￿",i[s+1]="￿",a[s+1]="A",o[s+1]="A"):d==="G"?(t[s+1]="￿",i[s+1]="G",a[s+1]="￿",o[s+1]="G"):(t[s+1]=d,i[s+1]=d,a[s+1]=d,o[s+1]=d),s++);return{A0_G0:t.join(""),A0_G1:i.join(""),A1_G0:a.join(""),A1_G1:o.join("")}}resolveAnchors(t,i){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?i?this._anchorCache.A1_G1:this._anchorCache.A1_G0:i?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Nl=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(i=>i.source);this._cached=new p0(e,t,this._items.map(i=>i.ruleId))}return this._cached}compileAG(e,t,i){return this._hasAnchors?t?i?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,i)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,i)),this._anchorCache.A1_G0):i?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,i)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,i)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,i){let a=this._items.map(o=>o.resolveAnchors(t,i));return new p0(e,a,this._items.map(o=>o.ruleId))}},p0=class{constructor(e,t,i){this.regExps=t,this.rules=i,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,i=this.rules.length;t<i;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
24
+ `)}findNextMatchSync(e,t,i){const a=this.scanner.findNextMatchSync(e,t,i);return a?{ruleId:this.rules[a.index],captureIndices:a.captureIndices}:null}},Pf=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Mk=class Ed{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,i){this._defaultAttributes=new Pf(t,8),this._embeddedLanguagesMatcher=new Ik(Object.entries(i||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Ed._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Pf(0,0);_getBasicScopeAttributes=new bv(t=>{const i=this._scopeToLanguage(t),a=this._toStandardTokenType(t);return new Pf(i,a)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const i=t.match(Ed.STANDARD_TOKEN_TYPE_REGEXP);if(!i)return 8;switch(i[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Ik=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([i,a])=>yv(i));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},m0=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Av(e,t,i,a,o,s,c,f){const d=t.content.length;let p=!1,g=-1;if(c){const b=zk(e,t,i,a,o,s);o=b.stack,a=b.linePos,i=b.isFirstLine,g=b.anchorPosition}const y=Date.now();for(;!p;){if(f!==0&&Date.now()-y>f)return new m0(o,!0);v()}return new m0(o,!1);function v(){const b=Uk(e,t,i,a,o,g);if(!b){s.produce(o,d),p=!0;return}const S=b.captureIndices,k=b.matchedRuleId,L=S&&S.length>0?S[0].end>a:!1;if(k===Dk){const C=o.getRule(e);s.produce(o,S[0].start),o=o.withContentNameScopesList(o.nameScopesList),xl(e,t,i,o,s,C.endCaptures,S),s.produce(o,S[0].end);const A=o;if(o=o.parent,g=A.getAnchorPos(),!L&&A.getEnterPos()===a){o=A,s.produce(o,d),p=!0;return}}else{const C=e.getRule(k);s.produce(o,S[0].start);const A=o,T=C.getName(t.content,S),I=o.contentNameScopesList.pushAttributed(T,e);if(o=o.push(k,a,g,S[0].end===d,null,I,I),C instanceof Sd){const z=C;xl(e,t,i,o,s,z.beginCaptures,S),s.produce(o,S[0].end),g=S[0].end;const D=z.getContentName(t.content,S),j=I.pushAttributed(D,e);if(o=o.withContentNameScopesList(j),z.endHasBackReferences&&(o=o.withEndRule(z.getEndWithResolvedBackReferences(t.content,S))),!L&&A.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),p=!0;return}}else if(C instanceof Rs){const z=C;xl(e,t,i,o,s,z.beginCaptures,S),s.produce(o,S[0].end),g=S[0].end;const D=z.getContentName(t.content,S),j=I.pushAttributed(D,e);if(o=o.withContentNameScopesList(j),z.whileHasBackReferences&&(o=o.withEndRule(z.getWhileWithResolvedBackReferences(t.content,S))),!L&&A.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),p=!0;return}}else if(xl(e,t,i,o,s,C.captures,S),s.produce(o,S[0].end),o=o.pop(),!L){o=o.safePop(),s.produce(o,d),p=!0;return}}S[0].end>a&&(a=S[0].end,i=!1)}}function zk(e,t,i,a,o,s){let c=o.beginRuleCapturedEOL?0:-1;const f=[];for(let d=o;d;d=d.pop()){const p=d.getRule(e);p instanceof Rs&&f.push({rule:p,stack:d})}for(let d=f.pop();d;d=f.pop()){const{ruleScanner:p,findOptions:g}=Bk(d.rule,e,d.stack.endRule,i,a===c),y=p.findNextMatchSync(t,a,g);if(y){if(y.ruleId!==xv){o=d.stack.pop();break}y.captureIndices&&y.captureIndices.length&&(s.produce(d.stack,y.captureIndices[0].start),xl(e,t,i,d.stack,s,d.rule.whileCaptures,y.captureIndices),s.produce(d.stack,y.captureIndices[0].end),c=y.captureIndices[0].end,y.captureIndices[0].end>a&&(a=y.captureIndices[0].end,i=!1))}else{o=d.stack.pop();break}}return{stack:o,linePos:a,anchorPosition:c,isFirstLine:i}}function Uk(e,t,i,a,o,s){const c=Hk(e,t,i,a,o,s),f=e.getInjections();if(f.length===0)return c;const d=Pk(f,e,t,i,a,o,s);if(!d)return c;if(!c)return d;const p=c.captureIndices[0].start,g=d.captureIndices[0].start;return g<p||d.priorityMatch&&g===p?d:c}function Hk(e,t,i,a,o,s){const c=o.getRule(e),{ruleScanner:f,findOptions:d}=kv(c,e,o.endRule,i,a===s),p=f.findNextMatchSync(t,a,d);return p?{captureIndices:p.captureIndices,matchedRuleId:p.ruleId}:null}function Pk(e,t,i,a,o,s,c){let f=Number.MAX_VALUE,d=null,p,g=0;const y=s.contentNameScopesList.getScopeNames();for(let v=0,b=e.length;v<b;v++){const S=e[v];if(!S.matcher(y))continue;const k=t.getRule(S.ruleId),{ruleScanner:L,findOptions:C}=kv(k,t,null,a,o===c),A=L.findNextMatchSync(i,o,C);if(!A)continue;const T=A.captureIndices[0].start;if(!(T>=f)&&(f=T,d=A.captureIndices,p=A.ruleId,g=S.priority,f===o))break}return d?{priorityMatch:g===-1,captureIndices:d,matchedRuleId:p}:null}function kv(e,t,i,a,o){return{ruleScanner:e.compileAG(t,i,a,o),findOptions:0}}function Bk(e,t,i,a,o){return{ruleScanner:e.compileWhileAG(t,i,a,o),findOptions:0}}function xl(e,t,i,a,o,s,c){if(s.length===0)return;const f=t.content,d=Math.min(s.length,c.length),p=[],g=c[0].end;for(let y=0;y<d;y++){const v=s[y];if(v===null)continue;const b=c[y];if(b.length===0)continue;if(b.start>g)break;for(;p.length>0&&p[p.length-1].endPos<=b.start;)o.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop();if(p.length>0?o.produceFromScopes(p[p.length-1].scopes,b.start):o.produce(a,b.start),v.retokenizeCapturedWithRuleId){const k=v.getName(f,c),L=a.contentNameScopesList.pushAttributed(k,e),C=v.getContentName(f,c),A=L.pushAttributed(C,e),T=a.push(v.retokenizeCapturedWithRuleId,b.start,-1,!1,null,L,A),I=e.createOnigString(f.substring(0,b.end));Av(e,I,i&&b.start===0,b.start,T,o,!1,0),Sv(I);continue}const S=v.getName(f,c);if(S!==null){const L=(p.length>0?p[p.length-1].scopes:a.contentNameScopesList).pushAttributed(S,e);p.push(new jk(L,b.end))}}for(;p.length>0;)o.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop()}var jk=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Vk(e,t,i,a,o,s,c,f){return new $k(e,t,i,a,o,s,c,f)}function g0(e,t,i,a,o){const s=Ts(t,Ds),c=Cv.getCompiledRuleId(i,a,o.repository);for(const f of s)e.push({debugSelector:t,matcher:f.matcher,ruleId:c,grammar:o,priority:f.priority})}function Ds(e,t){if(t.length<e.length)return!1;let i=0;return e.every(a=>{for(let o=i;o<t.length;o++)if(Gk(t[o],a))return i=o+1,!0;return!1})}function Gk(e,t){if(!e)return!1;if(e===t)return!0;const i=t.length;return e.length>i&&e.substr(0,i)===t&&e[i]==="."}var $k=class{constructor(e,t,i,a,o,s,c,f){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=f,this._basicScopeAttributesProvider=new Mk(i,a),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=c,this._grammar=y0(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const d of Object.keys(o)){const p=Ts(d,Ds);for(const g of p)this._tokenTypeMatchers.push({matcher:g.matcher,type:o[d]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},t=[],i=this._rootScopeName,a=e.lookup(i);if(a){const o=a.injections;if(o)for(let c in o)g0(t,c,o[c],this,a);const s=this._grammarRepository.injections(i);s&&s.forEach(c=>{const f=this.getExternalGrammar(c);if(f){const d=f.injectionSelector;d&&g0(t,d,f,this,f)}})}return t.sort((o,s)=>o.priority-s.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,i=e(t);return this._ruleId2desc[t]=i,i}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const i=this._grammarRepository.lookup(e);if(i)return this._includedGrammars[e]=y0(i,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,i=0){const a=this._tokenize(e,t,!1,i);return{tokens:a.lineTokens.getResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}tokenizeLine2(e,t,i=0){const a=this._tokenize(e,t,!0,i);return{tokens:a.lineTokens.getBinaryResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}_tokenize(e,t,i,a){this._rootId===-1&&(this._rootId=Cv.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===xd.NULL){o=!0;const p=this._basicScopeAttributesProvider.getDefaultAttributes(),g=this.themeProvider.getDefaults(),y=pa.set(0,p.languageId,p.tokenType,null,g.fontStyle,g.foregroundId,g.backgroundId),v=this.getRule(this._rootId).getName(null,null);let b;v?b=kl.createRootAndLookUpScopeName(v,y,this):b=kl.createRoot("unknown",y),t=new xd(null,this._rootId,-1,-1,!1,null,b,b)}else o=!1,t.reset();e=e+`
25
+ `;const s=this.createOnigString(e),c=s.content.length,f=new Fk(i,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=Av(this,s,o,0,t,f,!0,a);return Sv(s),{lineLength:c,lineTokens:f,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function y0(e,t){return e=uk(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var kl=class Mn{constructor(t,i,a){this.parent=t,this.scopePath=i,this.tokenAttributes=a}static fromExtension(t,i){let a=t,o=t?.scopePath??null;for(const s of i)o=Hf.push(o,s.scopeNames),a=new Mn(a,o,s.encodedTokenAttributes);return a}static createRoot(t,i){return new Mn(null,new Hf(null,t),i)}static createRootAndLookUpScopeName(t,i,a){const o=a.getMetadataForScope(t),s=new Hf(null,t),c=a.themeProvider.themeMatch(s),f=Mn.mergeAttributes(i,o,c);return new Mn(null,s,f)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Mn.equals(this,t)}static equals(t,i){do{if(t===i||!t&&!i)return!0;if(!t||!i||t.scopeName!==i.scopeName||t.tokenAttributes!==i.tokenAttributes)return!1;t=t.parent,i=i.parent}while(!0)}static mergeAttributes(t,i,a){let o=-1,s=0,c=0;return a!==null&&(o=a.fontStyle,s=a.foregroundId,c=a.backgroundId),pa.set(t,i.languageId,i.tokenType,null,o,s,c)}pushAttributed(t,i){if(t===null)return this;if(t.indexOf(" ")===-1)return Mn._pushAttributed(this,t,i);const a=t.split(/ /g);let o=this;for(const s of a)o=Mn._pushAttributed(o,s,i);return o}static _pushAttributed(t,i,a){const o=a.getMetadataForScope(i),s=t.scopePath.push(i),c=a.themeProvider.themeMatch(s),f=Mn.mergeAttributes(t.tokenAttributes,o,c);return new Mn(t,s,f)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const i=[];let a=this;for(;a&&a!==t;)i.push({encodedTokenAttributes:a.tokenAttributes,scopeNames:a.scopePath.getExtensionIfDefined(a.parent?.scopePath??null)}),a=a.parent;return a===t?i.reverse():void 0}},xd=class lr{constructor(t,i,a,o,s,c,f,d){this.parent=t,this.ruleId=i,this.beginRuleCapturedEOL=s,this.endRule=c,this.nameScopesList=f,this.contentNameScopesList=d,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=a,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new lr(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:lr._equals(this,t)}static _equals(t,i){return t===i?!0:this._structuralEquals(t,i)?kl.equals(t.contentNameScopesList,i.contentNameScopesList):!1}static _structuralEquals(t,i){do{if(t===i||!t&&!i)return!0;if(!t||!i||t.depth!==i.depth||t.ruleId!==i.ruleId||t.endRule!==i.endRule)return!1;t=t.parent,i=i.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){lr._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,i,a,o,s,c,f){return new lr(this,t,i,a,o,s,c,f)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,i){return this.parent&&(i=this.parent._writeString(t,i)),t[i++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,i}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new lr(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let i=this;for(;i&&i._enterPos===t._enterPos;){if(i.ruleId===t.ruleId)return!0;i=i.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,i){const a=kl.fromExtension(t?.nameScopesList??null,i.nameScopesList);return new lr(t,i.ruleId,i.enterPos??-1,i.anchorPos??-1,i.beginRuleCapturedEOL,i.endRule,a,kl.fromExtension(a,i.contentNameScopesList))}},qk=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(i=>i==="*"?(this.allowAny=!0,[]):Ts(i,Ds).map(a=>a.matcher)),this.unbalancedBracketScopes=t.flatMap(i=>Ts(i,Ds).map(a=>a.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Fk=class{constructor(e,t,i,a){this.balancedBracketSelectors=a,this._emitBinaryTokens=e,this._tokenTypeOverrides=i,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let a=e?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=e?.getScopeNames()??[];for(const c of this._tokenTypeOverrides)c.matcher(s)&&(a=pa.set(a,0,c.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(a=pa.set(a,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===a){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(a),this._lastTokenEndIndex=t;return}const i=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:i}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const i=new Uint32Array(this._binaryTokens.length);for(let a=0,o=this._binaryTokens.length;a<o;a++)i[a]=this._binaryTokens[a];return i}},Yk=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,i,a,o){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,Vk(e,s,t,i,a,o,this,this._onigLib))}return this._grammars.get(e)}},Xk=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new Yk(ks.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,i){this._syncRegistry.setTheme(ks.createFromRawTheme(t,i))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,i,a){return this.loadGrammarWithConfiguration(t,i,{embeddedLanguages:a})}loadGrammarWithConfiguration(t,i,a){return this._loadGrammar(t,i,a.embeddedLanguages,a.tokenTypes,new qk(a.balancedBracketSelectors||[],a.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,i,a,o,s){const c=new xk(this._syncRegistry,t);for(;c.Q.length>0;)c.Q.map(f=>this._loadSingleGrammar(f.scopeName)),c.processQueue();return this._grammarForScopeName(t,i,a,o,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const i=this._options.loadGrammar(t);if(i){const a=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(i,a)}}addGrammar(t,i=[],a=0,o=null){return this._syncRegistry.addGrammar(t,i),this._grammarForScopeName(t.scopeName,a,o)}_grammarForScopeName(t,i=0,a=null,o=null,s=null){return this._syncRegistry.grammarForScopeName(t,i,a,o,s)}},Cd=xd.NULL;const Qk=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],b0={}.hasOwnProperty;function Zk(e,t){const i=t||{};function a(o,...s){let c=a.invalid;const f=a.handlers;if(o&&b0.call(o,e)){const d=String(o[e]);c=b0.call(f,d)?f[d]:a.unknown}if(c)return c.call(this,o,...s)}return a.handlers=i.handlers||{},a.invalid=i.invalid,a.unknown=i.unknown,a}const Kk=/["&'<>`]/g,Wk=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Jk=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,eT=/[|\\{}()[\]^$+*?.]/g,v0=new WeakMap;function tT(e,t){if(e=e.replace(t.subset?nT(t.subset):Kk,a),t.subset||t.escapeOnly)return e;return e.replace(Wk,i).replace(Jk,a);function i(o,s,c){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,c.charCodeAt(s+2),t)}function a(o,s,c){return t.format(o.charCodeAt(0),c.charCodeAt(s+1),t)}}function nT(e){let t=v0.get(e);return t||(t=iT(e),v0.set(e,t)),t}function iT(e){const t=[];let i=-1;for(;++i<e.length;)t.push(e[i].replace(eT,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const rT=/[\dA-Fa-f]/;function aT(e,t,i){const a="&#x"+e.toString(16).toUpperCase();return i&&t&&!rT.test(String.fromCharCode(t))?a:a+";"}const lT=/\d/;function oT(e,t,i){const a="&#"+String(e);return i&&t&&!lT.test(String.fromCharCode(t))?a:a+";"}const sT=["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"],Bf={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:"€"},uT=["cent","copy","divide","gt","lt","not","para","times"],Tv={}.hasOwnProperty,wd={};let us;for(us in Bf)Tv.call(Bf,us)&&(wd[Bf[us]]=us);const cT=/[^\dA-Za-z]/;function fT(e,t,i,a){const o=String.fromCharCode(e);if(Tv.call(wd,o)){const s=wd[o],c="&"+s;return i&&sT.includes(s)&&!uT.includes(s)&&(!a||t&&t!==61&&cT.test(String.fromCharCode(t)))?c:c+";"}return""}function dT(e,t,i){let a=aT(e,t,i.omitOptionalSemicolons),o;if((i.useNamedReferences||i.useShortestReferences)&&(o=fT(e,t,i.omitOptionalSemicolons,i.attribute)),(i.useShortestReferences||!o)&&i.useShortestReferences){const s=oT(e,t,i.omitOptionalSemicolons);s.length<a.length&&(a=s)}return o&&(!i.useShortestReferences||o.length<a.length)?o:a}function fa(e,t){return tT(e,Object.assign({format:dT},t))}const hT=/^>|^->|<!--|-->|--!>|<!-$/g,pT=[">"],mT=["<",">"];function gT(e,t,i,a){return a.settings.bogusComments?"<?"+fa(e.value,Object.assign({},a.settings.characterReferences,{subset:pT}))+">":"<!--"+e.value.replace(hT,o)+"-->";function o(s){return fa(s,Object.assign({},a.settings.characterReferences,{subset:mT}))}}function yT(e,t,i,a){return"<!"+(a.settings.upperDoctype?"DOCTYPE":"doctype")+(a.settings.tightDoctype?"":" ")+"html>"}function _0(e,t){const i=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,o=i.indexOf(t);for(;o!==-1;)a++,o=i.indexOf(t,o+t.length);return a}const yt=Rv(1),Lv=Rv(-1),bT=[];function Rv(e){return t;function t(i,a,o){const s=i?i.children:bT;let c=(a||0)+e,f=s[c];if(!o)for(;f&&js(f);)c+=e,f=s[c];return f}}const vT={}.hasOwnProperty;function Dv(e){return t;function t(i,a,o){return vT.call(e,i.tagName)&&e[i.tagName](i,a,o)}}const Jd=Dv({body:ST,caption:jf,colgroup:jf,dd:wT,dt:CT,head:jf,html:_T,li:xT,optgroup:AT,option:kT,p:ET,rp:S0,rt:S0,tbody:LT,td:E0,tfoot:RT,th:E0,thead:TT,tr:DT});function jf(e,t,i){const a=yt(i,t,!0);return!a||a.type!=="comment"&&!(a.type==="text"&&js(a.value.charAt(0)))}function _T(e,t,i){const a=yt(i,t);return!a||a.type!=="comment"}function ST(e,t,i){const a=yt(i,t);return!a||a.type!=="comment"}function ET(e,t,i){const a=yt(i,t);return a?a.type==="element"&&(a.tagName==="address"||a.tagName==="article"||a.tagName==="aside"||a.tagName==="blockquote"||a.tagName==="details"||a.tagName==="div"||a.tagName==="dl"||a.tagName==="fieldset"||a.tagName==="figcaption"||a.tagName==="figure"||a.tagName==="footer"||a.tagName==="form"||a.tagName==="h1"||a.tagName==="h2"||a.tagName==="h3"||a.tagName==="h4"||a.tagName==="h5"||a.tagName==="h6"||a.tagName==="header"||a.tagName==="hgroup"||a.tagName==="hr"||a.tagName==="main"||a.tagName==="menu"||a.tagName==="nav"||a.tagName==="ol"||a.tagName==="p"||a.tagName==="pre"||a.tagName==="section"||a.tagName==="table"||a.tagName==="ul"):!i||!(i.type==="element"&&(i.tagName==="a"||i.tagName==="audio"||i.tagName==="del"||i.tagName==="ins"||i.tagName==="map"||i.tagName==="noscript"||i.tagName==="video"))}function xT(e,t,i){const a=yt(i,t);return!a||a.type==="element"&&a.tagName==="li"}function CT(e,t,i){const a=yt(i,t);return!!(a&&a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd"))}function wT(e,t,i){const a=yt(i,t);return!a||a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd")}function S0(e,t,i){const a=yt(i,t);return!a||a.type==="element"&&(a.tagName==="rp"||a.tagName==="rt")}function AT(e,t,i){const a=yt(i,t);return!a||a.type==="element"&&a.tagName==="optgroup"}function kT(e,t,i){const a=yt(i,t);return!a||a.type==="element"&&(a.tagName==="option"||a.tagName==="optgroup")}function TT(e,t,i){const a=yt(i,t);return!!(a&&a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot"))}function LT(e,t,i){const a=yt(i,t);return!a||a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot")}function RT(e,t,i){return!yt(i,t)}function DT(e,t,i){const a=yt(i,t);return!a||a.type==="element"&&a.tagName==="tr"}function E0(e,t,i){const a=yt(i,t);return!a||a.type==="element"&&(a.tagName==="td"||a.tagName==="th")}const NT=Dv({body:IT,colgroup:zT,head:MT,html:OT,tbody:UT});function OT(e){const t=yt(e,-1);return!t||t.type!=="comment"}function MT(e){const t=new Set;for(const a of e.children)if(a.type==="element"&&(a.tagName==="base"||a.tagName==="title")){if(t.has(a.tagName))return!1;t.add(a.tagName)}const i=e.children[0];return!i||i.type==="element"}function IT(e){const t=yt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&js(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function zT(e,t,i){const a=Lv(i,t),o=yt(e,-1,!0);return i&&a&&a.type==="element"&&a.tagName==="colgroup"&&Jd(a,i.children.indexOf(a),i)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function UT(e,t,i){const a=Lv(i,t),o=yt(e,-1);return i&&a&&a.type==="element"&&(a.tagName==="thead"||a.tagName==="tbody")&&Jd(a,i.children.indexOf(a),i)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const cs={name:[[`
26
26
  \f\r &/=>`.split(""),`
27
27
  \f\r "&'/=>\``.split("")],[`\0
28
28
  \f\r "&'/<=>`.split(""),`\0
@@ -30,10 +30,10 @@ Error generating stack: `+u.message+`
30
30
  \f\r &>`.split(""),`\0
31
31
  \f\r "&'<=>\``.split("")],[`\0
32
32
  \f\r "&'<=>\``.split(""),`\0
33
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function IT(e,t,i,a){const o=a.schema,s=o.space==="svg"?!1:a.settings.omitOptionalTags;let c=o.space==="svg"?a.settings.closeEmptyElements:a.settings.voids.includes(e.tagName.toLowerCase());const f=[];let d;o.space==="html"&&e.tagName==="svg"&&(a.schema=zl);const p=zT(a,e.properties),g=a.all(o.space==="html"&&e.tagName==="template"?e.content:e);return a.schema=o,g&&(c=!1),(p||!s||!LT(e,t,i))&&(f.push("<",e.tagName,p?" "+p:""),c&&(o.space==="svg"||a.settings.closeSelfClosing)&&(d=p.charAt(p.length-1),(!a.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&f.push(" "),f.push("/")),f.push(">")),f.push(g),!c&&(!s||!Wd(e,t,i))&&f.push("</"+e.tagName+">"),f.join("")}function zT(e,t){const i=[];let a=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const s=UT(e,o,t[o]);s&&i.push(s)}}for(;++a<i.length;){const s=e.settings.tightAttributes?i[a].charAt(i[a].length-1):void 0;a!==i.length-1&&s!=='"'&&s!=="'"&&(i[a]+=" ")}return i.join("")}function UT(e,t,i){const a=Ib(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let c=e.quote,f;if(a.overloadedBoolean&&(i===a.attribute||i==="")?i=!0:(a.boolean||a.overloadedBoolean)&&(typeof i!="string"||i===a.attribute||i==="")&&(i=!!i),i==null||i===!1||typeof i=="number"&&Number.isNaN(i))return"";const d=sa(a.attribute,Object.assign({},e.settings.characterReferences,{subset:cs.name[o][s]}));return i===!0||(i=Array.isArray(i)?(a.commaSeparated?kb:Ub)(i,{padLeft:!e.settings.tightCommaSeparatedLists}):String(i),e.settings.collapseEmptyAttributes&&!i)?d:(e.settings.preferUnquoted&&(f=sa(i,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:cs.unquoted[o][s]}))),f!==i&&(e.settings.quoteSmart&&_0(i,c)>_0(i,e.alternative)&&(c=e.alternative),f=c+sa(i,Object.assign({},e.settings.characterReferences,{subset:(c==="'"?cs.single:cs.double)[o][s],attribute:!0}))+c),d+(f&&"="+f))}const HT=["<","&"];function Dv(e,t,i,a){return i&&i.type==="element"&&(i.tagName==="script"||i.tagName==="style")?e.value:sa(e.value,Object.assign({},a.settings.characterReferences,{subset:HT}))}function PT(e,t,i,a){return a.settings.allowDangerousHtml?e.value:Dv(e,t,i,a)}function BT(e,t,i,a){return a.all(e)}const jT=Yk("type",{invalid:VT,unknown:GT,handlers:{comment:hT,doctype:pT,element:IT,raw:PT,root:BT,text:Dv}});function VT(e){throw new Error("Expected node, not `"+e+"`")}function GT(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const $T={},qT={},FT=[];function ua(e,t){const i=t||$T,a=i.quote||'"',o=a==='"'?"'":'"';if(a!=='"'&&a!=="'")throw new Error("Invalid quote `"+a+"`, expected `'` or `\"`");return{one:YT,all:XT,settings:{omitOptionalTags:i.omitOptionalTags||!1,allowParseErrors:i.allowParseErrors||!1,allowDangerousCharacters:i.allowDangerousCharacters||!1,quoteSmart:i.quoteSmart||!1,preferUnquoted:i.preferUnquoted||!1,tightAttributes:i.tightAttributes||!1,upperDoctype:i.upperDoctype||!1,tightDoctype:i.tightDoctype||!1,bogusComments:i.bogusComments||!1,tightCommaSeparatedLists:i.tightCommaSeparatedLists||!1,tightSelfClosing:i.tightSelfClosing||!1,collapseEmptyAttributes:i.collapseEmptyAttributes||!1,allowDangerousHtml:i.allowDangerousHtml||!1,voids:i.voids||Fk,characterReferences:i.characterReferences||qT,closeSelfClosing:i.closeSelfClosing||!1,closeEmptyElements:i.closeEmptyElements||!1},schema:i.space==="svg"?zl:zb,quote:a,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function YT(e,t,i){return jT(e,t,i,this)}function XT(e){const t=[],i=e&&e.children||FT;let a=-1;for(;++a<i.length;)t[a]=this.one(i[a],a,e);return t.join("")}function Os(e,t){const i=typeof e=="string"?{}:{...e.colorReplacements},a=typeof e=="string"?e:e.name;for(const[o,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?i[o]=s:o===a&&Object.assign(i,s);return i}function Ii(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function QT(e){return Array.isArray(e)?e:[e]}async function Ov(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Jd(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Nv(e){return e==="ansi"||Jd(e)}function eh(e){return e==="none"}function Mv(e){return eh(e)}function Iv(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const i=Array.isArray(t)?t:t.split(/\s+/g);for(const a of i)a&&!e.properties.class.includes(a)&&e.properties.class.push(a);return e}function qs(e,t=!1){if(e.length===0)return[["",0]];const i=e.split(/(\r?\n)/g);let a=0;const o=[];for(let s=0;s<i.length;s+=2){const c=t?i[s]+(i[s+1]||""):i[s];o.push([c,a]),a+=i[s].length,a+=i[s+1]?.length||0}return o}function ZT(e){const t=qs(e,!0).map(([o])=>o);function i(o){if(o===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=o,c=0;for(const f of t){if(s<f.length)break;s-=f.length,c++}return{line:c,character:s}}function a(o,s){let c=0;for(let f=0;f<o;f++)c+=t[f].length;return c+=s,c}return{lines:t,indexToPos:i,posToIndex:a}}function KT(e,t,i){const a=new Set;for(const s of e.matchAll(/:?lang=["']([^"']+)["']/g)){const c=s[1].toLowerCase().trim();c&&a.add(c)}for(const s of e.matchAll(/(?:```|~~~)([\w-]+)/g)){const c=s[1].toLowerCase().trim();c&&a.add(c)}for(const s of e.matchAll(/\\begin\{([\w-]+)\}/g)){const c=s[1].toLowerCase().trim();c&&a.add(c)}for(const s of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const c=s[1].toLowerCase().trim(),f=c.includes("/")?c.split("/").pop():c;f&&a.add(f)}if(!i)return Array.from(a);const o=i.getBundledLanguages();return Array.from(a).filter(s=>s&&o[s])}const th="light-dark()",WT=["color","background-color"];function JT(e,t){let i=0;const a=[];for(const o of t)o>i&&a.push({...e,content:e.content.slice(i,o),offset:e.offset+i}),i=o;return i<e.content.length&&a.push({...e,content:e.content.slice(i),offset:e.offset+i}),a}function e2(e,t){const i=Array.from(t instanceof Set?t:new Set(t)).sort((a,o)=>a-o);return i.length?e.map(a=>a.flatMap(o=>{const s=i.filter(c=>o.offset<c&&c<o.offset+o.content.length).map(c=>c-o.offset).sort((c,f)=>c-f);return s.length?JT(o,s):o})):e}function t2(e,t,i,a,o="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},c=t.map(g=>Ns(e.variants[g])),f=new Set(c.flatMap(g=>Object.keys(g))),d={},p=(g,y)=>{const b=y==="color"?"":y==="background-color"?"-bg":`-${y}`;return i+t[g]+(y==="color"?"":b)};return c.forEach((g,y)=>{for(const b of f){const v=g[b]||"inherit";if(y===0&&a&&WT.includes(b))if(a===th&&c.length>1){const S=t.findIndex(k=>k==="light"),T=t.findIndex(k=>k==="dark");if(S===-1||T===-1)throw new ft('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const L=c[S][b]||"inherit",A=c[T][b]||"inherit";d[b]=`light-dark(${L}, ${A})`,o==="css-vars"&&(d[p(y,b)]=v)}else d[b]=v;else o==="css-vars"&&(d[p(y,b)]=v)}}),s.htmlStyle=d,s}function Ns(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Lt.Italic&&(t["font-style"]="italic"),e.fontStyle&Lt.Bold&&(t["font-weight"]="bold");const i=[];e.fontStyle&Lt.Underline&&i.push("underline"),e.fontStyle&Lt.Strikethrough&&i.push("line-through"),i.length&&(t["text-decoration"]=i.join(" "))}return t}function wd(e){return typeof e=="string"?e:Object.entries(e).map(([t,i])=>`${t}:${i}`).join(";")}const zv=new WeakMap;function Fs(e,t){zv.set(e,t)}function Dl(e){return zv.get(e)}class ga{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,i){return new ga(Object.fromEntries(QT(i).map(a=>[a,xd])),t)}constructor(...t){if(t.length===2){const[i,a]=t;this.lang=a,this._stacks=i}else{const[i,a,o]=t;this.lang=a,this._stacks={[o]:i}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return n2(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function n2(e){const t=[],i=new Set;function a(o){if(i.has(o))return;i.add(o);const s=o?.nameScopesList?.scopeName;s&&t.push(s),o.parent&&a(o.parent)}return a(e),t}function i2(e,t){if(!(e instanceof ga))throw new ft("Invalid grammar state");return e.getInternalStack(t)}function r2(){const e=new WeakMap;function t(i){if(!e.has(i.meta)){let a=function(c){if(typeof c=="number"){if(c<0||c>i.source.length)throw new ft(`Invalid decoration offset: ${c}. Code length: ${i.source.length}`);return{...o.indexToPos(c),offset:c}}else{const f=o.lines[c.line];if(f===void 0)throw new ft(`Invalid decoration position ${JSON.stringify(c)}. Lines length: ${o.lines.length}`);let d=c.character;if(d<0&&(d=f.length+d),d<0||d>f.length)throw new ft(`Invalid decoration position ${JSON.stringify(c)}. Line ${c.line} length: ${f.length}`);return{...c,character:d,offset:o.posToIndex(c.line,d)}}};const o=ZT(i.source),s=(i.options.decorations||[]).map(c=>({...c,start:a(c.start),end:a(c.end)}));a2(s),e.set(i.meta,{decorations:s,converter:o,source:i.source})}return e.get(i.meta)}return{name:"shiki:decorations",tokens(i){if(!this.options.decorations?.length)return;const o=t(this).decorations.flatMap(c=>[c.start.offset,c.end.offset]);return e2(i,o)},code(i){if(!this.options.decorations?.length)return;const a=t(this),o=Array.from(i.children).filter(g=>g.type==="element"&&g.tagName==="span");if(o.length!==a.converter.lines.length)throw new ft(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${a.converter.lines.length}). Failed to apply decorations.`);function s(g,y,b,v){const S=o[g];let T="",L=-1,A=-1;if(y===0&&(L=0),b===0&&(A=0),b===Number.POSITIVE_INFINITY&&(A=S.children.length),L===-1||A===-1)for(let C=0;C<S.children.length;C++)T+=Uv(S.children[C]),L===-1&&T.length===y&&(L=C+1),A===-1&&T.length===b&&(A=C+1);if(L===-1)throw new ft(`Failed to find start index for decoration ${JSON.stringify(v.start)}`);if(A===-1)throw new ft(`Failed to find end index for decoration ${JSON.stringify(v.end)}`);const k=S.children.slice(L,A);if(!v.alwaysWrap&&k.length===S.children.length)f(S,v,"line");else if(!v.alwaysWrap&&k.length===1&&k[0].type==="element")f(k[0],v,"token");else{const C={type:"element",tagName:"span",properties:{},children:k};f(C,v,"wrapper"),S.children.splice(L,k.length,C)}}function c(g,y){o[g]=f(o[g],y,"line")}function f(g,y,b){const v=y.properties||{},S=y.transform||(T=>T);return g.tagName=y.tagName||"span",g.properties={...g.properties,...v,class:g.properties.class},y.properties?.class&&Iv(g,y.properties.class),g=S(g,b)||g,g}const d=[],p=a.decorations.sort((g,y)=>y.start.offset-g.start.offset||g.end.offset-y.end.offset);for(const g of p){const{start:y,end:b}=g;if(y.line===b.line)s(y.line,y.character,b.character,g);else if(y.line<b.line){s(y.line,y.character,Number.POSITIVE_INFINITY,g);for(let v=y.line+1;v<b.line;v++)d.unshift(()=>c(v,g));s(b.line,0,b.character,g)}}d.forEach(g=>g())}}}function a2(e){for(let t=0;t<e.length;t++){const i=e[t];if(i.start.offset>i.end.offset)throw new ft(`Invalid decoration range: ${JSON.stringify(i.start)} - ${JSON.stringify(i.end)}`);for(let a=t+1;a<e.length;a++){const o=e[a],s=i.start.offset<=o.start.offset&&o.start.offset<i.end.offset,c=i.start.offset<o.end.offset&&o.end.offset<=i.end.offset,f=o.start.offset<=i.start.offset&&i.start.offset<o.end.offset,d=o.start.offset<i.end.offset&&i.end.offset<=o.end.offset;if(s||c||f||d){if(s&&c||f&&d||f&&i.start.offset===i.end.offset||c&&o.start.offset===o.end.offset)continue;throw new ft(`Decorations ${JSON.stringify(i.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function Uv(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(Uv).join(""):""}const l2=[r2()];function Ms(e){const t=o2(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...l2]}function o2(e){const t=[],i=[],a=[];for(const o of e)switch(o.enforce){case"pre":t.push(o);break;case"post":i.push(o);break;default:a.push(o)}return{pre:t,post:i,normal:a}}var rr=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],jf={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function s2(e,t){const i=e.indexOf("\x1B",t);if(i!==-1&&e[i+1]==="["){const a=e.indexOf("m",i);if(a!==-1)return{sequence:e.substring(i+2,a).split(";"),startPosition:i,position:a+1}}return{position:e.length}}function x0(e){const t=e.shift();if(t==="2"){const i=e.splice(0,3).map(a=>Number.parseInt(a));return i.length!==3||i.some(a=>Number.isNaN(a))?void 0:{type:"rgb",rgb:i}}else if(t==="5"){const i=e.shift();if(i)return{type:"table",index:Number(i)}}}function u2(e){const t=[];for(;e.length>0;){const i=e.shift();if(!i)continue;const a=Number.parseInt(i);if(!Number.isNaN(a))if(a===0)t.push({type:"resetAll"});else if(a<=9)jf[a]&&t.push({type:"setDecoration",value:jf[a]});else if(a<=29){const o=jf[a-20];o&&(t.push({type:"resetDecoration",value:o}),o==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(a<=37)t.push({type:"setForegroundColor",value:{type:"named",name:rr[a-30]}});else if(a===38){const o=x0(e);o&&t.push({type:"setForegroundColor",value:o})}else if(a===39)t.push({type:"resetForegroundColor"});else if(a<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:rr[a-40]}});else if(a===48){const o=x0(e);o&&t.push({type:"setBackgroundColor",value:o})}else a===49?t.push({type:"resetBackgroundColor"}):a===53?t.push({type:"setDecoration",value:"overline"}):a===55?t.push({type:"resetDecoration",value:"overline"}):a>=90&&a<=97?t.push({type:"setForegroundColor",value:{type:"named",name:rr[a-90+8]}}):a>=100&&a<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:rr[a-100+8]}})}return t}function c2(){let e=null,t=null,i=new Set;return{parse(a){const o=[];let s=0;do{const c=s2(a,s),f=c.sequence?a.substring(s,c.startPosition):a.substring(s);if(f.length>0&&o.push({value:f,foreground:e,background:t,decorations:new Set(i)}),c.sequence){const d=u2(c.sequence);for(const p of d)p.type==="resetAll"?(e=null,t=null,i.clear()):p.type==="resetForegroundColor"?e=null:p.type==="resetBackgroundColor"?t=null:p.type==="resetDecoration"&&i.delete(p.value);for(const p of d)p.type==="setForegroundColor"?e=p.value:p.type==="setBackgroundColor"?t=p.value:p.type==="setDecoration"&&i.add(p.value)}s=c.position}while(s<a.length);return o}}}var f2={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function d2(e=f2){function t(f){return e[f]}function i(f){return`#${f.map(d=>Math.max(0,Math.min(d,255)).toString(16).padStart(2,"0")).join("")}`}let a;function o(){if(a)return a;a=[];for(let p=0;p<rr.length;p++)a.push(t(rr[p]));let f=[0,95,135,175,215,255];for(let p=0;p<6;p++)for(let g=0;g<6;g++)for(let y=0;y<6;y++)a.push(i([f[p],f[g],f[y]]));let d=8;for(let p=0;p<24;p++,d+=10)a.push(i([d,d,d]));return a}function s(f){return o()[f]}function c(f){switch(f.type){case"named":return t(f.name);case"rgb":return i(f.rgb);case"table":return s(f.index)}}return{value:c}}const h2={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function p2(e,t,i){const a=Os(e,i),o=qs(t),s=Object.fromEntries(rr.map(d=>{const p=`terminal.ansi${d[0].toUpperCase()}${d.substring(1)}`,g=e.colors?.[p];return[d,g||h2[d]]})),c=d2(s),f=c2();return o.map(d=>f.parse(d[0]).map(p=>{let g,y;p.decorations.has("reverse")?(g=p.background?c.value(p.background):e.bg,y=p.foreground?c.value(p.foreground):e.fg):(g=p.foreground?c.value(p.foreground):e.fg,y=p.background?c.value(p.background):void 0),g=Ii(g,a),y=Ii(y,a),p.decorations.has("dim")&&(g=m2(g));let b=Lt.None;return p.decorations.has("bold")&&(b|=Lt.Bold),p.decorations.has("italic")&&(b|=Lt.Italic),p.decorations.has("underline")&&(b|=Lt.Underline),p.decorations.has("strikethrough")&&(b|=Lt.Strikethrough),{content:p.value,offset:d[1],color:g,bgColor:y,fontStyle:b}}))}function m2(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const a=t[1];if(a.length===8){const o=Math.round(Number.parseInt(a.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${a.slice(0,6)}${o}`}else{if(a.length===6)return`#${a}80`;if(a.length===4){const o=a[0],s=a[1],c=a[2],f=a[3],d=Math.round(Number.parseInt(`${f}${f}`,16)/2).toString(16).padStart(2,"0");return`#${o}${o}${s}${s}${c}${c}${d}`}else if(a.length===3){const o=a[0],s=a[1],c=a[2];return`#${o}${o}${s}${s}${c}${c}80`}}}const i=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return i?`var(${i[1]}-dim)`:e}function nh(e,t,i={}){const{theme:a=e.getLoadedThemes()[0]}=i,o=e.resolveLangAlias(i.lang||"text");if(Jd(o)||eh(a))return qs(t).map(d=>[{content:d[0],offset:d[1]}]);const{theme:s,colorMap:c}=e.setTheme(a);if(o==="ansi")return p2(s,t,i);const f=e.getLanguage(i.lang||"text");if(i.grammarState){if(i.grammarState.lang!==f.name)throw new ft(`Grammar state language "${i.grammarState.lang}" does not match highlight language "${f.name}"`);if(!i.grammarState.themes.includes(s.name))throw new ft(`Grammar state themes "${i.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return y2(t,f,s,c,i)}function g2(...e){if(e.length===2)return Dl(e[1]);const[t,i,a={}]=e,{lang:o="text",theme:s=t.getLoadedThemes()[0]}=a;if(Jd(o)||eh(s))throw new ft("Plain language does not have grammar state");if(o==="ansi")throw new ft("ANSI language does not have grammar state");const{theme:c,colorMap:f}=t.setTheme(s),d=t.getLanguage(o);return new ga(ih(i,d,c,f,a).stateStack,d.name,c.name)}function y2(e,t,i,a,o){const s=ih(e,t,i,a,o),c=new ga(s.stateStack,t.name,i.name);return Fs(s.tokens,c),s.tokens}function ih(e,t,i,a,o){const s=Os(i,o),{tokenizeMaxLineLength:c=0,tokenizeTimeLimit:f=500}=o,d=qs(e);let p=o.grammarState?i2(o.grammarState,i.name)??xd:o.grammarContextCode!=null?ih(o.grammarContextCode,t,i,a,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:xd,g=[];const y=[];for(let b=0,v=d.length;b<v;b++){const[S,T]=d[b];if(S===""){g=[],y.push([]);continue}if(c>0&&S.length>=c){g=[],y.push([{content:S,offset:T,color:"",fontStyle:0}]);continue}let L,A,k;o.includeExplanation&&(L=t.tokenizeLine(S,p,f),A=L.tokens,k=0);const C=t.tokenizeLine2(S,p,f),z=C.tokens.length/2;for(let U=0;U<z;U++){const O=C.tokens[2*U],j=U+1<z?C.tokens[2*U+2]:S.length;if(O===j)continue;const $=C.tokens[2*U+1],ie=Ii(a[fa.getForeground($)],s),ne=fa.getFontStyle($),W={content:S.substring(O,j),offset:T+O,color:ie,fontStyle:ne};if(o.includeExplanation){const J=[];if(o.includeExplanation!=="scopeName")for(const ee of i.settings){let te;switch(typeof ee.scope){case"string":te=ee.scope.split(/,/).map(H=>H.trim());break;case"object":te=ee.scope;break;default:continue}J.push({settings:ee,selectors:te.map(H=>H.split(/ /))})}W.explanation=[];let fe=0;for(;O+fe<j;){const ee=A[k],te=S.substring(ee.startIndex,ee.endIndex);fe+=te.length,W.explanation.push({content:te,scopes:o.includeExplanation==="scopeName"?b2(ee.scopes):v2(J,ee.scopes)}),k+=1}}g.push(W)}y.push(g),g=[],p=C.ruleStack}return{tokens:y,stateStack:p}}function b2(e){return e.map(t=>({scopeName:t}))}function v2(e,t){const i=[];for(let a=0,o=t.length;a<o;a++){const s=t[a];i[a]={scopeName:s,themeMatches:S2(e,s,t.slice(0,a))}}return i}function C0(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function _2(e,t,i){if(!C0(e[e.length-1],t))return!1;let a=e.length-2,o=i.length-1;for(;a>=0&&o>=0;)C0(e[a],i[o])&&(a-=1),o-=1;return a===-1}function S2(e,t,i){const a=[];for(const{selectors:o,settings:s}of e)for(const c of o)if(_2(c,t,i)){a.push(s);break}return a}function Hv(e,t,i){const a=Object.entries(i.themes).filter(d=>d[1]).map(d=>({color:d[0],theme:d[1]})),o=a.map(d=>{const p=nh(e,t,{...i,theme:d.theme}),g=Dl(p),y=typeof d.theme=="string"?d.theme:d.theme.name;return{tokens:p,state:g,theme:y}}),s=E2(...o.map(d=>d.tokens)),c=s[0].map((d,p)=>d.map((g,y)=>{const b={content:g.content,variants:{},offset:g.offset};return"includeExplanation"in i&&i.includeExplanation&&(b.explanation=g.explanation),s.forEach((v,S)=>{const{content:T,explanation:L,offset:A,...k}=v[p][y];b.variants[a[S].color]=k}),b})),f=o[0].state?new ga(Object.fromEntries(o.map(d=>[d.theme,d.state?.getInternalStack(d.theme)])),o[0].state.lang):void 0;return f&&Fs(c,f),c}function E2(...e){const t=e.map(()=>[]),i=e.length;for(let a=0;a<e[0].length;a++){const o=e.map(d=>d[a]),s=t.map(()=>[]);t.forEach((d,p)=>d.push(s[p]));const c=o.map(()=>0),f=o.map(d=>d[0]);for(;f.every(d=>d);){const d=Math.min(...f.map(p=>p.content.length));for(let p=0;p<i;p++){const g=f[p];g.content.length===d?(s[p].push(g),c[p]+=1,f[p]=o[p][c[p]]):(s[p].push({...g,content:g.content.slice(0,d)}),f[p]={...g,content:g.content.slice(d),offset:g.offset+d})}}}return t}function Is(e,t,i){let a,o,s,c,f,d;if("themes"in i){const{defaultColor:p="light",cssVariablePrefix:g="--shiki-",colorsRendering:y="css-vars"}=i,b=Object.entries(i.themes).filter(A=>A[1]).map(A=>({color:A[0],theme:A[1]})).sort((A,k)=>A.color===p?-1:k.color===p?1:0);if(b.length===0)throw new ft("`themes` option must not be empty");const v=Hv(e,t,i);if(d=Dl(v),p&&th!==p&&!b.find(A=>A.color===p))throw new ft(`\`themes\` option must contain the defaultColor key \`${p}\``);const S=b.map(A=>e.getTheme(A.theme)),T=b.map(A=>A.color);s=v.map(A=>A.map(k=>t2(k,T,g,p,y))),d&&Fs(s,d);const L=b.map(A=>Os(A.theme,i));o=w0(b,S,L,g,p,"fg",y),a=w0(b,S,L,g,p,"bg",y),c=`shiki-themes ${S.map(A=>A.name).join(" ")}`,f=p?void 0:[o,a].join(";")}else if("theme"in i){const p=Os(i.theme,i);s=nh(e,t,i);const g=e.getTheme(i.theme);a=Ii(g.bg,p),o=Ii(g.fg,p),c=g.name,d=Dl(s)}else throw new ft("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:o,bg:a,themeName:c,rootStyle:f,grammarState:d}}function w0(e,t,i,a,o,s,c){return e.map((f,d)=>{const p=Ii(t[d][s],i[d])||"inherit",g=`${a+f.color}${s==="bg"?"-bg":""}:${p}`;if(d===0&&o){if(o===th&&e.length>1){const y=e.findIndex(T=>T.color==="light"),b=e.findIndex(T=>T.color==="dark");if(y===-1||b===-1)throw new ft('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const v=Ii(t[y][s],i[y])||"inherit",S=Ii(t[b][s],i[b])||"inherit";return`light-dark(${v}, ${S});${g}`}return p}return c==="css-vars"?g:null}).filter(f=>!!f).join(";")}function zs(e,t,i,a={meta:{},options:i,codeToHast:(o,s)=>zs(e,o,s),codeToTokens:(o,s)=>Is(e,o,s)}){let o=t;for(const S of Ms(i))o=S.preprocess?.call(a,o,i)||o;let{tokens:s,fg:c,bg:f,themeName:d,rootStyle:p,grammarState:g}=Is(e,o,i);const{mergeWhitespaces:y=!0,mergeSameStyleTokens:b=!1}=i;y===!0?s=C2(s):y==="never"&&(s=w2(s)),b&&(s=A2(s));const v={...a,get source(){return o}};for(const S of Ms(i))s=S.tokens?.call(v,s)||s;return x2(s,{...i,fg:c,bg:f,themeName:d,rootStyle:i.rootStyle===!1?!1:i.rootStyle??p},v,g)}function x2(e,t,i,a=Dl(e)){const o=Ms(t),s=[],c={type:"root",children:[]},{structure:f="classic",tabindex:d="0"}=t,p={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?p.style=t.rootStyle:p.style=`background-color:${t.bg};color:${t.fg}`),d!==!1&&d!=null&&(p.tabindex=d.toString());for(const[T,L]of Object.entries(t.meta||{}))T.startsWith("_")||(p[T]=L);let g={type:"element",tagName:"pre",properties:p,children:[],data:t.data},y={type:"element",tagName:"code",properties:{},children:s};const b=[],v={...i,structure:f,addClassToHast:Iv,get source(){return i.source},get tokens(){return e},get options(){return t},get root(){return c},get pre(){return g},get code(){return y},get lines(){return b}};if(e.forEach((T,L)=>{L&&(f==="inline"?c.children.push({type:"element",tagName:"br",properties:{},children:[]}):f==="classic"&&s.push({type:"text",value:`
34
- `}));let A={type:"element",tagName:"span",properties:{class:"line"},children:[]},k=0;for(const C of T){let z={type:"element",tagName:"span",properties:{...C.htmlAttrs},children:[{type:"text",value:C.content}]};const U=wd(C.htmlStyle||Ns(C));U&&(z.properties.style=U);for(const O of o)z=O?.span?.call(v,z,L+1,k,A,C)||z;f==="inline"?c.children.push(z):f==="classic"&&A.children.push(z),k+=C.content.length}if(f==="classic"){for(const C of o)A=C?.line?.call(v,A,L+1)||A;b.push(A),s.push(A)}else f==="inline"&&b.push(A)}),f==="classic"){for(const T of o)y=T?.code?.call(v,y)||y;g.children.push(y);for(const T of o)g=T?.pre?.call(v,g)||g;c.children.push(g)}else if(f==="inline"){const T=[];let L={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const C of c.children)C.type==="element"&&C.tagName==="br"?(T.push(L),L={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(C.type==="element"||C.type==="text")&&L.children.push(C);T.push(L);let k={type:"element",tagName:"code",properties:{},children:T};for(const C of o)k=C?.code?.call(v,k)||k;c.children=[];for(let C=0;C<k.children.length;C++){C>0&&c.children.push({type:"element",tagName:"br",properties:{},children:[]});const z=k.children[C];z.type==="element"&&c.children.push(...z.children)}}let S=c;for(const T of o)S=T?.root?.call(v,S)||S;return a&&Fs(S,a),S}function C2(e){return e.map(t=>{const i=[];let a="",o;return t.forEach((s,c)=>{const d=!(s.fontStyle&&(s.fontStyle&Lt.Underline||s.fontStyle&Lt.Strikethrough));d&&s.content.match(/^\s+$/)&&t[c+1]?(o===void 0&&(o=s.offset),a+=s.content):a?(d?i.push({...s,offset:o,content:a+s.content}):i.push({content:a,offset:o},s),o=void 0,a=""):i.push(s)}),i})}function w2(e){return e.map(t=>t.flatMap(i=>{if(i.content.match(/^\s+$/))return i;const a=i.content.match(/^(\s*)(.*?)(\s*)$/);if(!a)return i;const[,o,s,c]=a;if(!o&&!c)return i;const f=[{...i,offset:i.offset+o.length,content:s}];return o&&f.unshift({content:o,offset:i.offset}),c&&f.push({content:c,offset:i.offset+o.length+s.length}),f}))}function A2(e){return e.map(t=>{const i=[];for(const a of t){if(i.length===0){i.push({...a});continue}const o=i[i.length-1],s=wd(o.htmlStyle||Ns(o)),c=wd(a.htmlStyle||Ns(a)),f=o.fontStyle&&(o.fontStyle&Lt.Underline||o.fontStyle&Lt.Strikethrough),d=a.fontStyle&&(a.fontStyle&Lt.Underline||a.fontStyle&Lt.Strikethrough);!f&&!d&&s===c?o.content+=a.content:i.push({...a})}return i})}const k2=ua;function T2(e,t,i){const a={meta:{},options:i,codeToHast:(s,c)=>zs(e,s,c),codeToTokens:(s,c)=>Is(e,s,c)};let o=k2(zs(e,t,i,a));for(const s of Ms(i))o=s.postprocess?.call(a,o,i)||o;return o}const A0={light:"#333333",dark:"#bbbbbb"},k0={light:"#fffffe",dark:"#1e1e1e"},T0="__shiki_resolved";function Ys(e){if(e?.[T0])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:i,fg:a}=t;if(!i||!a){const f=t.settings?t.settings.find(d=>!d.name&&!d.scope):void 0;f?.settings?.foreground&&(a=f.settings.foreground),f?.settings?.background&&(i=f.settings.background),!a&&t?.colors?.["editor.foreground"]&&(a=t.colors["editor.foreground"]),!i&&t?.colors?.["editor.background"]&&(i=t.colors["editor.background"]),a||(a=t.type==="light"?A0.light:A0.dark),i||(i=t.type==="light"?k0.light:k0.dark),t.fg=a,t.bg=i}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let o=0;const s=new Map;function c(f){if(s.has(f))return s.get(f);o+=1;const d=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${d}`]?c(f):(s.set(f,d),d)}t.settings=t.settings.map(f=>{const d=f.settings?.foreground&&!f.settings.foreground.startsWith("#"),p=f.settings?.background&&!f.settings.background.startsWith("#");if(!d&&!p)return f;const g={...f,settings:{...f.settings}};if(d){const y=c(f.settings.foreground);t.colorReplacements[y]=f.settings.foreground,g.settings.foreground=y}if(p){const y=c(f.settings.background);t.colorReplacements[y]=f.settings.background,g.settings.background=y}return g});for(const f of Object.keys(t.colors||{}))if((f==="editor.foreground"||f==="editor.background"||f.startsWith("terminal.ansi"))&&!t.colors[f]?.startsWith("#")){const d=c(t.colors[f]);t.colorReplacements[d]=t.colors[f],t.colors[f]=d}return Object.defineProperty(t,T0,{enumerable:!1,writable:!1,value:!0}),t}async function Pv(e){return Array.from(new Set((await Promise.all(e.filter(t=>!Nv(t)).map(async t=>await Ov(t).then(i=>Array.isArray(i)?i:[i])))).flat()))}async function Bv(e){return(await Promise.all(e.map(async i=>Mv(i)?null:Ys(await Ov(i))))).filter(i=>!!i)}let L2=3;function R2(e,t=3){t>L2||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let aa=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function jv(e,t){if(!t)return e;if(t[e]){const i=new Set([e]);for(;t[e];){if(e=t[e],i.has(e))throw new aa(`Circular alias \`${Array.from(i).join(" -> ")} -> ${e}\``);i.add(e)}}return e}class D2 extends qk{constructor(t,i,a,o={}){super(t),this._resolver=t,this._themes=i,this._langs=a,this._alias=o,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const i=Ys(t);return i.name&&(this._resolvedThemes.set(i.name,i),this._loadedThemesCache=null),i}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let i=this._textmateThemeCache.get(t);i||(i=ks.createFromRawTheme(t),this._textmateThemeCache.set(t,i)),this._syncRegistry.setTheme(i)}getGrammar(t){return t=jv(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const i=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const a={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const o=this.loadGrammarWithConfiguration(t.scopeName,1,a);if(o.name=t.name,this._resolvedGrammars.set(t.name,o),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,i.size)for(const s of i)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const o of t)this.resolveEmbeddedLanguages(o);const i=Array.from(this._langGraph.entries()),a=i.filter(([o,s])=>!s);if(a.length){const o=i.filter(([s,c])=>c?(c.embeddedLanguages||c.embeddedLangs)?.some(d=>a.map(([p])=>p).includes(d)):!1).filter(s=>!a.includes(s));throw new aa(`Missing languages ${a.map(([s])=>`\`${s}\``).join(", ")}, required by ${o.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[o,s]of i)this._resolver.addLanguage(s);for(const[o,s]of i)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const i=t.embeddedLanguages??t.embeddedLangs;if(i)for(const a of i)this._langGraph.set(a,this._langMap.get(a))}}class O2{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,i){this._onigLib={createOnigScanner:a=>t.createScanner(a),createOnigString:a=>t.createString(a)},i.forEach(a=>this.addLanguage(a))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(i=>{this._langs.set(i,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(i=>{this._injections.get(i)||this._injections.set(i,[]),this._injections.get(i).push(t.scopeName)})}getInjections(t){const i=t.split(".");let a=[];for(let o=1;o<=i.length;o++){const s=i.slice(0,o).join(".");a=[...a,...this._injections.get(s)||[]]}return a}}let yl=0;function N2(e){yl+=1,e.warnings!==!1&&yl>=10&&yl%10===0&&console.warn(`[Shiki] ${yl} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new aa("`engine` option is required for synchronous mode");const i=(e.langs||[]).flat(1),a=(e.themes||[]).flat(1).map(Ys),o=new O2(e.engine,i),s=new D2(o,a,i,e.langAlias);let c;function f(C){return jv(C,e.langAlias)}function d(C){A();const z=s.getGrammar(typeof C=="string"?C:C.name);if(!z)throw new aa(`Language \`${C}\` not found, you may need to load it first`);return z}function p(C){if(C==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};A();const z=s.getTheme(C);if(!z)throw new aa(`Theme \`${C}\` not found, you may need to load it first`);return z}function g(C){A();const z=p(C);c!==C&&(s.setTheme(z),c=C);const U=s.getColorMap();return{theme:z,colorMap:U}}function y(){return A(),s.getLoadedThemes()}function b(){return A(),s.getLoadedLanguages()}function v(...C){A(),s.loadLanguages(C.flat(1))}async function S(...C){return v(await Pv(C))}function T(...C){A();for(const z of C.flat(1))s.loadTheme(z)}async function L(...C){return A(),T(await Bv(C))}function A(){if(t)throw new aa("Shiki instance has been disposed")}function k(){t||(t=!0,s.dispose(),yl-=1)}return{setTheme:g,getTheme:p,getLanguage:d,getLoadedThemes:y,getLoadedLanguages:b,resolveLangAlias:f,loadLanguage:S,loadLanguageSync:v,loadTheme:L,loadThemeSync:T,dispose:k,[Symbol.dispose]:k}}async function M2(e){e.engine||R2("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,i,a]=await Promise.all([Bv(e.themes||[]),Pv(e.langs||[]),e.engine]);return N2({...e,themes:t,langs:i,engine:a})}async function I2(e){const t=await M2(e);return{getLastGrammarState:(...i)=>g2(t,...i),codeToTokensBase:(i,a)=>nh(t,i,a),codeToTokensWithThemes:(i,a)=>Hv(t,i,a),codeToTokens:(i,a)=>Is(t,i,a),codeToHast:(i,a)=>zs(t,i,a),codeToHtml:(i,a)=>T2(t,i,a),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function z2(e){const t=e.langs,i=e.themes,a=e.engine;async function o(s){function c(y){if(typeof y=="string"){if(y=s.langAlias?.[y]||y,Nv(y))return[];const b=t[y];if(!b)throw new ft(`Language \`${y}\` is not included in this bundle. You may want to load it from external source.`);return b}return y}function f(y){if(Mv(y))return"none";if(typeof y=="string"){const b=i[y];if(!b)throw new ft(`Theme \`${y}\` is not included in this bundle. You may want to load it from external source.`);return b}return y}const d=(s.themes??[]).map(y=>f(y)),p=(s.langs??[]).map(y=>c(y)),g=await I2({engine:s.engine??a(),...s,themes:d,langs:p});return{...g,loadLanguage(...y){return g.loadLanguage(...y.map(c))},loadTheme(...y){return g.loadTheme(...y.map(f))},getBundledLanguages(){return t},getBundledThemes(){return i}}}return o}function U2(e){let t;async function i(a={}){if(t){const o=await t;return await Promise.all([o.loadTheme(...a.themes||[]),o.loadLanguage(...a.langs||[])]),o}else{t=e({...a,themes:[],langs:[]});const o=await t;return await Promise.all([o.loadTheme(...a.themes||[]),o.loadLanguage(...a.langs||[])]),o}}return i}function H2(e,t){const i=U2(e);async function a(o,s){const c=await i({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),f=await t?.guessEmbeddedLanguages?.(o,s.lang,c);return f&&await c.loadLanguage(...f),c}return{getSingletonHighlighter(o){return i(o)},async codeToHtml(o,s){return(await a(o,s)).codeToHtml(o,s)},async codeToHast(o,s){return(await a(o,s)).codeToHast(o,s)},async codeToTokens(o,s){return(await a(o,s)).codeToTokens(o,s)},async codeToTokensBase(o,s){return(await a(o,s)).codeToTokensBase(o,s)},async codeToTokensWithThemes(o,s){return(await a(o,s)).codeToTokensWithThemes(o,s)},async getLastGrammarState(o,s){return(await i({langs:[s.lang],themes:[s.theme]})).getLastGrammarState(o,s)}}}const Vv=[{id:"abap",name:"ABAP",import:(()=>x(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>x(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>x(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>x(()=>import("./angular-html-CU67Zn6k.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>x(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>x(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>x(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>x(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>x(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>x(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>x(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>x(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>x(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>x(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>x(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>x(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>x(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>x(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>x(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>x(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>x(()=>import("./bird2-DPOp833l.js"),[]))},{id:"blade",name:"Blade",import:(()=>x(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>x(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>x(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>x(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>x(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>x(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>x(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>x(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>x(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>x(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>x(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>x(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>x(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>x(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>x(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>x(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>x(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>x(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>x(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>x(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>x(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>x(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>x(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>x(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>x(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>x(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>x(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>x(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>x(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>x(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>x(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>x(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>x(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>x(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>x(()=>import("./erb-B12qg9BL.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>x(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>x(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>x(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>x(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>x(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>x(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>x(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>x(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>x(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>x(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>x(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>x(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>x(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>x(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>x(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>x(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>x(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>x(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>x(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>x(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>x(()=>import("./go-CxLEBnE3.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>x(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>x(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>x(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>x(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>x(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>x(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>x(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>x(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>x(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>x(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>x(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>x(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>x(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>x(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>x(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>x(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>x(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>x(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>x(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>x(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>x(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>x(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>x(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>x(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>x(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>x(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>x(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>x(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>x(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>x(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>x(()=>import("./just-Cw27pwNe.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>x(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>x(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>x(()=>import("./kusto-DZf3V79B.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>x(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>x(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>x(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>x(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>x(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>x(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>x(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>x(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>x(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>x(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>x(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>x(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>x(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>x(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>x(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>x(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>x(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>x(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>x(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>x(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>x(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>x(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>x(()=>import("./nextflow-groovy-BeH2EWoN.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>x(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>x(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>x(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>x(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>x(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>x(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>x(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>x(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>x(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>x(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>x(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>x(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>x(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>x(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>x(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>x(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>x(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>x(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>x(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>x(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>x(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>x(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>x(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>x(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>x(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>x(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>x(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>x(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>x(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>x(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>x(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>x(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>x(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>x(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>x(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>x(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>x(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>x(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>x(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>x(()=>import("./rst-BrH8l1NY.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>x(()=>import("./ruby-Dw2BHqvy.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>x(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>x(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>x(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>x(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>x(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>x(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>x(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>x(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>x(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>x(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>x(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>x(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>x(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>x(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>x(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>x(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>x(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>x(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>x(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>x(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>x(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>x(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>x(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>x(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>x(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>x(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>x(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>x(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>x(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>x(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>x(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>x(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>x(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>x(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>x(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>x(()=>import("./twig-DNn4PbVi.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>x(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>x(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>x(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>x(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>x(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>x(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>x(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>x(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>x(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>x(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>x(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>x(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>x(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>x(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>x(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>x(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>x(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>x(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>x(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>x(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>x(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>x(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>x(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>x(()=>import("./zig-VOosw3JB.js"),[]))}],P2=Object.fromEntries(Vv.map(e=>[e.id,e.import])),B2=Object.fromEntries(Vv.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Ad={...P2,...B2},j2=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>x(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>x(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>x(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>x(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>x(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>x(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>x(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>x(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>x(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>x(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>x(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>x(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>x(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>x(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>x(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>x(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>x(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>x(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>x(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>x(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>x(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>x(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>x(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>x(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>x(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>x(()=>import("./horizon-bright-Cn-bp-IR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>x(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>x(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>x(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>x(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>x(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>x(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>x(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>x(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>x(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>x(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>x(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>x(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>x(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>x(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>x(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>x(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>x(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>x(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>x(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>x(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>x(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>x(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>x(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>x(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>x(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>x(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>x(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>x(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>x(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>x(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>x(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>x(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>x(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>x(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>x(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>x(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],Gv=Object.fromEntries(j2.map(e=>[e.id,e.import]));class rh extends Error{constructor(t){super(t),this.name="ShikiError"}}function V2(){return 2147483648}function G2(){return typeof performance<"u"?performance.now():Date.now()}const $2=(e,t)=>e+(t-e%t)%t;async function q2(e){let t,i;const a={};function o(v){i=v,a.HEAPU8=new Uint8Array(v),a.HEAPU32=new Uint32Array(v)}function s(v,S,T){a.HEAPU8.copyWithin(v,S,S+T)}function c(v){try{return t.grow(v-i.byteLength+65535>>>16),o(t.buffer),1}catch{}}function f(v){const S=a.HEAPU8.length;v=v>>>0;const T=V2();if(v>T)return!1;for(let L=1;L<=4;L*=2){let A=S*(1+.2/L);A=Math.min(A,v+100663296);const k=Math.min(T,$2(Math.max(v,A),65536));if(c(k))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function p(v,S,T=1024){const L=S+T;let A=S;for(;v[A]&&!(A>=L);)++A;if(A-S>16&&v.buffer&&d)return d.decode(v.subarray(S,A));let k="";for(;S<A;){let C=v[S++];if(!(C&128)){k+=String.fromCharCode(C);continue}const z=v[S++]&63;if((C&224)===192){k+=String.fromCharCode((C&31)<<6|z);continue}const U=v[S++]&63;if((C&240)===224?C=(C&15)<<12|z<<6|U:C=(C&7)<<18|z<<12|U<<6|v[S++]&63,C<65536)k+=String.fromCharCode(C);else{const O=C-65536;k+=String.fromCharCode(55296|O>>10,56320|O&1023)}}return k}function g(v,S){return v?p(a.HEAPU8,v,S):""}const y={emscripten_get_now:G2,emscripten_memcpy_big:s,emscripten_resize_heap:f,fd_write:()=>0};async function b(){const S=await e({env:y,wasi_snapshot_preview1:y});t=S.memory,o(t.buffer),Object.assign(a,S),a.UTF8ToString=g}return await b(),a}var F2=Object.defineProperty,Y2=(e,t,i)=>t in e?F2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,mt=(e,t,i)=>Y2(e,typeof t!="symbol"?t+"":t,i);let _t=null;function X2(e){throw new rh(e.UTF8ToString(e.getLastOnigError()))}class Xs{constructor(t){mt(this,"utf16Length"),mt(this,"utf8Length"),mt(this,"utf16Value"),mt(this,"utf8Value"),mt(this,"utf16OffsetToUtf8"),mt(this,"utf8OffsetToUtf16");const i=t.length,a=Xs._utf8ByteLength(t),o=a!==i,s=o?new Uint32Array(i+1):null;o&&(s[i]=a);const c=o?new Uint32Array(a+1):null;o&&(c[a]=i);const f=new Uint8Array(a);let d=0;for(let p=0;p<i;p++){const g=t.charCodeAt(p);let y=g,b=!1;if(g>=55296&&g<=56319&&p+1<i){const v=t.charCodeAt(p+1);v>=56320&&v<=57343&&(y=(g-55296<<10)+65536|v-56320,b=!0)}o&&(s[p]=d,b&&(s[p+1]=d),y<=127?c[d+0]=p:y<=2047?(c[d+0]=p,c[d+1]=p):y<=65535?(c[d+0]=p,c[d+1]=p,c[d+2]=p):(c[d+0]=p,c[d+1]=p,c[d+2]=p,c[d+3]=p)),y<=127?f[d++]=y:y<=2047?(f[d++]=192|(y&1984)>>>6,f[d++]=128|(y&63)>>>0):y<=65535?(f[d++]=224|(y&61440)>>>12,f[d++]=128|(y&4032)>>>6,f[d++]=128|(y&63)>>>0):(f[d++]=240|(y&1835008)>>>18,f[d++]=128|(y&258048)>>>12,f[d++]=128|(y&4032)>>>6,f[d++]=128|(y&63)>>>0),b&&p++}this.utf16Length=i,this.utf8Length=a,this.utf16Value=t,this.utf8Value=f,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=c}static _utf8ByteLength(t){let i=0;for(let a=0,o=t.length;a<o;a++){const s=t.charCodeAt(a);let c=s,f=!1;if(s>=55296&&s<=56319&&a+1<o){const d=t.charCodeAt(a+1);d>=56320&&d<=57343&&(c=(s-55296<<10)+65536|d-56320,f=!0)}c<=127?i+=1:c<=2047?i+=2:c<=65535?i+=3:i+=4,f&&a++}return i}createString(t){const i=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,i),i}}const Qs=class Rn{constructor(t){if(mt(this,"id",++Rn.LAST_ID),mt(this,"_onigBinding"),mt(this,"content"),mt(this,"utf16Length"),mt(this,"utf8Length"),mt(this,"utf16OffsetToUtf8"),mt(this,"utf8OffsetToUtf16"),mt(this,"ptr"),!_t)throw new rh("Must invoke loadWasm first.");this._onigBinding=_t,this.content=t;const i=new Xs(t);this.utf16Length=i.utf16Length,this.utf8Length=i.utf8Length,this.utf16OffsetToUtf8=i.utf16OffsetToUtf8,this.utf8OffsetToUtf16=i.utf8OffsetToUtf16,this.utf8Length<1e4&&!Rn._sharedPtrInUse?(Rn._sharedPtr||(Rn._sharedPtr=_t.omalloc(1e4)),Rn._sharedPtrInUse=!0,_t.HEAPU8.set(i.utf8Value,Rn._sharedPtr),this.ptr=Rn._sharedPtr):this.ptr=i.createString(_t)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Rn._sharedPtr?Rn._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};mt(Qs,"LAST_ID",0);mt(Qs,"_sharedPtr",0);mt(Qs,"_sharedPtrInUse",!1);let $v=Qs;class Q2{constructor(t){if(mt(this,"_onigBinding"),mt(this,"_ptr"),!_t)throw new rh("Must invoke loadWasm first.");const i=[],a=[];for(let f=0,d=t.length;f<d;f++){const p=new Xs(t[f]);i[f]=p.createString(_t),a[f]=p.utf8Length}const o=_t.omalloc(4*t.length);_t.HEAPU32.set(i,o/4);const s=_t.omalloc(4*t.length);_t.HEAPU32.set(a,s/4);const c=_t.createOnigScanner(o,s,t.length);for(let f=0,d=t.length;f<d;f++)_t.ofree(i[f]);_t.ofree(s),_t.ofree(o),c===0&&X2(_t),this._onigBinding=_t,this._ptr=c}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,i,a){let o=0;if(typeof a=="number"&&(o=a),typeof t=="string"){t=new $v(t);const s=this._findNextMatchSync(t,i,!1,o);return t.dispose(),s}return this._findNextMatchSync(t,i,!1,o)}_findNextMatchSync(t,i,a,o){const s=this._onigBinding,c=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(i),o);if(c===0)return null;const f=s.HEAPU32;let d=c/4;const p=f[d++],g=f[d++],y=[];for(let b=0;b<g;b++){const v=t.convertUtf8OffsetToUtf16(f[d++]),S=t.convertUtf8OffsetToUtf16(f[d++]);y[b]={start:v,end:S,length:S-v}}return{index:p,captureIndices:y}}}function Z2(e){return typeof e.instantiator=="function"}function K2(e){return typeof e.default=="function"}function W2(e){return typeof e.data<"u"}function J2(e){return typeof Response<"u"&&e instanceof Response}function eL(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let fs;function tL(e){if(fs)return fs;async function t(){_t=await q2(async i=>{let a=e;return a=await a,typeof a=="function"&&(a=await a(i)),typeof a=="function"&&(a=await a(i)),Z2(a)?a=await a.instantiator(i):K2(a)?a=await a.default(i):(W2(a)&&(a=a.data),J2(a)?typeof WebAssembly.instantiateStreaming=="function"?a=await nL(a)(i):a=await iL(a)(i):eL(a)?a=await Vf(a)(i):a instanceof WebAssembly.Module?a=await Vf(a)(i):"default"in a&&a.default instanceof WebAssembly.Module&&(a=await Vf(a.default)(i))),"instance"in a&&(a=a.instance),"exports"in a&&(a=a.exports),a})}return fs=t(),fs}function Vf(e){return t=>WebAssembly.instantiate(e,t)}function nL(e){return t=>WebAssembly.instantiateStreaming(e,t)}function iL(e){return async t=>{const i=await e.arrayBuffer();return WebAssembly.instantiate(i,t)}}async function qv(e){return e&&await tL(e),{createScanner(t){return new Q2(t.map(i=>typeof i=="string"?i:i.source))},createString(t){return new $v(t)}}}const Fv=z2({langs:Ad,themes:Gv,engine:()=>qv(x(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:L0}=H2(Fv,{guessEmbeddedLanguages:KT});function ya(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function rL(e,t,i){return e.has(t)||e.set(t,i),e.get(t)}const ah=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),St=String.raw;function ba(e,t){if(e==null)throw new Error(t??"Value expected");return e}const Yv=St`\[\^?`,Xv=`c.? | C(?:-.?)?|${St`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${St`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${St`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${St`o\{[^\}]*\}?`}|${St`\d{1,3}`}`,lh=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,ds=new RegExp(St`
33
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function HT(e,t,i,a){const o=a.schema,s=o.space==="svg"?!1:a.settings.omitOptionalTags;let c=o.space==="svg"?a.settings.closeEmptyElements:a.settings.voids.includes(e.tagName.toLowerCase());const f=[];let d;o.space==="html"&&e.tagName==="svg"&&(a.schema=Hl);const p=PT(a,e.properties),g=a.all(o.space==="html"&&e.tagName==="template"?e.content:e);return a.schema=o,g&&(c=!1),(p||!s||!NT(e,t,i))&&(f.push("<",e.tagName,p?" "+p:""),c&&(o.space==="svg"||a.settings.closeSelfClosing)&&(d=p.charAt(p.length-1),(!a.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&f.push(" "),f.push("/")),f.push(">")),f.push(g),!c&&(!s||!Jd(e,t,i))&&f.push("</"+e.tagName+">"),f.join("")}function PT(e,t){const i=[];let a=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const s=BT(e,o,t[o]);s&&i.push(s)}}for(;++a<i.length;){const s=e.settings.tightAttributes?i[a].charAt(i[a].length-1):void 0;a!==i.length-1&&s!=='"'&&s!=="'"&&(i[a]+=" ")}return i.join("")}function BT(e,t,i){const a=zb(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let c=e.quote,f;if(a.overloadedBoolean&&(i===a.attribute||i==="")?i=!0:(a.boolean||a.overloadedBoolean)&&(typeof i!="string"||i===a.attribute||i==="")&&(i=!!i),i==null||i===!1||typeof i=="number"&&Number.isNaN(i))return"";const d=fa(a.attribute,Object.assign({},e.settings.characterReferences,{subset:cs.name[o][s]}));return i===!0||(i=Array.isArray(i)?(a.commaSeparated?Tb:Hb)(i,{padLeft:!e.settings.tightCommaSeparatedLists}):String(i),e.settings.collapseEmptyAttributes&&!i)?d:(e.settings.preferUnquoted&&(f=fa(i,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:cs.unquoted[o][s]}))),f!==i&&(e.settings.quoteSmart&&_0(i,c)>_0(i,e.alternative)&&(c=e.alternative),f=c+fa(i,Object.assign({},e.settings.characterReferences,{subset:(c==="'"?cs.single:cs.double)[o][s],attribute:!0}))+c),d+(f&&"="+f))}const jT=["<","&"];function Nv(e,t,i,a){return i&&i.type==="element"&&(i.tagName==="script"||i.tagName==="style")?e.value:fa(e.value,Object.assign({},a.settings.characterReferences,{subset:jT}))}function VT(e,t,i,a){return a.settings.allowDangerousHtml?e.value:Nv(e,t,i,a)}function GT(e,t,i,a){return a.all(e)}const $T=Zk("type",{invalid:qT,unknown:FT,handlers:{comment:gT,doctype:yT,element:HT,raw:VT,root:GT,text:Nv}});function qT(e){throw new Error("Expected node, not `"+e+"`")}function FT(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const YT={},XT={},QT=[];function da(e,t){const i=t||YT,a=i.quote||'"',o=a==='"'?"'":'"';if(a!=='"'&&a!=="'")throw new Error("Invalid quote `"+a+"`, expected `'` or `\"`");return{one:ZT,all:KT,settings:{omitOptionalTags:i.omitOptionalTags||!1,allowParseErrors:i.allowParseErrors||!1,allowDangerousCharacters:i.allowDangerousCharacters||!1,quoteSmart:i.quoteSmart||!1,preferUnquoted:i.preferUnquoted||!1,tightAttributes:i.tightAttributes||!1,upperDoctype:i.upperDoctype||!1,tightDoctype:i.tightDoctype||!1,bogusComments:i.bogusComments||!1,tightCommaSeparatedLists:i.tightCommaSeparatedLists||!1,tightSelfClosing:i.tightSelfClosing||!1,collapseEmptyAttributes:i.collapseEmptyAttributes||!1,allowDangerousHtml:i.allowDangerousHtml||!1,voids:i.voids||Qk,characterReferences:i.characterReferences||XT,closeSelfClosing:i.closeSelfClosing||!1,closeEmptyElements:i.closeEmptyElements||!1},schema:i.space==="svg"?Hl:Ub,quote:a,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function ZT(e,t,i){return $T(e,t,i,this)}function KT(e){const t=[],i=e&&e.children||QT;let a=-1;for(;++a<i.length;)t[a]=this.one(i[a],a,e);return t.join("")}function Ns(e,t){const i=typeof e=="string"?{}:{...e.colorReplacements},a=typeof e=="string"?e:e.name;for(const[o,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?i[o]=s:o===a&&Object.assign(i,s);return i}function Pi(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function WT(e){return Array.isArray(e)?e:[e]}async function Ov(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function eh(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Mv(e){return e==="ansi"||eh(e)}function th(e){return e==="none"}function Iv(e){return th(e)}function zv(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const i=Array.isArray(t)?t:t.split(/\s+/g);for(const a of i)a&&!e.properties.class.includes(a)&&e.properties.class.push(a);return e}function qs(e,t=!1){if(e.length===0)return[["",0]];const i=e.split(/(\r?\n)/g);let a=0;const o=[];for(let s=0;s<i.length;s+=2){const c=t?i[s]+(i[s+1]||""):i[s];o.push([c,a]),a+=i[s].length,a+=i[s+1]?.length||0}return o}function JT(e){const t=qs(e,!0).map(([o])=>o);function i(o){if(o===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=o,c=0;for(const f of t){if(s<f.length)break;s-=f.length,c++}return{line:c,character:s}}function a(o,s){let c=0;for(let f=0;f<o;f++)c+=t[f].length;return c+=s,c}return{lines:t,indexToPos:i,posToIndex:a}}function e2(e,t,i){const a=new Set;for(const s of e.matchAll(/:?lang=["']([^"']+)["']/g)){const c=s[1].toLowerCase().trim();c&&a.add(c)}for(const s of e.matchAll(/(?:```|~~~)([\w-]+)/g)){const c=s[1].toLowerCase().trim();c&&a.add(c)}for(const s of e.matchAll(/\\begin\{([\w-]+)\}/g)){const c=s[1].toLowerCase().trim();c&&a.add(c)}for(const s of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const c=s[1].toLowerCase().trim(),f=c.includes("/")?c.split("/").pop():c;f&&a.add(f)}if(!i)return Array.from(a);const o=i.getBundledLanguages();return Array.from(a).filter(s=>s&&o[s])}const nh="light-dark()",t2=["color","background-color"];function n2(e,t){let i=0;const a=[];for(const o of t)o>i&&a.push({...e,content:e.content.slice(i,o),offset:e.offset+i}),i=o;return i<e.content.length&&a.push({...e,content:e.content.slice(i),offset:e.offset+i}),a}function i2(e,t){const i=Array.from(t instanceof Set?t:new Set(t)).sort((a,o)=>a-o);return i.length?e.map(a=>a.flatMap(o=>{const s=i.filter(c=>o.offset<c&&c<o.offset+o.content.length).map(c=>c-o.offset).sort((c,f)=>c-f);return s.length?n2(o,s):o})):e}function r2(e,t,i,a,o="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},c=t.map(g=>Os(e.variants[g])),f=new Set(c.flatMap(g=>Object.keys(g))),d={},p=(g,y)=>{const v=y==="color"?"":y==="background-color"?"-bg":`-${y}`;return i+t[g]+(y==="color"?"":v)};return c.forEach((g,y)=>{for(const v of f){const b=g[v]||"inherit";if(y===0&&a&&t2.includes(v))if(a===nh&&c.length>1){const S=t.findIndex(A=>A==="light"),k=t.findIndex(A=>A==="dark");if(S===-1||k===-1)throw new dt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const L=c[S][v]||"inherit",C=c[k][v]||"inherit";d[v]=`light-dark(${L}, ${C})`,o==="css-vars"&&(d[p(y,v)]=b)}else d[v]=b;else o==="css-vars"&&(d[p(y,v)]=b)}}),s.htmlStyle=d,s}function Os(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Rt.Italic&&(t["font-style"]="italic"),e.fontStyle&Rt.Bold&&(t["font-weight"]="bold");const i=[];e.fontStyle&Rt.Underline&&i.push("underline"),e.fontStyle&Rt.Strikethrough&&i.push("line-through"),i.length&&(t["text-decoration"]=i.join(" "))}return t}function Ad(e){return typeof e=="string"?e:Object.entries(e).map(([t,i])=>`${t}:${i}`).join(";")}const Uv=new WeakMap;function Fs(e,t){Uv.set(e,t)}function Ol(e){return Uv.get(e)}class va{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,i){return new va(Object.fromEntries(WT(i).map(a=>[a,Cd])),t)}constructor(...t){if(t.length===2){const[i,a]=t;this.lang=a,this._stacks=i}else{const[i,a,o]=t;this.lang=a,this._stacks={[o]:i}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return a2(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function a2(e){const t=[],i=new Set;function a(o){if(i.has(o))return;i.add(o);const s=o?.nameScopesList?.scopeName;s&&t.push(s),o.parent&&a(o.parent)}return a(e),t}function l2(e,t){if(!(e instanceof va))throw new dt("Invalid grammar state");return e.getInternalStack(t)}function o2(){const e=new WeakMap;function t(i){if(!e.has(i.meta)){let a=function(c){if(typeof c=="number"){if(c<0||c>i.source.length)throw new dt(`Invalid decoration offset: ${c}. Code length: ${i.source.length}`);return{...o.indexToPos(c),offset:c}}else{const f=o.lines[c.line];if(f===void 0)throw new dt(`Invalid decoration position ${JSON.stringify(c)}. Lines length: ${o.lines.length}`);let d=c.character;if(d<0&&(d=f.length+d),d<0||d>f.length)throw new dt(`Invalid decoration position ${JSON.stringify(c)}. Line ${c.line} length: ${f.length}`);return{...c,character:d,offset:o.posToIndex(c.line,d)}}};const o=JT(i.source),s=(i.options.decorations||[]).map(c=>({...c,start:a(c.start),end:a(c.end)}));s2(s),e.set(i.meta,{decorations:s,converter:o,source:i.source})}return e.get(i.meta)}return{name:"shiki:decorations",tokens(i){if(!this.options.decorations?.length)return;const o=t(this).decorations.flatMap(c=>[c.start.offset,c.end.offset]);return i2(i,o)},code(i){if(!this.options.decorations?.length)return;const a=t(this),o=Array.from(i.children).filter(g=>g.type==="element"&&g.tagName==="span");if(o.length!==a.converter.lines.length)throw new dt(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${a.converter.lines.length}). Failed to apply decorations.`);function s(g,y,v,b){const S=o[g];let k="",L=-1,C=-1;if(y===0&&(L=0),v===0&&(C=0),v===Number.POSITIVE_INFINITY&&(C=S.children.length),L===-1||C===-1)for(let T=0;T<S.children.length;T++)k+=Hv(S.children[T]),L===-1&&k.length===y&&(L=T+1),C===-1&&k.length===v&&(C=T+1);if(L===-1)throw new dt(`Failed to find start index for decoration ${JSON.stringify(b.start)}`);if(C===-1)throw new dt(`Failed to find end index for decoration ${JSON.stringify(b.end)}`);const A=S.children.slice(L,C);if(!b.alwaysWrap&&A.length===S.children.length)f(S,b,"line");else if(!b.alwaysWrap&&A.length===1&&A[0].type==="element")f(A[0],b,"token");else{const T={type:"element",tagName:"span",properties:{},children:A};f(T,b,"wrapper"),S.children.splice(L,A.length,T)}}function c(g,y){o[g]=f(o[g],y,"line")}function f(g,y,v){const b=y.properties||{},S=y.transform||(k=>k);return g.tagName=y.tagName||"span",g.properties={...g.properties,...b,class:g.properties.class},y.properties?.class&&zv(g,y.properties.class),g=S(g,v)||g,g}const d=[],p=a.decorations.sort((g,y)=>y.start.offset-g.start.offset||g.end.offset-y.end.offset);for(const g of p){const{start:y,end:v}=g;if(y.line===v.line)s(y.line,y.character,v.character,g);else if(y.line<v.line){s(y.line,y.character,Number.POSITIVE_INFINITY,g);for(let b=y.line+1;b<v.line;b++)d.unshift(()=>c(b,g));s(v.line,0,v.character,g)}}d.forEach(g=>g())}}}function s2(e){for(let t=0;t<e.length;t++){const i=e[t];if(i.start.offset>i.end.offset)throw new dt(`Invalid decoration range: ${JSON.stringify(i.start)} - ${JSON.stringify(i.end)}`);for(let a=t+1;a<e.length;a++){const o=e[a],s=i.start.offset<=o.start.offset&&o.start.offset<i.end.offset,c=i.start.offset<o.end.offset&&o.end.offset<=i.end.offset,f=o.start.offset<=i.start.offset&&i.start.offset<o.end.offset,d=o.start.offset<i.end.offset&&i.end.offset<=o.end.offset;if(s||c||f||d){if(s&&c||f&&d||f&&i.start.offset===i.end.offset||c&&o.start.offset===o.end.offset)continue;throw new dt(`Decorations ${JSON.stringify(i.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function Hv(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(Hv).join(""):""}const u2=[o2()];function Ms(e){const t=c2(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...u2]}function c2(e){const t=[],i=[],a=[];for(const o of e)switch(o.enforce){case"pre":t.push(o);break;case"post":i.push(o);break;default:a.push(o)}return{pre:t,post:i,normal:a}}var sr=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Vf={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function f2(e,t){const i=e.indexOf("\x1B",t);if(i!==-1&&e[i+1]==="["){const a=e.indexOf("m",i);if(a!==-1)return{sequence:e.substring(i+2,a).split(";"),startPosition:i,position:a+1}}return{position:e.length}}function x0(e){const t=e.shift();if(t==="2"){const i=e.splice(0,3).map(a=>Number.parseInt(a));return i.length!==3||i.some(a=>Number.isNaN(a))?void 0:{type:"rgb",rgb:i}}else if(t==="5"){const i=e.shift();if(i)return{type:"table",index:Number(i)}}}function d2(e){const t=[];for(;e.length>0;){const i=e.shift();if(!i)continue;const a=Number.parseInt(i);if(!Number.isNaN(a))if(a===0)t.push({type:"resetAll"});else if(a<=9)Vf[a]&&t.push({type:"setDecoration",value:Vf[a]});else if(a<=29){const o=Vf[a-20];o&&(t.push({type:"resetDecoration",value:o}),o==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(a<=37)t.push({type:"setForegroundColor",value:{type:"named",name:sr[a-30]}});else if(a===38){const o=x0(e);o&&t.push({type:"setForegroundColor",value:o})}else if(a===39)t.push({type:"resetForegroundColor"});else if(a<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:sr[a-40]}});else if(a===48){const o=x0(e);o&&t.push({type:"setBackgroundColor",value:o})}else a===49?t.push({type:"resetBackgroundColor"}):a===53?t.push({type:"setDecoration",value:"overline"}):a===55?t.push({type:"resetDecoration",value:"overline"}):a>=90&&a<=97?t.push({type:"setForegroundColor",value:{type:"named",name:sr[a-90+8]}}):a>=100&&a<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:sr[a-100+8]}})}return t}function h2(){let e=null,t=null,i=new Set;return{parse(a){const o=[];let s=0;do{const c=f2(a,s),f=c.sequence?a.substring(s,c.startPosition):a.substring(s);if(f.length>0&&o.push({value:f,foreground:e,background:t,decorations:new Set(i)}),c.sequence){const d=d2(c.sequence);for(const p of d)p.type==="resetAll"?(e=null,t=null,i.clear()):p.type==="resetForegroundColor"?e=null:p.type==="resetBackgroundColor"?t=null:p.type==="resetDecoration"&&i.delete(p.value);for(const p of d)p.type==="setForegroundColor"?e=p.value:p.type==="setBackgroundColor"?t=p.value:p.type==="setDecoration"&&i.add(p.value)}s=c.position}while(s<a.length);return o}}}var p2={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function m2(e=p2){function t(f){return e[f]}function i(f){return`#${f.map(d=>Math.max(0,Math.min(d,255)).toString(16).padStart(2,"0")).join("")}`}let a;function o(){if(a)return a;a=[];for(let p=0;p<sr.length;p++)a.push(t(sr[p]));let f=[0,95,135,175,215,255];for(let p=0;p<6;p++)for(let g=0;g<6;g++)for(let y=0;y<6;y++)a.push(i([f[p],f[g],f[y]]));let d=8;for(let p=0;p<24;p++,d+=10)a.push(i([d,d,d]));return a}function s(f){return o()[f]}function c(f){switch(f.type){case"named":return t(f.name);case"rgb":return i(f.rgb);case"table":return s(f.index)}}return{value:c}}const g2={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function y2(e,t,i){const a=Ns(e,i),o=qs(t),s=Object.fromEntries(sr.map(d=>{const p=`terminal.ansi${d[0].toUpperCase()}${d.substring(1)}`,g=e.colors?.[p];return[d,g||g2[d]]})),c=m2(s),f=h2();return o.map(d=>f.parse(d[0]).map(p=>{let g,y;p.decorations.has("reverse")?(g=p.background?c.value(p.background):e.bg,y=p.foreground?c.value(p.foreground):e.fg):(g=p.foreground?c.value(p.foreground):e.fg,y=p.background?c.value(p.background):void 0),g=Pi(g,a),y=Pi(y,a),p.decorations.has("dim")&&(g=b2(g));let v=Rt.None;return p.decorations.has("bold")&&(v|=Rt.Bold),p.decorations.has("italic")&&(v|=Rt.Italic),p.decorations.has("underline")&&(v|=Rt.Underline),p.decorations.has("strikethrough")&&(v|=Rt.Strikethrough),{content:p.value,offset:d[1],color:g,bgColor:y,fontStyle:v}}))}function b2(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const a=t[1];if(a.length===8){const o=Math.round(Number.parseInt(a.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${a.slice(0,6)}${o}`}else{if(a.length===6)return`#${a}80`;if(a.length===4){const o=a[0],s=a[1],c=a[2],f=a[3],d=Math.round(Number.parseInt(`${f}${f}`,16)/2).toString(16).padStart(2,"0");return`#${o}${o}${s}${s}${c}${c}${d}`}else if(a.length===3){const o=a[0],s=a[1],c=a[2];return`#${o}${o}${s}${s}${c}${c}80`}}}const i=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return i?`var(${i[1]}-dim)`:e}function ih(e,t,i={}){const{theme:a=e.getLoadedThemes()[0]}=i,o=e.resolveLangAlias(i.lang||"text");if(eh(o)||th(a))return qs(t).map(d=>[{content:d[0],offset:d[1]}]);const{theme:s,colorMap:c}=e.setTheme(a);if(o==="ansi")return y2(s,t,i);const f=e.getLanguage(i.lang||"text");if(i.grammarState){if(i.grammarState.lang!==f.name)throw new dt(`Grammar state language "${i.grammarState.lang}" does not match highlight language "${f.name}"`);if(!i.grammarState.themes.includes(s.name))throw new dt(`Grammar state themes "${i.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return _2(t,f,s,c,i)}function v2(...e){if(e.length===2)return Ol(e[1]);const[t,i,a={}]=e,{lang:o="text",theme:s=t.getLoadedThemes()[0]}=a;if(eh(o)||th(s))throw new dt("Plain language does not have grammar state");if(o==="ansi")throw new dt("ANSI language does not have grammar state");const{theme:c,colorMap:f}=t.setTheme(s),d=t.getLanguage(o);return new va(rh(i,d,c,f,a).stateStack,d.name,c.name)}function _2(e,t,i,a,o){const s=rh(e,t,i,a,o),c=new va(s.stateStack,t.name,i.name);return Fs(s.tokens,c),s.tokens}function rh(e,t,i,a,o){const s=Ns(i,o),{tokenizeMaxLineLength:c=0,tokenizeTimeLimit:f=500}=o,d=qs(e);let p=o.grammarState?l2(o.grammarState,i.name)??Cd:o.grammarContextCode!=null?rh(o.grammarContextCode,t,i,a,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:Cd,g=[];const y=[];for(let v=0,b=d.length;v<b;v++){const[S,k]=d[v];if(S===""){g=[],y.push([]);continue}if(c>0&&S.length>=c){g=[],y.push([{content:S,offset:k,color:"",fontStyle:0}]);continue}let L,C,A;o.includeExplanation&&(L=t.tokenizeLine(S,p,f),C=L.tokens,A=0);const T=t.tokenizeLine2(S,p,f),I=T.tokens.length/2;for(let z=0;z<I;z++){const D=T.tokens[2*z],j=z+1<I?T.tokens[2*z+2]:S.length;if(D===j)continue;const G=T.tokens[2*z+1],ie=Pi(a[pa.getForeground(G)],s),ne=pa.getFontStyle(G),J={content:S.substring(D,j),offset:k+D,color:ie,fontStyle:ne};if(o.includeExplanation){const W=[];if(o.includeExplanation!=="scopeName")for(const ee of i.settings){let te;switch(typeof ee.scope){case"string":te=ee.scope.split(/,/).map(H=>H.trim());break;case"object":te=ee.scope;break;default:continue}W.push({settings:ee,selectors:te.map(H=>H.split(/ /))})}J.explanation=[];let fe=0;for(;D+fe<j;){const ee=C[A],te=S.substring(ee.startIndex,ee.endIndex);fe+=te.length,J.explanation.push({content:te,scopes:o.includeExplanation==="scopeName"?S2(ee.scopes):E2(W,ee.scopes)}),A+=1}}g.push(J)}y.push(g),g=[],p=T.ruleStack}return{tokens:y,stateStack:p}}function S2(e){return e.map(t=>({scopeName:t}))}function E2(e,t){const i=[];for(let a=0,o=t.length;a<o;a++){const s=t[a];i[a]={scopeName:s,themeMatches:C2(e,s,t.slice(0,a))}}return i}function C0(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function x2(e,t,i){if(!C0(e[e.length-1],t))return!1;let a=e.length-2,o=i.length-1;for(;a>=0&&o>=0;)C0(e[a],i[o])&&(a-=1),o-=1;return a===-1}function C2(e,t,i){const a=[];for(const{selectors:o,settings:s}of e)for(const c of o)if(x2(c,t,i)){a.push(s);break}return a}function Pv(e,t,i){const a=Object.entries(i.themes).filter(d=>d[1]).map(d=>({color:d[0],theme:d[1]})),o=a.map(d=>{const p=ih(e,t,{...i,theme:d.theme}),g=Ol(p),y=typeof d.theme=="string"?d.theme:d.theme.name;return{tokens:p,state:g,theme:y}}),s=w2(...o.map(d=>d.tokens)),c=s[0].map((d,p)=>d.map((g,y)=>{const v={content:g.content,variants:{},offset:g.offset};return"includeExplanation"in i&&i.includeExplanation&&(v.explanation=g.explanation),s.forEach((b,S)=>{const{content:k,explanation:L,offset:C,...A}=b[p][y];v.variants[a[S].color]=A}),v})),f=o[0].state?new va(Object.fromEntries(o.map(d=>[d.theme,d.state?.getInternalStack(d.theme)])),o[0].state.lang):void 0;return f&&Fs(c,f),c}function w2(...e){const t=e.map(()=>[]),i=e.length;for(let a=0;a<e[0].length;a++){const o=e.map(d=>d[a]),s=t.map(()=>[]);t.forEach((d,p)=>d.push(s[p]));const c=o.map(()=>0),f=o.map(d=>d[0]);for(;f.every(d=>d);){const d=Math.min(...f.map(p=>p.content.length));for(let p=0;p<i;p++){const g=f[p];g.content.length===d?(s[p].push(g),c[p]+=1,f[p]=o[p][c[p]]):(s[p].push({...g,content:g.content.slice(0,d)}),f[p]={...g,content:g.content.slice(d),offset:g.offset+d})}}}return t}function Is(e,t,i){let a,o,s,c,f,d;if("themes"in i){const{defaultColor:p="light",cssVariablePrefix:g="--shiki-",colorsRendering:y="css-vars"}=i,v=Object.entries(i.themes).filter(C=>C[1]).map(C=>({color:C[0],theme:C[1]})).sort((C,A)=>C.color===p?-1:A.color===p?1:0);if(v.length===0)throw new dt("`themes` option must not be empty");const b=Pv(e,t,i);if(d=Ol(b),p&&nh!==p&&!v.find(C=>C.color===p))throw new dt(`\`themes\` option must contain the defaultColor key \`${p}\``);const S=v.map(C=>e.getTheme(C.theme)),k=v.map(C=>C.color);s=b.map(C=>C.map(A=>r2(A,k,g,p,y))),d&&Fs(s,d);const L=v.map(C=>Ns(C.theme,i));o=w0(v,S,L,g,p,"fg",y),a=w0(v,S,L,g,p,"bg",y),c=`shiki-themes ${S.map(C=>C.name).join(" ")}`,f=p?void 0:[o,a].join(";")}else if("theme"in i){const p=Ns(i.theme,i);s=ih(e,t,i);const g=e.getTheme(i.theme);a=Pi(g.bg,p),o=Pi(g.fg,p),c=g.name,d=Ol(s)}else throw new dt("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:o,bg:a,themeName:c,rootStyle:f,grammarState:d}}function w0(e,t,i,a,o,s,c){return e.map((f,d)=>{const p=Pi(t[d][s],i[d])||"inherit",g=`${a+f.color}${s==="bg"?"-bg":""}:${p}`;if(d===0&&o){if(o===nh&&e.length>1){const y=e.findIndex(k=>k.color==="light"),v=e.findIndex(k=>k.color==="dark");if(y===-1||v===-1)throw new dt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const b=Pi(t[y][s],i[y])||"inherit",S=Pi(t[v][s],i[v])||"inherit";return`light-dark(${b}, ${S});${g}`}return p}return c==="css-vars"?g:null}).filter(f=>!!f).join(";")}function zs(e,t,i,a={meta:{},options:i,codeToHast:(o,s)=>zs(e,o,s),codeToTokens:(o,s)=>Is(e,o,s)}){let o=t;for(const S of Ms(i))o=S.preprocess?.call(a,o,i)||o;let{tokens:s,fg:c,bg:f,themeName:d,rootStyle:p,grammarState:g}=Is(e,o,i);const{mergeWhitespaces:y=!0,mergeSameStyleTokens:v=!1}=i;y===!0?s=k2(s):y==="never"&&(s=T2(s)),v&&(s=L2(s));const b={...a,get source(){return o}};for(const S of Ms(i))s=S.tokens?.call(b,s)||s;return A2(s,{...i,fg:c,bg:f,themeName:d,rootStyle:i.rootStyle===!1?!1:i.rootStyle??p},b,g)}function A2(e,t,i,a=Ol(e)){const o=Ms(t),s=[],c={type:"root",children:[]},{structure:f="classic",tabindex:d="0"}=t,p={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?p.style=t.rootStyle:p.style=`background-color:${t.bg};color:${t.fg}`),d!==!1&&d!=null&&(p.tabindex=d.toString());for(const[k,L]of Object.entries(t.meta||{}))k.startsWith("_")||(p[k]=L);let g={type:"element",tagName:"pre",properties:p,children:[],data:t.data},y={type:"element",tagName:"code",properties:{},children:s};const v=[],b={...i,structure:f,addClassToHast:zv,get source(){return i.source},get tokens(){return e},get options(){return t},get root(){return c},get pre(){return g},get code(){return y},get lines(){return v}};if(e.forEach((k,L)=>{L&&(f==="inline"?c.children.push({type:"element",tagName:"br",properties:{},children:[]}):f==="classic"&&s.push({type:"text",value:`
34
+ `}));let C={type:"element",tagName:"span",properties:{class:"line"},children:[]},A=0;for(const T of k){let I={type:"element",tagName:"span",properties:{...T.htmlAttrs},children:[{type:"text",value:T.content}]};const z=Ad(T.htmlStyle||Os(T));z&&(I.properties.style=z);for(const D of o)I=D?.span?.call(b,I,L+1,A,C,T)||I;f==="inline"?c.children.push(I):f==="classic"&&C.children.push(I),A+=T.content.length}if(f==="classic"){for(const T of o)C=T?.line?.call(b,C,L+1)||C;v.push(C),s.push(C)}else f==="inline"&&v.push(C)}),f==="classic"){for(const k of o)y=k?.code?.call(b,y)||y;g.children.push(y);for(const k of o)g=k?.pre?.call(b,g)||g;c.children.push(g)}else if(f==="inline"){const k=[];let L={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const T of c.children)T.type==="element"&&T.tagName==="br"?(k.push(L),L={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(T.type==="element"||T.type==="text")&&L.children.push(T);k.push(L);let A={type:"element",tagName:"code",properties:{},children:k};for(const T of o)A=T?.code?.call(b,A)||A;c.children=[];for(let T=0;T<A.children.length;T++){T>0&&c.children.push({type:"element",tagName:"br",properties:{},children:[]});const I=A.children[T];I.type==="element"&&c.children.push(...I.children)}}let S=c;for(const k of o)S=k?.root?.call(b,S)||S;return a&&Fs(S,a),S}function k2(e){return e.map(t=>{const i=[];let a="",o;return t.forEach((s,c)=>{const d=!(s.fontStyle&&(s.fontStyle&Rt.Underline||s.fontStyle&Rt.Strikethrough));d&&s.content.match(/^\s+$/)&&t[c+1]?(o===void 0&&(o=s.offset),a+=s.content):a?(d?i.push({...s,offset:o,content:a+s.content}):i.push({content:a,offset:o},s),o=void 0,a=""):i.push(s)}),i})}function T2(e){return e.map(t=>t.flatMap(i=>{if(i.content.match(/^\s+$/))return i;const a=i.content.match(/^(\s*)(.*?)(\s*)$/);if(!a)return i;const[,o,s,c]=a;if(!o&&!c)return i;const f=[{...i,offset:i.offset+o.length,content:s}];return o&&f.unshift({content:o,offset:i.offset}),c&&f.push({content:c,offset:i.offset+o.length+s.length}),f}))}function L2(e){return e.map(t=>{const i=[];for(const a of t){if(i.length===0){i.push({...a});continue}const o=i[i.length-1],s=Ad(o.htmlStyle||Os(o)),c=Ad(a.htmlStyle||Os(a)),f=o.fontStyle&&(o.fontStyle&Rt.Underline||o.fontStyle&Rt.Strikethrough),d=a.fontStyle&&(a.fontStyle&Rt.Underline||a.fontStyle&Rt.Strikethrough);!f&&!d&&s===c?o.content+=a.content:i.push({...a})}return i})}const R2=da;function D2(e,t,i){const a={meta:{},options:i,codeToHast:(s,c)=>zs(e,s,c),codeToTokens:(s,c)=>Is(e,s,c)};let o=R2(zs(e,t,i,a));for(const s of Ms(i))o=s.postprocess?.call(a,o,i)||o;return o}const A0={light:"#333333",dark:"#bbbbbb"},k0={light:"#fffffe",dark:"#1e1e1e"},T0="__shiki_resolved";function Ys(e){if(e?.[T0])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:i,fg:a}=t;if(!i||!a){const f=t.settings?t.settings.find(d=>!d.name&&!d.scope):void 0;f?.settings?.foreground&&(a=f.settings.foreground),f?.settings?.background&&(i=f.settings.background),!a&&t?.colors?.["editor.foreground"]&&(a=t.colors["editor.foreground"]),!i&&t?.colors?.["editor.background"]&&(i=t.colors["editor.background"]),a||(a=t.type==="light"?A0.light:A0.dark),i||(i=t.type==="light"?k0.light:k0.dark),t.fg=a,t.bg=i}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let o=0;const s=new Map;function c(f){if(s.has(f))return s.get(f);o+=1;const d=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${d}`]?c(f):(s.set(f,d),d)}t.settings=t.settings.map(f=>{const d=f.settings?.foreground&&!f.settings.foreground.startsWith("#"),p=f.settings?.background&&!f.settings.background.startsWith("#");if(!d&&!p)return f;const g={...f,settings:{...f.settings}};if(d){const y=c(f.settings.foreground);t.colorReplacements[y]=f.settings.foreground,g.settings.foreground=y}if(p){const y=c(f.settings.background);t.colorReplacements[y]=f.settings.background,g.settings.background=y}return g});for(const f of Object.keys(t.colors||{}))if((f==="editor.foreground"||f==="editor.background"||f.startsWith("terminal.ansi"))&&!t.colors[f]?.startsWith("#")){const d=c(t.colors[f]);t.colorReplacements[d]=t.colors[f],t.colors[f]=d}return Object.defineProperty(t,T0,{enumerable:!1,writable:!1,value:!0}),t}async function Bv(e){return Array.from(new Set((await Promise.all(e.filter(t=>!Mv(t)).map(async t=>await Ov(t).then(i=>Array.isArray(i)?i:[i])))).flat()))}async function jv(e){return(await Promise.all(e.map(async i=>Iv(i)?null:Ys(await Ov(i))))).filter(i=>!!i)}let N2=3;function O2(e,t=3){t>N2||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let sa=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Vv(e,t){if(!t)return e;if(t[e]){const i=new Set([e]);for(;t[e];){if(e=t[e],i.has(e))throw new sa(`Circular alias \`${Array.from(i).join(" -> ")} -> ${e}\``);i.add(e)}}return e}class M2 extends Xk{constructor(t,i,a,o={}){super(t),this._resolver=t,this._themes=i,this._langs=a,this._alias=o,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const i=Ys(t);return i.name&&(this._resolvedThemes.set(i.name,i),this._loadedThemesCache=null),i}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let i=this._textmateThemeCache.get(t);i||(i=ks.createFromRawTheme(t),this._textmateThemeCache.set(t,i)),this._syncRegistry.setTheme(i)}getGrammar(t){return t=Vv(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const i=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const a={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const o=this.loadGrammarWithConfiguration(t.scopeName,1,a);if(o.name=t.name,this._resolvedGrammars.set(t.name,o),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,i.size)for(const s of i)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const o of t)this.resolveEmbeddedLanguages(o);const i=Array.from(this._langGraph.entries()),a=i.filter(([o,s])=>!s);if(a.length){const o=i.filter(([s,c])=>c?(c.embeddedLanguages||c.embeddedLangs)?.some(d=>a.map(([p])=>p).includes(d)):!1).filter(s=>!a.includes(s));throw new sa(`Missing languages ${a.map(([s])=>`\`${s}\``).join(", ")}, required by ${o.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[o,s]of i)this._resolver.addLanguage(s);for(const[o,s]of i)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const i=t.embeddedLanguages??t.embeddedLangs;if(i)for(const a of i)this._langGraph.set(a,this._langMap.get(a))}}class I2{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,i){this._onigLib={createOnigScanner:a=>t.createScanner(a),createOnigString:a=>t.createString(a)},i.forEach(a=>this.addLanguage(a))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(i=>{this._langs.set(i,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(i=>{this._injections.get(i)||this._injections.set(i,[]),this._injections.get(i).push(t.scopeName)})}getInjections(t){const i=t.split(".");let a=[];for(let o=1;o<=i.length;o++){const s=i.slice(0,o).join(".");a=[...a,...this._injections.get(s)||[]]}return a}}let _l=0;function z2(e){_l+=1,e.warnings!==!1&&_l>=10&&_l%10===0&&console.warn(`[Shiki] ${_l} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new sa("`engine` option is required for synchronous mode");const i=(e.langs||[]).flat(1),a=(e.themes||[]).flat(1).map(Ys),o=new I2(e.engine,i),s=new M2(o,a,i,e.langAlias);let c;function f(T){return Vv(T,e.langAlias)}function d(T){C();const I=s.getGrammar(typeof T=="string"?T:T.name);if(!I)throw new sa(`Language \`${T}\` not found, you may need to load it first`);return I}function p(T){if(T==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};C();const I=s.getTheme(T);if(!I)throw new sa(`Theme \`${T}\` not found, you may need to load it first`);return I}function g(T){C();const I=p(T);c!==T&&(s.setTheme(I),c=T);const z=s.getColorMap();return{theme:I,colorMap:z}}function y(){return C(),s.getLoadedThemes()}function v(){return C(),s.getLoadedLanguages()}function b(...T){C(),s.loadLanguages(T.flat(1))}async function S(...T){return b(await Bv(T))}function k(...T){C();for(const I of T.flat(1))s.loadTheme(I)}async function L(...T){return C(),k(await jv(T))}function C(){if(t)throw new sa("Shiki instance has been disposed")}function A(){t||(t=!0,s.dispose(),_l-=1)}return{setTheme:g,getTheme:p,getLanguage:d,getLoadedThemes:y,getLoadedLanguages:v,resolveLangAlias:f,loadLanguage:S,loadLanguageSync:b,loadTheme:L,loadThemeSync:k,dispose:A,[Symbol.dispose]:A}}async function U2(e){e.engine||O2("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,i,a]=await Promise.all([jv(e.themes||[]),Bv(e.langs||[]),e.engine]);return z2({...e,themes:t,langs:i,engine:a})}async function H2(e){const t=await U2(e);return{getLastGrammarState:(...i)=>v2(t,...i),codeToTokensBase:(i,a)=>ih(t,i,a),codeToTokensWithThemes:(i,a)=>Pv(t,i,a),codeToTokens:(i,a)=>Is(t,i,a),codeToHast:(i,a)=>zs(t,i,a),codeToHtml:(i,a)=>D2(t,i,a),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function P2(e){const t=e.langs,i=e.themes,a=e.engine;async function o(s){function c(y){if(typeof y=="string"){if(y=s.langAlias?.[y]||y,Mv(y))return[];const v=t[y];if(!v)throw new dt(`Language \`${y}\` is not included in this bundle. You may want to load it from external source.`);return v}return y}function f(y){if(Iv(y))return"none";if(typeof y=="string"){const v=i[y];if(!v)throw new dt(`Theme \`${y}\` is not included in this bundle. You may want to load it from external source.`);return v}return y}const d=(s.themes??[]).map(y=>f(y)),p=(s.langs??[]).map(y=>c(y)),g=await H2({engine:s.engine??a(),...s,themes:d,langs:p});return{...g,loadLanguage(...y){return g.loadLanguage(...y.map(c))},loadTheme(...y){return g.loadTheme(...y.map(f))},getBundledLanguages(){return t},getBundledThemes(){return i}}}return o}function B2(e){let t;async function i(a={}){if(t){const o=await t;return await Promise.all([o.loadTheme(...a.themes||[]),o.loadLanguage(...a.langs||[])]),o}else{t=e({...a,themes:[],langs:[]});const o=await t;return await Promise.all([o.loadTheme(...a.themes||[]),o.loadLanguage(...a.langs||[])]),o}}return i}function j2(e,t){const i=B2(e);async function a(o,s){const c=await i({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),f=await t?.guessEmbeddedLanguages?.(o,s.lang,c);return f&&await c.loadLanguage(...f),c}return{getSingletonHighlighter(o){return i(o)},async codeToHtml(o,s){return(await a(o,s)).codeToHtml(o,s)},async codeToHast(o,s){return(await a(o,s)).codeToHast(o,s)},async codeToTokens(o,s){return(await a(o,s)).codeToTokens(o,s)},async codeToTokensBase(o,s){return(await a(o,s)).codeToTokensBase(o,s)},async codeToTokensWithThemes(o,s){return(await a(o,s)).codeToTokensWithThemes(o,s)},async getLastGrammarState(o,s){return(await i({langs:[s.lang],themes:[s.theme]})).getLastGrammarState(o,s)}}}const Gv=[{id:"abap",name:"ABAP",import:(()=>x(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>x(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>x(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>x(()=>import("./angular-html-CU67Zn6k.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>x(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>x(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>x(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>x(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>x(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>x(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>x(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>x(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>x(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>x(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>x(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>x(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>x(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>x(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>x(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>x(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>x(()=>import("./bird2-DPOp833l.js"),[]))},{id:"blade",name:"Blade",import:(()=>x(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>x(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>x(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>x(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>x(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>x(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>x(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>x(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>x(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>x(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>x(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>x(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>x(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>x(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>x(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>x(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>x(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>x(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>x(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>x(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>x(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>x(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>x(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>x(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>x(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>x(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>x(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>x(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>x(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>x(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>x(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>x(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>x(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>x(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>x(()=>import("./erb-B12qg9BL.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>x(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>x(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>x(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>x(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>x(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>x(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>x(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>x(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>x(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>x(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>x(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>x(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>x(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>x(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>x(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>x(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>x(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>x(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>x(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>x(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>x(()=>import("./go-CxLEBnE3.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>x(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>x(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>x(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>x(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>x(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>x(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>x(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>x(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>x(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>x(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>x(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>x(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>x(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>x(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>x(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>x(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>x(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>x(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>x(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>x(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>x(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>x(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>x(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>x(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>x(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>x(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>x(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>x(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>x(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>x(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>x(()=>import("./just-Cw27pwNe.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>x(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>x(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>x(()=>import("./kusto-DZf3V79B.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>x(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>x(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>x(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>x(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>x(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>x(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>x(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>x(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>x(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>x(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>x(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>x(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>x(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>x(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>x(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>x(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>x(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>x(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>x(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>x(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>x(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>x(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>x(()=>import("./nextflow-groovy-BeH2EWoN.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>x(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>x(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>x(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>x(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>x(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>x(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>x(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>x(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>x(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>x(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>x(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>x(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>x(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>x(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>x(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>x(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>x(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>x(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>x(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>x(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>x(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>x(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>x(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>x(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>x(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>x(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>x(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>x(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>x(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>x(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>x(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>x(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>x(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>x(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>x(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>x(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>x(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>x(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>x(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>x(()=>import("./rst-BrH8l1NY.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>x(()=>import("./ruby-Dw2BHqvy.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>x(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>x(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>x(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>x(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>x(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>x(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>x(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>x(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>x(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>x(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>x(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>x(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>x(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>x(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>x(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>x(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>x(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>x(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>x(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>x(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>x(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>x(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>x(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>x(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>x(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>x(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>x(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>x(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>x(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>x(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>x(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>x(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>x(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>x(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>x(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>x(()=>import("./twig-DNn4PbVi.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>x(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>x(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>x(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>x(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>x(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>x(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>x(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>x(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>x(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>x(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>x(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>x(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>x(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>x(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>x(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>x(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>x(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>x(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>x(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>x(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>x(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>x(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>x(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>x(()=>import("./zig-VOosw3JB.js"),[]))}],V2=Object.fromEntries(Gv.map(e=>[e.id,e.import])),G2=Object.fromEntries(Gv.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),kd={...V2,...G2},$2=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>x(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>x(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>x(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>x(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>x(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>x(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>x(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>x(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>x(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>x(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>x(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>x(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>x(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>x(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>x(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>x(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>x(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>x(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>x(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>x(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>x(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>x(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>x(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>x(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>x(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>x(()=>import("./horizon-bright-Cn-bp-IR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>x(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>x(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>x(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>x(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>x(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>x(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>x(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>x(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>x(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>x(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>x(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>x(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>x(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>x(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>x(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>x(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>x(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>x(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>x(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>x(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>x(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>x(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>x(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>x(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>x(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>x(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>x(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>x(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>x(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>x(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>x(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>x(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>x(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>x(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>x(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>x(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],$v=Object.fromEntries($2.map(e=>[e.id,e.import]));class ah extends Error{constructor(t){super(t),this.name="ShikiError"}}function q2(){return 2147483648}function F2(){return typeof performance<"u"?performance.now():Date.now()}const Y2=(e,t)=>e+(t-e%t)%t;async function X2(e){let t,i;const a={};function o(b){i=b,a.HEAPU8=new Uint8Array(b),a.HEAPU32=new Uint32Array(b)}function s(b,S,k){a.HEAPU8.copyWithin(b,S,S+k)}function c(b){try{return t.grow(b-i.byteLength+65535>>>16),o(t.buffer),1}catch{}}function f(b){const S=a.HEAPU8.length;b=b>>>0;const k=q2();if(b>k)return!1;for(let L=1;L<=4;L*=2){let C=S*(1+.2/L);C=Math.min(C,b+100663296);const A=Math.min(k,Y2(Math.max(b,C),65536));if(c(A))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function p(b,S,k=1024){const L=S+k;let C=S;for(;b[C]&&!(C>=L);)++C;if(C-S>16&&b.buffer&&d)return d.decode(b.subarray(S,C));let A="";for(;S<C;){let T=b[S++];if(!(T&128)){A+=String.fromCharCode(T);continue}const I=b[S++]&63;if((T&224)===192){A+=String.fromCharCode((T&31)<<6|I);continue}const z=b[S++]&63;if((T&240)===224?T=(T&15)<<12|I<<6|z:T=(T&7)<<18|I<<12|z<<6|b[S++]&63,T<65536)A+=String.fromCharCode(T);else{const D=T-65536;A+=String.fromCharCode(55296|D>>10,56320|D&1023)}}return A}function g(b,S){return b?p(a.HEAPU8,b,S):""}const y={emscripten_get_now:F2,emscripten_memcpy_big:s,emscripten_resize_heap:f,fd_write:()=>0};async function v(){const S=await e({env:y,wasi_snapshot_preview1:y});t=S.memory,o(t.buffer),Object.assign(a,S),a.UTF8ToString=g}return await v(),a}var Q2=Object.defineProperty,Z2=(e,t,i)=>t in e?Q2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,mt=(e,t,i)=>Z2(e,typeof t!="symbol"?t+"":t,i);let _t=null;function K2(e){throw new ah(e.UTF8ToString(e.getLastOnigError()))}class Xs{constructor(t){mt(this,"utf16Length"),mt(this,"utf8Length"),mt(this,"utf16Value"),mt(this,"utf8Value"),mt(this,"utf16OffsetToUtf8"),mt(this,"utf8OffsetToUtf16");const i=t.length,a=Xs._utf8ByteLength(t),o=a!==i,s=o?new Uint32Array(i+1):null;o&&(s[i]=a);const c=o?new Uint32Array(a+1):null;o&&(c[a]=i);const f=new Uint8Array(a);let d=0;for(let p=0;p<i;p++){const g=t.charCodeAt(p);let y=g,v=!1;if(g>=55296&&g<=56319&&p+1<i){const b=t.charCodeAt(p+1);b>=56320&&b<=57343&&(y=(g-55296<<10)+65536|b-56320,v=!0)}o&&(s[p]=d,v&&(s[p+1]=d),y<=127?c[d+0]=p:y<=2047?(c[d+0]=p,c[d+1]=p):y<=65535?(c[d+0]=p,c[d+1]=p,c[d+2]=p):(c[d+0]=p,c[d+1]=p,c[d+2]=p,c[d+3]=p)),y<=127?f[d++]=y:y<=2047?(f[d++]=192|(y&1984)>>>6,f[d++]=128|(y&63)>>>0):y<=65535?(f[d++]=224|(y&61440)>>>12,f[d++]=128|(y&4032)>>>6,f[d++]=128|(y&63)>>>0):(f[d++]=240|(y&1835008)>>>18,f[d++]=128|(y&258048)>>>12,f[d++]=128|(y&4032)>>>6,f[d++]=128|(y&63)>>>0),v&&p++}this.utf16Length=i,this.utf8Length=a,this.utf16Value=t,this.utf8Value=f,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=c}static _utf8ByteLength(t){let i=0;for(let a=0,o=t.length;a<o;a++){const s=t.charCodeAt(a);let c=s,f=!1;if(s>=55296&&s<=56319&&a+1<o){const d=t.charCodeAt(a+1);d>=56320&&d<=57343&&(c=(s-55296<<10)+65536|d-56320,f=!0)}c<=127?i+=1:c<=2047?i+=2:c<=65535?i+=3:i+=4,f&&a++}return i}createString(t){const i=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,i),i}}const Qs=class In{constructor(t){if(mt(this,"id",++In.LAST_ID),mt(this,"_onigBinding"),mt(this,"content"),mt(this,"utf16Length"),mt(this,"utf8Length"),mt(this,"utf16OffsetToUtf8"),mt(this,"utf8OffsetToUtf16"),mt(this,"ptr"),!_t)throw new ah("Must invoke loadWasm first.");this._onigBinding=_t,this.content=t;const i=new Xs(t);this.utf16Length=i.utf16Length,this.utf8Length=i.utf8Length,this.utf16OffsetToUtf8=i.utf16OffsetToUtf8,this.utf8OffsetToUtf16=i.utf8OffsetToUtf16,this.utf8Length<1e4&&!In._sharedPtrInUse?(In._sharedPtr||(In._sharedPtr=_t.omalloc(1e4)),In._sharedPtrInUse=!0,_t.HEAPU8.set(i.utf8Value,In._sharedPtr),this.ptr=In._sharedPtr):this.ptr=i.createString(_t)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===In._sharedPtr?In._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};mt(Qs,"LAST_ID",0);mt(Qs,"_sharedPtr",0);mt(Qs,"_sharedPtrInUse",!1);let qv=Qs;class W2{constructor(t){if(mt(this,"_onigBinding"),mt(this,"_ptr"),!_t)throw new ah("Must invoke loadWasm first.");const i=[],a=[];for(let f=0,d=t.length;f<d;f++){const p=new Xs(t[f]);i[f]=p.createString(_t),a[f]=p.utf8Length}const o=_t.omalloc(4*t.length);_t.HEAPU32.set(i,o/4);const s=_t.omalloc(4*t.length);_t.HEAPU32.set(a,s/4);const c=_t.createOnigScanner(o,s,t.length);for(let f=0,d=t.length;f<d;f++)_t.ofree(i[f]);_t.ofree(s),_t.ofree(o),c===0&&K2(_t),this._onigBinding=_t,this._ptr=c}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,i,a){let o=0;if(typeof a=="number"&&(o=a),typeof t=="string"){t=new qv(t);const s=this._findNextMatchSync(t,i,!1,o);return t.dispose(),s}return this._findNextMatchSync(t,i,!1,o)}_findNextMatchSync(t,i,a,o){const s=this._onigBinding,c=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(i),o);if(c===0)return null;const f=s.HEAPU32;let d=c/4;const p=f[d++],g=f[d++],y=[];for(let v=0;v<g;v++){const b=t.convertUtf8OffsetToUtf16(f[d++]),S=t.convertUtf8OffsetToUtf16(f[d++]);y[v]={start:b,end:S,length:S-b}}return{index:p,captureIndices:y}}}function J2(e){return typeof e.instantiator=="function"}function eL(e){return typeof e.default=="function"}function tL(e){return typeof e.data<"u"}function nL(e){return typeof Response<"u"&&e instanceof Response}function iL(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let fs;function rL(e){if(fs)return fs;async function t(){_t=await X2(async i=>{let a=e;return a=await a,typeof a=="function"&&(a=await a(i)),typeof a=="function"&&(a=await a(i)),J2(a)?a=await a.instantiator(i):eL(a)?a=await a.default(i):(tL(a)&&(a=a.data),nL(a)?typeof WebAssembly.instantiateStreaming=="function"?a=await aL(a)(i):a=await lL(a)(i):iL(a)?a=await Gf(a)(i):a instanceof WebAssembly.Module?a=await Gf(a)(i):"default"in a&&a.default instanceof WebAssembly.Module&&(a=await Gf(a.default)(i))),"instance"in a&&(a=a.instance),"exports"in a&&(a=a.exports),a})}return fs=t(),fs}function Gf(e){return t=>WebAssembly.instantiate(e,t)}function aL(e){return t=>WebAssembly.instantiateStreaming(e,t)}function lL(e){return async t=>{const i=await e.arrayBuffer();return WebAssembly.instantiate(i,t)}}async function Fv(e){return e&&await rL(e),{createScanner(t){return new W2(t.map(i=>typeof i=="string"?i:i.source))},createString(t){return new qv(t)}}}const Yv=P2({langs:kd,themes:$v,engine:()=>Fv(x(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:L0}=j2(Yv,{guessEmbeddedLanguages:e2});function _a(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function oL(e,t,i){return e.has(t)||e.set(t,i),e.get(t)}const lh=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),St=String.raw;function Sa(e,t){if(e==null)throw new Error(t??"Value expected");return e}const Xv=St`\[\^?`,Qv=`c.? | C(?:-.?)?|${St`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${St`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${St`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${St`o\{[^\}]*\}?`}|${St`\d{1,3}`}`,oh=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,ds=new RegExp(St`
35
35
  \\ (?:
36
- ${Xv}
36
+ ${Qv}
37
37
  | [gk]<[^>]*>?
38
38
  | [gk]'[^']*'?
39
39
  | .
@@ -50,20 +50,20 @@ Error generating stack: `+u.message+`
50
50
  )?
51
51
  | \*[^\)]*\)?
52
52
  )?
53
- | (?:${lh.source})+
54
- | ${Yv}
53
+ | (?:${oh.source})+
54
+ | ${Xv}
55
55
  | .
56
- `.replace(/\s+/g,""),"gsu"),Gf=new RegExp(St`
56
+ `.replace(/\s+/g,""),"gsu"),$f=new RegExp(St`
57
57
  \\ (?:
58
- ${Xv}
58
+ ${Qv}
59
59
  | .
60
60
  )
61
61
  | \[:(?:\^?\p{Alpha}+|\^):\]
62
- | ${Yv}
62
+ | ${Xv}
63
63
  | &&
64
64
  | .
65
- `.replace(/\s+/g,""),"gsu");function aL(e,t={}){const i={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const a=CL(i.flags),o=[a.extended],s={captureGroup:i.rules.captureGroup,getCurrentModX(){return o.at(-1)},numOpenGroups:0,popModX(){o.pop()},pushModX(y){o.push(y)},replaceCurrentModX(y){o[o.length-1]=y},singleline:i.rules.singleline};let c=[],f;for(ds.lastIndex=0;f=ds.exec(e);){const y=lL(s,e,f[0],ds.lastIndex);y.tokens?c.push(...y.tokens):y.token&&c.push(y.token),y.lastIndex!==void 0&&(ds.lastIndex=y.lastIndex)}const d=[];let p=0;c.filter(y=>y.type==="GroupOpen").forEach(y=>{y.kind==="capturing"?y.number=++p:y.raw==="("&&d.push(y)}),p||d.forEach((y,b)=>{y.kind="capturing",y.number=b+1});const g=p||d.length;return{tokens:c.map(y=>y.type==="EscapedNumber"?AL(y,g):y).flat(),flags:a}}function lL(e,t,i,a){const[o,s]=i;if(i==="["||i==="[^"){const c=oL(t,i,a);return{tokens:c.tokens,lastIndex:c.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(s))return{token:R0(i,i)};if(/^\\g[<']/.test(i)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(i))throw new Error(`Invalid group name "${i}"`);return{token:yL(i)}}if(/^\\k[<']/.test(i)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(i))throw new Error(`Invalid group name "${i}"`);return{token:Zv(i)}}if(s==="K")return{token:Kv("keep",i)};if(s==="N"||s==="R")return{token:ar("newline",i,{negate:s==="N"})};if(s==="O")return{token:ar("any",i)};if(s==="X")return{token:ar("text_segment",i)};const c=Qv(i,{inCharClass:!1});return Array.isArray(c)?{tokens:c}:{token:c}}if(o==="("){if(s==="*")return{token:SL(i)};if(i==="(?{")throw new Error(`Unsupported callout "${i}"`);if(i.startsWith("(?#")){if(t[a]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:a+1}}if(/^\(\?[-imx]+[:)]$/.test(i))return{token:_L(i,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,i==="("&&!e.captureGroup||i==="(?:")return{token:ia("group",i)};if(i==="(?>")return{token:ia("atomic",i)};if(i==="(?="||i==="(?!"||i==="(?<="||i==="(?<!")return{token:ia(i[2]==="<"?"lookbehind":"lookahead",i,{negate:i.endsWith("!")})};if(i==="("&&e.captureGroup||i.startsWith("(?<")&&i.endsWith(">")||i.startsWith("(?'")&&i.endsWith("'"))return{token:ia("capturing",i,{...i!=="("&&{name:i.slice(3,-1)}})};if(i.startsWith("(?~")){if(i==="(?~|")throw new Error(`Unsupported absence function kind "${i}"`);return{token:ia("absence_repeater",i)}}throw i==="(?("?new Error(`Unsupported conditional "${i}"`):new Error(`Invalid or unsupported group option "${i}"`)}if(i===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:pL(i)}}if(e.getCurrentModX()){if(i==="#"){const c=t.indexOf(`
66
- `,a);return{lastIndex:c===-1?t.length:c}}if(/^\s$/.test(i)){const c=/\s+/y;return c.lastIndex=a,{lastIndex:c.exec(t)?c.lastIndex:a}}}if(i===".")return{token:ar("dot",i)};if(i==="^"||i==="$"){const c=e.singleline?{"^":St`\A`,$:St`\Z`}[i]:i;return{token:R0(c,i)}}return i==="|"?{token:uL(i)}:lh.test(i)?{tokens:kL(i)}:{token:ai(ya(i),i)}}function oL(e,t,i){const a=[D0(t[1]==="^",t)];let o=1,s;for(Gf.lastIndex=i;s=Gf.exec(e);){const c=s[0];if(c[0]==="["&&c[1]!==":")o++,a.push(D0(c[1]==="^",c));else if(c==="]"){if(a.at(-1).type==="CharacterClassOpen")a.push(ai(93,c));else if(o--,a.push(cL(c)),!o)break}else{const f=sL(c);Array.isArray(f)?a.push(...f):a.push(f)}}return{tokens:a,lastIndex:Gf.lastIndex||e.length}}function sL(e){if(e[0]==="\\")return Qv(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!ah.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return ar("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?fL(e):e==="&&"?dL(e):ai(ya(e),e)}function Qv(e,{inCharClass:t}){const i=e[1];if(i==="c"||i==="C")return vL(e);if("dDhHsSwW".includes(i))return EL(e);if(e.startsWith(St`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return xL(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const a=e.split(/\\x/).slice(1).map(c=>parseInt(c,16)),o=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(a)),s=new TextEncoder;return[...o].map(c=>{const f=[...s.encode(c)].map(d=>`\\x${d.toString(16)}`).join("");return ai(ya(c),f)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(i==="u"||i==="x")return ai(wL(e),e);if(O0.has(i))return ai(O0.get(i),e);if(/\d/.test(i))return hL(t,e);if(e==="\\")throw new Error(St`Incomplete escape "\"`);if(i==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return ai(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function uL(e){return{type:"Alternator",raw:e}}function R0(e,t){return{type:"Assertion",kind:e,raw:t}}function Zv(e){return{type:"Backreference",raw:e}}function ai(e,t){return{type:"Character",value:e,raw:t}}function cL(e){return{type:"CharacterClassClose",raw:e}}function fL(e){return{type:"CharacterClassHyphen",raw:e}}function dL(e){return{type:"CharacterClassIntersector",raw:e}}function D0(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function ar(e,t,i={}){return{type:"CharacterSet",kind:e,...i,raw:t}}function Kv(e,t,i={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:ba(i.flags),raw:t}}function hL(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function pL(e){return{type:"GroupClose",raw:e}}function ia(e,t,i={}){return{type:"GroupOpen",kind:e,...i,raw:t}}function mL(e,t,i,a){return{type:"NamedCallout",kind:e,tag:t,arguments:i,raw:a}}function gL(e,t,i,a){return{type:"Quantifier",kind:e,min:t,max:i,raw:a}}function yL(e){return{type:"Subroutine",raw:e}}const bL=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),O0=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function vL(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return ai(ya(t.toUpperCase())-64,e)}function _L(e,t){let{on:i,off:a}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;a??="";const o=(t.getCurrentModX()||i.includes("x"))&&!a.includes("x"),s=M0(i),c=M0(a),f={};if(s&&(f.enable=s),c&&(f.disable=c),e.endsWith(")"))return t.replaceCurrentModX(o),Kv("flags",e,{flags:f});if(e.endsWith(":"))return t.pushModX(o),t.numOpenGroups++,ia("group",e,{...(s||c)&&{flags:f}});throw new Error(`Unexpected flag modifier "${e}"`)}function SL(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:i,tag:a,args:o}=t.groups;if(!i)throw new Error(`Invalid named callout "${e}"`);if(a==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const s=o?o.split(",").filter(g=>g!=="").map(g=>/^[+-]?\d+$/.test(g)?+g:g):[],[c,f,d]=s,p=bL.has(i)?i.toLowerCase():"custom";switch(p){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof c=="string")throw new Error(`Named callout argument must be a number "${c}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument one must be a tag or number "${c}"`);if(s.length===2&&(typeof f=="number"||!/^[<>X]$/.test(f)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${f}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof c=="number"||!/^[<>X]$/.test(c)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${c}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument one must be a tag or number "${c}"`);if(typeof f=="number"||!/^(?:[<>!=]=|[<>])$/.test(f))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${f}"`);if(typeof d=="string"&&!/^[A-Za-z_]\w*$/.test(d))throw new Error(`Named callout argument three must be a tag or number "${d}"`);break;case"custom":throw new Error(`Undefined callout name "${i}"`);default:throw new Error(`Unexpected named callout kind "${p}"`)}return mL(p,a??null,o?.split(",")??null,e)}function N0(e){let t=null,i,a;if(e[0]==="{"){const{minStr:o,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,c=1e5;if(+o>c||s&&+s>c)throw new Error("Quantifier value unsupported in Oniguruma");if(i=+o,a=s===void 0?+o:s===""?1/0:+s,i>a&&(t="possessive",[i,a]=[a,i]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else i=e[0]==="+"?1:0,a=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return gL(t,i,a,e)}function EL(e){const t=e[1].toLowerCase();return ar({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function xL(e){const{p:t,neg:i,value:a}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return ar("property",e,{value:a,negate:t==="P"&&!i||t==="p"&&!!i})}function M0(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function CL(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let i=0;i<e.length;i++){const a=e[i];if(!"imxDPSWy".includes(a))throw new Error(`Invalid flag "${a}"`);if(a==="y"){if(!/^y{[gw]}/.test(e.slice(i)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[i+2]==="g"?"grapheme":"word",i+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[a]]=!0}return t}function wL(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function AL(e,t){const{raw:i,inCharClass:a}=e,o=i.slice(1);if(!a&&(o!=="0"&&o.length===1||o[0]!=="0"&&+o<=t))return[Zv(i)];const s=[],c=o.match(/^[0-7]+|\d/g);for(let f=0;f<c.length;f++){const d=c[f];let p;if(f===0&&d!=="8"&&d!=="9"){if(p=parseInt(d,8),p>127)throw new Error(St`Octal encoded byte above 177 unsupported "${i}"`)}else p=ya(d);s.push(ai(p,(f===0?"\\":"")+d))}return s}function kL(e){const t=[],i=new RegExp(lh,"gy");let a;for(;a=i.exec(e);){const o=a[0];if(o[0]==="{"){const s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(o);if(s){const{min:c,max:f}=s.groups;if(+c>+f&&o.endsWith("?")){i.lastIndex--,t.push(N0(o.slice(0,-1)));continue}}}t.push(N0(o))}return t}function Wv(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const i=e.body[0];return!t||Object.keys(t).every(a=>t[a]===i[a])}function TL(e){return LL.has(e.type)}const LL=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Jv(e,t={}){const i={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},a=aL(e,{flags:i.flags,rules:{captureGroup:i.rules.captureGroup,singleline:i.rules.singleline}}),o=(b,v)=>{const S=a.tokens[s.nextIndex];switch(s.parent=b,s.nextIndex++,S.type){case"Alternator":return or();case"Assertion":return RL(S);case"Backreference":return DL(S,s);case"Character":return Zs(S.value,{useLastValid:!!v.isCheckingRangeEnd});case"CharacterClassHyphen":return OL(S,s,v);case"CharacterClassOpen":return NL(S,s,v);case"CharacterSet":return ML(S,s);case"Directive":return BL(S.kind,{flags:S.flags});case"GroupOpen":return IL(S,s,v);case"NamedCallout":return VL(S.kind,S.tag,S.arguments);case"Quantifier":return zL(S,s);case"Subroutine":return UL(S,s);default:throw new Error(`Unexpected token type "${S.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:i.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:i.skipBackrefValidation,skipLookbehindValidation:i.skipLookbehindValidation,skipPropertyNameValidation:i.skipPropertyNameValidation,subroutines:[],tokens:a.tokens,unicodePropertyMap:i.unicodePropertyMap,walk:o},c=$L(jL(a.flags));let f=c.body[0];for(;s.nextIndex<a.tokens.length;){const b=o(f,{});b.type==="Alternative"?(c.body.push(b),f=b):f.body.push(b)}const{capturingGroups:d,hasNumberedRef:p,namedGroupsByName:g,subroutines:y}=s;if(p&&g.size&&!i.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:b}of y)if(typeof b=="number"){if(b>d.length)throw new Error("Subroutine uses a group number that's not defined");b&&(d[b-1].isSubroutined=!0)}else if(g.has(b)){if(g.get(b).length>1)throw new Error(St`Subroutine uses a duplicate group name "\g<${b}>"`);g.get(b)[0].isSubroutined=!0}else throw new Error(St`Subroutine uses a group name that's not defined "\g<${b}>"`);return c}function RL({kind:e}){return kd(ba({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===St`\B`||e===St`\Y`})}function DL({raw:e},t){const i=/^\\k[<']/.test(e),a=i?e.slice(3,-1):e.slice(1),o=(s,c=!1)=>{const f=t.capturingGroups.length;let d=!1;if(s>f)if(t.skipBackrefValidation)d=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,Td(c?f+1-s:s,{orphan:d})};if(i){const s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(a);if(s)return o(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(a))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(a))throw new Error(`Group name not defined to the left "${e}"`);return Td(a)}return o(+a)}function OL(e,t,i){const{tokens:a,walk:o}=t,s=t.parent,c=s.body.at(-1),f=a[t.nextIndex];if(!i.isCheckingRangeEnd&&c&&c.type!=="CharacterClass"&&c.type!=="CharacterClassRange"&&f&&f.type!=="CharacterClassOpen"&&f.type!=="CharacterClassClose"&&f.type!=="CharacterClassIntersector"){const d=o(s,{...i,isCheckingRangeEnd:!0});if(c.type==="Character"&&d.type==="Character")return s.body.pop(),PL(c,d);throw new Error("Invalid character class range")}return Zs(ya("-"))}function NL({negate:e},t,i){const{tokens:a,walk:o}=t,s=a[t.nextIndex],c=[xs()];let f=U0(s);for(;f.type!=="CharacterClassClose";){if(f.type==="CharacterClassIntersector")c.push(xs()),t.nextIndex++;else{const p=c.at(-1);p.body.push(o(p,i))}f=U0(a[t.nextIndex],s)}const d=xs({negate:e});return c.length===1?d.body=c[0].body:(d.kind="intersection",d.body=c.map(p=>p.body.length===1?p.body[0]:p)),t.nextIndex++,d}function ML({kind:e,negate:t,value:i},a){const{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:c}=a;if(e==="property"){const f=Ks(i);if(ah.has(f)&&!c?.has(f))e="posix",i=f;else return ra(i,{negate:t,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:c})}return e==="posix"?GL(i,{negate:t}):Ld(e,{negate:t})}function IL(e,t,i){const{tokens:a,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:c,walk:f}=t,d=qL(e),p=d.type==="AbsenceFunction",g=z0(d),y=g&&d.negate;if(d.type==="CapturingGroup"&&(o.push(d),d.name&&rL(s,d.name,[]).push(d)),p&&i.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let b=H0(a[t.nextIndex]);for(;b.type!=="GroupClose";){if(b.type==="Alternator")d.body.push(or()),t.nextIndex++;else{const v=d.body.at(-1),S=f(v,{...i,isInAbsenceFunction:i.isInAbsenceFunction||p,isInLookbehind:i.isInLookbehind||g,isInNegLookbehind:i.isInNegLookbehind||y});if(v.body.push(S),(g||i.isInLookbehind)&&!c){const T="Lookbehind includes a pattern not allowed by Oniguruma";if(y||i.isInNegLookbehind){if(I0(S)||S.type==="CapturingGroup")throw new Error(T)}else if(I0(S)||z0(S)&&S.negate)throw new Error(T)}}b=H0(a[t.nextIndex])}return t.nextIndex++,d}function zL({kind:e,min:t,max:i},a){const o=a.parent,s=o.body.at(-1);if(!s||!TL(s))throw new Error("Quantifier requires a repeatable token");const c=t1(e,t,i,s);return o.body.pop(),c}function UL({raw:e},t){const{capturingGroups:i,subroutines:a}=t;let o=e.slice(3,-1);const s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);if(s){const f=+s.groups.num,d=i.length;if(t.hasNumberedRef=!0,o={"":f,"+":d+f,"-":d+1-f}[s.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);const c=n1(o);return a.push(c),c}function HL(e,t){return{type:"AbsenceFunction",kind:e,body:Pl(t?.body)}}function or(e){return{type:"Alternative",body:i1(e?.body)}}function kd(e,t){const i={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(i.negate=!!t?.negate),i}function Td(e,t){const i=!!t?.orphan;return{type:"Backreference",ref:e,...i&&{orphan:i}}}function e1(e,t){const i={name:void 0,isSubroutined:!1,...t};if(i.name!==void 0&&!FL(i.name))throw new Error(`Group name "${i.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...i.name&&{name:i.name},...i.isSubroutined&&{isSubroutined:i.isSubroutined},body:Pl(t?.body)}}function Zs(e,t){const i={useLastValid:!1,...t};if(e>1114111){const a=e.toString(16);if(i.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${a}}"`):new Error(`Invalid code point out of range in JS "\\x{${a}}"`)}return{type:"Character",value:e}}function xs(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:i1(e?.body)}}function PL(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function Ld(e,t){const i=!!t?.negate,a={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(a.negate=i),(e==="text_segment"||e==="newline"&&!i)&&(a.variableLength=!0),a}function BL(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:ba(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function jL(e){return{type:"Flags",...e}}function En(e){const t=e?.atomic,i=e?.flags;if(t&&i)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...i&&{flags:i},body:Pl(e?.body)}}function ir(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Pl(e?.body)}}function VL(e,t,i){return{type:"NamedCallout",kind:e,tag:t,arguments:i}}function GL(e,t){const i=!!t?.negate;if(!ah.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:i}}function t1(e,t,i,a){if(t>i)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:i,body:a}}function $L(e,t){return{type:"Regex",body:Pl(t?.body),flags:e}}function n1(e){return{type:"Subroutine",ref:e}}function ra(e,t){const i={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let a=i.unicodePropertyMap?.get(Ks(e));if(!a){if(i.normalizeUnknownPropertyNames)a=YL(e);else if(i.unicodePropertyMap&&!i.skipPropertyNameValidation)throw new Error(St`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:a??e,negate:i.negate}}function qL({flags:e,kind:t,name:i,negate:a,number:o}){switch(t){case"absence_repeater":return HL("repeater");case"atomic":return En({atomic:!0});case"capturing":return e1(o,{name:i});case"group":return En({flags:e});case"lookahead":case"lookbehind":return ir({behind:t==="lookbehind",negate:a});default:throw new Error(`Unexpected group kind "${t}"`)}}function Pl(e){if(e===void 0)e=[or()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function i1(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function I0(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function z0(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function FL(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function YL(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function Ks(e){return e.replace(/[- _]+/g,"").toLowerCase()}function U0(e,t){return ba(e,`${t?.type==="Character"&&t.value===93?"Empty":"Unclosed"} character class`)}function H0(e){return ba(e,"Unclosed group")}function Al(e,t,i=null){function a(s,c){for(let f=0;f<s.length;f++){const d=o(s[f],c,f,s);f=Math.max(-1,f+d)}}function o(s,c=null,f=null,d=null){let p=0,g=!1;const y={node:s,parent:c,key:f,container:d,root:e,remove(){hs(d).splice(Math.max(0,Jr(f)+p),1),p--,g=!0},removeAllNextSiblings(){return hs(d).splice(Jr(f)+1)},removeAllPrevSiblings(){const A=Jr(f)+p;return p-=A,hs(d).splice(0,Math.max(0,A))},replaceWith(A,k={}){const C=!!k.traverse;d?d[Math.max(0,Jr(f)+p)]=A:ba(c,"Can't replace root node")[f]=A,C&&o(A,c,f,d),g=!0},replaceWithMultiple(A,k={}){const C=!!k.traverse;if(hs(d).splice(Math.max(0,Jr(f)+p),1,...A),p+=A.length-1,C){let z=0;for(let U=0;U<A.length;U++)z+=o(A[U],c,Jr(f)+U+z,d)}g=!0},skip(){g=!0}},{type:b}=s,v=t["*"],S=t[b],T=typeof v=="function"?v:v?.enter,L=typeof S=="function"?S:S?.enter;if(T?.(y,i),L?.(y,i),!g)switch(b){case"AbsenceFunction":case"CapturingGroup":case"Group":a(s.body,s);break;case"Alternative":case"CharacterClass":a(s.body,s);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":o(s.min,s,"min"),o(s.max,s,"max");break;case"LookaroundAssertion":a(s.body,s);break;case"Quantifier":o(s.body,s,"body");break;case"Regex":a(s.body,s),o(s.flags,s,"flags");break;default:throw new Error(`Unexpected node type "${b}"`)}return S?.exit?.(y,i),v?.exit?.(y,i),p}return o(e),e}function hs(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Jr(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const XL=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function QL(e,t){for(let i=0;i<e.length;i++)e[i]>=t&&e[i]++}function ZL(e,t,i,a){return e.slice(0,t)+a+e.slice(t+i.length)}const mn=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function oh(e,t,i,a){const o=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let c=0,f="";for(const d of e.matchAll(o)){const{0:p,groups:{$skip:g}}=d;if(!g&&(!a||a===mn.DEFAULT==!c)){i instanceof Function?f+=i(d,{context:c?mn.CHAR_CLASS:mn.DEFAULT,negated:s[s.length-1]}):f+=i;continue}p[0]==="["?(c++,s.push(p[1]==="^")):p==="]"&&c&&(c--,s.pop()),f+=p}return f}function r1(e,t,i,a){oh(e,t,i,a)}function KL(e,t,i=0,a){if(!new RegExp(t,"su").test(e))return null;const o=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");o.lastIndex=i;let s=0,c;for(;c=o.exec(e);){const{0:f,groups:{$skip:d}}=c;if(!d&&(!a||a===mn.DEFAULT==!s))return c;f==="["?s++:f==="]"&&s&&s--,o.lastIndex==c.index&&o.lastIndex++}return null}function ps(e,t,i){return!!KL(e,t,0,i)}function WL(e,t){const i=/\\?./gsu;i.lastIndex=t;let a=e.length,o=0,s=1,c;for(;c=i.exec(e);){const[f]=c;if(f==="[")o++;else if(o)f==="]"&&o--;else if(f==="(")s++;else if(f===")"&&(s--,!s)){a=c.index;break}}return e.slice(t,a)}const P0=new RegExp(String.raw`(?<noncapturingStart>${XL})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function JL(e,t){const i=t?.hiddenCaptures??[];let a=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:i};const o="(?>",s="(?:(?=(",c=[0],f=[];let d=0,p=0,g=NaN,y;do{y=!1;let b=0,v=0,S=!1,T;for(P0.lastIndex=Number.isNaN(g)?0:g+s.length;T=P0.exec(e);){const{0:L,index:A,groups:{capturingStart:k,noncapturingStart:C}}=T;if(L==="[")b++;else if(b)L==="]"&&b--;else if(L===o&&!S)g=A,S=!0;else if(S&&C)v++;else if(k)S?v++:(d++,c.push(d+p));else if(L===")"&&S){if(!v){p++;const z=d+p;if(e=`${e.slice(0,g)}${s}${e.slice(g+o.length,A)}))<$$${z}>)${e.slice(A+1)}`,y=!0,f.push(z),QL(i,z),a.size){const U=new Map;a.forEach((O,j)=>{U.set(j>=z?j+1:j,O.map($=>$>=z?$+1:$))}),a=U}break}v--}}}while(y);return i.push(...f),e=oh(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:b,groups:{backrefNum:v,wrappedBackrefNum:S}})=>{if(v){const T=+v;if(T>c.length-1)throw new Error(`Backref "${b}" greater than number of captures`);return`\\${c[T]}`}return`\\${S}`},mn.DEFAULT),{pattern:e,captureTransfers:a,hiddenCaptures:i}}const a1=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,$f=new RegExp(String.raw`
65
+ `.replace(/\s+/g,""),"gsu");function sL(e,t={}){const i={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const a=kL(i.flags),o=[a.extended],s={captureGroup:i.rules.captureGroup,getCurrentModX(){return o.at(-1)},numOpenGroups:0,popModX(){o.pop()},pushModX(y){o.push(y)},replaceCurrentModX(y){o[o.length-1]=y},singleline:i.rules.singleline};let c=[],f;for(ds.lastIndex=0;f=ds.exec(e);){const y=uL(s,e,f[0],ds.lastIndex);y.tokens?c.push(...y.tokens):y.token&&c.push(y.token),y.lastIndex!==void 0&&(ds.lastIndex=y.lastIndex)}const d=[];let p=0;c.filter(y=>y.type==="GroupOpen").forEach(y=>{y.kind==="capturing"?y.number=++p:y.raw==="("&&d.push(y)}),p||d.forEach((y,v)=>{y.kind="capturing",y.number=v+1});const g=p||d.length;return{tokens:c.map(y=>y.type==="EscapedNumber"?LL(y,g):y).flat(),flags:a}}function uL(e,t,i,a){const[o,s]=i;if(i==="["||i==="[^"){const c=cL(t,i,a);return{tokens:c.tokens,lastIndex:c.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(s))return{token:R0(i,i)};if(/^\\g[<']/.test(i)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(i))throw new Error(`Invalid group name "${i}"`);return{token:_L(i)}}if(/^\\k[<']/.test(i)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(i))throw new Error(`Invalid group name "${i}"`);return{token:Kv(i)}}if(s==="K")return{token:Wv("keep",i)};if(s==="N"||s==="R")return{token:ur("newline",i,{negate:s==="N"})};if(s==="O")return{token:ur("any",i)};if(s==="X")return{token:ur("text_segment",i)};const c=Zv(i,{inCharClass:!1});return Array.isArray(c)?{tokens:c}:{token:c}}if(o==="("){if(s==="*")return{token:CL(i)};if(i==="(?{")throw new Error(`Unsupported callout "${i}"`);if(i.startsWith("(?#")){if(t[a]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:a+1}}if(/^\(\?[-imx]+[:)]$/.test(i))return{token:xL(i,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,i==="("&&!e.captureGroup||i==="(?:")return{token:la("group",i)};if(i==="(?>")return{token:la("atomic",i)};if(i==="(?="||i==="(?!"||i==="(?<="||i==="(?<!")return{token:la(i[2]==="<"?"lookbehind":"lookahead",i,{negate:i.endsWith("!")})};if(i==="("&&e.captureGroup||i.startsWith("(?<")&&i.endsWith(">")||i.startsWith("(?'")&&i.endsWith("'"))return{token:la("capturing",i,{...i!=="("&&{name:i.slice(3,-1)}})};if(i.startsWith("(?~")){if(i==="(?~|")throw new Error(`Unsupported absence function kind "${i}"`);return{token:la("absence_repeater",i)}}throw i==="(?("?new Error(`Unsupported conditional "${i}"`):new Error(`Invalid or unsupported group option "${i}"`)}if(i===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:yL(i)}}if(e.getCurrentModX()){if(i==="#"){const c=t.indexOf(`
66
+ `,a);return{lastIndex:c===-1?t.length:c}}if(/^\s$/.test(i)){const c=/\s+/y;return c.lastIndex=a,{lastIndex:c.exec(t)?c.lastIndex:a}}}if(i===".")return{token:ur("dot",i)};if(i==="^"||i==="$"){const c=e.singleline?{"^":St`\A`,$:St`\Z`}[i]:i;return{token:R0(c,i)}}return i==="|"?{token:dL(i)}:oh.test(i)?{tokens:RL(i)}:{token:ui(_a(i),i)}}function cL(e,t,i){const a=[D0(t[1]==="^",t)];let o=1,s;for($f.lastIndex=i;s=$f.exec(e);){const c=s[0];if(c[0]==="["&&c[1]!==":")o++,a.push(D0(c[1]==="^",c));else if(c==="]"){if(a.at(-1).type==="CharacterClassOpen")a.push(ui(93,c));else if(o--,a.push(hL(c)),!o)break}else{const f=fL(c);Array.isArray(f)?a.push(...f):a.push(f)}}return{tokens:a,lastIndex:$f.lastIndex||e.length}}function fL(e){if(e[0]==="\\")return Zv(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!lh.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return ur("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?pL(e):e==="&&"?mL(e):ui(_a(e),e)}function Zv(e,{inCharClass:t}){const i=e[1];if(i==="c"||i==="C")return EL(e);if("dDhHsSwW".includes(i))return wL(e);if(e.startsWith(St`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return AL(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const a=e.split(/\\x/).slice(1).map(c=>parseInt(c,16)),o=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(a)),s=new TextEncoder;return[...o].map(c=>{const f=[...s.encode(c)].map(d=>`\\x${d.toString(16)}`).join("");return ui(_a(c),f)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(i==="u"||i==="x")return ui(TL(e),e);if(N0.has(i))return ui(N0.get(i),e);if(/\d/.test(i))return gL(t,e);if(e==="\\")throw new Error(St`Incomplete escape "\"`);if(i==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return ui(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function dL(e){return{type:"Alternator",raw:e}}function R0(e,t){return{type:"Assertion",kind:e,raw:t}}function Kv(e){return{type:"Backreference",raw:e}}function ui(e,t){return{type:"Character",value:e,raw:t}}function hL(e){return{type:"CharacterClassClose",raw:e}}function pL(e){return{type:"CharacterClassHyphen",raw:e}}function mL(e){return{type:"CharacterClassIntersector",raw:e}}function D0(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function ur(e,t,i={}){return{type:"CharacterSet",kind:e,...i,raw:t}}function Wv(e,t,i={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Sa(i.flags),raw:t}}function gL(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function yL(e){return{type:"GroupClose",raw:e}}function la(e,t,i={}){return{type:"GroupOpen",kind:e,...i,raw:t}}function bL(e,t,i,a){return{type:"NamedCallout",kind:e,tag:t,arguments:i,raw:a}}function vL(e,t,i,a){return{type:"Quantifier",kind:e,min:t,max:i,raw:a}}function _L(e){return{type:"Subroutine",raw:e}}const SL=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),N0=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function EL(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return ui(_a(t.toUpperCase())-64,e)}function xL(e,t){let{on:i,off:a}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;a??="";const o=(t.getCurrentModX()||i.includes("x"))&&!a.includes("x"),s=M0(i),c=M0(a),f={};if(s&&(f.enable=s),c&&(f.disable=c),e.endsWith(")"))return t.replaceCurrentModX(o),Wv("flags",e,{flags:f});if(e.endsWith(":"))return t.pushModX(o),t.numOpenGroups++,la("group",e,{...(s||c)&&{flags:f}});throw new Error(`Unexpected flag modifier "${e}"`)}function CL(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:i,tag:a,args:o}=t.groups;if(!i)throw new Error(`Invalid named callout "${e}"`);if(a==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const s=o?o.split(",").filter(g=>g!=="").map(g=>/^[+-]?\d+$/.test(g)?+g:g):[],[c,f,d]=s,p=SL.has(i)?i.toLowerCase():"custom";switch(p){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof c=="string")throw new Error(`Named callout argument must be a number "${c}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument one must be a tag or number "${c}"`);if(s.length===2&&(typeof f=="number"||!/^[<>X]$/.test(f)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${f}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof c=="number"||!/^[<>X]$/.test(c)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${c}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument one must be a tag or number "${c}"`);if(typeof f=="number"||!/^(?:[<>!=]=|[<>])$/.test(f))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${f}"`);if(typeof d=="string"&&!/^[A-Za-z_]\w*$/.test(d))throw new Error(`Named callout argument three must be a tag or number "${d}"`);break;case"custom":throw new Error(`Undefined callout name "${i}"`);default:throw new Error(`Unexpected named callout kind "${p}"`)}return bL(p,a??null,o?.split(",")??null,e)}function O0(e){let t=null,i,a;if(e[0]==="{"){const{minStr:o,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,c=1e5;if(+o>c||s&&+s>c)throw new Error("Quantifier value unsupported in Oniguruma");if(i=+o,a=s===void 0?+o:s===""?1/0:+s,i>a&&(t="possessive",[i,a]=[a,i]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else i=e[0]==="+"?1:0,a=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return vL(t,i,a,e)}function wL(e){const t=e[1].toLowerCase();return ur({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function AL(e){const{p:t,neg:i,value:a}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return ur("property",e,{value:a,negate:t==="P"&&!i||t==="p"&&!!i})}function M0(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function kL(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let i=0;i<e.length;i++){const a=e[i];if(!"imxDPSWy".includes(a))throw new Error(`Invalid flag "${a}"`);if(a==="y"){if(!/^y{[gw]}/.test(e.slice(i)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[i+2]==="g"?"grapheme":"word",i+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[a]]=!0}return t}function TL(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function LL(e,t){const{raw:i,inCharClass:a}=e,o=i.slice(1);if(!a&&(o!=="0"&&o.length===1||o[0]!=="0"&&+o<=t))return[Kv(i)];const s=[],c=o.match(/^[0-7]+|\d/g);for(let f=0;f<c.length;f++){const d=c[f];let p;if(f===0&&d!=="8"&&d!=="9"){if(p=parseInt(d,8),p>127)throw new Error(St`Octal encoded byte above 177 unsupported "${i}"`)}else p=_a(d);s.push(ui(p,(f===0?"\\":"")+d))}return s}function RL(e){const t=[],i=new RegExp(oh,"gy");let a;for(;a=i.exec(e);){const o=a[0];if(o[0]==="{"){const s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(o);if(s){const{min:c,max:f}=s.groups;if(+c>+f&&o.endsWith("?")){i.lastIndex--,t.push(O0(o.slice(0,-1)));continue}}}t.push(O0(o))}return t}function Jv(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const i=e.body[0];return!t||Object.keys(t).every(a=>t[a]===i[a])}function DL(e){return NL.has(e.type)}const NL=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function e1(e,t={}){const i={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},a=sL(e,{flags:i.flags,rules:{captureGroup:i.rules.captureGroup,singleline:i.rules.singleline}}),o=(v,b)=>{const S=a.tokens[s.nextIndex];switch(s.parent=v,s.nextIndex++,S.type){case"Alternator":return fr();case"Assertion":return OL(S);case"Backreference":return ML(S,s);case"Character":return Zs(S.value,{useLastValid:!!b.isCheckingRangeEnd});case"CharacterClassHyphen":return IL(S,s,b);case"CharacterClassOpen":return zL(S,s,b);case"CharacterSet":return UL(S,s);case"Directive":return GL(S.kind,{flags:S.flags});case"GroupOpen":return HL(S,s,b);case"NamedCallout":return qL(S.kind,S.tag,S.arguments);case"Quantifier":return PL(S,s);case"Subroutine":return BL(S,s);default:throw new Error(`Unexpected token type "${S.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:i.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:i.skipBackrefValidation,skipLookbehindValidation:i.skipLookbehindValidation,skipPropertyNameValidation:i.skipPropertyNameValidation,subroutines:[],tokens:a.tokens,unicodePropertyMap:i.unicodePropertyMap,walk:o},c=YL($L(a.flags));let f=c.body[0];for(;s.nextIndex<a.tokens.length;){const v=o(f,{});v.type==="Alternative"?(c.body.push(v),f=v):f.body.push(v)}const{capturingGroups:d,hasNumberedRef:p,namedGroupsByName:g,subroutines:y}=s;if(p&&g.size&&!i.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:v}of y)if(typeof v=="number"){if(v>d.length)throw new Error("Subroutine uses a group number that's not defined");v&&(d[v-1].isSubroutined=!0)}else if(g.has(v)){if(g.get(v).length>1)throw new Error(St`Subroutine uses a duplicate group name "\g<${v}>"`);g.get(v)[0].isSubroutined=!0}else throw new Error(St`Subroutine uses a group name that's not defined "\g<${v}>"`);return c}function OL({kind:e}){return Td(Sa({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===St`\B`||e===St`\Y`})}function ML({raw:e},t){const i=/^\\k[<']/.test(e),a=i?e.slice(3,-1):e.slice(1),o=(s,c=!1)=>{const f=t.capturingGroups.length;let d=!1;if(s>f)if(t.skipBackrefValidation)d=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,Ld(c?f+1-s:s,{orphan:d})};if(i){const s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(a);if(s)return o(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(a))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(a))throw new Error(`Group name not defined to the left "${e}"`);return Ld(a)}return o(+a)}function IL(e,t,i){const{tokens:a,walk:o}=t,s=t.parent,c=s.body.at(-1),f=a[t.nextIndex];if(!i.isCheckingRangeEnd&&c&&c.type!=="CharacterClass"&&c.type!=="CharacterClassRange"&&f&&f.type!=="CharacterClassOpen"&&f.type!=="CharacterClassClose"&&f.type!=="CharacterClassIntersector"){const d=o(s,{...i,isCheckingRangeEnd:!0});if(c.type==="Character"&&d.type==="Character")return s.body.pop(),VL(c,d);throw new Error("Invalid character class range")}return Zs(_a("-"))}function zL({negate:e},t,i){const{tokens:a,walk:o}=t,s=a[t.nextIndex],c=[xs()];let f=U0(s);for(;f.type!=="CharacterClassClose";){if(f.type==="CharacterClassIntersector")c.push(xs()),t.nextIndex++;else{const p=c.at(-1);p.body.push(o(p,i))}f=U0(a[t.nextIndex],s)}const d=xs({negate:e});return c.length===1?d.body=c[0].body:(d.kind="intersection",d.body=c.map(p=>p.body.length===1?p.body[0]:p)),t.nextIndex++,d}function UL({kind:e,negate:t,value:i},a){const{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:c}=a;if(e==="property"){const f=Ks(i);if(lh.has(f)&&!c?.has(f))e="posix",i=f;else return oa(i,{negate:t,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:c})}return e==="posix"?FL(i,{negate:t}):Rd(e,{negate:t})}function HL(e,t,i){const{tokens:a,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:c,walk:f}=t,d=XL(e),p=d.type==="AbsenceFunction",g=z0(d),y=g&&d.negate;if(d.type==="CapturingGroup"&&(o.push(d),d.name&&oL(s,d.name,[]).push(d)),p&&i.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let v=H0(a[t.nextIndex]);for(;v.type!=="GroupClose";){if(v.type==="Alternator")d.body.push(fr()),t.nextIndex++;else{const b=d.body.at(-1),S=f(b,{...i,isInAbsenceFunction:i.isInAbsenceFunction||p,isInLookbehind:i.isInLookbehind||g,isInNegLookbehind:i.isInNegLookbehind||y});if(b.body.push(S),(g||i.isInLookbehind)&&!c){const k="Lookbehind includes a pattern not allowed by Oniguruma";if(y||i.isInNegLookbehind){if(I0(S)||S.type==="CapturingGroup")throw new Error(k)}else if(I0(S)||z0(S)&&S.negate)throw new Error(k)}}v=H0(a[t.nextIndex])}return t.nextIndex++,d}function PL({kind:e,min:t,max:i},a){const o=a.parent,s=o.body.at(-1);if(!s||!DL(s))throw new Error("Quantifier requires a repeatable token");const c=n1(e,t,i,s);return o.body.pop(),c}function BL({raw:e},t){const{capturingGroups:i,subroutines:a}=t;let o=e.slice(3,-1);const s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);if(s){const f=+s.groups.num,d=i.length;if(t.hasNumberedRef=!0,o={"":f,"+":d+f,"-":d+1-f}[s.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);const c=i1(o);return a.push(c),c}function jL(e,t){return{type:"AbsenceFunction",kind:e,body:jl(t?.body)}}function fr(e){return{type:"Alternative",body:r1(e?.body)}}function Td(e,t){const i={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(i.negate=!!t?.negate),i}function Ld(e,t){const i=!!t?.orphan;return{type:"Backreference",ref:e,...i&&{orphan:i}}}function t1(e,t){const i={name:void 0,isSubroutined:!1,...t};if(i.name!==void 0&&!QL(i.name))throw new Error(`Group name "${i.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...i.name&&{name:i.name},...i.isSubroutined&&{isSubroutined:i.isSubroutined},body:jl(t?.body)}}function Zs(e,t){const i={useLastValid:!1,...t};if(e>1114111){const a=e.toString(16);if(i.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${a}}"`):new Error(`Invalid code point out of range in JS "\\x{${a}}"`)}return{type:"Character",value:e}}function xs(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:r1(e?.body)}}function VL(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function Rd(e,t){const i=!!t?.negate,a={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(a.negate=i),(e==="text_segment"||e==="newline"&&!i)&&(a.variableLength=!0),a}function GL(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Sa(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function $L(e){return{type:"Flags",...e}}function An(e){const t=e?.atomic,i=e?.flags;if(t&&i)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...i&&{flags:i},body:jl(e?.body)}}function or(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:jl(e?.body)}}function qL(e,t,i){return{type:"NamedCallout",kind:e,tag:t,arguments:i}}function FL(e,t){const i=!!t?.negate;if(!lh.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:i}}function n1(e,t,i,a){if(t>i)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:i,body:a}}function YL(e,t){return{type:"Regex",body:jl(t?.body),flags:e}}function i1(e){return{type:"Subroutine",ref:e}}function oa(e,t){const i={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let a=i.unicodePropertyMap?.get(Ks(e));if(!a){if(i.normalizeUnknownPropertyNames)a=ZL(e);else if(i.unicodePropertyMap&&!i.skipPropertyNameValidation)throw new Error(St`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:a??e,negate:i.negate}}function XL({flags:e,kind:t,name:i,negate:a,number:o}){switch(t){case"absence_repeater":return jL("repeater");case"atomic":return An({atomic:!0});case"capturing":return t1(o,{name:i});case"group":return An({flags:e});case"lookahead":case"lookbehind":return or({behind:t==="lookbehind",negate:a});default:throw new Error(`Unexpected group kind "${t}"`)}}function jl(e){if(e===void 0)e=[fr()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function r1(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function I0(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function z0(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function QL(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function ZL(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function Ks(e){return e.replace(/[- _]+/g,"").toLowerCase()}function U0(e,t){return Sa(e,`${t?.type==="Character"&&t.value===93?"Empty":"Unclosed"} character class`)}function H0(e){return Sa(e,"Unclosed group")}function Tl(e,t,i=null){function a(s,c){for(let f=0;f<s.length;f++){const d=o(s[f],c,f,s);f=Math.max(-1,f+d)}}function o(s,c=null,f=null,d=null){let p=0,g=!1;const y={node:s,parent:c,key:f,container:d,root:e,remove(){hs(d).splice(Math.max(0,ta(f)+p),1),p--,g=!0},removeAllNextSiblings(){return hs(d).splice(ta(f)+1)},removeAllPrevSiblings(){const C=ta(f)+p;return p-=C,hs(d).splice(0,Math.max(0,C))},replaceWith(C,A={}){const T=!!A.traverse;d?d[Math.max(0,ta(f)+p)]=C:Sa(c,"Can't replace root node")[f]=C,T&&o(C,c,f,d),g=!0},replaceWithMultiple(C,A={}){const T=!!A.traverse;if(hs(d).splice(Math.max(0,ta(f)+p),1,...C),p+=C.length-1,T){let I=0;for(let z=0;z<C.length;z++)I+=o(C[z],c,ta(f)+z+I,d)}g=!0},skip(){g=!0}},{type:v}=s,b=t["*"],S=t[v],k=typeof b=="function"?b:b?.enter,L=typeof S=="function"?S:S?.enter;if(k?.(y,i),L?.(y,i),!g)switch(v){case"AbsenceFunction":case"CapturingGroup":case"Group":a(s.body,s);break;case"Alternative":case"CharacterClass":a(s.body,s);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":o(s.min,s,"min"),o(s.max,s,"max");break;case"LookaroundAssertion":a(s.body,s);break;case"Quantifier":o(s.body,s,"body");break;case"Regex":a(s.body,s),o(s.flags,s,"flags");break;default:throw new Error(`Unexpected node type "${v}"`)}return S?.exit?.(y,i),b?.exit?.(y,i),p}return o(e),e}function hs(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function ta(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const KL=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function WL(e,t){for(let i=0;i<e.length;i++)e[i]>=t&&e[i]++}function JL(e,t,i,a){return e.slice(0,t)+a+e.slice(t+i.length)}const bn=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function sh(e,t,i,a){const o=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let c=0,f="";for(const d of e.matchAll(o)){const{0:p,groups:{$skip:g}}=d;if(!g&&(!a||a===bn.DEFAULT==!c)){i instanceof Function?f+=i(d,{context:c?bn.CHAR_CLASS:bn.DEFAULT,negated:s[s.length-1]}):f+=i;continue}p[0]==="["?(c++,s.push(p[1]==="^")):p==="]"&&c&&(c--,s.pop()),f+=p}return f}function a1(e,t,i,a){sh(e,t,i,a)}function eR(e,t,i=0,a){if(!new RegExp(t,"su").test(e))return null;const o=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");o.lastIndex=i;let s=0,c;for(;c=o.exec(e);){const{0:f,groups:{$skip:d}}=c;if(!d&&(!a||a===bn.DEFAULT==!s))return c;f==="["?s++:f==="]"&&s&&s--,o.lastIndex==c.index&&o.lastIndex++}return null}function ps(e,t,i){return!!eR(e,t,0,i)}function tR(e,t){const i=/\\?./gsu;i.lastIndex=t;let a=e.length,o=0,s=1,c;for(;c=i.exec(e);){const[f]=c;if(f==="[")o++;else if(o)f==="]"&&o--;else if(f==="(")s++;else if(f===")"&&(s--,!s)){a=c.index;break}}return e.slice(t,a)}const P0=new RegExp(String.raw`(?<noncapturingStart>${KL})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function nR(e,t){const i=t?.hiddenCaptures??[];let a=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:i};const o="(?>",s="(?:(?=(",c=[0],f=[];let d=0,p=0,g=NaN,y;do{y=!1;let v=0,b=0,S=!1,k;for(P0.lastIndex=Number.isNaN(g)?0:g+s.length;k=P0.exec(e);){const{0:L,index:C,groups:{capturingStart:A,noncapturingStart:T}}=k;if(L==="[")v++;else if(v)L==="]"&&v--;else if(L===o&&!S)g=C,S=!0;else if(S&&T)b++;else if(A)S?b++:(d++,c.push(d+p));else if(L===")"&&S){if(!b){p++;const I=d+p;if(e=`${e.slice(0,g)}${s}${e.slice(g+o.length,C)}))<$$${I}>)${e.slice(C+1)}`,y=!0,f.push(I),WL(i,I),a.size){const z=new Map;a.forEach((D,j)=>{z.set(j>=I?j+1:j,D.map(G=>G>=I?G+1:G))}),a=z}break}b--}}}while(y);return i.push(...f),e=sh(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:v,groups:{backrefNum:b,wrappedBackrefNum:S}})=>{if(b){const k=+b;if(k>c.length-1)throw new Error(`Backref "${v}" greater than number of captures`);return`\\${c[k]}`}return`\\${S}`},bn.DEFAULT),{pattern:e,captureTransfers:a,hiddenCaptures:i}}const l1=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,qf=new RegExp(String.raw`
67
67
  \\(?: \d+
68
68
  | c[A-Za-z]
69
69
  | [gk]<[^>]+>
@@ -76,9 +76,9 @@ Error generating stack: `+u.message+`
76
76
  | [A-Za-z\-]+:
77
77
  | \(DEFINE\)
78
78
  ))?
79
- | (?<qBase>${a1})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
79
+ | (?<qBase>${l1})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
80
80
  | \\?.
81
- `.replace(/\s+/g,""),"gsu");function eR(e){if(!new RegExp(`${a1}\\+`).test(e))return{pattern:e};const t=[];let i=null,a=null,o="",s=0,c;for($f.lastIndex=0;c=$f.exec(e);){const{0:f,index:d,groups:{qBase:p,qMod:g,invalidQ:y}}=c;if(f==="[")s||(a=d),s++;else if(f==="]")s?s--:a=null;else if(!s)if(g==="+"&&o&&!o.startsWith("(")){if(y)throw new Error(`Invalid quantifier "${f}"`);let b=-1;if(/^\{\d+\}$/.test(p))e=ZL(e,d+p.length,g,"");else{if(o===")"||o==="]"){const v=o===")"?i:a;if(v===null)throw new Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,v)}(?>${e.slice(v,d)}${p})${e.slice(d+f.length)}`}else e=`${e.slice(0,d-o.length)}(?>${o}${p})${e.slice(d+f.length)}`;b+=4}$f.lastIndex+=b}else f[0]==="("?t.push(d):f===")"&&(i=t.length?t.pop():null);o=f}return{pattern:e}}const pn=String.raw,tR=pn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Rd=pn`\(\?R=(?<rDepth>[^\)]+)\)|${tR}`,Ws=pn`\(\?<(?![=!])(?<captureName>[^>]+)>`,l1=pn`${Ws}|(?<unnamed>\()(?!\?)`,tr=new RegExp(pn`${Ws}|${Rd}|\(\?|\\?.`,"gsu"),qf="Cannot use multiple overlapping recursions";function nR(e,t){const{hiddenCaptures:i,mode:a}={hiddenCaptures:[],mode:"plugin",...t};let o=t?.captureTransfers??new Map;if(!new RegExp(Rd,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:i};if(a==="plugin"&&ps(e,pn`\(\?\(DEFINE\)`,mn.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],c=ps(e,pn`\\[1-9]`,mn.DEFAULT),f=new Map,d=[];let p=!1,g=0,y=0,b;for(tr.lastIndex=0;b=tr.exec(e);){const{0:v,groups:{captureName:S,rDepth:T,gRNameOrNum:L,gRDepth:A}}=b;if(v==="[")g++;else if(g)v==="]"&&g--;else if(T){if(B0(T),p)throw new Error(qf);if(c)throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const k=e.slice(0,b.index),C=e.slice(tr.lastIndex);if(ps(C,Rd,mn.DEFAULT))throw new Error(qf);const z=+T-1;e=j0(k,C,z,!1,i,s,y),o=G0(o,k,z,s.length,0,y);break}else if(L){B0(A);let k=!1;for(const J of d)if(J.name===L||J.num===+L){if(k=!0,J.hasRecursedWithin)throw new Error(qf);break}if(!k)throw new Error(pn`Recursive \g cannot be used outside the referenced group "${a==="external"?L:pn`\g<${L}&R=${A}>`}"`);const C=f.get(L),z=WL(e,C);if(c&&ps(z,pn`${Ws}|\((?!\?)`,mn.DEFAULT))throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const U=e.slice(C,b.index),O=z.slice(U.length+v.length),j=s.length,$=+A-1,ie=j0(U,O,$,!0,i,s,y);o=G0(o,U,$,s.length-j,j,y);const ne=e.slice(0,C),W=e.slice(C+z.length);e=`${ne}${ie}${W}`,tr.lastIndex+=ie.length-v.length-U.length-O.length,d.forEach(J=>J.hasRecursedWithin=!0),p=!0}else if(S)y++,f.set(String(y),tr.lastIndex),f.set(S,tr.lastIndex),d.push({num:y,name:S});else if(v[0]==="("){const k=v==="(";k&&(y++,f.set(String(y),tr.lastIndex)),d.push(k?{num:y}:{})}else v===")"&&d.pop()}return i.push(...s),{pattern:e,captureTransfers:o,hiddenCaptures:i}}function B0(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function j0(e,t,i,a,o,s,c){const f=new Set;a&&r1(e+t,Ws,({groups:{captureName:p}})=>{f.add(p)},mn.DEFAULT);const d=[i,a?f:null,o,s,c];return`${e}${V0(`(?:${e}`,"forward",...d)}(?:)${V0(`${t})`,"backward",...d)}${t}`}function V0(e,t,i,a,o,s,c){const d=g=>t==="forward"?g+2:i-g+2-1;let p="";for(let g=0;g<i;g++){const y=d(g);p+=oh(e,pn`${l1}|\\k<(?<backref>[^>]+)>`,({0:b,groups:{captureName:v,unnamed:S,backref:T}})=>{if(T&&a&&!a.has(T))return b;const L=`_$${y}`;if(S||v){const A=c+s.length+1;return s.push(A),iR(o,A),S?b:`(?<${v}${L}>`}return pn`\k<${T}${L}>`},mn.DEFAULT)}return p}function iR(e,t){for(let i=0;i<e.length;i++)e[i]>=t&&e[i]++}function G0(e,t,i,a,o,s){if(e.size&&a){let c=0;r1(t,l1,()=>c++,mn.DEFAULT);const f=s-c+o,d=new Map;return e.forEach((p,g)=>{const y=(a-c*i)/i,b=c*i,v=g>f+c?g+a:g,S=[];for(const T of p)if(T<=f)S.push(T);else if(T>f+c+y)S.push(T+a);else if(T<=f+c)for(let L=0;L<=i;L++)S.push(T+c*L);else for(let L=0;L<=i;L++)S.push(T+b+y*L);d.set(v,S)}),d}return e}var gt=String.fromCodePoint,Ee=String.raw,xn={},Js=globalThis.RegExp;xn.flagGroups=(()=>{try{new Js("(?i:)")}catch{return!1}return!0})();xn.unicodeSets=(()=>{try{new Js("[[]]","v")}catch{return!1}return!0})();xn.bugFlagVLiteralHyphenIsRange=xn.unicodeSets?(()=>{try{new Js(Ee`[\d\-a]`,"v")}catch{return!0}return!1})():!1;xn.bugNestedClassIgnoresNegation=xn.unicodeSets&&new Js("[[^a]]","v").test("a");function Us(e,{enable:t,disable:i}){return{dotAll:!i?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!i?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Ol(e,t,i){return e.has(t)||e.set(t,i),e.get(t)}function Dd(e,t){return $0[e]>=$0[t]}function rR(e,t){if(e==null)throw new Error(t??"Value expected");return e}var $0={ES2025:2025,ES2024:2024,ES2018:2018},aR={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function o1(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!aR[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=xn.flagGroups?"ES2025":xn.unicodeSets?"ES2024":"ES2018"),t}var lR="[ -\r ]",oR=new Set([gt(304),gt(305)]),ni=Ee`[\p{L}\p{M}\p{N}\p{Pc}]`;function s1(e){if(oR.has(e))return[e];const t=new Set,i=e.toLowerCase(),a=i.toUpperCase(),o=cR.get(i),s=sR.get(i),c=uR.get(i);return[...a].length===1&&t.add(a),c&&t.add(c),o&&t.add(o),t.add(i),s&&t.add(s),[...t]}var sh=new Map(`C Other
81
+ `.replace(/\s+/g,""),"gsu");function iR(e){if(!new RegExp(`${l1}\\+`).test(e))return{pattern:e};const t=[];let i=null,a=null,o="",s=0,c;for(qf.lastIndex=0;c=qf.exec(e);){const{0:f,index:d,groups:{qBase:p,qMod:g,invalidQ:y}}=c;if(f==="[")s||(a=d),s++;else if(f==="]")s?s--:a=null;else if(!s)if(g==="+"&&o&&!o.startsWith("(")){if(y)throw new Error(`Invalid quantifier "${f}"`);let v=-1;if(/^\{\d+\}$/.test(p))e=JL(e,d+p.length,g,"");else{if(o===")"||o==="]"){const b=o===")"?i:a;if(b===null)throw new Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,b)}(?>${e.slice(b,d)}${p})${e.slice(d+f.length)}`}else e=`${e.slice(0,d-o.length)}(?>${o}${p})${e.slice(d+f.length)}`;v+=4}qf.lastIndex+=v}else f[0]==="("?t.push(d):f===")"&&(i=t.length?t.pop():null);o=f}return{pattern:e}}const yn=String.raw,rR=yn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Dd=yn`\(\?R=(?<rDepth>[^\)]+)\)|${rR}`,Ws=yn`\(\?<(?![=!])(?<captureName>[^>]+)>`,o1=yn`${Ws}|(?<unnamed>\()(?!\?)`,ar=new RegExp(yn`${Ws}|${Dd}|\(\?|\\?.`,"gsu"),Ff="Cannot use multiple overlapping recursions";function aR(e,t){const{hiddenCaptures:i,mode:a}={hiddenCaptures:[],mode:"plugin",...t};let o=t?.captureTransfers??new Map;if(!new RegExp(Dd,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:i};if(a==="plugin"&&ps(e,yn`\(\?\(DEFINE\)`,bn.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],c=ps(e,yn`\\[1-9]`,bn.DEFAULT),f=new Map,d=[];let p=!1,g=0,y=0,v;for(ar.lastIndex=0;v=ar.exec(e);){const{0:b,groups:{captureName:S,rDepth:k,gRNameOrNum:L,gRDepth:C}}=v;if(b==="[")g++;else if(g)b==="]"&&g--;else if(k){if(B0(k),p)throw new Error(Ff);if(c)throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const A=e.slice(0,v.index),T=e.slice(ar.lastIndex);if(ps(T,Dd,bn.DEFAULT))throw new Error(Ff);const I=+k-1;e=j0(A,T,I,!1,i,s,y),o=G0(o,A,I,s.length,0,y);break}else if(L){B0(C);let A=!1;for(const W of d)if(W.name===L||W.num===+L){if(A=!0,W.hasRecursedWithin)throw new Error(Ff);break}if(!A)throw new Error(yn`Recursive \g cannot be used outside the referenced group "${a==="external"?L:yn`\g<${L}&R=${C}>`}"`);const T=f.get(L),I=tR(e,T);if(c&&ps(I,yn`${Ws}|\((?!\?)`,bn.DEFAULT))throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const z=e.slice(T,v.index),D=I.slice(z.length+b.length),j=s.length,G=+C-1,ie=j0(z,D,G,!0,i,s,y);o=G0(o,z,G,s.length-j,j,y);const ne=e.slice(0,T),J=e.slice(T+I.length);e=`${ne}${ie}${J}`,ar.lastIndex+=ie.length-b.length-z.length-D.length,d.forEach(W=>W.hasRecursedWithin=!0),p=!0}else if(S)y++,f.set(String(y),ar.lastIndex),f.set(S,ar.lastIndex),d.push({num:y,name:S});else if(b[0]==="("){const A=b==="(";A&&(y++,f.set(String(y),ar.lastIndex)),d.push(A?{num:y}:{})}else b===")"&&d.pop()}return i.push(...s),{pattern:e,captureTransfers:o,hiddenCaptures:i}}function B0(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function j0(e,t,i,a,o,s,c){const f=new Set;a&&a1(e+t,Ws,({groups:{captureName:p}})=>{f.add(p)},bn.DEFAULT);const d=[i,a?f:null,o,s,c];return`${e}${V0(`(?:${e}`,"forward",...d)}(?:)${V0(`${t})`,"backward",...d)}${t}`}function V0(e,t,i,a,o,s,c){const d=g=>t==="forward"?g+2:i-g+2-1;let p="";for(let g=0;g<i;g++){const y=d(g);p+=sh(e,yn`${o1}|\\k<(?<backref>[^>]+)>`,({0:v,groups:{captureName:b,unnamed:S,backref:k}})=>{if(k&&a&&!a.has(k))return v;const L=`_$${y}`;if(S||b){const C=c+s.length+1;return s.push(C),lR(o,C),S?v:`(?<${b}${L}>`}return yn`\k<${k}${L}>`},bn.DEFAULT)}return p}function lR(e,t){for(let i=0;i<e.length;i++)e[i]>=t&&e[i]++}function G0(e,t,i,a,o,s){if(e.size&&a){let c=0;a1(t,o1,()=>c++,bn.DEFAULT);const f=s-c+o,d=new Map;return e.forEach((p,g)=>{const y=(a-c*i)/i,v=c*i,b=g>f+c?g+a:g,S=[];for(const k of p)if(k<=f)S.push(k);else if(k>f+c+y)S.push(k+a);else if(k<=f+c)for(let L=0;L<=i;L++)S.push(k+c*L);else for(let L=0;L<=i;L++)S.push(k+v+y*L);d.set(b,S)}),d}return e}var gt=String.fromCodePoint,Ee=String.raw,kn={},Js=globalThis.RegExp;kn.flagGroups=(()=>{try{new Js("(?i:)")}catch{return!1}return!0})();kn.unicodeSets=(()=>{try{new Js("[[]]","v")}catch{return!1}return!0})();kn.bugFlagVLiteralHyphenIsRange=kn.unicodeSets?(()=>{try{new Js(Ee`[\d\-a]`,"v")}catch{return!0}return!1})():!1;kn.bugNestedClassIgnoresNegation=kn.unicodeSets&&new Js("[[^a]]","v").test("a");function Us(e,{enable:t,disable:i}){return{dotAll:!i?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!i?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Ml(e,t,i){return e.has(t)||e.set(t,i),e.get(t)}function Nd(e,t){return $0[e]>=$0[t]}function oR(e,t){if(e==null)throw new Error(t??"Value expected");return e}var $0={ES2025:2025,ES2024:2024,ES2018:2018},sR={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function s1(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!sR[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=kn.flagGroups?"ES2025":kn.unicodeSets?"ES2024":"ES2018"),t}var uR="[ -\r ]",cR=new Set([gt(304),gt(305)]),li=Ee`[\p{L}\p{M}\p{N}\p{Pc}]`;function u1(e){if(cR.has(e))return[e];const t=new Set,i=e.toLowerCase(),a=i.toUpperCase(),o=hR.get(i),s=fR.get(i),c=dR.get(i);return[...a].length===1&&t.add(a),c&&t.add(c),o&&t.add(o),t.add(i),s&&t.add(s),[...t]}var uh=new Map(`C Other
82
82
  Cc Control cntrl
83
83
  Cf Format
84
84
  Cn Unassigned
@@ -168,23 +168,23 @@ Uppercase Upper
168
168
  Variation_Selector VS
169
169
  White_Space space
170
170
  XID_Continue XIDC
171
- XID_Start XIDS`.split(/\s/).map(e=>[Ks(e),e])),sR=new Map([["s",gt(383)],[gt(383),"s"]]),uR=new Map([[gt(223),gt(7838)],[gt(107),gt(8490)],[gt(229),gt(8491)],[gt(969),gt(8486)]]),cR=new Map([Ni(453),Ni(456),Ni(459),Ni(498),...Ff(8072,8079),...Ff(8088,8095),...Ff(8104,8111),Ni(8124),Ni(8140),Ni(8188)]),fR=new Map([["alnum",Ee`[\p{Alpha}\p{Nd}]`],["alpha",Ee`\p{Alpha}`],["ascii",Ee`\p{ASCII}`],["blank",Ee`[\p{Zs}\t]`],["cntrl",Ee`\p{Cc}`],["digit",Ee`\p{Nd}`],["graph",Ee`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Ee`\p{Lower}`],["print",Ee`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Ee`[\p{P}\p{S}]`],["space",Ee`\p{space}`],["upper",Ee`\p{Upper}`],["word",Ee`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Ee`\p{AHex}`]]);function dR(e,t){const i=[];for(let a=e;a<=t;a++)i.push(a);return i}function Ni(e){const t=gt(e);return[t.toLowerCase(),t]}function Ff(e,t){return dR(e,t).map(i=>Ni(i))}var u1=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function hR(e,t){const i={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};c1(e);const a={accuracy:i.accuracy,asciiWordBoundaries:i.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Dd(i.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Al(e,pR,a);const o={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:o,prevFlags:null,globalFlags:o,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:a.subroutineRefMap};Al(e,mR,s);const c={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Al(e,gR,c),e._originMap=s.groupOriginByCopy,e._strategy=a.strategy,e}var pR={AbsenceFunction({node:e,parent:t,replaceWith:i}){const{body:a,kind:o}=e;if(o==="repeater"){const s=En();s.body[0].body.push(ir({negate:!0,body:a}),ra("Any"));const c=En();c.body[0].body.push(t1("greedy",0,1/0,s)),i(at(c,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:i},{flagDirectivesByAlt:a}){const o=e.body.filter(s=>s.kind==="flags");for(let s=i+1;s<t.body.length;s++){const c=t.body[s];Ol(a,c,[]).push(...o)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const i=d1(t.get(e));if(i){const a=En({flags:i});a.body[0].body=e.body,e.body=[at(a,e)]}}}},Assertion({node:e,parent:t,key:i,container:a,root:o,remove:s,replaceWith:c},f){const{kind:d,negate:p}=e,{asciiWordBoundaries:g,avoidSubclass:y,supportedGNodes:b,wordIsAscii:v}=f;if(d==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${p?"Y":"y"}"`);if(d==="line_end")c(at(ir({body:[or({body:[kd("string_end")]}),or({body:[Zs(10)]})]}),t));else if(d==="line_start")c(at(ii(Ee`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(d==="search_start")if(b.has(e))o.flags.sticky=!0,s();else{const S=a[i-1];if(S&&ER(S))c(at(ir({negate:!0}),t));else{if(y)throw new Error(Ee`Uses "\G" in a way that requires a subclass`);c(Mi(kd("string_start"),t)),f.strategy="clip_search"}}else if(!(d==="string_end"||d==="string_start"))if(d==="string_end_newline")c(at(ii(Ee`(?=\n?\z)`),t));else if(d==="word_boundary"){if(!v&&!g){const S=`(?:(?<=${ni})(?!${ni})|(?<!${ni})(?=${ni}))`,T=`(?:(?<=${ni})(?=${ni})|(?<!${ni})(?!${ni}))`;c(at(ii(p?T:S),t))}}else throw new Error(`Unexpected assertion kind "${d}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:i}=e;typeof i=="string"&&!Xf(i)&&(i=Yf(i,t),e.ref=i)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:i}){let{name:a}=e;a&&!Xf(a)&&(a=Yf(a,t),e.name=a),i.set(e.number,e),a&&i.set(a,e)},CharacterClassRange({node:e,parent:t,replaceWith:i}){if(t.kind==="intersection"){const a=xs({body:[e]});i(at(a,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:i},{accuracy:a,minTargetEs2024:o,digitIsAscii:s,spaceIsAscii:c,wordIsAscii:f}){const{kind:d,negate:p,value:g}=e;if(s&&(d==="digit"||g==="digit")){i(Mi(Ld("digit",{negate:p}),t));return}if(c&&(d==="space"||g==="space")){i(at(Qf(ii(lR),p),t));return}if(f&&(d==="word"||g==="word")){i(Mi(Ld("word",{negate:p}),t));return}if(d==="any")i(Mi(ra("Any"),t));else if(d==="digit")i(Mi(ra("Nd",{negate:p}),t));else if(d!=="dot")if(d==="text_segment"){if(a==="strict")throw new Error(Ee`Use of "\X" requires non-strict accuracy`);const y="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",b=Ee`\p{RI}{2}|${y}(?:\u200D${y})*`;i(at(ii(Ee`(?>\r\n|${o?Ee`\p{RGI_Emoji}`:b}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(d==="hex")i(Mi(ra("AHex",{negate:p}),t));else if(d==="newline")i(at(ii(p?`[^
171
+ XID_Start XIDS`.split(/\s/).map(e=>[Ks(e),e])),fR=new Map([["s",gt(383)],[gt(383),"s"]]),dR=new Map([[gt(223),gt(7838)],[gt(107),gt(8490)],[gt(229),gt(8491)],[gt(969),gt(8486)]]),hR=new Map([Ui(453),Ui(456),Ui(459),Ui(498),...Yf(8072,8079),...Yf(8088,8095),...Yf(8104,8111),Ui(8124),Ui(8140),Ui(8188)]),pR=new Map([["alnum",Ee`[\p{Alpha}\p{Nd}]`],["alpha",Ee`\p{Alpha}`],["ascii",Ee`\p{ASCII}`],["blank",Ee`[\p{Zs}\t]`],["cntrl",Ee`\p{Cc}`],["digit",Ee`\p{Nd}`],["graph",Ee`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Ee`\p{Lower}`],["print",Ee`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Ee`[\p{P}\p{S}]`],["space",Ee`\p{space}`],["upper",Ee`\p{Upper}`],["word",Ee`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Ee`\p{AHex}`]]);function mR(e,t){const i=[];for(let a=e;a<=t;a++)i.push(a);return i}function Ui(e){const t=gt(e);return[t.toLowerCase(),t]}function Yf(e,t){return mR(e,t).map(i=>Ui(i))}var c1=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function gR(e,t){const i={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};f1(e);const a={accuracy:i.accuracy,asciiWordBoundaries:i.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Nd(i.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Tl(e,yR,a);const o={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:o,prevFlags:null,globalFlags:o,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:a.subroutineRefMap};Tl(e,bR,s);const c={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Tl(e,vR,c),e._originMap=s.groupOriginByCopy,e._strategy=a.strategy,e}var yR={AbsenceFunction({node:e,parent:t,replaceWith:i}){const{body:a,kind:o}=e;if(o==="repeater"){const s=An();s.body[0].body.push(or({negate:!0,body:a}),oa("Any"));const c=An();c.body[0].body.push(n1("greedy",0,1/0,s)),i(lt(c,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:i},{flagDirectivesByAlt:a}){const o=e.body.filter(s=>s.kind==="flags");for(let s=i+1;s<t.body.length;s++){const c=t.body[s];Ml(a,c,[]).push(...o)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const i=h1(t.get(e));if(i){const a=An({flags:i});a.body[0].body=e.body,e.body=[lt(a,e)]}}}},Assertion({node:e,parent:t,key:i,container:a,root:o,remove:s,replaceWith:c},f){const{kind:d,negate:p}=e,{asciiWordBoundaries:g,avoidSubclass:y,supportedGNodes:v,wordIsAscii:b}=f;if(d==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${p?"Y":"y"}"`);if(d==="line_end")c(lt(or({body:[fr({body:[Td("string_end")]}),fr({body:[Zs(10)]})]}),t));else if(d==="line_start")c(lt(oi(Ee`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(d==="search_start")if(v.has(e))o.flags.sticky=!0,s();else{const S=a[i-1];if(S&&wR(S))c(lt(or({negate:!0}),t));else{if(y)throw new Error(Ee`Uses "\G" in a way that requires a subclass`);c(Hi(Td("string_start"),t)),f.strategy="clip_search"}}else if(!(d==="string_end"||d==="string_start"))if(d==="string_end_newline")c(lt(oi(Ee`(?=\n?\z)`),t));else if(d==="word_boundary"){if(!b&&!g){const S=`(?:(?<=${li})(?!${li})|(?<!${li})(?=${li}))`,k=`(?:(?<=${li})(?=${li})|(?<!${li})(?!${li}))`;c(lt(oi(p?k:S),t))}}else throw new Error(`Unexpected assertion kind "${d}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:i}=e;typeof i=="string"&&!Qf(i)&&(i=Xf(i,t),e.ref=i)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:i}){let{name:a}=e;a&&!Qf(a)&&(a=Xf(a,t),e.name=a),i.set(e.number,e),a&&i.set(a,e)},CharacterClassRange({node:e,parent:t,replaceWith:i}){if(t.kind==="intersection"){const a=xs({body:[e]});i(lt(a,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:i},{accuracy:a,minTargetEs2024:o,digitIsAscii:s,spaceIsAscii:c,wordIsAscii:f}){const{kind:d,negate:p,value:g}=e;if(s&&(d==="digit"||g==="digit")){i(Hi(Rd("digit",{negate:p}),t));return}if(c&&(d==="space"||g==="space")){i(lt(Zf(oi(uR),p),t));return}if(f&&(d==="word"||g==="word")){i(Hi(Rd("word",{negate:p}),t));return}if(d==="any")i(Hi(oa("Any"),t));else if(d==="digit")i(Hi(oa("Nd",{negate:p}),t));else if(d!=="dot")if(d==="text_segment"){if(a==="strict")throw new Error(Ee`Use of "\X" requires non-strict accuracy`);const y="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",v=Ee`\p{RI}{2}|${y}(?:\u200D${y})*`;i(lt(oi(Ee`(?>\r\n|${o?Ee`\p{RGI_Emoji}`:v}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(d==="hex")i(Hi(oa("AHex",{negate:p}),t));else if(d==="newline")i(lt(oi(p?`[^
172
172
  ]`:`(?>\r
173
173
  ?|[
174
- \v\f…\u2028\u2029])`),t));else if(d==="posix")if(!o&&(g==="graph"||g==="print")){if(a==="strict")throw new Error(`POSIX class "${g}" requires min target ES2024 or non-strict accuracy`);let y={graph:"!-~",print:" -~"}[g];p&&(y=`\0-${gt(y.codePointAt(0)-1)}${gt(y.codePointAt(2)+1)}-􏿿`),i(at(ii(`[${y}]`),t))}else i(at(Qf(ii(fR.get(g)),p),t));else if(d==="property")sh.has(Ks(g))||(e.key="sc");else if(d==="space")i(Mi(ra("space",{negate:p}),t));else if(d==="word")i(at(Qf(ii(ni),p),t));else throw new Error(`Unexpected character set kind "${d}"`)},Directive({node:e,parent:t,root:i,remove:a,replaceWith:o,removeAllPrevSiblings:s,removeAllNextSiblings:c}){const{kind:f,flags:d}=e;if(f==="flags")if(!d.enable&&!d.disable)a();else{const p=En({flags:d});p.body[0].body=c(),o(at(p,t),{traverse:!0})}else if(f==="keep"){const p=i.body[0],y=i.body.length===1&&Wv(p,{type:"Group"})&&p.body[0].body.length===1?p.body[0]:i;if(t.parent!==y||y.body.length>1)throw new Error(Ee`Uses "\K" in a way that's unsupported`);const b=ir({behind:!0});b.body[0].body=s(),o(at(b,t))}else throw new Error(`Unexpected directive kind "${f}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(i=>delete e[i]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:i}=e.flags;t?.extended&&delete t.extended,i?.extended&&delete i.extended,t?.dotAll&&i?.dotAll&&delete t.dotAll,t?.ignoreCase&&i?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,i&&!Object.keys(i).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:i}=e;i==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:i}){const{kind:a}=e;if(a==="fail")i(at(ir({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${a.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=En();t.body[0].body.push(e.body),e.body=at(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const i=[];let a=!1,o=!1;for(const s of e.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{const c=p1(s.body);c?(a=!0,Array.isArray(c)?i.push(...c):i.push(c)):o=!0}a&&!o&&i.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:i,strategy:a}){if(t==="strict"&&i&&a)throw new Error(Ee`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:i}=e;typeof i=="string"&&!Xf(i)&&(i=Yf(i,t),e.ref=i)}},mR={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:i}){const{orphan:a,ref:o}=e;a||i.set(e,[...t.get(o).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:i,skip:a},{groupOriginByCopy:o,groupsByName:s,multiplexCapturesToLeftByRef:c,openRefs:f,reffedNodesByReferencer:d}){const p=o.get(e);if(p&&f.has(e.number)){const y=Mi(q0(e.number),t);d.set(y,f.get(e.number)),i(y);return}f.set(e.number,e),c.set(e.number,[]),e.name&&Ol(c,e.name,[]);const g=c.get(e.name??e.number);for(let y=0;y<g.length;y++){const b=g[y];if(p===b.node||p&&p===b.origin||e===b.origin){g.splice(y,1);break}}if(c.get(e.number).push({node:e,origin:p}),e.name&&c.get(e.name).push({node:e,origin:p}),e.name){const y=Ol(s,e.name,new Map);let b=!1;if(p)b=!0;else for(const v of y.values())if(!v.hasDuplicateNameToRemove){b=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:b})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Us(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:i},a){const{isRecursive:o,ref:s}=e;if(o){let g=t;for(;(g=g.parent)&&!(g.type==="CapturingGroup"&&(g.name===s||g.number===s)););a.reffedNodesByReferencer.set(e,g);return}const c=a.subroutineRefMap.get(s),f=s===0,d=f?q0(0):f1(c,a.groupOriginByCopy,null);let p=d;if(!f){const g=d1(vR(c,b=>b.type==="Group"&&!!b.flags)),y=g?Us(a.globalFlags,g):a.globalFlags;yR(y,a.currentFlags)||(p=En({flags:_R(y)}),p.body[0].body.push(d))}i(at(p,t),{traverse:!f})}},gR={Backreference({node:e,parent:t,replaceWith:i},a){if(e.orphan){a.highestOrphanBackref=Math.max(a.highestOrphanBackref,e.ref);return}const s=a.reffedNodesByReferencer.get(e).filter(c=>bR(c,e));if(!s.length)i(at(ir({negate:!0}),t));else if(s.length>1){const c=En({atomic:!0,body:s.reverse().map(f=>or({body:[Td(f.number)]}))});i(at(c,t))}else e.ref=s[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const i=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let a=0;a<i;a++){const o=e1();e.body.at(-1).body.push(o)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function c1(e){Al(e,{"*"({node:t,parent:i}){t.parent=i}})}function yR(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function bR(e,t){let i=t;do{if(i.type==="Regex")return!1;if(i.type==="Alternative")continue;if(i===e)return!1;const a=h1(i.parent);for(const o of a){if(o===i)break;if(o===e||m1(o,e))return!0}}while(i=i.parent);throw new Error("Unexpected path")}function f1(e,t,i,a){const o=Array.isArray(e)?[]:{};for(const[s,c]of Object.entries(e))s==="parent"?o.parent=Array.isArray(i)?a:i:c&&typeof c=="object"?o[s]=f1(c,t,o,i):(s==="type"&&c==="CapturingGroup"&&t.set(o,t.get(e)??e),o[s]=c);return o}function q0(e){const t=n1(e);return t.isRecursive=!0,t}function vR(e,t){const i=[];for(;e=e.parent;)(!t||t(e))&&i.push(e);return i}function Yf(e,t){if(t.has(e))return t.get(e);const i=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,i),i}function d1(e){const t=["dotAll","ignoreCase"],i={enable:{},disable:{}};return e.forEach(({flags:a})=>{t.forEach(o=>{a.enable?.[o]&&(delete i.disable[o],i.enable[o]=!0),a.disable?.[o]&&(i.disable[o]=!0)})}),Object.keys(i.enable).length||delete i.enable,Object.keys(i.disable).length||delete i.disable,i.enable||i.disable?i:null}function _R({dotAll:e,ignoreCase:t}){const i={};return(e||t)&&(i.enable={},e&&(i.enable.dotAll=!0),t&&(i.enable.ignoreCase=!0)),(!e||!t)&&(i.disable={},!e&&(i.disable.dotAll=!0),!t&&(i.disable.ignoreCase=!0)),i}function h1(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function p1(e){const t=e.find(i=>i.kind==="search_start"||xR(i,{negate:!1})||!SR(i));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const i=[];for(const a of t.body){const o=p1(a.body);if(!o)return null;Array.isArray(o)?i.push(...o):i.push(o)}return i}return null}function m1(e,t){const i=h1(e)??[];for(const a of i)if(a===t||m1(a,t))return!0;return!1}function SR({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function ER(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function xR(e,t){const i={negate:null,...t};return e.type==="LookaroundAssertion"&&(i.negate===null||e.negate===i.negate)&&e.body.length===1&&Wv(e.body[0],{type:"Assertion",kind:"search_start"})}function Xf(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function ii(e,t){const a=Jv(e,{...t,unicodePropertyMap:sh}).body;return a.length>1||a[0].body.length>1?En({body:a}):a[0].body[0]}function Qf(e,t){return e.negate=t,e}function Mi(e,t){return e.parent=t,e}function at(e,t){return c1(e),e.parent=t,e}function CR(e,t){const i=o1(t),a=Dd(i.target,"ES2024"),o=Dd(i.target,"ES2025"),s=i.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let c=null,f=null;if(!o){const v=[e.flags.ignoreCase];Al(e,wR,{getCurrentModI:()=>v.at(-1),popModI(){v.pop()},pushModI(S){v.push(S)},setHasCasedChar(){v.at(-1)?c=!0:f=!0}})}const d={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||c)&&!f)};let p=e;const g={accuracy:i.accuracy,appliedGlobalFlags:d,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:p,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!o&&c&&f),useFlagMods:o,useFlagV:a,verbose:i.verbose};function y(v){return g.lastNode=p,p=v,rR(AR[v.type],`Unexpected node type "${v.type}"`)(v,g,y)}const b={pattern:e.body.map(y).join("|"),flags:y(e.flags),options:{...e.options}};return a||(delete b.options.force.v,b.options.disable.v=!0,b.options.unicodeSetsPlugin=null),b._captureTransfers=new Map,b._hiddenCaptures=[],g.captureMap.forEach((v,S)=>{v.hidden&&b._hiddenCaptures.push(S),v.transferTo&&Ol(b._captureTransfers,v.transferTo,[]).push(S)}),b}var wR={"*":{enter({node:e},t){if(Y0(e)){const i=t.getCurrentModI();t.pushModI(e.flags?Us({ignoreCase:i},e.flags).ignoreCase:i)}},exit({node:e},t){Y0(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){uh(gt(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},i){t(),g1(e,{firstOnly:!0}).length&&i.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&u1.has(e.value)&&t.setHasCasedChar()}},AR={Alternative({body:e},t,i){return e.map(i).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Ee`\B`:Ee`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,i){const{body:a,name:o,number:s}=e,c={ignoreCase:t.currentFlags.ignoreCase},f=t.originMap.get(e);return f&&(c.hidden=!0,s>f.number&&(c.transferTo=f.number)),t.captureMap.set(s,c),`(${o?`?<${o}>`:""}${a.map(i).join("|")})`},Character({value:e},t){const i=gt(e),a=ea(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(a!==i)return a;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&uh(i)){const o=s1(i);return t.inCharClass?o.join(""):o.length>1?`[${o.join("")}]`:o[0]}return i},CharacterClass(e,t,i){const{kind:a,negate:o,parent:s}=e;let{body:c}=e;if(a==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");xn.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&c.some(X0)&&(c=[Zs(45),...c.filter(p=>!X0(p))]);const f=()=>`[${o?"^":""}${c.map(i).join(a==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||xn.bugNestedClassIgnoresNegation)&&!o){const g=c.filter(y=>y.type==="CharacterClass"&&y.kind==="union"&&y.negate);if(g.length){const y=En(),b=y.body[0];return y.parent=s,b.parent=y,c=c.filter(v=>!g.includes(v)),e.body=c,c.length?(e.parent=b,b.body.push(e)):y.body.pop(),g.forEach(v=>{const S=or({body:[v]});v.parent=S,S.parent=y,y.body.push(S)}),i(y)}}t.inCharClass=!0;const p=f();return t.inCharClass=!1,p}const d=c[0];if(a==="union"&&!o&&d&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(xn.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&c.length===1&&d.type!=="CharacterClassRange"))return c.map(i).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return f()},CharacterClassRange(e,t){const i=e.min.value,a=e.max.value,o={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=ea(i,o),c=ea(a,o),f=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const d=g1(e);DR(d).forEach(g=>{f.add(Array.isArray(g)?`${ea(g[0],o)}-${ea(g[1],o)}`:ea(g,o))})}return`${s}-${c}${[...f].join("")}`},CharacterSet({kind:e,negate:t,value:i,key:a},o){if(e==="dot")return o.currentFlags.dotAll?o.appliedGlobalFlags.dotAll||o.useFlagMods?".":"[^]":Ee`[^\n]`;if(e==="digit")return t?Ee`\D`:Ee`\d`;if(e==="property"){if(o.useAppliedIgnoreCase&&o.currentFlags.ignoreCase&&u1.has(i))throw new Error(`Unicode property "${i}" can't be case-insensitive when other chars have specific case`);return`${t?Ee`\P`:Ee`\p`}{${a?`${a}=`:""}${i}}`}if(e==="word")return t?Ee`\W`:Ee`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:i,parent:a},o,s){const c=o.currentFlags;i&&(o.currentFlags=Us(c,i));const f=t.map(s).join("|"),d=!o.verbose&&t.length===1&&a.type!=="Quantifier"&&!e&&(!o.useFlagMods||!i)?f:`(?${OR(e,i,o.useFlagMods)}${f})`;return o.currentFlags=c,d},LookaroundAssertion({body:e,kind:t,negate:i},a,o){return`(?${`${t==="lookahead"?"":"<"}${i?"!":"="}`}${e.map(o).join("|")})`},Quantifier(e,t,i){return i(e.body)+NR(e)},Subroutine({isRecursive:e,ref:t},i){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const a=i.recursionLimit;return t===0?`(?R=${a})`:Ee`\g<${t}&R=${a}>`}},kR=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),TR=new Set(["-","\\","]","^","["]),LR=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),F0=new Map([[9,Ee`\t`],[10,Ee`\n`],[11,Ee`\v`],[12,Ee`\f`],[13,Ee`\r`],[8232,Ee`\u2028`],[8233,Ee`\u2029`],[65279,Ee`\uFEFF`]]),RR=new RegExp("^\\p{Cased}$","u");function uh(e){return RR.test(e)}function g1(e,t){const i=!!t?.firstOnly,a=e.min.value,o=e.max.value,s=[];if(a<65&&(o===65535||o>=131071)||a===65536&&o>=131071)return s;for(let c=a;c<=o;c++){const f=gt(c);if(!uh(f))continue;const d=s1(f).filter(p=>{const g=p.codePointAt(0);return g<a||g>o});if(d.length&&(s.push(...d),i))break}return s}function ea(e,{escDigit:t,inCharClass:i,useFlagV:a}){if(F0.has(e))return F0.get(e);if(e<32||e>126&&e<160||e>262143||t&&MR(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const o=i?a?LR:TR:kR,s=gt(e);return(o.has(s)?"\\":"")+s}function DR(e){const t=e.map(o=>o.codePointAt(0)).sort((o,s)=>o-s),i=[];let a=null;for(let o=0;o<t.length;o++)t[o+1]===t[o]+1?a??=t[o]:a===null?i.push(t[o]):(i.push([a,t[o]]),a=null);return i}function OR(e,t,i){if(e)return">";let a="";if(t&&i){const{enable:o,disable:s}=t;a=(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")+(s?"-":"")+(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")}return`${a}:`}function NR({kind:e,max:t,min:i}){let a;return!i&&t===1?a="?":!i&&t===1/0?a="*":i===1&&t===1/0?a="+":i===t?a=`{${i}}`:a=`{${i},${t===1/0?"":t}}`,a+{greedy:"",lazy:"?",possessive:"+"}[e]}function Y0({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function MR(e){return e>47&&e<58}function X0({type:e,value:t}){return e==="Character"&&t===45}var IR=class Od extends RegExp{#t=new Map;#e=null;#i;#n=null;#r=null;rawOptions={};get source(){return this.#i||"(?:)"}constructor(t,i,a){const o=!!a?.lazyCompile;if(t instanceof RegExp){if(a)throw new Error("Cannot provide options when copying a regexp");const s=t;super(s,i),this.#i=s.source,s instanceof Od&&(this.#t=s.#t,this.#n=s.#n,this.#r=s.#r,this.rawOptions=s.rawOptions)}else{const s={hiddenCaptures:[],strategy:null,transfers:[],...a};super(o?"":t,i),this.#i=t,this.#t=UR(s.hiddenCaptures,s.transfers),this.#r=s.strategy,this.rawOptions=a??{}}o||(this.#e=this)}exec(t){if(!this.#e){const{lazyCompile:o,...s}=this.rawOptions;this.#e=new Od(this.#i,this.flags,s)}const i=this.global||this.sticky,a=this.lastIndex;if(this.#r==="clip_search"&&i&&a){this.lastIndex=0;const o=this.#a(t.slice(a));return o&&(zR(o,a,t,this.hasIndices),this.lastIndex+=a),o}return this.#a(t)}#a(t){this.#e.lastIndex=this.lastIndex;const i=super.exec.call(this.#e,t);if(this.lastIndex=this.#e.lastIndex,!i||!this.#t.size)return i;const a=[...i];i.length=1;let o;this.hasIndices&&(o=[...i.indices],i.indices.length=1);const s=[0];for(let c=1;c<a.length;c++){const{hidden:f,transferTo:d}=this.#t.get(c)??{};if(f?s.push(null):(s.push(i.length),i.push(a[c]),this.hasIndices&&i.indices.push(o[c])),d&&a[c]!==void 0){const p=s[d];if(!p)throw new Error(`Invalid capture transfer to "${p}"`);if(i[p]=a[c],this.hasIndices&&(i.indices[p]=o[c]),i.groups){this.#n||(this.#n=HR(this.source));const g=this.#n.get(d);g&&(i.groups[g]=a[c],this.hasIndices&&(i.indices.groups[g]=o[c]))}}}return i}};function zR(e,t,i,a){if(e.index+=t,e.input=i,a){const o=e.indices;for(let c=0;c<o.length;c++){const f=o[c];f&&(o[c]=[f[0]+t,f[1]+t])}const s=o.groups;s&&Object.keys(s).forEach(c=>{const f=s[c];f&&(s[c]=[f[0]+t,f[1]+t])})}}function UR(e,t){const i=new Map;for(const a of e)i.set(a,{hidden:!0});for(const[a,o]of t)for(const s of o)Ol(i,s,{}).transferTo=a;return i}function HR(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,i=new Map;let a=0,o=0,s;for(;s=t.exec(e);){const{0:c,groups:{capture:f,name:d}}=s;c==="["?a++:a?c==="]"&&a--:f&&(o++,d&&i.set(o,d))}return i}function PR(e,t){const i=BR(e,t);return i.options?new IR(i.pattern,i.flags,i.options):new RegExp(i.pattern,i.flags)}function BR(e,t){const i=o1(t),a=Jv(e,{flags:i.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:i.rules.captureGroup,singleline:i.rules.singleline},skipBackrefValidation:i.rules.allowOrphanBackrefs,unicodePropertyMap:sh}),o=hR(a,{accuracy:i.accuracy,asciiWordBoundaries:i.rules.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,bestEffortTarget:i.target}),s=CR(o,i),c=nR(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),f=eR(c.pattern),d=JL(f.pattern,{captureTransfers:c.captureTransfers,hiddenCaptures:c.hiddenCaptures}),p={pattern:d.pattern,flags:`${i.hasIndices?"d":""}${i.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(i.avoidSubclass){if(i.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const g=d.hiddenCaptures.sort((S,T)=>S-T),y=Array.from(d.captureTransfers),b=o._strategy,v=p.pattern.length>=i.lazyCompileLength;(g.length||y.length||b||v)&&(p.options={...g.length&&{hiddenCaptures:g},...y.length&&{transfers:y},...b&&{strategy:b},...v&&{lazyCompile:v}})}return p}const Q0=4294967295;class jR{constructor(t,i={}){this.patterns=t,this.options=i;const{forgiving:a=!1,cache:o,regexConstructor:s}=i;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(c=>{if(typeof c!="string")return c;const f=o?.get(c);if(f){if(f instanceof RegExp)return f;if(a)return null;throw f}try{const d=s(c);return o?.set(c,d),d}catch(d){if(o?.set(c,d),a)return null;throw d}})}regexps;findNextMatchSync(t,i,a){const o=typeof t=="string"?t:t.content,s=[];function c(f,d,p=0){return{index:f,captureIndices:d.indices.map(g=>g==null?{start:Q0,end:Q0,length:0}:{start:g[0]+p,end:g[1]+p,length:g[1]-g[0]})}}for(let f=0;f<this.regexps.length;f++){const d=this.regexps[f];if(d)try{d.lastIndex=i;const p=d.exec(o);if(!p)continue;if(p.index===i)return c(f,p,0);s.push([f,p,0])}catch(p){if(this.options.forgiving)continue;throw p}}if(s.length){const f=Math.min(...s.map(d=>d[1].index));for(const[d,p,g]of s)if(p.index===f)return c(d,p,g)}return null}}function VR(e,t){return PR(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function GR(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=i=>VR(i,{target:t.target}),{createScanner(i){return new jR(i,t)},createString(i){return{content:i}}}}const Z0=new Map;function $R({className:e,children:t}){const[i,a]=ue.useState(null),o=e?.match(/language-([^\s]+)/)?.[1]??"text",s=String(t??"").replace(/\n$/,"");return ue.useEffect(()=>{let c=!1;return a(null),qR(s,o).then(f=>{c||a(f)}),()=>{c=!0}},[s,o]),i===null?q.jsx("pre",{children:q.jsx("code",{children:t})}):q.jsx("div",{dangerouslySetInnerHTML:{__html:i}})}async function qR(e,t){const i=`${t}\0${e}`,a=Z0.get(i);if(a)return a;const o=FR(e,t).catch(()=>null);return Z0.set(i,o),o}async function FR(e,t){try{return await L0(e,{lang:t,theme:"github-dark-default"})}catch{return L0(e,{lang:"text",theme:"github-dark-default"})}}function y1({content:e,className:t,variant:i}){const a=["markdown-content",i?`markdown-content-${i}`:null,t].filter(Boolean).join(" ");return q.jsx("div",{className:a,children:q.jsx(JA,{components:{pre({children:o}){if(ue.isValidElement(o)){const{className:s,children:c}=o.props;return q.jsx($R,{className:s,children:c})}return q.jsx("pre",{children:o})}},children:e})})}function YR({open:e,content:t,loading:i,onClose:a}){return ue.useEffect(()=>{if(!e)return;const o=s=>{s.key==="Escape"&&a()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,a]),e?q.jsx("div",{className:"brief-dialog-backdrop",onClick:a,children:q.jsxs("div",{className:"brief-dialog",role:"dialog","aria-modal":"true","aria-label":"Reviewer brief",onClick:o=>o.stopPropagation(),children:[q.jsxs("div",{className:"brief-dialog-header",children:[q.jsx("div",{className:"brief-dialog-heading",children:q.jsx("div",{className:"brief-dialog-title",children:"brief"})}),q.jsx("div",{className:"brief-dialog-actions",children:q.jsx(_l,{icon:Ab,label:"close brief",className:"brief-dialog-close",onClick:a})})]}),q.jsx("div",{className:"brief-dialog-body-wrap",children:i&&!t?q.jsx("div",{className:"brief-dialog-empty",children:"Generating brief…"}):q.jsx(y1,{content:t,className:"brief-dialog-body",variant:"brief"})})]})}):null}const XR={position:"absolute",top:0,bottom:0,textAlign:"center"},QR={display:"contents"};function K0(){return null}const Hs="diffs-container",ZR=/(?=^From [a-f0-9]+ .+$)/m,Cs=/(?=^diff --git)/gm,W0=/(?=^---\s+\S)/gm,KR=/(?=^@@ )/gm,WR=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,Zf=new RegExp("(?<=\\n)"),JR=/^(---|\+\+\+)\s+([^\t\r\n]+)/,eD=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,tD=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,nD=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,ch="header-prefix",fh="header-metadata",dh="header-custom",Mn={dark:"pierre-dark",light:"pierre-light"},b1="data-theme-css",v1="data-unsafe-css",ca=1,iD={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,hunkSeparatorHeight:32,fileGap:8},rD=Object.freeze({fromStart:0,fromEnd:0}),J0={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},aD={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function Nl(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function lD(e,t){return typeof window>"u"&&t!=null?q.jsxs(q.Fragment,{children:[q.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:t}}),e]}):q.jsx(q.Fragment,{children:e})}const oD=ue.createContext(void 0);function sD(){return ue.useContext(oD)}const lr=new Map,Kf=new Map,Nd=new Map,Md=new Set;function eb(e,t){e=Array.isArray(e)?e:[e];for(let i of e){let a;if(typeof i=="string"){if(a=lr.get(i),a==null)throw new Error(`loadResolvedThemes: ${i} is not resolved, you must resolve it before calling loadResolvedThemes`)}else a=i,i=i.name,lr.has(i)||lr.set(i,a);Md.has(i)||(Md.add(i),t.loadThemeSync(a))}}const Ml=new Map,Wf=new Map,uD=new Map,Id=new Set;function tb(e,t){e=Array.isArray(e)?e:[e];for(const i of e){if(Id.has(i.name))continue;let a=Ml.get(i.name);a==null&&(a=i,Ml.set(i.name,a)),Id.add(a.name),t.loadLanguageSync(a.data)}}function _1(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function cD(e){if(_1())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=Wf.get(e);if(t!=null)return t;try{let i=uD.get(e);if(i==null&&Object.prototype.hasOwnProperty.call(Ad,e)&&(i=Ad[e]),i==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const a=i().then(({default:o})=>{const s={name:e,data:o};return Ml.has(e)||Ml.set(e,s),s});return Wf.set(e,a),await a}finally{Wf.delete(e)}}function fD(e){return Ml.get(e)??cD(e)}async function dD(e){if(_1())throw new Error(`resolveTheme("${e}") cannot be called from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=Kf.get(e);if(t!=null)return t;try{const i=Nd.get(e)??Gv[e];if(i==null)throw new Error(`resolveTheme: No valid loader for ${e}`);const a=i().then(s=>hD(e,"default"in s?s.default:s));Kf.set(e,a);const o=await a;if(o.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${o.name}`);return lr.set(o.name,o),o}finally{Kf.delete(e)}}function hD(e,t){const i=lr.get(e);return i??(t=Ys(t),lr.set(e,t),t)}function pD(e){return lr.get(e)??dD(e)}function S1(e,t){if(Nd.has(e)){console.error("SharedHighlight.registerCustomTheme: theme name already registered",e);return}Nd.set(e,t)}let On;async function mD({themes:e,langs:t,preferredHighlighter:i="shiki-js"}){On??=Fv({themes:[],langs:["text"],engine:i==="shiki-wasm"?qv(x(()=>import("./wasm-CG6Dc4jp.js"),[])):GR()});const a=yD(On)?await On:On;On=a;const o=[];for(const c of t){if(c==="text"||c==="ansi")continue;const f=fD(c);"then"in f?o.push(f):tb(f,a)}const s=[];for(const c of e){const f=pD(c);"then"in f?s.push(f):eb(f,On)}return(o.length>0||s.length>0)&&await Promise.all([Promise.all(o).then(c=>{tb(c,a)}),Promise.all(s).then(c=>{eb(c,a)})]),a}function gD(){if(On!=null&&!("then"in On))return On}function yD(e=On){return e!=null&&"then"in e}S1("pierre-dark",async()=>{const e=await x(()=>import("./pierre-dark-ClCaJvdG.js"),[]);return{...e.default??e,name:"pierre-dark"}});S1("pierre-light",async()=>{const e=await x(()=>import("./pierre-light-zjGsWSiE.js"),[]);return{...e.default??e,name:"pierre-light"}});function E1(e=Mn){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function x1(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}const ta=new Map,bl={"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",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 da(e){if(ta.has(e))return ta.get(e)??"text";if(bl[e]!=null)return bl[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(ta.has(t[1]))return ta.get(t[1])??"text";if(bl[t[1]]!=null)return bl[t[1]]??"text"}const i=e.match(/\.([^.]+)$/)?.[1]??"";return ta.has(i)?ta.get(i)??"text":bl[i]??"text"}function ha(e){return e.replace(/\n$|\r\n$/,"")}function li(e){return{type:"text",value:e}}function Re({tagName:e,children:t=[],properties:i={}}){return{type:"element",tagName:e,properties:i,children:t}}function Ps({name:e,width:t=16,height:i=16,properties:a}){return Re({tagName:"svg",properties:{width:t,height:i,viewBox:"0 0 16 16",...a},children:[Re({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function bD(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 ms(e){return Re({tagName:"div",properties:{"data-gutter":""},children:e})}function vD(e,t,i,a={}){return Re({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":i,...a},children:t!=null?[Re({tagName:"span",properties:{"data-line-number-content":""},children:[li(`${t}`)]})]:void 0})}function _n(e,t,i){return Re({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":i,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${i};`:`grid-row: span ${i};min-height:calc(${i} * 1lh);`}})}function _D(e,t,i){const a=typeof i.lineInfo=="function"?i.lineInfo(t):i.lineInfo[t-1];if(a==null){const o=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(o,{node:e,line:t,state:i}),new Error(o)}return e.tagName="div",e.properties["data-line"]=a.lineNumber,e.properties["data-alt-line"]=a.altLineNumber,e.properties["data-line-type"]=a.type,e.properties["data-line-index"]=a.lineIndex,e.children.length===0&&e.children.push(li(`
175
- `)),e}function SD(e={}){const{classPrefix:t="__shiki_",classSuffix:i="",classReplacer:a=f=>f}=e,o=new Map;function s(f){return Object.entries(f).map(([d,p])=>`${d}:${p}`).join(";")}function c(f){const d=typeof f=="string"?f:s(f);let p=t+ED(d)+i;return p=a(p),o.has(p)||o.set(p,typeof f=="string"?f:{...f}),p}return{name:"@shikijs/transformers:style-to-class",pre(f){if(!f.properties.style)return;const d=c(f.properties.style);delete f.properties.style,this.addClassToHast(f,d)},tokens(f){for(const d of f)for(const p of d){if(!p.htmlStyle)continue;const g=c(p.htmlStyle);p.htmlStyle={},p.htmlAttrs||={},p.htmlAttrs.class?p.htmlAttrs.class+=` ${g}`:p.htmlAttrs.class=g}},getClassRegistry(){return o},getCSS(){let f="";for(const[d,p]of o.entries())f+=`.${d}{${typeof p=="string"?p:s(p)}}`;return f},clearRegistry(){o.clear()}}}function ED(e,t=0){let i=3735928559^t,a=1103547991^t;for(let o=0,s;o<e.length;o++)s=e.charCodeAt(o),i=Math.imul(i^s,2654435761),a=Math.imul(a^s,1597334677);return i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(a^a>>>13,3266489909),a=Math.imul(a^a>>>16,2246822507),a^=Math.imul(i^i>>>13,3266489909),(4294967296*(2097151&a)+(i>>>0)).toString(36).slice(0,6)}function xD(e=!1){const t={lineInfo:[]},i=[{line(a){return delete a.properties.class,a},pre(a){const o=bD(a),s=[];if(o!=null){let c=1;for(const f of o.children)f.type==="element"&&(s.push(_D(f,c,t)),c++);o.children=s}return a}}];return e&&i.push(CD,nb),{state:t,transformers:i,toClass:nb}}const nb=SD({classPrefix:"hl-"}),CD={name:"token-style-normalizer",tokens(e){for(const t of e)for(const i of t){if(i.htmlStyle!=null)continue;const a={};i.color!=null&&(a.color=i.color),i.bgColor!=null&&(a["background-color"]=i.bgColor),i.fontStyle!=null&&i.fontStyle!==0&&((i.fontStyle&1)!==0&&(a["font-style"]="italic"),(i.fontStyle&2)!==0&&(a["font-weight"]="bold"),(i.fontStyle&4)!==0&&(a["text-decoration"]="underline")),Object.keys(a).length>0&&(i.htmlStyle=a)}}};function Sn(e){return`--${e==="token"?"diffs-token":"diffs"}-`}function wD({theme:e=Mn,highlighter:t,prefix:i}){let a="";if(typeof e=="string"){const o=t.getTheme(e);a+=`color:${o.fg};`,a+=`background-color:${o.bg};`,a+=`${Sn("global")}fg:${o.fg};`,a+=`${Sn("global")}bg:${o.bg};`,a+=Jf(o,i)}else{let o=t.getTheme(e.dark);a+=`${Sn("global")}dark:${o.fg};`,a+=`${Sn("global")}dark-bg:${o.bg};`,a+=Jf(o,"dark"),o=t.getTheme(e.light),a+=`${Sn("global")}light:${o.fg};`,a+=`${Sn("global")}light-bg:${o.bg};`,a+=Jf(o,"light")}return a}function Jf(e,t){t=t!=null?`${t}-`:"";let i="";const a=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];a!=null&&(i+=`${Sn("global")}${t}addition-color:${a};`);const o=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];o!=null&&(i+=`${Sn("global")}${t}deletion-color:${o};`);const s=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return s!=null&&(i+=`${Sn("global")}${t}modified-color:${s};`),i}function ib(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 rb(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function AD(e){const t=e.lang??da(e.name),i=e.lang??(e.prevName!=null?da(e.prevName):"text");return t==="text"&&i==="text"}function Bs({diff:e,diffStyle:t,startingLine:i=0,totalLines:a=1/0,expandedHunks:o,collapsedContextThreshold:s=ca,callback:c}){const f={finalHunk:e.hunks.at(-1),viewportStart:i,viewportEnd:i+a,isWindowedHighlight:i>0||a<1/0,splitCount:0,unifiedCount:0,shouldBreak(){if(!f.isWindowedHighlight)return!1;const g=f.unifiedCount>=i+a,y=f.splitCount>=i+a;return t==="unified"?g:(t==="split"||g)&&y},shouldSkip(g,y){if(!f.isWindowedHighlight)return!1;const b=f.unifiedCount+g<i,v=f.splitCount+y<i;return t==="unified"?b:(t==="split"||b)&&v},incrementCounts(g,y){(t==="unified"||t==="both")&&(f.unifiedCount+=g),(t==="split"||t==="both")&&(f.splitCount+=y)},isInWindow(g,y){if(!f.isWindowedHighlight)return!0;const b=f.isInUnifiedWindow(g),v=f.isInSplitWindow(y);return t==="unified"?b:t==="split"?v:b||v},isInUnifiedWindow(g){return!f.isWindowedHighlight||f.unifiedCount>=i-g&&f.unifiedCount<i+a},isInSplitWindow(g){return!f.isWindowedHighlight||f.splitCount>=i-g&&f.splitCount<i+a},emit(g,y=!1){return y||(t==="unified"?f.incrementCounts(1,0):t==="split"?f.incrementCounts(0,1):f.incrementCounts(1,1)),c(g)??!1}};e:for(const[g,y]of e.hunks.entries()){let T=function($,ie){return v==null||v.collapsedLines<=0||v.fromStart+v.fromEnd>0?0:t==="unified"?$===y.unifiedLineStart+y.unifiedLineCount-1?v.collapsedLines:0:ie===y.splitLineStart+y.splitLineCount-1?v.collapsedLines:0},L=function(){if(b.collapsedLines===0)return 0;const $=b.collapsedLines;return b.collapsedLines=0,$};var d=T,p=L;if(f.shouldBreak())break;const b=ab(e.isPartial,y.collapsedBefore,o,g,s),v=(()=>{if(y!==f.finalHunk||!kD(e))return;const $=e.additionLines.length-(y.additionLineIndex+y.additionCount),ie=e.deletionLines.length-(y.deletionLineIndex+y.deletionCount);if($!==ie)throw new Error(`iterateOverDiff: trailing context mismatch (additions=${$}, deletions=${ie}) for ${e.name}`);const ne=Math.min($,ie);return ab(e.isPartial,ne,o,e.hunks.length,s)})(),S=b.fromStart+b.fromEnd;if(f.shouldSkip(S,S))f.incrementCounts(S,S),L();else{let $=y.unifiedLineStart-b.rangeSize,ie=y.splitLineStart-b.rangeSize,ne=y.deletionLineIndex-b.rangeSize,W=y.additionLineIndex-b.rangeSize,J=y.deletionStart-b.rangeSize,fe=y.additionStart-b.rangeSize,ee=0;for(;ee<b.fromStart;){if(f.isInWindow(0,0)){if(f.emit({hunkIndex:g,hunk:y,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:J+ee,lineIndex:ne+ee,noEOFCR:!1,unifiedLineIndex:$+ee,splitLineIndex:ie+ee},additionLine:{unifiedLineIndex:$+ee,splitLineIndex:ie+ee,lineIndex:W+ee,lineNumber:fe+ee,noEOFCR:!1}}))break e}else f.incrementCounts(1,1);ee++}for($=y.unifiedLineStart-b.fromEnd,ie=y.splitLineStart-b.fromEnd,ne=y.deletionLineIndex-b.fromEnd,W=y.additionLineIndex-b.fromEnd,J=y.deletionStart-b.fromEnd,fe=y.additionStart-b.fromEnd,ee=0;ee<b.fromEnd;){if(f.isInWindow(0,0)){if(f.emit({hunkIndex:g,hunk:y,collapsedBefore:L(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:J+ee,lineIndex:ne+ee,noEOFCR:!1,unifiedLineIndex:$+ee,splitLineIndex:ie+ee},additionLine:{unifiedLineIndex:$+ee,splitLineIndex:ie+ee,lineIndex:W+ee,lineNumber:fe+ee,noEOFCR:!1}}))break e}else f.incrementCounts(1,1);ee++}}let A=y.unifiedLineStart,k=y.splitLineStart,C=y.deletionLineIndex,z=y.additionLineIndex,U=y.deletionStart,O=y.additionStart;const j=y.hunkContent.at(-1);for(const $ of y.hunkContent){if(f.shouldBreak())break e;const ie=$===j;if($.type==="context"){if(f.shouldSkip($.lines,$.lines))f.incrementCounts($.lines,$.lines),L();else{let ne=0;for(;ne<$.lines;){if(f.isInWindow(0,0)){const W=ie&&ne===$.lines-1,J=A+ne,fe=k+ne;if(f.emit({hunkIndex:g,hunk:y,collapsedBefore:L(),collapsedAfter:T(J,fe),type:"context",deletionLine:{lineNumber:U+ne,lineIndex:C+ne,noEOFCR:W&&y.noEOFCRDeletions,unifiedLineIndex:J,splitLineIndex:fe},additionLine:{unifiedLineIndex:J,splitLineIndex:fe,lineIndex:z+ne,lineNumber:O+ne,noEOFCR:W&&y.noEOFCRAdditions}}))break e}else f.incrementCounts(1,1);ne++}}A+=$.lines,k+=$.lines,C+=$.lines,z+=$.lines,U+=$.lines,O+=$.lines}else{const ne=Math.max($.deletions,$.additions),W=$.deletions+$.additions;if(!f.shouldSkip(W,ne)){const J=TD(f,$,t);for(const[fe,ee]of J)for(let te=fe;te<ee;te++){const H=T(A+te,t==="unified"?k+(te<$.deletions?te:te-$.deletions):k+te);if(f.emit(LD({hunkIndex:g,hunk:y,collapsedBefore:L(),collapsedAfter:H,diffStyle:t,index:te,unifiedLineIndex:A,splitLineIndex:k,additionLineIndex:z,deletionLineIndex:C,additionLineNumber:O,deletionLineNumber:U,content:$,isLastContent:ie,unifiedCount:W,splitCount:ne}),!0))break e}}L(),f.incrementCounts(W,ne),A+=W,k+=ne,C+=$.deletions,z+=$.additions,U+=$.deletions,O+=$.additions}}if(v!=null){const{collapsedLines:$,fromStart:ie,fromEnd:ne}=v,W=ie+ne;let J=0;for(;J<W;){if(f.shouldBreak())break e;if(f.isInWindow(0,0)){const fe=J===W-1;if(f.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:fe?$:0,type:"context-expanded",deletionLine:{lineNumber:U+J,lineIndex:C+J,noEOFCR:!1,unifiedLineIndex:A+J,splitLineIndex:k+J},additionLine:{unifiedLineIndex:A+J,splitLineIndex:k+J,lineIndex:z+J,lineNumber:O+J,noEOFCR:!1}}))break e}else f.incrementCounts(1,1);J++}}}}function ab(e,t,i,a,o){if(t=Math.max(t,0),t===0||e)return{fromStart:0,fromEnd:0,rangeSize:t,collapsedLines:Math.max(t,0)};if(i===!0||t<=o)return{fromStart:t,fromEnd:0,rangeSize:t,collapsedLines:0};const s=i?.get(a),c=Math.min(Math.max(s?.fromStart??0,0),t),f=Math.min(Math.max(s?.fromEnd??0,0),t),d=c+f,p=d>=t;return{fromStart:p?t:c,fromEnd:p?0:f,rangeSize:t,collapsedLines:Math.max(t-d,0)}}function kD(e){const t=e.hunks.at(-1);return t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0?!1:t.additionLineIndex+t.additionCount<e.additionLines.length||t.deletionLineIndex+t.deletionCount<e.deletionLines.length}function TD(e,t,i){if(!e.isWindowedHighlight)return[[0,i==="unified"?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];const a=i!=="split",o=i!=="unified",s=i==="unified"?"unified":"split",c=[];function f(y,b){if(y+b<=e.viewportStart||y>=e.viewportEnd)return;const v=Math.max(0,e.viewportStart-y),S=Math.min(b,e.viewportEnd-y);return S>v?[v,S]:void 0}function d(y,b){return s==="split"?y:b==="additions"?[y[0]+t.deletions,y[1]+t.deletions]:y}function p(y,b){if(y==null)return;const[v,S]=d(y,b);S>v&&c.push([v,S])}if(a&&(p(f(e.unifiedCount,t.deletions),"deletions"),p(f(e.unifiedCount+t.deletions,t.additions),"additions")),o&&(p(f(e.splitCount,t.deletions),"deletions"),p(f(e.splitCount,t.additions),"additions")),c.length===0)return c;c.sort((y,b)=>y[0]-b[0]);const g=[c[0]];for(const[y,b]of c.slice(1)){const v=g[g.length-1];y<=v[1]?v[1]=Math.max(v[1],b):g.push([y,b])}return g}function LD({hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,diffStyle:o,index:s,unifiedLineIndex:c,splitLineIndex:f,additionLineIndex:d,deletionLineIndex:p,additionLineNumber:g,deletionLineNumber:y,content:b,isLastContent:v,unifiedCount:S,splitCount:T}){const L=s<b.deletions?c+s:void 0,A=o==="unified"?s>=b.deletions?c+s:void 0:s<b.additions?c+b.deletions+s:void 0,k=o==="unified"?f+(s<b.deletions?s:s-b.deletions):f+s,C=s<b.deletions?p+s:void 0,z=s<b.deletions?y+s:void 0,U=o==="unified"?s>=b.deletions?d+(s-b.deletions):void 0:s<b.additions?d+s:void 0,O=o==="unified"?s>=b.deletions?g+(s-b.deletions):void 0:s<b.additions?g+s:void 0,j=o==="unified"?v&&s===b.deletions-1&&t.noEOFCRDeletions:v&&s===T-1&&t.noEOFCRDeletions,$=o==="unified"?v&&s===S-1&&t.noEOFCRAdditions:v&&s===T-1&&t.noEOFCRAdditions,ie=C!=null&&z!=null&&L!=null?{lineNumber:z,lineIndex:C,noEOFCR:j,unifiedLineIndex:L,splitLineIndex:k}:void 0,ne=U!=null&&O!=null&&A!=null?{unifiedLineIndex:A,splitLineIndex:k,lineIndex:U,lineNumber:O,noEOFCR:$}:void 0;if(ie==null&&ne!=null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:void 0,additionLine:ne};if(ie!=null&&ne==null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:ie,additionLine:void 0};if(ie==null||ne==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:ie,additionLine:ne}}class hh{diff(t,i,a={}){let o;typeof a=="function"?(o=a,a={}):"callback"in a&&(o=a.callback);const s=this.castInput(t,a),c=this.castInput(i,a),f=this.removeEmpty(this.tokenize(s,a)),d=this.removeEmpty(this.tokenize(c,a));return this.diffWithOptionsObj(f,d,a,o)}diffWithOptionsObj(t,i,a,o){var s;const c=k=>{if(k=this.postProcess(k,a),o){setTimeout(function(){o(k)},0);return}else return k},f=i.length,d=t.length;let p=1,g=f+d;a.maxEditLength!=null&&(g=Math.min(g,a.maxEditLength));const y=(s=a.timeout)!==null&&s!==void 0?s:1/0,b=Date.now()+y,v=[{oldPos:-1,lastComponent:void 0}];let S=this.extractCommon(v[0],i,t,0,a);if(v[0].oldPos+1>=d&&S+1>=f)return c(this.buildValues(v[0].lastComponent,i,t));let T=-1/0,L=1/0;const A=()=>{for(let k=Math.max(T,-p);k<=Math.min(L,p);k+=2){let C;const z=v[k-1],U=v[k+1];z&&(v[k-1]=void 0);let O=!1;if(U){const $=U.oldPos-k;O=U&&0<=$&&$<f}const j=z&&z.oldPos+1<d;if(!O&&!j){v[k]=void 0;continue}if(!j||O&&z.oldPos<U.oldPos?C=this.addToPath(U,!0,!1,0,a):C=this.addToPath(z,!1,!0,1,a),S=this.extractCommon(C,i,t,k,a),C.oldPos+1>=d&&S+1>=f)return c(this.buildValues(C.lastComponent,i,t))||!0;v[k]=C,C.oldPos+1>=d&&(L=Math.min(L,k-1)),S+1>=f&&(T=Math.max(T,k+1))}p++};if(o)(function k(){setTimeout(function(){if(p>g||Date.now()>b)return o(void 0);A()||k()},0)})();else for(;p<=g&&Date.now()<=b;){const k=A();if(k)return k}}addToPath(t,i,a,o,s){const c=t.lastComponent;return c&&!s.oneChangePerToken&&c.added===i&&c.removed===a?{oldPos:t.oldPos+o,lastComponent:{count:c.count+1,added:i,removed:a,previousComponent:c.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:i,removed:a,previousComponent:c}}}extractCommon(t,i,a,o,s){const c=i.length,f=a.length;let d=t.oldPos,p=d-o,g=0;for(;p+1<c&&d+1<f&&this.equals(a[d+1],i[p+1],s);)p++,d++,g++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return g&&!s.oneChangePerToken&&(t.lastComponent={count:g,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=d,p}equals(t,i,a){return a.comparator?a.comparator(t,i):t===i||!!a.ignoreCase&&t.toLowerCase()===i.toLowerCase()}removeEmpty(t){const i=[];for(let a=0;a<t.length;a++)t[a]&&i.push(t[a]);return i}castInput(t,i){return t}tokenize(t,i){return Array.from(t)}join(t){return t.join("")}postProcess(t,i){return t}get useLongestToken(){return!1}buildValues(t,i,a){const o=[];let s;for(;t;)o.push(t),s=t.previousComponent,delete t.previousComponent,t=s;o.reverse();const c=o.length;let f=0,d=0,p=0;for(;f<c;f++){const g=o[f];if(g.removed)g.value=this.join(a.slice(p,p+g.count)),p+=g.count;else{if(!g.added&&this.useLongestToken){let y=i.slice(d,d+g.count);y=y.map(function(b,v){const S=a[p+v];return S.length>b.length?S:b}),g.value=this.join(y)}else g.value=this.join(i.slice(d,d+g.count));d+=g.count,g.added||(p+=g.count)}}return o}}class RD extends hh{}const DD=new RD;function OD(e,t,i){return DD.diff(e,t,i)}const lb="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class ND extends hh{tokenize(t){const i=new RegExp(`(\\r?\\n)|[${lb}]+|[^\\S\\n\\r]+|[^${lb}]`,"ug");return t.match(i)||[]}}const MD=new ND;function ID(e,t,i){return MD.diff(e,t,i)}class zD extends hh{constructor(){super(...arguments),this.tokenize=HD}equals(t,i,a){return a.ignoreWhitespace?((!a.newlineIsToken||!t.includes(`
174
+ \v\f…\u2028\u2029])`),t));else if(d==="posix")if(!o&&(g==="graph"||g==="print")){if(a==="strict")throw new Error(`POSIX class "${g}" requires min target ES2024 or non-strict accuracy`);let y={graph:"!-~",print:" -~"}[g];p&&(y=`\0-${gt(y.codePointAt(0)-1)}${gt(y.codePointAt(2)+1)}-􏿿`),i(lt(oi(`[${y}]`),t))}else i(lt(Zf(oi(pR.get(g)),p),t));else if(d==="property")uh.has(Ks(g))||(e.key="sc");else if(d==="space")i(Hi(oa("space",{negate:p}),t));else if(d==="word")i(lt(Zf(oi(li),p),t));else throw new Error(`Unexpected character set kind "${d}"`)},Directive({node:e,parent:t,root:i,remove:a,replaceWith:o,removeAllPrevSiblings:s,removeAllNextSiblings:c}){const{kind:f,flags:d}=e;if(f==="flags")if(!d.enable&&!d.disable)a();else{const p=An({flags:d});p.body[0].body=c(),o(lt(p,t),{traverse:!0})}else if(f==="keep"){const p=i.body[0],y=i.body.length===1&&Jv(p,{type:"Group"})&&p.body[0].body.length===1?p.body[0]:i;if(t.parent!==y||y.body.length>1)throw new Error(Ee`Uses "\K" in a way that's unsupported`);const v=or({behind:!0});v.body[0].body=s(),o(lt(v,t))}else throw new Error(`Unexpected directive kind "${f}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(i=>delete e[i]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:i}=e.flags;t?.extended&&delete t.extended,i?.extended&&delete i.extended,t?.dotAll&&i?.dotAll&&delete t.dotAll,t?.ignoreCase&&i?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,i&&!Object.keys(i).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:i}=e;i==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:i}){const{kind:a}=e;if(a==="fail")i(lt(or({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${a.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=An();t.body[0].body.push(e.body),e.body=lt(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const i=[];let a=!1,o=!1;for(const s of e.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{const c=m1(s.body);c?(a=!0,Array.isArray(c)?i.push(...c):i.push(c)):o=!0}a&&!o&&i.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:i,strategy:a}){if(t==="strict"&&i&&a)throw new Error(Ee`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:i}=e;typeof i=="string"&&!Qf(i)&&(i=Xf(i,t),e.ref=i)}},bR={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:i}){const{orphan:a,ref:o}=e;a||i.set(e,[...t.get(o).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:i,skip:a},{groupOriginByCopy:o,groupsByName:s,multiplexCapturesToLeftByRef:c,openRefs:f,reffedNodesByReferencer:d}){const p=o.get(e);if(p&&f.has(e.number)){const y=Hi(q0(e.number),t);d.set(y,f.get(e.number)),i(y);return}f.set(e.number,e),c.set(e.number,[]),e.name&&Ml(c,e.name,[]);const g=c.get(e.name??e.number);for(let y=0;y<g.length;y++){const v=g[y];if(p===v.node||p&&p===v.origin||e===v.origin){g.splice(y,1);break}}if(c.get(e.number).push({node:e,origin:p}),e.name&&c.get(e.name).push({node:e,origin:p}),e.name){const y=Ml(s,e.name,new Map);let v=!1;if(p)v=!0;else for(const b of y.values())if(!b.hasDuplicateNameToRemove){v=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:v})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Us(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:i},a){const{isRecursive:o,ref:s}=e;if(o){let g=t;for(;(g=g.parent)&&!(g.type==="CapturingGroup"&&(g.name===s||g.number===s)););a.reffedNodesByReferencer.set(e,g);return}const c=a.subroutineRefMap.get(s),f=s===0,d=f?q0(0):d1(c,a.groupOriginByCopy,null);let p=d;if(!f){const g=h1(ER(c,v=>v.type==="Group"&&!!v.flags)),y=g?Us(a.globalFlags,g):a.globalFlags;_R(y,a.currentFlags)||(p=An({flags:xR(y)}),p.body[0].body.push(d))}i(lt(p,t),{traverse:!f})}},vR={Backreference({node:e,parent:t,replaceWith:i},a){if(e.orphan){a.highestOrphanBackref=Math.max(a.highestOrphanBackref,e.ref);return}const s=a.reffedNodesByReferencer.get(e).filter(c=>SR(c,e));if(!s.length)i(lt(or({negate:!0}),t));else if(s.length>1){const c=An({atomic:!0,body:s.reverse().map(f=>fr({body:[Ld(f.number)]}))});i(lt(c,t))}else e.ref=s[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const i=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let a=0;a<i;a++){const o=t1();e.body.at(-1).body.push(o)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function f1(e){Tl(e,{"*"({node:t,parent:i}){t.parent=i}})}function _R(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function SR(e,t){let i=t;do{if(i.type==="Regex")return!1;if(i.type==="Alternative")continue;if(i===e)return!1;const a=p1(i.parent);for(const o of a){if(o===i)break;if(o===e||g1(o,e))return!0}}while(i=i.parent);throw new Error("Unexpected path")}function d1(e,t,i,a){const o=Array.isArray(e)?[]:{};for(const[s,c]of Object.entries(e))s==="parent"?o.parent=Array.isArray(i)?a:i:c&&typeof c=="object"?o[s]=d1(c,t,o,i):(s==="type"&&c==="CapturingGroup"&&t.set(o,t.get(e)??e),o[s]=c);return o}function q0(e){const t=i1(e);return t.isRecursive=!0,t}function ER(e,t){const i=[];for(;e=e.parent;)(!t||t(e))&&i.push(e);return i}function Xf(e,t){if(t.has(e))return t.get(e);const i=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,i),i}function h1(e){const t=["dotAll","ignoreCase"],i={enable:{},disable:{}};return e.forEach(({flags:a})=>{t.forEach(o=>{a.enable?.[o]&&(delete i.disable[o],i.enable[o]=!0),a.disable?.[o]&&(i.disable[o]=!0)})}),Object.keys(i.enable).length||delete i.enable,Object.keys(i.disable).length||delete i.disable,i.enable||i.disable?i:null}function xR({dotAll:e,ignoreCase:t}){const i={};return(e||t)&&(i.enable={},e&&(i.enable.dotAll=!0),t&&(i.enable.ignoreCase=!0)),(!e||!t)&&(i.disable={},!e&&(i.disable.dotAll=!0),!t&&(i.disable.ignoreCase=!0)),i}function p1(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function m1(e){const t=e.find(i=>i.kind==="search_start"||AR(i,{negate:!1})||!CR(i));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const i=[];for(const a of t.body){const o=m1(a.body);if(!o)return null;Array.isArray(o)?i.push(...o):i.push(o)}return i}return null}function g1(e,t){const i=p1(e)??[];for(const a of i)if(a===t||g1(a,t))return!0;return!1}function CR({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function wR(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function AR(e,t){const i={negate:null,...t};return e.type==="LookaroundAssertion"&&(i.negate===null||e.negate===i.negate)&&e.body.length===1&&Jv(e.body[0],{type:"Assertion",kind:"search_start"})}function Qf(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function oi(e,t){const a=e1(e,{...t,unicodePropertyMap:uh}).body;return a.length>1||a[0].body.length>1?An({body:a}):a[0].body[0]}function Zf(e,t){return e.negate=t,e}function Hi(e,t){return e.parent=t,e}function lt(e,t){return f1(e),e.parent=t,e}function kR(e,t){const i=s1(t),a=Nd(i.target,"ES2024"),o=Nd(i.target,"ES2025"),s=i.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let c=null,f=null;if(!o){const b=[e.flags.ignoreCase];Tl(e,TR,{getCurrentModI:()=>b.at(-1),popModI(){b.pop()},pushModI(S){b.push(S)},setHasCasedChar(){b.at(-1)?c=!0:f=!0}})}const d={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||c)&&!f)};let p=e;const g={accuracy:i.accuracy,appliedGlobalFlags:d,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:p,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!o&&c&&f),useFlagMods:o,useFlagV:a,verbose:i.verbose};function y(b){return g.lastNode=p,p=b,oR(LR[b.type],`Unexpected node type "${b.type}"`)(b,g,y)}const v={pattern:e.body.map(y).join("|"),flags:y(e.flags),options:{...e.options}};return a||(delete v.options.force.v,v.options.disable.v=!0,v.options.unicodeSetsPlugin=null),v._captureTransfers=new Map,v._hiddenCaptures=[],g.captureMap.forEach((b,S)=>{b.hidden&&v._hiddenCaptures.push(S),b.transferTo&&Ml(v._captureTransfers,b.transferTo,[]).push(S)}),v}var TR={"*":{enter({node:e},t){if(Y0(e)){const i=t.getCurrentModI();t.pushModI(e.flags?Us({ignoreCase:i},e.flags).ignoreCase:i)}},exit({node:e},t){Y0(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){ch(gt(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},i){t(),y1(e,{firstOnly:!0}).length&&i.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&c1.has(e.value)&&t.setHasCasedChar()}},LR={Alternative({body:e},t,i){return e.map(i).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Ee`\B`:Ee`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,i){const{body:a,name:o,number:s}=e,c={ignoreCase:t.currentFlags.ignoreCase},f=t.originMap.get(e);return f&&(c.hidden=!0,s>f.number&&(c.transferTo=f.number)),t.captureMap.set(s,c),`(${o?`?<${o}>`:""}${a.map(i).join("|")})`},Character({value:e},t){const i=gt(e),a=na(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(a!==i)return a;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&ch(i)){const o=u1(i);return t.inCharClass?o.join(""):o.length>1?`[${o.join("")}]`:o[0]}return i},CharacterClass(e,t,i){const{kind:a,negate:o,parent:s}=e;let{body:c}=e;if(a==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");kn.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&c.some(X0)&&(c=[Zs(45),...c.filter(p=>!X0(p))]);const f=()=>`[${o?"^":""}${c.map(i).join(a==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||kn.bugNestedClassIgnoresNegation)&&!o){const g=c.filter(y=>y.type==="CharacterClass"&&y.kind==="union"&&y.negate);if(g.length){const y=An(),v=y.body[0];return y.parent=s,v.parent=y,c=c.filter(b=>!g.includes(b)),e.body=c,c.length?(e.parent=v,v.body.push(e)):y.body.pop(),g.forEach(b=>{const S=fr({body:[b]});b.parent=S,S.parent=y,y.body.push(S)}),i(y)}}t.inCharClass=!0;const p=f();return t.inCharClass=!1,p}const d=c[0];if(a==="union"&&!o&&d&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(kn.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&c.length===1&&d.type!=="CharacterClassRange"))return c.map(i).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return f()},CharacterClassRange(e,t){const i=e.min.value,a=e.max.value,o={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=na(i,o),c=na(a,o),f=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const d=y1(e);MR(d).forEach(g=>{f.add(Array.isArray(g)?`${na(g[0],o)}-${na(g[1],o)}`:na(g,o))})}return`${s}-${c}${[...f].join("")}`},CharacterSet({kind:e,negate:t,value:i,key:a},o){if(e==="dot")return o.currentFlags.dotAll?o.appliedGlobalFlags.dotAll||o.useFlagMods?".":"[^]":Ee`[^\n]`;if(e==="digit")return t?Ee`\D`:Ee`\d`;if(e==="property"){if(o.useAppliedIgnoreCase&&o.currentFlags.ignoreCase&&c1.has(i))throw new Error(`Unicode property "${i}" can't be case-insensitive when other chars have specific case`);return`${t?Ee`\P`:Ee`\p`}{${a?`${a}=`:""}${i}}`}if(e==="word")return t?Ee`\W`:Ee`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:i,parent:a},o,s){const c=o.currentFlags;i&&(o.currentFlags=Us(c,i));const f=t.map(s).join("|"),d=!o.verbose&&t.length===1&&a.type!=="Quantifier"&&!e&&(!o.useFlagMods||!i)?f:`(?${IR(e,i,o.useFlagMods)}${f})`;return o.currentFlags=c,d},LookaroundAssertion({body:e,kind:t,negate:i},a,o){return`(?${`${t==="lookahead"?"":"<"}${i?"!":"="}`}${e.map(o).join("|")})`},Quantifier(e,t,i){return i(e.body)+zR(e)},Subroutine({isRecursive:e,ref:t},i){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const a=i.recursionLimit;return t===0?`(?R=${a})`:Ee`\g<${t}&R=${a}>`}},RR=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),DR=new Set(["-","\\","]","^","["]),NR=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),F0=new Map([[9,Ee`\t`],[10,Ee`\n`],[11,Ee`\v`],[12,Ee`\f`],[13,Ee`\r`],[8232,Ee`\u2028`],[8233,Ee`\u2029`],[65279,Ee`\uFEFF`]]),OR=new RegExp("^\\p{Cased}$","u");function ch(e){return OR.test(e)}function y1(e,t){const i=!!t?.firstOnly,a=e.min.value,o=e.max.value,s=[];if(a<65&&(o===65535||o>=131071)||a===65536&&o>=131071)return s;for(let c=a;c<=o;c++){const f=gt(c);if(!ch(f))continue;const d=u1(f).filter(p=>{const g=p.codePointAt(0);return g<a||g>o});if(d.length&&(s.push(...d),i))break}return s}function na(e,{escDigit:t,inCharClass:i,useFlagV:a}){if(F0.has(e))return F0.get(e);if(e<32||e>126&&e<160||e>262143||t&&UR(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const o=i?a?NR:DR:RR,s=gt(e);return(o.has(s)?"\\":"")+s}function MR(e){const t=e.map(o=>o.codePointAt(0)).sort((o,s)=>o-s),i=[];let a=null;for(let o=0;o<t.length;o++)t[o+1]===t[o]+1?a??=t[o]:a===null?i.push(t[o]):(i.push([a,t[o]]),a=null);return i}function IR(e,t,i){if(e)return">";let a="";if(t&&i){const{enable:o,disable:s}=t;a=(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")+(s?"-":"")+(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")}return`${a}:`}function zR({kind:e,max:t,min:i}){let a;return!i&&t===1?a="?":!i&&t===1/0?a="*":i===1&&t===1/0?a="+":i===t?a=`{${i}}`:a=`{${i},${t===1/0?"":t}}`,a+{greedy:"",lazy:"?",possessive:"+"}[e]}function Y0({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function UR(e){return e>47&&e<58}function X0({type:e,value:t}){return e==="Character"&&t===45}var HR=class Od extends RegExp{#t=new Map;#e=null;#i;#n=null;#r=null;rawOptions={};get source(){return this.#i||"(?:)"}constructor(t,i,a){const o=!!a?.lazyCompile;if(t instanceof RegExp){if(a)throw new Error("Cannot provide options when copying a regexp");const s=t;super(s,i),this.#i=s.source,s instanceof Od&&(this.#t=s.#t,this.#n=s.#n,this.#r=s.#r,this.rawOptions=s.rawOptions)}else{const s={hiddenCaptures:[],strategy:null,transfers:[],...a};super(o?"":t,i),this.#i=t,this.#t=BR(s.hiddenCaptures,s.transfers),this.#r=s.strategy,this.rawOptions=a??{}}o||(this.#e=this)}exec(t){if(!this.#e){const{lazyCompile:o,...s}=this.rawOptions;this.#e=new Od(this.#i,this.flags,s)}const i=this.global||this.sticky,a=this.lastIndex;if(this.#r==="clip_search"&&i&&a){this.lastIndex=0;const o=this.#a(t.slice(a));return o&&(PR(o,a,t,this.hasIndices),this.lastIndex+=a),o}return this.#a(t)}#a(t){this.#e.lastIndex=this.lastIndex;const i=super.exec.call(this.#e,t);if(this.lastIndex=this.#e.lastIndex,!i||!this.#t.size)return i;const a=[...i];i.length=1;let o;this.hasIndices&&(o=[...i.indices],i.indices.length=1);const s=[0];for(let c=1;c<a.length;c++){const{hidden:f,transferTo:d}=this.#t.get(c)??{};if(f?s.push(null):(s.push(i.length),i.push(a[c]),this.hasIndices&&i.indices.push(o[c])),d&&a[c]!==void 0){const p=s[d];if(!p)throw new Error(`Invalid capture transfer to "${p}"`);if(i[p]=a[c],this.hasIndices&&(i.indices[p]=o[c]),i.groups){this.#n||(this.#n=jR(this.source));const g=this.#n.get(d);g&&(i.groups[g]=a[c],this.hasIndices&&(i.indices.groups[g]=o[c]))}}}return i}};function PR(e,t,i,a){if(e.index+=t,e.input=i,a){const o=e.indices;for(let c=0;c<o.length;c++){const f=o[c];f&&(o[c]=[f[0]+t,f[1]+t])}const s=o.groups;s&&Object.keys(s).forEach(c=>{const f=s[c];f&&(s[c]=[f[0]+t,f[1]+t])})}}function BR(e,t){const i=new Map;for(const a of e)i.set(a,{hidden:!0});for(const[a,o]of t)for(const s of o)Ml(i,s,{}).transferTo=a;return i}function jR(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,i=new Map;let a=0,o=0,s;for(;s=t.exec(e);){const{0:c,groups:{capture:f,name:d}}=s;c==="["?a++:a?c==="]"&&a--:f&&(o++,d&&i.set(o,d))}return i}function VR(e,t){const i=GR(e,t);return i.options?new HR(i.pattern,i.flags,i.options):new RegExp(i.pattern,i.flags)}function GR(e,t){const i=s1(t),a=e1(e,{flags:i.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:i.rules.captureGroup,singleline:i.rules.singleline},skipBackrefValidation:i.rules.allowOrphanBackrefs,unicodePropertyMap:uh}),o=gR(a,{accuracy:i.accuracy,asciiWordBoundaries:i.rules.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,bestEffortTarget:i.target}),s=kR(o,i),c=aR(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),f=iR(c.pattern),d=nR(f.pattern,{captureTransfers:c.captureTransfers,hiddenCaptures:c.hiddenCaptures}),p={pattern:d.pattern,flags:`${i.hasIndices?"d":""}${i.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(i.avoidSubclass){if(i.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const g=d.hiddenCaptures.sort((S,k)=>S-k),y=Array.from(d.captureTransfers),v=o._strategy,b=p.pattern.length>=i.lazyCompileLength;(g.length||y.length||v||b)&&(p.options={...g.length&&{hiddenCaptures:g},...y.length&&{transfers:y},...v&&{strategy:v},...b&&{lazyCompile:b}})}return p}const Q0=4294967295;class $R{constructor(t,i={}){this.patterns=t,this.options=i;const{forgiving:a=!1,cache:o,regexConstructor:s}=i;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(c=>{if(typeof c!="string")return c;const f=o?.get(c);if(f){if(f instanceof RegExp)return f;if(a)return null;throw f}try{const d=s(c);return o?.set(c,d),d}catch(d){if(o?.set(c,d),a)return null;throw d}})}regexps;findNextMatchSync(t,i,a){const o=typeof t=="string"?t:t.content,s=[];function c(f,d,p=0){return{index:f,captureIndices:d.indices.map(g=>g==null?{start:Q0,end:Q0,length:0}:{start:g[0]+p,end:g[1]+p,length:g[1]-g[0]})}}for(let f=0;f<this.regexps.length;f++){const d=this.regexps[f];if(d)try{d.lastIndex=i;const p=d.exec(o);if(!p)continue;if(p.index===i)return c(f,p,0);s.push([f,p,0])}catch(p){if(this.options.forgiving)continue;throw p}}if(s.length){const f=Math.min(...s.map(d=>d[1].index));for(const[d,p,g]of s)if(p.index===f)return c(d,p,g)}return null}}function qR(e,t){return VR(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function FR(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=i=>qR(i,{target:t.target}),{createScanner(i){return new $R(i,t)},createString(i){return{content:i}}}}const Z0=new Map;function YR({className:e,children:t}){const[i,a]=ae.useState(null),o=e?.match(/language-([^\s]+)/)?.[1]??"text",s=String(t??"").replace(/\n$/,"");return ae.useEffect(()=>{let c=!1;return a(null),XR(s,o).then(f=>{c||a(f)}),()=>{c=!0}},[s,o]),i===null?$.jsx("pre",{children:$.jsx("code",{children:t})}):$.jsx("div",{dangerouslySetInnerHTML:{__html:i}})}async function XR(e,t){const i=`${t}\0${e}`,a=Z0.get(i);if(a)return a;const o=QR(e,t).catch(()=>null);return Z0.set(i,o),o}async function QR(e,t){try{return await L0(e,{lang:t,theme:"github-dark-default"})}catch{return L0(e,{lang:"text",theme:"github-dark-default"})}}function b1({content:e,className:t,variant:i}){const a=["markdown-content",i?`markdown-content-${i}`:null,t].filter(Boolean).join(" ");return $.jsx("div",{className:a,children:$.jsx(nk,{components:{pre({children:o}){if(ae.isValidElement(o)){const{className:s,children:c}=o.props;return $.jsx(YR,{className:s,children:c})}return $.jsx("pre",{children:o})}},children:e})})}function ZR({open:e,content:t,loading:i,onClose:a}){return ae.useEffect(()=>{if(!e)return;const o=s=>{s.key==="Escape"&&a()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,a]),e?$.jsx("div",{className:"brief-dialog-backdrop",onClick:a,children:$.jsxs("div",{className:"brief-dialog",role:"dialog","aria-modal":"true","aria-label":"Reviewer brief",onClick:o=>o.stopPropagation(),children:[$.jsxs("div",{className:"brief-dialog-header",children:[$.jsx("div",{className:"brief-dialog-heading",children:$.jsx("div",{className:"brief-dialog-title",children:"brief"})}),$.jsx("div",{className:"brief-dialog-actions",children:$.jsx(aa,{icon:kb,label:"close brief",className:"brief-dialog-close",onClick:a})})]}),$.jsx("div",{className:"brief-dialog-body-wrap",children:i&&!t?$.jsx("div",{className:"brief-dialog-empty",children:"Generating brief…"}):$.jsx(b1,{content:t,className:"brief-dialog-body",variant:"brief"})})]})}):null}const KR={position:"absolute",top:0,bottom:0,textAlign:"center"},WR={display:"contents"};function K0(){return null}const Hs="diffs-container",JR=/(?=^From [a-f0-9]+ .+$)/m,Cs=/(?=^diff --git)/gm,W0=/(?=^---\s+\S)/gm,eD=/(?=^@@ )/gm,tD=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,Kf=new RegExp("(?<=\\n)"),nD=/^(---|\+\+\+)\s+([^\t\r\n]+)/,iD=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,rD=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,aD=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,fh="header-prefix",dh="header-metadata",hh="header-custom",Pn={dark:"pierre-dark",light:"pierre-light"},v1="data-theme-css",_1="data-unsafe-css",ha=1,lD={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,hunkSeparatorHeight:32,fileGap:8},oD=Object.freeze({fromStart:0,fromEnd:0}),J0={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},sD={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function Il(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function uD(e,t){return typeof window>"u"&&t!=null?$.jsxs($.Fragment,{children:[$.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:t}}),e]}):$.jsx($.Fragment,{children:e})}const cD=ae.createContext(void 0);function fD(){return ae.useContext(cD)}const cr=new Map,Wf=new Map,Md=new Map,Id=new Set;function eb(e,t){e=Array.isArray(e)?e:[e];for(let i of e){let a;if(typeof i=="string"){if(a=cr.get(i),a==null)throw new Error(`loadResolvedThemes: ${i} is not resolved, you must resolve it before calling loadResolvedThemes`)}else a=i,i=i.name,cr.has(i)||cr.set(i,a);Id.has(i)||(Id.add(i),t.loadThemeSync(a))}}const zl=new Map,Jf=new Map,dD=new Map,zd=new Set;function tb(e,t){e=Array.isArray(e)?e:[e];for(const i of e){if(zd.has(i.name))continue;let a=zl.get(i.name);a==null&&(a=i,zl.set(i.name,a)),zd.add(a.name),t.loadLanguageSync(a.data)}}function S1(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function hD(e){if(S1())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=Jf.get(e);if(t!=null)return t;try{let i=dD.get(e);if(i==null&&Object.prototype.hasOwnProperty.call(kd,e)&&(i=kd[e]),i==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const a=i().then(({default:o})=>{const s={name:e,data:o};return zl.has(e)||zl.set(e,s),s});return Jf.set(e,a),await a}finally{Jf.delete(e)}}function pD(e){return zl.get(e)??hD(e)}async function mD(e){if(S1())throw new Error(`resolveTheme("${e}") cannot be called from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=Wf.get(e);if(t!=null)return t;try{const i=Md.get(e)??$v[e];if(i==null)throw new Error(`resolveTheme: No valid loader for ${e}`);const a=i().then(s=>gD(e,"default"in s?s.default:s));Wf.set(e,a);const o=await a;if(o.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${o.name}`);return cr.set(o.name,o),o}finally{Wf.delete(e)}}function gD(e,t){const i=cr.get(e);return i??(t=Ys(t),cr.set(e,t),t)}function yD(e){return cr.get(e)??mD(e)}function E1(e,t){if(Md.has(e)){console.error("SharedHighlight.registerCustomTheme: theme name already registered",e);return}Md.set(e,t)}let Un;async function bD({themes:e,langs:t,preferredHighlighter:i="shiki-js"}){Un??=Yv({themes:[],langs:["text"],engine:i==="shiki-wasm"?Fv(x(()=>import("./wasm-CG6Dc4jp.js"),[])):FR()});const a=_D(Un)?await Un:Un;Un=a;const o=[];for(const c of t){if(c==="text"||c==="ansi")continue;const f=pD(c);"then"in f?o.push(f):tb(f,a)}const s=[];for(const c of e){const f=yD(c);"then"in f?s.push(f):eb(f,Un)}return(o.length>0||s.length>0)&&await Promise.all([Promise.all(o).then(c=>{tb(c,a)}),Promise.all(s).then(c=>{eb(c,a)})]),a}function vD(){if(Un!=null&&!("then"in Un))return Un}function _D(e=Un){return e!=null&&"then"in e}E1("pierre-dark",async()=>{const e=await x(()=>import("./pierre-dark-ClCaJvdG.js"),[]);return{...e.default??e,name:"pierre-dark"}});E1("pierre-light",async()=>{const e=await x(()=>import("./pierre-light-zjGsWSiE.js"),[]);return{...e.default??e,name:"pierre-light"}});function x1(e=Pn){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function C1(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}const ia=new Map,Sl={"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",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 ma(e){if(ia.has(e))return ia.get(e)??"text";if(Sl[e]!=null)return Sl[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(ia.has(t[1]))return ia.get(t[1])??"text";if(Sl[t[1]]!=null)return Sl[t[1]]??"text"}const i=e.match(/\.([^.]+)$/)?.[1]??"";return ia.has(i)?ia.get(i)??"text":Sl[i]??"text"}function ga(e){return e.replace(/\n$|\r\n$/,"")}function ci(e){return{type:"text",value:e}}function Le({tagName:e,children:t=[],properties:i={}}){return{type:"element",tagName:e,properties:i,children:t}}function Ps({name:e,width:t=16,height:i=16,properties:a}){return Le({tagName:"svg",properties:{width:t,height:i,viewBox:"0 0 16 16",...a},children:[Le({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function SD(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 ms(e){return Le({tagName:"div",properties:{"data-gutter":""},children:e})}function ED(e,t,i,a={}){return Le({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":i,...a},children:t!=null?[Le({tagName:"span",properties:{"data-line-number-content":""},children:[ci(`${t}`)]})]:void 0})}function Cn(e,t,i){return Le({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":i,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${i};`:`grid-row: span ${i};min-height:calc(${i} * 1lh);`}})}function xD(e,t,i){const a=typeof i.lineInfo=="function"?i.lineInfo(t):i.lineInfo[t-1];if(a==null){const o=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(o,{node:e,line:t,state:i}),new Error(o)}return e.tagName="div",e.properties["data-line"]=a.lineNumber,e.properties["data-alt-line"]=a.altLineNumber,e.properties["data-line-type"]=a.type,e.properties["data-line-index"]=a.lineIndex,e.children.length===0&&e.children.push(ci(`
175
+ `)),e}function CD(e={}){const{classPrefix:t="__shiki_",classSuffix:i="",classReplacer:a=f=>f}=e,o=new Map;function s(f){return Object.entries(f).map(([d,p])=>`${d}:${p}`).join(";")}function c(f){const d=typeof f=="string"?f:s(f);let p=t+wD(d)+i;return p=a(p),o.has(p)||o.set(p,typeof f=="string"?f:{...f}),p}return{name:"@shikijs/transformers:style-to-class",pre(f){if(!f.properties.style)return;const d=c(f.properties.style);delete f.properties.style,this.addClassToHast(f,d)},tokens(f){for(const d of f)for(const p of d){if(!p.htmlStyle)continue;const g=c(p.htmlStyle);p.htmlStyle={},p.htmlAttrs||={},p.htmlAttrs.class?p.htmlAttrs.class+=` ${g}`:p.htmlAttrs.class=g}},getClassRegistry(){return o},getCSS(){let f="";for(const[d,p]of o.entries())f+=`.${d}{${typeof p=="string"?p:s(p)}}`;return f},clearRegistry(){o.clear()}}}function wD(e,t=0){let i=3735928559^t,a=1103547991^t;for(let o=0,s;o<e.length;o++)s=e.charCodeAt(o),i=Math.imul(i^s,2654435761),a=Math.imul(a^s,1597334677);return i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(a^a>>>13,3266489909),a=Math.imul(a^a>>>16,2246822507),a^=Math.imul(i^i>>>13,3266489909),(4294967296*(2097151&a)+(i>>>0)).toString(36).slice(0,6)}function AD(e=!1){const t={lineInfo:[]},i=[{line(a){return delete a.properties.class,a},pre(a){const o=SD(a),s=[];if(o!=null){let c=1;for(const f of o.children)f.type==="element"&&(s.push(xD(f,c,t)),c++);o.children=s}return a}}];return e&&i.push(kD,nb),{state:t,transformers:i,toClass:nb}}const nb=CD({classPrefix:"hl-"}),kD={name:"token-style-normalizer",tokens(e){for(const t of e)for(const i of t){if(i.htmlStyle!=null)continue;const a={};i.color!=null&&(a.color=i.color),i.bgColor!=null&&(a["background-color"]=i.bgColor),i.fontStyle!=null&&i.fontStyle!==0&&((i.fontStyle&1)!==0&&(a["font-style"]="italic"),(i.fontStyle&2)!==0&&(a["font-weight"]="bold"),(i.fontStyle&4)!==0&&(a["text-decoration"]="underline")),Object.keys(a).length>0&&(i.htmlStyle=a)}}};function wn(e){return`--${e==="token"?"diffs-token":"diffs"}-`}function TD({theme:e=Pn,highlighter:t,prefix:i}){let a="";if(typeof e=="string"){const o=t.getTheme(e);a+=`color:${o.fg};`,a+=`background-color:${o.bg};`,a+=`${wn("global")}fg:${o.fg};`,a+=`${wn("global")}bg:${o.bg};`,a+=ed(o,i)}else{let o=t.getTheme(e.dark);a+=`${wn("global")}dark:${o.fg};`,a+=`${wn("global")}dark-bg:${o.bg};`,a+=ed(o,"dark"),o=t.getTheme(e.light),a+=`${wn("global")}light:${o.fg};`,a+=`${wn("global")}light-bg:${o.bg};`,a+=ed(o,"light")}return a}function ed(e,t){t=t!=null?`${t}-`:"";let i="";const a=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];a!=null&&(i+=`${wn("global")}${t}addition-color:${a};`);const o=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];o!=null&&(i+=`${wn("global")}${t}deletion-color:${o};`);const s=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return s!=null&&(i+=`${wn("global")}${t}modified-color:${s};`),i}function ib(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 rb(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function LD(e){const t=e.lang??ma(e.name),i=e.lang??(e.prevName!=null?ma(e.prevName):"text");return t==="text"&&i==="text"}function Bs({diff:e,diffStyle:t,startingLine:i=0,totalLines:a=1/0,expandedHunks:o,collapsedContextThreshold:s=ha,callback:c}){const f={finalHunk:e.hunks.at(-1),viewportStart:i,viewportEnd:i+a,isWindowedHighlight:i>0||a<1/0,splitCount:0,unifiedCount:0,shouldBreak(){if(!f.isWindowedHighlight)return!1;const g=f.unifiedCount>=i+a,y=f.splitCount>=i+a;return t==="unified"?g:(t==="split"||g)&&y},shouldSkip(g,y){if(!f.isWindowedHighlight)return!1;const v=f.unifiedCount+g<i,b=f.splitCount+y<i;return t==="unified"?v:(t==="split"||v)&&b},incrementCounts(g,y){(t==="unified"||t==="both")&&(f.unifiedCount+=g),(t==="split"||t==="both")&&(f.splitCount+=y)},isInWindow(g,y){if(!f.isWindowedHighlight)return!0;const v=f.isInUnifiedWindow(g),b=f.isInSplitWindow(y);return t==="unified"?v:t==="split"?b:v||b},isInUnifiedWindow(g){return!f.isWindowedHighlight||f.unifiedCount>=i-g&&f.unifiedCount<i+a},isInSplitWindow(g){return!f.isWindowedHighlight||f.splitCount>=i-g&&f.splitCount<i+a},emit(g,y=!1){return y||(t==="unified"?f.incrementCounts(1,0):t==="split"?f.incrementCounts(0,1):f.incrementCounts(1,1)),c(g)??!1}};e:for(const[g,y]of e.hunks.entries()){let k=function(G,ie){return b==null||b.collapsedLines<=0||b.fromStart+b.fromEnd>0?0:t==="unified"?G===y.unifiedLineStart+y.unifiedLineCount-1?b.collapsedLines:0:ie===y.splitLineStart+y.splitLineCount-1?b.collapsedLines:0},L=function(){if(v.collapsedLines===0)return 0;const G=v.collapsedLines;return v.collapsedLines=0,G};var d=k,p=L;if(f.shouldBreak())break;const v=ab(e.isPartial,y.collapsedBefore,o,g,s),b=(()=>{if(y!==f.finalHunk||!RD(e))return;const G=e.additionLines.length-(y.additionLineIndex+y.additionCount),ie=e.deletionLines.length-(y.deletionLineIndex+y.deletionCount);if(G!==ie)throw new Error(`iterateOverDiff: trailing context mismatch (additions=${G}, deletions=${ie}) for ${e.name}`);const ne=Math.min(G,ie);return ab(e.isPartial,ne,o,e.hunks.length,s)})(),S=v.fromStart+v.fromEnd;if(f.shouldSkip(S,S))f.incrementCounts(S,S),L();else{let G=y.unifiedLineStart-v.rangeSize,ie=y.splitLineStart-v.rangeSize,ne=y.deletionLineIndex-v.rangeSize,J=y.additionLineIndex-v.rangeSize,W=y.deletionStart-v.rangeSize,fe=y.additionStart-v.rangeSize,ee=0;for(;ee<v.fromStart;){if(f.isInWindow(0,0)){if(f.emit({hunkIndex:g,hunk:y,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:W+ee,lineIndex:ne+ee,noEOFCR:!1,unifiedLineIndex:G+ee,splitLineIndex:ie+ee},additionLine:{unifiedLineIndex:G+ee,splitLineIndex:ie+ee,lineIndex:J+ee,lineNumber:fe+ee,noEOFCR:!1}}))break e}else f.incrementCounts(1,1);ee++}for(G=y.unifiedLineStart-v.fromEnd,ie=y.splitLineStart-v.fromEnd,ne=y.deletionLineIndex-v.fromEnd,J=y.additionLineIndex-v.fromEnd,W=y.deletionStart-v.fromEnd,fe=y.additionStart-v.fromEnd,ee=0;ee<v.fromEnd;){if(f.isInWindow(0,0)){if(f.emit({hunkIndex:g,hunk:y,collapsedBefore:L(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:W+ee,lineIndex:ne+ee,noEOFCR:!1,unifiedLineIndex:G+ee,splitLineIndex:ie+ee},additionLine:{unifiedLineIndex:G+ee,splitLineIndex:ie+ee,lineIndex:J+ee,lineNumber:fe+ee,noEOFCR:!1}}))break e}else f.incrementCounts(1,1);ee++}}let C=y.unifiedLineStart,A=y.splitLineStart,T=y.deletionLineIndex,I=y.additionLineIndex,z=y.deletionStart,D=y.additionStart;const j=y.hunkContent.at(-1);for(const G of y.hunkContent){if(f.shouldBreak())break e;const ie=G===j;if(G.type==="context"){if(f.shouldSkip(G.lines,G.lines))f.incrementCounts(G.lines,G.lines),L();else{let ne=0;for(;ne<G.lines;){if(f.isInWindow(0,0)){const J=ie&&ne===G.lines-1,W=C+ne,fe=A+ne;if(f.emit({hunkIndex:g,hunk:y,collapsedBefore:L(),collapsedAfter:k(W,fe),type:"context",deletionLine:{lineNumber:z+ne,lineIndex:T+ne,noEOFCR:J&&y.noEOFCRDeletions,unifiedLineIndex:W,splitLineIndex:fe},additionLine:{unifiedLineIndex:W,splitLineIndex:fe,lineIndex:I+ne,lineNumber:D+ne,noEOFCR:J&&y.noEOFCRAdditions}}))break e}else f.incrementCounts(1,1);ne++}}C+=G.lines,A+=G.lines,T+=G.lines,I+=G.lines,z+=G.lines,D+=G.lines}else{const ne=Math.max(G.deletions,G.additions),J=G.deletions+G.additions;if(!f.shouldSkip(J,ne)){const W=DD(f,G,t);for(const[fe,ee]of W)for(let te=fe;te<ee;te++){const H=k(C+te,t==="unified"?A+(te<G.deletions?te:te-G.deletions):A+te);if(f.emit(ND({hunkIndex:g,hunk:y,collapsedBefore:L(),collapsedAfter:H,diffStyle:t,index:te,unifiedLineIndex:C,splitLineIndex:A,additionLineIndex:I,deletionLineIndex:T,additionLineNumber:D,deletionLineNumber:z,content:G,isLastContent:ie,unifiedCount:J,splitCount:ne}),!0))break e}}L(),f.incrementCounts(J,ne),C+=J,A+=ne,T+=G.deletions,I+=G.additions,z+=G.deletions,D+=G.additions}}if(b!=null){const{collapsedLines:G,fromStart:ie,fromEnd:ne}=b,J=ie+ne;let W=0;for(;W<J;){if(f.shouldBreak())break e;if(f.isInWindow(0,0)){const fe=W===J-1;if(f.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:fe?G:0,type:"context-expanded",deletionLine:{lineNumber:z+W,lineIndex:T+W,noEOFCR:!1,unifiedLineIndex:C+W,splitLineIndex:A+W},additionLine:{unifiedLineIndex:C+W,splitLineIndex:A+W,lineIndex:I+W,lineNumber:D+W,noEOFCR:!1}}))break e}else f.incrementCounts(1,1);W++}}}}function ab(e,t,i,a,o){if(t=Math.max(t,0),t===0||e)return{fromStart:0,fromEnd:0,rangeSize:t,collapsedLines:Math.max(t,0)};if(i===!0||t<=o)return{fromStart:t,fromEnd:0,rangeSize:t,collapsedLines:0};const s=i?.get(a),c=Math.min(Math.max(s?.fromStart??0,0),t),f=Math.min(Math.max(s?.fromEnd??0,0),t),d=c+f,p=d>=t;return{fromStart:p?t:c,fromEnd:p?0:f,rangeSize:t,collapsedLines:Math.max(t-d,0)}}function RD(e){const t=e.hunks.at(-1);return t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0?!1:t.additionLineIndex+t.additionCount<e.additionLines.length||t.deletionLineIndex+t.deletionCount<e.deletionLines.length}function DD(e,t,i){if(!e.isWindowedHighlight)return[[0,i==="unified"?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];const a=i!=="split",o=i!=="unified",s=i==="unified"?"unified":"split",c=[];function f(y,v){if(y+v<=e.viewportStart||y>=e.viewportEnd)return;const b=Math.max(0,e.viewportStart-y),S=Math.min(v,e.viewportEnd-y);return S>b?[b,S]:void 0}function d(y,v){return s==="split"?y:v==="additions"?[y[0]+t.deletions,y[1]+t.deletions]:y}function p(y,v){if(y==null)return;const[b,S]=d(y,v);S>b&&c.push([b,S])}if(a&&(p(f(e.unifiedCount,t.deletions),"deletions"),p(f(e.unifiedCount+t.deletions,t.additions),"additions")),o&&(p(f(e.splitCount,t.deletions),"deletions"),p(f(e.splitCount,t.additions),"additions")),c.length===0)return c;c.sort((y,v)=>y[0]-v[0]);const g=[c[0]];for(const[y,v]of c.slice(1)){const b=g[g.length-1];y<=b[1]?b[1]=Math.max(b[1],v):g.push([y,v])}return g}function ND({hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,diffStyle:o,index:s,unifiedLineIndex:c,splitLineIndex:f,additionLineIndex:d,deletionLineIndex:p,additionLineNumber:g,deletionLineNumber:y,content:v,isLastContent:b,unifiedCount:S,splitCount:k}){const L=s<v.deletions?c+s:void 0,C=o==="unified"?s>=v.deletions?c+s:void 0:s<v.additions?c+v.deletions+s:void 0,A=o==="unified"?f+(s<v.deletions?s:s-v.deletions):f+s,T=s<v.deletions?p+s:void 0,I=s<v.deletions?y+s:void 0,z=o==="unified"?s>=v.deletions?d+(s-v.deletions):void 0:s<v.additions?d+s:void 0,D=o==="unified"?s>=v.deletions?g+(s-v.deletions):void 0:s<v.additions?g+s:void 0,j=o==="unified"?b&&s===v.deletions-1&&t.noEOFCRDeletions:b&&s===k-1&&t.noEOFCRDeletions,G=o==="unified"?b&&s===S-1&&t.noEOFCRAdditions:b&&s===k-1&&t.noEOFCRAdditions,ie=T!=null&&I!=null&&L!=null?{lineNumber:I,lineIndex:T,noEOFCR:j,unifiedLineIndex:L,splitLineIndex:A}:void 0,ne=z!=null&&D!=null&&C!=null?{unifiedLineIndex:C,splitLineIndex:A,lineIndex:z,lineNumber:D,noEOFCR:G}:void 0;if(ie==null&&ne!=null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:void 0,additionLine:ne};if(ie!=null&&ne==null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:ie,additionLine:void 0};if(ie==null||ne==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:ie,additionLine:ne}}class ph{diff(t,i,a={}){let o;typeof a=="function"?(o=a,a={}):"callback"in a&&(o=a.callback);const s=this.castInput(t,a),c=this.castInput(i,a),f=this.removeEmpty(this.tokenize(s,a)),d=this.removeEmpty(this.tokenize(c,a));return this.diffWithOptionsObj(f,d,a,o)}diffWithOptionsObj(t,i,a,o){var s;const c=A=>{if(A=this.postProcess(A,a),o){setTimeout(function(){o(A)},0);return}else return A},f=i.length,d=t.length;let p=1,g=f+d;a.maxEditLength!=null&&(g=Math.min(g,a.maxEditLength));const y=(s=a.timeout)!==null&&s!==void 0?s:1/0,v=Date.now()+y,b=[{oldPos:-1,lastComponent:void 0}];let S=this.extractCommon(b[0],i,t,0,a);if(b[0].oldPos+1>=d&&S+1>=f)return c(this.buildValues(b[0].lastComponent,i,t));let k=-1/0,L=1/0;const C=()=>{for(let A=Math.max(k,-p);A<=Math.min(L,p);A+=2){let T;const I=b[A-1],z=b[A+1];I&&(b[A-1]=void 0);let D=!1;if(z){const G=z.oldPos-A;D=z&&0<=G&&G<f}const j=I&&I.oldPos+1<d;if(!D&&!j){b[A]=void 0;continue}if(!j||D&&I.oldPos<z.oldPos?T=this.addToPath(z,!0,!1,0,a):T=this.addToPath(I,!1,!0,1,a),S=this.extractCommon(T,i,t,A,a),T.oldPos+1>=d&&S+1>=f)return c(this.buildValues(T.lastComponent,i,t))||!0;b[A]=T,T.oldPos+1>=d&&(L=Math.min(L,A-1)),S+1>=f&&(k=Math.max(k,A+1))}p++};if(o)(function A(){setTimeout(function(){if(p>g||Date.now()>v)return o(void 0);C()||A()},0)})();else for(;p<=g&&Date.now()<=v;){const A=C();if(A)return A}}addToPath(t,i,a,o,s){const c=t.lastComponent;return c&&!s.oneChangePerToken&&c.added===i&&c.removed===a?{oldPos:t.oldPos+o,lastComponent:{count:c.count+1,added:i,removed:a,previousComponent:c.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:i,removed:a,previousComponent:c}}}extractCommon(t,i,a,o,s){const c=i.length,f=a.length;let d=t.oldPos,p=d-o,g=0;for(;p+1<c&&d+1<f&&this.equals(a[d+1],i[p+1],s);)p++,d++,g++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return g&&!s.oneChangePerToken&&(t.lastComponent={count:g,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=d,p}equals(t,i,a){return a.comparator?a.comparator(t,i):t===i||!!a.ignoreCase&&t.toLowerCase()===i.toLowerCase()}removeEmpty(t){const i=[];for(let a=0;a<t.length;a++)t[a]&&i.push(t[a]);return i}castInput(t,i){return t}tokenize(t,i){return Array.from(t)}join(t){return t.join("")}postProcess(t,i){return t}get useLongestToken(){return!1}buildValues(t,i,a){const o=[];let s;for(;t;)o.push(t),s=t.previousComponent,delete t.previousComponent,t=s;o.reverse();const c=o.length;let f=0,d=0,p=0;for(;f<c;f++){const g=o[f];if(g.removed)g.value=this.join(a.slice(p,p+g.count)),p+=g.count;else{if(!g.added&&this.useLongestToken){let y=i.slice(d,d+g.count);y=y.map(function(v,b){const S=a[p+b];return S.length>v.length?S:v}),g.value=this.join(y)}else g.value=this.join(i.slice(d,d+g.count));d+=g.count,g.added||(p+=g.count)}}return o}}class OD extends ph{}const MD=new OD;function ID(e,t,i){return MD.diff(e,t,i)}const lb="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class zD extends ph{tokenize(t){const i=new RegExp(`(\\r?\\n)|[${lb}]+|[^\\S\\n\\r]+|[^${lb}]`,"ug");return t.match(i)||[]}}const UD=new zD;function HD(e,t,i){return UD.diff(e,t,i)}class PD extends ph{constructor(){super(...arguments),this.tokenize=jD}equals(t,i,a){return a.ignoreWhitespace?((!a.newlineIsToken||!t.includes(`
176
176
  `))&&(t=t.trim()),(!a.newlineIsToken||!i.includes(`
177
177
  `))&&(i=i.trim())):a.ignoreNewlineAtEof&&!a.newlineIsToken&&(t.endsWith(`
178
178
  `)&&(t=t.slice(0,-1)),i.endsWith(`
179
- `)&&(i=i.slice(0,-1))),super.equals(t,i,a)}}const UD=new zD;function ob(e,t,i){return UD.diff(e,t,i)}function HD(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
180
- `));const i=[],a=e.split(/(\n|\r\n)/);a[a.length-1]||a.pop();for(let o=0;o<a.length;o++){const s=a[o];o%2&&!t.newlineIsToken?i[i.length-1]+=s:i.push(s)}return i}const PD={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function BD(e,t,i,a,o,s,c){let f;f={},typeof f.context>"u"&&(f.context=4);const d=f.context;if(f.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(f.callback){const{callback:g}=f;ob(i,a,Object.assign(Object.assign({},f),{callback:y=>{const b=p(y);g(b)}}))}else return p(ob(i,a,f));function p(g){if(!g)return;g.push({value:"",lines:[]});function y(k){return k.map(function(C){return" "+C})}const b=[];let v=0,S=0,T=[],L=1,A=1;for(let k=0;k<g.length;k++){const C=g[k],z=C.lines||VD(C.value);if(C.lines=z,C.added||C.removed){if(!v){const U=g[k-1];v=L,S=A,U&&(T=d>0?y(U.lines.slice(-d)):[],v-=T.length,S-=T.length)}for(const U of z)T.push((C.added?"+":"-")+U);C.added?A+=z.length:L+=z.length}else{if(v)if(z.length<=d*2&&k<g.length-2)for(const U of y(z))T.push(U);else{const U=Math.min(z.length,d);for(const j of y(z.slice(0,U)))T.push(j);const O={oldStart:v,oldLines:L-v+U,newStart:S,newLines:A-S+U,lines:T};b.push(O),v=0,S=0,T=[]}L+=z.length,A+=z.length}}for(const k of b)for(let C=0;C<k.lines.length;C++)k.lines[C].endsWith(`
181
- `)?k.lines[C]=k.lines[C].slice(0,-1):(k.lines.splice(C+1,0,"\"),C++);return{oldFileName:e,newFileName:t,oldHeader:o,newHeader:s,hunks:b}}}function C1(e,t){if(t||(t=PD),Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders)throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(a=>C1(a,t)).join(`
179
+ `)&&(i=i.slice(0,-1))),super.equals(t,i,a)}}const BD=new PD;function ob(e,t,i){return BD.diff(e,t,i)}function jD(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
180
+ `));const i=[],a=e.split(/(\n|\r\n)/);a[a.length-1]||a.pop();for(let o=0;o<a.length;o++){const s=a[o];o%2&&!t.newlineIsToken?i[i.length-1]+=s:i.push(s)}return i}const VD={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function GD(e,t,i,a,o,s,c){let f;f={},typeof f.context>"u"&&(f.context=4);const d=f.context;if(f.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(f.callback){const{callback:g}=f;ob(i,a,Object.assign(Object.assign({},f),{callback:y=>{const v=p(y);g(v)}}))}else return p(ob(i,a,f));function p(g){if(!g)return;g.push({value:"",lines:[]});function y(A){return A.map(function(T){return" "+T})}const v=[];let b=0,S=0,k=[],L=1,C=1;for(let A=0;A<g.length;A++){const T=g[A],I=T.lines||qD(T.value);if(T.lines=I,T.added||T.removed){if(!b){const z=g[A-1];b=L,S=C,z&&(k=d>0?y(z.lines.slice(-d)):[],b-=k.length,S-=k.length)}for(const z of I)k.push((T.added?"+":"-")+z);T.added?C+=I.length:L+=I.length}else{if(b)if(I.length<=d*2&&A<g.length-2)for(const z of y(I))k.push(z);else{const z=Math.min(I.length,d);for(const j of y(I.slice(0,z)))k.push(j);const D={oldStart:b,oldLines:L-b+z,newStart:S,newLines:C-S+z,lines:k};v.push(D),b=0,S=0,k=[]}L+=I.length,C+=I.length}}for(const A of v)for(let T=0;T<A.lines.length;T++)A.lines[T].endsWith(`
181
+ `)?A.lines[T]=A.lines[T].slice(0,-1):(A.lines.splice(T+1,0,"\"),T++);return{oldFileName:e,newFileName:t,oldHeader:o,newHeader:s,hunks:v}}}function w1(e,t){if(t||(t=VD),Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders)throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(a=>w1(a,t)).join(`
182
182
  `)}const i=[];t.includeIndex&&e.oldFileName==e.newFileName&&i.push("Index: "+e.oldFileName),t.includeUnderline&&i.push("==================================================================="),t.includeFileHeaders&&(i.push("--- "+e.oldFileName+(typeof e.oldHeader>"u"?"":" "+e.oldHeader)),i.push("+++ "+e.newFileName+(typeof e.newHeader>"u"?"":" "+e.newHeader)));for(let a=0;a<e.hunks.length;a++){const o=e.hunks[a];o.oldLines===0&&(o.oldStart-=1),o.newLines===0&&(o.newStart-=1),i.push("@@ -"+o.oldStart+","+o.oldLines+" +"+o.newStart+","+o.newLines+" @@");for(const s of o.lines)i.push(s)}return i.join(`
183
183
  `)+`
184
- `}function jD(e,t,i,a,o,s,c){{const f=BD(e,t,i,a,o,s);return f?C1(f,void 0):void 0}}function VD(e){const t=e.endsWith(`
184
+ `}function $D(e,t,i,a,o,s,c){{const f=GD(e,t,i,a,o,s);return f?w1(f,void 0):void 0}}function qD(e){const t=e.endsWith(`
185
185
  `),i=e.split(`
186
186
  `).map(a=>a+`
187
- `);return t?i.pop():i.push(i.pop().slice(0,-1)),i}function sb({line:e,spanStart:t,spanLength:i}){return{start:{line:e,character:t},end:{line:e,character:t+i},properties:{"data-diff-span":""},alwaysWrap:!0}}function gs({item:e,arr:t,enableJoin:i,isNeutral:a=!1,isLastItem:o=!1}){const s=t[t.length-1];if(s==null||o||!i){t.push([a?0:1,e.value]);return}const c=s[0]===0;if(a===c||a&&e.value.length===1&&!c){s[1]+=e.value;return}t.push([a?0:1,e.value])}const GD={forcePlainText:!1};function $D(e,t,i,{forcePlainText:a,startingLine:o,totalLines:s,expandedHunks:c,collapsedContextThreshold:f=ca}=GD){a?(o??=0,s??=1/0):(o=0,s=1/0);const d=o>0||s<1/0,p=typeof i.theme=="string"?t.getTheme(i.theme).type:void 0,g=wD({theme:i.theme,highlighter:t}),y=a&&!d&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":i.lineDiffType,b={deletionLines:[],additionLines:[]},v=!a&&!e.isPartial,S=a?c:void 0,T=new Map;function L(k){const C=v?0:k,z=T.get(C)??FD();return T.set(C,z),z}function A(k,C,z,U){if(d){let O=z.at(-1);(O==null||O.targetIndex+O.count!==C)&&(O={targetIndex:C,originalOffset:U.length,count:0},z.push(O)),O.count++}U.push(k)}Bs({diff:e,diffStyle:"both",startingLine:o,totalLines:s,expandedHunks:d?S:!0,collapsedContextThreshold:f,callback:({hunkIndex:k,additionLine:C,deletionLine:z,type:U})=>{const O=L(k),j=C!=null?C.splitLineIndex:z.splitLineIndex;U==="change"&&C!=null&&z!=null&&qD({additionLine:e.additionLines[C.lineIndex],deletionLine:e.deletionLines[z.lineIndex],deletionLineIndex:O.deletionContent.length,additionLineIndex:O.additionContent.length,deletionDecorations:O.deletionDecorations,additionDecorations:O.additionDecorations,lineDiffType:y}),z!=null&&(A(e.deletionLines[z.lineIndex],z.lineIndex,O.deletionSegments,O.deletionContent),O.deletionInfo.push({type:U==="change"?"change-deletion":U,lineNumber:z.lineNumber,altLineNumber:U==="change"?void 0:C.lineNumber??void 0,lineIndex:`${z.unifiedLineIndex},${j}`})),C!=null&&(A(e.additionLines[C.lineIndex],C.lineIndex,O.additionSegments,O.additionContent),O.additionInfo.push({type:U==="change"?"change-addition":U,lineNumber:C.lineNumber,altLineNumber:U==="change"?void 0:z.lineNumber??void 0,lineIndex:`${C.unifiedLineIndex},${j}`}))}});for(const k of T.values()){if(k.deletionContent.length===0&&k.additionContent.length===0)continue;const C={name:e.prevName??e.name,contents:k.deletionContent.value},z={name:e.name,contents:k.additionContent.value},{deletionLines:U,additionLines:O}=YD({deletionFile:C,deletionInfo:k.deletionInfo,deletionDecorations:k.deletionDecorations,additionFile:z,additionInfo:k.additionInfo,additionDecorations:k.additionDecorations,highlighter:t,options:i,languageOverride:a?"text":e.lang});if(v){b.deletionLines=U,b.additionLines=O;continue}if(k.deletionSegments.length>0)for(const j of k.deletionSegments)for(let $=0;$<j.count;$++)b.deletionLines[j.targetIndex+$]=U[j.originalOffset+$];else b.deletionLines.push(...U);if(k.additionSegments.length>0)for(const j of k.additionSegments)for(let $=0;$<j.count;$++)b.additionLines[j.targetIndex+$]=O[j.originalOffset+$];else b.additionLines.push(...O)}return{code:b,themeStyles:g,baseThemeType:p}}function qD({deletionLine:e,additionLine:t,deletionLineIndex:i,additionLineIndex:a,deletionDecorations:o,additionDecorations:s,lineDiffType:c}){if(e==null||t==null||c==="none")return;e=ha(e),t=ha(t);const f=c==="char"?OD(e,t):ID(e,t),d=[],p=[],g=c==="word-alt",y=f.at(-1);for(const v of f){const S=v===y;!v.added&&!v.removed?(gs({item:v,arr:d,enableJoin:g,isNeutral:!0,isLastItem:S}),gs({item:v,arr:p,enableJoin:g,isNeutral:!0,isLastItem:S})):v.removed?gs({item:v,arr:d,enableJoin:g,isLastItem:S}):gs({item:v,arr:p,enableJoin:g,isLastItem:S})}let b=0;for(const v of d)v[0]===1&&o.push(sb({line:i,spanStart:b,spanLength:v[1].length})),b+=v[1].length;b=0;for(const v of p)v[0]===1&&s.push(sb({line:a,spanStart:b,spanLength:v[1].length})),b+=v[1].length}function FD(){return{deletionContent:{push(e){this.value+=e,this.length++},value:"",length:0},additionContent:{push(e){this.value+=e,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function YD({deletionFile:e,additionFile:t,deletionInfo:i,additionInfo:a,highlighter:o,deletionDecorations:s,additionDecorations:c,languageOverride:f,options:{theme:d=Mn,...p}}){const g=f??da(e.name),y=f??da(t.name),{state:b,transformers:v}=xD(),S=typeof d=="string"?{...p,lang:"text",theme:d,transformers:v,decorations:void 0,defaultColor:!1,cssVariablePrefix:Sn("token")}:{...p,lang:"text",themes:d,transformers:v,decorations:void 0,defaultColor:!1,cssVariablePrefix:Sn("token")};return{deletionLines:e.contents===""?[]:(S.lang=g,b.lineInfo=i,S.decorations=s,ib(o.codeToHast(ha(e.contents),S))),additionLines:t.contents===""?[]:(S.lang=y,S.decorations=c,b.lineInfo=a,ib(o.codeToHast(ha(t.contents),S)))}}const XD=ue.createContext(void 0);function QD(e){const t=ue.useRef(e);return ue.useInsertionEffect(()=>{t.current=e}),ue.useCallback((...i)=>t.current(...i),[])}function ZD(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function ub(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function KD(){return Re({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[Ps({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}var WD=class{hoveredLine;pre;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;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.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),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:i=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),i?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),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()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e){const t=!(e===this.selectedRange||ub(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!t||(this.selectedRange=e,this.renderSelection(),t&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{if(this.hoveredLine!=null){if(this.mode==="diff"&&this.hoveredLine.type==="diff-line")return{lineNumber:this.hoveredLine.lineNumber,side:this.hoveredLine.annotationSide};if(this.mode==="file"&&this.hoveredLine.type==="line")return{lineNumber:this.hoveredLine.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:i,onLineNumberClick:a,onMergeConflictActionClick:o}=this.options;t==null&&i==null&&a==null&&o==null||this.options.onGutterUtilityClick!=null&&hb(e.composedPath())||(ri(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{const{lineHoverHighlight:t="disabled",onLineEnter:i,onLineLeave:a,enableGutterUtility:o=!1}=this.options;t==="disabled"&&!o&&i==null&&a==null||(ri(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(ri(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null){ri(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no .hoveredLine");return}this.gutterUtilityContainer?.remove(),this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:i}=this.options,a=t.composedPath();ri(i,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:a});const o=this.resolvePointerTarget(a);ri(i,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",o);const{onLineClick:s,onLineNumberClick:c,onLineEnter:f,onLineLeave:d,onHunkExpand:p,onMergeConflictActionClick:g}=this.options;switch(e){case"move":if(vl(o)&&this.hoveredLine?.lineElement===o.lineElement)break;this.hoveredLine!=null&&(this.gutterUtilityContainer?.remove(),d?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),vl(o)&&(this.setHoveredLine(this.toEventBaseProps(o)),this.gutterUtilityContainer!=null&&o.numberElement.appendChild(this.gutterUtilityContainer),f?.({...this.hoveredLine,event:t}));break;case"click":{if(o==null)break;if(tO(o)&&g!=null){g(o);break}if(eO(o)&&p!=null){p(o.hunkIndex,t.shiftKey?"both":o.direction,t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!vl(o))break;const y=this.toEventBaseProps(o);c!=null&&o.numberColumn?c({...y,event:t}):s?.({...y,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:i="disabled",onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onHunkExpand:f,onMergeConflictActionClick:d,enableGutterUtility:p=!1,enableLineSelection:g=!1,onGutterUtilityClick:y}=this.options,b=y!=null,v=i!=="disabled"||a!=null||o!=null||f!=null||d!=null||s!=null||c!=null||p||g||b;v&&!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,ri(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const L=[];return(t==="both"||t==="click")&&(a!=null&&L.push("onLineClick"),o!=null&&L.push("onLineNumberClick"),f!=null&&L.push("expandable hunk separators"),d!=null&&L.push("merge conflict actions")),L})()),ri(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),ri(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!v&&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 S=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",T=this.pointerSession.mode==="gutterSelecting";(!g&&S||!b&&T)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:i=!1}=this.options,a=e!=null,o=t!=null||i;a&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!a&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),o&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!o&&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();hb(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e,t):this.startLineSelectionFromPointerDown(e,t)};startLineSelectionFromPointerDown(e,t){const{enableLineSelection:i=!1}=this.options;if(!i)return;const a=this.getSelectionPointerInfo(t,!0);if(a==null)return;const{pre:o}=this;if(o==null)return;e.preventDefault();const{lineNumber:s,eventSide:c,lineIndex:f}=a;if(e.shiftKey&&this.selectedRange!=null){const d=this.getIndexesFromSelection(this.selectedRange,o.getAttribute("data-diff-type")==="split");if(d==null)return;const p=d.start<=d.end?f>=d.start:f<=d.end;this.selectionAnchor={lineNumber:p?this.selectedRange.start:this.selectedRange.end,side:p?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(s,c,!1),this.notifySelectionStart(this.selectedRange),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===s&&this.selectedRange?.end===s){const d={lineNumber:s,side:c};this.selectionAnchor=d,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:d,pending:d},this.attachDocumentPointerListeners();return}this.selectedRange=null,this.selectionAnchor={lineNumber:s,side:c},this.updateSelection(s,c,!1),this.notifySelectionStart(this.selectedRange),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e,t){const{enableLineSelection:i=!1,onGutterUtilityClick:a}=this.options;if(a==null)return;const o=this.getSelectionPointFromPath(t);o!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:o,current:o},i&&(this.selectionAnchor={lineNumber:o.lineNumber,side:o.side},this.updateSelection(o.lineNumber,o.side,!1),this.notifySelectionStart(this.selectedRange)),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;const i=this.getSelectionPointFromPath(e.composedPath());if(i==null)return;this.pointerSession.current=i,t===!0&&this.updateSelection(i.lineNumber,i.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;const i=this.getSelectionPointerInfo(e.composedPath(),!1);if(i==null||this.selectionAnchor==null)return;this.updateSelection(i.lineNumber,i.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;const i=this.getSelectionPointerInfo(e.composedPath(),!1);if(i==null||this.selectionAnchor==null)return;const a={lineNumber:i.lineNumber,side:i.eventSide};if(ZD(this.pointerSession.pending,a))return;this.updateSelection(i.lineNumber,i.eventSide,!1),this.notifySelectionStart(this.selectedRange),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:t=!1,onGutterUtilityClick:i}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;const a=this.getSelectionPointFromPath(e.composedPath());a!=null&&(this.pointerSession.current=a,t&&this.updateSelection(a.lineNumber,a.side)),i?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted()}};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.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",""))}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=ua(KD());const i=t.firstElementChild;if(!(i instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");i.remove(),this.gutterUtilityButton=i}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}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"})}getSelectionPointerInfo(e,t){const i=this.resolvePointerTarget(e);if(vl(i)&&!(t&&!i.numberColumn)&&i.splitLineIndex!=null)return{lineIndex:i.splitLineIndex,lineNumber:i.lineNumber,eventSide:this.mode==="diff"?i.side:void 0}}getSelectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(vl(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}getLineIndex(e,t){const{getLineIndex:i}=this.options;return i!=null?i(e,t):[e-1,e-1]}updateSelection(e,t,i=!0){const{selectedRange:a}=this;let o;if(e==null)o=null;else{const s=this.selectionAnchor?.side??t,c=this.selectionAnchor?.lineNumber??e;o=this.buildSelectionRange(c,e,s,t)}ub(a??void 0,o??void 0)||(this.selectedRange=o,i&&this.notifySelectionChangeDelta(),this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection))}getIndexesFromSelection(e,t){if(this.pre==null)return;const i=this.getLineIndex(e.start,e.side),a=this.getLineIndex(e.end,e.endSide??e.side);return i!=null&&a!=null?{start:t?i[1]:i[0],end:t?a[1]:a[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 f of e)f.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 i=this.pre.getAttribute("data-diff-type")==="split",a=this.getIndexesFromSelection(this.selectedRange,i);if(a==null)throw console.error({rowRange:a,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const o=a.start===a.end,s=Math.min(a.start,a.end),c=Math.max(a.start,a.end);for(const f of t){const[d,p]=f.children,g=p.children.length;if(g!==d.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let y=0;y<g;y++){const b=p.children[y],v=d.children[y];if(!(b instanceof HTMLElement)||!(v instanceof HTMLElement))continue;const S=this.parseLineIndex(b,i);if((S??0)>c)break;if(S==null||S<s)continue;let T=o?"single":S===s?"first":S===c?"last":"";b.setAttribute("data-selected-line",T),v.setAttribute("data-selected-line",T),v.nextSibling instanceof HTMLElement&&b.nextSibling instanceof HTMLElement&&(b.nextSibling.hasAttribute("data-line-annotation")||b.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(o?(T="last",b.setAttribute("data-selected-line","first")):S===s?T="":S===c&&b.setAttribute("data-selected-line",""),b.nextSibling.setAttribute("data-selected-line",T),v.nextSibling.setAttribute("data-selected-line",T))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.selectedRange??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.selectedRange??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}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,i,a){return{start:e,end:t,...i!=null?{side:i}:{},...i!==a&&a!=null?{endSide:a}:{}}}resolvePointerTarget(e){let t=!1,i,a,o,s,c,f,d,p;for(const b of e){if(!(b instanceof HTMLElement))continue;if(p==null&&b.hasAttribute("data-merge-conflict-action")){const L=b.getAttribute("data-merge-conflict-action")??void 0,A=b.getAttribute("data-merge-conflict-conflict-index")??void 0,k=A!=null?Number.parseInt(A,10):NaN;nO(L)&&Number.isFinite(k)&&(p={kind:"merge-conflict-action",resolution:L,conflictIndex:k})}const v=c==null?b.getAttribute("data-column-number")??void 0:void 0;if(v!=null){c=b,d=Number.parseInt(v,10),t=!0,i=db(b),s=b.getAttribute("data-line-index")??void 0;continue}const S=o==null?b.getAttribute("data-line")??void 0:void 0;if(S!=null){o=b,d=Number.parseInt(S,10),i=db(b),s=b.getAttribute("data-line-index")??void 0;continue}if(f==null&&b.hasAttribute("data-expand-button")){f={hunkIndex:void 0,direction:b.hasAttribute("data-expand-up")?"up":b.hasAttribute("data-expand-down")?"down":"both"};continue}const T=f!=null?b.getAttribute("data-expand-index")??void 0:void 0;if(f!=null&&T!=null){const L=Number.parseInt(T,10);Number.isNaN(L)||(f.hunkIndex=L);continue}if(a==null&&b.hasAttribute("data-code")){a=b;break}}if(p!=null)return p;if(f?.hunkIndex!=null)return{type:"line-info",hunkIndex:f.hunkIndex,direction:f.direction};if(o??=s!=null?fb(a,`[data-line][data-line-index="${s}"]`):void 0,c??=s!=null?fb(a,`[data-column-number][data-line-index="${s}"]`):void 0,a==null||o==null||c==null||i==null||d==null||Number.isNaN(d))return;const g=this.parseLineIndex(o,this.isSplitDiff());if(this.mode==="file")return{kind:"line",lineType:i,lineElement:o,lineNumber:d,numberColumn:t,numberElement:c,side:void 0,splitLineIndex:g};const y=(()=>{switch(i){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return a.hasAttribute("data-deletions")?"deletions":"additions"}})();return{kind:"line",lineType:i,lineElement:o,lineNumber:d,numberColumn:t,numberElement:c,side:y,splitLineIndex:g}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const i=(e.getAttribute("data-line-index")??"").split(",").map(a=>Number.parseInt(a,10)).filter(a=>!Number.isNaN(a));if(t&&i.length===2)return i[1];if(!t)return i[0]}};function cb({enableGutterUtility:e,enableHoverUtility:t,lineHoverHighlight:i,onGutterUtilityClick:a,onLineClick:o,onLineEnter:s,onLineLeave:c,onLineNumberClick:f,renderGutterUtility:d,renderHoverUtility:p,__debugPointerEvents:g,enableLineSelection:y,onLineSelected:b,onLineSelectionStart:v,onLineSelectionChange:S,onLineSelectionEnd:T},L,A,k){return{enableGutterUtility:JD({enableGutterUtility:e,enableHoverUtility:t,renderGutterUtility:d,renderHoverUtility:p,onGutterUtilityClick:a}),usesCustomGutterUtility:d!=null||p!=null,lineHoverHighlight:i,onGutterUtilityClick:a,onHunkExpand:L,onMergeConflictActionClick:k,onLineClick:o,onLineEnter:s,onLineLeave:c,onLineNumberClick:f,__debugPointerEvents:g,enableLineSelection:y,onLineSelected:b,onLineSelectionStart:v,onLineSelectionChange:S,onLineSelectionEnd:T,getLineIndex:A}}function JD({enableGutterUtility:e,enableHoverUtility:t,renderGutterUtility:i,renderHoverUtility:a,onGutterUtilityClick:o}){if(e!==void 0&&t!==void 0)throw new Error("Cannot use both 'enableGutterUtility' and deprecated 'enableHoverUtility'. Use only 'enableGutterUtility'.");if(i!=null&&a!=null)throw new Error("Cannot use both 'renderGutterUtility' and deprecated 'renderHoverUtility'. Use only 'renderGutterUtility'.");if(o!=null&&(i!=null||a!=null))throw new Error("Cannot use both 'onGutterUtilityClick' and render utility callbacks ('renderGutterUtility'/'renderHoverUtility'). Use only one gutter utility API.");return e??t??!1}function vl(e){return e!=null&&"kind"in e&&e.kind==="line"}function eO(e){return"type"in e&&e.type==="line-info"}function tO(e){return"kind"in e&&e.kind==="merge-conflict-action"}function nO(e){return e==="current"||e==="incoming"||e==="both"}function fb(e,t){const i=e?.querySelector(t);return i instanceof HTMLElement?i:void 0}function db(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 hb(e){for(const t of e)if(t instanceof HTMLElement&&t.hasAttribute("data-utility-button"))return!0;return!1}function ri(e="none",t,...i){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...i)}var iO=class{observedNodes=new Map;queuedUpdates=new Map;cleanUp(){this.resizeObserver?.disconnect(),this.observedNodes.clear(),this.queuedUpdates.clear()}resizeObserver;setup(e,t){this.resizeObserver??=new ResizeObserver(this.handleResizeObserver);const i=e.querySelectorAll("code"),a=new Map(this.observedNodes);this.observedNodes.clear();for(const o of i){let s=a.get(o);if(s!=null&&s.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let c=o.firstElementChild;c instanceof HTMLElement||(c=null),s!=null?(this.observedNodes.set(o,s),a.delete(o),s.numberElement!==c?(s.numberElement!=null&&this.resizeObserver.unobserve(s.numberElement),c!=null&&(this.resizeObserver.observe(c),a.delete(c),this.observedNodes.set(c,s)),s.numberElement=c):s.numberElement!=null&&(a.delete(s.numberElement),this.observedNodes.set(s.numberElement,s))):(s={type:"code",codeElement:o,numberElement:c,codeWidth:"auto",numberWidth:0},this.observedNodes.set(o,s),this.resizeObserver.observe(o),c!=null&&(this.observedNodes.set(c,s),this.resizeObserver.observe(c)))}if(i.length>1&&!t){const o=e.querySelectorAll('[data-line-annotation*=","]'),s=new Map;for(const c of o){if(!(c instanceof HTMLElement))continue;const{lineAnnotation:f=""}=c.dataset;if(!/^\d+,\d+$/.test(f)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:f,element:c});continue}let d=s.get(f);d==null&&(d=[],s.set(f,d)),d.push(c)}for(const[c,f]of s){if(f.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",c,f);continue}const[d,p]=f,g=d.firstElementChild,y=p.firstElementChild;if(!(d instanceof HTMLElement)||!(p instanceof HTMLElement)||!(g instanceof HTMLElement)||!(y instanceof HTMLElement))continue;let b=a.get(g);if(b!=null){this.observedNodes.set(g,b),this.observedNodes.set(y,b),a.delete(g),a.delete(y);continue}b={type:"annotations",column1:{container:d,child:g,childHeight:g.getBoundingClientRect().height},column2:{container:p,child:y,childHeight:y.getBoundingClientRect().height},currentHeight:"auto"};const v=Math.max(b.column1.childHeight,b.column2.childHeight);this.applyNewHeight(b,v),this.observedNodes.set(g,b),this.observedNodes.set(y,b),this.resizeObserver.observe(g),this.resizeObserver.observe(y)}}for(const o of a.keys())o.isConnected&&(o.style.removeProperty("--diffs-column-content-width"),o.style.removeProperty("--diffs-column-number-width"),o.style.removeProperty("--diffs-column-width"),o.parentElement instanceof HTMLElement&&o.parentElement.style.removeProperty("--diffs-annotation-min-height")),this.resizeObserver.unobserve(o);a.clear()}handleResizeObserver=e=>{for(const t of e){const{target:i,borderBoxSize:a}=t;if(!(i instanceof HTMLElement)){console.error("FileDiff.handleResizeObserver: Invalid element for ResizeObserver",t);continue}const o=this.observedNodes.get(i);if(o==null){console.error("FileDiff.handleResizeObserver: Not a valid observed node",t);continue}const s=a[0];if(o.type==="annotations"){const c=(()=>{if(i===o.column1.child)return o.column1;if(i===o.column2.child)return o.column2})();if(c==null){console.error("FileDiff.handleResizeObserver: Couldn't find a column for",{item:o,target:i});continue}c.childHeight=s.blockSize;const f=Math.max(o.column1.childHeight,o.column2.childHeight);this.applyNewHeight(o,f)}else if(o.type==="code"){const c=[i,s.inlineSize],f=this.queuedUpdates.get(o)??[];f.push(c),this.queuedUpdates.set(o,f)}}this.handleColumnChange()};handleColumnChange=()=>{for(const[e,t]of this.queuedUpdates)for(const[i,a]of t)if(i===e.codeElement){const o=Math.max(Math.floor(a),0);if(o!==e.codeWidth){const s=Math.max(o-e.numberWidth,0);e.codeWidth=o===0?"auto":o,e.codeElement.style.setProperty("--diffs-column-content-width",`${s>0?`${s}px`:"auto"}`),e.codeElement.style.setProperty("--diffs-column-width",`${typeof e.codeWidth=="number"?`${e.codeWidth}px`:"auto"}`)}e.numberElement!=null&&typeof e.codeWidth=="number"&&e.numberWidth===0&&t.push([e.numberElement,e.numberElement.getBoundingClientRect().width])}else if(i===e.numberElement){const o=Math.max(Math.ceil(a),0);if(o!==e.numberWidth&&(e.numberWidth=o,e.codeElement.style.setProperty("--diffs-column-number-width",`${e.numberWidth===0?"auto":`${e.numberWidth}px`}`),e.codeWidth!=="auto")){const s=Math.max(e.codeWidth-e.numberWidth,0);e.codeElement.style.setProperty("--diffs-column-content-width",`${s===0?"auto":`${s}px`}`)}}this.queuedUpdates.clear()};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty("--diffs-annotation-min-height",`${e.currentHeight}px`),e.column2.container.style.setProperty("--diffs-annotation-min-height",`${e.currentHeight}px`))}};function w1(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 pb(e){for(const t of Array.isArray(e)?e:[e])if(!Id.has(t))return!1;return!0}function ed(e){for(const t of E1(e))if(!Md.has(t))return!1;return!0}function rO(e){return Re({tagName:"div",children:[Re({tagName:"div",children:e.annotations?.map(t=>Re({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function aO(e,t){return Re({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function lO(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 oO({fileOrDiff:e,mode:t}){const i="type"in e?e:void 0,a={"data-diffs-header":t,"data-change-type":i?.type};return Re({tagName:"div",children:[t==="custom"?Re({tagName:"slot",properties:{name:dh}}):sO({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...t==="custom"?[]:[uO(i)]],properties:a})}function sO({name:e,prevName:t,iconType:i}){const a=[Re({tagName:"slot",properties:{name:ch}}),Ps({name:lO(i),properties:{"data-change-icon":i}})];return t!=null&&(a.push(Re({tagName:"div",children:[Re({tagName:"bdi",children:[li(t)]})],properties:{"data-prev-name":""}})),a.push(Ps({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),a.push(Re({tagName:"div",children:[Re({tagName:"bdi",children:[li(e)]})],properties:{"data-title":""}})),Re({tagName:"div",children:a,properties:{"data-header-content":""}})}function uO(e){const t=[];if(e!=null){let i=0,a=0;for(const o of e.hunks)i+=o.additionLines,a+=o.deletionLines;(a>0||i===0)&&t.push(Re({tagName:"span",children:[li(`-${a}`)],properties:{"data-deletions-count":""}})),(i>0||a===0)&&t.push(Re({tagName:"span",children:[li(`+${i}`)],properties:{"data-additions-count":""}}))}return t.push(Re({tagName:"slot",properties:{name:fh}})),Re({tagName:"div",children:t,properties:{"data-metadata":""}})}function cO(e){return Re({tagName:"pre",properties:fO(e)})}function fO({diffIndicators:e,disableBackground:t,disableLineNumbers:i,overflow:a,split:o,totalLines:s,type:c,customProperties:f}){return{...f,"data-diff":c==="diff"?"":void 0,"data-file":c==="file"?"":void 0,"data-diff-type":c==="diff"?o?"split":"single":void 0,"data-overflow":a,"data-disable-line-numbers":i?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,tabIndex:0,style:`--diffs-min-number-column-width-default:${`${s}`.length}ch;`}}function dO(e,{theme:t,preferredHighlighter:i="shiki-js"}){return{langs:[e??"text"],themes:E1(t),preferredHighlighter:i}}const hO=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
187
+ `);return t?i.pop():i.push(i.pop().slice(0,-1)),i}function sb({line:e,spanStart:t,spanLength:i}){return{start:{line:e,character:t},end:{line:e,character:t+i},properties:{"data-diff-span":""},alwaysWrap:!0}}function gs({item:e,arr:t,enableJoin:i,isNeutral:a=!1,isLastItem:o=!1}){const s=t[t.length-1];if(s==null||o||!i){t.push([a?0:1,e.value]);return}const c=s[0]===0;if(a===c||a&&e.value.length===1&&!c){s[1]+=e.value;return}t.push([a?0:1,e.value])}const FD={forcePlainText:!1};function YD(e,t,i,{forcePlainText:a,startingLine:o,totalLines:s,expandedHunks:c,collapsedContextThreshold:f=ha}=FD){a?(o??=0,s??=1/0):(o=0,s=1/0);const d=o>0||s<1/0,p=typeof i.theme=="string"?t.getTheme(i.theme).type:void 0,g=TD({theme:i.theme,highlighter:t}),y=a&&!d&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":i.lineDiffType,v={deletionLines:[],additionLines:[]},b=!a&&!e.isPartial,S=a?c:void 0,k=new Map;function L(A){const T=b?0:A,I=k.get(T)??QD();return k.set(T,I),I}function C(A,T,I,z){if(d){let D=I.at(-1);(D==null||D.targetIndex+D.count!==T)&&(D={targetIndex:T,originalOffset:z.length,count:0},I.push(D)),D.count++}z.push(A)}Bs({diff:e,diffStyle:"both",startingLine:o,totalLines:s,expandedHunks:d?S:!0,collapsedContextThreshold:f,callback:({hunkIndex:A,additionLine:T,deletionLine:I,type:z})=>{const D=L(A),j=T!=null?T.splitLineIndex:I.splitLineIndex;z==="change"&&T!=null&&I!=null&&XD({additionLine:e.additionLines[T.lineIndex],deletionLine:e.deletionLines[I.lineIndex],deletionLineIndex:D.deletionContent.length,additionLineIndex:D.additionContent.length,deletionDecorations:D.deletionDecorations,additionDecorations:D.additionDecorations,lineDiffType:y}),I!=null&&(C(e.deletionLines[I.lineIndex],I.lineIndex,D.deletionSegments,D.deletionContent),D.deletionInfo.push({type:z==="change"?"change-deletion":z,lineNumber:I.lineNumber,altLineNumber:z==="change"?void 0:T.lineNumber??void 0,lineIndex:`${I.unifiedLineIndex},${j}`})),T!=null&&(C(e.additionLines[T.lineIndex],T.lineIndex,D.additionSegments,D.additionContent),D.additionInfo.push({type:z==="change"?"change-addition":z,lineNumber:T.lineNumber,altLineNumber:z==="change"?void 0:I.lineNumber??void 0,lineIndex:`${T.unifiedLineIndex},${j}`}))}});for(const A of k.values()){if(A.deletionContent.length===0&&A.additionContent.length===0)continue;const T={name:e.prevName??e.name,contents:A.deletionContent.value},I={name:e.name,contents:A.additionContent.value},{deletionLines:z,additionLines:D}=ZD({deletionFile:T,deletionInfo:A.deletionInfo,deletionDecorations:A.deletionDecorations,additionFile:I,additionInfo:A.additionInfo,additionDecorations:A.additionDecorations,highlighter:t,options:i,languageOverride:a?"text":e.lang});if(b){v.deletionLines=z,v.additionLines=D;continue}if(A.deletionSegments.length>0)for(const j of A.deletionSegments)for(let G=0;G<j.count;G++)v.deletionLines[j.targetIndex+G]=z[j.originalOffset+G];else v.deletionLines.push(...z);if(A.additionSegments.length>0)for(const j of A.additionSegments)for(let G=0;G<j.count;G++)v.additionLines[j.targetIndex+G]=D[j.originalOffset+G];else v.additionLines.push(...D)}return{code:v,themeStyles:g,baseThemeType:p}}function XD({deletionLine:e,additionLine:t,deletionLineIndex:i,additionLineIndex:a,deletionDecorations:o,additionDecorations:s,lineDiffType:c}){if(e==null||t==null||c==="none")return;e=ga(e),t=ga(t);const f=c==="char"?ID(e,t):HD(e,t),d=[],p=[],g=c==="word-alt",y=f.at(-1);for(const b of f){const S=b===y;!b.added&&!b.removed?(gs({item:b,arr:d,enableJoin:g,isNeutral:!0,isLastItem:S}),gs({item:b,arr:p,enableJoin:g,isNeutral:!0,isLastItem:S})):b.removed?gs({item:b,arr:d,enableJoin:g,isLastItem:S}):gs({item:b,arr:p,enableJoin:g,isLastItem:S})}let v=0;for(const b of d)b[0]===1&&o.push(sb({line:i,spanStart:v,spanLength:b[1].length})),v+=b[1].length;v=0;for(const b of p)b[0]===1&&s.push(sb({line:a,spanStart:v,spanLength:b[1].length})),v+=b[1].length}function QD(){return{deletionContent:{push(e){this.value+=e,this.length++},value:"",length:0},additionContent:{push(e){this.value+=e,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function ZD({deletionFile:e,additionFile:t,deletionInfo:i,additionInfo:a,highlighter:o,deletionDecorations:s,additionDecorations:c,languageOverride:f,options:{theme:d=Pn,...p}}){const g=f??ma(e.name),y=f??ma(t.name),{state:v,transformers:b}=AD(),S=typeof d=="string"?{...p,lang:"text",theme:d,transformers:b,decorations:void 0,defaultColor:!1,cssVariablePrefix:wn("token")}:{...p,lang:"text",themes:d,transformers:b,decorations:void 0,defaultColor:!1,cssVariablePrefix:wn("token")};return{deletionLines:e.contents===""?[]:(S.lang=g,v.lineInfo=i,S.decorations=s,ib(o.codeToHast(ga(e.contents),S))),additionLines:t.contents===""?[]:(S.lang=y,S.decorations=c,v.lineInfo=a,ib(o.codeToHast(ga(t.contents),S)))}}const KD=ae.createContext(void 0);function WD(e){const t=ae.useRef(e);return ae.useInsertionEffect(()=>{t.current=e}),ae.useCallback((...i)=>t.current(...i),[])}function JD(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function ub(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function eN(){return Le({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[Ps({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}var tN=class{hoveredLine;pre;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;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.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),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:i=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),i?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),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()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e){const t=!(e===this.selectedRange||ub(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!t||(this.selectedRange=e,this.renderSelection(),t&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{if(this.hoveredLine!=null){if(this.mode==="diff"&&this.hoveredLine.type==="diff-line")return{lineNumber:this.hoveredLine.lineNumber,side:this.hoveredLine.annotationSide};if(this.mode==="file"&&this.hoveredLine.type==="line")return{lineNumber:this.hoveredLine.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:i,onLineNumberClick:a,onMergeConflictActionClick:o}=this.options;t==null&&i==null&&a==null&&o==null||this.options.onGutterUtilityClick!=null&&hb(e.composedPath())||(si(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{const{lineHoverHighlight:t="disabled",onLineEnter:i,onLineLeave:a,enableGutterUtility:o=!1}=this.options;t==="disabled"&&!o&&i==null&&a==null||(si(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(si(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null){si(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no .hoveredLine");return}this.gutterUtilityContainer?.remove(),this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:i}=this.options,a=t.composedPath();si(i,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:a});const o=this.resolvePointerTarget(a);si(i,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",o);const{onLineClick:s,onLineNumberClick:c,onLineEnter:f,onLineLeave:d,onHunkExpand:p,onMergeConflictActionClick:g}=this.options;switch(e){case"move":if(El(o)&&this.hoveredLine?.lineElement===o.lineElement)break;this.hoveredLine!=null&&(this.gutterUtilityContainer?.remove(),d?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),El(o)&&(this.setHoveredLine(this.toEventBaseProps(o)),this.gutterUtilityContainer!=null&&o.numberElement.appendChild(this.gutterUtilityContainer),f?.({...this.hoveredLine,event:t}));break;case"click":{if(o==null)break;if(rN(o)&&g!=null){g(o);break}if(iN(o)&&p!=null){p(o.hunkIndex,t.shiftKey?"both":o.direction,t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!El(o))break;const y=this.toEventBaseProps(o);c!=null&&o.numberColumn?c({...y,event:t}):s?.({...y,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:i="disabled",onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onHunkExpand:f,onMergeConflictActionClick:d,enableGutterUtility:p=!1,enableLineSelection:g=!1,onGutterUtilityClick:y}=this.options,v=y!=null,b=i!=="disabled"||a!=null||o!=null||f!=null||d!=null||s!=null||c!=null||p||g||v;b&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,si(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const L=[];return(t==="both"||t==="click")&&(a!=null&&L.push("onLineClick"),o!=null&&L.push("onLineNumberClick"),f!=null&&L.push("expandable hunk separators"),d!=null&&L.push("merge conflict actions")),L})()),si(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),si(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!b&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const S=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",k=this.pointerSession.mode==="gutterSelecting";(!g&&S||!v&&k)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:i=!1}=this.options,a=e!=null,o=t!=null||i;a&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!a&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),o&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!o&&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();hb(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e,t):this.startLineSelectionFromPointerDown(e,t)};startLineSelectionFromPointerDown(e,t){const{enableLineSelection:i=!1}=this.options;if(!i)return;const a=this.getSelectionPointerInfo(t,!0);if(a==null)return;const{pre:o}=this;if(o==null)return;e.preventDefault();const{lineNumber:s,eventSide:c,lineIndex:f}=a;if(e.shiftKey&&this.selectedRange!=null){const d=this.getIndexesFromSelection(this.selectedRange,o.getAttribute("data-diff-type")==="split");if(d==null)return;const p=d.start<=d.end?f>=d.start:f<=d.end;this.selectionAnchor={lineNumber:p?this.selectedRange.start:this.selectedRange.end,side:p?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(s,c,!1),this.notifySelectionStart(this.selectedRange),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===s&&this.selectedRange?.end===s){const d={lineNumber:s,side:c};this.selectionAnchor=d,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:d,pending:d},this.attachDocumentPointerListeners();return}this.selectedRange=null,this.selectionAnchor={lineNumber:s,side:c},this.updateSelection(s,c,!1),this.notifySelectionStart(this.selectedRange),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e,t){const{enableLineSelection:i=!1,onGutterUtilityClick:a}=this.options;if(a==null)return;const o=this.getSelectionPointFromPath(t);o!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:o,current:o},i&&(this.selectionAnchor={lineNumber:o.lineNumber,side:o.side},this.updateSelection(o.lineNumber,o.side,!1),this.notifySelectionStart(this.selectedRange)),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;const i=this.getSelectionPointFromPath(e.composedPath());if(i==null)return;this.pointerSession.current=i,t===!0&&this.updateSelection(i.lineNumber,i.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;const i=this.getSelectionPointerInfo(e.composedPath(),!1);if(i==null||this.selectionAnchor==null)return;this.updateSelection(i.lineNumber,i.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;const i=this.getSelectionPointerInfo(e.composedPath(),!1);if(i==null||this.selectionAnchor==null)return;const a={lineNumber:i.lineNumber,side:i.eventSide};if(JD(this.pointerSession.pending,a))return;this.updateSelection(i.lineNumber,i.eventSide,!1),this.notifySelectionStart(this.selectedRange),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:t=!1,onGutterUtilityClick:i}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;const a=this.getSelectionPointFromPath(e.composedPath());a!=null&&(this.pointerSession.current=a,t&&this.updateSelection(a.lineNumber,a.side)),i?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted()}};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.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",""))}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=da(eN());const i=t.firstElementChild;if(!(i instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");i.remove(),this.gutterUtilityButton=i}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}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"})}getSelectionPointerInfo(e,t){const i=this.resolvePointerTarget(e);if(El(i)&&!(t&&!i.numberColumn)&&i.splitLineIndex!=null)return{lineIndex:i.splitLineIndex,lineNumber:i.lineNumber,eventSide:this.mode==="diff"?i.side:void 0}}getSelectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(El(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}getLineIndex(e,t){const{getLineIndex:i}=this.options;return i!=null?i(e,t):[e-1,e-1]}updateSelection(e,t,i=!0){const{selectedRange:a}=this;let o;if(e==null)o=null;else{const s=this.selectionAnchor?.side??t,c=this.selectionAnchor?.lineNumber??e;o=this.buildSelectionRange(c,e,s,t)}ub(a??void 0,o??void 0)||(this.selectedRange=o,i&&this.notifySelectionChangeDelta(),this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection))}getIndexesFromSelection(e,t){if(this.pre==null)return;const i=this.getLineIndex(e.start,e.side),a=this.getLineIndex(e.end,e.endSide??e.side);return i!=null&&a!=null?{start:t?i[1]:i[0],end:t?a[1]:a[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 f of e)f.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 i=this.pre.getAttribute("data-diff-type")==="split",a=this.getIndexesFromSelection(this.selectedRange,i);if(a==null)throw console.error({rowRange:a,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const o=a.start===a.end,s=Math.min(a.start,a.end),c=Math.max(a.start,a.end);for(const f of t){const[d,p]=f.children,g=p.children.length;if(g!==d.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let y=0;y<g;y++){const v=p.children[y],b=d.children[y];if(!(v instanceof HTMLElement)||!(b instanceof HTMLElement))continue;const S=this.parseLineIndex(v,i);if((S??0)>c)break;if(S==null||S<s)continue;let k=o?"single":S===s?"first":S===c?"last":"";v.setAttribute("data-selected-line",k),b.setAttribute("data-selected-line",k),b.nextSibling instanceof HTMLElement&&v.nextSibling instanceof HTMLElement&&(v.nextSibling.hasAttribute("data-line-annotation")||v.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(o?(k="last",v.setAttribute("data-selected-line","first")):S===s?k="":S===c&&v.setAttribute("data-selected-line",""),v.nextSibling.setAttribute("data-selected-line",k),b.nextSibling.setAttribute("data-selected-line",k))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.selectedRange??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.selectedRange??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}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,i,a){return{start:e,end:t,...i!=null?{side:i}:{},...i!==a&&a!=null?{endSide:a}:{}}}resolvePointerTarget(e){let t=!1,i,a,o,s,c,f,d,p;for(const v of e){if(!(v instanceof HTMLElement))continue;if(p==null&&v.hasAttribute("data-merge-conflict-action")){const L=v.getAttribute("data-merge-conflict-action")??void 0,C=v.getAttribute("data-merge-conflict-conflict-index")??void 0,A=C!=null?Number.parseInt(C,10):NaN;aN(L)&&Number.isFinite(A)&&(p={kind:"merge-conflict-action",resolution:L,conflictIndex:A})}const b=c==null?v.getAttribute("data-column-number")??void 0:void 0;if(b!=null){c=v,d=Number.parseInt(b,10),t=!0,i=db(v),s=v.getAttribute("data-line-index")??void 0;continue}const S=o==null?v.getAttribute("data-line")??void 0:void 0;if(S!=null){o=v,d=Number.parseInt(S,10),i=db(v),s=v.getAttribute("data-line-index")??void 0;continue}if(f==null&&v.hasAttribute("data-expand-button")){f={hunkIndex:void 0,direction:v.hasAttribute("data-expand-up")?"up":v.hasAttribute("data-expand-down")?"down":"both"};continue}const k=f!=null?v.getAttribute("data-expand-index")??void 0:void 0;if(f!=null&&k!=null){const L=Number.parseInt(k,10);Number.isNaN(L)||(f.hunkIndex=L);continue}if(a==null&&v.hasAttribute("data-code")){a=v;break}}if(p!=null)return p;if(f?.hunkIndex!=null)return{type:"line-info",hunkIndex:f.hunkIndex,direction:f.direction};if(o??=s!=null?fb(a,`[data-line][data-line-index="${s}"]`):void 0,c??=s!=null?fb(a,`[data-column-number][data-line-index="${s}"]`):void 0,a==null||o==null||c==null||i==null||d==null||Number.isNaN(d))return;const g=this.parseLineIndex(o,this.isSplitDiff());if(this.mode==="file")return{kind:"line",lineType:i,lineElement:o,lineNumber:d,numberColumn:t,numberElement:c,side:void 0,splitLineIndex:g};const y=(()=>{switch(i){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return a.hasAttribute("data-deletions")?"deletions":"additions"}})();return{kind:"line",lineType:i,lineElement:o,lineNumber:d,numberColumn:t,numberElement:c,side:y,splitLineIndex:g}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const i=(e.getAttribute("data-line-index")??"").split(",").map(a=>Number.parseInt(a,10)).filter(a=>!Number.isNaN(a));if(t&&i.length===2)return i[1];if(!t)return i[0]}};function cb({enableGutterUtility:e,enableHoverUtility:t,lineHoverHighlight:i,onGutterUtilityClick:a,onLineClick:o,onLineEnter:s,onLineLeave:c,onLineNumberClick:f,renderGutterUtility:d,renderHoverUtility:p,__debugPointerEvents:g,enableLineSelection:y,onLineSelected:v,onLineSelectionStart:b,onLineSelectionChange:S,onLineSelectionEnd:k},L,C,A){return{enableGutterUtility:nN({enableGutterUtility:e,enableHoverUtility:t,renderGutterUtility:d,renderHoverUtility:p,onGutterUtilityClick:a}),usesCustomGutterUtility:d!=null||p!=null,lineHoverHighlight:i,onGutterUtilityClick:a,onHunkExpand:L,onMergeConflictActionClick:A,onLineClick:o,onLineEnter:s,onLineLeave:c,onLineNumberClick:f,__debugPointerEvents:g,enableLineSelection:y,onLineSelected:v,onLineSelectionStart:b,onLineSelectionChange:S,onLineSelectionEnd:k,getLineIndex:C}}function nN({enableGutterUtility:e,enableHoverUtility:t,renderGutterUtility:i,renderHoverUtility:a,onGutterUtilityClick:o}){if(e!==void 0&&t!==void 0)throw new Error("Cannot use both 'enableGutterUtility' and deprecated 'enableHoverUtility'. Use only 'enableGutterUtility'.");if(i!=null&&a!=null)throw new Error("Cannot use both 'renderGutterUtility' and deprecated 'renderHoverUtility'. Use only 'renderGutterUtility'.");if(o!=null&&(i!=null||a!=null))throw new Error("Cannot use both 'onGutterUtilityClick' and render utility callbacks ('renderGutterUtility'/'renderHoverUtility'). Use only one gutter utility API.");return e??t??!1}function El(e){return e!=null&&"kind"in e&&e.kind==="line"}function iN(e){return"type"in e&&e.type==="line-info"}function rN(e){return"kind"in e&&e.kind==="merge-conflict-action"}function aN(e){return e==="current"||e==="incoming"||e==="both"}function fb(e,t){const i=e?.querySelector(t);return i instanceof HTMLElement?i:void 0}function db(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 hb(e){for(const t of e)if(t instanceof HTMLElement&&t.hasAttribute("data-utility-button"))return!0;return!1}function si(e="none",t,...i){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...i)}var lN=class{observedNodes=new Map;queuedUpdates=new Map;cleanUp(){this.resizeObserver?.disconnect(),this.observedNodes.clear(),this.queuedUpdates.clear()}resizeObserver;setup(e,t){this.resizeObserver??=new ResizeObserver(this.handleResizeObserver);const i=e.querySelectorAll("code"),a=new Map(this.observedNodes);this.observedNodes.clear();for(const o of i){let s=a.get(o);if(s!=null&&s.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let c=o.firstElementChild;c instanceof HTMLElement||(c=null),s!=null?(this.observedNodes.set(o,s),a.delete(o),s.numberElement!==c?(s.numberElement!=null&&this.resizeObserver.unobserve(s.numberElement),c!=null&&(this.resizeObserver.observe(c),a.delete(c),this.observedNodes.set(c,s)),s.numberElement=c):s.numberElement!=null&&(a.delete(s.numberElement),this.observedNodes.set(s.numberElement,s))):(s={type:"code",codeElement:o,numberElement:c,codeWidth:"auto",numberWidth:0},this.observedNodes.set(o,s),this.resizeObserver.observe(o),c!=null&&(this.observedNodes.set(c,s),this.resizeObserver.observe(c)))}if(i.length>1&&!t){const o=e.querySelectorAll('[data-line-annotation*=","]'),s=new Map;for(const c of o){if(!(c instanceof HTMLElement))continue;const{lineAnnotation:f=""}=c.dataset;if(!/^\d+,\d+$/.test(f)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:f,element:c});continue}let d=s.get(f);d==null&&(d=[],s.set(f,d)),d.push(c)}for(const[c,f]of s){if(f.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",c,f);continue}const[d,p]=f,g=d.firstElementChild,y=p.firstElementChild;if(!(d instanceof HTMLElement)||!(p instanceof HTMLElement)||!(g instanceof HTMLElement)||!(y instanceof HTMLElement))continue;let v=a.get(g);if(v!=null){this.observedNodes.set(g,v),this.observedNodes.set(y,v),a.delete(g),a.delete(y);continue}v={type:"annotations",column1:{container:d,child:g,childHeight:g.getBoundingClientRect().height},column2:{container:p,child:y,childHeight:y.getBoundingClientRect().height},currentHeight:"auto"};const b=Math.max(v.column1.childHeight,v.column2.childHeight);this.applyNewHeight(v,b),this.observedNodes.set(g,v),this.observedNodes.set(y,v),this.resizeObserver.observe(g),this.resizeObserver.observe(y)}}for(const o of a.keys())o.isConnected&&(o.style.removeProperty("--diffs-column-content-width"),o.style.removeProperty("--diffs-column-number-width"),o.style.removeProperty("--diffs-column-width"),o.parentElement instanceof HTMLElement&&o.parentElement.style.removeProperty("--diffs-annotation-min-height")),this.resizeObserver.unobserve(o);a.clear()}handleResizeObserver=e=>{for(const t of e){const{target:i,borderBoxSize:a}=t;if(!(i instanceof HTMLElement)){console.error("FileDiff.handleResizeObserver: Invalid element for ResizeObserver",t);continue}const o=this.observedNodes.get(i);if(o==null){console.error("FileDiff.handleResizeObserver: Not a valid observed node",t);continue}const s=a[0];if(o.type==="annotations"){const c=(()=>{if(i===o.column1.child)return o.column1;if(i===o.column2.child)return o.column2})();if(c==null){console.error("FileDiff.handleResizeObserver: Couldn't find a column for",{item:o,target:i});continue}c.childHeight=s.blockSize;const f=Math.max(o.column1.childHeight,o.column2.childHeight);this.applyNewHeight(o,f)}else if(o.type==="code"){const c=[i,s.inlineSize],f=this.queuedUpdates.get(o)??[];f.push(c),this.queuedUpdates.set(o,f)}}this.handleColumnChange()};handleColumnChange=()=>{for(const[e,t]of this.queuedUpdates)for(const[i,a]of t)if(i===e.codeElement){const o=Math.max(Math.floor(a),0);if(o!==e.codeWidth){const s=Math.max(o-e.numberWidth,0);e.codeWidth=o===0?"auto":o,e.codeElement.style.setProperty("--diffs-column-content-width",`${s>0?`${s}px`:"auto"}`),e.codeElement.style.setProperty("--diffs-column-width",`${typeof e.codeWidth=="number"?`${e.codeWidth}px`:"auto"}`)}e.numberElement!=null&&typeof e.codeWidth=="number"&&e.numberWidth===0&&t.push([e.numberElement,e.numberElement.getBoundingClientRect().width])}else if(i===e.numberElement){const o=Math.max(Math.ceil(a),0);if(o!==e.numberWidth&&(e.numberWidth=o,e.codeElement.style.setProperty("--diffs-column-number-width",`${e.numberWidth===0?"auto":`${e.numberWidth}px`}`),e.codeWidth!=="auto")){const s=Math.max(e.codeWidth-e.numberWidth,0);e.codeElement.style.setProperty("--diffs-column-content-width",`${s===0?"auto":`${s}px`}`)}}this.queuedUpdates.clear()};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty("--diffs-annotation-min-height",`${e.currentHeight}px`),e.column2.container.style.setProperty("--diffs-annotation-min-height",`${e.currentHeight}px`))}};function A1(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 pb(e){for(const t of Array.isArray(e)?e:[e])if(!zd.has(t))return!1;return!0}function td(e){for(const t of x1(e))if(!Id.has(t))return!1;return!0}function oN(e){return Le({tagName:"div",children:[Le({tagName:"div",children:e.annotations?.map(t=>Le({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function sN(e,t){return Le({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function uN(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 cN({fileOrDiff:e,mode:t}){const i="type"in e?e:void 0,a={"data-diffs-header":t,"data-change-type":i?.type};return Le({tagName:"div",children:[t==="custom"?Le({tagName:"slot",properties:{name:hh}}):fN({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...t==="custom"?[]:[dN(i)]],properties:a})}function fN({name:e,prevName:t,iconType:i}){const a=[Le({tagName:"slot",properties:{name:fh}}),Ps({name:uN(i),properties:{"data-change-icon":i}})];return t!=null&&(a.push(Le({tagName:"div",children:[Le({tagName:"bdi",children:[ci(t)]})],properties:{"data-prev-name":""}})),a.push(Ps({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),a.push(Le({tagName:"div",children:[Le({tagName:"bdi",children:[ci(e)]})],properties:{"data-title":""}})),Le({tagName:"div",children:a,properties:{"data-header-content":""}})}function dN(e){const t=[];if(e!=null){let i=0,a=0;for(const o of e.hunks)i+=o.additionLines,a+=o.deletionLines;(a>0||i===0)&&t.push(Le({tagName:"span",children:[ci(`-${a}`)],properties:{"data-deletions-count":""}})),(i>0||a===0)&&t.push(Le({tagName:"span",children:[ci(`+${i}`)],properties:{"data-additions-count":""}}))}return t.push(Le({tagName:"slot",properties:{name:dh}})),Le({tagName:"div",children:t,properties:{"data-metadata":""}})}function hN(e){return Le({tagName:"pre",properties:pN(e)})}function pN({diffIndicators:e,disableBackground:t,disableLineNumbers:i,overflow:a,split:o,totalLines:s,type:c,customProperties:f}){return{...f,"data-diff":c==="diff"?"":void 0,"data-file":c==="file"?"":void 0,"data-diff-type":c==="diff"?o?"split":"single":void 0,"data-overflow":a,"data-disable-line-numbers":i?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,tabIndex:0,style:`--diffs-min-number-column-width-default:${`${s}`.length}ch;`}}function mN(e,{theme:t,preferredHighlighter:i="shiki-js"}){return{langs:[e??"text"],themes:x1(t),preferredHighlighter:i}}const gN=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
188
188
  <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
189
189
  <path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
190
190
  </symbol>
@@ -236,7 +236,7 @@ XID_Start XIDS`.split(/\s/).map(e=>[Ks(e),e])),sR=new Map([["s",gt(383)],[gt(383
236
236
  <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
237
237
  <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
238
238
  </symbol>
239
- </svg>`;function pO(e,t){return e==null||t==null?e===t:mO(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}const mb={};function mO(e=mb,t=mb){if(e===t)return!0;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(const o of i)if(e[o]!==t[o])return!1;return!0}function gO(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function yO(){const e=document.createElement("div");return e.slot="gutter-utility-slot",e.style.position="absolute",e.style.top="0",e.style.bottom="0",e.style.textAlign="center",e.style.whiteSpace="normal",e}function bO(){const e=document.createElement("style");return e.setAttribute(v1,""),e}var vO=`@layer base, theme, rendered, unsafe;
239
+ </svg>`;function yN(e,t){return e==null||t==null?e===t:bN(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}const mb={};function bN(e=mb,t=mb){if(e===t)return!0;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(const o of i)if(e[o]!==t[o])return!1;return!0}function vN(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function _N(){const e=document.createElement("div");return e.slot="gutter-utility-slot",e.style.position="absolute",e.style.top="0",e.style.bottom="0",e.style.textAlign="center",e.style.whiteSpace="normal",e}function SN(){const e=document.createElement("style");return e.setAttribute(_1,""),e}var EN=`@layer base, theme, rendered, unsafe;
240
240
 
241
241
  @layer base {
242
242
  :host {
@@ -1872,16 +1872,16 @@ XID_Start XIDS`.split(/\s/).map(e=>[Ks(e),e])),sR=new Map([["s",gt(383)],[gt(383
1872
1872
  z-index: 4;
1873
1873
  }
1874
1874
  }
1875
- `;const A1="@layer base, theme, rendered, unsafe;";function _O(e){return`${A1}
1875
+ `;const k1="@layer base, theme, rendered, unsafe;";function xN(e){return`${k1}
1876
1876
  @layer unsafe {
1877
1877
  ${e}
1878
- }`}function SO(e,t="system"){return`${A1}
1878
+ }`}function CN(e,t="system"){return`${k1}
1879
1879
  @layer rendered {
1880
1880
  :host {${t==="system"?"":`
1881
1881
  color-scheme: ${t};`}
1882
1882
  ${e}
1883
1883
  }
1884
- }`}function td({code:e,pre:t,columnType:i,rowSpan:a,containerSize:o=!1}={}){return e==null&&(e=document.createElement("code"),e.setAttribute("data-code",""),i!=null&&e.setAttribute(`data-${i}`,""),t?.appendChild(e)),a!=null?e.style.setProperty("grid-row",`span ${a}`):e.style.removeProperty("grid-row"),o?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}function EO({shadowRoot:e,currentNode:t,themeCSS:i}){if(i.trim()===""){t?.remove();return}return t??=xO(),t.textContent=i,t.parentNode!==e&&e.appendChild(t),t}function xO(){const e=document.createElement("style");return e.setAttribute(b1,""),e}function CO(e,t){if(t==null)return;const i=e.shadowRoot??e.attachShadow({mode:"open"});i.innerHTML===""&&(i.innerHTML=t)}function wO(e,{type:t,diffIndicators:i,disableBackground:a,disableLineNumbers:o,overflow:s,split:c,totalLines:f,customProperties:d}){if(d!=null)for(const p in d){const g=d[p];g!=null&&e.setAttribute(p,`${g}`)}switch(t==="diff"?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),i){case"bars":case"classic":e.setAttribute("data-indicators",i);break;case"none":e.removeAttribute("data-indicators");break}return o?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),a?e.removeAttribute("data-background"):e.setAttribute("data-background",""),t==="diff"?e.setAttribute("data-diff-type",c?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",s),e.tabIndex=0,e.style.setProperty("--diffs-min-number-column-width-default",`${`${f}`.length}ch`),e}if(typeof HTMLElement<"u"&&customElements.get(Hs)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const a=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(vO)),a.adoptedStyleSheets=[e]}}customElements.define(Hs,t)}const AO=!0;function kO(e,t,i){if(e===t||e==null||t==null)return e===t;const a=new Set(i),o=Object.keys(e),s=new Set(Object.keys(t));for(const c of o)if(s.delete(c),!a.has(c)&&(!(c in t)||e[c]!==t[c]))return!1;for(const c of Array.from(s))if(!a.has(c))return!1;return!0}function TO(e,t){return x1(e?.theme??Mn,t?.theme??Mn)&&kO(e,t,["theme"])}function LO({hunkIndex:e,lineIndex:t,conflictIndex:i}){return`merge-conflict-action-${e}-${t}-${i}`}function RO(e,t){const i=t.hunks[e.hunkIndex];if(i!=null)return{hunkIndex:e.hunkIndex,lineIndex:DO(i,e.startContentIndex)}}function DO(e,t){let i=e.unifiedLineStart;for(let a=0;a<t;a++){const o=e.hunkContent[a];i+=o.type==="context"?o.lines:o.deletions+o.additions}return i}function OO({fileDiff:e,actions:t,renderCustomHeader:i,renderHeaderPrefix:a,renderHeaderMetadata:o,renderAnnotation:s,renderGutterUtility:c,renderHoverUtility:f,renderMergeConflictUtility:d,lineAnnotations:p,getHoveredLine:g,getInstance:y}){const b=c??f,v=i?.(e),S=a?.(e),T=o?.(e);return q.jsxs(q.Fragment,{children:[v!=null?q.jsx("div",{slot:dh,children:v}):q.jsxs(q.Fragment,{children:[S!=null&&q.jsx("div",{slot:ch,children:S}),T!=null&&q.jsx("div",{slot:fh,children:T})]}),s!=null&&p?.map((L,A)=>q.jsx("div",{slot:Nl(L),children:s(L)},A)),t!=null&&d!=null&&y!=null&&t.map(L=>{if(L==null)return;const A=NO(L,e);return q.jsx("div",{slot:A,style:QR,children:d(L,y)},A)}),b!=null&&q.jsx("div",{slot:"gutter-utility-slot",style:XR,children:b(g)})]})}function NO(e,t){const i=RO(e,t);return i!=null?LO({hunkIndex:i.hunkIndex,lineIndex:i.lineIndex,conflictIndex:e.conflictIndex}):void 0}var MO=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,this.enabled=!1)}setup(e,t,i){if(t==null||i==null)for(const a of e.children??[])a instanceof HTMLElement&&("deletions"in a.dataset?t=a:"additions"in a.dataset&&(i=a));if(i==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener("scroll",this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==i&&(this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),this.codeAdditions=i,i.addEventListener("scroll",this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function ys(e){return Re({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function bs(e){return Re({tagName:"div",children:[Re({tagName:"span",children:[li("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function nd(e){return Re({tagName:"div",children:[Ps({name:e==="both"?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{"data-expand-button":"","data-expand-both":e==="both"?"":void 0,"data-expand-up":e==="up"?"":void 0,"data-expand-down":e==="down"?"":void 0}})}function na({type:e,content:t,expandIndex:i,chunked:a=!1,slotName:o,isFirstHunk:s,isLastHunk:c}){const f=[];if(e==="metadata"&&t!=null&&f.push(Re({tagName:"div",children:[li(t)],properties:{"data-separator-wrapper":""}})),(e==="line-info"||e==="line-info-basic")&&t!=null){const d=[];i!=null&&(a?(s||d.push(nd("up")),c||d.push(nd("down"))):d.push(nd(!s&&!c?"both":s?"down":"up"))),d.push(Re({tagName:"div",children:[Re({tagName:"span",children:[li(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),f.push(Re({tagName:"div",children:d,properties:{"data-separator-wrapper":"","data-separator-multi-button":d.length>2?"":void 0}}))}return e==="custom"&&o!=null&&f.push(Re({tagName:"slot",properties:{name:o}})),Re({tagName:"div",children:f,properties:{"data-separator":f.length===0?"simple":e,"data-expand-index":i,"data-separator-first":s?"":void 0,"data-separator-last":c?"":void 0}})}function IO(e,t){return`hunk-separator-${e}-${t}`}function zO(e){const t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function UO(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}let HO=-1;var PO=class{__id=`diff-hunks-renderer:${++HO}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(e={theme:Mn},t,i){this.options=e,this.onRenderUpdate=t,this.workerManager=i,i?.isWorkingPool()!==!0&&(this.highlighter=ed(e.theme??Mn)?gD():void 0)}cleanUp(){this.highlighter=void 0,this.diff=void 0,this.renderCache=void 0,this.workerManager?.cleanUpPendingTasks(this),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.renderCache=void 0,this.workerManager?.cleanUpPendingTasks(this)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,i=this.getOptionsWithDefaults().expansionLineCount){const a={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t==="up"||t==="both")&&(a.fromStart+=i),(t==="down"||t==="both")&&(a.fromEnd+=i),this.renderCache?.highlighted!==!0&&(this.renderCache=void 0),this.expandedHunks.set(e,a)}getExpandedHunk(e){return this.expandedHunks.get(e)??rD}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(const t of e){const i=(()=>{switch(t.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),a=i[t.lineNumber]??[];i[t.lineNumber]=a,a.push(t)}}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e}}getSplitLineDecoration({side:e,type:t}){return t!=="change"?{gutterLineType:t}:{gutterLineType:e==="deletions"?"change-deletion":"change-addition"}}createAnnotationElement(e){return rO(e)}getOptionsWithDefaults(){const{diffIndicators:e="bars",diffStyle:t="split",disableBackground:i=!1,disableFileHeader:a=!1,disableLineNumbers:o=!1,disableVirtualizationBuffers:s=!1,collapsed:c=!1,expandUnchanged:f=!1,collapsedContextThreshold:d=ca,expansionLineCount:p=100,hunkSeparators:g="line-info",lineDiffType:y="word-alt",maxLineDiffLength:b=1e3,overflow:v="scroll",theme:S=Mn,headerRenderMode:T="default",tokenizeMaxLineLength:L=1e3,useCSSClasses:A=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:i,disableFileHeader:a,disableLineNumbers:o,disableVirtualizationBuffers:s,collapsed:c,expandUnchanged:f,collapsedContextThreshold:d,expansionLineCount:p,hunkSeparators:g,lineDiffType:y,maxLineDiffLength:b,overflow:v,theme:this.workerManager?.getDiffRenderOptions().theme??S,headerRenderMode:T,tokenizeMaxLineLength:L,useCSSClasses:A}}async initializeHighlighter(){return this.highlighter=await mD(dO(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:t}=this.getRenderOptions(e);let i=this.workerManager?.getDiffResultCache(e);i!=null&&!id(t,i.options)&&(i=void 0),this.renderCache??={diff:e,highlighted:!AD(e),options:t,result:i?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0&&this.renderCache.result==null&&this.workerManager.highlightDiffAST(this,this.diff)}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();const{theme:a,tokenizeMaxLineLength:o,lineDiffType:s}=this.getOptionsWithDefaults();return{theme:a,tokenizeMaxLineLength:o,lineDiffType:s}})();this.getOptionsWithDefaults();const{renderCache:i}=this;return i?.result==null?{options:t,forceRender:!0}:e!==i.diff||!id(t,i.options)?{options:t,forceRender:!0}:{options:t,forceRender:!1}}renderDiff(e=this.renderCache?.diff,t=J0){if(e==null)return;const{expandUnchanged:i=!1,collapsedContextThreshold:a}=this.getOptionsWithDefaults(),o=this.workerManager?.getDiffResultCache(e);o!=null&&this.renderCache==null&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...o});const{options:s,forceRender:c}=this.getRenderOptions(e);if(this.renderCache??={diff:e,highlighted:!1,options:s,result:void 0,renderRange:void 0},this.workerManager?.isWorkingPool()===!0)(this.renderCache.result==null||!this.renderCache.highlighted&&(e!==this.renderCache.diff||!w1(this.renderCache.renderRange,t)))&&(this.renderCache.diff=e,this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,UO(t)||i?!0:this.expandedHunks,a),this.renderCache.renderRange=t),t.totalLines>0&&(!this.renderCache.highlighted||c)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??da(e.name);const f=this.highlighter!=null&&ed(s.theme),d=this.highlighter!=null&&pb(this.computedLang);if(this.highlighter!=null&&f&&(c||!this.renderCache.highlighted&&d||this.renderCache.result==null)){const{result:p,options:g}=this.renderDiffWithHighlighter(e,this.highlighter,!d);this.renderCache={diff:e,options:g,highlighted:d,result:p,renderRange:void 0}}(!f||!d)&&this.asyncHighlight(e).then(({result:p,options:g})=>{this.onHighlightSuccess(e,p,g)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,t,this.renderCache.result):void 0}async asyncRender(e,t=J0){const{result:i}=await this.asyncHighlight(e);return this.processDiffResult(e,t,i)}createPreElement(e,t,i){const{diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c}=this.getOptionsWithDefaults();return cO({type:"diff",diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:e,totalLines:t,customProperties:i})}async asyncHighlight(e){this.computedLang=e.lang??da(e.name);const t=this.highlighter!=null&&ed(this.options.theme??Mn),i=this.highlighter!=null&&pb(this.computedLang);return(this.highlighter==null||!t||!i)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter)}renderDiffWithHighlighter(e,t,i=!1){const{options:a}=this.getRenderOptions(e),{collapsedContextThreshold:o}=this.getOptionsWithDefaults();return{result:$D(e,t,a,{forcePlainText:i,expandedHunks:i?!0:void 0,collapsedContextThreshold:o}),options:a}}onHighlightSuccess(e,t,i){if(this.renderCache==null)return;const a=!this.renderCache.highlighted||!id(this.renderCache.options,i)||this.renderCache.diff!==e;this.renderCache={diff:e,options:i,highlighted:!0,result:t,renderRange:void 0},a&&this.onRenderUpdate?.()}onHighlightError(e){console.error(e)}processDiffResult(e,t,{code:i,themeStyles:a,baseThemeType:o}){const{diffStyle:s,disableFileHeader:c,expandUnchanged:f,expansionLineCount:d,collapsedContextThreshold:p,hunkSeparators:g}=this.getOptionsWithDefaults();this.diff=e;const y=s==="unified";let b=[],v=[],S=[];const T=[],{additionLines:L,deletionLines:A}=i,k={rowCount:0,hunkSeparators:g,additionsContentAST:b,deletionsContentAST:v,unifiedContentAST:S,unifiedGutterAST:ms(),deletionsGutterAST:ms(),additionsGutterAST:ms(),expansionLineCount:d,hunkData:T,incrementRowCount(fe=1){k.rowCount+=fe},pushToGutter(fe,ee){switch(fe){case"unified":k.unifiedGutterAST.children.push(ee);break;case"deletions":k.deletionsGutterAST.children.push(ee);break;case"additions":k.additionsGutterAST.children.push(ee);break}}},C=BO(e),z={size:0,side:void 0,increment(){this.size+=1},flush(){if(s!=="unified"){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side==="additions"?(k.pushToGutter("additions",_n(void 0,"buffer",this.size)),b?.push(ys(this.size))):(k.pushToGutter("deletions",_n(void 0,"buffer",this.size)),v?.push(ys(this.size))),this.size=0,this.side=void 0}}},U=(fe,ee,te,H,X)=>{k.pushToGutter(fe,vD(ee,te,H,X))};function O(fe){z.flush(),s==="unified"?rd("unified",fe,k):(rd("deletions",fe,k),rd("additions",fe,k))}Bs({diff:e,diffStyle:s,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:f?!0:this.expandedHunks,collapsedContextThreshold:p,callback:({hunkIndex:fe,hunk:ee,collapsedBefore:te,collapsedAfter:H,additionLine:X,deletionLine:oe,type:me})=>{const R=oe!=null?oe.splitLineIndex:X.splitLineIndex,N=X!=null?X.unifiedLineIndex:oe.unifiedLineIndex;s==="split"&&me!=="change"&&z.flush(),te>0&&O({hunkIndex:fe,collapsedLines:te,rangeSize:Math.max(ee?.collapsedBefore??0,0),hunkSpecs:ee?.hunkSpecs,isFirstHunk:fe===0,isLastHunk:!1,isExpandable:!e.isPartial});const F=s==="unified"?N:R,w={type:me,hunkIndex:fe,lineIndex:F,unifiedLineIndex:N,splitLineIndex:R,deletionLine:oe,additionLine:X};if(s==="unified"){const ce=this.getUnifiedInjectedRowsForLine?.(w);ce?.before!=null&&yb(ce.before,k);let ye=oe!=null?A[oe.lineIndex]:void 0,ke=X!=null?L[X.lineIndex]:void 0;if(ye==null&&ke==null){const re="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(re,{file:e.name}),new Error(re)}const Te=me==="change"?X!=null?"change-addition":"change-deletion":me,Qe=this.getUnifiedLineDecoration({type:me,lineType:Te,additionLineIndex:X?.lineIndex,deletionLineIndex:oe?.lineIndex});U("unified",Qe.gutterLineType,X!=null?X.lineNumber:oe.lineNumber,`${N},${R}`,Qe.gutterProperties),ke!=null?ke=vs(ke,Qe.contentProperties):ye!=null&&(ye=vs(ye,Qe.contentProperties)),vb({diffStyle:"unified",type:me,deletionLine:ye,additionLine:ke,unifiedSpan:this.getAnnotations("unified",oe?.lineNumber,X?.lineNumber,fe,F),createAnnotationElement:re=>this.createAnnotationElement(re),context:k}),ce?.after!=null&&yb(ce.after,k)}else{const ce=this.getSplitInjectedRowsForLine?.(w);ce?.before!=null&&bb(ce.before,k,z);let ye=oe!=null?A[oe.lineIndex]:void 0,ke=X!=null?L[X.lineIndex]:void 0;const Te=this.getSplitLineDecoration({side:"deletions",type:me,lineIndex:oe?.lineIndex}),Qe=this.getSplitLineDecoration({side:"additions",type:me,lineIndex:X?.lineIndex});if(ye==null&&ke==null){const Le="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(Le,{file:e.name}),new Error(Le)}const re=(()=>{if(me==="change"){if(ke==null)return"additions";if(ye==null)return"deletions"}})();if(re!=null){if(z.side!=null&&z.side!==re)throw new Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");z.side=re,z.increment()}const xe=this.getAnnotations("split",oe?.lineNumber,X?.lineNumber,fe,F);if(xe!=null&&z.size>0&&z.flush(),oe!=null){const Le=vs(ye,Te.contentProperties);U("deletions",Te.gutterLineType,oe.lineNumber,`${oe.unifiedLineIndex},${R}`,Te.gutterProperties),Le!=null&&(ye=Le)}if(X!=null){const Le=vs(ke,Qe.contentProperties);U("additions",Qe.gutterLineType,X.lineNumber,`${X.unifiedLineIndex},${R}`,Qe.gutterProperties),Le!=null&&(ke=Le)}vb({diffStyle:"split",type:me,additionLine:ke,deletionLine:ye,...xe,createAnnotationElement:Le=>this.createAnnotationElement(Le),context:k}),ce?.after!=null&&bb(ce.after,k,z)}const le=oe?.noEOFCR??!1,he=X?.noEOFCR??!1;if(he||le){if(le){const ce=me==="context"||me==="context-expanded"?me:"change-deletion";s==="unified"?(k.unifiedContentAST.push(bs(ce)),k.pushToGutter("unified",_n(ce,"metadata",1))):(k.deletionsContentAST.push(bs(ce)),k.pushToGutter("deletions",_n(ce,"metadata",1)),he||(k.pushToGutter("additions",_n(void 0,"buffer",1)),k.additionsContentAST.push(ys(1))))}if(he){const ce=me==="context"||me==="context-expanded"?me:"change-addition";s==="unified"?(k.unifiedContentAST.push(bs(ce)),k.pushToGutter("unified",_n(ce,"metadata",1))):(k.additionsContentAST.push(bs(ce)),k.pushToGutter("additions",_n(ce,"metadata",1)),le||(k.pushToGutter("deletions",_n(void 0,"buffer",1)),k.deletionsContentAST.push(ys(1))))}k.incrementRowCount(1)}H>0&&g!=="simple"&&O({hunkIndex:me==="context-expanded"?fe:fe+1,collapsedLines:H,rangeSize:C,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),k.incrementRowCount(1)}}),s==="split"&&z.flush();const j=Math.max(zO(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),$=t.bufferBefore>0||t.bufferAfter>0,ie=!y&&e.type!=="deleted",ne=!y&&e.type!=="new",W=k.rowCount>0||$;b=ie&&W?b:void 0,v=ne&&W?v:void 0,S=y&&W?S:void 0;const J=this.createPreElement(v!=null&&b!=null,j);return{unifiedGutterAST:y&&W?k.unifiedGutterAST.children:void 0,unifiedContentAST:S,deletionsGutterAST:ne&&W?k.deletionsGutterAST.children:void 0,deletionsContentAST:v,additionsGutterAST:ie&&W?k.additionsGutterAST.children:void 0,additionsContentAST:b,hunkData:T,preNode:J,themeStyles:a,baseThemeType:o,headerElement:c?void 0:this.renderHeader(this.diff),totalLines:j,rowCount:k.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderCodeAST(e,t){const i=e==="unified"?t.unifiedGutterAST:e==="deletions"?t.deletionsGutterAST:t.additionsGutterAST,a=e==="unified"?t.unifiedContentAST:e==="deletions"?t.deletionsContentAST:t.additionsContentAST;if(i==null||a==null)return;const o=ms(i);return o.properties.style=`grid-row: span ${t.rowCount}`,[o,aO(a,t.rowCount)]}renderFullAST(e,t=[]){const i=this.getOptionsWithDefaults().hunkSeparators==="line-info",a=this.renderCodeAST("unified",e);if(a!=null)return t.push(Re({tagName:"code",children:a,properties:{"data-code":"","data-container-size":i?"":void 0,"data-unified":""}})),{...e.preNode,children:t};const o=this.renderCodeAST("deletions",e);o!=null&&t.push(Re({tagName:"code",children:o,properties:{"data-code":"","data-container-size":i?"":void 0,"data-deletions":""}}));const s=this.renderCodeAST("additions",e);return s!=null&&t.push(Re({tagName:"code",children:s,properties:{"data-code":"","data-container-size":i?"":void 0,"data-additions":""}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return ua(this.renderFullAST(e,t))}renderPartialHTML(e,t){return t==null?ua(e):ua(Re({tagName:"code",children:e,properties:{"data-code":"","data-container-size":this.getOptionsWithDefaults().hunkSeparators==="line-info"?"":void 0,[`data-${t}`]:""}}))}getAnnotations(e,t,i,a,o){const s={type:"annotation",hunkIndex:a,lineIndex:o,annotations:[]};if(t!=null)for(const f of this.deletionAnnotations[t]??[])s.annotations.push(Nl(f));const c={type:"annotation",hunkIndex:a,lineIndex:o,annotations:[]};if(i!=null)for(const f of this.additionAnnotations[i]??[])(e==="unified"?s:c).annotations.push(Nl(f));if(e==="unified")return s.annotations.length>0?s:void 0;if(!(c.annotations.length===0&&s.annotations.length===0))return{deletionSpan:s,additionSpan:c}}renderHeader(e){const{headerRenderMode:t}=this.getOptionsWithDefaults();return oO({fileOrDiff:e,mode:t})}};function id(e,t){return x1(e.theme,t.theme)&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType}function gb(e){return`${e} unmodified line${e>1?"s":""}`}function yb(e,t){for(const i of e)t.unifiedContentAST.push(i.content),t.pushToGutter("unified",i.gutter),t.incrementRowCount(1)}function bb(e,t,i){for(const{deletion:a,addition:o}of e){if(a==null&&o==null)continue;const s=a!=null&&o!=null?void 0:a==null?"deletions":"additions";(s==null||i.side!==s)&&i.flush(),a!=null&&(t.deletionsContentAST.push(a.content),t.pushToGutter("deletions",a.gutter)),o!=null&&(t.additionsContentAST.push(o.content),t.pushToGutter("additions",o.gutter)),s!=null&&(i.side=s,i.increment()),t.incrementRowCount(1)}}function vb({diffStyle:e,type:t,deletionLine:i,additionLine:a,unifiedSpan:o,deletionSpan:s,additionSpan:c,createAnnotationElement:f,context:d}){let p=!1;if(e==="unified"){if(a!=null?d.unifiedContentAST.push(a):i!=null&&d.unifiedContentAST.push(i),o!=null){const g=t==="change"?i!=null?"change-deletion":"change-addition":t;d.unifiedContentAST.push(f(o)),d.pushToGutter("unified",_n(g,"annotation",1)),p=!0}}else if(e==="split"){if(i!=null&&d.deletionsContentAST.push(i),a!=null&&d.additionsContentAST.push(a),s!=null){const g=t==="change"?i!=null?"change-deletion":"context":t;d.deletionsContentAST.push(f(s)),d.pushToGutter("deletions",_n(g,"annotation",1)),p=!0}if(c!=null){const g=t==="change"?a!=null?"change-addition":"context":t;d.additionsContentAST.push(f(c)),d.pushToGutter("additions",_n(g,"annotation",1)),p=!0}}p&&d.incrementRowCount(1)}function rd(e,{hunkIndex:t,collapsedLines:i,rangeSize:a,hunkSpecs:o,isFirstHunk:s,isLastHunk:c,isExpandable:f},d){if(i<=0)return;const p=e==="unified"?d.unifiedContentAST:e==="deletions"?d.deletionsContentAST:d.additionsContentAST;if(d.hunkSeparators==="metadata"){o!=null&&(d.pushToGutter(e,na({type:"metadata",content:o,isFirstHunk:s,isLastHunk:c})),p.push(na({type:"metadata",content:o,isFirstHunk:s,isLastHunk:c})),e!=="additions"&&d.incrementRowCount(1));return}if(d.hunkSeparators==="simple"){t>0&&(d.pushToGutter(e,na({type:"simple",isFirstHunk:s,isLastHunk:!1})),p.push(na({type:"simple",isFirstHunk:s,isLastHunk:!1})),e!=="additions"&&d.incrementRowCount(1));return}const g=IO(e,t),y=a>d.expansionLineCount,b=f?t:void 0;d.pushToGutter(e,na({type:d.hunkSeparators,content:gb(i),expandIndex:b,chunked:y,slotName:g,isFirstHunk:s,isLastHunk:c})),p.push(na({type:d.hunkSeparators,content:gb(i),expandIndex:b,chunked:y,slotName:g,isFirstHunk:s,isLastHunk:c})),e!=="additions"&&d.incrementRowCount(1),d.hunkData.push({slotName:g,hunkIndex:t,lines:i,type:e,expandable:f?{up:!s,down:!c,chunked:y}:void 0})}function vs(e,t){return e==null||e.type!=="element"||t==null?e:{...e,properties:{...e.properties,...t}}}function BO(e){const t=e.hunks.at(-1);if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;const i=e.additionLines.length-(t.additionLineIndex+t.additionCount),a=e.deletionLines.length-(t.deletionLineIndex+t.deletionCount);if(i!==a)throw new Error(`DiffHunksRenderer.processDiffResult: trailing context mismatch (additions=${i}, deletions=${a}) for ${e.name}`);return Math.min(i,a)}function jO(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function VO(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function GO(e){const t=e[0];if(t!=="+"&&t!=="-"&&t!==" "&&t!=="\\"){console.error(`parseLineType: Invalid firstChar: "${t}", full line: "${e}"`);return}const i=e.substring(1);return{line:i===""?`
1885
- `:i,type:t===" "?"context":t==="\\"?"metadata":t==="+"?"addition":"deletion"}}function $O(e,t,i=!1){const a=Cs.test(e),o=e.split(a?Cs:W0);let s;const c=[];for(const f of o){if(a&&!Cs.test(f)){if(s==null)s=f;else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",f)}continue}else if(!a&&!W0.test(f)){if(s==null)s=f;else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",f)}continue}const d=k1(f,{cacheKey:t!=null?`${t}-${c.length}`:void 0,isGitDiff:a,throwOnError:i});d!=null&&c.push(d)}return{patchMetadata:s,files:c}}function k1(e,{cacheKey:t,isGitDiff:i=Cs.test(e),oldFile:a,newFile:o,throwOnError:s=!1}={}){let c=0;const f=e.split(KR);let d;const p=a==null||o==null;let g=0,y=0;for(const b of f){const v=b.split(Zf),S=v.shift();if(S==null){if(s)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",b);continue}const T=S.match(WR);let L=0,A=0;if(T==null||d==null){if(d!=null){if(s)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",b);continue}d={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:p,additionLines:!p&&a!=null&&o!=null?o.contents.split(Zf):[],deletionLines:!p&&a!=null&&o!=null?a.contents.split(Zf):[],cacheKey:t},d.additionLines.length===1&&o?.contents===""&&(d.additionLines.length=0),d.deletionLines.length===1&&a?.contents===""&&(d.deletionLines.length=0),v.unshift(S);for(const j of v){const $=j.match(i?eD:JR);if(j.startsWith("diff --git")){const[,,ie,,ne]=j.trim().match(tD)??[];d.name=ne.trim(),ie!==ne&&(d.prevName=ie.trim())}else if($!=null){const[,ie,ne]=$;ie==="---"&&ne!=="/dev/null"?(d.prevName=ne.trim(),d.name=ne.trim()):ie==="+++"&&ne!=="/dev/null"&&(d.name=ne.trim())}else if(i){if(j.startsWith("new mode ")&&(d.mode=j.replace("new mode","").trim()),j.startsWith("old mode ")&&(d.prevMode=j.replace("old mode","").trim()),j.startsWith("new file mode")&&(d.type="new",d.mode=j.replace("new file mode","").trim()),j.startsWith("deleted file mode")&&(d.type="deleted",d.mode=j.replace("deleted file mode","").trim()),j.startsWith("similarity index")&&(j.startsWith("similarity index 100%")?d.type="rename-pure":d.type="rename-changed"),j.startsWith("index ")){const[,ie,ne,W]=j.trim().match(nD)??[];ie!=null&&(d.prevObjectId=ie),ne!=null&&(d.newObjectId=ne),W!=null&&(d.mode=W)}j.startsWith("rename from ")&&(d.prevName=j.replace("rename from ","").trim()),j.startsWith("rename to ")&&(d.name=j.replace("rename to ","").trim())}}continue}let k,C;for(;v.length>0&&(v[v.length-1]===`
1886
- `||v[v.length-1]==="\r"||v[v.length-1]===`\r
1887
- `||v[v.length-1]==="");)v.pop();const z=parseInt(T[3]),U=parseInt(T[1]);g=p?g:U-1,y=p?y:z-1;const O={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:parseInt(T[4]??"1"),additionStart:z,additionLines:L,deletionCount:parseInt(T[2]??"1"),deletionStart:U,deletionLines:A,deletionLineIndex:g,additionLineIndex:y,hunkContent:[],hunkContext:T[5],hunkSpecs:S,noEOFCRAdditions:!1,noEOFCRDeletions:!1};if(isNaN(O.additionCount)||isNaN(O.deletionCount)||isNaN(O.additionStart)||isNaN(O.deletionStart)){if(s)throw Error("parsePatchContent: invalid hunk metadata");console.error("parsePatchContent: invalid hunk metadata",O);continue}for(const j of v){const $=GO(j);if($==null){console.error("processFile: invalid rawLine:",j);continue}const{type:ie,line:ne}=$;if(ie==="addition")(k==null||k.type!=="change")&&(k=ad("change",g,y),O.hunkContent.push(k)),y++,p&&d.additionLines.push(ne),k.additions++,L++,C="addition";else if(ie==="deletion")(k==null||k.type!=="change")&&(k=ad("change",g,y),O.hunkContent.push(k)),g++,p&&d.deletionLines.push(ne),k.deletions++,A++,C="deletion";else if(ie==="context")(k==null||k.type!=="context")&&(k=ad("context",g,y),O.hunkContent.push(k)),y++,g++,p&&(d.deletionLines.push(ne),d.additionLines.push(ne)),k.lines++,C="context";else if(ie==="metadata"&&k!=null){if(k.type==="context"?(O.noEOFCRAdditions=!0,O.noEOFCRDeletions=!0):C==="deletion"?O.noEOFCRDeletions=!0:C==="addition"&&(O.noEOFCRAdditions=!0),p&&(C==="addition"||C==="context")){const W=d.additionLines.length-1;W>=0&&(d.additionLines[W]=ha(d.additionLines[W]))}if(p&&(C==="deletion"||C==="context")){const W=d.deletionLines.length-1;W>=0&&(d.deletionLines[W]=ha(d.deletionLines[W]))}}}O.additionLines=L,O.deletionLines=A,O.collapsedBefore=Math.max(O.additionStart-1-c,0),d.hunks.push(O),c=O.additionStart+O.additionCount-1;for(const j of O.hunkContent)j.type==="context"?(O.splitLineCount+=j.lines,O.unifiedLineCount+=j.lines):(O.splitLineCount+=Math.max(j.additions,j.deletions),O.unifiedLineCount+=j.deletions+j.additions);O.splitLineStart=d.splitLineCount+O.collapsedBefore,O.unifiedLineStart=d.unifiedLineCount+O.collapsedBefore,d.splitLineCount+=O.collapsedBefore+O.splitLineCount,d.unifiedLineCount+=O.collapsedBefore+O.unifiedLineCount}if(d!=null){if(d.hunks.length>0&&!p&&d.additionLines.length>0&&d.deletionLines.length>0){const b=d.hunks[d.hunks.length-1],v=b.additionStart+b.additionCount-1,S=d.additionLines.length,T=Math.max(S-v,0);d.splitLineCount+=T,d.unifiedLineCount+=T}return i||(d.prevName!=null&&d.name!==d.prevName?d.hunks.length>0?d.type="rename-changed":d.type="rename-pure":o!=null&&o.contents===""?d.type="deleted":a!=null&&a.contents===""&&(d.type="new")),d.type!=="rename-pure"&&d.type!=="rename-changed"&&(d.prevName=void 0),d}}function qO(e,t,i=!1){const a=[];for(const o of e.split(ZR))try{a.push($O(o,t!=null?`${t}-${a.length}`:void 0,i))}catch(s){if(i)throw s;console.error(s)}return a}function ad(e,t,i){return e==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:i,deletionLineIndex:t}:{type:"context",lines:0,additionLineIndex:i,deletionLineIndex:t}}function zd(e,t,i,a=!1){const o=k1(jD(e.name,t.name,e.contents,t.contents,e.header,t.header),{cacheKey:(()=>{if(e.cacheKey!=null&&t.cacheKey!=null)return`${e.cacheKey}:${t.cacheKey}`})(),oldFile:e,newFile:t,throwOnError:a});if(o==null)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");return o}let FO=-1;var T1=class{static LoadedCustomComponent=AO;__id=`file-diff:${++FO}`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;lastRowCount;enabled=!0;constructor(t={theme:Mn},i,a=!1){this.options=t,this.workerManager=i,this.isContainerManaged=a,this.hunksRenderer=this.createHunksRenderer(t),this.resizeManager=new iO,this.scrollSyncManager=new MO,this.interactionManager=new WD("diff",cb(t,typeof t.hunkSeparators=="function"||(t.hunkSeparators??"line-info")==="line-info"||t.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(t){return{...t,headerRenderMode:t.renderCustomHeader!=null?"custom":"default",hunkSeparators:typeof t.hunkSeparators=="function"?"custom":t.hunkSeparators}}createHunksRenderer(t){return new PO(this.getHunksRendererOptions(t),this.handleHighlightRender,this.workerManager)}getLineIndex=(t,i="additions")=>{if(this.fileDiff==null)return;const a=this.fileDiff.hunks.at(-1);let o,s;e:for(const c of this.fileDiff.hunks){let f=i==="deletions"?c.deletionStart:c.additionStart;const d=i==="deletions"?c.deletionCount:c.additionCount;let p=c.splitLineStart,g=c.unifiedLineStart;if(t<f){const y=f-t;o=Math.max(g-y,0),s=Math.max(p-y,0);break e}if(t>=f+d){if(c===a){const y=t-(f+d);o=g+c.unifiedLineCount+y,s=p+c.splitLineCount+y;break e}continue}for(const y of c.hunkContent)if(y.type==="context")if(t<f+y.lines){const b=t-f;s=p+b,o=g+b;break e}else f+=y.lines,p+=y.lines,g+=y.lines;else{const b=i==="deletions"?y.deletions:y.additions;if(t<f+b){const v=t-f;o=g+(i==="additions"?y.deletions:0)+v,s=p+v;break e}else f+=b,p+=Math.max(y.deletions,y.additions),g+=y.deletions+y.additions}break e}if(!(o==null||s==null))return[o,s]};setOptions(t){t!=null&&(this.options=t,this.hunksRenderer.setOptions(this.getHunksRendererOptions(t)),this.interactionManager.setOptions(cb(t,typeof t.hunkSeparators=="function"||(t.hunkSeparators??"line-info")==="line-info"||t.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)))}mergeOptions(t){this.options={...this.options,...t}}setThemeType(t){(this.options.themeType??"system")!==t&&(this.mergeOptions({themeType:t}),!(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)&&this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType))}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}canPartiallyRender(t,i,a){return!(t||i||a||typeof this.options.hunkSeparators=="function")}setSelectedLines(t){this.interactionManager.setSelection(t)}cleanUp(t=!1){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer?.shadowRoot!=null&&(this.fileContainer.shadowRoot.innerHTML=""),this.fileContainer=void 0,this.pre!=null&&(this.pre.innerHTML="",this.pre=void 0),this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.lastRenderedHeaderHTML=void 0,this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,t?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(t){const{fileContainer:i,prerenderedHTML:a,preventEmit:o=!1,lineAnnotations:s,oldFile:c,newFile:f,fileDiff:d}=t;this.hydrateElements(i,a),this.pre==null&&this.headerElement==null?this.render({...t,preventEmit:!0}):this.hydrationSetup({fileDiff:d,oldFile:c,newFile:f,lineAnnotations:s}),o||this.emitPostRender()}hydrateElements(t,i){CO(t,i);for(const a of t.shadowRoot?.children??[]){if(a instanceof SVGElement){this.spriteSVG=a;continue}if(a instanceof HTMLElement){if(a instanceof HTMLPreElement){this.pre=a;for(const o of a.children)!(o instanceof HTMLElement)||o.tagName.toLowerCase()!=="code"||("deletions"in o.dataset&&(this.codeDeletions=o),"additions"in o.dataset&&(this.codeAdditions=o),"unified"in o.dataset&&(this.codeUnified=o));continue}if("diffsHeader"in a.dataset){this.headerElement=a;continue}if(a instanceof HTMLStyleElement&&a.hasAttribute(b1)){this.themeCSSStyle=a;continue}if(a instanceof HTMLStyleElement&&a.hasAttribute(v1)){this.unsafeCSSStyle=a,this.appliedUnsafeCSS=a.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=t}hydrationSetup({fileDiff:t,oldFile:i,newFile:a,lineAnnotations:o}){const{diffStyle:s="split",overflow:c="scroll"}=this.options;this.lineAnnotations=o??this.lineAnnotations,this.additionFile=a,this.deletionFile=i,this.fileDiff=t??(i!=null&&a!=null?zd(i,a):void 0),this.pre!=null&&(this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,c==="wrap"),c==="scroll"&&s==="split"&&this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}handleExpandHunk=(t,i,a)=>{this.expandHunk(t,i,a)};expandHunk=(t,i,a)=>{this.hunksRenderer.expandHunk(t,i,a),this.rerender()};render({oldFile:t,newFile:i,fileDiff:a,forceRender:o=!1,preventEmit:s=!1,lineAnnotations:c,fileContainer:f,containerWrapper:d,renderRange:p}){if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");const{collapsed:g=!1}=this.options,y=g?void 0:p,b=t!=null&&i!=null&&(!rb(t,this.deletionFile)||!rb(i,this.additionFile));let v=a!=null&&a!==this.fileDiff;const S=c!=null&&(c.length>0||this.lineAnnotations.length>0)?c!==this.lineAnnotations:!1;if(!g&&w1(y,this.renderRange)&&!o&&!S&&(a!=null&&a===this.fileDiff||a==null&&!b))return!1;const{renderRange:T}=this;if(this.renderRange=y,this.deletionFile=t,this.additionFile=i,a!=null?this.fileDiff=a:t!=null&&i!=null&&b&&(v=!0,this.fileDiff=zd(t,i)),c!=null&&this.setLineAnnotations(c),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{diffStyle:L="split",disableErrorHandling:A=!1,disableFileHeader:k=!1,overflow:C="scroll",themeType:z="system"}=this.options;if(k&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),f=this.getOrCreateFileContainer(f,d),g){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const U=this.hunksRenderer.renderDiff(this.fileDiff,aD);U!=null&&this.applyThemeState(f,U.themeStyles,z,U.baseThemeType),U?.headerElement!=null&&this.applyHeaderToDOM(U.headerElement,f),this.renderSeparators([]),this.injectUnsafeCSS()}catch(U){if(A)throw U;console.error(U),U instanceof Error&&this.applyErrorToDOM(U,f)}return s||this.emitPostRender(),!0}try{const U=this.getOrCreatePreNode(f);if(!(this.canPartiallyRender(o,S,b||v)&&this.applyPartialRender({previousRenderRange:T,renderRange:y}))){const O=this.hunksRenderer.renderDiff(this.fileDiff,y);if(O==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(f,O.themeStyles,z,O.baseThemeType),O.headerElement!=null&&this.applyHeaderToDOM(O.headerElement,f),O.additionsContentAST!=null||O.deletionsContentAST!=null||O.unifiedContentAST!=null?this.applyHunksToDOM(U,O):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(O.hunkData)}this.applyBuffers(U,y),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.interactionManager.setup(U),this.resizeManager.setup(U,C==="wrap"),C==="scroll"&&L==="split"?this.scrollSyncManager.setup(U,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp()}catch(U){if(A)throw U;console.error(U),U instanceof Error&&this.applyErrorToDOM(U,f)}return s||this.emitPostRender(),!0}emitPostRender(){this.fileContainer!=null&&this.options.onPostRender?.(this.fileContainer,this)}removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:t}of this.separatorCache.values())t.remove();this.separatorCache.clear();for(const{element:t}of this.annotationCache.values())t.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(t){if(this.fileContainer==null)return!1;if(this.cleanChildNodes(),this.placeHolder==null){const i=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",i.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${t}px`),!0}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.gutterUtilityContent?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.gutterUtilityContent=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0}renderSeparators(t){const{hunkSeparators:i}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof i!="function"){for(const{element:o}of this.separatorCache.values())o.remove();this.separatorCache.clear();return}const a=new Map(this.separatorCache);for(const o of t){const s=o.slotName;let c=this.separatorCache.get(s);if(c==null||!VO(o,c.hunkData)){c?.element.remove();const f=document.createElement("div");f.style.display="contents",f.slot=o.slotName;const d=i(o,this);d!=null&&f.appendChild(d),this.fileContainer.appendChild(f),c={element:f,hunkData:o},this.separatorCache.set(s,c)}a.delete(s)}for(const[o,{element:s}]of a.entries())this.separatorCache.delete(o),s.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:a}of this.annotationCache.values())a.remove();this.annotationCache.clear();return}const t=new Map(this.annotationCache),{renderAnnotation:i}=this.options;if(i!=null&&this.lineAnnotations.length>0)for(const[a,o]of this.lineAnnotations.entries()){const s=`${a}-${Nl(o)}`;let c=this.annotationCache.get(s);if(c==null||!jO(o,c.annotation)){c?.element.remove();const f=i(o);if(f==null)continue;c={element:gO(Nl(o)),annotation:o},c.element.appendChild(f),this.fileContainer.appendChild(c.element),this.annotationCache.set(s,c)}t.delete(s)}for(const[a,{element:o}]of t.entries())this.annotationCache.delete(a),o.remove()}renderGutterUtility(){const t=this.options.renderGutterUtility??this.options.renderHoverUtility;if(this.fileContainer==null||t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const i=t(this.interactionManager.getHoveredLine);if(i!=null&&this.gutterUtilityContent!=null)return;if(i==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const a=yO();a.appendChild(i),this.fileContainer.appendChild(a),this.gutterUtilityContent=a}getOrCreateFileContainer(t,i){const a=this.fileContainer;if(this.fileContainer=t??this.fileContainer??document.createElement(Hs),a!=null&&a!==this.fileContainer&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),i!=null&&this.fileContainer.parentNode!==i&&i.appendChild(this.fileContainer),this.spriteSVG==null){const o=document.createElement("div");o.innerHTML=hO;const s=o.firstChild;s instanceof SVGElement&&(this.spriteSVG=s,this.fileContainer.shadowRoot?.appendChild(this.spriteSVG))}return this.fileContainer}getFileContainer(){return this.fileContainer}getOrCreatePreNode(t){const i=t.shadowRoot??t.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,i.appendChild(this.pre)):this.pre.parentNode!==i&&(i.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(t){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(const i of Array.from(t.children))i instanceof HTMLElement&&(i.hasAttribute("data-unified")?this.codeUnified=i:i.hasAttribute("data-deletions")?this.codeDeletions=i:i.hasAttribute("data-additions")&&(this.codeAdditions=i))}applyHeaderToDOM(t,i){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const{fileDiff:a}=this,o=ua(t);if(o!==this.lastRenderedHeaderHTML){const g=document.createElement("div");g.innerHTML=o;const y=g.firstElementChild;if(!(y instanceof HTMLElement))return;this.headerElement!=null?i.shadowRoot?.replaceChild(y,this.headerElement):i.shadowRoot?.prepend(y),this.headerElement=y,this.lastRenderedHeaderHTML=o}if(this.isContainerManaged||a==null)return;const{renderCustomHeader:s,renderHeaderPrefix:c,renderHeaderMetadata:f}=this.options;if(s!=null){const g=s(a)??void 0;this.headerCustom=this.upsertHeaderSlotElement(i,this.headerCustom,dh,g),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}const d=c?.(a)??void 0,p=f?.(a)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(i,this.headerPrefix,ch,d),this.headerMetadata=this.upsertHeaderSlotElement(i,this.headerMetadata,fh,p),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(t,i,a,o){if(o==null){i?.remove();return}const s=i??this.createHeaderSlotElement(a);return i==null&&t.appendChild(s),this.replaceHeaderSlotContent(s,o),s}replaceHeaderSlotContent(t,i){t.replaceChildren(),i instanceof Element?t.appendChild(i):t.innerText=`${i}`}createHeaderSlotElement(t){const i=document.createElement("div");return i.slot=t,i}injectUnsafeCSS(){const{unsafeCSS:t}=this.options,i=this.fileContainer?.shadowRoot;if(i!=null){if(t==null||t===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===i&&this.appliedUnsafeCSS===t||(this.unsafeCSSStyle??=bO(),this.unsafeCSSStyle.parentNode!==i&&i.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=_O(t),this.appliedUnsafeCSS=t)}}applyThemeState(t,i,a,o){const s=t.shadowRoot??t.attachShadow({mode:"open"}),c=o??a;this.themeCSSStyle?.parentNode===s&&this.appliedThemeCSS?.themeStyles===i&&this.appliedThemeCSS.themeType===c||(this.themeCSSStyle=EO({shadowRoot:s,currentNode:this.themeCSSStyle,themeCSS:SO(i,c)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{themeStyles:i,themeType:c,baseThemeType:o}:void 0)}applyHunksToDOM(t,i){const{overflow:a="scroll"}=this.options,o=(this.options.hunkSeparators??"line-info")==="line-info",s=a==="wrap"?i.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(t,i);let c=!1;const f=[],d=this.hunksRenderer.renderCodeAST("unified",i),p=this.hunksRenderer.renderCodeAST("deletions",i),g=this.hunksRenderer.renderCodeAST("additions",i);d!=null?(c=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=td({code:this.codeUnified,columnType:"unified",rowSpan:s,containerSize:o}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(d),f.push(this.codeUnified)):p!=null||g!=null?(p!=null?(c=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=td({code:this.codeDeletions,columnType:"deletions",rowSpan:s,containerSize:o}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(p),f.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),g!=null?(c=c||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=td({code:this.codeAdditions,columnType:"additions",rowSpan:s,containerSize:o}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(g),f.push(this.codeAdditions)):(this.codeAdditions?.remove(),this.codeAdditions=void 0)):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0),f.length===0?t.textContent="":c&&t.replaceChildren(...f),this.lastRowCount=i.rowCount}applyPartialRender({previousRenderRange:t,renderRange:i}){const{pre:a,codeUnified:o,codeAdditions:s,codeDeletions:c,options:{diffStyle:f="split"}}=this;if(a==null||t==null||i==null||!Number.isFinite(t.totalLines)||!Number.isFinite(i.totalLines)||this.lastRowCount==null)return!1;const d=this.getCodeColumns(f,o,c,s);if(d==null)return!1;const p=t.startingLine,g=i.startingLine,y=p+t.totalLines,b=g+i.totalLines,v=Math.max(p,g),S=Math.min(y,b);if(S<=v)return!1;const T=Math.max(0,v-p),L=Math.max(0,y-S),A=this.trimColumns({columns:d,trimStart:T,trimEnd:L,previousStart:p,overlapStart:v,overlapEnd:S,diffStyle:f});if(A<0)throw new Error("applyPartialRender: failed to trim to overlap");if(this.lastRowCount<A)throw new Error("applyPartialRender: trimmed beyond DOM row count");let k=this.lastRowCount-A;const C=(j,$)=>{if(!($<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:j,totalLines:$,bufferBefore:0,bufferAfter:0})},z=C(g,Math.max(v-g,0));if(z==null&&g<v)return!1;const U=C(S,Math.max(b-S,0));if(U==null&&b>S)return!1;const O=(j,$)=>{if(j!=null){if(f==="unified"&&!Array.isArray(d))this.insertPartialHTML(f,d,j,$);else if(f==="split"&&Array.isArray(d))this.insertPartialHTML(f,d,j,$);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");k+=j.rowCount}};return this.cleanupErrorWrapper(),O(z,"afterbegin"),O(U,"beforeend"),this.lastRowCount!==k&&(this.applyRowSpan(f,d,k),this.lastRowCount=k),!0}insertPartialHTML(t,i,a,o){if(t==="unified"&&!Array.isArray(i)){const s=this.hunksRenderer.renderCodeAST("unified",a);this.renderPartialColumn(i,s,o)}else if(t==="split"&&Array.isArray(i)){const s=this.hunksRenderer.renderCodeAST("deletions",a),c=this.hunksRenderer.renderCodeAST("additions",a);this.renderPartialColumn(i[0],s,o),this.renderPartialColumn(i[1],c,o)}else throw new Error("FileDiff.insertPartialHTML: Invalid argument composition")}renderPartialColumn(t,i,a){if(t==null||i==null)return;const o=_b(i[0]),s=_b(i[1]);if(o==null||s==null)throw new Error("FileDiff.insertPartialHTML: Unexpected AST structure");const c=s.at(0);a==="beforeend"&&c?.type==="element"&&typeof c.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(c.properties["data-buffer-size"],t.content.children[t.content.children.length-1],t.gutter.children[t.gutter.children.length-1],o,s,!0);const f=s.at(-1);a==="afterbegin"&&f?.type==="element"&&typeof f.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(f.properties["data-buffer-size"],t.content.children[0],t.gutter.children[0],o,s,!1),t.gutter.insertAdjacentHTML(a,this.hunksRenderer.renderPartialHTML(o)),t.content.insertAdjacentHTML(a,this.hunksRenderer.renderPartialHTML(s))}mergeBuffersIfNecessary(t,i,a,o,s,c){if(!(i instanceof HTMLElement)||!(a instanceof HTMLElement))return;const f=this.getBufferSize(i.dataset);f!=null&&(c?(o.shift(),s.shift()):(o.pop(),s.pop()),this.updateBufferSize(i,f+t),this.updateBufferSize(a,f+t))}applyRowSpan(t,i,a){const o=s=>{s!=null&&(s.gutter.style.setProperty("grid-row",`span ${a}`),s.content.style.setProperty("grid-row",`span ${a}`))};if(t==="unified"&&!Array.isArray(i))o(i);else if(t==="split"&&Array.isArray(i))o(i[0]),o(i[1]);else throw new Error("dun fuuuuked up")}trimColumnRows(t,i,a){let o=0,s=0,c=0,f=!1;const d=a>=0;if(t==null)return 0;const p=Array.from(t.content.children),g=Array.from(t.gutter.children);if(p.length!==g.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;c<p.length&&!(i<=0&&!d&&!f);){const y=g[c],b=p[c];if(c++,!(y instanceof HTMLElement)||!(b instanceof HTMLElement))throw console.error({gutterElement:y,contentElement:b}),new Error("FileDiff.trimColumnRows: invalid row elements");if(f&&(f=!1,y.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in b.dataset||y.dataset.gutterBuffer==="metadata"&&"noNewline"in b.dataset)){y.remove(),b.remove(),s++;continue}if("lineIndex"in y.dataset&&"lineIndex"in b.dataset){(i>0||d&&o>=a)&&(y.remove(),b.remove(),i>0&&(i--,i===0&&(f=!0)),s++),o++;continue}if("separator"in y.dataset&&"separator"in b.dataset){(i>0||d&&o>=a)&&(y.remove(),b.remove(),s++);continue}if(y.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in b.dataset){(i>0||d&&o>=a)&&(y.remove(),b.remove(),s++);continue}if(y.dataset.gutterBuffer==="metadata"&&"noNewline"in b.dataset){(i>0||d&&o>=a)&&(y.remove(),b.remove(),s++);continue}if(y.dataset.gutterBuffer==="buffer"&&"contentBuffer"in b.dataset){const v=this.getBufferSize(b.dataset);if(v==null)throw new Error("FileDiff.trimColumnRows: invalid element");if(i>0){const S=Math.min(i,v),T=v-S;T>0?(this.updateBufferSize(y,T),this.updateBufferSize(b,T),s+=S):(y.remove(),b.remove(),s+=v),i-=S}else if(d){const S=o,T=o+v-1;if(a<=S)y.remove(),b.remove(),s+=v;else if(a<=T){const L=T-a+1,A=v-L;this.updateBufferSize(y,A),this.updateBufferSize(b,A),s+=L}}o+=v;continue}throw console.error({gutterElement:y,contentElement:b}),new Error("FileDiff.trimColumnRows: unknown row elements")}return s}trimColumns({columns:t,diffStyle:i,overlapEnd:a,overlapStart:o,previousStart:s,trimEnd:c,trimStart:f}){const d=Math.max(0,o-s),p=a-s;if(p<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const g=f>0,y=c>0;if(!g&&!y)return 0;const b=g?d:0,v=y?p:-1;if(i==="unified"&&!Array.isArray(t))return this.trimColumnRows(t,b,v);if(i==="split"&&Array.isArray(t)){const S=this.trimColumnRows(t[0],b,v),T=this.trimColumnRows(t[1],b,v);if(t[0]!=null&&t[1]!=null&&S!==T)throw new Error("FileDiff.trimColumns: split columns out of sync");return t[0]!=null?S:T}else throw console.error({diffStyle:i,columns:t}),new Error("FileDiff.trimColumns: Invalid columns for diffType")}getBufferSize(t){const i=Number.parseInt(t?.bufferSize??"",10);return Number.isNaN(i)?void 0:i}updateBufferSize(t,i){t.dataset.bufferSize=`${i}`,t.style.setProperty("grid-row",`span ${i}`),t.style.setProperty("min-height",`calc(${i} * 1lh)`)}getCodeColumns(t,i,a,o){function s(c){if(c==null)return;const f=c.children[0],d=c.children[1];if(!(!(f instanceof HTMLElement)||!(d instanceof HTMLElement)||f.dataset.gutter==null||d.dataset.content==null))return{gutter:f,content:d}}if(t==="unified")return s(i);{const c=s(a),f=s(o);return c!=null||f!=null?[c,f]:void 0}}applyBuffers(t,i){const{disableVirtualizationBuffers:a=!1}=this.options;if(a||i==null){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}i.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",t.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${i.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),i.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",t.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${i.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}applyPreNodeAttributes(t,{additionsContentAST:i,deletionsContentAST:a,totalLines:o},s){const{diffIndicators:c="bars",disableBackground:f=!1,disableLineNumbers:d=!1,overflow:p="scroll",diffStyle:g="split"}=this.options,y={type:"diff",diffIndicators:c,disableBackground:f,disableLineNumbers:d,overflow:p,split:g==="unified"?!1:i!=null&&a!=null,totalLines:o,customProperties:s};pO(y,this.appliedPreAttributes)||(wO(t,y),this.appliedPreAttributes=y)}applyErrorToDOM(t,i){this.cleanupErrorWrapper();const a=this.getOrCreatePreNode(i);a.innerHTML="",a.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const o=i.shadowRoot??i.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.innerHTML="",o.appendChild(this.errorWrapper);const s=document.createElement("div");s.dataset.errorMessage="",s.innerText=t.message,this.errorWrapper.appendChild(s);const c=document.createElement("pre");c.dataset.errorStack="",c.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(c)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function _b(e){if(!(e==null||e.type!=="element"))return e.children??[]}function YO(e,t){const i={...iD,...t};return i.hunkSeparatorHeight=XO(e,t?.hunkSeparatorHeight),i}function XO(e,t){if(t!=null)return t;switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}let QO=-1;var ZO=class extends T1{__id=`little-virtualized-file-diff:${++QO}`;top;height=0;metrics;heightCache=new Map;isVisible=!1;virtualizer;constructor(e,t,i,a,o=!1){super(e,a,o);const{hunkSeparators:s="line-info"}=this.options;this.virtualizer=t,this.metrics=YO(typeof s=="function"?"custom":s,i)}getLineHeight(e,t=!1){const i=this.heightCache.get(e);if(i!=null)return i;const a=t?2:1;return this.metrics.lineHeight*a}setOptions(e){if(e==null)return;const t=this.options.diffStyle,i=this.options.overflow,a=this.options.collapsed;super.setOptions(e),(t!==this.options.diffStyle||i!==this.options.overflow||a!==this.options.collapsed)&&(this.heightCache.clear(),this.computeApproximateSize(),this.renderRange=void 0),this.virtualizer.instanceChanged(this)}reconcileHeights(){const{overflow:e="scroll"}=this.options;if(this.fileContainer!=null&&(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer)),this.fileContainer==null||this.fileDiff==null){this.height=0;return}if(e==="scroll"&&this.lineAnnotations.length===0&&!this.virtualizer.config.resizeDebugging)return;const t=this.getDiffStyle();let i=!1;const a=t==="split"?[this.codeDeletions,this.codeAdditions]:[this.codeUnified];for(const o of a){if(o==null)continue;const s=o.children[1];if(s instanceof HTMLElement)for(const c of s.children){if(!(c instanceof HTMLElement))continue;const f=c.dataset.lineIndex;if(f==null)continue;const d=WO(f,t);let p=c.getBoundingClientRect().height,g=!1;c.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in c.nextElementSibling.dataset||"noNewline"in c.nextElementSibling.dataset)&&("noNewline"in c.nextElementSibling.dataset&&(g=!0),p+=c.nextElementSibling.getBoundingClientRect().height);const y=this.getLineHeight(d,g);p!==y&&(i=!0,p===this.metrics.lineHeight*(g?2:1)?this.heightCache.delete(d):this.heightCache.set(d,p))}}(i||this.virtualizer.config.resizeDebugging)&&this.computeApproximateSize()}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer)),this.render());cleanUp(){this.fileContainer!=null&&this.virtualizer.disconnect(this.fileContainer),super.cleanUp()}expandHunk=(e,t,i)=>{this.hunksRenderer.expandHunk(e,t,i),this.computeApproximateSize(),this.renderRange=void 0,this.virtualizer.instanceChanged(this)};setVisibility(e){this.fileContainer!=null&&(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}computeApproximateSize(){const e=this.height===0;if(this.height=0,this.fileDiff==null)return;const{disableFileHeader:t=!1,expandUnchanged:i=!1,collapsed:a=!1,collapsedContextThreshold:o=ca,hunkSeparators:s="line-info"}=this.options,{diffHeaderHeight:c,fileGap:f,hunkSeparatorHeight:d}=this.metrics,p=this.getDiffStyle(),g=s!=="simple"&&s!=="metadata"&&s!=="line-info-basic"?f:0;if(t?s!=="simple"&&s!=="metadata"&&(this.height+=f):this.height+=c,!a&&(Bs({diff:this.fileDiff,diffStyle:p,expandedHunks:i?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:y,collapsedBefore:b,collapsedAfter:v,deletionLine:S,additionLine:T})=>{const L=T!=null?T.splitLineIndex:S.splitLineIndex,A=T!=null?T.unifiedLineIndex:S.unifiedLineIndex,k=(T?.noEOFCR??!1)||(S?.noEOFCR??!1);b>0&&(y>0&&(this.height+=g),this.height+=d+g),this.height+=this.getLineHeight(p==="split"?L:A,k),v>0&&s!=="simple"&&(this.height+=g+d)}}),this.fileDiff.hunks.length>0&&(this.height+=f),this.fileContainer!=null&&this.virtualizer.config.resizeDebugging&&!e)){const y=this.fileContainer.getBoundingClientRect();y.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:this.fileDiff.name,elementHeight:y.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}}render({fileContainer:e,oldFile:t,newFile:i,fileDiff:a,...o}={}){const s=this.fileContainer==null;if(this.fileDiff??=a??(t!=null&&i!=null?zd(t,i):void 0),e=this.getOrCreateFileContainer(e),this.fileDiff==null)return console.error("VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data"),!1;if(s?(this.computeApproximateSize(),this.virtualizer.connect(e,this),this.top??=this.virtualizer.getOffsetInScrollContainer(e),this.isVisible=this.virtualizer.isInstanceVisible(this.top,this.height)):this.top??=this.virtualizer.getOffsetInScrollContainer(e),!this.isVisible)return this.renderPlaceholder(this.height);const c=this.virtualizer.getWindowSpecs(),f=this.computeRenderRangeFromWindow(this.fileDiff,this.top,c);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:f,oldFile:t,newFile:i,...o})}getDiffStyle(){return this.options.diffStyle??"split"}getExpandedRegion(e,t,i){if(i<=0||e)return{fromStart:0,fromEnd:0,collapsedLines:Math.max(i,0),renderAll:!1};const{expandUnchanged:a=!1,collapsedContextThreshold:o=ca}=this.options;if(a||i<=o)return{fromStart:i,fromEnd:0,collapsedLines:0,renderAll:!0};const s=this.hunksRenderer.getExpandedHunk(t),c=Math.min(Math.max(s.fromStart,0),i),f=Math.min(Math.max(s.fromEnd,0),i),d=c+f,p=d>=i;return{fromStart:c,fromEnd:f,collapsedLines:Math.max(i-d,0),renderAll:p}}getExpandedLineCount(e,t){let i=0;if(e.isPartial){for(const o of e.hunks)i+=t==="split"?o.splitLineCount:o.unifiedLineCount;return i}for(const[o,s]of e.hunks.entries()){const c=t==="split"?s.splitLineCount:s.unifiedLineCount;i+=c;const f=Math.max(s.collapsedBefore,0),{fromStart:d,fromEnd:p,renderAll:g}=this.getExpandedRegion(e.isPartial,o,f);f>0&&(i+=g?f:d+p)}const a=e.hunks.at(-1);if(a!=null&&KO(e)){const o=e.additionLines.length-(a.additionLineIndex+a.additionCount),s=e.deletionLines.length-(a.deletionLineIndex+a.deletionCount);if(a!=null&&o!==s)throw new Error(`VirtualizedFileDiff: trailing context mismatch (additions=${o}, deletions=${s}) for ${e.name}`);const c=Math.min(o,s);if(a!=null&&c>0){const{fromStart:f,renderAll:d}=this.getExpandedRegion(e.isPartial,e.hunks.length,c);i+=d?c:f}}return i}computeRenderRangeFromWindow(e,t,{top:i,bottom:a}){const{disableFileHeader:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=ca,hunkSeparators:f="line-info"}=this.options,{diffHeaderHeight:d,fileGap:p,hunkLineCount:g,hunkSeparatorHeight:y,lineHeight:b}=this.metrics,v=this.getDiffStyle(),S=this.height,T=this.getExpandedLineCount(e,v),L=o?p:d;if(t<i-S||t>a)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:S-L-p};if(T<=g||e.hunks.length===0)return{startingLine:0,totalLines:g,bufferBefore:0,bufferAfter:0};const A=Math.ceil(Math.max(a-i,0)/b),k=Math.ceil(A/g)*g+g,C=k/g,z=C,U=[],O=(i+a)/2,j=f==="simple"||f==="metadata"||f==="line-info-basic"?0:p;let $=t+L,ie=0,ne,W,J;if(Bs({diff:e,diffStyle:v,expandedHunks:s?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:c,callback:({hunkIndex:N,collapsedBefore:F,collapsedAfter:w,deletionLine:le,additionLine:he})=>{const ce=he!=null?he.splitLineIndex:le.splitLineIndex,ye=he!=null?he.unifiedLineIndex:le.unifiedLineIndex,ke=(he?.noEOFCR??!1)||(le?.noEOFCR??!1);let Te=F>0?y+j+(N>0?j:0):0;N===0&&f==="simple"&&(Te=0),$+=Te;const Qe=ie%g===0;if(Qe&&(U.push($-(t+L+Te)),J!=null)){if(J<=0)return!0;J--}const re=this.getLineHeight(v==="split"?ce:ye,ke),xe=Math.floor(ie/g);return $>i-re&&$<a&&(ne??=xe),W==null&&$+re>O&&(W=xe),J==null&&$>=a&&Qe&&(J=z),ie++,$+=re,w>0&&f!=="simple"&&($+=y+j),!1}}),ne==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:S-L-p};const fe=U.length;W??=ne;const ee=Math.round(W-C/2),te=Math.max(0,fe-C),H=Math.max(0,Math.min(ee,te)),X=H*g,oe=ee<0?k+ee*g:k,me=U[H]??0,R=H+oe/g;return{startingLine:X,totalLines:oe,bufferBefore:me,bufferAfter:R<U.length?S-L-U[R]-p:S-($-t)-p}}};function KO(e){const t=e.hunks.at(-1);return t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0?!1:t.additionLineIndex+t.additionCount<e.additionLines.length||t.deletionLineIndex+t.deletionCount<e.deletionLines.length}function WO(e,t){const[i,a]=e.split(",").map(Number);return t==="split"?a:i}const JO=typeof window>"u"?ue.useEffect:ue.useLayoutEffect;function eN({fileDiff:e,options:t,lineAnnotations:i,selectedLines:a,prerenderedHTML:o,metrics:s,hasGutterRenderUtility:c,hasCustomHeader:f,disableWorkerPool:d}){const p=sD(),g=ue.useContext(XD),y=ue.useRef(null),b=QD(v=>{if(v!=null){if(y.current!=null)throw new Error("useFileDiffInstance: An instance should not already exist when a node is created");p!=null?y.current=new ZO(ld({hasCustomHeader:f,hasGutterRenderUtility:c,options:t}),p,s,d?void 0:g,!0):y.current=new T1(ld({hasCustomHeader:f,hasGutterRenderUtility:c,options:t}),d?void 0:g,!0),y.current.hydrate({fileDiff:e,fileContainer:v,lineAnnotations:i,prerenderedHTML:o})}else{if(y.current==null)throw new Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");y.current.cleanUp(),y.current=null}});return JO(()=>{const{current:v}=y;if(v==null)return;const S=ld({hasCustomHeader:f,hasGutterRenderUtility:c,options:t}),T=!TO(v.options,S);v.setOptions(S),v.render({forceRender:T,fileDiff:e,lineAnnotations:i}),a!==void 0&&v.setSelectedLines(a)}),{ref:b,getHoveredLine:ue.useCallback(()=>y.current?.getHoveredLine(),[])}}function ld({options:e,hasCustomHeader:t,hasGutterRenderUtility:i}){return i||t?{...e,renderCustomHeader:t?K0:void 0,renderGutterUtility:i?K0:void 0}:e}function tN({fileDiff:e,options:t,metrics:i,lineAnnotations:a,selectedLines:o,className:s,style:c,prerenderedHTML:f,renderAnnotation:d,renderCustomHeader:p,renderHeaderPrefix:g,renderHeaderMetadata:y,renderGutterUtility:b,renderHoverUtility:v,disableWorkerPool:S=!1}){const{ref:T,getHoveredLine:L}=eN({fileDiff:e,options:t,metrics:i,lineAnnotations:a,selectedLines:o,prerenderedHTML:f,hasGutterRenderUtility:b!=null||v!=null,hasCustomHeader:p!=null,disableWorkerPool:S});return q.jsx(Hs,{ref:T,className:s,style:c,children:lD(OO({fileDiff:e,renderCustomHeader:p,renderHeaderPrefix:g,renderHeaderMetadata:y,renderAnnotation:d,renderGutterUtility:b,lineAnnotations:a,renderHoverUtility:v,getHoveredLine:L}),f)})}function nN({body:e,onChange:t,onSave:i,onCancel:a}){const o=ue.useRef(null);ue.useEffect(()=>{o.current?.focus()},[]);const s=c=>{c.key==="Enter"&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),i()),c.key==="Escape"&&(c.preventDefault(),a())};return q.jsxs("div",{className:"comment-editor",children:[q.jsx("textarea",{ref:o,className:"text-input-area comment-input",value:e,onChange:c=>t(c.target.value),onKeyDown:s,placeholder:"Add a comment…",rows:2}),q.jsxs("div",{className:"comment-actions",children:[q.jsx("button",{type:"button",className:"btn ghost",onClick:a,children:"cancel"}),q.jsx("button",{type:"button",className:"btn primary",onClick:i,children:"comment"})]})]})}function ph({additions:e,deletions:t,className:i}){const a=["diff-stats",i].filter(Boolean).join(" ");return q.jsxs("span",{className:a,children:[q.jsxs("span",{className:"stat-add",children:["+",e]}),q.jsxs("span",{className:"stat-del",children:["-",t]})]})}function iN({thread:e,onAddReply:t,onRequestAgent:i,onToggleResolved:a,onToggleCollapsed:o}){const[s,c]=ue.useState(!1),[f,d]=ue.useState(""),p=ue.useRef(null),y=e.messages[e.messages.length-1]?.role==="user"&&!e.loading&&!e.resolved,b=e.messages.length,v=`${e.resolved?"Resolved thread":"Thread"} with ${b} comment${b===1?"":"s"}`,S=e.resolved?"reopen":"resolve";ue.useEffect(()=>{s&&p.current?.focus()},[s]);const T=ue.useCallback(()=>{const C=f.trim();C&&(d(""),c(!1),t(C))},[t,f]),L=ue.useCallback(C=>{C.key==="Enter"&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),T())},[T]),A=ue.useCallback(()=>{a(!e.resolved)},[a,e.resolved]),k=ue.useCallback(()=>{d(""),c(!1)},[]);return e.collapsed?q.jsx("div",{className:`thread-card collapsed${e.resolved?" resolved":""}`,children:q.jsx("div",{className:"thread-collapsed-row",children:q.jsxs("button",{type:"button",className:"thread-toggle",onClick:()=>o(!1),"aria-label":"Expand thread","aria-expanded":!1,children:[q.jsx(wb,{size:14}),q.jsx("span",{className:"thread-summary",children:v})]})})}):q.jsxs("div",{className:`thread-card${e.resolved?" resolved":""}`,children:[q.jsx("div",{className:"thread-header-row",children:q.jsxs("button",{type:"button",className:"thread-toggle",onClick:()=>o(!0),"aria-label":"Collapse thread","aria-expanded":!0,children:[q.jsx(Cb,{size:14}),q.jsx("span",{className:"thread-summary",children:v})]})}),q.jsxs("div",{className:"thread-messages",children:[e.messages.map((C,z)=>{const U=y&&C.role==="user"&&z===e.messages.length-1;return q.jsxs("div",{className:`thread-msg thread-msg-${C.role}`,children:[q.jsx("span",{className:"thread-msg-role",children:C.role==="user"?"you":"agent"}),q.jsx(y1,{content:C.text,className:"thread-msg-text",variant:"thread"}),U&&q.jsx("div",{className:"thread-msg-actions",children:q.jsxs("button",{type:"button",className:"btn",onClick:i,children:[q.jsx(jE,{size:14}),"ask agent"]})})]},`${C.role}:${z}:${C.text}`)}),e.loading&&q.jsxs("div",{className:"thread-msg thread-msg-assistant",children:[q.jsx("span",{className:"thread-msg-role",children:"agent"}),q.jsx("span",{className:"thread-msg-thinking",children:"thinking…"})]})]}),q.jsx("div",{className:"thread-footer",children:s?q.jsxs(q.Fragment,{children:[q.jsx("textarea",{ref:p,className:"text-input-area thread-reply-input",value:f,onChange:C=>d(C.target.value),onKeyDown:L,placeholder:"Reply…",rows:3}),q.jsxs("div",{className:"thread-actions",children:[q.jsx("button",{type:"button",className:"btn ghost",onClick:k,children:"cancel"}),q.jsx("button",{type:"button",className:"btn primary",disabled:!f.trim(),onClick:T,children:"comment"})]})]}):q.jsxs("div",{className:"thread-actions",children:[q.jsx("button",{type:"button",className:"btn ghost",onClick:A,children:S}),q.jsx("button",{type:"button",className:"btn",onClick:()=>c(!0),children:"reply"})]})})]})}const rN={theme:"github-dark-default",themeType:"dark",diffStyle:"unified",diffIndicators:"none",lineDiffType:"word-alt",disableFileHeader:!0,overflow:"wrap",unsafeCSS:[":host { --diffs-dark-bg: var(--bg); --diffs-bg: var(--bg); font-weight: var(--font-weight-code); }","pre { background-color: var(--bg) !important; --diffs-bg: var(--bg) !important; }","[data-annotation-slot], [data-annotation-content] { font-family: var(--font-family-ui); }","[data-annotation-slot] code, [data-annotation-slot] pre, [data-annotation-content] code, [data-annotation-content] pre { font-family: var(--font-family-code); }","[data-overflow='wrap'] [data-code] { overflow-x: hidden; }","[data-overflow='wrap'] [data-annotation-content] { width: auto; }"].join(" ")};function aN({file:e,diffStyle:t,overflowMode:i,collapsed:a,viewed:o,annotations:s,onToggleCollapsed:c,onToggleViewed:f,onLineActivate:d,onDraftChange:p,onSaveDraft:g,onCancelDraft:y,onAddReply:b,onRequestAgent:v,onToggleResolved:S,onToggleThreadCollapsed:T}){const L=ue.useMemo(()=>({...rN,diffStyle:t==="split"?"split":"unified",overflow:i,onLineNumberClick:({lineNumber:C,annotationSide:z})=>{d(e.id,C,z)}}),[t,e.id,d,i]),A=ue.useCallback(k=>{if(k.metadata.type==="draft")return q.jsx(nN,{body:k.metadata.draft.body,onChange:p,onSave:g,onCancel:y});const{thread:C}=k.metadata;return q.jsx(iN,{thread:C,onAddReply:z=>b(C.id,z),onRequestAgent:()=>v(C.id),onToggleResolved:z=>S(C.id,z),onToggleCollapsed:z=>T(C.id,z)})},[b,y,p,v,g,S,T]);return q.jsxs("section",{className:"file-section",id:`file-${e.id}`,children:[q.jsxs("div",{className:"file-header",children:[q.jsxs("button",{type:"button",className:"file-toggle",onClick:()=>c(e.id),"aria-label":a?"Expand file":"Collapse file",children:[a?q.jsx(DE,{size:14}):q.jsx(LE,{size:14}),q.jsx("span",{className:"file-path",children:e.displayPath})]}),q.jsxs("div",{className:"file-meta",children:[q.jsx(ph,{additions:e.additions,deletions:e.deletions}),q.jsxs("button",{type:"button",className:`viewed-btn${o?" checked":""}`,onClick:()=>f(e.id),"aria-label":o?"Mark as not viewed":"Mark as viewed",children:[q.jsx("span",{className:"viewed-check",children:o&&q.jsx(kE,{size:10,strokeWidth:3})}),"viewed"]})]})]}),!a&&q.jsx("div",{className:"file-body",children:q.jsx(tN,{className:"diff-view",fileDiff:e.file,options:L,lineAnnotations:s,renderAnnotation:A})})]})}function lN({open:e,files:t,viewed:i,onJumpToFile:a}){return q.jsx("aside",{className:`sidebar${e?" open":""}`,children:t.map(o=>q.jsx("button",{type:"button",className:`sidebar-item${i[o.id]?" viewed":""}`,onClick:()=>a(o.id),children:q.jsx(oN,{path:o.displayPath,stats:q.jsx(ph,{additions:o.additions,deletions:o.deletions,className:"sidebar-stats"})})},o.id))})}function oN({path:e,stats:t}){const i=ue.useRef(null),a=ue.useRef(null),o=ue.useRef(null),[s,c]=ue.useState(()=>uN(e)),f=ue.useMemo(()=>sN(),[]);return ue.useLayoutEffect(()=>{const d=i.current,p=a.current,g=o.current;if(!d||!p||!g)return;const y=()=>{const v=d.clientWidth,S=g.offsetWidth,L=v-S-8;if(L<=0){c(e);return}const A=window.getComputedStyle(p);c(cN(e,L,A.font,f))};y();const b=new ResizeObserver(y);return b.observe(d),b.observe(g),()=>{b.disconnect()}},[f,e]),q.jsxs("span",{ref:i,className:"sidebar-row",children:[q.jsx("span",{ref:a,className:"sidebar-path",title:e,children:s}),q.jsx("span",{ref:o,children:t})]})}function sN(){const t=document.createElement("canvas").getContext("2d");return(i,a)=>t?(t.font=a,t.measureText(i).width):i.length*8}function uN(e){const t=e.split("/"),i=t.pop()??e;return t.length<=2?e:`${t[0]}/…/${i}`}function cN(e,t,i,a){const o=fN(e);for(const s of o)if(a(s,i)<=t)return s;return o[o.length-1]??e}function fN(e){const t=e.split("/"),i=t.pop()??e,a=t,o=[e];a.length>0&&o.push(`${a.join("/")}/${i}`),a.length>2&&(o.push(`${a[0]}/…/${a.slice(1).join("/")}/${i}`),o.push(`${a[0]}/…/${a.slice(-2).join("/")}/${i}`),o.push(`${a[0]}/…/${i}`),o.push(`${a[0]}/…/${a[a.length-1]}/${i}`)),a.length>0&&(o.push(`…/${i}`),o.push(`…/${a[a.length-1]}/${i}`));const s=dN(i);return a.length>0&&(o.push(`${a[0]}/…/${s}`),o.push(`${a[0]}/…/${a[a.length-1]}/${s}`),o.push(`…/${s}`)),o.push(s),[...new Set(o)]}function dN(e){const t=e.lastIndexOf(".");if(t<=1||t===e.length-1)return e.length<=24?e:`${e.slice(0,20)}…`;const i=e.slice(0,t),a=e.slice(t);return i.length<=18?e:`${i.slice(0,14)}…${a}`}function hN({value:e,options:t,onChange:i}){return q.jsx("div",{className:"toggle-group",role:"radiogroup",children:t.map(a=>q.jsx("button",{type:"button",role:"radio","aria-checked":e===a.value,className:`toggle-group-item${e===a.value?" active":""}`,onClick:()=>i(a.value),children:a.label},a.value))})}function pN({fileCount:e,viewedCount:t,additions:i,deletions:a,commentCount:o,diffCommand:s,diffStyle:c,overflowMode:f,sidebarOpen:d,finished:p,status:g,briefLoading:y,hasBrief:b,onBriefClick:v,onToggleSidebar:S,onExpandAll:T,onCollapseViewed:L,onCollapseAll:A,onDiffStyleChange:k,onOverflowModeChange:C,onSubmit:z,onCancel:U}){const O=c==="split"?"split":"stacked",j=f==="scroll"?"scroll":"wrap",$=e>0?Math.round(t/e*100):0;return q.jsxs("header",{className:"top-bar",children:[q.jsxs("div",{className:"top-bar-left",children:[q.jsx(_l,{icon:UE,label:"Toggle file list",className:d?"active":"",onClick:S}),q.jsxs("button",{type:"button",className:"btn top-bar-action top-bar-brief-action",onClick:v,disabled:y,children:[q.jsx(PE,{size:14}),y?"generating brief…":b?"view brief":"brief"]}),q.jsxs("div",{className:"top-bar-diff-meta","aria-label":`${i} additions and ${a} deletions${s?`, ${s}`:""}`,children:[q.jsx(ph,{additions:i,deletions:a}),s&&q.jsx("span",{className:"top-bar-meta top-bar-meta-dim top-bar-diff-command",children:s})]})]}),q.jsxs("div",{className:"top-bar-right",children:[q.jsxs("div",{className:"top-bar-viewed","aria-label":`${t} of ${e} viewed, ${o} unresolved comments`,children:[q.jsx("span",{className:"top-bar-viewed-ring",style:{background:`conic-gradient(var(--accent-add) ${$}%, var(--border) ${$}% 100%)`},"aria-hidden":"true",children:q.jsx("span",{className:"top-bar-viewed-ring-inner"})}),q.jsxs("span",{className:"top-bar-viewed-text",children:[t," of ",e," viewed"]})]}),g&&q.jsx("span",{className:"top-bar-meta top-bar-status",children:g}),q.jsxs("div",{className:"btn-group",children:[q.jsx(_l,{icon:wb,label:"Expand all files",onClick:T}),q.jsx(_l,{icon:IE,label:"Collapse viewed files",onClick:L}),q.jsx(_l,{icon:Cb,label:"Collapse all files",onClick:A})]}),q.jsxs("button",{type:"button",className:`top-bar-toggle${j==="wrap"?" active":""}`,onClick:()=>C(j==="wrap"?"scroll":"wrap"),"aria-pressed":j==="wrap","aria-label":"Toggle wrapped diff lines",children:[q.jsx("span",{className:"top-bar-toggle-switch","aria-hidden":"true",children:q.jsx("span",{className:"top-bar-toggle-thumb"})}),q.jsx("span",{className:"top-bar-toggle-label",children:"wrap"})]}),q.jsx(hN,{value:O,options:[{value:"split",label:"split"},{value:"stacked",label:"stacked"}],onChange:k}),q.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-primary",onClick:z,disabled:p,children:"submit"}),q.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-cancel",onClick:U,disabled:p,"aria-label":"cancel",children:q.jsx(Ab,{size:14,strokeWidth:2.25})})]})]})}function mN(e,t,i){if(!e.trim())return[];const a=qO(e,i),o=gN(t);let s=0;return a.flatMap(c=>c.files.map(f=>{const d=yN(f,o);return{id:f.cacheKey??`${f.name}::${s++}`,file:f,displayPath:d.displayPath,oldRepoPath:d.oldRepoPath,newRepoPath:d.newRepoPath,additions:Sb(f,"additions"),deletions:Sb(f,"deletions")}}))}function Sb(e,t){return e.hunks.reduce((i,a)=>i+a.hunkContent.reduce((o,s)=>o+(s.type==="change"?s[t]:0),0),0)}function gN(e){const t=new Map;for(const i of e??[]){const a={displayPath:i.oldPath&&i.newPath&&i.oldPath!==i.newPath?`${i.oldPath} → ${i.newPath}`:i.path,oldRepoPath:i.oldPath,newRepoPath:i.newPath??i.path};t.set(i.path,a),i.newPath&&t.set(i.newPath,a),i.oldPath&&t.set(i.oldPath,a)}return t}function yN(e,t){const i=t.get(e.name)||(e.prevName?t.get(e.prevName):void 0);return i||{displayPath:e.prevName&&e.prevName!==e.name?`${e.prevName} → ${e.name}`:e.name,oldRepoPath:e.prevName,newRepoPath:e.name}}const bN=[];function vN(){const[e,t]=ue.useState(null),[i,a]=ue.useState(null),[o,s]=ue.useState(fE),[c,f]=ue.useState(null),[d,p]=ue.useState(!1),[g,y]=ue.useState(""),[b,v]=ue.useState(!1),S=ue.useRef(null),T=ue.useCallback(re=>{s(dE(re))},[]),L=ue.useCallback(async(re,xe={})=>{try{const Le=await re;T(Le.state)}catch(Le){xe.onError?.(),y(Le instanceof Error?Le.message:String(Le))}},[T]),A=ue.useCallback((re,xe)=>{L(nE(re),xe)},[L]),k=ue.useCallback((re,xe)=>{s(Le=>yE(Le,re,xe))},[]),C=ue.useCallback(re=>{s(xe=>bE(xe,re))},[]);ue.useEffect(()=>{let re=!0;return(async()=>{try{const Le=await eE();if(!Le.state)throw new Error("diff tool bootstrap response did not include review state");if(!re)return;t(Le),T(Le.state);const dt=await tE();re&&a(dt)}catch(Le){re&&y(Le instanceof Error?Le.message:String(Le))}})(),()=>{re=!1}},[T]);const z=i&&"patch"in i?i.patch:"",U=ue.useMemo(()=>mN(z,e?.files,e?.context.sessionId),[z,e]),O=ue.useMemo(()=>Sy(o.collapsedFileIds),[o.collapsedFileIds]),j=ue.useMemo(()=>Sy(o.viewedFileIds),[o.viewedFileIds]),$=ue.useMemo(()=>o.threads.filter(re=>!re.resolved).length,[o.threads]),ie=o.brief.content.trim().length>0,ne=ue.useMemo(()=>U.reduce(pE,{additions:0,deletions:0}),[U]),W=ue.useCallback((re,xe="smooth")=>{document.getElementById(`file-${re}`)?.scrollIntoView({behavior:xe,block:"start"})},[]),J=ue.useCallback(re=>{A({collapsedFileIds:Ey(o.collapsedFileIds,re)})},[A,o.collapsedFileIds]),fe=ue.useCallback(re=>{const xe=Ey(o.viewedFileIds,re),Le=xe.includes(re),dt=Le?xy([...o.collapsedFileIds,re]):o.collapsedFileIds;S.current=Le&&!o.collapsedFileIds.includes(re)?hE(U,re):null,A({viewedFileIds:xe,collapsedFileIds:dt},{onError:()=>{S.current=null}})},[A,U,o.collapsedFileIds,o.viewedFileIds]),ee=ue.useCallback(()=>{A({collapsedFileIds:[]})},[A]),te=ue.useCallback(()=>{A({collapsedFileIds:U.map(re=>re.id)})},[A,U]),H=ue.useCallback(()=>{A({collapsedFileIds:xy([...o.collapsedFileIds,...o.viewedFileIds])})},[A,o.collapsedFileIds,o.viewedFileIds]);ue.useLayoutEffect(()=>{const re=S.current;re&&(S.current=null,W(re,"auto"))},[o.collapsedFileIds,W]);const X=ue.useCallback((re,xe,Le)=>{f(dt=>dt&&dt.fileId===re&&dt.lineNumber===xe&&dt.side===Le?dt:{fileId:re,lineNumber:xe,side:Le,body:""})},[]),oe=ue.useCallback(re=>{f(xe=>xe&&{...xe,body:re})},[]),me=ue.useCallback(()=>{if(!c)return;const re=c.body.trim();if(!re){f(null);return}L(iE({fileId:c.fileId,filePath:vE(c,U),lineNumber:c.lineNumber,side:c.side,body:re}).then(xe=>(f(null),xe)))},[c,U,L]),R=ue.useCallback(()=>f(null),[]),N=ue.useCallback((re,xe)=>{L(rE({id:re,text:xe}))},[L]),F=ue.useCallback(re=>{y(""),k(re,!0),L(aE(re),{onError:()=>{k(re,!1)}})},[k,L]),w=ue.useCallback(()=>{y(""),C(!0),L(sE(),{onError:()=>{C(!1)}})},[C,L]),le=ue.useCallback((re,xe)=>{L(lE({id:re,resolved:xe}))},[L]),he=ue.useCallback((re,xe)=>{L(oE({id:re,collapsed:xe}))},[L]),ce=ue.useMemo(()=>mE(o.threads),[o.threads]),ye=ue.useMemo(()=>c?{lineNumber:c.lineNumber,side:c.side,metadata:{type:"draft",draft:c}}:null,[c]),ke=ue.useCallback(async()=>{p(!0),y("Returning review…");try{await uE(),y("Review returned. You can close this tab.")}catch(re){p(!1),y(re instanceof Error?re.message:String(re))}},[]),Te=ue.useCallback(async()=>{p(!0),y("Cancelling…");try{await cE(),y("Cancelled. You can close this tab.")}catch(re){p(!1),y(re instanceof Error?re.message:String(re))}},[]),Qe=ue.useCallback(()=>{if(ie){v(!0);return}w()},[ie,w]);return q.jsxs(q.Fragment,{children:[q.jsxs("div",{className:`app${o.sidebarOpen?" sidebar-open":""}`,children:[q.jsx(pN,{fileCount:U.length,viewedCount:o.viewedFileIds.length,additions:ne.additions,deletions:ne.deletions,commentCount:$,diffCommand:e?.context.diffCommand,diffStyle:o.diffStyle,overflowMode:o.overflowMode,sidebarOpen:o.sidebarOpen,finished:d,status:g,briefLoading:o.brief.loading,hasBrief:ie,onBriefClick:Qe,onToggleSidebar:()=>{A({sidebarOpen:!o.sidebarOpen})},onExpandAll:ee,onCollapseViewed:H,onCollapseAll:te,onDiffStyleChange:re=>{A({diffStyle:re})},onOverflowModeChange:re=>{A({overflowMode:re})},onSubmit:ke,onCancel:Te}),q.jsx(lN,{open:o.sidebarOpen,files:U,viewed:j,onJumpToFile:W}),q.jsxs("main",{className:"content",children:[U.length===0&&q.jsx("div",{className:"empty",children:g||"loading…"}),U.map(re=>{const xe=ce.get(re.id)??bN,Le=gE(xe,re.id,c,ye);return q.jsx(aN,{file:re,diffStyle:o.diffStyle,overflowMode:o.overflowMode,collapsed:O[re.id]??!1,viewed:j[re.id]??!1,annotations:Le,onToggleCollapsed:J,onToggleViewed:fe,onLineActivate:X,onDraftChange:oe,onSaveDraft:me,onCancelDraft:R,onAddReply:N,onRequestAgent:F,onToggleResolved:le,onToggleThreadCollapsed:he},re.id)})]})]}),q.jsx(YR,{open:b,content:o.brief.content,loading:o.brief.loading,onClose:()=>v(!1)})]})}WS.createRoot(document.getElementById("root")).render(q.jsx(ue.StrictMode,{children:q.jsx(vN,{})}));
1884
+ }`}function nd({code:e,pre:t,columnType:i,rowSpan:a,containerSize:o=!1}={}){return e==null&&(e=document.createElement("code"),e.setAttribute("data-code",""),i!=null&&e.setAttribute(`data-${i}`,""),t?.appendChild(e)),a!=null?e.style.setProperty("grid-row",`span ${a}`):e.style.removeProperty("grid-row"),o?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}function wN({shadowRoot:e,currentNode:t,themeCSS:i}){if(i.trim()===""){t?.remove();return}return t??=AN(),t.textContent=i,t.parentNode!==e&&e.appendChild(t),t}function AN(){const e=document.createElement("style");return e.setAttribute(v1,""),e}function kN(e,t){if(t==null)return;const i=e.shadowRoot??e.attachShadow({mode:"open"});i.innerHTML===""&&(i.innerHTML=t)}function TN(e,{type:t,diffIndicators:i,disableBackground:a,disableLineNumbers:o,overflow:s,split:c,totalLines:f,customProperties:d}){if(d!=null)for(const p in d){const g=d[p];g!=null&&e.setAttribute(p,`${g}`)}switch(t==="diff"?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),i){case"bars":case"classic":e.setAttribute("data-indicators",i);break;case"none":e.removeAttribute("data-indicators");break}return o?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),a?e.removeAttribute("data-background"):e.setAttribute("data-background",""),t==="diff"?e.setAttribute("data-diff-type",c?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",s),e.tabIndex=0,e.style.setProperty("--diffs-min-number-column-width-default",`${`${f}`.length}ch`),e}if(typeof HTMLElement<"u"&&customElements.get(Hs)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const a=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(EN)),a.adoptedStyleSheets=[e]}}customElements.define(Hs,t)}const LN=!0;function RN(e,t,i){if(e===t||e==null||t==null)return e===t;const a=new Set(i),o=Object.keys(e),s=new Set(Object.keys(t));for(const c of o)if(s.delete(c),!a.has(c)&&(!(c in t)||e[c]!==t[c]))return!1;for(const c of Array.from(s))if(!a.has(c))return!1;return!0}function DN(e,t){return C1(e?.theme??Pn,t?.theme??Pn)&&RN(e,t,["theme"])}function NN({hunkIndex:e,lineIndex:t,conflictIndex:i}){return`merge-conflict-action-${e}-${t}-${i}`}function ON(e,t){const i=t.hunks[e.hunkIndex];if(i!=null)return{hunkIndex:e.hunkIndex,lineIndex:MN(i,e.startContentIndex)}}function MN(e,t){let i=e.unifiedLineStart;for(let a=0;a<t;a++){const o=e.hunkContent[a];i+=o.type==="context"?o.lines:o.deletions+o.additions}return i}function IN({fileDiff:e,actions:t,renderCustomHeader:i,renderHeaderPrefix:a,renderHeaderMetadata:o,renderAnnotation:s,renderGutterUtility:c,renderHoverUtility:f,renderMergeConflictUtility:d,lineAnnotations:p,getHoveredLine:g,getInstance:y}){const v=c??f,b=i?.(e),S=a?.(e),k=o?.(e);return $.jsxs($.Fragment,{children:[b!=null?$.jsx("div",{slot:hh,children:b}):$.jsxs($.Fragment,{children:[S!=null&&$.jsx("div",{slot:fh,children:S}),k!=null&&$.jsx("div",{slot:dh,children:k})]}),s!=null&&p?.map((L,C)=>$.jsx("div",{slot:Il(L),children:s(L)},C)),t!=null&&d!=null&&y!=null&&t.map(L=>{if(L==null)return;const C=zN(L,e);return $.jsx("div",{slot:C,style:WR,children:d(L,y)},C)}),v!=null&&$.jsx("div",{slot:"gutter-utility-slot",style:KR,children:v(g)})]})}function zN(e,t){const i=ON(e,t);return i!=null?NN({hunkIndex:i.hunkIndex,lineIndex:i.lineIndex,conflictIndex:e.conflictIndex}):void 0}var UN=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,this.enabled=!1)}setup(e,t,i){if(t==null||i==null)for(const a of e.children??[])a instanceof HTMLElement&&("deletions"in a.dataset?t=a:"additions"in a.dataset&&(i=a));if(i==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener("scroll",this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==i&&(this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),this.codeAdditions=i,i.addEventListener("scroll",this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function ys(e){return Le({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function bs(e){return Le({tagName:"div",children:[Le({tagName:"span",children:[ci("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function id(e){return Le({tagName:"div",children:[Ps({name:e==="both"?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{"data-expand-button":"","data-expand-both":e==="both"?"":void 0,"data-expand-up":e==="up"?"":void 0,"data-expand-down":e==="down"?"":void 0}})}function ra({type:e,content:t,expandIndex:i,chunked:a=!1,slotName:o,isFirstHunk:s,isLastHunk:c}){const f=[];if(e==="metadata"&&t!=null&&f.push(Le({tagName:"div",children:[ci(t)],properties:{"data-separator-wrapper":""}})),(e==="line-info"||e==="line-info-basic")&&t!=null){const d=[];i!=null&&(a?(s||d.push(id("up")),c||d.push(id("down"))):d.push(id(!s&&!c?"both":s?"down":"up"))),d.push(Le({tagName:"div",children:[Le({tagName:"span",children:[ci(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),f.push(Le({tagName:"div",children:d,properties:{"data-separator-wrapper":"","data-separator-multi-button":d.length>2?"":void 0}}))}return e==="custom"&&o!=null&&f.push(Le({tagName:"slot",properties:{name:o}})),Le({tagName:"div",children:f,properties:{"data-separator":f.length===0?"simple":e,"data-expand-index":i,"data-separator-first":s?"":void 0,"data-separator-last":c?"":void 0}})}function HN(e,t){return`hunk-separator-${e}-${t}`}function PN(e){const t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function BN(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}let jN=-1;var VN=class{__id=`diff-hunks-renderer:${++jN}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(e={theme:Pn},t,i){this.options=e,this.onRenderUpdate=t,this.workerManager=i,i?.isWorkingPool()!==!0&&(this.highlighter=td(e.theme??Pn)?vD():void 0)}cleanUp(){this.highlighter=void 0,this.diff=void 0,this.renderCache=void 0,this.workerManager?.cleanUpPendingTasks(this),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.renderCache=void 0,this.workerManager?.cleanUpPendingTasks(this)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,i=this.getOptionsWithDefaults().expansionLineCount){const a={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t==="up"||t==="both")&&(a.fromStart+=i),(t==="down"||t==="both")&&(a.fromEnd+=i),this.renderCache?.highlighted!==!0&&(this.renderCache=void 0),this.expandedHunks.set(e,a)}getExpandedHunk(e){return this.expandedHunks.get(e)??oD}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(const t of e){const i=(()=>{switch(t.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),a=i[t.lineNumber]??[];i[t.lineNumber]=a,a.push(t)}}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e}}getSplitLineDecoration({side:e,type:t}){return t!=="change"?{gutterLineType:t}:{gutterLineType:e==="deletions"?"change-deletion":"change-addition"}}createAnnotationElement(e){return oN(e)}getOptionsWithDefaults(){const{diffIndicators:e="bars",diffStyle:t="split",disableBackground:i=!1,disableFileHeader:a=!1,disableLineNumbers:o=!1,disableVirtualizationBuffers:s=!1,collapsed:c=!1,expandUnchanged:f=!1,collapsedContextThreshold:d=ha,expansionLineCount:p=100,hunkSeparators:g="line-info",lineDiffType:y="word-alt",maxLineDiffLength:v=1e3,overflow:b="scroll",theme:S=Pn,headerRenderMode:k="default",tokenizeMaxLineLength:L=1e3,useCSSClasses:C=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:i,disableFileHeader:a,disableLineNumbers:o,disableVirtualizationBuffers:s,collapsed:c,expandUnchanged:f,collapsedContextThreshold:d,expansionLineCount:p,hunkSeparators:g,lineDiffType:y,maxLineDiffLength:v,overflow:b,theme:this.workerManager?.getDiffRenderOptions().theme??S,headerRenderMode:k,tokenizeMaxLineLength:L,useCSSClasses:C}}async initializeHighlighter(){return this.highlighter=await bD(mN(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:t}=this.getRenderOptions(e);let i=this.workerManager?.getDiffResultCache(e);i!=null&&!rd(t,i.options)&&(i=void 0),this.renderCache??={diff:e,highlighted:!LD(e),options:t,result:i?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0&&this.renderCache.result==null&&this.workerManager.highlightDiffAST(this,this.diff)}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();const{theme:a,tokenizeMaxLineLength:o,lineDiffType:s}=this.getOptionsWithDefaults();return{theme:a,tokenizeMaxLineLength:o,lineDiffType:s}})();this.getOptionsWithDefaults();const{renderCache:i}=this;return i?.result==null?{options:t,forceRender:!0}:e!==i.diff||!rd(t,i.options)?{options:t,forceRender:!0}:{options:t,forceRender:!1}}renderDiff(e=this.renderCache?.diff,t=J0){if(e==null)return;const{expandUnchanged:i=!1,collapsedContextThreshold:a}=this.getOptionsWithDefaults(),o=this.workerManager?.getDiffResultCache(e);o!=null&&this.renderCache==null&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...o});const{options:s,forceRender:c}=this.getRenderOptions(e);if(this.renderCache??={diff:e,highlighted:!1,options:s,result:void 0,renderRange:void 0},this.workerManager?.isWorkingPool()===!0)(this.renderCache.result==null||!this.renderCache.highlighted&&(e!==this.renderCache.diff||!A1(this.renderCache.renderRange,t)))&&(this.renderCache.diff=e,this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,BN(t)||i?!0:this.expandedHunks,a),this.renderCache.renderRange=t),t.totalLines>0&&(!this.renderCache.highlighted||c)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??ma(e.name);const f=this.highlighter!=null&&td(s.theme),d=this.highlighter!=null&&pb(this.computedLang);if(this.highlighter!=null&&f&&(c||!this.renderCache.highlighted&&d||this.renderCache.result==null)){const{result:p,options:g}=this.renderDiffWithHighlighter(e,this.highlighter,!d);this.renderCache={diff:e,options:g,highlighted:d,result:p,renderRange:void 0}}(!f||!d)&&this.asyncHighlight(e).then(({result:p,options:g})=>{this.onHighlightSuccess(e,p,g)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,t,this.renderCache.result):void 0}async asyncRender(e,t=J0){const{result:i}=await this.asyncHighlight(e);return this.processDiffResult(e,t,i)}createPreElement(e,t,i){const{diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c}=this.getOptionsWithDefaults();return hN({type:"diff",diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:e,totalLines:t,customProperties:i})}async asyncHighlight(e){this.computedLang=e.lang??ma(e.name);const t=this.highlighter!=null&&td(this.options.theme??Pn),i=this.highlighter!=null&&pb(this.computedLang);return(this.highlighter==null||!t||!i)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter)}renderDiffWithHighlighter(e,t,i=!1){const{options:a}=this.getRenderOptions(e),{collapsedContextThreshold:o}=this.getOptionsWithDefaults();return{result:YD(e,t,a,{forcePlainText:i,expandedHunks:i?!0:void 0,collapsedContextThreshold:o}),options:a}}onHighlightSuccess(e,t,i){if(this.renderCache==null)return;const a=!this.renderCache.highlighted||!rd(this.renderCache.options,i)||this.renderCache.diff!==e;this.renderCache={diff:e,options:i,highlighted:!0,result:t,renderRange:void 0},a&&this.onRenderUpdate?.()}onHighlightError(e){console.error(e)}processDiffResult(e,t,{code:i,themeStyles:a,baseThemeType:o}){const{diffStyle:s,disableFileHeader:c,expandUnchanged:f,expansionLineCount:d,collapsedContextThreshold:p,hunkSeparators:g}=this.getOptionsWithDefaults();this.diff=e;const y=s==="unified";let v=[],b=[],S=[];const k=[],{additionLines:L,deletionLines:C}=i,A={rowCount:0,hunkSeparators:g,additionsContentAST:v,deletionsContentAST:b,unifiedContentAST:S,unifiedGutterAST:ms(),deletionsGutterAST:ms(),additionsGutterAST:ms(),expansionLineCount:d,hunkData:k,incrementRowCount(fe=1){A.rowCount+=fe},pushToGutter(fe,ee){switch(fe){case"unified":A.unifiedGutterAST.children.push(ee);break;case"deletions":A.deletionsGutterAST.children.push(ee);break;case"additions":A.additionsGutterAST.children.push(ee);break}}},T=GN(e),I={size:0,side:void 0,increment(){this.size+=1},flush(){if(s!=="unified"){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side==="additions"?(A.pushToGutter("additions",Cn(void 0,"buffer",this.size)),v?.push(ys(this.size))):(A.pushToGutter("deletions",Cn(void 0,"buffer",this.size)),b?.push(ys(this.size))),this.size=0,this.side=void 0}}},z=(fe,ee,te,H,X)=>{A.pushToGutter(fe,ED(ee,te,H,X))};function D(fe){I.flush(),s==="unified"?ad("unified",fe,A):(ad("deletions",fe,A),ad("additions",fe,A))}Bs({diff:e,diffStyle:s,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:f?!0:this.expandedHunks,collapsedContextThreshold:p,callback:({hunkIndex:fe,hunk:ee,collapsedBefore:te,collapsedAfter:H,additionLine:X,deletionLine:oe,type:me})=>{const R=oe!=null?oe.splitLineIndex:X.splitLineIndex,O=X!=null?X.unifiedLineIndex:oe.unifiedLineIndex;s==="split"&&me!=="change"&&I.flush(),te>0&&D({hunkIndex:fe,collapsedLines:te,rangeSize:Math.max(ee?.collapsedBefore??0,0),hunkSpecs:ee?.hunkSpecs,isFirstHunk:fe===0,isLastHunk:!1,isExpandable:!e.isPartial});const F=s==="unified"?O:R,w={type:me,hunkIndex:fe,lineIndex:F,unifiedLineIndex:O,splitLineIndex:R,deletionLine:oe,additionLine:X};if(s==="unified"){const ce=this.getUnifiedInjectedRowsForLine?.(w);ce?.before!=null&&yb(ce.before,A);let ye=oe!=null?C[oe.lineIndex]:void 0,Ae=X!=null?L[X.lineIndex]:void 0;if(ye==null&&Ae==null){const et="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(et,{file:e.name}),new Error(et)}const ke=me==="change"?X!=null?"change-addition":"change-deletion":me,Qe=this.getUnifiedLineDecoration({type:me,lineType:ke,additionLineIndex:X?.lineIndex,deletionLineIndex:oe?.lineIndex});z("unified",Qe.gutterLineType,X!=null?X.lineNumber:oe.lineNumber,`${O},${R}`,Qe.gutterProperties),Ae!=null?Ae=vs(Ae,Qe.contentProperties):ye!=null&&(ye=vs(ye,Qe.contentProperties)),vb({diffStyle:"unified",type:me,deletionLine:ye,additionLine:Ae,unifiedSpan:this.getAnnotations("unified",oe?.lineNumber,X?.lineNumber,fe,F),createAnnotationElement:et=>this.createAnnotationElement(et),context:A}),ce?.after!=null&&yb(ce.after,A)}else{const ce=this.getSplitInjectedRowsForLine?.(w);ce?.before!=null&&bb(ce.before,A,I);let ye=oe!=null?C[oe.lineIndex]:void 0,Ae=X!=null?L[X.lineIndex]:void 0;const ke=this.getSplitLineDecoration({side:"deletions",type:me,lineIndex:oe?.lineIndex}),Qe=this.getSplitLineDecoration({side:"additions",type:me,lineIndex:X?.lineIndex});if(ye==null&&Ae==null){const Et="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(Et,{file:e.name}),new Error(Et)}const et=(()=>{if(me==="change"){if(Ae==null)return"additions";if(ye==null)return"deletions"}})();if(et!=null){if(I.side!=null&&I.side!==et)throw new Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");I.side=et,I.increment()}const Yt=this.getAnnotations("split",oe?.lineNumber,X?.lineNumber,fe,F);if(Yt!=null&&I.size>0&&I.flush(),oe!=null){const Et=vs(ye,ke.contentProperties);z("deletions",ke.gutterLineType,oe.lineNumber,`${oe.unifiedLineIndex},${R}`,ke.gutterProperties),Et!=null&&(ye=Et)}if(X!=null){const Et=vs(Ae,Qe.contentProperties);z("additions",Qe.gutterLineType,X.lineNumber,`${X.unifiedLineIndex},${R}`,Qe.gutterProperties),Et!=null&&(Ae=Et)}vb({diffStyle:"split",type:me,additionLine:Ae,deletionLine:ye,...Yt,createAnnotationElement:Et=>this.createAnnotationElement(Et),context:A}),ce?.after!=null&&bb(ce.after,A,I)}const le=oe?.noEOFCR??!1,he=X?.noEOFCR??!1;if(he||le){if(le){const ce=me==="context"||me==="context-expanded"?me:"change-deletion";s==="unified"?(A.unifiedContentAST.push(bs(ce)),A.pushToGutter("unified",Cn(ce,"metadata",1))):(A.deletionsContentAST.push(bs(ce)),A.pushToGutter("deletions",Cn(ce,"metadata",1)),he||(A.pushToGutter("additions",Cn(void 0,"buffer",1)),A.additionsContentAST.push(ys(1))))}if(he){const ce=me==="context"||me==="context-expanded"?me:"change-addition";s==="unified"?(A.unifiedContentAST.push(bs(ce)),A.pushToGutter("unified",Cn(ce,"metadata",1))):(A.additionsContentAST.push(bs(ce)),A.pushToGutter("additions",Cn(ce,"metadata",1)),le||(A.pushToGutter("deletions",Cn(void 0,"buffer",1)),A.deletionsContentAST.push(ys(1))))}A.incrementRowCount(1)}H>0&&g!=="simple"&&D({hunkIndex:me==="context-expanded"?fe:fe+1,collapsedLines:H,rangeSize:T,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),A.incrementRowCount(1)}}),s==="split"&&I.flush();const j=Math.max(PN(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),G=t.bufferBefore>0||t.bufferAfter>0,ie=!y&&e.type!=="deleted",ne=!y&&e.type!=="new",J=A.rowCount>0||G;v=ie&&J?v:void 0,b=ne&&J?b:void 0,S=y&&J?S:void 0;const W=this.createPreElement(b!=null&&v!=null,j);return{unifiedGutterAST:y&&J?A.unifiedGutterAST.children:void 0,unifiedContentAST:S,deletionsGutterAST:ne&&J?A.deletionsGutterAST.children:void 0,deletionsContentAST:b,additionsGutterAST:ie&&J?A.additionsGutterAST.children:void 0,additionsContentAST:v,hunkData:k,preNode:W,themeStyles:a,baseThemeType:o,headerElement:c?void 0:this.renderHeader(this.diff),totalLines:j,rowCount:A.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderCodeAST(e,t){const i=e==="unified"?t.unifiedGutterAST:e==="deletions"?t.deletionsGutterAST:t.additionsGutterAST,a=e==="unified"?t.unifiedContentAST:e==="deletions"?t.deletionsContentAST:t.additionsContentAST;if(i==null||a==null)return;const o=ms(i);return o.properties.style=`grid-row: span ${t.rowCount}`,[o,sN(a,t.rowCount)]}renderFullAST(e,t=[]){const i=this.getOptionsWithDefaults().hunkSeparators==="line-info",a=this.renderCodeAST("unified",e);if(a!=null)return t.push(Le({tagName:"code",children:a,properties:{"data-code":"","data-container-size":i?"":void 0,"data-unified":""}})),{...e.preNode,children:t};const o=this.renderCodeAST("deletions",e);o!=null&&t.push(Le({tagName:"code",children:o,properties:{"data-code":"","data-container-size":i?"":void 0,"data-deletions":""}}));const s=this.renderCodeAST("additions",e);return s!=null&&t.push(Le({tagName:"code",children:s,properties:{"data-code":"","data-container-size":i?"":void 0,"data-additions":""}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return da(this.renderFullAST(e,t))}renderPartialHTML(e,t){return t==null?da(e):da(Le({tagName:"code",children:e,properties:{"data-code":"","data-container-size":this.getOptionsWithDefaults().hunkSeparators==="line-info"?"":void 0,[`data-${t}`]:""}}))}getAnnotations(e,t,i,a,o){const s={type:"annotation",hunkIndex:a,lineIndex:o,annotations:[]};if(t!=null)for(const f of this.deletionAnnotations[t]??[])s.annotations.push(Il(f));const c={type:"annotation",hunkIndex:a,lineIndex:o,annotations:[]};if(i!=null)for(const f of this.additionAnnotations[i]??[])(e==="unified"?s:c).annotations.push(Il(f));if(e==="unified")return s.annotations.length>0?s:void 0;if(!(c.annotations.length===0&&s.annotations.length===0))return{deletionSpan:s,additionSpan:c}}renderHeader(e){const{headerRenderMode:t}=this.getOptionsWithDefaults();return cN({fileOrDiff:e,mode:t})}};function rd(e,t){return C1(e.theme,t.theme)&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType}function gb(e){return`${e} unmodified line${e>1?"s":""}`}function yb(e,t){for(const i of e)t.unifiedContentAST.push(i.content),t.pushToGutter("unified",i.gutter),t.incrementRowCount(1)}function bb(e,t,i){for(const{deletion:a,addition:o}of e){if(a==null&&o==null)continue;const s=a!=null&&o!=null?void 0:a==null?"deletions":"additions";(s==null||i.side!==s)&&i.flush(),a!=null&&(t.deletionsContentAST.push(a.content),t.pushToGutter("deletions",a.gutter)),o!=null&&(t.additionsContentAST.push(o.content),t.pushToGutter("additions",o.gutter)),s!=null&&(i.side=s,i.increment()),t.incrementRowCount(1)}}function vb({diffStyle:e,type:t,deletionLine:i,additionLine:a,unifiedSpan:o,deletionSpan:s,additionSpan:c,createAnnotationElement:f,context:d}){let p=!1;if(e==="unified"){if(a!=null?d.unifiedContentAST.push(a):i!=null&&d.unifiedContentAST.push(i),o!=null){const g=t==="change"?i!=null?"change-deletion":"change-addition":t;d.unifiedContentAST.push(f(o)),d.pushToGutter("unified",Cn(g,"annotation",1)),p=!0}}else if(e==="split"){if(i!=null&&d.deletionsContentAST.push(i),a!=null&&d.additionsContentAST.push(a),s!=null){const g=t==="change"?i!=null?"change-deletion":"context":t;d.deletionsContentAST.push(f(s)),d.pushToGutter("deletions",Cn(g,"annotation",1)),p=!0}if(c!=null){const g=t==="change"?a!=null?"change-addition":"context":t;d.additionsContentAST.push(f(c)),d.pushToGutter("additions",Cn(g,"annotation",1)),p=!0}}p&&d.incrementRowCount(1)}function ad(e,{hunkIndex:t,collapsedLines:i,rangeSize:a,hunkSpecs:o,isFirstHunk:s,isLastHunk:c,isExpandable:f},d){if(i<=0)return;const p=e==="unified"?d.unifiedContentAST:e==="deletions"?d.deletionsContentAST:d.additionsContentAST;if(d.hunkSeparators==="metadata"){o!=null&&(d.pushToGutter(e,ra({type:"metadata",content:o,isFirstHunk:s,isLastHunk:c})),p.push(ra({type:"metadata",content:o,isFirstHunk:s,isLastHunk:c})),e!=="additions"&&d.incrementRowCount(1));return}if(d.hunkSeparators==="simple"){t>0&&(d.pushToGutter(e,ra({type:"simple",isFirstHunk:s,isLastHunk:!1})),p.push(ra({type:"simple",isFirstHunk:s,isLastHunk:!1})),e!=="additions"&&d.incrementRowCount(1));return}const g=HN(e,t),y=a>d.expansionLineCount,v=f?t:void 0;d.pushToGutter(e,ra({type:d.hunkSeparators,content:gb(i),expandIndex:v,chunked:y,slotName:g,isFirstHunk:s,isLastHunk:c})),p.push(ra({type:d.hunkSeparators,content:gb(i),expandIndex:v,chunked:y,slotName:g,isFirstHunk:s,isLastHunk:c})),e!=="additions"&&d.incrementRowCount(1),d.hunkData.push({slotName:g,hunkIndex:t,lines:i,type:e,expandable:f?{up:!s,down:!c,chunked:y}:void 0})}function vs(e,t){return e==null||e.type!=="element"||t==null?e:{...e,properties:{...e.properties,...t}}}function GN(e){const t=e.hunks.at(-1);if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;const i=e.additionLines.length-(t.additionLineIndex+t.additionCount),a=e.deletionLines.length-(t.deletionLineIndex+t.deletionCount);if(i!==a)throw new Error(`DiffHunksRenderer.processDiffResult: trailing context mismatch (additions=${i}, deletions=${a}) for ${e.name}`);return Math.min(i,a)}function $N(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function qN(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function FN(e){const t=e[0];if(t!=="+"&&t!=="-"&&t!==" "&&t!=="\\"){console.error(`parseLineType: Invalid firstChar: "${t}", full line: "${e}"`);return}const i=e.substring(1);return{line:i===""?`
1885
+ `:i,type:t===" "?"context":t==="\\"?"metadata":t==="+"?"addition":"deletion"}}function YN(e,t,i=!1){const a=Cs.test(e),o=e.split(a?Cs:W0);let s;const c=[];for(const f of o){if(a&&!Cs.test(f)){if(s==null)s=f;else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",f)}continue}else if(!a&&!W0.test(f)){if(s==null)s=f;else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",f)}continue}const d=T1(f,{cacheKey:t!=null?`${t}-${c.length}`:void 0,isGitDiff:a,throwOnError:i});d!=null&&c.push(d)}return{patchMetadata:s,files:c}}function T1(e,{cacheKey:t,isGitDiff:i=Cs.test(e),oldFile:a,newFile:o,throwOnError:s=!1}={}){let c=0;const f=e.split(eD);let d;const p=a==null||o==null;let g=0,y=0;for(const v of f){const b=v.split(Kf),S=b.shift();if(S==null){if(s)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",v);continue}const k=S.match(tD);let L=0,C=0;if(k==null||d==null){if(d!=null){if(s)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",v);continue}d={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:p,additionLines:!p&&a!=null&&o!=null?o.contents.split(Kf):[],deletionLines:!p&&a!=null&&o!=null?a.contents.split(Kf):[],cacheKey:t},d.additionLines.length===1&&o?.contents===""&&(d.additionLines.length=0),d.deletionLines.length===1&&a?.contents===""&&(d.deletionLines.length=0),b.unshift(S);for(const j of b){const G=j.match(i?iD:nD);if(j.startsWith("diff --git")){const[,,ie,,ne]=j.trim().match(rD)??[];d.name=ne.trim(),ie!==ne&&(d.prevName=ie.trim())}else if(G!=null){const[,ie,ne]=G;ie==="---"&&ne!=="/dev/null"?(d.prevName=ne.trim(),d.name=ne.trim()):ie==="+++"&&ne!=="/dev/null"&&(d.name=ne.trim())}else if(i){if(j.startsWith("new mode ")&&(d.mode=j.replace("new mode","").trim()),j.startsWith("old mode ")&&(d.prevMode=j.replace("old mode","").trim()),j.startsWith("new file mode")&&(d.type="new",d.mode=j.replace("new file mode","").trim()),j.startsWith("deleted file mode")&&(d.type="deleted",d.mode=j.replace("deleted file mode","").trim()),j.startsWith("similarity index")&&(j.startsWith("similarity index 100%")?d.type="rename-pure":d.type="rename-changed"),j.startsWith("index ")){const[,ie,ne,J]=j.trim().match(aD)??[];ie!=null&&(d.prevObjectId=ie),ne!=null&&(d.newObjectId=ne),J!=null&&(d.mode=J)}j.startsWith("rename from ")&&(d.prevName=j.replace("rename from ","").trim()),j.startsWith("rename to ")&&(d.name=j.replace("rename to ","").trim())}}continue}let A,T;for(;b.length>0&&(b[b.length-1]===`
1886
+ `||b[b.length-1]==="\r"||b[b.length-1]===`\r
1887
+ `||b[b.length-1]==="");)b.pop();const I=parseInt(k[3]),z=parseInt(k[1]);g=p?g:z-1,y=p?y:I-1;const D={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:parseInt(k[4]??"1"),additionStart:I,additionLines:L,deletionCount:parseInt(k[2]??"1"),deletionStart:z,deletionLines:C,deletionLineIndex:g,additionLineIndex:y,hunkContent:[],hunkContext:k[5],hunkSpecs:S,noEOFCRAdditions:!1,noEOFCRDeletions:!1};if(isNaN(D.additionCount)||isNaN(D.deletionCount)||isNaN(D.additionStart)||isNaN(D.deletionStart)){if(s)throw Error("parsePatchContent: invalid hunk metadata");console.error("parsePatchContent: invalid hunk metadata",D);continue}for(const j of b){const G=FN(j);if(G==null){console.error("processFile: invalid rawLine:",j);continue}const{type:ie,line:ne}=G;if(ie==="addition")(A==null||A.type!=="change")&&(A=ld("change",g,y),D.hunkContent.push(A)),y++,p&&d.additionLines.push(ne),A.additions++,L++,T="addition";else if(ie==="deletion")(A==null||A.type!=="change")&&(A=ld("change",g,y),D.hunkContent.push(A)),g++,p&&d.deletionLines.push(ne),A.deletions++,C++,T="deletion";else if(ie==="context")(A==null||A.type!=="context")&&(A=ld("context",g,y),D.hunkContent.push(A)),y++,g++,p&&(d.deletionLines.push(ne),d.additionLines.push(ne)),A.lines++,T="context";else if(ie==="metadata"&&A!=null){if(A.type==="context"?(D.noEOFCRAdditions=!0,D.noEOFCRDeletions=!0):T==="deletion"?D.noEOFCRDeletions=!0:T==="addition"&&(D.noEOFCRAdditions=!0),p&&(T==="addition"||T==="context")){const J=d.additionLines.length-1;J>=0&&(d.additionLines[J]=ga(d.additionLines[J]))}if(p&&(T==="deletion"||T==="context")){const J=d.deletionLines.length-1;J>=0&&(d.deletionLines[J]=ga(d.deletionLines[J]))}}}D.additionLines=L,D.deletionLines=C,D.collapsedBefore=Math.max(D.additionStart-1-c,0),d.hunks.push(D),c=D.additionStart+D.additionCount-1;for(const j of D.hunkContent)j.type==="context"?(D.splitLineCount+=j.lines,D.unifiedLineCount+=j.lines):(D.splitLineCount+=Math.max(j.additions,j.deletions),D.unifiedLineCount+=j.deletions+j.additions);D.splitLineStart=d.splitLineCount+D.collapsedBefore,D.unifiedLineStart=d.unifiedLineCount+D.collapsedBefore,d.splitLineCount+=D.collapsedBefore+D.splitLineCount,d.unifiedLineCount+=D.collapsedBefore+D.unifiedLineCount}if(d!=null){if(d.hunks.length>0&&!p&&d.additionLines.length>0&&d.deletionLines.length>0){const v=d.hunks[d.hunks.length-1],b=v.additionStart+v.additionCount-1,S=d.additionLines.length,k=Math.max(S-b,0);d.splitLineCount+=k,d.unifiedLineCount+=k}return i||(d.prevName!=null&&d.name!==d.prevName?d.hunks.length>0?d.type="rename-changed":d.type="rename-pure":o!=null&&o.contents===""?d.type="deleted":a!=null&&a.contents===""&&(d.type="new")),d.type!=="rename-pure"&&d.type!=="rename-changed"&&(d.prevName=void 0),d}}function XN(e,t,i=!1){const a=[];for(const o of e.split(JR))try{a.push(YN(o,t!=null?`${t}-${a.length}`:void 0,i))}catch(s){if(i)throw s;console.error(s)}return a}function ld(e,t,i){return e==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:i,deletionLineIndex:t}:{type:"context",lines:0,additionLineIndex:i,deletionLineIndex:t}}function Ud(e,t,i,a=!1){const o=T1($D(e.name,t.name,e.contents,t.contents,e.header,t.header),{cacheKey:(()=>{if(e.cacheKey!=null&&t.cacheKey!=null)return`${e.cacheKey}:${t.cacheKey}`})(),oldFile:e,newFile:t,throwOnError:a});if(o==null)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");return o}let QN=-1;var L1=class{static LoadedCustomComponent=LN;__id=`file-diff:${++QN}`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;lastRowCount;enabled=!0;constructor(t={theme:Pn},i,a=!1){this.options=t,this.workerManager=i,this.isContainerManaged=a,this.hunksRenderer=this.createHunksRenderer(t),this.resizeManager=new lN,this.scrollSyncManager=new UN,this.interactionManager=new tN("diff",cb(t,typeof t.hunkSeparators=="function"||(t.hunkSeparators??"line-info")==="line-info"||t.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(t){return{...t,headerRenderMode:t.renderCustomHeader!=null?"custom":"default",hunkSeparators:typeof t.hunkSeparators=="function"?"custom":t.hunkSeparators}}createHunksRenderer(t){return new VN(this.getHunksRendererOptions(t),this.handleHighlightRender,this.workerManager)}getLineIndex=(t,i="additions")=>{if(this.fileDiff==null)return;const a=this.fileDiff.hunks.at(-1);let o,s;e:for(const c of this.fileDiff.hunks){let f=i==="deletions"?c.deletionStart:c.additionStart;const d=i==="deletions"?c.deletionCount:c.additionCount;let p=c.splitLineStart,g=c.unifiedLineStart;if(t<f){const y=f-t;o=Math.max(g-y,0),s=Math.max(p-y,0);break e}if(t>=f+d){if(c===a){const y=t-(f+d);o=g+c.unifiedLineCount+y,s=p+c.splitLineCount+y;break e}continue}for(const y of c.hunkContent)if(y.type==="context")if(t<f+y.lines){const v=t-f;s=p+v,o=g+v;break e}else f+=y.lines,p+=y.lines,g+=y.lines;else{const v=i==="deletions"?y.deletions:y.additions;if(t<f+v){const b=t-f;o=g+(i==="additions"?y.deletions:0)+b,s=p+b;break e}else f+=v,p+=Math.max(y.deletions,y.additions),g+=y.deletions+y.additions}break e}if(!(o==null||s==null))return[o,s]};setOptions(t){t!=null&&(this.options=t,this.hunksRenderer.setOptions(this.getHunksRendererOptions(t)),this.interactionManager.setOptions(cb(t,typeof t.hunkSeparators=="function"||(t.hunkSeparators??"line-info")==="line-info"||t.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)))}mergeOptions(t){this.options={...this.options,...t}}setThemeType(t){(this.options.themeType??"system")!==t&&(this.mergeOptions({themeType:t}),!(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)&&this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType))}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}canPartiallyRender(t,i,a){return!(t||i||a||typeof this.options.hunkSeparators=="function")}setSelectedLines(t){this.interactionManager.setSelection(t)}cleanUp(t=!1){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer?.shadowRoot!=null&&(this.fileContainer.shadowRoot.innerHTML=""),this.fileContainer=void 0,this.pre!=null&&(this.pre.innerHTML="",this.pre=void 0),this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.lastRenderedHeaderHTML=void 0,this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,t?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(t){const{fileContainer:i,prerenderedHTML:a,preventEmit:o=!1,lineAnnotations:s,oldFile:c,newFile:f,fileDiff:d}=t;this.hydrateElements(i,a),this.pre==null&&this.headerElement==null?this.render({...t,preventEmit:!0}):this.hydrationSetup({fileDiff:d,oldFile:c,newFile:f,lineAnnotations:s}),o||this.emitPostRender()}hydrateElements(t,i){kN(t,i);for(const a of t.shadowRoot?.children??[]){if(a instanceof SVGElement){this.spriteSVG=a;continue}if(a instanceof HTMLElement){if(a instanceof HTMLPreElement){this.pre=a;for(const o of a.children)!(o instanceof HTMLElement)||o.tagName.toLowerCase()!=="code"||("deletions"in o.dataset&&(this.codeDeletions=o),"additions"in o.dataset&&(this.codeAdditions=o),"unified"in o.dataset&&(this.codeUnified=o));continue}if("diffsHeader"in a.dataset){this.headerElement=a;continue}if(a instanceof HTMLStyleElement&&a.hasAttribute(v1)){this.themeCSSStyle=a;continue}if(a instanceof HTMLStyleElement&&a.hasAttribute(_1)){this.unsafeCSSStyle=a,this.appliedUnsafeCSS=a.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=t}hydrationSetup({fileDiff:t,oldFile:i,newFile:a,lineAnnotations:o}){const{diffStyle:s="split",overflow:c="scroll"}=this.options;this.lineAnnotations=o??this.lineAnnotations,this.additionFile=a,this.deletionFile=i,this.fileDiff=t??(i!=null&&a!=null?Ud(i,a):void 0),this.pre!=null&&(this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,c==="wrap"),c==="scroll"&&s==="split"&&this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}handleExpandHunk=(t,i,a)=>{this.expandHunk(t,i,a)};expandHunk=(t,i,a)=>{this.hunksRenderer.expandHunk(t,i,a),this.rerender()};render({oldFile:t,newFile:i,fileDiff:a,forceRender:o=!1,preventEmit:s=!1,lineAnnotations:c,fileContainer:f,containerWrapper:d,renderRange:p}){if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");const{collapsed:g=!1}=this.options,y=g?void 0:p,v=t!=null&&i!=null&&(!rb(t,this.deletionFile)||!rb(i,this.additionFile));let b=a!=null&&a!==this.fileDiff;const S=c!=null&&(c.length>0||this.lineAnnotations.length>0)?c!==this.lineAnnotations:!1;if(!g&&A1(y,this.renderRange)&&!o&&!S&&(a!=null&&a===this.fileDiff||a==null&&!v))return!1;const{renderRange:k}=this;if(this.renderRange=y,this.deletionFile=t,this.additionFile=i,a!=null?this.fileDiff=a:t!=null&&i!=null&&v&&(b=!0,this.fileDiff=Ud(t,i)),c!=null&&this.setLineAnnotations(c),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{diffStyle:L="split",disableErrorHandling:C=!1,disableFileHeader:A=!1,overflow:T="scroll",themeType:I="system"}=this.options;if(A&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),f=this.getOrCreateFileContainer(f,d),g){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const z=this.hunksRenderer.renderDiff(this.fileDiff,sD);z!=null&&this.applyThemeState(f,z.themeStyles,I,z.baseThemeType),z?.headerElement!=null&&this.applyHeaderToDOM(z.headerElement,f),this.renderSeparators([]),this.injectUnsafeCSS()}catch(z){if(C)throw z;console.error(z),z instanceof Error&&this.applyErrorToDOM(z,f)}return s||this.emitPostRender(),!0}try{const z=this.getOrCreatePreNode(f);if(!(this.canPartiallyRender(o,S,v||b)&&this.applyPartialRender({previousRenderRange:k,renderRange:y}))){const D=this.hunksRenderer.renderDiff(this.fileDiff,y);if(D==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(f,D.themeStyles,I,D.baseThemeType),D.headerElement!=null&&this.applyHeaderToDOM(D.headerElement,f),D.additionsContentAST!=null||D.deletionsContentAST!=null||D.unifiedContentAST!=null?this.applyHunksToDOM(z,D):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(D.hunkData)}this.applyBuffers(z,y),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.interactionManager.setup(z),this.resizeManager.setup(z,T==="wrap"),T==="scroll"&&L==="split"?this.scrollSyncManager.setup(z,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp()}catch(z){if(C)throw z;console.error(z),z instanceof Error&&this.applyErrorToDOM(z,f)}return s||this.emitPostRender(),!0}emitPostRender(){this.fileContainer!=null&&this.options.onPostRender?.(this.fileContainer,this)}removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:t}of this.separatorCache.values())t.remove();this.separatorCache.clear();for(const{element:t}of this.annotationCache.values())t.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(t){if(this.fileContainer==null)return!1;if(this.cleanChildNodes(),this.placeHolder==null){const i=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",i.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${t}px`),!0}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.gutterUtilityContent?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.gutterUtilityContent=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0}renderSeparators(t){const{hunkSeparators:i}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof i!="function"){for(const{element:o}of this.separatorCache.values())o.remove();this.separatorCache.clear();return}const a=new Map(this.separatorCache);for(const o of t){const s=o.slotName;let c=this.separatorCache.get(s);if(c==null||!qN(o,c.hunkData)){c?.element.remove();const f=document.createElement("div");f.style.display="contents",f.slot=o.slotName;const d=i(o,this);d!=null&&f.appendChild(d),this.fileContainer.appendChild(f),c={element:f,hunkData:o},this.separatorCache.set(s,c)}a.delete(s)}for(const[o,{element:s}]of a.entries())this.separatorCache.delete(o),s.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:a}of this.annotationCache.values())a.remove();this.annotationCache.clear();return}const t=new Map(this.annotationCache),{renderAnnotation:i}=this.options;if(i!=null&&this.lineAnnotations.length>0)for(const[a,o]of this.lineAnnotations.entries()){const s=`${a}-${Il(o)}`;let c=this.annotationCache.get(s);if(c==null||!$N(o,c.annotation)){c?.element.remove();const f=i(o);if(f==null)continue;c={element:vN(Il(o)),annotation:o},c.element.appendChild(f),this.fileContainer.appendChild(c.element),this.annotationCache.set(s,c)}t.delete(s)}for(const[a,{element:o}]of t.entries())this.annotationCache.delete(a),o.remove()}renderGutterUtility(){const t=this.options.renderGutterUtility??this.options.renderHoverUtility;if(this.fileContainer==null||t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const i=t(this.interactionManager.getHoveredLine);if(i!=null&&this.gutterUtilityContent!=null)return;if(i==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const a=_N();a.appendChild(i),this.fileContainer.appendChild(a),this.gutterUtilityContent=a}getOrCreateFileContainer(t,i){const a=this.fileContainer;if(this.fileContainer=t??this.fileContainer??document.createElement(Hs),a!=null&&a!==this.fileContainer&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),i!=null&&this.fileContainer.parentNode!==i&&i.appendChild(this.fileContainer),this.spriteSVG==null){const o=document.createElement("div");o.innerHTML=gN;const s=o.firstChild;s instanceof SVGElement&&(this.spriteSVG=s,this.fileContainer.shadowRoot?.appendChild(this.spriteSVG))}return this.fileContainer}getFileContainer(){return this.fileContainer}getOrCreatePreNode(t){const i=t.shadowRoot??t.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,i.appendChild(this.pre)):this.pre.parentNode!==i&&(i.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(t){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(const i of Array.from(t.children))i instanceof HTMLElement&&(i.hasAttribute("data-unified")?this.codeUnified=i:i.hasAttribute("data-deletions")?this.codeDeletions=i:i.hasAttribute("data-additions")&&(this.codeAdditions=i))}applyHeaderToDOM(t,i){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const{fileDiff:a}=this,o=da(t);if(o!==this.lastRenderedHeaderHTML){const g=document.createElement("div");g.innerHTML=o;const y=g.firstElementChild;if(!(y instanceof HTMLElement))return;this.headerElement!=null?i.shadowRoot?.replaceChild(y,this.headerElement):i.shadowRoot?.prepend(y),this.headerElement=y,this.lastRenderedHeaderHTML=o}if(this.isContainerManaged||a==null)return;const{renderCustomHeader:s,renderHeaderPrefix:c,renderHeaderMetadata:f}=this.options;if(s!=null){const g=s(a)??void 0;this.headerCustom=this.upsertHeaderSlotElement(i,this.headerCustom,hh,g),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}const d=c?.(a)??void 0,p=f?.(a)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(i,this.headerPrefix,fh,d),this.headerMetadata=this.upsertHeaderSlotElement(i,this.headerMetadata,dh,p),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(t,i,a,o){if(o==null){i?.remove();return}const s=i??this.createHeaderSlotElement(a);return i==null&&t.appendChild(s),this.replaceHeaderSlotContent(s,o),s}replaceHeaderSlotContent(t,i){t.replaceChildren(),i instanceof Element?t.appendChild(i):t.innerText=`${i}`}createHeaderSlotElement(t){const i=document.createElement("div");return i.slot=t,i}injectUnsafeCSS(){const{unsafeCSS:t}=this.options,i=this.fileContainer?.shadowRoot;if(i!=null){if(t==null||t===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===i&&this.appliedUnsafeCSS===t||(this.unsafeCSSStyle??=SN(),this.unsafeCSSStyle.parentNode!==i&&i.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=xN(t),this.appliedUnsafeCSS=t)}}applyThemeState(t,i,a,o){const s=t.shadowRoot??t.attachShadow({mode:"open"}),c=o??a;this.themeCSSStyle?.parentNode===s&&this.appliedThemeCSS?.themeStyles===i&&this.appliedThemeCSS.themeType===c||(this.themeCSSStyle=wN({shadowRoot:s,currentNode:this.themeCSSStyle,themeCSS:CN(i,c)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{themeStyles:i,themeType:c,baseThemeType:o}:void 0)}applyHunksToDOM(t,i){const{overflow:a="scroll"}=this.options,o=(this.options.hunkSeparators??"line-info")==="line-info",s=a==="wrap"?i.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(t,i);let c=!1;const f=[],d=this.hunksRenderer.renderCodeAST("unified",i),p=this.hunksRenderer.renderCodeAST("deletions",i),g=this.hunksRenderer.renderCodeAST("additions",i);d!=null?(c=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=nd({code:this.codeUnified,columnType:"unified",rowSpan:s,containerSize:o}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(d),f.push(this.codeUnified)):p!=null||g!=null?(p!=null?(c=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=nd({code:this.codeDeletions,columnType:"deletions",rowSpan:s,containerSize:o}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(p),f.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),g!=null?(c=c||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=nd({code:this.codeAdditions,columnType:"additions",rowSpan:s,containerSize:o}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(g),f.push(this.codeAdditions)):(this.codeAdditions?.remove(),this.codeAdditions=void 0)):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0),f.length===0?t.textContent="":c&&t.replaceChildren(...f),this.lastRowCount=i.rowCount}applyPartialRender({previousRenderRange:t,renderRange:i}){const{pre:a,codeUnified:o,codeAdditions:s,codeDeletions:c,options:{diffStyle:f="split"}}=this;if(a==null||t==null||i==null||!Number.isFinite(t.totalLines)||!Number.isFinite(i.totalLines)||this.lastRowCount==null)return!1;const d=this.getCodeColumns(f,o,c,s);if(d==null)return!1;const p=t.startingLine,g=i.startingLine,y=p+t.totalLines,v=g+i.totalLines,b=Math.max(p,g),S=Math.min(y,v);if(S<=b)return!1;const k=Math.max(0,b-p),L=Math.max(0,y-S),C=this.trimColumns({columns:d,trimStart:k,trimEnd:L,previousStart:p,overlapStart:b,overlapEnd:S,diffStyle:f});if(C<0)throw new Error("applyPartialRender: failed to trim to overlap");if(this.lastRowCount<C)throw new Error("applyPartialRender: trimmed beyond DOM row count");let A=this.lastRowCount-C;const T=(j,G)=>{if(!(G<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:j,totalLines:G,bufferBefore:0,bufferAfter:0})},I=T(g,Math.max(b-g,0));if(I==null&&g<b)return!1;const z=T(S,Math.max(v-S,0));if(z==null&&v>S)return!1;const D=(j,G)=>{if(j!=null){if(f==="unified"&&!Array.isArray(d))this.insertPartialHTML(f,d,j,G);else if(f==="split"&&Array.isArray(d))this.insertPartialHTML(f,d,j,G);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");A+=j.rowCount}};return this.cleanupErrorWrapper(),D(I,"afterbegin"),D(z,"beforeend"),this.lastRowCount!==A&&(this.applyRowSpan(f,d,A),this.lastRowCount=A),!0}insertPartialHTML(t,i,a,o){if(t==="unified"&&!Array.isArray(i)){const s=this.hunksRenderer.renderCodeAST("unified",a);this.renderPartialColumn(i,s,o)}else if(t==="split"&&Array.isArray(i)){const s=this.hunksRenderer.renderCodeAST("deletions",a),c=this.hunksRenderer.renderCodeAST("additions",a);this.renderPartialColumn(i[0],s,o),this.renderPartialColumn(i[1],c,o)}else throw new Error("FileDiff.insertPartialHTML: Invalid argument composition")}renderPartialColumn(t,i,a){if(t==null||i==null)return;const o=_b(i[0]),s=_b(i[1]);if(o==null||s==null)throw new Error("FileDiff.insertPartialHTML: Unexpected AST structure");const c=s.at(0);a==="beforeend"&&c?.type==="element"&&typeof c.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(c.properties["data-buffer-size"],t.content.children[t.content.children.length-1],t.gutter.children[t.gutter.children.length-1],o,s,!0);const f=s.at(-1);a==="afterbegin"&&f?.type==="element"&&typeof f.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(f.properties["data-buffer-size"],t.content.children[0],t.gutter.children[0],o,s,!1),t.gutter.insertAdjacentHTML(a,this.hunksRenderer.renderPartialHTML(o)),t.content.insertAdjacentHTML(a,this.hunksRenderer.renderPartialHTML(s))}mergeBuffersIfNecessary(t,i,a,o,s,c){if(!(i instanceof HTMLElement)||!(a instanceof HTMLElement))return;const f=this.getBufferSize(i.dataset);f!=null&&(c?(o.shift(),s.shift()):(o.pop(),s.pop()),this.updateBufferSize(i,f+t),this.updateBufferSize(a,f+t))}applyRowSpan(t,i,a){const o=s=>{s!=null&&(s.gutter.style.setProperty("grid-row",`span ${a}`),s.content.style.setProperty("grid-row",`span ${a}`))};if(t==="unified"&&!Array.isArray(i))o(i);else if(t==="split"&&Array.isArray(i))o(i[0]),o(i[1]);else throw new Error("dun fuuuuked up")}trimColumnRows(t,i,a){let o=0,s=0,c=0,f=!1;const d=a>=0;if(t==null)return 0;const p=Array.from(t.content.children),g=Array.from(t.gutter.children);if(p.length!==g.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;c<p.length&&!(i<=0&&!d&&!f);){const y=g[c],v=p[c];if(c++,!(y instanceof HTMLElement)||!(v instanceof HTMLElement))throw console.error({gutterElement:y,contentElement:v}),new Error("FileDiff.trimColumnRows: invalid row elements");if(f&&(f=!1,y.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in v.dataset||y.dataset.gutterBuffer==="metadata"&&"noNewline"in v.dataset)){y.remove(),v.remove(),s++;continue}if("lineIndex"in y.dataset&&"lineIndex"in v.dataset){(i>0||d&&o>=a)&&(y.remove(),v.remove(),i>0&&(i--,i===0&&(f=!0)),s++),o++;continue}if("separator"in y.dataset&&"separator"in v.dataset){(i>0||d&&o>=a)&&(y.remove(),v.remove(),s++);continue}if(y.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in v.dataset){(i>0||d&&o>=a)&&(y.remove(),v.remove(),s++);continue}if(y.dataset.gutterBuffer==="metadata"&&"noNewline"in v.dataset){(i>0||d&&o>=a)&&(y.remove(),v.remove(),s++);continue}if(y.dataset.gutterBuffer==="buffer"&&"contentBuffer"in v.dataset){const b=this.getBufferSize(v.dataset);if(b==null)throw new Error("FileDiff.trimColumnRows: invalid element");if(i>0){const S=Math.min(i,b),k=b-S;k>0?(this.updateBufferSize(y,k),this.updateBufferSize(v,k),s+=S):(y.remove(),v.remove(),s+=b),i-=S}else if(d){const S=o,k=o+b-1;if(a<=S)y.remove(),v.remove(),s+=b;else if(a<=k){const L=k-a+1,C=b-L;this.updateBufferSize(y,C),this.updateBufferSize(v,C),s+=L}}o+=b;continue}throw console.error({gutterElement:y,contentElement:v}),new Error("FileDiff.trimColumnRows: unknown row elements")}return s}trimColumns({columns:t,diffStyle:i,overlapEnd:a,overlapStart:o,previousStart:s,trimEnd:c,trimStart:f}){const d=Math.max(0,o-s),p=a-s;if(p<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const g=f>0,y=c>0;if(!g&&!y)return 0;const v=g?d:0,b=y?p:-1;if(i==="unified"&&!Array.isArray(t))return this.trimColumnRows(t,v,b);if(i==="split"&&Array.isArray(t)){const S=this.trimColumnRows(t[0],v,b),k=this.trimColumnRows(t[1],v,b);if(t[0]!=null&&t[1]!=null&&S!==k)throw new Error("FileDiff.trimColumns: split columns out of sync");return t[0]!=null?S:k}else throw console.error({diffStyle:i,columns:t}),new Error("FileDiff.trimColumns: Invalid columns for diffType")}getBufferSize(t){const i=Number.parseInt(t?.bufferSize??"",10);return Number.isNaN(i)?void 0:i}updateBufferSize(t,i){t.dataset.bufferSize=`${i}`,t.style.setProperty("grid-row",`span ${i}`),t.style.setProperty("min-height",`calc(${i} * 1lh)`)}getCodeColumns(t,i,a,o){function s(c){if(c==null)return;const f=c.children[0],d=c.children[1];if(!(!(f instanceof HTMLElement)||!(d instanceof HTMLElement)||f.dataset.gutter==null||d.dataset.content==null))return{gutter:f,content:d}}if(t==="unified")return s(i);{const c=s(a),f=s(o);return c!=null||f!=null?[c,f]:void 0}}applyBuffers(t,i){const{disableVirtualizationBuffers:a=!1}=this.options;if(a||i==null){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}i.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",t.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${i.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),i.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",t.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${i.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}applyPreNodeAttributes(t,{additionsContentAST:i,deletionsContentAST:a,totalLines:o},s){const{diffIndicators:c="bars",disableBackground:f=!1,disableLineNumbers:d=!1,overflow:p="scroll",diffStyle:g="split"}=this.options,y={type:"diff",diffIndicators:c,disableBackground:f,disableLineNumbers:d,overflow:p,split:g==="unified"?!1:i!=null&&a!=null,totalLines:o,customProperties:s};yN(y,this.appliedPreAttributes)||(TN(t,y),this.appliedPreAttributes=y)}applyErrorToDOM(t,i){this.cleanupErrorWrapper();const a=this.getOrCreatePreNode(i);a.innerHTML="",a.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const o=i.shadowRoot??i.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.innerHTML="",o.appendChild(this.errorWrapper);const s=document.createElement("div");s.dataset.errorMessage="",s.innerText=t.message,this.errorWrapper.appendChild(s);const c=document.createElement("pre");c.dataset.errorStack="",c.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(c)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function _b(e){if(!(e==null||e.type!=="element"))return e.children??[]}function ZN(e,t){const i={...lD,...t};return i.hunkSeparatorHeight=KN(e,t?.hunkSeparatorHeight),i}function KN(e,t){if(t!=null)return t;switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}let WN=-1;var JN=class extends L1{__id=`little-virtualized-file-diff:${++WN}`;top;height=0;metrics;heightCache=new Map;isVisible=!1;virtualizer;constructor(e,t,i,a,o=!1){super(e,a,o);const{hunkSeparators:s="line-info"}=this.options;this.virtualizer=t,this.metrics=ZN(typeof s=="function"?"custom":s,i)}getLineHeight(e,t=!1){const i=this.heightCache.get(e);if(i!=null)return i;const a=t?2:1;return this.metrics.lineHeight*a}setOptions(e){if(e==null)return;const t=this.options.diffStyle,i=this.options.overflow,a=this.options.collapsed;super.setOptions(e),(t!==this.options.diffStyle||i!==this.options.overflow||a!==this.options.collapsed)&&(this.heightCache.clear(),this.computeApproximateSize(),this.renderRange=void 0),this.virtualizer.instanceChanged(this)}reconcileHeights(){const{overflow:e="scroll"}=this.options;if(this.fileContainer!=null&&(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer)),this.fileContainer==null||this.fileDiff==null){this.height=0;return}if(e==="scroll"&&this.lineAnnotations.length===0&&!this.virtualizer.config.resizeDebugging)return;const t=this.getDiffStyle();let i=!1;const a=t==="split"?[this.codeDeletions,this.codeAdditions]:[this.codeUnified];for(const o of a){if(o==null)continue;const s=o.children[1];if(s instanceof HTMLElement)for(const c of s.children){if(!(c instanceof HTMLElement))continue;const f=c.dataset.lineIndex;if(f==null)continue;const d=tO(f,t);let p=c.getBoundingClientRect().height,g=!1;c.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in c.nextElementSibling.dataset||"noNewline"in c.nextElementSibling.dataset)&&("noNewline"in c.nextElementSibling.dataset&&(g=!0),p+=c.nextElementSibling.getBoundingClientRect().height);const y=this.getLineHeight(d,g);p!==y&&(i=!0,p===this.metrics.lineHeight*(g?2:1)?this.heightCache.delete(d):this.heightCache.set(d,p))}}(i||this.virtualizer.config.resizeDebugging)&&this.computeApproximateSize()}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer)),this.render());cleanUp(){this.fileContainer!=null&&this.virtualizer.disconnect(this.fileContainer),super.cleanUp()}expandHunk=(e,t,i)=>{this.hunksRenderer.expandHunk(e,t,i),this.computeApproximateSize(),this.renderRange=void 0,this.virtualizer.instanceChanged(this)};setVisibility(e){this.fileContainer!=null&&(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}computeApproximateSize(){const e=this.height===0;if(this.height=0,this.fileDiff==null)return;const{disableFileHeader:t=!1,expandUnchanged:i=!1,collapsed:a=!1,collapsedContextThreshold:o=ha,hunkSeparators:s="line-info"}=this.options,{diffHeaderHeight:c,fileGap:f,hunkSeparatorHeight:d}=this.metrics,p=this.getDiffStyle(),g=s!=="simple"&&s!=="metadata"&&s!=="line-info-basic"?f:0;if(t?s!=="simple"&&s!=="metadata"&&(this.height+=f):this.height+=c,!a&&(Bs({diff:this.fileDiff,diffStyle:p,expandedHunks:i?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:y,collapsedBefore:v,collapsedAfter:b,deletionLine:S,additionLine:k})=>{const L=k!=null?k.splitLineIndex:S.splitLineIndex,C=k!=null?k.unifiedLineIndex:S.unifiedLineIndex,A=(k?.noEOFCR??!1)||(S?.noEOFCR??!1);v>0&&(y>0&&(this.height+=g),this.height+=d+g),this.height+=this.getLineHeight(p==="split"?L:C,A),b>0&&s!=="simple"&&(this.height+=g+d)}}),this.fileDiff.hunks.length>0&&(this.height+=f),this.fileContainer!=null&&this.virtualizer.config.resizeDebugging&&!e)){const y=this.fileContainer.getBoundingClientRect();y.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:this.fileDiff.name,elementHeight:y.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}}render({fileContainer:e,oldFile:t,newFile:i,fileDiff:a,...o}={}){const s=this.fileContainer==null;if(this.fileDiff??=a??(t!=null&&i!=null?Ud(t,i):void 0),e=this.getOrCreateFileContainer(e),this.fileDiff==null)return console.error("VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data"),!1;if(s?(this.computeApproximateSize(),this.virtualizer.connect(e,this),this.top??=this.virtualizer.getOffsetInScrollContainer(e),this.isVisible=this.virtualizer.isInstanceVisible(this.top,this.height)):this.top??=this.virtualizer.getOffsetInScrollContainer(e),!this.isVisible)return this.renderPlaceholder(this.height);const c=this.virtualizer.getWindowSpecs(),f=this.computeRenderRangeFromWindow(this.fileDiff,this.top,c);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:f,oldFile:t,newFile:i,...o})}getDiffStyle(){return this.options.diffStyle??"split"}getExpandedRegion(e,t,i){if(i<=0||e)return{fromStart:0,fromEnd:0,collapsedLines:Math.max(i,0),renderAll:!1};const{expandUnchanged:a=!1,collapsedContextThreshold:o=ha}=this.options;if(a||i<=o)return{fromStart:i,fromEnd:0,collapsedLines:0,renderAll:!0};const s=this.hunksRenderer.getExpandedHunk(t),c=Math.min(Math.max(s.fromStart,0),i),f=Math.min(Math.max(s.fromEnd,0),i),d=c+f,p=d>=i;return{fromStart:c,fromEnd:f,collapsedLines:Math.max(i-d,0),renderAll:p}}getExpandedLineCount(e,t){let i=0;if(e.isPartial){for(const o of e.hunks)i+=t==="split"?o.splitLineCount:o.unifiedLineCount;return i}for(const[o,s]of e.hunks.entries()){const c=t==="split"?s.splitLineCount:s.unifiedLineCount;i+=c;const f=Math.max(s.collapsedBefore,0),{fromStart:d,fromEnd:p,renderAll:g}=this.getExpandedRegion(e.isPartial,o,f);f>0&&(i+=g?f:d+p)}const a=e.hunks.at(-1);if(a!=null&&eO(e)){const o=e.additionLines.length-(a.additionLineIndex+a.additionCount),s=e.deletionLines.length-(a.deletionLineIndex+a.deletionCount);if(a!=null&&o!==s)throw new Error(`VirtualizedFileDiff: trailing context mismatch (additions=${o}, deletions=${s}) for ${e.name}`);const c=Math.min(o,s);if(a!=null&&c>0){const{fromStart:f,renderAll:d}=this.getExpandedRegion(e.isPartial,e.hunks.length,c);i+=d?c:f}}return i}computeRenderRangeFromWindow(e,t,{top:i,bottom:a}){const{disableFileHeader:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=ha,hunkSeparators:f="line-info"}=this.options,{diffHeaderHeight:d,fileGap:p,hunkLineCount:g,hunkSeparatorHeight:y,lineHeight:v}=this.metrics,b=this.getDiffStyle(),S=this.height,k=this.getExpandedLineCount(e,b),L=o?p:d;if(t<i-S||t>a)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:S-L-p};if(k<=g||e.hunks.length===0)return{startingLine:0,totalLines:g,bufferBefore:0,bufferAfter:0};const C=Math.ceil(Math.max(a-i,0)/v),A=Math.ceil(C/g)*g+g,T=A/g,I=T,z=[],D=(i+a)/2,j=f==="simple"||f==="metadata"||f==="line-info-basic"?0:p;let G=t+L,ie=0,ne,J,W;if(Bs({diff:e,diffStyle:b,expandedHunks:s?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:c,callback:({hunkIndex:O,collapsedBefore:F,collapsedAfter:w,deletionLine:le,additionLine:he})=>{const ce=he!=null?he.splitLineIndex:le.splitLineIndex,ye=he!=null?he.unifiedLineIndex:le.unifiedLineIndex,Ae=(he?.noEOFCR??!1)||(le?.noEOFCR??!1);let ke=F>0?y+j+(O>0?j:0):0;O===0&&f==="simple"&&(ke=0),G+=ke;const Qe=ie%g===0;if(Qe&&(z.push(G-(t+L+ke)),W!=null)){if(W<=0)return!0;W--}const et=this.getLineHeight(b==="split"?ce:ye,Ae),Yt=Math.floor(ie/g);return G>i-et&&G<a&&(ne??=Yt),J==null&&G+et>D&&(J=Yt),W==null&&G>=a&&Qe&&(W=I),ie++,G+=et,w>0&&f!=="simple"&&(G+=y+j),!1}}),ne==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:S-L-p};const fe=z.length;J??=ne;const ee=Math.round(J-T/2),te=Math.max(0,fe-T),H=Math.max(0,Math.min(ee,te)),X=H*g,oe=ee<0?A+ee*g:A,me=z[H]??0,R=H+oe/g;return{startingLine:X,totalLines:oe,bufferBefore:me,bufferAfter:R<z.length?S-L-z[R]-p:S-(G-t)-p}}};function eO(e){const t=e.hunks.at(-1);return t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0?!1:t.additionLineIndex+t.additionCount<e.additionLines.length||t.deletionLineIndex+t.deletionCount<e.deletionLines.length}function tO(e,t){const[i,a]=e.split(",").map(Number);return t==="split"?a:i}const nO=typeof window>"u"?ae.useEffect:ae.useLayoutEffect;function iO({fileDiff:e,options:t,lineAnnotations:i,selectedLines:a,prerenderedHTML:o,metrics:s,hasGutterRenderUtility:c,hasCustomHeader:f,disableWorkerPool:d}){const p=fD(),g=ae.useContext(KD),y=ae.useRef(null),v=WD(b=>{if(b!=null){if(y.current!=null)throw new Error("useFileDiffInstance: An instance should not already exist when a node is created");p!=null?y.current=new JN(od({hasCustomHeader:f,hasGutterRenderUtility:c,options:t}),p,s,d?void 0:g,!0):y.current=new L1(od({hasCustomHeader:f,hasGutterRenderUtility:c,options:t}),d?void 0:g,!0),y.current.hydrate({fileDiff:e,fileContainer:b,lineAnnotations:i,prerenderedHTML:o})}else{if(y.current==null)throw new Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");y.current.cleanUp(),y.current=null}});return nO(()=>{const{current:b}=y;if(b==null)return;const S=od({hasCustomHeader:f,hasGutterRenderUtility:c,options:t}),k=!DN(b.options,S);b.setOptions(S),b.render({forceRender:k,fileDiff:e,lineAnnotations:i}),a!==void 0&&b.setSelectedLines(a)}),{ref:v,getHoveredLine:ae.useCallback(()=>y.current?.getHoveredLine(),[])}}function od({options:e,hasCustomHeader:t,hasGutterRenderUtility:i}){return i||t?{...e,renderCustomHeader:t?K0:void 0,renderGutterUtility:i?K0:void 0}:e}function rO({fileDiff:e,options:t,metrics:i,lineAnnotations:a,selectedLines:o,className:s,style:c,prerenderedHTML:f,renderAnnotation:d,renderCustomHeader:p,renderHeaderPrefix:g,renderHeaderMetadata:y,renderGutterUtility:v,renderHoverUtility:b,disableWorkerPool:S=!1}){const{ref:k,getHoveredLine:L}=iO({fileDiff:e,options:t,metrics:i,lineAnnotations:a,selectedLines:o,prerenderedHTML:f,hasGutterRenderUtility:v!=null||b!=null,hasCustomHeader:p!=null,disableWorkerPool:S});return $.jsx(Hs,{ref:k,className:s,style:c,children:uD(IN({fileDiff:e,renderCustomHeader:p,renderHeaderPrefix:g,renderHeaderMetadata:y,renderAnnotation:d,renderGutterUtility:v,lineAnnotations:a,renderHoverUtility:b,getHoveredLine:L}),f)})}const aO=ae.memo(function({body:t,onChange:i,onSave:a,onCancel:o}){const s=ae.useRef(null);ae.useEffect(()=>{s.current?.focus()},[]);const c=f=>{f.key==="Enter"&&(f.metaKey||f.ctrlKey)&&(f.preventDefault(),a()),f.key==="Escape"&&(f.preventDefault(),o())};return $.jsxs("div",{className:"comment-editor",children:[$.jsx("textarea",{ref:s,className:"text-input-area comment-input",value:t,onChange:f=>i(f.target.value),onKeyDown:c,placeholder:"Add a comment…",rows:2}),$.jsxs("div",{className:"comment-actions",children:[$.jsx("button",{type:"button",className:"btn ghost",onClick:o,children:"cancel"}),$.jsx("button",{type:"button",className:"btn primary",onClick:a,children:"comment"})]})]})});function mh({additions:e,deletions:t,className:i}){const a=["diff-stats",i].filter(Boolean).join(" ");return $.jsxs("span",{className:a,children:[$.jsxs("span",{className:"stat-add",children:["+",e]}),$.jsxs("span",{className:"stat-del",children:["-",t]})]})}const lO=ae.memo(function({thread:t,onAddReply:i,onRequestAgent:a,onToggleResolved:o,onToggleCollapsed:s}){const[c,f]=ae.useState(!1),[d,p]=ae.useState(""),g=ae.useRef(null),v=t.messages[t.messages.length-1]?.role==="user"&&!t.loading&&!t.resolved,b=t.messages.length,S=`${t.resolved?"Resolved thread":"Thread"} with ${b} comment${b===1?"":"s"}`,k=t.resolved?"reopen":"resolve";ae.useEffect(()=>{c&&g.current?.focus()},[c]);const L=ae.useCallback(()=>{const I=d.trim();I&&(p(""),f(!1),i(I))},[i,d]),C=ae.useCallback(I=>{I.key==="Enter"&&(I.metaKey||I.ctrlKey)&&(I.preventDefault(),L())},[L]),A=ae.useCallback(()=>{o(!t.resolved)},[o,t.resolved]),T=ae.useCallback(()=>{p(""),f(!1)},[]);return t.collapsed?$.jsx("div",{className:`thread-card collapsed${t.resolved?" resolved":""}`,children:$.jsx("div",{className:"thread-collapsed-row",children:$.jsxs("button",{type:"button",className:"thread-toggle",onClick:()=>s(!1),"aria-label":"Expand thread","aria-expanded":!1,children:[$.jsx(wb,{size:14}),$.jsx("span",{className:"thread-summary",children:S})]})})}):$.jsxs("div",{className:`thread-card${t.resolved?" resolved":""}`,children:[$.jsx("div",{className:"thread-header-row",children:$.jsxs("button",{type:"button",className:"thread-toggle",onClick:()=>s(!0),"aria-label":"Collapse thread","aria-expanded":!0,children:[$.jsx(Cb,{size:14}),$.jsx("span",{className:"thread-summary",children:S})]})}),$.jsxs("div",{className:"thread-messages",children:[t.messages.map((I,z)=>{const D=v&&I.role==="user"&&z===t.messages.length-1;return $.jsxs("div",{className:`thread-msg thread-msg-${I.role}`,children:[$.jsx("span",{className:"thread-msg-role",children:I.role==="user"?"you":"agent"}),$.jsx(b1,{content:I.text,className:"thread-msg-text",variant:"thread"}),D&&$.jsx("div",{className:"thread-msg-actions",children:$.jsxs("button",{type:"button",className:"btn",onClick:a,children:[$.jsx($E,{size:14}),"ask agent"]})})]},`${I.role}:${z}:${I.text}`)}),t.loading&&$.jsxs("div",{className:"thread-msg thread-msg-assistant",children:[$.jsx("span",{className:"thread-msg-role",children:"agent"}),$.jsx("span",{className:"thread-msg-thinking",children:"thinking…"})]})]}),$.jsx("div",{className:"thread-footer",children:c?$.jsxs($.Fragment,{children:[$.jsx("textarea",{ref:g,className:"text-input-area thread-reply-input",value:d,onChange:I=>p(I.target.value),onKeyDown:C,placeholder:"Reply…",rows:3}),$.jsxs("div",{className:"thread-actions",children:[$.jsx("button",{type:"button",className:"btn ghost",onClick:T,children:"cancel"}),$.jsx("button",{type:"button",className:"btn primary",disabled:!d.trim(),onClick:L,children:"comment"})]})]}):$.jsxs("div",{className:"thread-actions",children:[$.jsx("button",{type:"button",className:"btn ghost",onClick:A,children:k}),$.jsx("button",{type:"button",className:"btn",onClick:()=>f(!0),children:"reply"})]})})]})}),oO={theme:"github-dark-default",themeType:"dark",diffStyle:"unified",diffIndicators:"none",lineDiffType:"word-alt",disableFileHeader:!0,overflow:"wrap",unsafeCSS:[":host { --diffs-dark-bg: var(--bg); --diffs-bg: var(--bg); font-weight: var(--font-weight-code); }","pre { background-color: var(--bg) !important; --diffs-bg: var(--bg) !important; }","[data-annotation-slot], [data-annotation-content] { font-family: var(--font-family-ui); }","[data-annotation-slot] code, [data-annotation-slot] pre, [data-annotation-content] code, [data-annotation-content] pre { font-family: var(--font-family-code); }","[data-overflow='wrap'] [data-code] { overflow-x: hidden; }","[data-overflow='wrap'] [data-annotation-content] { width: auto; }"].join(" ")},sO=ae.memo(function({file:t,diffStyle:i,overflowMode:a,collapsed:o,viewed:s,annotations:c,unresolvedThreadCount:f,onToggleCollapsed:d,onToggleViewed:p,onLineActivate:g,onDraftChange:y,onSaveDraft:v,onCancelDraft:b,onAddReply:S,onRequestAgent:k,onToggleResolved:L,onToggleThreadCollapsed:C}){const A=ae.useMemo(()=>({...oO,diffStyle:i==="split"?"split":"unified",overflow:a,onLineNumberClick:({lineNumber:z,annotationSide:D})=>{g(t.id,z,D)}}),[i,t.id,g,a]),T=ae.useCallback(I=>{if(I.metadata.type==="draft")return $.jsx(aO,{body:I.metadata.draft.body,onChange:y,onSave:v,onCancel:b});const{thread:z}=I.metadata;return $.jsx(lO,{thread:z,onAddReply:D=>S(z.id,D),onRequestAgent:()=>k(z.id),onToggleResolved:D=>L(z.id,D),onToggleCollapsed:D=>C(z.id,D)})},[S,b,y,k,v,L,C]);return $.jsxs("section",{className:`file-section${o?" collapsed":""}`,id:`file-${t.id}`,children:[$.jsxs("div",{className:"file-header",children:[$.jsxs("button",{type:"button",className:"file-toggle",onClick:()=>d(t.id),"aria-label":o?"Expand file":"Collapse file",children:[o?$.jsx(OE,{size:14}):$.jsx(DE,{size:14}),$.jsx("span",{className:"file-path",children:t.displayPath}),f>0&&$.jsxs("span",{className:"file-thread-count","aria-label":`${f} unresolved comment thread${f===1?"":"s"}`,title:`${f} unresolved comment thread${f===1?"":"s"}`,children:[$.jsx(Ab,{size:12}),$.jsx("span",{children:f})]})]}),$.jsxs("div",{className:"file-meta",children:[$.jsx(mh,{additions:t.additions,deletions:t.deletions}),$.jsxs("button",{type:"button",className:`viewed-btn${s?" checked":""}`,onClick:()=>p(t.id),"aria-label":s?"Mark as not viewed":"Mark as viewed",children:[$.jsx("span",{className:"viewed-check",children:s&&$.jsx(LE,{size:10,strokeWidth:3})}),"viewed"]})]})]}),!o&&$.jsx("div",{className:"file-body",children:$.jsx(rO,{className:"diff-view",fileDiff:t.file,options:A,lineAnnotations:c,renderAnnotation:T})})]})});function uO({open:e,files:t,viewed:i,onJumpToFile:a}){return $.jsx("aside",{className:`sidebar${e?" open":""}`,children:t.map(o=>$.jsx("button",{type:"button",className:`sidebar-item${i[o.id]?" viewed":""}`,onClick:()=>a(o.id),children:$.jsx(cO,{path:o.displayPath,stats:$.jsx(mh,{additions:o.additions,deletions:o.deletions,className:"sidebar-stats"})})},o.id))})}function cO({path:e,stats:t}){const i=ae.useRef(null),a=ae.useRef(null),o=ae.useRef(null),[s,c]=ae.useState(()=>dO(e)),f=ae.useMemo(()=>fO(),[]);return ae.useLayoutEffect(()=>{const d=i.current,p=a.current,g=o.current;if(!d||!p||!g)return;const y=()=>{const b=d.clientWidth,S=g.offsetWidth,L=b-S-8;if(L<=0){c(e);return}const C=window.getComputedStyle(p);c(hO(e,L,C.font,f))};y();const v=new ResizeObserver(y);return v.observe(d),v.observe(g),()=>{v.disconnect()}},[f,e]),$.jsxs("span",{ref:i,className:"sidebar-row",children:[$.jsx("span",{ref:a,className:"sidebar-path",title:e,children:s}),$.jsx("span",{ref:o,children:t})]})}function fO(){const t=document.createElement("canvas").getContext("2d");return(i,a)=>t?(t.font=a,t.measureText(i).width):i.length*8}function dO(e){const t=e.split("/"),i=t.pop()??e;return t.length<=2?e:`${t[0]}/…/${i}`}function hO(e,t,i,a){const o=pO(e);for(const s of o)if(a(s,i)<=t)return s;return o[o.length-1]??e}function pO(e){const t=e.split("/"),i=t.pop()??e,a=t,o=[e];a.length>0&&o.push(`${a.join("/")}/${i}`),a.length>2&&(o.push(`${a[0]}/…/${a.slice(1).join("/")}/${i}`),o.push(`${a[0]}/…/${a.slice(-2).join("/")}/${i}`),o.push(`${a[0]}/…/${i}`),o.push(`${a[0]}/…/${a[a.length-1]}/${i}`)),a.length>0&&(o.push(`…/${i}`),o.push(`…/${a[a.length-1]}/${i}`));const s=mO(i);return a.length>0&&(o.push(`${a[0]}/…/${s}`),o.push(`${a[0]}/…/${a[a.length-1]}/${s}`),o.push(`…/${s}`)),o.push(s),[...new Set(o)]}function mO(e){const t=e.lastIndexOf(".");if(t<=1||t===e.length-1)return e.length<=24?e:`${e.slice(0,20)}…`;const i=e.slice(0,t),a=e.slice(t);return i.length<=18?e:`${i.slice(0,14)}…${a}`}function gO({value:e,options:t,onChange:i}){return $.jsx("div",{className:"toggle-group",role:"radiogroup",children:t.map(a=>$.jsx("button",{type:"button",role:"radio","aria-checked":e===a.value,className:`toggle-group-item${e===a.value?" active":""}`,onClick:()=>i(a.value),children:a.label},a.value))})}function yO({fileCount:e,viewedCount:t,additions:i,deletions:a,commentCount:o,diffCommand:s,diffStyle:c,overflowMode:f,sidebarOpen:d,finished:p,status:g,briefLoading:y,hasBrief:v,onBriefClick:b,onToggleSidebar:S,onExpandAll:k,onExpandUnresolved:L,onCollapseViewed:C,onCollapseAll:A,onDiffStyleChange:T,onOverflowModeChange:I,onSubmit:z,onCancel:D}){const j=c==="split"?"split":"stacked",G=f==="scroll"?"scroll":"wrap",ie=e>0?Math.round(t/e*100):0;return $.jsxs("header",{className:"top-bar",children:[$.jsxs("div",{className:"top-bar-left",children:[$.jsx(aa,{icon:BE,label:"Toggle file list",className:d?"active":"",onClick:S}),$.jsxs("button",{type:"button",className:"btn top-bar-action top-bar-brief-action",onClick:b,disabled:y,children:[$.jsx(VE,{size:14}),y?"generating brief…":v?"view brief":"brief"]}),$.jsxs("div",{className:"top-bar-diff-meta","aria-label":`${i} additions and ${a} deletions${s?`, ${s}`:""}`,children:[$.jsx(mh,{additions:i,deletions:a}),s&&$.jsx("span",{className:"top-bar-meta top-bar-meta-dim top-bar-diff-command",children:s})]})]}),$.jsxs("div",{className:"top-bar-right",children:[$.jsxs("div",{className:"top-bar-viewed","aria-label":`${t} of ${e} viewed, ${o} unresolved comments`,children:[$.jsx("span",{className:"top-bar-viewed-ring",style:{background:`conic-gradient(var(--accent-add) ${ie}%, var(--border) ${ie}% 100%)`},"aria-hidden":"true",children:$.jsx("span",{className:"top-bar-viewed-ring-inner"})}),$.jsxs("span",{className:"top-bar-viewed-text",children:[t," of ",e," viewed"]})]}),g&&$.jsx("span",{className:"top-bar-meta top-bar-status",children:g}),$.jsxs("div",{className:"btn-group",children:[$.jsx(aa,{icon:wb,label:"Expand all files",onClick:k}),$.jsx(aa,{icon:Ab,label:"Expand files with unresolved threads",onClick:L,disabled:o===0}),$.jsx(aa,{icon:UE,label:"Collapse viewed files",onClick:C}),$.jsx(aa,{icon:Cb,label:"Collapse all files",onClick:A})]}),$.jsxs("button",{type:"button",className:`top-bar-toggle${G==="wrap"?" active":""}`,onClick:()=>I(G==="wrap"?"scroll":"wrap"),"aria-pressed":G==="wrap","aria-label":"Toggle wrapped diff lines",children:[$.jsx("span",{className:"top-bar-toggle-switch","aria-hidden":"true",children:$.jsx("span",{className:"top-bar-toggle-thumb"})}),$.jsx("span",{className:"top-bar-toggle-label",children:"wrap"})]}),$.jsx(gO,{value:j,options:[{value:"split",label:"split"},{value:"stacked",label:"stacked"}],onChange:T}),$.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-primary",onClick:z,disabled:p,children:"submit"}),$.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-cancel",onClick:D,disabled:p,"aria-label":"cancel",children:$.jsx(kb,{size:14,strokeWidth:2.25})})]})]})}function bO(e,t,i){if(!e.trim())return[];const a=XN(e,i),o=vO(t);let s=0;return a.flatMap(c=>c.files.map(f=>{const d=_O(f,o);return{id:f.cacheKey??`${f.name}::${s++}`,file:f,displayPath:d.displayPath,oldRepoPath:d.oldRepoPath,newRepoPath:d.newRepoPath,additions:Sb(f,"additions"),deletions:Sb(f,"deletions")}}))}function Sb(e,t){return e.hunks.reduce((i,a)=>i+a.hunkContent.reduce((o,s)=>o+(s.type==="change"?s[t]:0),0),0)}function vO(e){const t=new Map;for(const i of e??[]){const a={displayPath:i.oldPath&&i.newPath&&i.oldPath!==i.newPath?`${i.oldPath} → ${i.newPath}`:i.path,oldRepoPath:i.oldPath,newRepoPath:i.newPath??i.path};t.set(i.path,a),i.newPath&&t.set(i.newPath,a),i.oldPath&&t.set(i.oldPath,a)}return t}function _O(e,t){const i=t.get(e.name)||(e.prevName?t.get(e.prevName):void 0);return i||{displayPath:e.prevName&&e.prevName!==e.name?`${e.prevName} → ${e.name}`:e.name,oldRepoPath:e.prevName,newRepoPath:e.name}}const SO=[];function EO(){const[e,t]=ae.useState(null),[i,a]=ae.useState(null),[o,s]=ae.useState(dE),[c,f]=ae.useState(null),[d,p]=ae.useState(!1),[g,y]=ae.useState(""),[v,b]=ae.useState(!1),S=ae.useRef(null),k=ae.useCallback(ue=>{s(hE(ue))},[]),L=ae.useCallback(async(ue,Te={})=>{try{const je=await ue;k(je.state)}catch(je){Te.onError?.(),y(je instanceof Error?je.message:String(je))}},[k]),C=ae.useCallback((ue,Te)=>{L(iE(ue),Te)},[L]),A=ae.useCallback((ue,Te)=>{s(je=>vE(je,ue,Te))},[]),T=ae.useCallback(ue=>{s(Te=>_E(Te,ue))},[]);ae.useEffect(()=>{let ue=!0;return(async()=>{try{const je=await tE();if(!je.state)throw new Error("diff tool bootstrap response did not include review state");if(!ue)return;t(je),k(je.state);const It=await nE();ue&&a(It)}catch(je){ue&&y(je instanceof Error?je.message:String(je))}})(),()=>{ue=!1}},[k]);const I=i&&"patch"in i?i.patch:"",z=ae.useMemo(()=>bO(I,e?.files,e?.context.sessionId),[I,e]),D=ae.useMemo(()=>Ey(o.collapsedFileIds),[o.collapsedFileIds]),j=ae.useMemo(()=>Ey(o.viewedFileIds),[o.viewedFileIds]),G=ae.useMemo(()=>o.threads.filter(ue=>!ue.resolved),[o.threads]),ie=G.length,ne=ae.useMemo(()=>Ef(G.map(ue=>ue.fileId)),[G]),J=ae.useMemo(()=>yE(G),[G]),W=o.brief.content.trim().length>0,fe=ae.useMemo(()=>z.reduce(mE,{additions:0,deletions:0}),[z]),ee=ae.useCallback((ue,Te="smooth")=>{document.getElementById(`file-${ue}`)?.scrollIntoView({behavior:Te,block:"start"})},[]),te=ae.useCallback(ue=>{C({collapsedFileIds:xy(o.collapsedFileIds,ue)})},[C,o.collapsedFileIds]),H=ae.useCallback(ue=>{const Te=xy(o.viewedFileIds,ue),je=Te.includes(ue),It=je?Ef([...o.collapsedFileIds,ue]):o.collapsedFileIds;S.current=je&&!o.collapsedFileIds.includes(ue)?pE(z,ue):null,C({viewedFileIds:Te,collapsedFileIds:It},{onError:()=>{S.current=null}})},[C,z,o.collapsedFileIds,o.viewedFileIds]),X=ae.useCallback(()=>{C({collapsedFileIds:[]})},[C]),oe=ae.useCallback(()=>{C({collapsedFileIds:z.map(ue=>ue.id)})},[C,z]),me=ae.useCallback(()=>{if(ne.length===0)return;const ue=new Set(ne);C({collapsedFileIds:o.collapsedFileIds.filter(Te=>!ue.has(Te))})},[C,ne,o.collapsedFileIds]),R=ae.useCallback(()=>{C({collapsedFileIds:Ef([...o.collapsedFileIds,...o.viewedFileIds])})},[C,o.collapsedFileIds,o.viewedFileIds]);ae.useLayoutEffect(()=>{const ue=S.current;ue&&(S.current=null,ee(ue,"auto"))},[o.collapsedFileIds,ee]);const O=ae.useCallback((ue,Te,je)=>{f(It=>It&&It.fileId===ue&&It.lineNumber===Te&&It.side===je?It:{fileId:ue,lineNumber:Te,side:je,body:""})},[]),F=ae.useCallback(ue=>{f(Te=>Te&&{...Te,body:ue})},[]),w=ae.useCallback(()=>{if(!c)return;const ue=c.body.trim();if(!ue){f(null);return}L(rE({fileId:c.fileId,filePath:SE(c,z),lineNumber:c.lineNumber,side:c.side,body:ue}).then(Te=>(f(null),Te)))},[c,z,L]),le=ae.useCallback(()=>f(null),[]),he=ae.useCallback((ue,Te)=>{L(aE({id:ue,text:Te}))},[L]),ce=ae.useCallback(ue=>{y(""),A(ue,!0),L(lE(ue),{onError:()=>{A(ue,!1)}})},[A,L]),ye=ae.useCallback(()=>{y(""),T(!0),L(uE(),{onError:()=>{T(!1)}})},[T,L]),Ae=ae.useCallback((ue,Te)=>{L(oE({id:ue,resolved:Te}))},[L]),ke=ae.useCallback((ue,Te)=>{L(sE({id:ue,collapsed:Te}))},[L]),Qe=ae.useMemo(()=>gE(o.threads),[o.threads]),et=ae.useMemo(()=>c?{lineNumber:c.lineNumber,side:c.side,metadata:{type:"draft",draft:c}}:null,[c]),Yt=ae.useCallback(async()=>{p(!0),y("Returning review…");try{await cE(),y("Review returned. You can close this tab.")}catch(ue){p(!1),y(ue instanceof Error?ue.message:String(ue))}},[]),Et=ae.useCallback(async()=>{p(!0),y("Cancelling…");try{await fE(),y("Cancelled. You can close this tab.")}catch(ue){p(!1),y(ue instanceof Error?ue.message:String(ue))}},[]),vn=ae.useCallback(()=>{if(W){b(!0);return}ye()},[W,ye]);return $.jsxs($.Fragment,{children:[$.jsxs("div",{className:`app${o.sidebarOpen?" sidebar-open":""}`,children:[$.jsx(yO,{fileCount:z.length,viewedCount:o.viewedFileIds.length,additions:fe.additions,deletions:fe.deletions,commentCount:ie,diffCommand:e?.context.diffCommand,diffStyle:o.diffStyle,overflowMode:o.overflowMode,sidebarOpen:o.sidebarOpen,finished:d,status:g,briefLoading:o.brief.loading,hasBrief:W,onBriefClick:vn,onToggleSidebar:()=>{C({sidebarOpen:!o.sidebarOpen})},onExpandAll:X,onExpandUnresolved:me,onCollapseViewed:R,onCollapseAll:oe,onDiffStyleChange:ue=>{C({diffStyle:ue})},onOverflowModeChange:ue=>{C({overflowMode:ue})},onSubmit:Yt,onCancel:Et}),$.jsx(uO,{open:o.sidebarOpen,files:z,viewed:j,onJumpToFile:ee}),$.jsxs("main",{className:"content",children:[z.length===0&&$.jsx("div",{className:"empty",children:g||"loading…"}),z.map(ue=>{const Te=Qe.get(ue.id)??SO,je=bE(Te,ue.id,c,et);return $.jsx(sO,{file:ue,diffStyle:o.diffStyle,overflowMode:o.overflowMode,collapsed:D[ue.id]??!1,viewed:j[ue.id]??!1,annotations:je,unresolvedThreadCount:J.get(ue.id)??0,onToggleCollapsed:te,onToggleViewed:H,onLineActivate:O,onDraftChange:F,onSaveDraft:w,onCancelDraft:le,onAddReply:he,onRequestAgent:ce,onToggleResolved:Ae,onToggleThreadCollapsed:ke},ue.id)})]})]}),$.jsx(ZR,{open:v,content:o.brief.content,loading:o.brief.loading,onClose:()=>b(!1)})]})}JS.createRoot(document.getElementById("root")).render($.jsx(ae.StrictMode,{children:$.jsx(EO,{})}));