@markusylisiurunen/tau 0.2.119 → 0.2.121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +10 -8
  2. package/dist/core/cli.js +1 -1
  3. package/dist/core/config/schema.js +80 -0
  4. package/dist/core/config/schema.js.map +1 -1
  5. package/dist/core/personas.js +4 -4
  6. package/dist/core/utils/project_files.js +39 -92
  7. package/dist/core/utils/project_files.js.map +1 -1
  8. package/dist/core/version.js +1 -1
  9. package/dist/diff_tool/app/dist/assets/index-BwEyvVod.css +1 -0
  10. package/dist/diff_tool/app/dist/assets/index-CFfllSc9.js +258 -0
  11. package/dist/diff_tool/app/dist/assets/pierre-dark-Dy3oF52j.js +1 -0
  12. package/dist/diff_tool/app/dist/assets/pierre-dark-soft-K7D5SChL.js +1 -0
  13. package/dist/diff_tool/app/dist/assets/pierre-light-DhMpYZcV.js +1 -0
  14. package/dist/diff_tool/app/dist/assets/pierre-light-soft-cPlVRKcQ.js +1 -0
  15. package/dist/diff_tool/app/dist/index.html +2 -2
  16. package/dist/diff_tool/http_server.js +22 -7
  17. package/dist/diff_tool/http_server.js.map +1 -1
  18. package/dist/diff_tool/index.js +1 -1
  19. package/dist/diff_tool/index.js.map +1 -1
  20. package/dist/diff_tool/launcher.js +2 -0
  21. package/dist/diff_tool/launcher.js.map +1 -1
  22. package/dist/diff_tool/protocol_client.js +7 -0
  23. package/dist/diff_tool/protocol_client.js.map +1 -1
  24. package/dist/diff_tool/review_state.js +25 -11
  25. package/dist/diff_tool/review_state.js.map +1 -1
  26. package/dist/diff_tool/shared_types.js +48 -1
  27. package/dist/diff_tool/shared_types.js.map +1 -1
  28. package/dist/main.js +1 -0
  29. package/dist/main.js.map +1 -1
  30. package/package.json +3 -3
  31. package/dist/diff_tool/app/dist/assets/index-BuEYkrDR.css +0 -1
  32. package/dist/diff_tool/app/dist/assets/index-Cpuc6JJD.js +0 -252
  33. package/dist/diff_tool/app/dist/assets/pierre-dark-DF2SEV7i.js +0 -1
  34. package/dist/diff_tool/app/dist/assets/pierre-light-DOlZxES8.js +0 -1
@@ -0,0 +1,258 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DMxchsRu.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-DzOHUlBM.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 pv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zd={exports:{}},Ll={};var Qy;function $E(){if(Qy)return Ll;Qy=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 Ll.Fragment=t,Ll.jsx=i,Ll.jsxs=i,Ll}var Zy;function FE(){return Zy||(Zy=1,zd.exports=$E()),zd.exports}var I=FE(),Hd={exports:{}},Ce={};var Ky;function qE(){if(Ky)return Ce;Ky=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"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function v(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,D={};function x(O,X,A){this.props=O,this.context=X,this.refs=D,this.updater=A||S}x.prototype.isReactComponent={},x.prototype.setState=function(O,X){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,X,"setState")},x.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function T(){}T.prototype=x.prototype;function k(O,X,A){this.props=O,this.context=X,this.refs=D,this.updater=A||S}var U=k.prototype=new T;U.constructor=k,w(U,x.prototype),U.isPureReactComponent=!0;var z=Array.isArray;function R(){}var F={H:null,A:null,T:null,S:null},le=Object.prototype.hasOwnProperty;function V(O,X,A){var ce=A.ref;return{$$typeof:e,type:O,key:X,ref:ce!==void 0?ce:null,props:A}}function se(O,X){return V(O.type,X,O.props)}function Z(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function K(O){var X={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(A){return X[A]})}var W=/\/+/g;function ie(O,X){return typeof O=="object"&&O!==null&&O.key!=null?K(""+O.key):X.toString(36)}function q(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(R,R):(O.status="pending",O.then(function(X){O.status==="pending"&&(O.status="fulfilled",O.value=X)},function(X){O.status==="pending"&&(O.status="rejected",O.reason=X)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function H(O,X,A,ce,me){var he=typeof O;(he==="undefined"||he==="boolean")&&(O=null);var Se=!1;if(O===null)Se=!0;else switch(he){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(O.$$typeof){case e:case t:Se=!0;break;case y:return Se=O._init,H(Se(O._payload),X,A,ce,me)}}if(Se)return me=me(O),Se=ce===""?"."+ie(O,0):ce,z(me)?(A="",Se!=null&&(A=Se.replace(W,"$&/")+"/"),H(me,X,A,"",function(He){return He})):me!=null&&(Z(me)&&(me=se(me,A+(me.key==null||O&&O.key===me.key?"":(""+me.key).replace(W,"$&/")+"/")+Se)),X.push(me)),1;Se=0;var Oe=ce===""?".":ce+":";if(z(O))for(var be=0;be<O.length;be++)ce=O[be],he=Oe+ie(ce,be),Se+=H(ce,X,A,he,me);else if(be=v(O),typeof be=="function")for(O=be.call(O),be=0;!(ce=O.next()).done;)ce=ce.value,he=Oe+ie(ce,be++),Se+=H(ce,X,A,he,me);else if(he==="object"){if(typeof O.then=="function")return H(q(O),X,A,ce,me);throw X=String(O),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return Se}function G(O,X,A){if(O==null)return O;var ce=[],me=0;return H(O,ce,"","",function(he){return X.call(A,he,me++)}),ce}function ae(O){if(O._status===-1){var X=O._result;X=X(),X.then(function(A){(O._status===0||O._status===-1)&&(O._status=1,O._result=A)},function(A){(O._status===0||O._status===-1)&&(O._status=2,O._result=A)}),O._status===-1&&(O._status=0,O._result=X)}if(O._status===1)return O._result.default;throw O._result}var fe=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=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(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},L={map:G,forEach:function(O,X,A){G(O,function(){X.apply(this,arguments)},A)},count:function(O){var X=0;return G(O,function(){X++}),X},toArray:function(O){return G(O,function(X){return X})||[]},only:function(O){if(!Z(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Ce.Activity=g,Ce.Children=L,Ce.Component=x,Ce.Fragment=i,Ce.Profiler=o,Ce.PureComponent=k,Ce.StrictMode=a,Ce.Suspense=d,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(O){return F.H.useMemoCache(O)}},Ce.cache=function(O){return function(){return O.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(O,X,A){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var ce=w({},O.props),me=O.key;if(X!=null)for(he in X.key!==void 0&&(me=""+X.key),X)!le.call(X,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&X.ref===void 0||(ce[he]=X[he]);var he=arguments.length-2;if(he===1)ce.children=A;else if(1<he){for(var Se=Array(he),Oe=0;Oe<he;Oe++)Se[Oe]=arguments[Oe+2];ce.children=Se}return V(O.type,me,ce)},Ce.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},Ce.createElement=function(O,X,A){var ce,me={},he=null;if(X!=null)for(ce in X.key!==void 0&&(he=""+X.key),X)le.call(X,ce)&&ce!=="key"&&ce!=="__self"&&ce!=="__source"&&(me[ce]=X[ce]);var Se=arguments.length-2;if(Se===1)me.children=A;else if(1<Se){for(var Oe=Array(Se),be=0;be<Se;be++)Oe[be]=arguments[be+2];me.children=Oe}if(O&&O.defaultProps)for(ce in Se=O.defaultProps,Se)me[ce]===void 0&&(me[ce]=Se[ce]);return V(O,he,me)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(O){return{$$typeof:f,render:O}},Ce.isValidElement=Z,Ce.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:ae}},Ce.memo=function(O,X){return{$$typeof:h,type:O,compare:X===void 0?null:X}},Ce.startTransition=function(O){var X=F.T,A={};F.T=A;try{var ce=O(),me=F.S;me!==null&&me(A,ce),typeof ce=="object"&&ce!==null&&typeof ce.then=="function"&&ce.then(R,fe)}catch(he){fe(he)}finally{X!==null&&A.types!==null&&(X.types=A.types),F.T=X}},Ce.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},Ce.use=function(O){return F.H.use(O)},Ce.useActionState=function(O,X,A){return F.H.useActionState(O,X,A)},Ce.useCallback=function(O,X){return F.H.useCallback(O,X)},Ce.useContext=function(O){return F.H.useContext(O)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(O,X){return F.H.useDeferredValue(O,X)},Ce.useEffect=function(O,X){return F.H.useEffect(O,X)},Ce.useEffectEvent=function(O){return F.H.useEffectEvent(O)},Ce.useId=function(){return F.H.useId()},Ce.useImperativeHandle=function(O,X,A){return F.H.useImperativeHandle(O,X,A)},Ce.useInsertionEffect=function(O,X){return F.H.useInsertionEffect(O,X)},Ce.useLayoutEffect=function(O,X){return F.H.useLayoutEffect(O,X)},Ce.useMemo=function(O,X){return F.H.useMemo(O,X)},Ce.useOptimistic=function(O,X){return F.H.useOptimistic(O,X)},Ce.useReducer=function(O,X,A){return F.H.useReducer(O,X,A)},Ce.useRef=function(O){return F.H.useRef(O)},Ce.useState=function(O){return F.H.useState(O)},Ce.useSyncExternalStore=function(O,X,A){return F.H.useSyncExternalStore(O,X,A)},Ce.useTransition=function(){return F.H.useTransition()},Ce.version="19.2.6",Ce}var Wy;function bh(){return Wy||(Wy=1,Hd.exports=qE()),Hd.exports}var ne=bh(),Ud={exports:{}},Rl={},Pd={exports:{}},Bd={};var Jy;function YE(){return Jy||(Jy=1,(function(e){function t(H,G){var ae=H.length;H.push(G);e:for(;0<ae;){var fe=ae-1>>>1,L=H[fe];if(0<o(L,G))H[fe]=G,H[ae]=L,ae=fe;else break e}}function i(H){return H.length===0?null:H[0]}function a(H){if(H.length===0)return null;var G=H[0],ae=H.pop();if(ae!==G){H[0]=ae;e:for(var fe=0,L=H.length,O=L>>>1;fe<O;){var X=2*(fe+1)-1,A=H[X],ce=X+1,me=H[ce];if(0>o(A,ae))ce<L&&0>o(me,A)?(H[fe]=me,H[ce]=ae,fe=ce):(H[fe]=A,H[X]=ae,fe=X);else if(ce<L&&0>o(me,ae))H[fe]=me,H[ce]=ae,fe=ce;else break e}}return G}function o(H,G){var ae=H.sortIndex-G.sortIndex;return ae!==0?ae:H.id-G.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=[],h=[],y=1,g=null,b=3,v=!1,S=!1,w=!1,D=!1,x=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function U(H){for(var G=i(h);G!==null;){if(G.callback===null)a(h);else if(G.startTime<=H)a(h),G.sortIndex=G.expirationTime,t(d,G);else break;G=i(h)}}function z(H){if(w=!1,U(H),!S)if(i(d)!==null)S=!0,R||(R=!0,K());else{var G=i(h);G!==null&&q(z,G.startTime-H)}}var R=!1,F=-1,le=5,V=-1;function se(){return D?!0:!(e.unstable_now()-V<le)}function Z(){if(D=!1,R){var H=e.unstable_now();V=H;var G=!0;try{e:{S=!1,w&&(w=!1,T(F),F=-1),v=!0;var ae=b;try{t:{for(U(H),g=i(d);g!==null&&!(g.expirationTime>H&&se());){var fe=g.callback;if(typeof fe=="function"){g.callback=null,b=g.priorityLevel;var L=fe(g.expirationTime<=H);if(H=e.unstable_now(),typeof L=="function"){g.callback=L,U(H),G=!0;break t}g===i(d)&&a(d),U(H)}else a(d);g=i(d)}if(g!==null)G=!0;else{var O=i(h);O!==null&&q(z,O.startTime-H),G=!1}}break e}finally{g=null,b=ae,v=!1}G=void 0}}finally{G?K():R=!1}}}var K;if(typeof k=="function")K=function(){k(Z)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,ie=W.port2;W.port1.onmessage=Z,K=function(){ie.postMessage(null)}}else K=function(){x(Z,0)};function q(H,G){F=x(function(){H(e.unstable_now())},G)}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"):le=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 G=3;break;default:G=b}var ae=b;b=G;try{return H()}finally{b=ae}},e.unstable_requestPaint=function(){D=!0},e.unstable_runWithPriority=function(H,G){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var ae=b;b=H;try{return G()}finally{b=ae}},e.unstable_scheduleCallback=function(H,G,ae){var fe=e.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?fe+ae:fe):ae=fe,H){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=ae+L,H={id:y++,callback:G,priorityLevel:H,startTime:ae,expirationTime:L,sortIndex:-1},ae>fe?(H.sortIndex=ae,t(h,H),i(d)===null&&H===i(h)&&(w?(T(F),F=-1):w=!0,q(z,ae-fe))):(H.sortIndex=L,t(d,H),S||v||(S=!0,R||(R=!0,K()))),H},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(H){var G=b;return function(){var ae=b;b=G;try{return H.apply(this,arguments)}finally{b=ae}}}})(Bd)),Bd}var e0;function XE(){return e0||(e0=1,Pd.exports=YE()),Pd.exports}var jd={exports:{}},Ht={};var t0;function QE(){if(t0)return Ht;t0=1;var e=bh();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+d+"; visit "+h+" 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,h,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:d,containerInfo:h,implementation:y}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Ht.createPortal=function(d,h){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return s(d,h,null,y)},Ht.flushSync=function(d){var h=c.T,y=a.p;try{if(c.T=null,a.p=2,d)return d()}finally{c.T=h,a.p=y,a.d.f()}},Ht.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(d,h))},Ht.prefetchDNS=function(d){typeof d=="string"&&a.d.D(d)},Ht.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var y=h.as,g=f(y,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?a.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:v}):y==="script"&&a.d.X(d,{crossOrigin:g,integrity:b,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Ht.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=f(h.as,h.crossOrigin);a.d.M(d,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(d)},Ht.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,g=f(y,h.crossOrigin);a.d.L(d,y,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Ht.preloadModule=function(d,h){if(typeof d=="string")if(h){var y=f(h.as,h.crossOrigin);a.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(d)},Ht.requestFormReset=function(d){a.d.r(d)},Ht.unstable_batchedUpdates=function(d,h){return d(h)},Ht.useFormState=function(d,h,y){return c.H.useFormState(d,h,y)},Ht.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ht.version="19.2.6",Ht}var n0;function ZE(){if(n0)return jd.exports;n0=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(),jd.exports=QE(),jd.exports}var i0;function KE(){if(i0)return Rl;i0=1;var e=XE(),t=bh(),i=ZE();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 h(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 p=l.return;if(p===null)break;var m=p.alternate;if(m===null){if(u=p.return,u!==null){l=u;continue}break}if(p.child===m.child){for(m=p.child;m;){if(m===l)return d(p),n;if(m===u)return d(p),r;m=m.sibling}throw Error(a(188))}if(l.return!==u.return)l=p,u=m;else{for(var _=!1,E=p.child;E;){if(E===l){_=!0,l=p,u=m;break}if(E===u){_=!0,u=p,l=m;break}E=E.sibling}if(!_){for(E=m.child;E;){if(E===l){_=!0,l=m,u=p;break}if(E===u){_=!0,u=m,l=p;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 y(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=y(n),r!==null)return r;n=n.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),k=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),se=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function K(n){return n===null||typeof n!="object"?null:(n=Z&&n[Z]||n["@@iterator"],typeof n=="function"?n:null)}var W=Symbol.for("react.client.reference");function ie(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===W?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case w:return"Fragment";case x:return"Profiler";case D:return"StrictMode";case z:return"Suspense";case R:return"SuspenseList";case V:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case k:return n.displayName||"Context";case T:return(n._context.displayName||"Context")+".Consumer";case U:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case F:return r=n.displayName||null,r!==null?r:ie(n.type)||"Memo";case le:r=n._payload,n=n._init;try{return ie(n(r))}catch{}}return null}var q=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},fe=[],L=-1;function O(n){return{current:n}}function X(n){0>L||(n.current=fe[L],fe[L]=null,L--)}function A(n,r){L++,fe[L]=n.current,n.current=r}var ce=O(null),me=O(null),he=O(null),Se=O(null);function Oe(n,r){switch(A(he,r),A(me,n),A(ce,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?by(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=by(r),n=vy(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}X(ce),A(ce,n)}function be(){X(ce),X(me),X(he)}function He(n){n.memoizedState!==null&&A(Se,n);var r=ce.current,l=vy(r,n.type);r!==l&&(A(me,n),A(ce,l))}function tt(n){me.current===n&&(X(ce),X(me)),Se.current===n&&(X(Se),wl._currentValue=ae)}var At,jt;function ut(n){if(At===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);At=r&&r[1]||"",jt=-1<l.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+At+n+jt}var An=!1;function gt(n,r){if(!n||An)return"";An=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var te=function(){throw Error()};if(Object.defineProperty(te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(te,[])}catch(Y){var $=Y}Reflect.construct(n,[],te)}else{try{te.call()}catch(Y){$=Y}n.call(te.prototype)}}else{try{throw Error()}catch(Y){$=Y}(te=n())&&typeof te.catch=="function"&&te.catch(function(){})}}catch(Y){if(Y&&$&&typeof Y.stack=="string")return[Y.stack,$.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=u.DetermineComponentFrameRoot(),_=m[0],E=m[1];if(_&&E){var N=_.split(`
5
+ `),j=E.split(`
6
+ `);for(p=u=0;u<N.length&&!N[u].includes("DetermineComponentFrameRoot");)u++;for(;p<j.length&&!j[p].includes("DetermineComponentFrameRoot");)p++;if(u===N.length||p===j.length)for(u=N.length-1,p=j.length-1;1<=u&&0<=p&&N[u]!==j[p];)p--;for(;1<=u&&0<=p;u--,p--)if(N[u]!==j[p]){if(u!==1||p!==1)do if(u--,p--,0>p||N[u]!==j[p]){var Q=`
7
+ `+N[u].replace(" at new "," at ");return n.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",n.displayName)),Q}while(1<=u&&0<=p);break}}}finally{An=!1,Error.prepareStackTrace=l}return(l=n?n.displayName||n.name:"")?ut(l):""}function Cr(n,r){switch(n.tag){case 26:case 27:case 5:return ut(n.type);case 16:return ut("Lazy");case 13:return n.child!==r&&r!==null?ut("Suspense Fallback"):ut("Suspense");case 19:return ut("SuspenseList");case 0:case 15:return gt(n.type,!1);case 11:return gt(n.type.render,!1);case 1:return gt(n.type,!0);case 31:return ut("Activity");default:return""}}function wr(n){try{var r="",l=null;do r+=Cr(n,l),l=n,n=n.return;while(n);return r}catch(u){return`
8
+ Error generating stack: `+u.message+`
9
+ `+u.stack}}var _i=Object.prototype.hasOwnProperty,Si=e.unstable_scheduleCallback,Ki=e.unstable_cancelCallback,Ha=e.unstable_shouldYield,kr=e.unstable_requestPaint,yt=e.unstable_now,Ua=e.unstable_getCurrentPriorityLevel,J=e.unstable_ImmediatePriority,ue=e.unstable_UserBlockingPriority,_e=e.unstable_NormalPriority,Re=e.unstable_LowPriority,Ue=e.unstable_IdlePriority,Mt=e.log,dn=e.unstable_setDisableYieldValue,Tt=null,at=null;function It(n){if(typeof Mt=="function"&&dn(n),at&&typeof at.setStrictMode=="function")try{at.setStrictMode(Tt,n)}catch{}}var Ge=Math.clz32?Math.clz32:Cu,Hn=Math.log,zt=Math.LN2;function Cu(n){return n>>>=0,n===0?32:31-(Hn(n)/zt|0)|0}var Ar=256,Tr=262144,Lr=4194304;function re(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 ge(n,r,l){var u=n.pendingLanes;if(u===0)return 0;var p=0,m=n.suspendedLanes,_=n.pingedLanes;n=n.warmLanes;var E=u&134217727;return E!==0?(u=E&~m,u!==0?p=re(u):(_&=E,_!==0?p=re(_):l||(l=E&~n,l!==0&&(p=re(l))))):(E=u&~m,E!==0?p=re(E):_!==0?p=re(_):l||(l=u&~n,l!==0&&(p=re(l)))),p===0?0:r!==0&&r!==p&&(r&m)===0&&(m=p&-p,l=r&-r,m>=l||m===32&&(l&4194048)!==0)?r:p}function xe(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function We(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 Tn(){var n=Lr;return Lr<<=1,(Lr&62914560)===0&&(Lr=4194304),n}function Un(n){for(var r=[],l=0;31>l;l++)r.push(n);return r}function Pa(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function N_(n,r,l,u,p,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,j=n.hiddenUpdates;for(l=_&~l;0<l;){var Q=31-Ge(l),te=1<<Q;E[Q]=0,N[Q]=-1;var $=j[Q];if($!==null)for(j[Q]=null,Q=0;Q<$.length;Q++){var Y=$[Q];Y!==null&&(Y.lane&=-536870913)}l&=~te}u!==0&&ep(n,u,0),m!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=m&~(_&~r))}function ep(n,r,l){n.pendingLanes|=r,n.suspendedLanes&=~r;var u=31-Ge(r);n.entangledLanes|=r,n.entanglements[u]=n.entanglements[u]|1073741824|l&261930}function tp(n,r){var l=n.entangledLanes|=r;for(n=n.entanglements;l;){var u=31-Ge(l),p=1<<u;p&r|n[u]&r&&(n[u]|=r),l&=~p}}function np(n,r){var l=r&-r;return l=(l&42)!==0?1:wu(l),(l&(n.suspendedLanes|r))!==0?0:l}function wu(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 ku(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function ip(){var n=G.p;return n!==0?n:(n=window.event,n===void 0?32:Vy(n.type))}function rp(n,r){var l=G.p;try{return G.p=n,r()}finally{G.p=l}}var Ei=Math.random().toString(36).slice(2),Lt="__reactFiber$"+Ei,Gt="__reactProps$"+Ei,Rr="__reactContainer$"+Ei,Au="__reactEvents$"+Ei,O_="__reactListeners$"+Ei,M_="__reactHandles$"+Ei,ap="__reactResources$"+Ei,Ba="__reactMarker$"+Ei;function Tu(n){delete n[Lt],delete n[Gt],delete n[Au],delete n[O_],delete n[M_]}function Dr(n){var r=n[Lt];if(r)return r;for(var l=n.parentNode;l;){if(r=l[Rr]||l[Lt]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(n=ky(n);n!==null;){if(l=n[Lt])return l;n=ky(n)}return r}n=l,l=n.parentNode}return null}function Nr(n){if(n=n[Lt]||n[Rr]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function ja(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function Or(n){var r=n[ap];return r||(r=n[ap]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function xt(n){n[Ba]=!0}var lp=new Set,op={};function Wi(n,r){Mr(n,r),Mr(n+"Capture",r)}function Mr(n,r){for(op[n]=r,n=0;n<r.length;n++)lp.add(r[n])}var I_=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]*$"),sp={},up={};function z_(n){return _i.call(up,n)?!0:_i.call(sp,n)?!1:I_.test(n)?up[n]=!0:(sp[n]=!0,!1)}function so(n,r,l){if(z_(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 uo(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 Kn(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 fn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function cp(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function H_(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 p=u.get,m=u.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return p.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 Lu(n){if(!n._valueTracker){var r=cp(n)?"checked":"value";n._valueTracker=H_(n,r,""+n[r])}}function dp(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return n&&(u=cp(n)?n.checked?"true":"false":n.value),n=u,n!==l?(r.setValue(n),!0):!1}function co(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 U_=/[\n"\\]/g;function hn(n){return n.replace(U_,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Ru(n,r,l,u,p,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=""+fn(r)):n.value!==""+fn(r)&&(n.value=""+fn(r)):_!=="submit"&&_!=="reset"||n.removeAttribute("value"),r!=null?Du(n,_,fn(r)):l!=null?Du(n,_,fn(l)):u!=null&&n.removeAttribute("value"),p==null&&m!=null&&(n.defaultChecked=!!m),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?n.name=""+fn(E):n.removeAttribute("name")}function fp(n,r,l,u,p,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)){Lu(n);return}l=l!=null?""+fn(l):"",r=r!=null?""+fn(r):l,E||r===n.value||(n.value=r),n.defaultValue=r}u=u??p,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=_),Lu(n)}function Du(n,r,l){r==="number"&&co(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function Ir(n,r,l,u){if(n=n.options,r){r={};for(var p=0;p<l.length;p++)r["$"+l[p]]=!0;for(l=0;l<n.length;l++)p=r.hasOwnProperty("$"+n[l].value),n[l].selected!==p&&(n[l].selected=p),p&&u&&(n[l].defaultSelected=!0)}else{for(l=""+fn(l),r=null,p=0;p<n.length;p++){if(n[p].value===l){n[p].selected=!0,u&&(n[p].defaultSelected=!0);return}r!==null||n[p].disabled||(r=n[p])}r!==null&&(r.selected=!0)}}function hp(n,r,l){if(r!=null&&(r=""+fn(r),r!==n.value&&(n.value=r),l==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=l!=null?""+fn(l):""}function pp(n,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(a(92));if(q(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=fn(r),n.defaultValue=l,u=n.textContent,u===l&&u!==""&&u!==null&&(n.value=u),Lu(n)}function zr(n,r){if(r){var l=n.firstChild;if(l&&l===n.lastChild&&l.nodeType===3){l.nodeValue=r;return}}n.textContent=r}var P_=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 mp(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||P_.has(r)?r==="float"?n.cssFloat=l:n[r]=(""+l).trim():n[r]=l+"px"}function gp(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 p in r)u=r[p],r.hasOwnProperty(p)&&l[p]!==u&&mp(n,p,u)}else for(var m in r)r.hasOwnProperty(m)&&mp(n,m,r[m])}function Nu(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 B_=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"]]),j_=/^[\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 fo(n){return j_.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Wn(){}var Ou=null;function Mu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Hr=null,Ur=null;function yp(n){var r=Nr(n);if(r&&(n=r.stateNode)){var l=n[Gt]||null;e:switch(n=r.stateNode,r.type){case"input":if(Ru(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="'+hn(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==n&&u.form===n.form){var p=u[Gt]||null;if(!p)throw Error(a(90));Ru(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<l.length;r++)u=l[r],u.form===n.form&&dp(u)}break e;case"textarea":hp(n,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&Ir(n,!!l.multiple,r,!1)}}}var Iu=!1;function bp(n,r,l){if(Iu)return n(r,l);Iu=!0;try{var u=n(r);return u}finally{if(Iu=!1,(Hr!==null||Ur!==null)&&(Jo(),Hr&&(r=Hr,n=Ur,Ur=Hr=null,yp(r),n)))for(r=0;r<n.length;r++)yp(n[r])}}function Va(n,r){var l=n.stateNode;if(l===null)return null;var u=l[Gt]||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 Jn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zu=!1;if(Jn)try{var Ga={};Object.defineProperty(Ga,"passive",{get:function(){zu=!0}}),window.addEventListener("test",Ga,Ga),window.removeEventListener("test",Ga,Ga)}catch{zu=!1}var xi=null,Hu=null,ho=null;function vp(){if(ho)return ho;var n,r=Hu,l=r.length,u,p="value"in xi?xi.value:xi.textContent,m=p.length;for(n=0;n<l&&r[n]===p[n];n++);var _=l-n;for(u=1;u<=_&&r[l-u]===p[m-u];u++);return ho=p.slice(n,1<u?1-u:void 0)}function po(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 mo(){return!0}function _p(){return!1}function $t(n){function r(l,u,p,m,_){this._reactName=l,this._targetInst=p,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)?mo:_p,this.isPropagationStopped=_p,this}return g(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=mo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=mo)},persist:function(){},isPersistent:mo}),r}var Ji={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},go=$t(Ji),$a=g({},Ji,{view:0,detail:0}),V_=$t($a),Uu,Pu,Fa,yo=g({},$a,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ju,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!==Fa&&(Fa&&n.type==="mousemove"?(Uu=n.screenX-Fa.screenX,Pu=n.screenY-Fa.screenY):Pu=Uu=0,Fa=n),Uu)},movementY:function(n){return"movementY"in n?n.movementY:Pu}}),Sp=$t(yo),G_=g({},yo,{dataTransfer:0}),$_=$t(G_),F_=g({},$a,{relatedTarget:0}),Bu=$t(F_),q_=g({},Ji,{animationName:0,elapsedTime:0,pseudoElement:0}),Y_=$t(q_),X_=g({},Ji,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Q_=$t(X_),Z_=g({},Ji,{data:0}),Ep=$t(Z_),K_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},W_={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"},J_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eS(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=J_[n])?!!r[n]:!1}function ju(){return eS}var tS=g({},$a,{key:function(n){if(n.key){var r=K_[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=po(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?W_[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ju,charCode:function(n){return n.type==="keypress"?po(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?po(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),nS=$t(tS),iS=g({},yo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xp=$t(iS),rS=g({},$a,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ju}),aS=$t(rS),lS=g({},Ji,{propertyName:0,elapsedTime:0,pseudoElement:0}),oS=$t(lS),sS=g({},yo,{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}),uS=$t(sS),cS=g({},Ji,{newState:0,oldState:0}),dS=$t(cS),fS=[9,13,27,32],Vu=Jn&&"CompositionEvent"in window,qa=null;Jn&&"documentMode"in document&&(qa=document.documentMode);var hS=Jn&&"TextEvent"in window&&!qa,Cp=Jn&&(!Vu||qa&&8<qa&&11>=qa),wp=" ",kp=!1;function Ap(n,r){switch(n){case"keyup":return fS.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tp(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Pr=!1;function pS(n,r){switch(n){case"compositionend":return Tp(r);case"keypress":return r.which!==32?null:(kp=!0,wp);case"textInput":return n=r.data,n===wp&&kp?null:n;default:return null}}function mS(n,r){if(Pr)return n==="compositionend"||!Vu&&Ap(n,r)?(n=vp(),ho=Hu=xi=null,Pr=!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 Cp&&r.locale!=="ko"?null:r.data;default:return null}}var gS={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 Lp(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!gS[n.type]:r==="textarea"}function Rp(n,r,l,u){Hr?Ur?Ur.push(u):Ur=[u]:Hr=u,r=ls(r,"onChange"),0<r.length&&(l=new go("onChange","change",null,l,u),n.push({event:l,listeners:r}))}var Ya=null,Xa=null;function yS(n){fy(n,0)}function bo(n){var r=ja(n);if(dp(r))return n}function Dp(n,r){if(n==="change")return r}var Np=!1;if(Jn){var Gu;if(Jn){var $u="oninput"in document;if(!$u){var Op=document.createElement("div");Op.setAttribute("oninput","return;"),$u=typeof Op.oninput=="function"}Gu=$u}else Gu=!1;Np=Gu&&(!document.documentMode||9<document.documentMode)}function Mp(){Ya&&(Ya.detachEvent("onpropertychange",Ip),Xa=Ya=null)}function Ip(n){if(n.propertyName==="value"&&bo(Xa)){var r=[];Rp(r,Xa,n,Mu(n)),bp(yS,r)}}function bS(n,r,l){n==="focusin"?(Mp(),Ya=r,Xa=l,Ya.attachEvent("onpropertychange",Ip)):n==="focusout"&&Mp()}function vS(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return bo(Xa)}function _S(n,r){if(n==="click")return bo(r)}function SS(n,r){if(n==="input"||n==="change")return bo(r)}function ES(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Jt=typeof Object.is=="function"?Object.is:ES;function Qa(n,r){if(Jt(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 p=l[u];if(!_i.call(r,p)||!Jt(n[p],r[p]))return!1}return!0}function zp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Hp(n,r){var l=zp(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=zp(l)}}function Up(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?Up(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function Pp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=co(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=co(n.document)}return r}function Fu(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 xS=Jn&&"documentMode"in document&&11>=document.documentMode,Br=null,qu=null,Za=null,Yu=!1;function Bp(n,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Yu||Br==null||Br!==co(u)||(u=Br,"selectionStart"in u&&Fu(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}),Za&&Qa(Za,u)||(Za=u,u=ls(qu,"onSelect"),0<u.length&&(r=new go("onSelect","select",null,r,l),n.push({event:r,listeners:u}),r.target=Br)))}function er(n,r){var l={};return l[n.toLowerCase()]=r.toLowerCase(),l["Webkit"+n]="webkit"+r,l["Moz"+n]="moz"+r,l}var jr={animationend:er("Animation","AnimationEnd"),animationiteration:er("Animation","AnimationIteration"),animationstart:er("Animation","AnimationStart"),transitionrun:er("Transition","TransitionRun"),transitionstart:er("Transition","TransitionStart"),transitioncancel:er("Transition","TransitionCancel"),transitionend:er("Transition","TransitionEnd")},Xu={},jp={};Jn&&(jp=document.createElement("div").style,"AnimationEvent"in window||(delete jr.animationend.animation,delete jr.animationiteration.animation,delete jr.animationstart.animation),"TransitionEvent"in window||delete jr.transitionend.transition);function tr(n){if(Xu[n])return Xu[n];if(!jr[n])return n;var r=jr[n],l;for(l in r)if(r.hasOwnProperty(l)&&l in jp)return Xu[n]=r[l];return n}var Vp=tr("animationend"),Gp=tr("animationiteration"),$p=tr("animationstart"),CS=tr("transitionrun"),wS=tr("transitionstart"),kS=tr("transitioncancel"),Fp=tr("transitionend"),qp=new Map,Qu="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(" ");Qu.push("scrollEnd");function Ln(n,r){qp.set(n,r),Wi(r,[n])}var vo=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)},pn=[],Vr=0,Zu=0;function _o(){for(var n=Vr,r=Zu=Vr=0;r<n;){var l=pn[r];pn[r++]=null;var u=pn[r];pn[r++]=null;var p=pn[r];pn[r++]=null;var m=pn[r];if(pn[r++]=null,u!==null&&p!==null){var _=u.pending;_===null?p.next=p:(p.next=_.next,_.next=p),u.pending=p}m!==0&&Yp(l,p,m)}}function So(n,r,l,u){pn[Vr++]=n,pn[Vr++]=r,pn[Vr++]=l,pn[Vr++]=u,Zu|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function Ku(n,r,l,u){return So(n,r,l,u),Eo(n)}function nr(n,r){return So(n,null,null,r),Eo(n)}function Yp(n,r,l){n.lanes|=l;var u=n.alternate;u!==null&&(u.lanes|=l);for(var p=!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||(p=!0)),n=m,m=m.return;return n.tag===3?(m=n.stateNode,p&&r!==null&&(p=31-Ge(l),n=m.hiddenUpdates,u=n[p],u===null?n[p]=[r]:u.push(r),r.lane=l|536870912),m):null}function Eo(n){if(50<bl)throw bl=0,ld=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var Gr={};function AS(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 en(n,r,l,u){return new AS(n,r,l,u)}function Wu(n){return n=n.prototype,!(!n||!n.isReactComponent)}function ei(n,r){var l=n.alternate;return l===null?(l=en(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 Xp(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 xo(n,r,l,u,p,m){var _=0;if(u=n,typeof n=="function")Wu(n)&&(_=1);else if(typeof n=="string")_=NE(n,l,ce.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case V:return n=en(31,l,r,p),n.elementType=V,n.lanes=m,n;case w:return ir(l.children,p,m,r);case D:_=8,p|=24;break;case x:return n=en(12,l,r,p|2),n.elementType=x,n.lanes=m,n;case z:return n=en(13,l,r,p),n.elementType=z,n.lanes=m,n;case R:return n=en(19,l,r,p),n.elementType=R,n.lanes=m,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case k:_=10;break e;case T:_=9;break e;case U:_=11;break e;case F:_=14;break e;case le:_=16,u=null;break e}_=29,l=Error(a(130,n===null?"null":typeof n,"")),u=null}return r=en(_,l,r,p),r.elementType=n,r.type=u,r.lanes=m,r}function ir(n,r,l,u){return n=en(7,n,u,r),n.lanes=l,n}function Ju(n,r,l){return n=en(6,n,null,r),n.lanes=l,n}function Qp(n){var r=en(18,null,null,0);return r.stateNode=n,r}function ec(n,r,l){return r=en(4,n.children!==null?n.children:[],n.key,r),r.lanes=l,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Zp=new WeakMap;function mn(n,r){if(typeof n=="object"&&n!==null){var l=Zp.get(n);return l!==void 0?l:(r={value:n,source:r,stack:wr(r)},Zp.set(n,r),r)}return{value:n,source:r,stack:wr(r)}}var $r=[],Fr=0,Co=null,Ka=0,gn=[],yn=0,Ci=null,Pn=1,Bn="";function ti(n,r){$r[Fr++]=Ka,$r[Fr++]=Co,Co=n,Ka=r}function Kp(n,r,l){gn[yn++]=Pn,gn[yn++]=Bn,gn[yn++]=Ci,Ci=n;var u=Pn;n=Bn;var p=32-Ge(u)-1;u&=~(1<<p),l+=1;var m=32-Ge(r)+p;if(30<m){var _=p-p%5;m=(u&(1<<_)-1).toString(32),u>>=_,p-=_,Pn=1<<32-Ge(r)+p|l<<p|u,Bn=m+n}else Pn=1<<m|l<<p|u,Bn=n}function tc(n){n.return!==null&&(ti(n,1),Kp(n,1,0))}function nc(n){for(;n===Co;)Co=$r[--Fr],$r[Fr]=null,Ka=$r[--Fr],$r[Fr]=null;for(;n===Ci;)Ci=gn[--yn],gn[yn]=null,Bn=gn[--yn],gn[yn]=null,Pn=gn[--yn],gn[yn]=null}function Wp(n,r){gn[yn++]=Pn,gn[yn++]=Bn,gn[yn++]=Ci,Pn=r.id,Bn=r.overflow,Ci=n}var Rt=null,Je=null,ze=!1,wi=null,bn=!1,ic=Error(a(519));function ki(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wa(mn(r,n)),ic}function Jp(n){var r=n.stateNode,l=n.type,u=n.memoizedProps;switch(r[Lt]=n,r[Gt]=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<_l.length;l++)Ne(_l[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),fp(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),pp(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||gy(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=Wn),r=!0):r=!1,r||ki(n,!0)}function em(n){for(Rt=n.return;Rt;)switch(Rt.tag){case 5:case 31:case 13:bn=!1;return;case 27:case 3:bn=!0;return;default:Rt=Rt.return}}function qr(n){if(n!==Rt)return!1;if(!ze)return em(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")||Sd(n.type,n.memoizedProps)),l=!l),l&&Je&&ki(n),em(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Je=wy(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Je=wy(n)}else r===27?(r=Je,Bi(n.type)?(n=kd,kd=null,Je=n):Je=r):Je=Rt?_n(n.stateNode.nextSibling):null;return!0}function rr(){Je=Rt=null,ze=!1}function rc(){var n=wi;return n!==null&&(Xt===null?Xt=n:Xt.push.apply(Xt,n),wi=null),n}function Wa(n){wi===null?wi=[n]:wi.push(n)}var ac=O(null),ar=null,ni=null;function Ai(n,r,l){A(ac,r._currentValue),r._currentValue=l}function ii(n){n._currentValue=ac.current,X(ac)}function lc(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 oc(n,r,l,u){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var m=p.dependencies;if(m!==null){var _=p.child;m=m.firstContext;e:for(;m!==null;){var E=m;m=p;for(var N=0;N<r.length;N++)if(E.context===r[N]){m.lanes|=l,E=m.alternate,E!==null&&(E.lanes|=l),lc(m.return,l,n),u||(_=null);break e}m=E.next}}else if(p.tag===18){if(_=p.return,_===null)throw Error(a(341));_.lanes|=l,m=_.alternate,m!==null&&(m.lanes|=l),lc(_,l,n),_=null}else _=p.child;if(_!==null)_.return=p;else for(_=p;_!==null;){if(_===n){_=null;break}if(p=_.sibling,p!==null){p.return=_.return,_=p;break}_=_.return}p=_}}function Yr(n,r,l,u){n=null;for(var p=r,m=!1;p!==null;){if(!m){if((p.flags&524288)!==0)m=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var _=p.alternate;if(_===null)throw Error(a(387));if(_=_.memoizedProps,_!==null){var E=p.type;Jt(p.pendingProps.value,_.value)||(n!==null?n.push(E):n=[E])}}else if(p===Se.current){if(_=p.alternate,_===null)throw Error(a(387));_.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(wl):n=[wl])}p=p.return}n!==null&&oc(r,n,l,u),r.flags|=262144}function wo(n){for(n=n.firstContext;n!==null;){if(!Jt(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function lr(n){ar=n,ni=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Dt(n){return tm(ar,n)}function ko(n,r){return ar===null&&lr(n),tm(n,r)}function tm(n,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},ni===null){if(n===null)throw Error(a(308));ni=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else ni=ni.next=r;return l}var TS=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()})}},LS=e.unstable_scheduleCallback,RS=e.unstable_NormalPriority,ct={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sc(){return{controller:new TS,data:new Map,refCount:0}}function Ja(n){n.refCount--,n.refCount===0&&LS(RS,function(){n.controller.abort()})}var el=null,uc=0,Xr=0,Qr=null;function DS(n,r){if(el===null){var l=el=[];uc=0,Xr=fd(),Qr={status:"pending",value:void 0,then:function(u){l.push(u)}}}return uc++,r.then(nm,nm),r}function nm(){if(--uc===0&&el!==null){Qr!==null&&(Qr.status="fulfilled");var n=el;el=null,Xr=0,Qr=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function NS(n,r){var l=[],u={status:"pending",value:null,reason:null,then:function(p){l.push(p)}};return n.then(function(){u.status="fulfilled",u.value=r;for(var p=0;p<l.length;p++)(0,l[p])(r)},function(p){for(u.status="rejected",u.reason=p,p=0;p<l.length;p++)(0,l[p])(void 0)}),u}var im=H.S;H.S=function(n,r){Bg=yt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&DS(n,r),im!==null&&im(n,r)};var or=O(null);function cc(){var n=or.current;return n!==null?n:Qe.pooledCache}function Ao(n,r){r===null?A(or,or.current):A(or,r.pool)}function rm(){var n=cc();return n===null?null:{parent:ct._currentValue,pool:n}}var Zr=Error(a(460)),dc=Error(a(474)),To=Error(a(542)),Lo={then:function(){}};function am(n){return n=n.status,n==="fulfilled"||n==="rejected"}function lm(n,r,l){switch(l=n[l],l===void 0?n.push(r):l!==r&&(r.then(Wn,Wn),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,sm(n),n;default:if(typeof r.status=="string")r.then(Wn,Wn);else{if(n=Qe,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.then(function(u){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=u}},function(u){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,sm(n),n}throw ur=r,Zr}}function sr(n){try{var r=n._init;return r(n._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ur=l,Zr):l}}var ur=null;function om(){if(ur===null)throw Error(a(459));var n=ur;return ur=null,n}function sm(n){if(n===Zr||n===To)throw Error(a(483))}var Kr=null,tl=0;function Ro(n){var r=tl;return tl+=1,Kr===null&&(Kr=[]),lm(Kr,n,r)}function nl(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function Do(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 um(n){function r(P,M){if(n){var B=P.deletions;B===null?(P.deletions=[M],P.flags|=16):B.push(M)}}function l(P,M){if(!n)return null;for(;M!==null;)r(P,M),M=M.sibling;return null}function u(P){for(var M=new Map;P!==null;)P.key!==null?M.set(P.key,P):M.set(P.index,P),P=P.sibling;return M}function p(P,M){return P=ei(P,M),P.index=0,P.sibling=null,P}function m(P,M,B){return P.index=B,n?(B=P.alternate,B!==null?(B=B.index,B<M?(P.flags|=67108866,M):B):(P.flags|=67108866,M)):(P.flags|=1048576,M)}function _(P){return n&&P.alternate===null&&(P.flags|=67108866),P}function E(P,M,B,ee){return M===null||M.tag!==6?(M=Ju(B,P.mode,ee),M.return=P,M):(M=p(M,B),M.return=P,M)}function N(P,M,B,ee){var ye=B.type;return ye===w?Q(P,M,B.props.children,ee,B.key):M!==null&&(M.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===le&&sr(ye)===M.type)?(M=p(M,B.props),nl(M,B),M.return=P,M):(M=xo(B.type,B.key,B.props,null,P.mode,ee),nl(M,B),M.return=P,M)}function j(P,M,B,ee){return M===null||M.tag!==4||M.stateNode.containerInfo!==B.containerInfo||M.stateNode.implementation!==B.implementation?(M=ec(B,P.mode,ee),M.return=P,M):(M=p(M,B.children||[]),M.return=P,M)}function Q(P,M,B,ee,ye){return M===null||M.tag!==7?(M=ir(B,P.mode,ee,ye),M.return=P,M):(M=p(M,B),M.return=P,M)}function te(P,M,B){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Ju(""+M,P.mode,B),M.return=P,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case v:return B=xo(M.type,M.key,M.props,null,P.mode,B),nl(B,M),B.return=P,B;case S:return M=ec(M,P.mode,B),M.return=P,M;case le:return M=sr(M),te(P,M,B)}if(q(M)||K(M))return M=ir(M,P.mode,B,null),M.return=P,M;if(typeof M.then=="function")return te(P,Ro(M),B);if(M.$$typeof===k)return te(P,ko(P,M),B);Do(P,M)}return null}function $(P,M,B,ee){var ye=M!==null?M.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return ye!==null?null:E(P,M,""+B,ee);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case v:return B.key===ye?N(P,M,B,ee):null;case S:return B.key===ye?j(P,M,B,ee):null;case le:return B=sr(B),$(P,M,B,ee)}if(q(B)||K(B))return ye!==null?null:Q(P,M,B,ee,null);if(typeof B.then=="function")return $(P,M,Ro(B),ee);if(B.$$typeof===k)return $(P,M,ko(P,B),ee);Do(P,B)}return null}function Y(P,M,B,ee,ye){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return P=P.get(B)||null,E(M,P,""+ee,ye);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case v:return P=P.get(ee.key===null?B:ee.key)||null,N(M,P,ee,ye);case S:return P=P.get(ee.key===null?B:ee.key)||null,j(M,P,ee,ye);case le:return ee=sr(ee),Y(P,M,B,ee,ye)}if(q(ee)||K(ee))return P=P.get(B)||null,Q(M,P,ee,ye,null);if(typeof ee.then=="function")return Y(P,M,B,Ro(ee),ye);if(ee.$$typeof===k)return Y(P,M,B,ko(M,ee),ye);Do(M,ee)}return null}function de(P,M,B,ee){for(var ye=null,Pe=null,pe=M,Ae=M=0,Ie=null;pe!==null&&Ae<B.length;Ae++){pe.index>Ae?(Ie=pe,pe=null):Ie=pe.sibling;var Be=$(P,pe,B[Ae],ee);if(Be===null){pe===null&&(pe=Ie);break}n&&pe&&Be.alternate===null&&r(P,pe),M=m(Be,M,Ae),Pe===null?ye=Be:Pe.sibling=Be,Pe=Be,pe=Ie}if(Ae===B.length)return l(P,pe),ze&&ti(P,Ae),ye;if(pe===null){for(;Ae<B.length;Ae++)pe=te(P,B[Ae],ee),pe!==null&&(M=m(pe,M,Ae),Pe===null?ye=pe:Pe.sibling=pe,Pe=pe);return ze&&ti(P,Ae),ye}for(pe=u(pe);Ae<B.length;Ae++)Ie=Y(pe,P,Ae,B[Ae],ee),Ie!==null&&(n&&Ie.alternate!==null&&pe.delete(Ie.key===null?Ae:Ie.key),M=m(Ie,M,Ae),Pe===null?ye=Ie:Pe.sibling=Ie,Pe=Ie);return n&&pe.forEach(function(Fi){return r(P,Fi)}),ze&&ti(P,Ae),ye}function ve(P,M,B,ee){if(B==null)throw Error(a(151));for(var ye=null,Pe=null,pe=M,Ae=M=0,Ie=null,Be=B.next();pe!==null&&!Be.done;Ae++,Be=B.next()){pe.index>Ae?(Ie=pe,pe=null):Ie=pe.sibling;var Fi=$(P,pe,Be.value,ee);if(Fi===null){pe===null&&(pe=Ie);break}n&&pe&&Fi.alternate===null&&r(P,pe),M=m(Fi,M,Ae),Pe===null?ye=Fi:Pe.sibling=Fi,Pe=Fi,pe=Ie}if(Be.done)return l(P,pe),ze&&ti(P,Ae),ye;if(pe===null){for(;!Be.done;Ae++,Be=B.next())Be=te(P,Be.value,ee),Be!==null&&(M=m(Be,M,Ae),Pe===null?ye=Be:Pe.sibling=Be,Pe=Be);return ze&&ti(P,Ae),ye}for(pe=u(pe);!Be.done;Ae++,Be=B.next())Be=Y(pe,P,Ae,Be.value,ee),Be!==null&&(n&&Be.alternate!==null&&pe.delete(Be.key===null?Ae:Be.key),M=m(Be,M,Ae),Pe===null?ye=Be:Pe.sibling=Be,Pe=Be);return n&&pe.forEach(function(GE){return r(P,GE)}),ze&&ti(P,Ae),ye}function Xe(P,M,B,ee){if(typeof B=="object"&&B!==null&&B.type===w&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case v:e:{for(var ye=B.key;M!==null;){if(M.key===ye){if(ye=B.type,ye===w){if(M.tag===7){l(P,M.sibling),ee=p(M,B.props.children),ee.return=P,P=ee;break e}}else if(M.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===le&&sr(ye)===M.type){l(P,M.sibling),ee=p(M,B.props),nl(ee,B),ee.return=P,P=ee;break e}l(P,M);break}else r(P,M);M=M.sibling}B.type===w?(ee=ir(B.props.children,P.mode,ee,B.key),ee.return=P,P=ee):(ee=xo(B.type,B.key,B.props,null,P.mode,ee),nl(ee,B),ee.return=P,P=ee)}return _(P);case S:e:{for(ye=B.key;M!==null;){if(M.key===ye)if(M.tag===4&&M.stateNode.containerInfo===B.containerInfo&&M.stateNode.implementation===B.implementation){l(P,M.sibling),ee=p(M,B.children||[]),ee.return=P,P=ee;break e}else{l(P,M);break}else r(P,M);M=M.sibling}ee=ec(B,P.mode,ee),ee.return=P,P=ee}return _(P);case le:return B=sr(B),Xe(P,M,B,ee)}if(q(B))return de(P,M,B,ee);if(K(B)){if(ye=K(B),typeof ye!="function")throw Error(a(150));return B=ye.call(B),ve(P,M,B,ee)}if(typeof B.then=="function")return Xe(P,M,Ro(B),ee);if(B.$$typeof===k)return Xe(P,M,ko(P,B),ee);Do(P,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,M!==null&&M.tag===6?(l(P,M.sibling),ee=p(M,B),ee.return=P,P=ee):(l(P,M),ee=Ju(B,P.mode,ee),ee.return=P,P=ee),_(P)):l(P,M)}return function(P,M,B,ee){try{tl=0;var ye=Xe(P,M,B,ee);return Kr=null,ye}catch(pe){if(pe===Zr||pe===To)throw pe;var Pe=en(29,pe,null,P.mode);return Pe.lanes=ee,Pe.return=P,Pe}}}var cr=um(!0),cm=um(!1),Ti=!1;function fc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hc(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 Li(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ri(n,r,l){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(je&2)!==0){var p=u.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),u.pending=r,r=Eo(n),Yp(n,null,l),r}return So(n,u,r,l),Eo(n)}function il(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,tp(n,l)}}function pc(n,r){var l=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var p=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?p=m=_:m=m.next=_,l=l.next}while(l!==null);m===null?p=m=r:m=m.next=r}else p=m=r;l={baseState:u.baseState,firstBaseUpdate:p,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 mc=!1;function rl(){if(mc){var n=Qr;if(n!==null)throw n}}function al(n,r,l,u){mc=!1;var p=n.updateQueue;Ti=!1;var m=p.firstBaseUpdate,_=p.lastBaseUpdate,E=p.shared.pending;if(E!==null){p.shared.pending=null;var N=E,j=N.next;N.next=null,_===null?m=j:_.next=j,_=N;var Q=n.alternate;Q!==null&&(Q=Q.updateQueue,E=Q.lastBaseUpdate,E!==_&&(E===null?Q.firstBaseUpdate=j:E.next=j,Q.lastBaseUpdate=N))}if(m!==null){var te=p.baseState;_=0,Q=j=N=null,E=m;do{var $=E.lane&-536870913,Y=$!==E.lane;if(Y?(Me&$)===$:(u&$)===$){$!==0&&$===Xr&&(mc=!0),Q!==null&&(Q=Q.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var de=n,ve=E;$=r;var Xe=l;switch(ve.tag){case 1:if(de=ve.payload,typeof de=="function"){te=de.call(Xe,te,$);break e}te=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=ve.payload,$=typeof de=="function"?de.call(Xe,te,$):de,$==null)break e;te=g({},te,$);break e;case 2:Ti=!0}}$=E.callback,$!==null&&(n.flags|=64,Y&&(n.flags|=8192),Y=p.callbacks,Y===null?p.callbacks=[$]:Y.push($))}else Y={lane:$,tag:E.tag,payload:E.payload,callback:E.callback,next:null},Q===null?(j=Q=Y,N=te):Q=Q.next=Y,_|=$;if(E=E.next,E===null){if(E=p.shared.pending,E===null)break;Y=E,E=Y.next,Y.next=null,p.lastBaseUpdate=Y,p.shared.pending=null}}while(!0);Q===null&&(N=te),p.baseState=N,p.firstBaseUpdate=j,p.lastBaseUpdate=Q,m===null&&(p.shared.lanes=0),Ii|=_,n.lanes=_,n.memoizedState=te}}function dm(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function fm(n,r){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;n<l.length;n++)dm(l[n],r)}var Wr=O(null),No=O(0);function hm(n,r){n=fi,A(No,n),A(Wr,r),fi=n|r.baseLanes}function gc(){A(No,fi),A(Wr,Wr.current)}function yc(){fi=No.current,X(Wr),X(No)}var tn=O(null),vn=null;function Di(n){var r=n.alternate;A(lt,lt.current&1),A(tn,n),vn===null&&(r===null||Wr.current!==null||r.memoizedState!==null)&&(vn=n)}function bc(n){A(lt,lt.current),A(tn,n),vn===null&&(vn=n)}function pm(n){n.tag===22?(A(lt,lt.current),A(tn,n),vn===null&&(vn=n)):Ni()}function Ni(){A(lt,lt.current),A(tn,tn.current)}function nn(n){X(tn),vn===n&&(vn=null),X(lt)}var lt=O(0);function Oo(n){for(var r=n;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Cd(l)||wd(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 ri=0,ke=null,qe=null,dt=null,Mo=!1,Jr=!1,dr=!1,Io=0,ll=0,ea=null,OS=0;function it(){throw Error(a(321))}function vc(n,r){if(r===null)return!1;for(var l=0;l<r.length&&l<n.length;l++)if(!Jt(n[l],r[l]))return!1;return!0}function _c(n,r,l,u,p,m){return ri=m,ke=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,H.H=n===null||n.memoizedState===null?Km:Ic,dr=!1,m=l(u,p),dr=!1,Jr&&(m=gm(r,l,u,p)),mm(n),m}function mm(n){H.H=ul;var r=qe!==null&&qe.next!==null;if(ri=0,dt=qe=ke=null,Mo=!1,ll=0,ea=null,r)throw Error(a(300));n===null||ft||(n=n.dependencies,n!==null&&wo(n)&&(ft=!0))}function gm(n,r,l,u){ke=n;var p=0;do{if(Jr&&(ea=null),ll=0,Jr=!1,25<=p)throw Error(a(301));if(p+=1,dt=qe=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=Wm,m=r(l,u)}while(Jr);return m}function MS(){var n=H.H,r=n.useState()[0];return r=typeof r.then=="function"?ol(r):r,n=n.useState()[0],(qe!==null?qe.memoizedState:null)!==n&&(ke.flags|=1024),r}function Sc(){var n=Io!==0;return Io=0,n}function Ec(n,r,l){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~l}function xc(n){if(Mo){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}Mo=!1}ri=0,dt=qe=ke=null,Jr=!1,ll=Io=0,ea=null}function Vt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?ke.memoizedState=dt=n:dt=dt.next=n,dt}function ot(){if(qe===null){var n=ke.alternate;n=n!==null?n.memoizedState:null}else n=qe.next;var r=dt===null?ke.memoizedState:dt.next;if(r!==null)dt=r,qe=n;else{if(n===null)throw ke.alternate===null?Error(a(467)):Error(a(310));qe=n,n={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},dt===null?ke.memoizedState=dt=n:dt=dt.next=n}return dt}function zo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ol(n){var r=ll;return ll+=1,ea===null&&(ea=[]),n=lm(ea,n,r),r=ke,(dt===null?r.memoizedState:dt.next)===null&&(r=r.alternate,H.H=r===null||r.memoizedState===null?Km:Ic),n}function Ho(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return ol(n);if(n.$$typeof===k)return Dt(n)}throw Error(a(438,String(n)))}function Cc(n){var r=null,l=ke.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=ke.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=zo(),ke.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]=se;return r.index++,l}function ai(n,r){return typeof r=="function"?r(n):r}function Uo(n){var r=ot();return wc(r,qe,n)}function wc(n,r,l){var u=n.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var p=n.baseQueue,m=u.pending;if(m!==null){if(p!==null){var _=p.next;p.next=m.next,m.next=_}r.baseQueue=p=m,u.pending=null}if(m=n.baseState,p===null)n.memoizedState=m;else{r=p.next;var E=_=null,N=null,j=r,Q=!1;do{var te=j.lane&-536870913;if(te!==j.lane?(Me&te)===te:(ri&te)===te){var $=j.revertLane;if($===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),te===Xr&&(Q=!0);else if((ri&$)===$){j=j.next,$===Xr&&(Q=!0);continue}else te={lane:0,revertLane:j.revertLane,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},N===null?(E=N=te,_=m):N=N.next=te,ke.lanes|=$,Ii|=$;te=j.action,dr&&l(m,te),m=j.hasEagerState?j.eagerState:l(m,te)}else $={lane:te,revertLane:j.revertLane,gesture:j.gesture,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},N===null?(E=N=$,_=m):N=N.next=$,ke.lanes|=te,Ii|=te;j=j.next}while(j!==null&&j!==r);if(N===null?_=m:N.next=E,!Jt(m,n.memoizedState)&&(ft=!0,Q&&(l=Qr,l!==null)))throw l;n.memoizedState=m,n.baseState=_,n.baseQueue=N,u.lastRenderedState=m}return p===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function kc(n){var r=ot(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=n;var u=l.dispatch,p=l.pending,m=r.memoizedState;if(p!==null){l.pending=null;var _=p=p.next;do m=n(m,_.action),_=_.next;while(_!==p);Jt(m,r.memoizedState)||(ft=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),l.lastRenderedState=m}return[m,u]}function ym(n,r,l){var u=ke,p=ot(),m=ze;if(m){if(l===void 0)throw Error(a(407));l=l()}else l=r();var _=!Jt((qe||p).memoizedState,l);if(_&&(p.memoizedState=l,ft=!0),p=p.queue,Lc(_m.bind(null,u,p,n),[n]),p.getSnapshot!==r||_||dt!==null&&dt.memoizedState.tag&1){if(u.flags|=2048,ta(9,{destroy:void 0},vm.bind(null,u,p,l,r),null),Qe===null)throw Error(a(349));m||(ri&127)!==0||bm(u,r,l)}return l}function bm(n,r,l){n.flags|=16384,n={getSnapshot:r,value:l},r=ke.updateQueue,r===null?(r=zo(),ke.updateQueue=r,r.stores=[n]):(l=r.stores,l===null?r.stores=[n]:l.push(n))}function vm(n,r,l,u){r.value=l,r.getSnapshot=u,Sm(r)&&Em(n)}function _m(n,r,l){return l(function(){Sm(r)&&Em(n)})}function Sm(n){var r=n.getSnapshot;n=n.value;try{var l=r();return!Jt(n,l)}catch{return!0}}function Em(n){var r=nr(n,2);r!==null&&Qt(r,n,2)}function Ac(n){var r=Vt();if(typeof n=="function"){var l=n;if(n=l(),dr){It(!0);try{l()}finally{It(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ai,lastRenderedState:n},r}function xm(n,r,l,u){return n.baseState=l,wc(n,qe,typeof u=="function"?u:ai)}function IS(n,r,l,u,p){if(jo(n))throw Error(a(485));if(n=r.action,n!==null){var m={payload:p,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,Cm(r,m)):(m.next=l.next,r.pending=l.next=m)}}function Cm(n,r){var l=r.action,u=r.payload,p=n.state;if(r.isTransition){var m=H.T,_={};H.T=_;try{var E=l(p,u),N=H.S;N!==null&&N(_,E),wm(n,r,E)}catch(j){Tc(n,r,j)}finally{m!==null&&_.types!==null&&(m.types=_.types),H.T=m}}else try{m=l(p,u),wm(n,r,m)}catch(j){Tc(n,r,j)}}function wm(n,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){km(n,r,u)},function(u){return Tc(n,r,u)}):km(n,r,l)}function km(n,r,l){r.status="fulfilled",r.value=l,Am(r),n.state=l,r=n.pending,r!==null&&(l=r.next,l===r?n.pending=null:(l=l.next,r.next=l,Cm(n,l)))}function Tc(n,r,l){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=l,Am(r),r=r.next;while(r!==u)}n.action=null}function Am(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function Tm(n,r){return r}function Lm(n,r){if(ze){var l=Qe.formState;if(l!==null){e:{var u=ke;if(ze){if(Je){t:{for(var p=Je,m=bn;p.nodeType!==8;){if(!m){p=null;break t}if(p=_n(p.nextSibling),p===null){p=null;break t}}m=p.data,p=m==="F!"||m==="F"?p:null}if(p){Je=_n(p.nextSibling),u=p.data==="F!";break e}}ki(u)}u=!1}u&&(r=l[0])}}return l=Vt(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tm,lastRenderedState:r},l.queue=u,l=Xm.bind(null,ke,u),u.dispatch=l,u=Ac(!1),m=Mc.bind(null,ke,!1,u.queue),u=Vt(),p={state:r,dispatch:null,action:n,pending:null},u.queue=p,l=IS.bind(null,ke,p,m,l),p.dispatch=l,u.memoizedState=n,[r,l,!1]}function Rm(n){var r=ot();return Dm(r,qe,n)}function Dm(n,r,l){if(r=wc(n,r,Tm)[0],n=Uo(ai)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=ol(r)}catch(_){throw _===Zr?To:_}else u=r;r=ot();var p=r.queue,m=p.dispatch;return l!==r.memoizedState&&(ke.flags|=2048,ta(9,{destroy:void 0},zS.bind(null,p,l),null)),[u,m,n]}function zS(n,r){n.action=r}function Nm(n){var r=ot(),l=qe;if(l!==null)return Dm(r,l,n);ot(),r=r.memoizedState,l=ot();var u=l.queue.dispatch;return l.memoizedState=n,[r,u,!1]}function ta(n,r,l,u){return n={tag:n,create:l,deps:u,inst:r,next:null},r=ke.updateQueue,r===null&&(r=zo(),ke.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 Om(){return ot().memoizedState}function Po(n,r,l,u){var p=Vt();ke.flags|=n,p.memoizedState=ta(1|r,{destroy:void 0},l,u===void 0?null:u)}function Bo(n,r,l,u){var p=ot();u=u===void 0?null:u;var m=p.memoizedState.inst;qe!==null&&u!==null&&vc(u,qe.memoizedState.deps)?p.memoizedState=ta(r,m,l,u):(ke.flags|=n,p.memoizedState=ta(1|r,m,l,u))}function Mm(n,r){Po(8390656,8,n,r)}function Lc(n,r){Bo(2048,8,n,r)}function HS(n){ke.flags|=4;var r=ke.updateQueue;if(r===null)r=zo(),ke.updateQueue=r,r.events=[n];else{var l=r.events;l===null?r.events=[n]:l.push(n)}}function Im(n){var r=ot().memoizedState;return HS({ref:r,nextImpl:n}),function(){if((je&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function zm(n,r){return Bo(4,2,n,r)}function Hm(n,r){return Bo(4,4,n,r)}function Um(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 Pm(n,r,l){l=l!=null?l.concat([n]):null,Bo(4,4,Um.bind(null,r,n),l)}function Rc(){}function Bm(n,r){var l=ot();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&vc(r,u[1])?u[0]:(l.memoizedState=[n,r],n)}function jm(n,r){var l=ot();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&vc(r,u[1]))return u[0];if(u=n(),dr){It(!0);try{n()}finally{It(!1)}}return l.memoizedState=[u,r],u}function Dc(n,r,l){return l===void 0||(ri&1073741824)!==0&&(Me&261930)===0?n.memoizedState=r:(n.memoizedState=l,n=Vg(),ke.lanes|=n,Ii|=n,l)}function Vm(n,r,l,u){return Jt(l,r)?l:Wr.current!==null?(n=Dc(n,l,u),Jt(n,r)||(ft=!0),n):(ri&42)===0||(ri&1073741824)!==0&&(Me&261930)===0?(ft=!0,n.memoizedState=l):(n=Vg(),ke.lanes|=n,Ii|=n,r)}function Gm(n,r,l,u,p){var m=G.p;G.p=m!==0&&8>m?m:8;var _=H.T,E={};H.T=E,Mc(n,!1,r,l);try{var N=p(),j=H.S;if(j!==null&&j(E,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var Q=NS(N,u);sl(n,r,Q,ln(n))}else sl(n,r,u,ln(n))}catch(te){sl(n,r,{then:function(){},status:"rejected",reason:te},ln())}finally{G.p=m,_!==null&&E.types!==null&&(_.types=E.types),H.T=_}}function US(){}function Nc(n,r,l,u){if(n.tag!==5)throw Error(a(476));var p=$m(n).queue;Gm(n,p,r,ae,l===null?US:function(){return Fm(n),l(u)})}function $m(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ai,lastRenderedState:ae},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ai,lastRenderedState:l},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function Fm(n){var r=$m(n);r.next===null&&(r=n.alternate.memoizedState),sl(n,r.next.queue,{},ln())}function Oc(){return Dt(wl)}function qm(){return ot().memoizedState}function Ym(){return ot().memoizedState}function PS(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var l=ln();n=Li(l);var u=Ri(r,n,l);u!==null&&(Qt(u,r,l),il(u,r,l)),r={cache:sc()},n.payload=r;return}r=r.return}}function BS(n,r,l){var u=ln();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},jo(n)?Qm(r,l):(l=Ku(n,r,l,u),l!==null&&(Qt(l,n,u),Zm(l,r,u)))}function Xm(n,r,l){var u=ln();sl(n,r,l,u)}function sl(n,r,l,u){var p={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(jo(n))Qm(r,p);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(p.hasEagerState=!0,p.eagerState=E,Jt(E,_))return So(n,r,p,0),Qe===null&&_o(),!1}catch{}if(l=Ku(n,r,p,u),l!==null)return Qt(l,n,u),Zm(l,r,u),!0}return!1}function Mc(n,r,l,u){if(u={lane:2,revertLane:fd(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},jo(n)){if(r)throw Error(a(479))}else r=Ku(n,l,u,2),r!==null&&Qt(r,n,2)}function jo(n){var r=n.alternate;return n===ke||r!==null&&r===ke}function Qm(n,r){Jr=Mo=!0;var l=n.pending;l===null?r.next=r:(r.next=l.next,l.next=r),n.pending=r}function Zm(n,r,l){if((l&4194048)!==0){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,tp(n,l)}}var ul={readContext:Dt,use:Ho,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it,useHostTransitionStatus:it,useFormState:it,useActionState:it,useOptimistic:it,useMemoCache:it,useCacheRefresh:it};ul.useEffectEvent=it;var Km={readContext:Dt,use:Ho,useCallback:function(n,r){return Vt().memoizedState=[n,r===void 0?null:r],n},useContext:Dt,useEffect:Mm,useImperativeHandle:function(n,r,l){l=l!=null?l.concat([n]):null,Po(4194308,4,Um.bind(null,r,n),l)},useLayoutEffect:function(n,r){return Po(4194308,4,n,r)},useInsertionEffect:function(n,r){Po(4,2,n,r)},useMemo:function(n,r){var l=Vt();r=r===void 0?null:r;var u=n();if(dr){It(!0);try{n()}finally{It(!1)}}return l.memoizedState=[u,r],u},useReducer:function(n,r,l){var u=Vt();if(l!==void 0){var p=l(r);if(dr){It(!0);try{l(r)}finally{It(!1)}}}else p=r;return u.memoizedState=u.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},u.queue=n,n=n.dispatch=BS.bind(null,ke,n),[u.memoizedState,n]},useRef:function(n){var r=Vt();return n={current:n},r.memoizedState=n},useState:function(n){n=Ac(n);var r=n.queue,l=Xm.bind(null,ke,r);return r.dispatch=l,[n.memoizedState,l]},useDebugValue:Rc,useDeferredValue:function(n,r){var l=Vt();return Dc(l,n,r)},useTransition:function(){var n=Ac(!1);return n=Gm.bind(null,ke,n.queue,!0,!1),Vt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,l){var u=ke,p=Vt();if(ze){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),Qe===null)throw Error(a(349));(Me&127)!==0||bm(u,r,l)}p.memoizedState=l;var m={value:l,getSnapshot:r};return p.queue=m,Mm(_m.bind(null,u,m,n),[n]),u.flags|=2048,ta(9,{destroy:void 0},vm.bind(null,u,m,l,r),null),l},useId:function(){var n=Vt(),r=Qe.identifierPrefix;if(ze){var l=Bn,u=Pn;l=(u&~(1<<32-Ge(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=Io++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=OS++,r="_"+r+"r_"+l.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:Oc,useFormState:Lm,useActionState:Lm,useOptimistic:function(n){var r=Vt();r.memoizedState=r.baseState=n;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=Mc.bind(null,ke,!0,l),l.dispatch=r,[n,r]},useMemoCache:Cc,useCacheRefresh:function(){return Vt().memoizedState=PS.bind(null,ke)},useEffectEvent:function(n){var r=Vt(),l={impl:n};return r.memoizedState=l,function(){if((je&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},Ic={readContext:Dt,use:Ho,useCallback:Bm,useContext:Dt,useEffect:Lc,useImperativeHandle:Pm,useInsertionEffect:zm,useLayoutEffect:Hm,useMemo:jm,useReducer:Uo,useRef:Om,useState:function(){return Uo(ai)},useDebugValue:Rc,useDeferredValue:function(n,r){var l=ot();return Vm(l,qe.memoizedState,n,r)},useTransition:function(){var n=Uo(ai)[0],r=ot().memoizedState;return[typeof n=="boolean"?n:ol(n),r]},useSyncExternalStore:ym,useId:qm,useHostTransitionStatus:Oc,useFormState:Rm,useActionState:Rm,useOptimistic:function(n,r){var l=ot();return xm(l,qe,n,r)},useMemoCache:Cc,useCacheRefresh:Ym};Ic.useEffectEvent=Im;var Wm={readContext:Dt,use:Ho,useCallback:Bm,useContext:Dt,useEffect:Lc,useImperativeHandle:Pm,useInsertionEffect:zm,useLayoutEffect:Hm,useMemo:jm,useReducer:kc,useRef:Om,useState:function(){return kc(ai)},useDebugValue:Rc,useDeferredValue:function(n,r){var l=ot();return qe===null?Dc(l,n,r):Vm(l,qe.memoizedState,n,r)},useTransition:function(){var n=kc(ai)[0],r=ot().memoizedState;return[typeof n=="boolean"?n:ol(n),r]},useSyncExternalStore:ym,useId:qm,useHostTransitionStatus:Oc,useFormState:Nm,useActionState:Nm,useOptimistic:function(n,r){var l=ot();return qe!==null?xm(l,qe,n,r):(l.baseState=n,[n,l.queue.dispatch])},useMemoCache:Cc,useCacheRefresh:Ym};Wm.useEffectEvent=Im;function zc(n,r,l,u){r=n.memoizedState,l=l(u,r),l=l==null?r:g({},r,l),n.memoizedState=l,n.lanes===0&&(n.updateQueue.baseState=l)}var Hc={enqueueSetState:function(n,r,l){n=n._reactInternals;var u=ln(),p=Li(u);p.payload=r,l!=null&&(p.callback=l),r=Ri(n,p,u),r!==null&&(Qt(r,n,u),il(r,n,u))},enqueueReplaceState:function(n,r,l){n=n._reactInternals;var u=ln(),p=Li(u);p.tag=1,p.payload=r,l!=null&&(p.callback=l),r=Ri(n,p,u),r!==null&&(Qt(r,n,u),il(r,n,u))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var l=ln(),u=Li(l);u.tag=2,r!=null&&(u.callback=r),r=Ri(n,u,l),r!==null&&(Qt(r,n,l),il(r,n,l))}};function Jm(n,r,l,u,p,m,_){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,m,_):r.prototype&&r.prototype.isPureReactComponent?!Qa(l,u)||!Qa(p,m):!0}function eg(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&&Hc.enqueueReplaceState(r,r.state,null)}function fr(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=g({},l));for(var p in n)l[p]===void 0&&(l[p]=n[p])}return l}function tg(n){vo(n)}function ng(n){console.error(n)}function ig(n){vo(n)}function Vo(n,r){try{var l=n.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function rg(n,r,l){try{var u=n.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Uc(n,r,l){return l=Li(l),l.tag=3,l.payload={element:null},l.callback=function(){Vo(n,r)},l}function ag(n){return n=Li(n),n.tag=3,n}function lg(n,r,l,u){var p=l.type.getDerivedStateFromError;if(typeof p=="function"){var m=u.value;n.payload=function(){return p(m)},n.callback=function(){rg(r,l,u)}}var _=l.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(n.callback=function(){rg(r,l,u),typeof p!="function"&&(zi===null?zi=new Set([this]):zi.add(this));var E=u.stack;this.componentDidCatch(u.value,{componentStack:E!==null?E:""})})}function jS(n,r,l,u,p){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&Yr(r,l,p,!0),l=tn.current,l!==null){switch(l.tag){case 31:case 13:return vn===null?es():l.alternate===null&&rt===0&&(rt=3),l.flags&=-257,l.flags|=65536,l.lanes=p,u===Lo?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),ud(n,u,p)),!1;case 22:return l.flags|=65536,u===Lo?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)),ud(n,u,p)),!1}throw Error(a(435,l.tag))}return ud(n,u,p),es(),!1}if(ze)return r=tn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,u!==ic&&(n=Error(a(422),{cause:u}),Wa(mn(n,l)))):(u!==ic&&(r=Error(a(423),{cause:u}),Wa(mn(r,l))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,u=mn(u,l),p=Uc(n.stateNode,u,p),pc(n,p),rt!==4&&(rt=2)),!1;var m=Error(a(520),{cause:u});if(m=mn(m,l),yl===null?yl=[m]:yl.push(m),rt!==4&&(rt=2),r===null)return!0;u=mn(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,n=p&-p,l.lanes|=n,n=Uc(l.stateNode,u,n),pc(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"&&(zi===null||!zi.has(m))))return l.flags|=65536,p&=-p,l.lanes|=p,p=ag(p),lg(p,n,l,u),pc(l,p),!1}l=l.return}while(l!==null);return!1}var Pc=Error(a(461)),ft=!1;function Nt(n,r,l,u){r.child=n===null?cm(r,null,l,u):cr(r,n.child,l,u)}function og(n,r,l,u,p){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 lr(r),u=_c(n,r,l,_,m,p),E=Sc(),n!==null&&!ft?(Ec(n,r,p),li(n,r,p)):(ze&&E&&tc(r),r.flags|=1,Nt(n,r,u,p),r.child)}function sg(n,r,l,u,p){if(n===null){var m=l.type;return typeof m=="function"&&!Wu(m)&&m.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=m,ug(n,r,m,u,p)):(n=xo(l.type,null,u,r,r.mode,p),n.ref=r.ref,n.return=r,r.child=n)}if(m=n.child,!Yc(n,p)){var _=m.memoizedProps;if(l=l.compare,l=l!==null?l:Qa,l(_,u)&&n.ref===r.ref)return li(n,r,p)}return r.flags|=1,n=ei(m,u),n.ref=r.ref,n.return=r,r.child=n}function ug(n,r,l,u,p){if(n!==null){var m=n.memoizedProps;if(Qa(m,u)&&n.ref===r.ref)if(ft=!1,r.pendingProps=u=m,Yc(n,p))(n.flags&131072)!==0&&(ft=!0);else return r.lanes=n.lanes,li(n,r,p)}return Bc(n,r,l,u,p)}function cg(n,r,l,u){var p=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,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~m}else u=0,r.child=null;return dg(n,r,m,l,u)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Ao(r,m!==null?m.cachePool:null),m!==null?hm(r,m):gc(),pm(r);else return u=r.lanes=536870912,dg(n,r,m!==null?m.baseLanes|l:l,l,u)}else m!==null?(Ao(r,m.cachePool),hm(r,m),Ni(),r.memoizedState=null):(n!==null&&Ao(r,null),gc(),Ni());return Nt(n,r,p,l),r.child}function cl(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function dg(n,r,l,u,p){var m=cc();return m=m===null?null:{parent:ct._currentValue,pool:m},r.memoizedState={baseLanes:l,cachePool:m},n!==null&&Ao(r,null),gc(),pm(r),n!==null&&Yr(n,r,u,!0),r.childLanes=p,null}function Go(n,r){return r=Fo({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function fg(n,r,l){return cr(r,n.child,null,l),n=Go(r,r.pendingProps),n.flags|=2,nn(r),r.memoizedState=null,n}function VS(n,r,l){var u=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(ze){if(u.mode==="hidden")return n=Go(r,u),r.lanes=536870912,cl(null,n);if(bc(r),(n=Je)?(n=Cy(n,bn),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Ci!==null?{id:Pn,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},l=Qp(n),l.return=r,r.child=l,Rt=r,Je=null)):n=null,n===null)throw ki(r);return r.lanes=536870912,null}return Go(r,u)}var m=n.memoizedState;if(m!==null){var _=m.dehydrated;if(bc(r),p)if(r.flags&256)r.flags&=-257,r=fg(n,r,l);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(ft||Yr(n,r,l,!1),p=(l&n.childLanes)!==0,ft||p){if(u=Qe,u!==null&&(_=np(u,l),_!==0&&_!==m.retryLane))throw m.retryLane=_,nr(n,_),Qt(u,n,_),Pc;es(),r=fg(n,r,l)}else n=m.treeContext,Je=_n(_.nextSibling),Rt=r,ze=!0,wi=null,bn=!1,n!==null&&Wp(r,n),r=Go(r,u),r.flags|=4096;return r}return n=ei(n.child,{mode:u.mode,children:u.children}),n.ref=r.ref,r.child=n,n.return=r,n}function $o(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 Bc(n,r,l,u,p){return lr(r),l=_c(n,r,l,u,void 0,p),u=Sc(),n!==null&&!ft?(Ec(n,r,p),li(n,r,p)):(ze&&u&&tc(r),r.flags|=1,Nt(n,r,l,p),r.child)}function hg(n,r,l,u,p,m){return lr(r),r.updateQueue=null,l=gm(r,u,l,p),mm(n),u=Sc(),n!==null&&!ft?(Ec(n,r,m),li(n,r,m)):(ze&&u&&tc(r),r.flags|=1,Nt(n,r,l,m),r.child)}function pg(n,r,l,u,p){if(lr(r),r.stateNode===null){var m=Gr,_=l.contextType;typeof _=="object"&&_!==null&&(m=Dt(_)),m=new l(u,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Hc,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=u,m.state=r.memoizedState,m.refs={},fc(r),_=l.contextType,m.context=typeof _=="object"&&_!==null?Dt(_):Gr,m.state=r.memoizedState,_=l.getDerivedStateFromProps,typeof _=="function"&&(zc(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&&Hc.enqueueReplaceState(m,m.state,null),al(r,u,m,p),rl(),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=fr(l,E);m.props=N;var j=m.context,Q=l.contextType;_=Gr,typeof Q=="object"&&Q!==null&&(_=Dt(Q));var te=l.getDerivedStateFromProps;Q=typeof te=="function"||typeof m.getSnapshotBeforeUpdate=="function",E=r.pendingProps!==E,Q||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(E||j!==_)&&eg(r,m,u,_),Ti=!1;var $=r.memoizedState;m.state=$,al(r,u,m,p),rl(),j=r.memoizedState,E||$!==j||Ti?(typeof te=="function"&&(zc(r,l,te,u),j=r.memoizedState),(N=Ti||Jm(r,l,N,u,$,j,_))?(Q||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=j),m.props=u,m.state=j,m.context=_,u=N):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{m=r.stateNode,hc(n,r),_=r.memoizedProps,Q=fr(l,_),m.props=Q,te=r.pendingProps,$=m.context,j=l.contextType,N=Gr,typeof j=="object"&&j!==null&&(N=Dt(j)),E=l.getDerivedStateFromProps,(j=typeof E=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(_!==te||$!==N)&&eg(r,m,u,N),Ti=!1,$=r.memoizedState,m.state=$,al(r,u,m,p),rl();var Y=r.memoizedState;_!==te||$!==Y||Ti||n!==null&&n.dependencies!==null&&wo(n.dependencies)?(typeof E=="function"&&(zc(r,l,E,u),Y=r.memoizedState),(Q=Ti||Jm(r,l,Q,u,$,Y,N)||n!==null&&n.dependencies!==null&&wo(n.dependencies))?(j||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(u,Y,N),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(u,Y,N)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||_===n.memoizedProps&&$===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&$===n.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=Y),m.props=u,m.state=Y,m.context=N,u=Q):(typeof m.componentDidUpdate!="function"||_===n.memoizedProps&&$===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&$===n.memoizedState||(r.flags|=1024),u=!1)}return m=u,$o(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=cr(r,n.child,null,p),r.child=cr(r,null,l,p)):Nt(n,r,l,p),r.memoizedState=m.state,n=r.child):n=li(n,r,p),n}function mg(n,r,l,u){return rr(),r.flags|=256,Nt(n,r,l,u),r.child}var jc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Vc(n){return{baseLanes:n,cachePool:rm()}}function Gc(n,r,l){return n=n!==null?n.childLanes&~l:0,r&&(n|=an),n}function gg(n,r,l){var u=r.pendingProps,p=!1,m=(r.flags&128)!==0,_;if((_=m)||(_=n!==null&&n.memoizedState===null?!1:(lt.current&2)!==0),_&&(p=!0,r.flags&=-129),_=(r.flags&32)!==0,r.flags&=-33,n===null){if(ze){if(p?Di(r):Ni(),(n=Je)?(n=Cy(n,bn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Ci!==null?{id:Pn,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},l=Qp(n),l.return=r,r.child=l,Rt=r,Je=null)):n=null,n===null)throw ki(r);return wd(n)?r.lanes=32:r.lanes=536870912,null}var E=u.children;return u=u.fallback,p?(Ni(),p=r.mode,E=Fo({mode:"hidden",children:E},p),u=ir(u,p,l,null),E.return=r,u.return=r,E.sibling=u,r.child=E,u=r.child,u.memoizedState=Vc(l),u.childLanes=Gc(n,_,l),r.memoizedState=jc,cl(null,u)):(Di(r),$c(r,E))}var N=n.memoizedState;if(N!==null&&(E=N.dehydrated,E!==null)){if(m)r.flags&256?(Di(r),r.flags&=-257,r=Fc(n,r,l)):r.memoizedState!==null?(Ni(),r.child=n.child,r.flags|=128,r=null):(Ni(),E=u.fallback,p=r.mode,u=Fo({mode:"visible",children:u.children},p),E=ir(E,p,l,null),E.flags|=2,u.return=r,E.return=r,u.sibling=E,r.child=u,cr(r,n.child,null,l),u=r.child,u.memoizedState=Vc(l),u.childLanes=Gc(n,_,l),r.memoizedState=jc,r=cl(null,u));else if(Di(r),wd(E)){if(_=E.nextSibling&&E.nextSibling.dataset,_)var j=_.dgst;_=j,u=Error(a(419)),u.stack="",u.digest=_,Wa({value:u,source:null,stack:null}),r=Fc(n,r,l)}else if(ft||Yr(n,r,l,!1),_=(l&n.childLanes)!==0,ft||_){if(_=Qe,_!==null&&(u=np(_,l),u!==0&&u!==N.retryLane))throw N.retryLane=u,nr(n,u),Qt(_,n,u),Pc;Cd(E)||es(),r=Fc(n,r,l)}else Cd(E)?(r.flags|=192,r.child=n.child,r=null):(n=N.treeContext,Je=_n(E.nextSibling),Rt=r,ze=!0,wi=null,bn=!1,n!==null&&Wp(r,n),r=$c(r,u.children),r.flags|=4096);return r}return p?(Ni(),E=u.fallback,p=r.mode,N=n.child,j=N.sibling,u=ei(N,{mode:"hidden",children:u.children}),u.subtreeFlags=N.subtreeFlags&65011712,j!==null?E=ei(j,E):(E=ir(E,p,l,null),E.flags|=2),E.return=r,u.return=r,u.sibling=E,r.child=u,cl(null,u),u=r.child,E=n.child.memoizedState,E===null?E=Vc(l):(p=E.cachePool,p!==null?(N=ct._currentValue,p=p.parent!==N?{parent:N,pool:N}:p):p=rm(),E={baseLanes:E.baseLanes|l,cachePool:p}),u.memoizedState=E,u.childLanes=Gc(n,_,l),r.memoizedState=jc,cl(n.child,u)):(Di(r),l=n.child,n=l.sibling,l=ei(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 $c(n,r){return r=Fo({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function Fo(n,r){return n=en(22,n,null,r),n.lanes=0,n}function Fc(n,r,l){return cr(r,n.child,null,l),n=$c(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function yg(n,r,l){n.lanes|=r;var u=n.alternate;u!==null&&(u.lanes|=r),lc(n.return,r,l)}function qc(n,r,l,u,p,m){var _=n.memoizedState;_===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:p,treeForkCount:m}:(_.isBackwards=r,_.rendering=null,_.renderingStartTime=0,_.last=u,_.tail=l,_.tailMode=p,_.treeForkCount=m)}function bg(n,r,l){var u=r.pendingProps,p=u.revealOrder,m=u.tail;u=u.children;var _=lt.current,E=(_&2)!==0;if(E?(_=_&1|2,r.flags|=128):_&=1,A(lt,_),Nt(n,r,u,l),u=ze?Ka:0,!E&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&yg(n,l,r);else if(n.tag===19)yg(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(p){case"forwards":for(l=r.child,p=null;l!==null;)n=l.alternate,n!==null&&Oo(n)===null&&(p=l),l=l.sibling;l=p,l===null?(p=r.child,r.child=null):(p=l.sibling,l.sibling=null),qc(r,!1,p,l,m,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,p=r.child,r.child=null;p!==null;){if(n=p.alternate,n!==null&&Oo(n)===null){r.child=p;break}n=p.sibling,p.sibling=l,l=p,p=n}qc(r,!0,l,null,m,u);break;case"together":qc(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function li(n,r,l){if(n!==null&&(r.dependencies=n.dependencies),Ii|=r.lanes,(l&r.childLanes)===0)if(n!==null){if(Yr(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=ei(n,n.pendingProps),r.child=l,l.return=r;n.sibling!==null;)n=n.sibling,l=l.sibling=ei(n,n.pendingProps),l.return=r;l.sibling=null}return r.child}function Yc(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&wo(n)))}function GS(n,r,l){switch(r.tag){case 3:Oe(r,r.stateNode.containerInfo),Ai(r,ct,n.memoizedState.cache),rr();break;case 27:case 5:He(r);break;case 4:Oe(r,r.stateNode.containerInfo);break;case 10:Ai(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,bc(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Di(r),r.flags|=128,null):(l&r.child.childLanes)!==0?gg(n,r,l):(Di(r),n=li(n,r,l),n!==null?n.sibling:null);Di(r);break;case 19:var p=(n.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(Yr(n,r,l,!1),u=(l&r.childLanes)!==0),p){if(u)return bg(n,r,l);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),A(lt,lt.current),u)break;return null;case 22:return r.lanes=0,cg(n,r,l,r.pendingProps);case 24:Ai(r,ct,n.memoizedState.cache)}return li(n,r,l)}function vg(n,r,l){if(n!==null)if(n.memoizedProps!==r.pendingProps)ft=!0;else{if(!Yc(n,l)&&(r.flags&128)===0)return ft=!1,GS(n,r,l);ft=(n.flags&131072)!==0}else ft=!1,ze&&(r.flags&1048576)!==0&&Kp(r,Ka,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(n=sr(r.elementType),r.type=n,typeof n=="function")Wu(n)?(u=fr(n,u),r.tag=1,r=pg(null,r,n,u,l)):(r.tag=0,r=Bc(null,r,n,u,l));else{if(n!=null){var p=n.$$typeof;if(p===U){r.tag=11,r=og(null,r,n,u,l);break e}else if(p===F){r.tag=14,r=sg(null,r,n,u,l);break e}}throw r=ie(n)||n,Error(a(306,r,""))}}return r;case 0:return Bc(n,r,r.type,r.pendingProps,l);case 1:return u=r.type,p=fr(u,r.pendingProps),pg(n,r,u,p,l);case 3:e:{if(Oe(r,r.stateNode.containerInfo),n===null)throw Error(a(387));u=r.pendingProps;var m=r.memoizedState;p=m.element,hc(n,r),al(r,u,null,l);var _=r.memoizedState;if(u=_.cache,Ai(r,ct,u),u!==m.cache&&oc(r,[ct],l,!0),rl(),u=_.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:_.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=mg(n,r,u,l);break e}else if(u!==p){p=mn(Error(a(424)),r),Wa(p),r=mg(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,Je=_n(n.firstChild),Rt=r,ze=!0,wi=null,bn=!0,l=cm(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(rr(),u===p){r=li(n,r,l);break e}Nt(n,r,u,l)}r=r.child}return r;case 26:return $o(n,r),n===null?(l=Ry(r.type,null,r.pendingProps,null))?r.memoizedState=l:ze||(l=r.type,n=r.pendingProps,u=os(he.current).createElement(l),u[Lt]=r,u[Gt]=n,Ot(u,l,n),xt(u),r.stateNode=u):r.memoizedState=Ry(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return He(r),n===null&&ze&&(u=r.stateNode=Ay(r.type,r.pendingProps,he.current),Rt=r,bn=!0,p=Je,Bi(r.type)?(kd=p,Je=_n(u.firstChild)):Je=p),Nt(n,r,r.pendingProps.children,l),$o(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&ze&&((p=u=Je)&&(u=vE(u,r.type,r.pendingProps,bn),u!==null?(r.stateNode=u,Rt=r,Je=_n(u.firstChild),bn=!1,p=!0):p=!1),p||ki(r)),He(r),p=r.type,m=r.pendingProps,_=n!==null?n.memoizedProps:null,u=m.children,Sd(p,m)?u=null:_!==null&&Sd(p,_)&&(r.flags|=32),r.memoizedState!==null&&(p=_c(n,r,MS,null,null,l),wl._currentValue=p),$o(n,r),Nt(n,r,u,l),r.child;case 6:return n===null&&ze&&((n=l=Je)&&(l=_E(l,r.pendingProps,bn),l!==null?(r.stateNode=l,Rt=r,Je=null,n=!0):n=!1),n||ki(r)),null;case 13:return gg(n,r,l);case 4:return Oe(r,r.stateNode.containerInfo),u=r.pendingProps,n===null?r.child=cr(r,null,u,l):Nt(n,r,u,l),r.child;case 11:return og(n,r,r.type,r.pendingProps,l);case 7:return Nt(n,r,r.pendingProps,l),r.child;case 8:return Nt(n,r,r.pendingProps.children,l),r.child;case 12:return Nt(n,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,Ai(r,r.type,u.value),Nt(n,r,u.children,l),r.child;case 9:return p=r.type._context,u=r.pendingProps.children,lr(r),p=Dt(p),u=u(p),r.flags|=1,Nt(n,r,u,l),r.child;case 14:return sg(n,r,r.type,r.pendingProps,l);case 15:return ug(n,r,r.type,r.pendingProps,l);case 19:return bg(n,r,l);case 31:return VS(n,r,l);case 22:return cg(n,r,l,r.pendingProps);case 24:return lr(r),u=Dt(ct),n===null?(p=cc(),p===null&&(p=Qe,m=sc(),p.pooledCache=m,m.refCount++,m!==null&&(p.pooledCacheLanes|=l),p=m),r.memoizedState={parent:u,cache:p},fc(r),Ai(r,ct,p)):((n.lanes&l)!==0&&(hc(n,r),al(r,null,null,l),rl()),p=n.memoizedState,m=r.memoizedState,p.parent!==u?(p={parent:u,cache:u},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),Ai(r,ct,u)):(u=m.cache,Ai(r,ct,u),u!==p.cache&&oc(r,[ct],l,!0))),Nt(n,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function oi(n){n.flags|=4}function Xc(n,r,l,u,p){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(qg())n.flags|=8192;else throw ur=Lo,dc}else n.flags&=-16777217}function _g(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Iy(r))if(qg())n.flags|=8192;else throw ur=Lo,dc}function qo(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?Tn():536870912,n.lanes|=r,aa|=r)}function dl(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 et(n){var r=n.alternate!==null&&n.alternate.child===n.child,l=0,u=0;if(r)for(var p=n.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=u,n.childLanes=l,r}function $S(n,r,l){var u=r.pendingProps;switch(nc(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(r),null;case 1:return et(r),null;case 3:return l=r.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),ii(ct),be(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(n===null||n.child===null)&&(qr(r)?oi(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,rc())),et(r),null;case 26:var p=r.type,m=r.memoizedState;return n===null?(oi(r),m!==null?(et(r),_g(r,m)):(et(r),Xc(r,p,null,u,l))):m?m!==n.memoizedState?(oi(r),et(r),_g(r,m)):(et(r),r.flags&=-16777217):(n=n.memoizedProps,n!==u&&oi(r),et(r),Xc(r,p,n,u,l)),null;case 27:if(tt(r),l=he.current,p=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&oi(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return et(r),null}n=ce.current,qr(r)?Jp(r):(n=Ay(p,u,l),r.stateNode=n,oi(r))}return et(r),null;case 5:if(tt(r),p=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&oi(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return et(r),null}if(m=ce.current,qr(r))Jp(r);else{var _=os(he.current);switch(m){case 1:m=_.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:m=_.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":m=_.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":m=_.createElementNS("http://www.w3.org/1998/Math/MathML",p);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(p,{is:u.is}):_.createElement(p)}}m[Lt]=r,m[Gt]=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(Ot(m,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&oi(r)}}return et(r),Xc(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,l),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==u&&oi(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(n=he.current,qr(r)){if(n=r.stateNode,l=r.memoizedProps,u=null,p=Rt,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}n[Lt]=r,n=!!(n.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||gy(n.nodeValue,l)),n||ki(r,!0)}else n=os(n).createTextNode(u),n[Lt]=r,r.stateNode=n}return et(r),null;case 31:if(l=r.memoizedState,n===null||n.memoizedState!==null){if(u=qr(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[Lt]=r}else rr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;et(r),n=!1}else l=rc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return r.flags&256?(nn(r),r):(nn(r),null);if((r.flags&128)!==0)throw Error(a(558))}return et(r),null;case 13:if(u=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=qr(r),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(a(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[Lt]=r}else rr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;et(r),p=!1}else p=rc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(nn(r),r):(nn(r),null)}return nn(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,n=n!==null&&n.memoizedState!==null,l&&(u=r.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==p&&(u.flags|=2048)),l!==n&&l&&(r.child.flags|=8192),qo(r,r.updateQueue),et(r),null);case 4:return be(),n===null&&gd(r.stateNode.containerInfo),et(r),null;case 10:return ii(r.type),et(r),null;case 19:if(X(lt),u=r.memoizedState,u===null)return et(r),null;if(p=(r.flags&128)!==0,m=u.rendering,m===null)if(p)dl(u,!1);else{if(rt!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(m=Oo(n),m!==null){for(r.flags|=128,dl(u,!1),n=m.updateQueue,r.updateQueue=n,qo(r,n),r.subtreeFlags=0,n=l,l=r.child;l!==null;)Xp(l,n),l=l.sibling;return A(lt,lt.current&1|2),ze&&ti(r,u.treeForkCount),r.child}n=n.sibling}u.tail!==null&&yt()>Ko&&(r.flags|=128,p=!0,dl(u,!1),r.lanes=4194304)}else{if(!p)if(n=Oo(m),n!==null){if(r.flags|=128,p=!0,n=n.updateQueue,r.updateQueue=n,qo(r,n),dl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!ze)return et(r),null}else 2*yt()-u.renderingStartTime>Ko&&l!==536870912&&(r.flags|=128,p=!0,dl(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=yt(),n.sibling=null,l=lt.current,A(lt,p?l&1|2:l&1),ze&&ti(r,u.treeForkCount),n):(et(r),null);case 22:case 23:return nn(r),yc(),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&&(et(r),r.subtreeFlags&6&&(r.flags|=8192)):et(r),l=r.updateQueue,l!==null&&qo(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&&X(or),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),ii(ct),et(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function FS(n,r){switch(nc(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return ii(ct),be(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return tt(r),null;case 31:if(r.memoizedState!==null){if(nn(r),r.alternate===null)throw Error(a(340));rr()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(nn(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));rr()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return X(lt),null;case 4:return be(),null;case 10:return ii(r.type),null;case 22:case 23:return nn(r),yc(),n!==null&&X(or),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return ii(ct),null;case 25:return null;default:return null}}function Sg(n,r){switch(nc(r),r.tag){case 3:ii(ct),be();break;case 26:case 27:case 5:tt(r);break;case 4:be();break;case 31:r.memoizedState!==null&&nn(r);break;case 13:nn(r);break;case 19:X(lt);break;case 10:ii(r.type);break;case 22:case 23:nn(r),yc(),n!==null&&X(or);break;case 24:ii(ct)}}function fl(n,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var p=u.next;l=p;do{if((l.tag&n)===n){u=void 0;var m=l.create,_=l.inst;u=m(),_.destroy=u}l=l.next}while(l!==p)}}catch(E){Fe(r,r.return,E)}}function Oi(n,r,l){try{var u=r.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var m=p.next;u=m;do{if((u.tag&n)===n){var _=u.inst,E=_.destroy;if(E!==void 0){_.destroy=void 0,p=r;var N=l,j=E;try{j()}catch(Q){Fe(p,N,Q)}}}u=u.next}while(u!==m)}}catch(Q){Fe(r,r.return,Q)}}function Eg(n){var r=n.updateQueue;if(r!==null){var l=n.stateNode;try{fm(r,l)}catch(u){Fe(n,n.return,u)}}}function xg(n,r,l){l.props=fr(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(u){Fe(n,r,u)}}function hl(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(p){Fe(n,r,p)}}function jn(n,r){var l=n.ref,u=n.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(p){Fe(n,r,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(p){Fe(n,r,p)}else l.current=null}function Cg(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(p){Fe(n,n.return,p)}}function Qc(n,r,l){try{var u=n.stateNode;hE(u,n.type,l,r),u[Gt]=r}catch(p){Fe(n,n.return,p)}}function wg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Bi(n.type)||n.tag===4}function Zc(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||wg(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&&Bi(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 Kc(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=Wn));else if(u!==4&&(u===27&&Bi(n.type)&&(l=n.stateNode,r=null),n=n.child,n!==null))for(Kc(n,r,l),n=n.sibling;n!==null;)Kc(n,r,l),n=n.sibling}function Yo(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&&Bi(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(Yo(n,r,l),n=n.sibling;n!==null;)Yo(n,r,l),n=n.sibling}function kg(n){var r=n.stateNode,l=n.memoizedProps;try{for(var u=n.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);Ot(r,u,l),r[Lt]=n,r[Gt]=l}catch(m){Fe(n,n.return,m)}}var si=!1,ht=!1,Wc=!1,Ag=typeof WeakSet=="function"?WeakSet:Set,Ct=null;function qS(n,r){if(n=n.containerInfo,vd=ps,n=Pp(n),Fu(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 p=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{l.nodeType,m.nodeType}catch{l=null;break e}var _=0,E=-1,N=-1,j=0,Q=0,te=n,$=null;t:for(;;){for(var Y;te!==l||p!==0&&te.nodeType!==3||(E=_+p),te!==m||u!==0&&te.nodeType!==3||(N=_+u),te.nodeType===3&&(_+=te.nodeValue.length),(Y=te.firstChild)!==null;)$=te,te=Y;for(;;){if(te===n)break t;if($===l&&++j===p&&(E=_),$===m&&++Q===u&&(N=_),(Y=te.nextSibling)!==null)break;te=$,$=te.parentNode}te=Y}l=E===-1||N===-1?null:{start:E,end:N}}else l=null}l=l||{start:0,end:0}}else l=null;for(_d={focusedElem:n,selectionRange:l},ps=!1,Ct=r;Ct!==null;)if(r=Ct,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,Ct=n;else for(;Ct!==null;){switch(r=Ct,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++)p=n[l],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&m!==null){n=void 0,l=r,p=m.memoizedProps,m=m.memoizedState,u=l.stateNode;try{var de=fr(l.type,p);n=u.getSnapshotBeforeUpdate(de,m),u.__reactInternalSnapshotBeforeUpdate=n}catch(ve){Fe(l,l.return,ve)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,l=n.nodeType,l===9)xd(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":xd(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,Ct=n;break}Ct=r.return}}function Tg(n,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:ci(n,l),u&4&&fl(5,l);break;case 1:if(ci(n,l),u&4)if(n=l.stateNode,r===null)try{n.componentDidMount()}catch(_){Fe(l,l.return,_)}else{var p=fr(l.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(p,r,n.__reactInternalSnapshotBeforeUpdate)}catch(_){Fe(l,l.return,_)}}u&64&&Eg(l),u&512&&hl(l,l.return);break;case 3:if(ci(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{fm(n,r)}catch(_){Fe(l,l.return,_)}}break;case 27:r===null&&u&4&&kg(l);case 26:case 5:ci(n,l),r===null&&u&4&&Cg(l),u&512&&hl(l,l.return);break;case 12:ci(n,l);break;case 31:ci(n,l),u&4&&Dg(n,l);break;case 13:ci(n,l),u&4&&Ng(n,l),u&64&&(n=l.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(l=tE.bind(null,l),SE(n,l))));break;case 22:if(u=l.memoizedState!==null||si,!u){r=r!==null&&r.memoizedState!==null||ht,p=si;var m=ht;si=u,(ht=r)&&!m?di(n,l,(l.subtreeFlags&8772)!==0):ci(n,l),si=p,ht=m}break;case 30:break;default:ci(n,l)}}function Lg(n){var r=n.alternate;r!==null&&(n.alternate=null,Lg(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&Tu(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 nt=null,Ft=!1;function ui(n,r,l){for(l=l.child;l!==null;)Rg(n,r,l),l=l.sibling}function Rg(n,r,l){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(Tt,l)}catch{}switch(l.tag){case 26:ht||jn(l,r),ui(n,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:ht||jn(l,r);var u=nt,p=Ft;Bi(l.type)&&(nt=l.stateNode,Ft=!1),ui(n,r,l),El(l.stateNode),nt=u,Ft=p;break;case 5:ht||jn(l,r);case 6:if(u=nt,p=Ft,nt=null,ui(n,r,l),nt=u,Ft=p,nt!==null)if(Ft)try{(nt.nodeType===9?nt.body:nt.nodeName==="HTML"?nt.ownerDocument.body:nt).removeChild(l.stateNode)}catch(m){Fe(l,r,m)}else try{nt.removeChild(l.stateNode)}catch(m){Fe(l,r,m)}break;case 18:nt!==null&&(Ft?(n=nt,Ey(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,l.stateNode),ha(n)):Ey(nt,l.stateNode));break;case 4:u=nt,p=Ft,nt=l.stateNode.containerInfo,Ft=!0,ui(n,r,l),nt=u,Ft=p;break;case 0:case 11:case 14:case 15:Oi(2,l,r),ht||Oi(4,l,r),ui(n,r,l);break;case 1:ht||(jn(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&xg(l,r,u)),ui(n,r,l);break;case 21:ui(n,r,l);break;case 22:ht=(u=ht)||l.memoizedState!==null,ui(n,r,l),ht=u;break;default:ui(n,r,l)}}function Dg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ha(n)}catch(l){Fe(r,r.return,l)}}}function Ng(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ha(n)}catch(l){Fe(r,r.return,l)}}function YS(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new Ag),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new Ag),r;default:throw Error(a(435,n.tag))}}function Xo(n,r){var l=YS(n);r.forEach(function(u){if(!l.has(u)){l.add(u);var p=nE.bind(null,n,u);u.then(p,p)}})}function qt(n,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var p=l[u],m=n,_=r,E=_;e:for(;E!==null;){switch(E.tag){case 27:if(Bi(E.type)){nt=E.stateNode,Ft=!1;break e}break;case 5:nt=E.stateNode,Ft=!1;break e;case 3:case 4:nt=E.stateNode.containerInfo,Ft=!0;break e}E=E.return}if(nt===null)throw Error(a(160));Rg(m,_,p),nt=null,Ft=!1,m=p.alternate,m!==null&&(m.return=null),p.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Og(r,n),r=r.sibling}var Rn=null;function Og(n,r){var l=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:qt(r,n),Yt(n),u&4&&(Oi(3,n,n.return),fl(3,n),Oi(5,n,n.return));break;case 1:qt(r,n),Yt(n),u&512&&(ht||l===null||jn(l,l.return)),u&64&&si&&(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 p=Rn;if(qt(r,n),Yt(n),u&512&&(ht||l===null||jn(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,p=p.ownerDocument||p;t:switch(u){case"title":m=p.getElementsByTagName("title")[0],(!m||m[Ba]||m[Lt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=p.createElement(u),p.head.insertBefore(m,p.querySelector("head > title"))),Ot(m,u,l),m[Lt]=n,xt(m),u=m;break e;case"link":var _=Oy("link","href",p).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=p.createElement(u),Ot(m,u,l),p.head.appendChild(m);break;case"meta":if(_=Oy("meta","content",p).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=p.createElement(u),Ot(m,u,l),p.head.appendChild(m);break;default:throw Error(a(468,u))}m[Lt]=n,xt(m),u=m}n.stateNode=u}else My(p,n.type,n.stateNode);else n.stateNode=Ny(p,u,n.memoizedProps);else m!==u?(m===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):m.count--,u===null?My(p,n.type,n.stateNode):Ny(p,u,n.memoizedProps)):u===null&&n.stateNode!==null&&Qc(n,n.memoizedProps,l.memoizedProps)}break;case 27:qt(r,n),Yt(n),u&512&&(ht||l===null||jn(l,l.return)),l!==null&&u&4&&Qc(n,n.memoizedProps,l.memoizedProps);break;case 5:if(qt(r,n),Yt(n),u&512&&(ht||l===null||jn(l,l.return)),n.flags&32){p=n.stateNode;try{zr(p,"")}catch(de){Fe(n,n.return,de)}}u&4&&n.stateNode!=null&&(p=n.memoizedProps,Qc(n,p,l!==null?l.memoizedProps:p)),u&1024&&(Wc=!0);break;case 6:if(qt(r,n),Yt(n),u&4){if(n.stateNode===null)throw Error(a(162));u=n.memoizedProps,l=n.stateNode;try{l.nodeValue=u}catch(de){Fe(n,n.return,de)}}break;case 3:if(cs=null,p=Rn,Rn=ss(r.containerInfo),qt(r,n),Rn=p,Yt(n),u&4&&l!==null&&l.memoizedState.isDehydrated)try{ha(r.containerInfo)}catch(de){Fe(n,n.return,de)}Wc&&(Wc=!1,Mg(n));break;case 4:u=Rn,Rn=ss(n.stateNode.containerInfo),qt(r,n),Yt(n),Rn=u;break;case 12:qt(r,n),Yt(n);break;case 31:qt(r,n),Yt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Xo(n,u)));break;case 13:qt(r,n),Yt(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Zo=yt()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Xo(n,u)));break;case 22:p=n.memoizedState!==null;var N=l!==null&&l.memoizedState!==null,j=si,Q=ht;if(si=j||p,ht=Q||N,qt(r,n),ht=Q,si=j,Yt(n),u&8192)e:for(r=n.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(l===null||N||si||ht||hr(n)),l=null,r=n;;){if(r.tag===5||r.tag===26){if(l===null){N=l=r;try{if(m=N.stateNode,p)_=m.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{E=N.stateNode;var te=N.memoizedProps.style,$=te!=null&&te.hasOwnProperty("display")?te.display:null;E.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(de){Fe(N,N.return,de)}}}else if(r.tag===6){if(l===null){N=r;try{N.stateNode.nodeValue=p?"":N.memoizedProps}catch(de){Fe(N,N.return,de)}}}else if(r.tag===18){if(l===null){N=r;try{var Y=N.stateNode;p?xy(Y,!0):xy(N.stateNode,!1)}catch(de){Fe(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,Xo(n,l))));break;case 19:qt(r,n),Yt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Xo(n,u)));break;case 30:break;case 21:break;default:qt(r,n),Yt(n)}}function Yt(n){var r=n.flags;if(r&2){try{for(var l,u=n.return;u!==null;){if(wg(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var p=l.stateNode,m=Zc(n);Yo(n,m,p);break;case 5:var _=l.stateNode;l.flags&32&&(zr(_,""),l.flags&=-33);var E=Zc(n);Yo(n,E,_);break;case 3:case 4:var N=l.stateNode.containerInfo,j=Zc(n);Kc(n,j,N);break;default:throw Error(a(161))}}catch(Q){Fe(n,n.return,Q)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function Mg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;Mg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function ci(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Tg(n,r.alternate,r),r=r.sibling}function hr(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:Oi(4,r,r.return),hr(r);break;case 1:jn(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&xg(r,r.return,l),hr(r);break;case 27:El(r.stateNode);case 26:case 5:jn(r,r.return),hr(r);break;case 22:r.memoizedState===null&&hr(r);break;case 30:hr(r);break;default:hr(r)}n=n.sibling}}function di(n,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,p=n,m=r,_=m.flags;switch(m.tag){case 0:case 11:case 15:di(p,m,l),fl(4,m);break;case 1:if(di(p,m,l),u=m,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(j){Fe(u,u.return,j)}if(u=m,p=u.updateQueue,p!==null){var E=u.stateNode;try{var N=p.shared.hiddenCallbacks;if(N!==null)for(p.shared.hiddenCallbacks=null,p=0;p<N.length;p++)dm(N[p],E)}catch(j){Fe(u,u.return,j)}}l&&_&64&&Eg(m),hl(m,m.return);break;case 27:kg(m);case 26:case 5:di(p,m,l),l&&u===null&&_&4&&Cg(m),hl(m,m.return);break;case 12:di(p,m,l);break;case 31:di(p,m,l),l&&_&4&&Dg(p,m);break;case 13:di(p,m,l),l&&_&4&&Ng(p,m);break;case 22:m.memoizedState===null&&di(p,m,l),hl(m,m.return);break;case 30:break;default:di(p,m,l)}r=r.sibling}}function Jc(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&&Ja(l))}function ed(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Ja(n))}function Dn(n,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Ig(n,r,l,u),r=r.sibling}function Ig(n,r,l,u){var p=r.flags;switch(r.tag){case 0:case 11:case 15:Dn(n,r,l,u),p&2048&&fl(9,r);break;case 1:Dn(n,r,l,u);break;case 3:Dn(n,r,l,u),p&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Ja(n)));break;case 12:if(p&2048){Dn(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){Fe(r,r.return,N)}}else Dn(n,r,l,u);break;case 31:Dn(n,r,l,u);break;case 13:Dn(n,r,l,u);break;case 23:break;case 22:m=r.stateNode,_=r.alternate,r.memoizedState!==null?m._visibility&2?Dn(n,r,l,u):pl(n,r):m._visibility&2?Dn(n,r,l,u):(m._visibility|=2,na(n,r,l,u,(r.subtreeFlags&10256)!==0||!1)),p&2048&&Jc(_,r);break;case 24:Dn(n,r,l,u),p&2048&&ed(r.alternate,r);break;default:Dn(n,r,l,u)}}function na(n,r,l,u,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=n,_=r,E=l,N=u,j=_.flags;switch(_.tag){case 0:case 11:case 15:na(m,_,E,N,p),fl(8,_);break;case 23:break;case 22:var Q=_.stateNode;_.memoizedState!==null?Q._visibility&2?na(m,_,E,N,p):pl(m,_):(Q._visibility|=2,na(m,_,E,N,p)),p&&j&2048&&Jc(_.alternate,_);break;case 24:na(m,_,E,N,p),p&&j&2048&&ed(_.alternate,_);break;default:na(m,_,E,N,p)}r=r.sibling}}function pl(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=n,u=r,p=u.flags;switch(u.tag){case 22:pl(l,u),p&2048&&Jc(u.alternate,u);break;case 24:pl(l,u),p&2048&&ed(u.alternate,u);break;default:pl(l,u)}r=r.sibling}}var ml=8192;function ia(n,r,l){if(n.subtreeFlags&ml)for(n=n.child;n!==null;)zg(n,r,l),n=n.sibling}function zg(n,r,l){switch(n.tag){case 26:ia(n,r,l),n.flags&ml&&n.memoizedState!==null&&OE(l,Rn,n.memoizedState,n.memoizedProps);break;case 5:ia(n,r,l);break;case 3:case 4:var u=Rn;Rn=ss(n.stateNode.containerInfo),ia(n,r,l),Rn=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=ml,ml=16777216,ia(n,r,l),ml=u):ia(n,r,l));break;default:ia(n,r,l)}}function Hg(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 gl(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];Ct=u,Pg(u,n)}Hg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Ug(n),n=n.sibling}function Ug(n){switch(n.tag){case 0:case 11:case 15:gl(n),n.flags&2048&&Oi(9,n,n.return);break;case 3:gl(n);break;case 12:gl(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,Qo(n)):gl(n);break;default:gl(n)}}function Qo(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];Ct=u,Pg(u,n)}Hg(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:Oi(8,r,r.return),Qo(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,Qo(r));break;default:Qo(r)}n=n.sibling}}function Pg(n,r){for(;Ct!==null;){var l=Ct;switch(l.tag){case 0:case 11:case 15:Oi(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:Ja(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,Ct=u;else e:for(l=n;Ct!==null;){u=Ct;var p=u.sibling,m=u.return;if(Lg(u),u===l){Ct=null;break e}if(p!==null){p.return=m,Ct=p;break e}Ct=m}}}var XS={getCacheForType:function(n){var r=Dt(ct),l=r.data.get(n);return l===void 0&&(l=n(),r.data.set(n,l)),l},cacheSignal:function(){return Dt(ct).controller.signal}},QS=typeof WeakMap=="function"?WeakMap:Map,je=0,Qe=null,De=null,Me=0,$e=0,rn=null,Mi=!1,ra=!1,td=!1,fi=0,rt=0,Ii=0,pr=0,nd=0,an=0,aa=0,yl=null,Xt=null,id=!1,Zo=0,Bg=0,Ko=1/0,Wo=null,zi=null,bt=0,Hi=null,la=null,hi=0,rd=0,ad=null,jg=null,bl=0,ld=null;function ln(){return(je&2)!==0&&Me!==0?Me&-Me:H.T!==null?fd():ip()}function Vg(){if(an===0)if((Me&536870912)===0||ze){var n=Tr;Tr<<=1,(Tr&3932160)===0&&(Tr=262144),an=n}else an=536870912;return n=tn.current,n!==null&&(n.flags|=32),an}function Qt(n,r,l){(n===Qe&&($e===2||$e===9)||n.cancelPendingCommit!==null)&&(oa(n,0),Ui(n,Me,an,!1)),Pa(n,l),((je&2)===0||n!==Qe)&&(n===Qe&&((je&2)===0&&(pr|=l),rt===4&&Ui(n,Me,an,!1)),Vn(n))}function Gg(n,r,l){if((je&6)!==0)throw Error(a(327));var u=!l&&(r&127)===0&&(r&n.expiredLanes)===0||xe(n,r),p=u?WS(n,r):sd(n,r,!0),m=u;do{if(p===0){ra&&!u&&Ui(n,r,0,!1);break}else{if(l=n.current.alternate,m&&!ZS(l)){p=sd(n,r,!1),m=!1;continue}if(p===2){if(m=r,n.errorRecoveryDisabledLanes&m)var _=0;else _=n.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){r=_;e:{var E=n;p=yl;var N=E.current.memoizedState.isDehydrated;if(N&&(oa(E,_).flags|=256),_=sd(E,_,!1),_!==2){if(td&&!N){E.errorRecoveryDisabledLanes|=m,pr|=m,p=4;break e}m=Xt,Xt=p,m!==null&&(Xt===null?Xt=m:Xt.push.apply(Xt,m))}p=_}if(m=!1,p!==2)continue}}if(p===1){oa(n,0),Ui(n,r,0,!0);break}e:{switch(u=n,m=p,m){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Ui(u,r,an,!Mi);break e;case 2:Xt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(p=Zo+300-yt(),10<p)){if(Ui(u,r,an,!Mi),ge(u,0,!0)!==0)break e;hi=r,u.timeoutHandle=_y($g.bind(null,u,l,Xt,Wo,id,r,an,pr,aa,Mi,m,"Throttled",-0,0),p);break e}$g(u,l,Xt,Wo,id,r,an,pr,aa,Mi,m,null,-0,0)}}break}while(!0);Vn(n)}function $g(n,r,l,u,p,m,_,E,N,j,Q,te,$,Y){if(n.timeoutHandle=-1,te=r.subtreeFlags,te&8192||(te&16785408)===16785408){te={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Wn},zg(r,m,te);var de=(m&62914560)===m?Zo-yt():(m&4194048)===m?Bg-yt():0;if(de=ME(te,de),de!==null){hi=m,n.cancelPendingCommit=de(Wg.bind(null,n,r,m,l,u,p,_,E,N,Q,te,null,$,Y)),Ui(n,m,_,!j);return}}Wg(n,r,m,l,u,p,_,E,N)}function ZS(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 p=l[u],m=p.getSnapshot;p=p.value;try{if(!Jt(m(),p))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 Ui(n,r,l,u){r&=~nd,r&=~pr,n.suspendedLanes|=r,n.pingedLanes&=~r,u&&(n.warmLanes|=r),u=n.expirationTimes;for(var p=r;0<p;){var m=31-Ge(p),_=1<<m;u[m]=-1,p&=~_}l!==0&&ep(n,l,r)}function Jo(){return(je&6)===0?(vl(0),!1):!0}function od(){if(De!==null){if($e===0)var n=De.return;else n=De,ni=ar=null,xc(n),Kr=null,tl=0,n=De;for(;n!==null;)Sg(n.alternate,n),n=n.return;De=null}}function oa(n,r){var l=n.timeoutHandle;l!==-1&&(n.timeoutHandle=-1,gE(l)),l=n.cancelPendingCommit,l!==null&&(n.cancelPendingCommit=null,l()),hi=0,od(),Qe=n,De=l=ei(n.current,null),Me=r,$e=0,rn=null,Mi=!1,ra=xe(n,r),td=!1,aa=an=nd=pr=Ii=rt=0,Xt=yl=null,id=!1,(r&8)!==0&&(r|=r&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=r;0<u;){var p=31-Ge(u),m=1<<p;r|=n[p],u&=~m}return fi=r,_o(),l}function Fg(n,r){ke=null,H.H=ul,r===Zr||r===To?(r=om(),$e=3):r===dc?(r=om(),$e=4):$e=r===Pc?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,rn=r,De===null&&(rt=1,Vo(n,mn(r,n.current)))}function qg(){var n=tn.current;return n===null?!0:(Me&4194048)===Me?vn===null:(Me&62914560)===Me||(Me&536870912)!==0?n===vn:!1}function Yg(){var n=H.H;return H.H=ul,n===null?ul:n}function Xg(){var n=H.A;return H.A=XS,n}function es(){rt=4,Mi||(Me&4194048)!==Me&&tn.current!==null||(ra=!0),(Ii&134217727)===0&&(pr&134217727)===0||Qe===null||Ui(Qe,Me,an,!1)}function sd(n,r,l){var u=je;je|=2;var p=Yg(),m=Xg();(Qe!==n||Me!==r)&&(Wo=null,oa(n,r)),r=!1;var _=rt;e:do try{if($e!==0&&De!==null){var E=De,N=rn;switch($e){case 8:od(),_=6;break e;case 3:case 2:case 9:case 6:tn.current===null&&(r=!0);var j=$e;if($e=0,rn=null,sa(n,E,N,j),l&&ra){_=0;break e}break;default:j=$e,$e=0,rn=null,sa(n,E,N,j)}}KS(),_=rt;break}catch(Q){Fg(n,Q)}while(!0);return r&&n.shellSuspendCounter++,ni=ar=null,je=u,H.H=p,H.A=m,De===null&&(Qe=null,Me=0,_o()),_}function KS(){for(;De!==null;)Qg(De)}function WS(n,r){var l=je;je|=2;var u=Yg(),p=Xg();Qe!==n||Me!==r?(Wo=null,Ko=yt()+500,oa(n,r)):ra=xe(n,r);e:do try{if($e!==0&&De!==null){r=De;var m=rn;t:switch($e){case 1:$e=0,rn=null,sa(n,r,m,1);break;case 2:case 9:if(am(m)){$e=0,rn=null,Zg(r);break}r=function(){$e!==2&&$e!==9||Qe!==n||($e=7),Vn(n)},m.then(r,r);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:am(m)?($e=0,rn=null,Zg(r)):($e=0,rn=null,sa(n,r,m,7));break;case 5:var _=null;switch(De.tag){case 26:_=De.memoizedState;case 5:case 27:var E=De;if(_?Iy(_):E.stateNode.complete){$e=0,rn=null;var N=E.sibling;if(N!==null)De=N;else{var j=E.return;j!==null?(De=j,ts(j)):De=null}break t}}$e=0,rn=null,sa(n,r,m,5);break;case 6:$e=0,rn=null,sa(n,r,m,6);break;case 8:od(),rt=6;break e;default:throw Error(a(462))}}JS();break}catch(Q){Fg(n,Q)}while(!0);return ni=ar=null,H.H=u,H.A=p,je=l,De!==null?0:(Qe=null,Me=0,_o(),rt)}function JS(){for(;De!==null&&!Ha();)Qg(De)}function Qg(n){var r=vg(n.alternate,n,fi);n.memoizedProps=n.pendingProps,r===null?ts(n):De=r}function Zg(n){var r=n,l=r.alternate;switch(r.tag){case 15:case 0:r=hg(l,r,r.pendingProps,r.type,void 0,Me);break;case 11:r=hg(l,r,r.pendingProps,r.type.render,r.ref,Me);break;case 5:xc(r);default:Sg(l,r),r=De=Xp(r,fi),r=vg(l,r,fi)}n.memoizedProps=n.pendingProps,r===null?ts(n):De=r}function sa(n,r,l,u){ni=ar=null,xc(r),Kr=null,tl=0;var p=r.return;try{if(jS(n,p,r,l,Me)){rt=1,Vo(n,mn(l,n.current)),De=null;return}}catch(m){if(p!==null)throw De=p,m;rt=1,Vo(n,mn(l,n.current)),De=null;return}r.flags&32768?(ze||u===1?n=!0:ra||(Me&536870912)!==0?n=!1:(Mi=n=!0,(u===2||u===9||u===3||u===6)&&(u=tn.current,u!==null&&u.tag===13&&(u.flags|=16384))),Kg(r,n)):ts(r)}function ts(n){var r=n;do{if((r.flags&32768)!==0){Kg(r,Mi);return}n=r.return;var l=$S(r.alternate,r,fi);if(l!==null){De=l;return}if(r=r.sibling,r!==null){De=r;return}De=r=n}while(r!==null);rt===0&&(rt=5)}function Kg(n,r){do{var l=FS(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);rt=6,De=null}function Wg(n,r,l,u,p,m,_,E,N){n.cancelPendingCommit=null;do ns();while(bt!==0);if((je&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));if(m=r.lanes|r.childLanes,m|=Zu,N_(n,l,m,_,E,N),n===Qe&&(De=Qe=null,Me=0),la=r,Hi=n,hi=l,rd=m,ad=p,jg=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,iE(_e,function(){return iy(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=H.T,H.T=null,p=G.p,G.p=2,_=je,je|=4;try{qS(n,r,l)}finally{je=_,G.p=p,H.T=u}}bt=1,Jg(),ey(),ty()}}function Jg(){if(bt===1){bt=0;var n=Hi,r=la,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=H.T,H.T=null;var u=G.p;G.p=2;var p=je;je|=4;try{Og(r,n);var m=_d,_=Pp(n.containerInfo),E=m.focusedElem,N=m.selectionRange;if(_!==E&&E&&E.ownerDocument&&Up(E.ownerDocument.documentElement,E)){if(N!==null&&Fu(E)){var j=N.start,Q=N.end;if(Q===void 0&&(Q=j),"selectionStart"in E)E.selectionStart=j,E.selectionEnd=Math.min(Q,E.value.length);else{var te=E.ownerDocument||document,$=te&&te.defaultView||window;if($.getSelection){var Y=$.getSelection(),de=E.textContent.length,ve=Math.min(N.start,de),Xe=N.end===void 0?ve:Math.min(N.end,de);!Y.extend&&ve>Xe&&(_=Xe,Xe=ve,ve=_);var P=Hp(E,ve),M=Hp(E,Xe);if(P&&M&&(Y.rangeCount!==1||Y.anchorNode!==P.node||Y.anchorOffset!==P.offset||Y.focusNode!==M.node||Y.focusOffset!==M.offset)){var B=te.createRange();B.setStart(P.node,P.offset),Y.removeAllRanges(),ve>Xe?(Y.addRange(B),Y.extend(M.node,M.offset)):(B.setEnd(M.node,M.offset),Y.addRange(B))}}}}for(te=[],Y=E;Y=Y.parentNode;)Y.nodeType===1&&te.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<te.length;E++){var ee=te[E];ee.element.scrollLeft=ee.left,ee.element.scrollTop=ee.top}}ps=!!vd,_d=vd=null}finally{je=p,G.p=u,H.T=l}}n.current=r,bt=2}}function ey(){if(bt===2){bt=0;var n=Hi,r=la,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=H.T,H.T=null;var u=G.p;G.p=2;var p=je;je|=4;try{Tg(n,r.alternate,r)}finally{je=p,G.p=u,H.T=l}}bt=3}}function ty(){if(bt===4||bt===3){bt=0,kr();var n=Hi,r=la,l=hi,u=jg;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?bt=5:(bt=0,la=Hi=null,ny(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(zi=null),ku(l),r=r.stateNode,at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(Tt,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=H.T,p=G.p,G.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,G.p=p}}(hi&3)!==0&&ns(),Vn(n),p=n.pendingLanes,(l&261930)!==0&&(p&42)!==0?n===ld?bl++:(bl=0,ld=n):bl=0,vl(0)}}function ny(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,Ja(r)))}function ns(){return Jg(),ey(),ty(),iy()}function iy(){if(bt!==5)return!1;var n=Hi,r=rd;rd=0;var l=ku(hi),u=H.T,p=G.p;try{G.p=32>l?32:l,H.T=null,l=ad,ad=null;var m=Hi,_=hi;if(bt=0,la=Hi=null,hi=0,(je&6)!==0)throw Error(a(331));var E=je;if(je|=4,Ug(m.current),Ig(m,m.current,_,l),je=E,vl(0,!1),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(Tt,m)}catch{}return!0}finally{G.p=p,H.T=u,ny(n,r)}}function ry(n,r,l){r=mn(l,r),r=Uc(n.stateNode,r,2),n=Ri(n,r,2),n!==null&&(Pa(n,2),Vn(n))}function Fe(n,r,l){if(n.tag===3)ry(n,n,l);else for(;r!==null;){if(r.tag===3){ry(r,n,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(zi===null||!zi.has(u))){n=mn(l,n),l=ag(2),u=Ri(r,l,2),u!==null&&(lg(l,u,r,n),Pa(u,2),Vn(u));break}}r=r.return}}function ud(n,r,l){var u=n.pingCache;if(u===null){u=n.pingCache=new QS;var p=new Set;u.set(r,p)}else p=u.get(r),p===void 0&&(p=new Set,u.set(r,p));p.has(l)||(td=!0,p.add(l),n=eE.bind(null,n,r,l),r.then(n,n))}function eE(n,r,l){var u=n.pingCache;u!==null&&u.delete(r),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,Qe===n&&(Me&l)===l&&(rt===4||rt===3&&(Me&62914560)===Me&&300>yt()-Zo?(je&2)===0&&oa(n,0):nd|=l,aa===Me&&(aa=0)),Vn(n)}function ay(n,r){r===0&&(r=Tn()),n=nr(n,r),n!==null&&(Pa(n,r),Vn(n))}function tE(n){var r=n.memoizedState,l=0;r!==null&&(l=r.retryLane),ay(n,l)}function nE(n,r){var l=0;switch(n.tag){case 31:case 13:var u=n.stateNode,p=n.memoizedState;p!==null&&(l=p.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),ay(n,l)}function iE(n,r){return Si(n,r)}var is=null,ua=null,cd=!1,rs=!1,dd=!1,Pi=0;function Vn(n){n!==ua&&n.next===null&&(ua===null?is=ua=n:ua=ua.next=n),rs=!0,cd||(cd=!0,aE())}function vl(n,r){if(!dd&&rs){dd=!0;do for(var l=!1,u=is;u!==null;){if(n!==0){var p=u.pendingLanes;if(p===0)var m=0;else{var _=u.suspendedLanes,E=u.pingedLanes;m=(1<<31-Ge(42|n)+1)-1,m&=p&~(_&~E),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(l=!0,uy(u,m))}else m=Me,m=ge(u,u===Qe?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||xe(u,m)||(l=!0,uy(u,m));u=u.next}while(l);dd=!1}}function rE(){ly()}function ly(){rs=cd=!1;var n=0;Pi!==0&&mE()&&(n=Pi);for(var r=yt(),l=null,u=is;u!==null;){var p=u.next,m=oy(u,r);m===0?(u.next=null,l===null?is=p:l.next=p,p===null&&(ua=l)):(l=u,(n!==0||(m&3)!==0)&&(rs=!0)),u=p}bt!==0&&bt!==5||vl(n),Pi!==0&&(Pi=0)}function oy(n,r){for(var l=n.suspendedLanes,u=n.pingedLanes,p=n.expirationTimes,m=n.pendingLanes&-62914561;0<m;){var _=31-Ge(m),E=1<<_,N=p[_];N===-1?((E&l)===0||(E&u)!==0)&&(p[_]=We(E,r)):N<=r&&(n.expiredLanes|=E),m&=~E}if(r=Qe,l=Me,l=ge(n,n===r?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,l===0||n===r&&($e===2||$e===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&Ki(u),n.callbackNode=null,n.callbackPriority=0;if((l&3)===0||xe(n,l)){if(r=l&-l,r===n.callbackPriority)return r;switch(u!==null&&Ki(u),ku(l)){case 2:case 8:l=ue;break;case 32:l=_e;break;case 268435456:l=Ue;break;default:l=_e}return u=sy.bind(null,n),l=Si(l,u),n.callbackPriority=r,n.callbackNode=l,r}return u!==null&&u!==null&&Ki(u),n.callbackPriority=2,n.callbackNode=null,2}function sy(n,r){if(bt!==0&&bt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var l=n.callbackNode;if(ns()&&n.callbackNode!==l)return null;var u=Me;return u=ge(n,n===Qe?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(Gg(n,u,r),oy(n,yt()),n.callbackNode!=null&&n.callbackNode===l?sy.bind(null,n):null)}function uy(n,r){if(ns())return null;Gg(n,r,!0)}function aE(){yE(function(){(je&6)!==0?Si(J,rE):ly()})}function fd(){if(Pi===0){var n=Xr;n===0&&(n=Ar,Ar<<=1,(Ar&261888)===0&&(Ar=256)),Pi=n}return Pi}function cy(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:fo(""+n)}function dy(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 lE(n,r,l,u,p){if(r==="submit"&&l&&l.stateNode===p){var m=cy((p[Gt]||null).action),_=u.submitter;_&&(r=(r=_[Gt]||null)?cy(r.formAction):_.getAttribute("formAction"),r!==null&&(m=r,_=null));var E=new go("action","action",null,u,p);n.push({event:E,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Pi!==0){var N=_?dy(p,_):new FormData(p);Nc(l,{pending:!0,data:N,method:p.method,action:m},null,N)}}else typeof m=="function"&&(E.preventDefault(),N=_?dy(p,_):new FormData(p),Nc(l,{pending:!0,data:N,method:p.method,action:m},m,N))},currentTarget:p}]})}}for(var hd=0;hd<Qu.length;hd++){var pd=Qu[hd],oE=pd.toLowerCase(),sE=pd[0].toUpperCase()+pd.slice(1);Ln(oE,"on"+sE)}Ln(Vp,"onAnimationEnd"),Ln(Gp,"onAnimationIteration"),Ln($p,"onAnimationStart"),Ln("dblclick","onDoubleClick"),Ln("focusin","onFocus"),Ln("focusout","onBlur"),Ln(CS,"onTransitionRun"),Ln(wS,"onTransitionStart"),Ln(kS,"onTransitionCancel"),Ln(Fp,"onTransitionEnd"),Mr("onMouseEnter",["mouseout","mouseover"]),Mr("onMouseLeave",["mouseout","mouseover"]),Mr("onPointerEnter",["pointerout","pointerover"]),Mr("onPointerLeave",["pointerout","pointerover"]),Wi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Wi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Wi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Wi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Wi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Wi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _l="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(" "),uE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_l));function fy(n,r){r=(r&4)!==0;for(var l=0;l<n.length;l++){var u=n[l],p=u.event;u=u.listeners;e:{var m=void 0;if(r)for(var _=u.length-1;0<=_;_--){var E=u[_],N=E.instance,j=E.currentTarget;if(E=E.listener,N!==m&&p.isPropagationStopped())break e;m=E,p.currentTarget=j;try{m(p)}catch(Q){vo(Q)}p.currentTarget=null,m=N}else for(_=0;_<u.length;_++){if(E=u[_],N=E.instance,j=E.currentTarget,E=E.listener,N!==m&&p.isPropagationStopped())break e;m=E,p.currentTarget=j;try{m(p)}catch(Q){vo(Q)}p.currentTarget=null,m=N}}}}function Ne(n,r){var l=r[Au];l===void 0&&(l=r[Au]=new Set);var u=n+"__bubble";l.has(u)||(hy(r,n,2,!1),l.add(u))}function md(n,r,l){var u=0;r&&(u|=4),hy(l,n,u,r)}var as="_reactListening"+Math.random().toString(36).slice(2);function gd(n){if(!n[as]){n[as]=!0,lp.forEach(function(l){l!=="selectionchange"&&(uE.has(l)||md(l,!1,n),md(l,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[as]||(r[as]=!0,md("selectionchange",!1,r))}}function hy(n,r,l,u){switch(Vy(r)){case 2:var p=HE;break;case 8:p=UE;break;default:p=Dd}l=p.bind(null,r,l,n),p=void 0,!zu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),u?p!==void 0?n.addEventListener(r,l,{capture:!0,passive:p}):n.addEventListener(r,l,!0):p!==void 0?n.addEventListener(r,l,{passive:p}):n.addEventListener(r,l,!1)}function yd(n,r,l,u,p){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===p)break;if(_===4)for(_=u.return;_!==null;){var N=_.tag;if((N===3||N===4)&&_.stateNode.containerInfo===p)return;_=_.return}for(;E!==null;){if(_=Dr(E),_===null)return;if(N=_.tag,N===5||N===6||N===26||N===27){u=m=_;continue e}E=E.parentNode}}u=u.return}bp(function(){var j=m,Q=Mu(l),te=[];e:{var $=qp.get(n);if($!==void 0){var Y=go,de=n;switch(n){case"keypress":if(po(l)===0)break e;case"keydown":case"keyup":Y=nS;break;case"focusin":de="focus",Y=Bu;break;case"focusout":de="blur",Y=Bu;break;case"beforeblur":case"afterblur":Y=Bu;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":Y=Sp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=$_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=aS;break;case Vp:case Gp:case $p:Y=Y_;break;case Fp:Y=oS;break;case"scroll":case"scrollend":Y=V_;break;case"wheel":Y=uS;break;case"copy":case"cut":case"paste":Y=Q_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=xp;break;case"toggle":case"beforetoggle":Y=dS}var ve=(r&4)!==0,Xe=!ve&&(n==="scroll"||n==="scrollend"),P=ve?$!==null?$+"Capture":null:$;ve=[];for(var M=j,B;M!==null;){var ee=M;if(B=ee.stateNode,ee=ee.tag,ee!==5&&ee!==26&&ee!==27||B===null||P===null||(ee=Va(M,P),ee!=null&&ve.push(Sl(M,ee,B))),Xe)break;M=M.return}0<ve.length&&($=new Y($,de,null,l,Q),te.push({event:$,listeners:ve}))}}if((r&7)===0){e:{if($=n==="mouseover"||n==="pointerover",Y=n==="mouseout"||n==="pointerout",$&&l!==Ou&&(de=l.relatedTarget||l.fromElement)&&(Dr(de)||de[Rr]))break e;if((Y||$)&&($=Q.window===Q?Q:($=Q.ownerDocument)?$.defaultView||$.parentWindow:window,Y?(de=l.relatedTarget||l.toElement,Y=j,de=de?Dr(de):null,de!==null&&(Xe=s(de),ve=de.tag,de!==Xe||ve!==5&&ve!==27&&ve!==6)&&(de=null)):(Y=null,de=j),Y!==de)){if(ve=Sp,ee="onMouseLeave",P="onMouseEnter",M="mouse",(n==="pointerout"||n==="pointerover")&&(ve=xp,ee="onPointerLeave",P="onPointerEnter",M="pointer"),Xe=Y==null?$:ja(Y),B=de==null?$:ja(de),$=new ve(ee,M+"leave",Y,l,Q),$.target=Xe,$.relatedTarget=B,ee=null,Dr(Q)===j&&(ve=new ve(P,M+"enter",de,l,Q),ve.target=B,ve.relatedTarget=Xe,ee=ve),Xe=ee,Y&&de)t:{for(ve=cE,P=Y,M=de,B=0,ee=P;ee;ee=ve(ee))B++;ee=0;for(var ye=M;ye;ye=ve(ye))ee++;for(;0<B-ee;)P=ve(P),B--;for(;0<ee-B;)M=ve(M),ee--;for(;B--;){if(P===M||M!==null&&P===M.alternate){ve=P;break t}P=ve(P),M=ve(M)}ve=null}else ve=null;Y!==null&&py(te,$,Y,ve,!1),de!==null&&Xe!==null&&py(te,Xe,de,ve,!0)}}e:{if($=j?ja(j):window,Y=$.nodeName&&$.nodeName.toLowerCase(),Y==="select"||Y==="input"&&$.type==="file")var Pe=Dp;else if(Lp($))if(Np)Pe=SS;else{Pe=vS;var pe=bS}else Y=$.nodeName,!Y||Y.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?j&&Nu(j.elementType)&&(Pe=Dp):Pe=_S;if(Pe&&(Pe=Pe(n,j))){Rp(te,Pe,l,Q);break e}pe&&pe(n,$,j),n==="focusout"&&j&&$.type==="number"&&j.memoizedProps.value!=null&&Du($,"number",$.value)}switch(pe=j?ja(j):window,n){case"focusin":(Lp(pe)||pe.contentEditable==="true")&&(Br=pe,qu=j,Za=null);break;case"focusout":Za=qu=Br=null;break;case"mousedown":Yu=!0;break;case"contextmenu":case"mouseup":case"dragend":Yu=!1,Bp(te,l,Q);break;case"selectionchange":if(xS)break;case"keydown":case"keyup":Bp(te,l,Q)}var Ae;if(Vu)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 Pr?Ap(n,l)&&(Ie="onCompositionEnd"):n==="keydown"&&l.keyCode===229&&(Ie="onCompositionStart");Ie&&(Cp&&l.locale!=="ko"&&(Pr||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&Pr&&(Ae=vp()):(xi=Q,Hu="value"in xi?xi.value:xi.textContent,Pr=!0)),pe=ls(j,Ie),0<pe.length&&(Ie=new Ep(Ie,n,null,l,Q),te.push({event:Ie,listeners:pe}),Ae?Ie.data=Ae:(Ae=Tp(l),Ae!==null&&(Ie.data=Ae)))),(Ae=hS?pS(n,l):mS(n,l))&&(Ie=ls(j,"onBeforeInput"),0<Ie.length&&(pe=new Ep("onBeforeInput","beforeinput",null,l,Q),te.push({event:pe,listeners:Ie}),pe.data=Ae)),lE(te,n,j,l,Q)}fy(te,r)})}function Sl(n,r,l){return{instance:n,listener:r,currentTarget:l}}function ls(n,r){for(var l=r+"Capture",u=[];n!==null;){var p=n,m=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||m===null||(p=Va(n,l),p!=null&&u.unshift(Sl(n,p,m)),p=Va(n,r),p!=null&&u.push(Sl(n,p,m))),n.tag===3)return u;n=n.return}return[]}function cE(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function py(n,r,l,u,p){for(var m=r._reactName,_=[];l!==null&&l!==u;){var E=l,N=E.alternate,j=E.stateNode;if(E=E.tag,N!==null&&N===u)break;E!==5&&E!==26&&E!==27||j===null||(N=j,p?(j=Va(l,m),j!=null&&_.unshift(Sl(l,j,N))):p||(j=Va(l,m),j!=null&&_.push(Sl(l,j,N)))),l=l.return}_.length!==0&&n.push({event:r,listeners:_})}var dE=/\r\n?/g,fE=/\u0000|\uFFFD/g;function my(n){return(typeof n=="string"?n:""+n).replace(dE,`
10
+ `).replace(fE,"")}function gy(n,r){return r=my(r),my(n)===r}function Ye(n,r,l,u,p,m){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||zr(n,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&zr(n,""+u);break;case"className":uo(n,"class",u);break;case"tabIndex":uo(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":uo(n,l,u);break;case"style":gp(n,u,m);break;case"data":if(r!=="object"){uo(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=fo(""+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"&&Ye(n,r,"name",p.name,p,null),Ye(n,r,"formEncType",p.formEncType,p,null),Ye(n,r,"formMethod",p.formMethod,p,null),Ye(n,r,"formTarget",p.formTarget,p,null)):(Ye(n,r,"encType",p.encType,p,null),Ye(n,r,"method",p.method,p,null),Ye(n,r,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=fo(""+u),n.setAttribute(l,u);break;case"onClick":u!=null&&(n.onclick=Wn);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(p.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=fo(""+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),so(n,"popover",u);break;case"xlinkActuate":Kn(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Kn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Kn(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Kn(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Kn(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Kn(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Kn(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Kn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Kn(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":so(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=B_.get(l)||l,so(n,l,u))}}function bd(n,r,l,u,p,m){switch(l){case"style":gp(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(p.children!=null)throw Error(a(60));n.innerHTML=l}}break;case"children":typeof u=="string"?zr(n,u):(typeof u=="number"||typeof u=="bigint")&&zr(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=Wn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!op.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(p=l.endsWith("Capture"),r=l.slice(2,p?l.length-7:void 0),m=n[Gt]||null,m=m!=null?m[l]:null,typeof m=="function"&&n.removeEventListener(r,m,p),typeof u=="function")){typeof m!="function"&&m!==null&&(l in n?n[l]=null:n.hasAttribute(l)&&n.removeAttribute(l)),n.addEventListener(r,u,p);break e}l in n?n[l]=u:u===!0?n.setAttribute(l,""):so(n,l,u)}}}function Ot(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,p=!1,m;for(m in l)if(l.hasOwnProperty(m)){var _=l[m];if(_!=null)switch(m){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Ye(n,r,m,_,l,null)}}p&&Ye(n,r,"srcSet",l.srcSet,l,null),u&&Ye(n,r,"src",l.src,l,null);return;case"input":Ne("invalid",n);var E=m=_=p=null,N=null,j=null;for(u in l)if(l.hasOwnProperty(u)){var Q=l[u];if(Q!=null)switch(u){case"name":p=Q;break;case"type":_=Q;break;case"checked":N=Q;break;case"defaultChecked":j=Q;break;case"value":m=Q;break;case"defaultValue":E=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(a(137,r));break;default:Ye(n,r,u,Q,l,null)}}fp(n,m,E,N,j,_,p,!1);return;case"select":Ne("invalid",n),u=_=m=null;for(p in l)if(l.hasOwnProperty(p)&&(E=l[p],E!=null))switch(p){case"value":m=E;break;case"defaultValue":_=E;break;case"multiple":u=E;default:Ye(n,r,p,E,l,null)}r=m,l=_,n.multiple=!!u,r!=null?Ir(n,!!u,r,!1):l!=null&&Ir(n,!!u,l,!0);return;case"textarea":Ne("invalid",n),m=p=u=null;for(_ in l)if(l.hasOwnProperty(_)&&(E=l[_],E!=null))switch(_){case"value":u=E;break;case"defaultValue":p=E;break;case"children":m=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(a(91));break;default:Ye(n,r,_,E,l,null)}pp(n,u,p,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":Ye(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<_l.length;u++)Ne(_l[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(j in l)if(l.hasOwnProperty(j)&&(u=l[j],u!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Ye(n,r,j,u,l,null)}return;default:if(Nu(r)){for(Q in l)l.hasOwnProperty(Q)&&(u=l[Q],u!==void 0&&bd(n,r,Q,u,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(u=l[E],u!=null&&Ye(n,r,E,u,l,null))}function hE(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 p=null,m=null,_=null,E=null,N=null,j=null,Q=null;for(Y in l){var te=l[Y];if(l.hasOwnProperty(Y)&&te!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":N=te;default:u.hasOwnProperty(Y)||Ye(n,r,Y,null,u,te)}}for(var $ in u){var Y=u[$];if(te=l[$],u.hasOwnProperty($)&&(Y!=null||te!=null))switch($){case"type":m=Y;break;case"name":p=Y;break;case"checked":j=Y;break;case"defaultChecked":Q=Y;break;case"value":_=Y;break;case"defaultValue":E=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(a(137,r));break;default:Y!==te&&Ye(n,r,$,Y,u,te)}}Ru(n,_,E,N,j,Q,m,p);return;case"select":Y=_=E=$=null;for(m in l)if(N=l[m],l.hasOwnProperty(m)&&N!=null)switch(m){case"value":break;case"multiple":Y=N;default:u.hasOwnProperty(m)||Ye(n,r,m,null,u,N)}for(p in u)if(m=u[p],N=l[p],u.hasOwnProperty(p)&&(m!=null||N!=null))switch(p){case"value":$=m;break;case"defaultValue":E=m;break;case"multiple":_=m;default:m!==N&&Ye(n,r,p,m,u,N)}r=E,l=_,u=Y,$!=null?Ir(n,!!l,$,!1):!!u!=!!l&&(r!=null?Ir(n,!!l,r,!0):Ir(n,!!l,l?[]:"",!1));return;case"textarea":Y=$=null;for(E in l)if(p=l[E],l.hasOwnProperty(E)&&p!=null&&!u.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Ye(n,r,E,null,u,p)}for(_ in u)if(p=u[_],m=l[_],u.hasOwnProperty(_)&&(p!=null||m!=null))switch(_){case"value":$=p;break;case"defaultValue":Y=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==m&&Ye(n,r,_,p,u,m)}hp(n,$,Y);return;case"option":for(var de in l)$=l[de],l.hasOwnProperty(de)&&$!=null&&!u.hasOwnProperty(de)&&(de==="selected"?n.selected=!1:Ye(n,r,de,null,u,$));for(N in u)$=u[N],Y=l[N],u.hasOwnProperty(N)&&$!==Y&&($!=null||Y!=null)&&(N==="selected"?n.selected=$&&typeof $!="function"&&typeof $!="symbol":Ye(n,r,N,$,u,Y));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 ve in l)$=l[ve],l.hasOwnProperty(ve)&&$!=null&&!u.hasOwnProperty(ve)&&Ye(n,r,ve,null,u,$);for(j in u)if($=u[j],Y=l[j],u.hasOwnProperty(j)&&$!==Y&&($!=null||Y!=null))switch(j){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(a(137,r));break;default:Ye(n,r,j,$,u,Y)}return;default:if(Nu(r)){for(var Xe in l)$=l[Xe],l.hasOwnProperty(Xe)&&$!==void 0&&!u.hasOwnProperty(Xe)&&bd(n,r,Xe,void 0,u,$);for(Q in u)$=u[Q],Y=l[Q],!u.hasOwnProperty(Q)||$===Y||$===void 0&&Y===void 0||bd(n,r,Q,$,u,Y);return}}for(var P in l)$=l[P],l.hasOwnProperty(P)&&$!=null&&!u.hasOwnProperty(P)&&Ye(n,r,P,null,u,$);for(te in u)$=u[te],Y=l[te],!u.hasOwnProperty(te)||$===Y||$==null&&Y==null||Ye(n,r,te,$,u,Y)}function yy(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function pE(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var p=l[u],m=p.transferSize,_=p.initiatorType,E=p.duration;if(m&&E&&yy(_)){for(_=0,E=p.responseEnd,u+=1;u<l.length;u++){var N=l[u],j=N.startTime;if(j>E)break;var Q=N.transferSize,te=N.initiatorType;Q&&yy(te)&&(N=N.responseEnd,_+=Q*(N<E?1:(E-j)/(N-j)))}if(--u,r+=8*(m+_)/(p.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 vd=null,_d=null;function os(n){return n.nodeType===9?n:n.ownerDocument}function by(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 vy(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 Sd(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 Ed=null;function mE(){var n=window.event;return n&&n.type==="popstate"?n===Ed?!1:(Ed=n,!0):(Ed=null,!1)}var _y=typeof setTimeout=="function"?setTimeout:void 0,gE=typeof clearTimeout=="function"?clearTimeout:void 0,Sy=typeof Promise=="function"?Promise:void 0,yE=typeof queueMicrotask=="function"?queueMicrotask:typeof Sy<"u"?function(n){return Sy.resolve(null).then(n).catch(bE)}:_y;function bE(n){setTimeout(function(){throw n})}function Bi(n){return n==="head"}function Ey(n,r){var l=r,u=0;do{var p=l.nextSibling;if(n.removeChild(l),p&&p.nodeType===8)if(l=p.data,l==="/$"||l==="/&"){if(u===0){n.removeChild(p),ha(r);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")El(n.ownerDocument.documentElement);else if(l==="head"){l=n.ownerDocument.head,El(l);for(var m=l.firstChild;m;){var _=m.nextSibling,E=m.nodeName;m[Ba]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&m.rel.toLowerCase()==="stylesheet"||l.removeChild(m),m=_}}else l==="body"&&El(n.ownerDocument.body);l=p}while(l);ha(r)}function xy(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 xd(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":xd(l),Tu(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}n.removeChild(l)}}function vE(n,r,l,u){for(;n.nodeType===1;){var p=l;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[Ba])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!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(m=n.getAttribute("src"),(m!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&m&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var m=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===m)return n}else return n;if(n=_n(n.nextSibling),n===null)break}return null}function _E(n,r,l){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!l||(n=_n(n.nextSibling),n===null))return null;return n}function Cy(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=_n(n.nextSibling),n===null))return null;return n}function Cd(n){return n.data==="$?"||n.data==="$~"}function wd(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function SE(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 _n(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 kd=null;function wy(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var l=n.data;if(l==="/$"||l==="/&"){if(r===0)return _n(n.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}n=n.nextSibling}return null}function ky(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 Ay(n,r,l){switch(r=os(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 El(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);Tu(n)}var Sn=new Map,Ty=new Set;function ss(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var pi=G.d;G.d={f:EE,r:xE,D:CE,C:wE,L:kE,m:AE,X:LE,S:TE,M:RE};function EE(){var n=pi.f(),r=Jo();return n||r}function xE(n){var r=Nr(n);r!==null&&r.tag===5&&r.type==="form"?Fm(r):pi.r(n)}var ca=typeof document>"u"?null:document;function Ly(n,r,l){var u=ca;if(u&&typeof r=="string"&&r){var p=hn(r);p='link[rel="'+n+'"][href="'+p+'"]',typeof l=="string"&&(p+='[crossorigin="'+l+'"]'),Ty.has(p)||(Ty.add(p),n={rel:n,crossOrigin:l,href:r},u.querySelector(p)===null&&(r=u.createElement("link"),Ot(r,"link",n),xt(r),u.head.appendChild(r)))}}function CE(n){pi.D(n),Ly("dns-prefetch",n,null)}function wE(n,r){pi.C(n,r),Ly("preconnect",n,r)}function kE(n,r,l){pi.L(n,r,l);var u=ca;if(u&&n&&r){var p='link[rel="preload"][as="'+hn(r)+'"]';r==="image"&&l&&l.imageSrcSet?(p+='[imagesrcset="'+hn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(p+='[imagesizes="'+hn(l.imageSizes)+'"]')):p+='[href="'+hn(n)+'"]';var m=p;switch(r){case"style":m=da(n);break;case"script":m=fa(n)}Sn.has(m)||(n=g({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:n,as:r},l),Sn.set(m,n),u.querySelector(p)!==null||r==="style"&&u.querySelector(xl(m))||r==="script"&&u.querySelector(Cl(m))||(r=u.createElement("link"),Ot(r,"link",n),xt(r),u.head.appendChild(r)))}}function AE(n,r){pi.m(n,r);var l=ca;if(l&&n){var u=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+hn(u)+'"][href="'+hn(n)+'"]',m=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=fa(n)}if(!Sn.has(m)&&(n=g({rel:"modulepreload",href:n},r),Sn.set(m,n),l.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Cl(m)))return}u=l.createElement("link"),Ot(u,"link",n),xt(u),l.head.appendChild(u)}}}function TE(n,r,l){pi.S(n,r,l);var u=ca;if(u&&n){var p=Or(u).hoistableStyles,m=da(n);r=r||"default";var _=p.get(m);if(!_){var E={loading:0,preload:null};if(_=u.querySelector(xl(m)))E.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":r},l),(l=Sn.get(m))&&Ad(n,l);var N=_=u.createElement("link");xt(N),Ot(N,"link",n),N._p=new Promise(function(j,Q){N.onload=j,N.onerror=Q}),N.addEventListener("load",function(){E.loading|=1}),N.addEventListener("error",function(){E.loading|=2}),E.loading|=4,us(_,r,u)}_={type:"stylesheet",instance:_,count:1,state:E},p.set(m,_)}}}function LE(n,r){pi.X(n,r);var l=ca;if(l&&n){var u=Or(l).hoistableScripts,p=fa(n),m=u.get(p);m||(m=l.querySelector(Cl(p)),m||(n=g({src:n,async:!0},r),(r=Sn.get(p))&&Td(n,r),m=l.createElement("script"),xt(m),Ot(m,"link",n),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function RE(n,r){pi.M(n,r);var l=ca;if(l&&n){var u=Or(l).hoistableScripts,p=fa(n),m=u.get(p);m||(m=l.querySelector(Cl(p)),m||(n=g({src:n,async:!0,type:"module"},r),(r=Sn.get(p))&&Td(n,r),m=l.createElement("script"),xt(m),Ot(m,"link",n),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function Ry(n,r,l,u){var p=(p=he.current)?ss(p):null;if(!p)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=da(l.href),l=Or(p).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=da(l.href);var m=Or(p).hoistableStyles,_=m.get(n);if(_||(p=p.ownerDocument||p,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(n,_),(m=p.querySelector(xl(n)))&&!m._p&&(_.instance=m,_.state.loading=5),Sn.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},Sn.set(n,l),m||DE(p,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=fa(l),l=Or(p).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 da(n){return'href="'+hn(n)+'"'}function xl(n){return'link[rel="stylesheet"]['+n+"]"}function Dy(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function DE(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}),Ot(r,"link",l),xt(r),n.head.appendChild(r))}function fa(n){return'[src="'+hn(n)+'"]'}function Cl(n){return"script[async]"+n}function Ny(n,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=n.querySelector('style[data-href~="'+hn(l.href)+'"]');if(u)return r.instance=u,xt(u),u;var p=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),xt(u),Ot(u,"style",p),us(u,l.precedence,n),r.instance=u;case"stylesheet":p=da(l.href);var m=n.querySelector(xl(p));if(m)return r.state.loading|=4,r.instance=m,xt(m),m;u=Dy(l),(p=Sn.get(p))&&Ad(u,p),m=(n.ownerDocument||n).createElement("link"),xt(m);var _=m;return _._p=new Promise(function(E,N){_.onload=E,_.onerror=N}),Ot(m,"link",u),r.state.loading|=4,us(m,l.precedence,n),r.instance=m;case"script":return m=fa(l.src),(p=n.querySelector(Cl(m)))?(r.instance=p,xt(p),p):(u=l,(p=Sn.get(m))&&(u=g({},l),Td(u,p)),n=n.ownerDocument||n,p=n.createElement("script"),xt(p),Ot(p,"link",u),n.head.appendChild(p),r.instance=p);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,us(u,l.precedence,n));return r.instance}function us(n,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,m=p,_=0;_<u.length;_++){var E=u[_];if(E.dataset.precedence===r)m=E;else if(m!==p)break}m?m.parentNode.insertBefore(n,m.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(n,r.firstChild))}function Ad(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function Td(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var cs=null;function Oy(n,r,l){if(cs===null){var u=new Map,p=cs=new Map;p.set(l,u)}else p=cs,u=p.get(l),u||(u=new Map,p.set(l,u));if(u.has(n))return u;for(u.set(n,null),l=l.getElementsByTagName(n),p=0;p<l.length;p++){var m=l[p];if(!(m[Ba]||m[Lt]||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 My(n,r,l){n=n.ownerDocument||n,n.head.insertBefore(l,r==="title"?n.querySelector("head > title"):null)}function NE(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 Iy(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function OE(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 p=da(u.href),m=r.querySelector(xl(p));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=ds.bind(n),r.then(n,n)),l.state.loading|=4,l.instance=m,xt(m);return}m=r.ownerDocument||r,u=Dy(u),(p=Sn.get(p))&&Ad(u,p),m=m.createElement("link"),xt(m);var _=m;_._p=new Promise(function(E,N){_.onload=E,_.onerror=N}),Ot(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=ds.bind(n),r.addEventListener("load",l),r.addEventListener("error",l))}}var Ld=0;function ME(n,r){return n.stylesheets&&n.count===0&&hs(n,n.stylesheets),0<n.count||0<n.imgCount?function(l){var u=setTimeout(function(){if(n.stylesheets&&hs(n,n.stylesheets),n.unsuspend){var m=n.unsuspend;n.unsuspend=null,m()}},6e4+r);0<n.imgBytes&&Ld===0&&(Ld=62500*pE());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&hs(n,n.stylesheets),n.unsuspend)){var m=n.unsuspend;n.unsuspend=null,m()}},(n.imgBytes>Ld?50:800)+r);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function ds(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hs(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var fs=null;function hs(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,fs=new Map,r.forEach(IE,n),fs=null,ds.call(n))}function IE(n,r){if(!(r.state.loading&4)){var l=fs.get(n);if(l)var u=l.get(null);else{l=new Map,fs.set(n,l);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<p.length;m++){var _=p[m];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(l.set(_.dataset.precedence,_),u=_)}u&&l.set(null,u)}p=r.instance,_=p.getAttribute("data-precedence"),m=l.get(_)||u,m===u&&l.set(null,p),l.set(_,p),this.count++,u=ds.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),m?m.parentNode.insertBefore(p,m.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),r.state.loading|=4}}var wl={$$typeof:k,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function zE(n,r,l,u,p,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=Un(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Un(0),this.hiddenUpdates=Un(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=m,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function zy(n,r,l,u,p,m,_,E,N,j,Q,te){return n=new zE(n,r,l,_,N,j,Q,te,E),r=1,m===!0&&(r|=24),m=en(3,null,null,r),n.current=m,m.stateNode=n,r=sc(),r.refCount++,n.pooledCache=r,r.refCount++,m.memoizedState={element:u,isDehydrated:l,cache:r},fc(m),n}function Hy(n){return n?(n=Gr,n):Gr}function Uy(n,r,l,u,p,m){p=Hy(p),u.context===null?u.context=p:u.pendingContext=p,u=Li(r),u.payload={element:l},m=m===void 0?null:m,m!==null&&(u.callback=m),l=Ri(n,u,r),l!==null&&(Qt(l,n,r),il(l,n,r))}function Py(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var l=n.retryLane;n.retryLane=l!==0&&l<r?l:r}}function Rd(n,r){Py(n,r),(n=n.alternate)&&Py(n,r)}function By(n){if(n.tag===13||n.tag===31){var r=nr(n,67108864);r!==null&&Qt(r,n,67108864),Rd(n,67108864)}}function jy(n){if(n.tag===13||n.tag===31){var r=ln();r=wu(r);var l=nr(n,r);l!==null&&Qt(l,n,r),Rd(n,r)}}var ps=!0;function HE(n,r,l,u){var p=H.T;H.T=null;var m=G.p;try{G.p=2,Dd(n,r,l,u)}finally{G.p=m,H.T=p}}function UE(n,r,l,u){var p=H.T;H.T=null;var m=G.p;try{G.p=8,Dd(n,r,l,u)}finally{G.p=m,H.T=p}}function Dd(n,r,l,u){if(ps){var p=Nd(u);if(p===null)yd(n,r,u,ms,l),Gy(n,u);else if(BE(p,n,r,l,u))u.stopPropagation();else if(Gy(n,u),r&4&&-1<PE.indexOf(n)){for(;p!==null;){var m=Nr(p);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var _=re(m.pendingLanes);if(_!==0){var E=m;for(E.pendingLanes|=2,E.entangledLanes|=2;_;){var N=1<<31-Ge(_);E.entanglements[1]|=N,_&=~N}Vn(m),(je&6)===0&&(Ko=yt()+500,vl(0))}}break;case 31:case 13:E=nr(m,2),E!==null&&Qt(E,m,2),Jo(),Rd(m,2)}if(m=Nd(u),m===null&&yd(n,r,u,ms,l),m===p)break;p=m}p!==null&&u.stopPropagation()}else yd(n,r,u,null,l)}}function Nd(n){return n=Mu(n),Od(n)}var ms=null;function Od(n){if(ms=null,n=Dr(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 ms=n,null}function Vy(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(Ua()){case J:return 2;case ue:return 8;case _e:case Re:return 32;case Ue:return 268435456;default:return 32}default:return 32}}var Md=!1,ji=null,Vi=null,Gi=null,kl=new Map,Al=new Map,$i=[],PE="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 Gy(n,r){switch(n){case"focusin":case"focusout":ji=null;break;case"dragenter":case"dragleave":Vi=null;break;case"mouseover":case"mouseout":Gi=null;break;case"pointerover":case"pointerout":kl.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Al.delete(r.pointerId)}}function Tl(n,r,l,u,p,m){return n===null||n.nativeEvent!==m?(n={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:m,targetContainers:[p]},r!==null&&(r=Nr(r),r!==null&&By(r)),n):(n.eventSystemFlags|=u,r=n.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),n)}function BE(n,r,l,u,p){switch(r){case"focusin":return ji=Tl(ji,n,r,l,u,p),!0;case"dragenter":return Vi=Tl(Vi,n,r,l,u,p),!0;case"mouseover":return Gi=Tl(Gi,n,r,l,u,p),!0;case"pointerover":var m=p.pointerId;return kl.set(m,Tl(kl.get(m)||null,n,r,l,u,p)),!0;case"gotpointercapture":return m=p.pointerId,Al.set(m,Tl(Al.get(m)||null,n,r,l,u,p)),!0}return!1}function $y(n){var r=Dr(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,rp(n.priority,function(){jy(l)});return}}else if(r===31){if(r=f(l),r!==null){n.blockedOn=r,rp(n.priority,function(){jy(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 gs(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var l=Nd(n.nativeEvent);if(l===null){l=n.nativeEvent;var u=new l.constructor(l.type,l);Ou=u,l.target.dispatchEvent(u),Ou=null}else return r=Nr(l),r!==null&&By(r),n.blockedOn=l,!1;r.shift()}return!0}function Fy(n,r,l){gs(n)&&l.delete(r)}function jE(){Md=!1,ji!==null&&gs(ji)&&(ji=null),Vi!==null&&gs(Vi)&&(Vi=null),Gi!==null&&gs(Gi)&&(Gi=null),kl.forEach(Fy),Al.forEach(Fy)}function ys(n,r){n.blockedOn===r&&(n.blockedOn=null,Md||(Md=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,jE)))}var bs=null;function qy(n){bs!==n&&(bs=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){bs===n&&(bs=null);for(var r=0;r<n.length;r+=3){var l=n[r],u=n[r+1],p=n[r+2];if(typeof u!="function"){if(Od(u||l)===null)continue;break}var m=Nr(l);m!==null&&(n.splice(r,3),r-=3,Nc(m,{pending:!0,data:p,method:l.method,action:u},u,p))}}))}function ha(n){function r(N){return ys(N,n)}ji!==null&&ys(ji,n),Vi!==null&&ys(Vi,n),Gi!==null&&ys(Gi,n),kl.forEach(r),Al.forEach(r);for(var l=0;l<$i.length;l++){var u=$i[l];u.blockedOn===n&&(u.blockedOn=null)}for(;0<$i.length&&(l=$i[0],l.blockedOn===null);)$y(l),l.blockedOn===null&&$i.shift();if(l=(n.ownerDocument||n).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var p=l[u],m=l[u+1],_=p[Gt]||null;if(typeof m=="function")_||qy(l);else if(_){var E=null;if(m&&m.hasAttribute("formAction")){if(p=m,_=m[Gt]||null)E=_.formAction;else if(Od(p)!==null)continue}else E=_.action;typeof E=="function"?l[u+1]=E:(l.splice(u,3),u-=3),qy(l)}}}function Yy(){function n(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(_){return p=_})},focusReset:"manual",scroll:"manual"})}function r(){p!==null&&(p(),p=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,p=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),p!==null&&(p(),p=null)}}}function Id(n){this._internalRoot=n}vs.prototype.render=Id.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,u=ln();Uy(l,u,n,r,null,null)},vs.prototype.unmount=Id.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;Uy(n.current,2,null,n,null,null),Jo(),r[Rr]=null}};function vs(n){this._internalRoot=n}vs.prototype.unstable_scheduleHydration=function(n){if(n){var r=ip();n={blockedOn:null,target:n,priority:r};for(var l=0;l<$i.length&&r!==0&&r<$i[l].priority;l++);$i.splice(l,0,n),l===0&&$y(n)}};var Xy=t.version;if(Xy!=="19.2.6")throw Error(a(527,Xy,"19.2.6"));G.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=h(r),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var VE={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _s=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_s.isDisabled&&_s.supportsFiber)try{Tt=_s.inject(VE),at=_s}catch{}}return Rl.createRoot=function(n,r){if(!o(n))throw Error(a(299));var l=!1,u="",p=tg,m=ng,_=ig;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(_=r.onRecoverableError)),r=zy(n,1,!1,null,null,l,u,null,p,m,_,Yy),n[Rr]=r.current,gd(n),new Id(r)},Rl.hydrateRoot=function(n,r,l){if(!o(n))throw Error(a(299));var u=!1,p="",m=tg,_=ng,E=ig,N=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(p=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=zy(n,1,!0,r,l??null,u,p,N,m,_,E,Yy),r.context=Hy(null),l=r.current,u=ln(),u=wu(u),p=Li(u),p.callback=null,Ri(l,p,u),l=u,r.current.lanes=l,Pa(r,l),Vn(r),n[Rr]=r.current,gd(n),new vs(r)},Rl.version="19.2.6",Rl}var r0;function WE(){if(r0)return Ud.exports;r0=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(),Ud.exports=KE(),Ud.exports}var JE=WE();async function zn(e,t={}){const i=await fetch(e,{headers:{"content-type":"application/json",...t.headers},...t}),a=await ex(i);if(!i.ok)throw new Error(a.error||i.statusText||`request to ${e} failed`);return a}async function ex(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 tx(){return zn("/api/bootstrap")}async function nx(e){return zn("/api/diff")}async function ix(e){return zn("/api/state",{method:"POST",body:JSON.stringify(e)})}async function a0(e){return zn("/api/thread",{method:"POST",body:JSON.stringify(e)})}async function Vd(e){return zn("/api/thread/reply",{method:"POST",body:JSON.stringify(e)})}async function rx(e){return zn("/api/thread-message",{method:"POST",body:JSON.stringify({id:e})})}async function ax(e){return zn("/api/thread/resolve",{method:"POST",body:JSON.stringify(e)})}async function lx(e){return zn("/api/thread/collapse",{method:"POST",body:JSON.stringify(e)})}async function ox(){return zn("/api/brief/generate",{method:"POST"})}async function sx(e){return zn("/api/review",{method:"POST",body:JSON.stringify({message:e})})}async function ux(){return zn("/api/cancel",{method:"POST"})}const cx=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","horizon-bright","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],vh="github-dark-dimmed",dx={diffStyle:"split",overflowMode:"wrap",codeTheme:vh,sidebarOpen:!1,collapsedFileIds:[],viewedFileIds:[],threads:[],brief:{content:"",loading:!1}},fx=new Set(cx);function hx(e){return{...e,diffStyle:e.diffStyle==="split"?"split":"stacked",overflowMode:e.overflowMode==="scroll"?"scroll":"wrap",codeTheme:gx(e.codeTheme),threads:e.threads.map(t=>({...t,anchor:t.anchor.kind==="line"?{...t.anchor}:{kind:"detached"},resolved:!!t.resolved,collapsed:!!t.collapsed})),brief:{...e.brief.threadId?{threadId:e.brief.threadId}:{},content:e.brief.content,loading:!!e.brief.loading}}}function _h(e){return e.anchor.kind==="line"}function px(e){return e.anchor.kind==="detached"}function l0(e){return Object.fromEntries(e.map(t=>[t,!0]))}function o0(e,t){return e.includes(t)?e.filter(i=>i!==t):[...e,t]}function Gd(e){return[...new Set(e)]}function mx(e,t){return{additions:e.additions+t.additions,deletions:e.deletions+t.deletions}}function gx(e){return fx.has(e)?e:vh}function yx(e){const t=new Map;for(const i of e){if(!_h(i))continue;const a={lineNumber:i.anchor.lineNumber,side:i.anchor.side,metadata:{type:"thread",thread:i}},o=t.get(i.anchor.fileId);o?o.push(a):t.set(i.anchor.fileId,[a])}return t}function bx(e){const t=new Map;for(const i of e)_h(i)&&t.set(i.anchor.fileId,(t.get(i.anchor.fileId)??0)+1);return t}function vx(e,t,i,a){return!a||i?.fileId!==t?e:[...e,a]}function _x(e,t,i){return{...e,threads:e.threads.map(a=>a.id===t?{...a,loading:i}:a)}}function Sx(e,t){return{...e,brief:{...e.brief,loading:t}}}function Ex(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 mv=(...e)=>e.filter((t,i,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===i).join(" ").trim();const xx=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Cx=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,i,a)=>a?a.toUpperCase():i.toLowerCase());const s0=e=>{const t=Cx(e);return t.charAt(0).toUpperCase()+t.slice(1)};var $d={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 wx=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},kx=ne.createContext({}),Ax=()=>ne.useContext(kx),Tx=ne.forwardRef(({color:e,size:t,strokeWidth:i,absoluteStrokeWidth:a,className:o="",children:s,iconNode:c,...f},d)=>{const{size:h=24,strokeWidth:y=2,absoluteStrokeWidth:g=!1,color:b="currentColor",className:v=""}=Ax()??{},S=a??g?Number(i??y)*24/Number(t??h):i??y;return ne.createElement("svg",{ref:d,...$d,width:t??h??$d.width,height:t??h??$d.height,stroke:e??b,strokeWidth:S,className:mv("lucide",v,o),...!s&&!wx(f)&&{"aria-hidden":"true"},...f},[...c.map(([w,D])=>ne.createElement(w,D)),...Array.isArray(s)?s:[s]])});const cn=(e,t)=>{const i=ne.forwardRef(({className:a,...o},s)=>ne.createElement(Tx,{ref:s,iconNode:t,className:mv(`lucide-${xx(s0(e))}`,`lucide-${e}`,a),...o}));return i.displayName=s0(e),i};const Lx=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Rx=cn("check",Lx);const Dx=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],gv=cn("chevron-down",Dx);const Nx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ox=cn("chevron-right",Nx);const Mx=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],yv=cn("chevrons-down-up",Mx);const Ix=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],bv=cn("chevrons-up-down",Ix);const zx=[["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"}]],Hx=cn("eye-off",zx);const Ux=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],Px=cn("file-diff",Ux);const Bx=[["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"}]],vv=cn("message-square",Bx);const jx=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],Vx=cn("messages-square",jx);const Gx=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],$x=cn("panel-left",Gx);const Fx=[["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"}]],qx=cn("scroll-text",Fx);const Yx=[["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"}]],Xx=cn("sparkles",Yx);const Qx=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_v=cn("x",Qx);function _a({icon:e,label:t,size:i=14,className:a="",...o}){return I.jsx("button",{type:"button",className:`icon-btn ${a}`,"aria-label":t,...o,children:I.jsx(e,{size:i})})}function Sv({open:e,title:t,ariaLabel:i,closeLabel:a,widthClassName:o,bodyClassName:s,onClose:c,children:f}){return ne.useEffect(()=>{if(!e)return;const d=h=>{h.key==="Escape"&&c()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[e,c]),e?I.jsx("div",{className:"dialog-backdrop",onClick:c,children:I.jsxs("div",{className:`dialog${o?` ${o}`:""}`,role:"dialog","aria-modal":"true","aria-label":i,onClick:d=>d.stopPropagation(),children:[I.jsxs("div",{className:"dialog-header",children:[I.jsx("div",{className:"dialog-heading",children:I.jsx("div",{className:"dialog-title",children:t})}),I.jsx("div",{className:"dialog-actions",children:I.jsx(_a,{icon:_v,size:16,label:a,className:"dialog-close",onClick:c})})]}),I.jsx("div",{className:`dialog-body-wrap${s?` ${s}`:""}`,children:f})]})}):null}function Ev(e,t){const i=t||{};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const Zx=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Kx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wx={};function u0(e,t){return(Wx.jsx?Kx:Zx).test(e)}const Jx=/[ \t\n\f\r]/g;function uu(e){return typeof e=="object"?e.type==="text"?c0(e.value):!1:c0(e)}function c0(e){return e.replace(Jx,"")===""}class io{constructor(t,i,a){this.normal=i,this.property=t,a&&(this.space=a)}}io.prototype.normal={};io.prototype.property={};io.prototype.space=void 0;function xv(e,t){const i={},a={};for(const o of e)Object.assign(i,o.property),Object.assign(a,o.normal);return new io(i,a,t)}function Of(e){return e.toLowerCase()}class Wt{constructor(t,i){this.attribute=i,this.property=t}}Wt.prototype.attribute="";Wt.prototype.booleanish=!1;Wt.prototype.boolean=!1;Wt.prototype.commaOrSpaceSeparated=!1;Wt.prototype.commaSeparated=!1;Wt.prototype.defined=!1;Wt.prototype.mustUseProperty=!1;Wt.prototype.number=!1;Wt.prototype.overloadedBoolean=!1;Wt.prototype.property="";Wt.prototype.spaceSeparated=!1;Wt.prototype.space=void 0;let eC=0;const Te=xr(),pt=xr(),Mf=xr(),oe=xr(),Ze=xr(),ka=xr(),on=xr();function xr(){return 2**++eC}const If=Object.freeze(Object.defineProperty({__proto__:null,boolean:Te,booleanish:pt,commaOrSpaceSeparated:on,commaSeparated:ka,number:oe,overloadedBoolean:Mf,spaceSeparated:Ze},Symbol.toStringTag,{value:"Module"})),Fd=Object.keys(If);class Sh extends Wt{constructor(t,i,a,o){let s=-1;if(super(t,i),d0(this,"space",o),typeof a=="number")for(;++s<Fd.length;){const c=Fd[s];d0(this,Fd[s],(a&If[c])===If[c])}}}Sh.prototype.defined=!0;function d0(e,t,i){i&&(e[t]=i)}function Na(e){const t={},i={};for(const[a,o]of Object.entries(e.properties)){const s=new Sh(a,e.transform(e.attributes||{},a),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(s.mustUseProperty=!0),t[a]=s,i[Of(a)]=a,i[Of(s.attribute)]=a}return new io(t,i,e.space)}const Cv=Na({properties:{ariaActiveDescendant:null,ariaAtomic:pt,ariaAutoComplete:null,ariaBusy:pt,ariaChecked:pt,ariaColCount:oe,ariaColIndex:oe,ariaColSpan:oe,ariaControls:Ze,ariaCurrent:null,ariaDescribedBy:Ze,ariaDetails:null,ariaDisabled:pt,ariaDropEffect:Ze,ariaErrorMessage:null,ariaExpanded:pt,ariaFlowTo:Ze,ariaGrabbed:pt,ariaHasPopup:null,ariaHidden:pt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ze,ariaLevel:oe,ariaLive:null,ariaModal:pt,ariaMultiLine:pt,ariaMultiSelectable:pt,ariaOrientation:null,ariaOwns:Ze,ariaPlaceholder:null,ariaPosInSet:oe,ariaPressed:pt,ariaReadOnly:pt,ariaRelevant:null,ariaRequired:pt,ariaRoleDescription:Ze,ariaRowCount:oe,ariaRowIndex:oe,ariaRowSpan:oe,ariaSelected:pt,ariaSetSize:oe,ariaSort:null,ariaValueMax:oe,ariaValueMin:oe,ariaValueNow:oe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function wv(e,t){return t in e?e[t]:t}function kv(e,t){return wv(e,t.toLowerCase())}const tC=Na({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ka,acceptCharset:Ze,accessKey:Ze,action:null,allow:null,allowFullScreen:Te,allowPaymentRequest:Te,allowUserMedia:Te,alt:null,as:null,async:Te,autoCapitalize:null,autoComplete:Ze,autoFocus:Te,autoPlay:Te,blocking:Ze,capture:null,charSet:null,checked:Te,cite:null,className:Ze,cols:oe,colSpan:null,content:null,contentEditable:pt,controls:Te,controlsList:Ze,coords:oe|ka,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Te,defer:Te,dir:null,dirName:null,disabled:Te,download:Mf,draggable:pt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Te,formTarget:null,headers:Ze,height:oe,hidden:Mf,high:oe,href:null,hrefLang:null,htmlFor:Ze,httpEquiv:Ze,id:null,imageSizes:null,imageSrcSet:null,inert:Te,inputMode:null,integrity:null,is:null,isMap:Te,itemId:null,itemProp:Ze,itemRef:Ze,itemScope:Te,itemType:Ze,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Te,low:oe,manifest:null,max:null,maxLength:oe,media:null,method:null,min:null,minLength:oe,multiple:Te,muted:Te,name:null,nonce:null,noModule:Te,noValidate:Te,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:Te,optimum:oe,pattern:null,ping:Ze,placeholder:null,playsInline:Te,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Te,referrerPolicy:null,rel:Ze,required:Te,reversed:Te,rows:oe,rowSpan:oe,sandbox:Ze,scope:null,scoped:Te,seamless:Te,selected:Te,shadowRootClonable:Te,shadowRootDelegatesFocus:Te,shadowRootMode:null,shape:null,size:oe,sizes:null,slot:null,span:oe,spellCheck:pt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:oe,step:null,style:null,tabIndex:oe,target:null,title:null,translate:null,type:null,typeMustMatch:Te,useMap:null,value:pt,width:oe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ze,axis:null,background:null,bgColor:null,border:oe,borderColor:null,bottomMargin:oe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Te,declare:Te,event:null,face:null,frame:null,frameBorder:null,hSpace:oe,leftMargin:oe,link:null,longDesc:null,lowSrc:null,marginHeight:oe,marginWidth:oe,noResize:Te,noHref:Te,noShade:Te,noWrap:Te,object:null,profile:null,prompt:null,rev:null,rightMargin:oe,rules:null,scheme:null,scrolling:pt,standby:null,summary:null,text:null,topMargin:oe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:oe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Te,disableRemotePlayback:Te,prefix:null,property:null,results:oe,security:null,unselectable:null},space:"html",transform:kv}),nC=Na({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:on,accentHeight:oe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:oe,amplitude:oe,arabicForm:null,ascent:oe,attributeName:null,attributeType:null,azimuth:oe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:oe,by:null,calcMode:null,capHeight:oe,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:oe,diffuseConstant:oe,direction:null,display:null,dur:null,divisor:oe,dominantBaseline:null,download:Te,dx:null,dy:null,edgeMode:null,editable:null,elevation:oe,enableBackground:null,end:null,event:null,exponent:oe,externalResourcesRequired:null,fill:null,fillOpacity:oe,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:ka,g2:ka,glyphName:ka,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:oe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:oe,horizOriginX:oe,horizOriginY:oe,id:null,ideographic:oe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:oe,k:oe,k1:oe,k2:oe,k3:oe,k4:oe,kernelMatrix:on,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:oe,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:oe,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:oe,overlineThickness:oe,paintOrder:null,panose1:null,path:null,pathLength:oe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ze,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:oe,pointsAtY:oe,pointsAtZ:oe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:on,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:on,rev:on,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:on,requiredFeatures:on,requiredFonts:on,requiredFormats:on,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:oe,specularExponent:oe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:oe,strikethroughThickness:oe,string:null,stroke:null,strokeDashArray:on,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:oe,strokeOpacity:oe,strokeWidth:null,style:null,surfaceScale:oe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:on,tabIndex:oe,tableValues:null,target:null,targetX:oe,targetY:oe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:on,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:oe,underlineThickness:oe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:oe,values:null,vAlphabetic:oe,vMathematical:oe,vectorEffect:null,vHanging:oe,vIdeographic:oe,version:null,vertAdvY:oe,vertOriginX:oe,vertOriginY:oe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:oe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:wv}),Av=Na({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()}}),Tv=Na({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:kv}),Lv=Na({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),iC={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"},rC=/[A-Z]/g,f0=/-[a-z]/g,aC=/^data[-\w.:]+$/i;function Rv(e,t){const i=Of(t);let a=t,o=Wt;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&aC.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(f0,oC);a="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!f0.test(s)){let c=s.replace(rC,lC);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}o=Sh}return new o(a,t)}function lC(e){return"-"+e.toLowerCase()}function oC(e){return e.charAt(1).toUpperCase()}const Dv=xv([Cv,tC,Av,Tv,Lv],"html"),ro=xv([Cv,nC,Av,Tv,Lv],"svg");function Nv(e){return e.join(" ").trim()}var pa={},qd,h0;function sC(){if(h0)return qd;h0=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
+ `,h="/",y="*",g="",b="comment",v="declaration";function S(D,x){if(typeof D!="string")throw new TypeError("First argument must be a string");if(!D)return[];x=x||{};var T=1,k=1;function U(ie){var q=ie.match(t);q&&(T+=q.length);var H=ie.lastIndexOf(d);k=~H?ie.length-H:k+ie.length}function z(){var ie={line:T,column:k};return function(q){return q.position=new R(ie),V(),q}}function R(ie){this.start=ie,this.end={line:T,column:k},this.source=x.source}R.prototype.content=D;function F(ie){var q=new Error(x.source+":"+T+":"+k+": "+ie);if(q.reason=ie,q.filename=x.source,q.line=T,q.column=k,q.source=D,!x.silent)throw q}function le(ie){var q=ie.exec(D);if(q){var H=q[0];return U(H),D=D.slice(H.length),q}}function V(){le(i)}function se(ie){var q;for(ie=ie||[];q=Z();)q!==!1&&ie.push(q);return ie}function Z(){var ie=z();if(!(h!=D.charAt(0)||y!=D.charAt(1))){for(var q=2;g!=D.charAt(q)&&(y!=D.charAt(q)||h!=D.charAt(q+1));)++q;if(q+=2,g===D.charAt(q-1))return F("End of comment missing");var H=D.slice(2,q-2);return k+=2,U(H),D=D.slice(q),k+=2,ie({type:b,comment:H})}}function K(){var ie=z(),q=le(a);if(q){if(Z(),!le(o))return F("property missing ':'");var H=le(s),G=ie({type:v,property:w(q[0].replace(e,g)),value:H?w(H[0].replace(e,g)):g});return le(c),G}}function W(){var ie=[];se(ie);for(var q;q=K();)q!==!1&&(ie.push(q),se(ie));return ie}return V(),W()}function w(D){return D?D.replace(f,g):g}return qd=S,qd}var p0;function uC(){if(p0)return pa;p0=1;var e=pa&&pa.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(pa,"__esModule",{value:!0}),pa.default=i;const t=e(sC());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:h,value:y}=d;f?o(h,y,d):y&&(s=s||{},s[h]=y)}),s}return pa}var Dl={},m0;function cC(){if(m0)return Dl;m0=1,Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(h){return!h||i.test(h)||e.test(h)},c=function(h,y){return y.toUpperCase()},f=function(h,y){return"".concat(y,"-")},d=function(h,y){return y===void 0&&(y={}),s(h)?h:(h=h.toLowerCase(),y.reactCompat?h=h.replace(o,f):h=h.replace(a,f),h.replace(t,c))};return Dl.camelCase=d,Dl}var Nl,g0;function dC(){if(g0)return Nl;g0=1;var e=Nl&&Nl.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(uC()),i=cC();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,Nl=a,Nl}var fC=dC();const hC=pv(fC),Ov=Mv("end"),Eh=Mv("start");function Mv(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 pC(e){const t=Eh(e),i=Ov(e);if(t&&i)return{start:t,end:i}}function Gl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?y0(e.position):"start"in e||"end"in e?y0(e):"line"in e||"column"in e?zf(e):""}function zf(e){return b0(e&&e.line)+":"+b0(e&&e.column)}function y0(e){return zf(e&&e.start)+"-"+zf(e&&e.end)}function b0(e){return e&&typeof e=="number"?e:1}class Bt 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=Gl(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}}Bt.prototype.file="";Bt.prototype.name="";Bt.prototype.reason="";Bt.prototype.message="";Bt.prototype.stack="";Bt.prototype.column=void 0;Bt.prototype.line=void 0;Bt.prototype.ancestors=void 0;Bt.prototype.cause=void 0;Bt.prototype.fatal=void 0;Bt.prototype.place=void 0;Bt.prototype.ruleId=void 0;Bt.prototype.source=void 0;const xh={}.hasOwnProperty,mC=new Map,gC=/[A-Z]/g,yC=new Set(["table","tbody","thead","tfoot","tr"]),bC=new Set(["td","th"]),Iv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function vC(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=AC(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=kC(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"?ro:Dv,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=zv(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function zv(e,t,i){if(t.type==="element")return _C(e,t,i);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return SC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return xC(e,t,i);if(t.type==="mdxjsEsm")return EC(e,t);if(t.type==="root")return CC(e,t,i);if(t.type==="text")return wC(e,t)}function _C(e,t,i){const a=e.schema;let o=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(o=ro,e.schema=o),e.ancestors.push(t);const s=Uv(e,t.tagName,!1),c=TC(e,t);let f=wh(e,t);return yC.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!uu(d):!0})),Hv(e,c,s,t),Ch(c,f),e.ancestors.pop(),e.schema=a,e.create(t,s,c,i)}function SC(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)}Ql(e,t.position)}function EC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ql(e,t.position)}function xC(e,t,i){const a=e.schema;let o=a;t.name==="svg"&&a.space==="html"&&(o=ro,e.schema=o),e.ancestors.push(t);const s=t.name===null?e.Fragment:Uv(e,t.name,!0),c=LC(e,t),f=wh(e,t);return Hv(e,c,s,t),Ch(c,f),e.ancestors.pop(),e.schema=a,e.create(t,s,c,i)}function CC(e,t,i){const a={};return Ch(a,wh(e,t)),e.create(t,e.Fragment,a,i)}function wC(e,t){return t.value}function Hv(e,t,i,a){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(t.node=a)}function Ch(e,t){if(t.length>0){const i=t.length>1?t:t[0];i&&(e.children=i)}}function kC(e,t,i){return a;function a(o,s,c,f){const h=Array.isArray(c.children)?i:t;return f?h(s,c,f):h(s,c)}}function AC(e,t){return i;function i(a,o,s,c){const f=Array.isArray(s.children),d=Eh(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 TC(e,t){const i={};let a,o;for(o in t.properties)if(o!=="children"&&xh.call(t.properties,o)){const s=RC(e,o,t.properties[o]);if(s){const[c,f]=s;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&bC.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 LC(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 Ql(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 Ql(e,t.position);else s=a.value===null?!0:a.value;i[o]=s}return i}function wh(e,t){const i=[];let a=-1;const o=e.passKeys?new Map:mC;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 h=o.get(d)||0;c=d+"-"+h,o.set(d,h+1)}}const f=zv(e,s,c);f!==void 0&&i.push(f)}return i}function RC(e,t,i){const a=Rv(e.schema,t);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=a.commaSeparated?Ev(i):Nv(i)),a.property==="style"){let o=typeof i=="object"?i:DC(e,String(i));return e.stylePropertyNameCase==="css"&&(o=NC(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&a.space?iC[a.property]||a.property:a.attribute,i]}}function DC(e,t){try{return hC(t,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const a=i,o=new Bt("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=Iv+"#cannot-parse-style-attribute",o}}function Uv(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=u0(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=u0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const o=a.value;return xh.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(a);Ql(e)}function Ql(e,t){const i=new Bt("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=Iv+"#cannot-handle-mdx-estrees-without-createevaluater",i}function NC(e){const t={};let i;for(i in e)xh.call(e,i)&&(t[OC(i)]=e[i]);return t}function OC(e){let t=e.replace(gC,MC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function MC(e){return"-"+e.toLowerCase()}const Yd={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"]},IC={};function zC(e,t){const i=IC,a=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return Pv(e,a,o)}function Pv(e,t,i){if(HC(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 v0(e.children,t,i)}return Array.isArray(e)?v0(e,t,i):""}function v0(e,t,i){const a=[];let o=-1;for(;++o<e.length;)a[o]=Pv(e[o],t,i);return a.join("")}function HC(e){return!!(e&&typeof e=="object")}const _0=document.createElement("i");function kh(e){const t="&"+e+";";_0.innerHTML=t;const i=_0.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===t?!1:i}function Zn(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 xn(e,t){return e.length>0?(Zn(e,e.length,0,t),e):t}const S0={}.hasOwnProperty;function UC(e){const t={};let i=-1;for(;++i<e.length;)PC(t,e[i]);return t}function PC(e,t){let i;for(i in t){const o=(S0.call(e,i)?e[i]:void 0)||(e[i]={}),s=t[i];let c;if(s)for(c in s){S0.call(o,c)||(o[c]=[]);const f=s[c];BC(o[c],Array.isArray(f)?f:f?[f]:[])}}}function BC(e,t){let i=-1;const a=[];for(;++i<t.length;)(t[i].add==="after"?e:a).push(t[i]);Zn(e,0,0,a)}function Bv(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 Aa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Yn=Zi(/[A-Za-z]/),un=Zi(/[\dA-Za-z]/),jC=Zi(/[#-'*+\--9=?A-Z^-~]/);function Hf(e){return e!==null&&(e<32||e===127)}const Uf=Zi(/\d/),VC=Zi(/[\dA-Fa-f]/),GC=Zi(/[!-/:-@[-`{-~]/);function Ee(e){return e!==null&&e<-2}function Kt(e){return e!==null&&(e<0||e===32)}function Ve(e){return e===-2||e===-1||e===32}const $C=Zi(new RegExp("\\p{P}|\\p{S}","u")),FC=Zi(/\s/);function Zi(e){return t;function t(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function Oa(e){const t=[];let i=-1,a=0,o=0;for(;++i<e.length;){const s=e.charCodeAt(i);let c="";if(s===37&&un(e.charCodeAt(i+1))&&un(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 Ve(d)?(e.enter(i),f(d)):t(d)}function f(d){return Ve(d)&&s++<o?(e.consume(d),f):(e.exit(i),t(d))}}const qC={tokenize:YC};function YC(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 Ee(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),c)}}const XC={tokenize:QC},E0={tokenize:ZC};function QC(e){const t=this,i=[];let a=0,o,s,c;return f;function f(k){if(a<i.length){const U=i[a];return t.containerState=U[1],e.attempt(U[0].continuation,d,h)(k)}return h(k)}function d(k){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&T();const U=t.events.length;let z=U,R;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){R=t.events[z][1].end;break}x(a);let F=U;for(;F<t.events.length;)t.events[F][1].end={...R},F++;return Zn(t.events,z+1,0,t.events.slice(U)),t.events.length=F,h(k)}return f(k)}function h(k){if(a===i.length){if(!o)return b(k);if(o.currentConstruct&&o.currentConstruct.concrete)return S(k);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(E0,y,g)(k)}function y(k){return o&&T(),x(a),b(k)}function g(k){return t.parser.lazy[t.now().line]=a!==i.length,c=t.now().offset,S(k)}function b(k){return t.containerState={},e.attempt(E0,v,S)(k)}function v(k){return a++,i.push([t.currentConstruct,t.containerState]),b(k)}function S(k){if(k===null){o&&T(),x(0),e.consume(k);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),w(k)}function w(k){if(k===null){D(e.exit("chunkFlow"),!0),x(0),e.consume(k);return}return Ee(k)?(e.consume(k),D(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(k),w)}function D(k,U){const z=t.sliceStream(k);if(U&&z.push(null),k.previous=s,s&&(s.next=k),s=k,o.defineSkip(k.start),o.write(z),t.parser.lazy[k.start.line]){let R=o.events.length;for(;R--;)if(o.events[R][1].start.offset<c&&(!o.events[R][1].end||o.events[R][1].end.offset>c))return;const F=t.events.length;let le=F,V,se;for(;le--;)if(t.events[le][0]==="exit"&&t.events[le][1].type==="chunkFlow"){if(V){se=t.events[le][1].end;break}V=!0}for(x(a),R=F;R<t.events.length;)t.events[R][1].end={...se},R++;Zn(t.events,le+1,0,t.events.slice(F)),t.events.length=R}}function x(k){let U=i.length;for(;U-- >k;){const z=i[U];t.containerState=z[1],z[0].exit.call(t,e)}i.length=k}function T(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function ZC(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 x0(e){if(e===null||Kt(e)||FC(e))return 1;if($C(e))return 2}function Ah(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 Pf={name:"attention",resolveAll:KC,tokenize:WC};function KC(e,t){let i=-1,a,o,s,c,f,d,h,y;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 g={...e[a][1].end},b={...e[i][1].start};C0(g,-d),C0(b,d),c={type:d>1?"strongSequence":"emphasisSequence",start:g,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},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=xn(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=xn(h,[["enter",o,t],["enter",c,t],["exit",c,t],["enter",s,t]]),h=xn(h,Ah(t.parser.constructs.insideSpan.null,e.slice(a+1,i),t)),h=xn(h,[["exit",s,t],["enter",f,t],["exit",f,t],["exit",o,t]]),e[i][1].end.offset-e[i][1].start.offset?(y=2,h=xn(h,[["enter",e[i][1],t],["exit",e[i][1],t]])):y=0,Zn(e,a-1,i-a+3,h),i=a+h.length-y-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function WC(e,t){const i=this.parser.constructs.attentionMarkers.null,a=this.previous,o=x0(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 h=e.exit("attentionSequence"),y=x0(d),g=!y||y===2&&o||i.includes(d),b=!o||o===2&&y||i.includes(a);return h._open=!!(s===42?g:g&&(o||!b)),h._close=!!(s===42?b:b&&(y||!g)),t(d)}}function C0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const JC={name:"autolink",tokenize:ew};function ew(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 Yn(v)?(e.consume(v),c):v===64?i(v):h(v)}function c(v){return v===43||v===45||v===46||un(v)?(a=1,f(v)):h(v)}function f(v){return v===58?(e.consume(v),a=0,d):(v===43||v===45||v===46||un(v))&&a++<32?(e.consume(v),f):(a=0,h(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||Hf(v)?i(v):(e.consume(v),d)}function h(v){return v===64?(e.consume(v),y):jC(v)?(e.consume(v),h):i(v)}function y(v){return un(v)?g(v):i(v)}function g(v){return v===46?(e.consume(v),a=0,y):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||un(v))&&a++<63){const S=v===45?b:g;return e.consume(v),S}return i(v)}}const cu={partial:!0,tokenize:tw};function tw(e,t,i){return a;function a(s){return Ve(s)?Ke(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||Ee(s)?t(s):i(s)}}const jv={continuation:{tokenize:iw},exit:rw,name:"blockQuote",tokenize:nw};function nw(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 Ve(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function iw(e,t,i){const a=this;return o;function o(c){return Ve(c)?Ke(e,s,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt(jv,t,i)(c)}}function rw(e){e.exit("blockQuote")}const Vv={name:"characterEscape",tokenize:aw};function aw(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 GC(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):i(s)}}const Gv={name:"characterReference",tokenize:lw};function lw(e,t,i){const a=this;let o=0,s,c;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),d}function d(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),s=31,c=un,y(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,c=VC,y):(e.enter("characterReferenceValue"),s=7,c=Uf,y(g))}function y(g){if(g===59&&o){const b=e.exit("characterReferenceValue");return c===un&&!kh(a.sliceSerialize(b))?i(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(g)&&o++<s?(e.consume(g),y):i(g)}}const w0={partial:!0,tokenize:sw},k0={concrete:!0,name:"codeFenced",tokenize:ow};function ow(e,t,i){const a=this,o={partial:!0,tokenize:z};let s=0,c=0,f;return d;function d(R){return h(R)}function h(R){const F=a.events[a.events.length-1];return s=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,f=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(R)}function y(R){return R===f?(c++,e.consume(R),y):c<3?i(R):(e.exit("codeFencedFenceSequence"),Ve(R)?Ke(e,g,"whitespace")(R):g(R))}function g(R){return R===null||Ee(R)?(e.exit("codeFencedFence"),a.interrupt?t(R):e.check(w0,w,U)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(R))}function b(R){return R===null||Ee(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(R)):Ve(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,v,"whitespace")(R)):R===96&&R===f?i(R):(e.consume(R),b)}function v(R){return R===null||Ee(R)?g(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(R))}function S(R){return R===null||Ee(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(R)):R===96&&R===f?i(R):(e.consume(R),S)}function w(R){return e.attempt(o,U,D)(R)}function D(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),x}function x(R){return s>0&&Ve(R)?Ke(e,T,"linePrefix",s+1)(R):T(R)}function T(R){return R===null||Ee(R)?e.check(w0,w,U)(R):(e.enter("codeFlowValue"),k(R))}function k(R){return R===null||Ee(R)?(e.exit("codeFlowValue"),T(R)):(e.consume(R),k)}function U(R){return e.exit("codeFenced"),t(R)}function z(R,F,le){let V=0;return se;function se(q){return R.enter("lineEnding"),R.consume(q),R.exit("lineEnding"),Z}function Z(q){return R.enter("codeFencedFence"),Ve(q)?Ke(R,K,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):K(q)}function K(q){return q===f?(R.enter("codeFencedFenceSequence"),W(q)):le(q)}function W(q){return q===f?(V++,R.consume(q),W):V>=c?(R.exit("codeFencedFenceSequence"),Ve(q)?Ke(R,ie,"whitespace")(q):ie(q)):le(q)}function ie(q){return q===null||Ee(q)?(R.exit("codeFencedFence"),F(q)):le(q)}}}function sw(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 Xd={name:"codeIndented",tokenize:cw},uw={partial:!0,tokenize:dw};function cw(e,t,i){const a=this;return o;function o(h){return e.enter("codeIndented"),Ke(e,s,"linePrefix",5)(h)}function s(h){const y=a.events[a.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(h):i(h)}function c(h){return h===null?d(h):Ee(h)?e.attempt(uw,c,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Ee(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),t(h)}}function dw(e,t,i){const a=this;return o;function o(c){return a.parser.lazy[a.now().line]?i(c):Ee(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):Ee(c)?o(c):i(c)}}const fw={name:"codeText",previous:pw,resolve:hw,tokenize:mw};function hw(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 pw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function mw(e,t,i){let a=0,o,s;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),a++,f):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?i(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(s=e.enter("codeTextSequence"),o=0,y(g)):Ee(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Ee(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),h)}function y(g){return g===96?(e.consume(g),o++,y):o===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(s.type="codeTextData",h(g))}}class gw{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&&Ol(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),Ol(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ol(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);Ol(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ol(this.left,i.reverse())}}}function Ol(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 $v(e){const t={};let i=-1,a,o,s,c,f,d,h;const y=new gw(e);for(;++i<y.length;){for(;i in t;)i=t[i];if(a=y.get(i),i&&a[1].type==="chunkFlow"&&y.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,yw(y,i)),i=t[i],h=!0);else if(a[1]._container){for(s=i,o=void 0;s--;)if(c=y.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(y.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={...y.get(o)[1].start},f=y.slice(o,i),f.unshift(a),y.splice(o,i-o+1,f))}}return Zn(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!h}function yw(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=[],h={};let y,g,b=-1,v=i,S=0,w=0;const D=[w];for(;v;){for(;e.get(++o)[1]!==v;);s.push(o),v._tokenizer||(y=a.sliceStream(v),v.next||y.push(null),g&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=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&&(w=b+1,D.push(w),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):D.pop(),b=D.length;b--;){const x=f.slice(D[b],D[b+1]),T=s.pop();d.push([T,T+x.length-1]),e.splice(T,2,x)}for(d.reverse(),b=-1;++b<d.length;)h[S+d[b][0]]=S+d[b][1],S+=d[b][1]-d[b][0]-1;return h}const bw={resolve:_w,tokenize:Sw},vw={partial:!0,tokenize:Ew};function _w(e){return $v(e),e}function Sw(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):Ee(f)?e.check(vw,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 Ew(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||Ee(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 Fv(e,t,i,a,o,s,c,f,d){const h=d||Number.POSITIVE_INFINITY;let y=0;return g;function g(x){return x===60?(e.enter(a),e.enter(o),e.enter(s),e.consume(x),e.exit(s),b):x===null||x===32||x===41||Hf(x)?i(x):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),w(x))}function b(x){return x===62?(e.enter(s),e.consume(x),e.exit(s),e.exit(o),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(x))}function v(x){return x===62?(e.exit("chunkString"),e.exit(f),b(x)):x===null||x===60||Ee(x)?i(x):(e.consume(x),x===92?S:v)}function S(x){return x===60||x===62||x===92?(e.consume(x),v):v(x)}function w(x){return!y&&(x===null||x===41||Kt(x))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(x)):y<h&&x===40?(e.consume(x),y++,w):x===41?(e.consume(x),y--,w):x===null||x===32||x===40||Hf(x)?i(x):(e.consume(x),x===92?D:w)}function D(x){return x===40||x===41||x===92?(e.consume(x),w):w(x)}}function qv(e,t,i,a,o,s){const c=this;let f=0,d;return h;function h(v){return e.enter(a),e.enter(o),e.consume(v),e.exit(o),e.enter(s),y}function y(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):Ee(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===null||v===91||v===93||Ee(v)||f++>999?(e.exit("chunkString"),y(v)):(e.consume(v),d||(d=!Ve(v)),v===92?b:g)}function b(v){return v===91||v===92||v===93?(e.consume(v),f++,g):g(v)}}function Yv(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),h(b))}function h(b){return b===c?(e.exit(s),d(c)):b===null?i(b):Ee(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Ke(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===c||b===null||Ee(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?g:y)}function g(b){return b===c||b===92?(e.consume(b),y):y(b)}}function $l(e,t){let i;return a;function a(o){return Ee(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,a):Ve(o)?Ke(e,a,i?"linePrefix":"lineSuffix")(o):t(o)}}const xw={name:"definition",tokenize:ww},Cw={partial:!0,tokenize:kw};function ww(e,t,i){const a=this;let o;return s;function s(v){return e.enter("definition"),c(v)}function c(v){return qv.call(a,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return o=Aa(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 Kt(v)?$l(e,h)(v):h(v)}function h(v){return Fv(e,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function y(v){return e.attempt(Cw,g,g)(v)}function g(v){return Ve(v)?Ke(e,b,"whitespace")(v):b(v)}function b(v){return v===null||Ee(v)?(e.exit("definition"),a.parser.defined.push(o),t(v)):i(v)}}function kw(e,t,i){return a;function a(f){return Kt(f)?$l(e,o)(f):i(f)}function o(f){return Yv(e,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return Ve(f)?Ke(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Ee(f)?t(f):i(f)}}const Aw={name:"hardBreakEscape",tokenize:Tw};function Tw(e,t,i){return a;function a(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return Ee(s)?(e.exit("hardBreakEscape"),t(s)):i(s)}}const Lw={name:"headingAtx",resolve:Rw,tokenize:Dw};function Rw(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"},Zn(e,a,i-a+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function Dw(e,t,i){let a=0;return o;function o(y){return e.enter("atxHeading"),s(y)}function s(y){return e.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&a++<6?(e.consume(y),c):y===null||Kt(y)?(e.exit("atxHeadingSequence"),f(y)):i(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),d(y)):y===null||Ee(y)?(e.exit("atxHeading"),t(y)):Ve(y)?Ke(e,f,"whitespace")(y):(e.enter("atxHeadingText"),h(y))}function d(y){return y===35?(e.consume(y),d):(e.exit("atxHeadingSequence"),f(y))}function h(y){return y===null||y===35||Kt(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),h)}}const Nw=["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"],A0=["pre","script","style","textarea"],Ow={concrete:!0,name:"htmlFlow",resolveTo:zw,tokenize:Hw},Mw={partial:!0,tokenize:Pw},Iw={partial:!0,tokenize:Uw};function zw(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 Hw(e,t,i){const a=this;let o,s,c,f,d;return h;function h(A){return y(A)}function y(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),g}function g(A){return A===33?(e.consume(A),b):A===47?(e.consume(A),s=!0,w):A===63?(e.consume(A),o=3,a.interrupt?t:L):Yn(A)?(e.consume(A),c=String.fromCharCode(A),D):i(A)}function b(A){return A===45?(e.consume(A),o=2,v):A===91?(e.consume(A),o=5,f=0,S):Yn(A)?(e.consume(A),o=4,a.interrupt?t:L):i(A)}function v(A){return A===45?(e.consume(A),a.interrupt?t:L):i(A)}function S(A){const ce="CDATA[";return A===ce.charCodeAt(f++)?(e.consume(A),f===ce.length?a.interrupt?t:K:S):i(A)}function w(A){return Yn(A)?(e.consume(A),c=String.fromCharCode(A),D):i(A)}function D(A){if(A===null||A===47||A===62||Kt(A)){const ce=A===47,me=c.toLowerCase();return!ce&&!s&&A0.includes(me)?(o=1,a.interrupt?t(A):K(A)):Nw.includes(c.toLowerCase())?(o=6,ce?(e.consume(A),x):a.interrupt?t(A):K(A)):(o=7,a.interrupt&&!a.parser.lazy[a.now().line]?i(A):s?T(A):k(A))}return A===45||un(A)?(e.consume(A),c+=String.fromCharCode(A),D):i(A)}function x(A){return A===62?(e.consume(A),a.interrupt?t:K):i(A)}function T(A){return Ve(A)?(e.consume(A),T):se(A)}function k(A){return A===47?(e.consume(A),se):A===58||A===95||Yn(A)?(e.consume(A),U):Ve(A)?(e.consume(A),k):se(A)}function U(A){return A===45||A===46||A===58||A===95||un(A)?(e.consume(A),U):z(A)}function z(A){return A===61?(e.consume(A),R):Ve(A)?(e.consume(A),z):k(A)}function R(A){return A===null||A===60||A===61||A===62||A===96?i(A):A===34||A===39?(e.consume(A),d=A,F):Ve(A)?(e.consume(A),R):le(A)}function F(A){return A===d?(e.consume(A),d=null,V):A===null||Ee(A)?i(A):(e.consume(A),F)}function le(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Kt(A)?z(A):(e.consume(A),le)}function V(A){return A===47||A===62||Ve(A)?k(A):i(A)}function se(A){return A===62?(e.consume(A),Z):i(A)}function Z(A){return A===null||Ee(A)?K(A):Ve(A)?(e.consume(A),Z):i(A)}function K(A){return A===45&&o===2?(e.consume(A),H):A===60&&o===1?(e.consume(A),G):A===62&&o===4?(e.consume(A),O):A===63&&o===3?(e.consume(A),L):A===93&&o===5?(e.consume(A),fe):Ee(A)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(Mw,X,W)(A)):A===null||Ee(A)?(e.exit("htmlFlowData"),W(A)):(e.consume(A),K)}function W(A){return e.check(Iw,ie,X)(A)}function ie(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),q}function q(A){return A===null||Ee(A)?W(A):(e.enter("htmlFlowData"),K(A))}function H(A){return A===45?(e.consume(A),L):K(A)}function G(A){return A===47?(e.consume(A),c="",ae):K(A)}function ae(A){if(A===62){const ce=c.toLowerCase();return A0.includes(ce)?(e.consume(A),O):K(A)}return Yn(A)&&c.length<8?(e.consume(A),c+=String.fromCharCode(A),ae):K(A)}function fe(A){return A===93?(e.consume(A),L):K(A)}function L(A){return A===62?(e.consume(A),O):A===45&&o===2?(e.consume(A),L):K(A)}function O(A){return A===null||Ee(A)?(e.exit("htmlFlowData"),X(A)):(e.consume(A),O)}function X(A){return e.exit("htmlFlow"),t(A)}}function Uw(e,t,i){const a=this;return o;function o(c){return Ee(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 Pw(e,t,i){return a;function a(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(cu,t,i)}}const Bw={name:"htmlText",tokenize:jw};function jw(e,t,i){const a=this;let o,s,c;return f;function f(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),d}function d(L){return L===33?(e.consume(L),h):L===47?(e.consume(L),z):L===63?(e.consume(L),k):Yn(L)?(e.consume(L),le):i(L)}function h(L){return L===45?(e.consume(L),y):L===91?(e.consume(L),s=0,S):Yn(L)?(e.consume(L),T):i(L)}function y(L){return L===45?(e.consume(L),v):i(L)}function g(L){return L===null?i(L):L===45?(e.consume(L),b):Ee(L)?(c=g,G(L)):(e.consume(L),g)}function b(L){return L===45?(e.consume(L),v):g(L)}function v(L){return L===62?H(L):L===45?b(L):g(L)}function S(L){const O="CDATA[";return L===O.charCodeAt(s++)?(e.consume(L),s===O.length?w:S):i(L)}function w(L){return L===null?i(L):L===93?(e.consume(L),D):Ee(L)?(c=w,G(L)):(e.consume(L),w)}function D(L){return L===93?(e.consume(L),x):w(L)}function x(L){return L===62?H(L):L===93?(e.consume(L),x):w(L)}function T(L){return L===null||L===62?H(L):Ee(L)?(c=T,G(L)):(e.consume(L),T)}function k(L){return L===null?i(L):L===63?(e.consume(L),U):Ee(L)?(c=k,G(L)):(e.consume(L),k)}function U(L){return L===62?H(L):k(L)}function z(L){return Yn(L)?(e.consume(L),R):i(L)}function R(L){return L===45||un(L)?(e.consume(L),R):F(L)}function F(L){return Ee(L)?(c=F,G(L)):Ve(L)?(e.consume(L),F):H(L)}function le(L){return L===45||un(L)?(e.consume(L),le):L===47||L===62||Kt(L)?V(L):i(L)}function V(L){return L===47?(e.consume(L),H):L===58||L===95||Yn(L)?(e.consume(L),se):Ee(L)?(c=V,G(L)):Ve(L)?(e.consume(L),V):H(L)}function se(L){return L===45||L===46||L===58||L===95||un(L)?(e.consume(L),se):Z(L)}function Z(L){return L===61?(e.consume(L),K):Ee(L)?(c=Z,G(L)):Ve(L)?(e.consume(L),Z):V(L)}function K(L){return L===null||L===60||L===61||L===62||L===96?i(L):L===34||L===39?(e.consume(L),o=L,W):Ee(L)?(c=K,G(L)):Ve(L)?(e.consume(L),K):(e.consume(L),ie)}function W(L){return L===o?(e.consume(L),o=void 0,q):L===null?i(L):Ee(L)?(c=W,G(L)):(e.consume(L),W)}function ie(L){return L===null||L===34||L===39||L===60||L===61||L===96?i(L):L===47||L===62||Kt(L)?V(L):(e.consume(L),ie)}function q(L){return L===47||L===62||Kt(L)?V(L):i(L)}function H(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):i(L)}function G(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),ae}function ae(L){return Ve(L)?Ke(e,fe,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):fe(L)}function fe(L){return e.enter("htmlTextData"),c(L)}}const Th={name:"labelEnd",resolveAll:Fw,resolveTo:qw,tokenize:Yw},Vw={tokenize:Xw},Gw={tokenize:Qw},$w={tokenize:Zw};function Fw(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&&Zn(e,0,e.length,i),e}function qw(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}},h={type:"label",start:{...e[s][1].start},end:{...e[c][1].end}},y={type:"labelText",start:{...e[s+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",d,t],["enter",h,t]],f=xn(f,e.slice(s+1,s+a+3)),f=xn(f,[["enter",y,t]]),f=xn(f,Ah(t.parser.constructs.insideSpan.null,e.slice(s+a+4,c-3),t)),f=xn(f,[["exit",y,t],e[c-2],e[c-1],["exit",h,t]]),f=xn(f,e.slice(c+1)),f=xn(f,[["exit",d,t]]),Zn(e,s,e.length,f),e}function Yw(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?g(b):(c=a.parser.defined.includes(Aa(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(Vw,y,c?y:g)(b):b===91?e.attempt(Gw,y,c?h:g)(b):c?y(b):g(b)}function h(b){return e.attempt($w,y,g)(b)}function y(b){return t(b)}function g(b){return s._balanced=!0,i(b)}}function Xw(e,t,i){return a;function a(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return Kt(g)?$l(e,s)(g):s(g)}function s(g){return g===41?y(g):Fv(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return Kt(g)?$l(e,d)(g):y(g)}function f(g){return i(g)}function d(g){return g===34||g===39||g===40?Yv(e,h,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function h(g){return Kt(g)?$l(e,y)(g):y(g)}function y(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):i(g)}}function Qw(e,t,i){const a=this;return o;function o(f){return qv.call(a,e,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return a.parser.defined.includes(Aa(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):i(f)}function c(f){return i(f)}}function Zw(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 Kw={name:"labelStartImage",resolveAll:Th.resolveAll,tokenize:Ww};function Ww(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 Jw={name:"labelStartLink",resolveAll:Th.resolveAll,tokenize:ek};function ek(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 Qd={name:"lineEnding",tokenize:tk};function tk(e,t){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ke(e,t,"linePrefix")}}const Vs={name:"thematicBreak",tokenize:nk};function nk(e,t,i){let a=0,o;return s;function s(h){return e.enter("thematicBreak"),c(h)}function c(h){return o=h,f(h)}function f(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):a>=3&&(h===null||Ee(h))?(e.exit("thematicBreak"),t(h)):i(h)}function d(h){return h===o?(e.consume(h),a++,d):(e.exit("thematicBreakSequence"),Ve(h)?Ke(e,f,"whitespace")(h):f(h))}}const Zt={continuation:{tokenize:lk},exit:sk,name:"list",tokenize:ak},ik={partial:!0,tokenize:uk},rk={partial:!0,tokenize:ok};function ak(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:Uf(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(Vs,i,h)(v):h(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(v)}return i(v)}function d(v){return Uf(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"),h(v)):i(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(cu,a.interrupt?i:y,e.attempt(ik,b,g))}function y(v){return a.containerState.initialBlankLine=!0,s++,b(v)}function g(v){return Ve(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 lk(e,t,i){const a=this;return a.containerState._closeFlow=void 0,e.check(cu,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||!Ve(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(rk,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,Ke(e,e.attempt(Zt,t,i),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function ok(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 sk(e){e.exit(this.containerState.type)}function uk(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!Ve(s)&&c&&c[1].type==="listItemPrefixWhitespace"?t(s):i(s)}}const T0={name:"setextUnderline",resolveTo:ck,tokenize:dk};function ck(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 dk(e,t,i){const a=this;let o;return s;function s(h){let y=a.events.length,g;for(;y--;)if(a.events[y][1].type!=="lineEnding"&&a.events[y][1].type!=="linePrefix"&&a.events[y][1].type!=="content"){g=a.events[y][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||g)?(e.enter("setextHeadingLine"),o=h,c(h)):i(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===o?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Ve(h)?Ke(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Ee(h)?(e.exit("setextHeadingLine"),t(h)):i(h)}}const fk={tokenize:hk};function hk(e){const t=this,i=e.attempt(cu,a,e.attempt(this.parser.constructs.flowInitial,o,Ke(e,e.attempt(this.parser.constructs.flow,o,e.attempt(bw,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 pk={resolveAll:Qv()},mk=Xv("string"),gk=Xv("text");function Xv(e){return{resolveAll:Qv(e==="text"?yk: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(y){return h(y)?s(y):f(y)}function f(y){if(y===null){i.consume(y);return}return i.enter("data"),i.consume(y),d}function d(y){return h(y)?(i.exit("data"),s(y)):(i.consume(y),d)}function h(y){if(y===null)return!0;const g=o[y];let b=-1;if(g)for(;++b<g.length;){const v=g[b];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function Qv(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 yk(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 h=o[s];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)d=!0,f++;else if(h!==-1){s++;break}}if(t._contentTypeTextTrailing&&i===e.length&&(f=0),f){const h={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={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(i,0,["enter",h,t],["exit",h,t]),i+=2)}i++}return e}const bk={42:Zt,43:Zt,45:Zt,48:Zt,49:Zt,50:Zt,51:Zt,52:Zt,53:Zt,54:Zt,55:Zt,56:Zt,57:Zt,62:jv},vk={91:xw},_k={[-2]:Xd,[-1]:Xd,32:Xd},Sk={35:Lw,42:Vs,45:[T0,Vs],60:Ow,61:T0,95:Vs,96:k0,126:k0},Ek={38:Gv,92:Vv},xk={[-5]:Qd,[-4]:Qd,[-3]:Qd,33:Kw,38:Gv,42:Pf,60:[JC,Bw],91:Jw,92:[Aw,Vv],93:Th,95:Pf,96:fw},Ck={null:[Pf,pk]},wk={null:[42,95]},kk={null:[]},Ak=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:wk,contentInitial:vk,disable:kk,document:bk,flow:Sk,flowInitial:_k,insideSpan:Ck,string:Ek,text:xk},Symbol.toStringTag,{value:"Module"}));function Tk(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:F(z),check:F(R),consume:T,enter:k,exit:U,interrupt:F(R,{interrupt:!0})},h={code:null,containerState:{},defineSkip:w,events:[],now:S,parser:e,previous:null,sliceSerialize:b,sliceStream:v,write:g};let y=t.tokenize.call(h,d);return t.resolveAll&&s.push(t),h;function g(Z){return c=xn(c,Z),D(),c[c.length-1]!==null?[]:(le(t,0),h.events=Ah(s,h.events,h),h.events)}function b(Z,K){return Rk(v(Z),K)}function v(Z){return Lk(c,Z)}function S(){const{_bufferIndex:Z,_index:K,line:W,column:ie,offset:q}=a;return{_bufferIndex:Z,_index:K,line:W,column:ie,offset:q}}function w(Z){o[Z.line]=Z.column,se()}function D(){let Z;for(;a._index<c.length;){const K=c[a._index];if(typeof K=="string")for(Z=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===Z&&a._bufferIndex<K.length;)x(K.charCodeAt(a._bufferIndex));else x(K)}}function x(Z){y=y(Z)}function T(Z){Ee(Z)?(a.line++,a.column=1,a.offset+=Z===-3?2:1,se()):Z!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=Z}function k(Z,K){const W=K||{};return W.type=Z,W.start=S(),h.events.push(["enter",W,h]),f.push(W),W}function U(Z){const K=f.pop();return K.end=S(),h.events.push(["exit",K,h]),K}function z(Z,K){le(Z,K.from)}function R(Z,K){K.restore()}function F(Z,K){return W;function W(ie,q,H){let G,ae,fe,L;return Array.isArray(ie)?X(ie):"tokenize"in ie?X([ie]):O(ie);function O(he){return Se;function Se(Oe){const be=Oe!==null&&he[Oe],He=Oe!==null&&he.null,tt=[...Array.isArray(be)?be:be?[be]:[],...Array.isArray(He)?He:He?[He]:[]];return X(tt)(Oe)}}function X(he){return G=he,ae=0,he.length===0?H:A(he[ae])}function A(he){return Se;function Se(Oe){return L=V(),fe=he,he.partial||(h.currentConstruct=he),he.name&&h.parser.constructs.disable.null.includes(he.name)?me():he.tokenize.call(K?Object.assign(Object.create(h),K):h,d,ce,me)(Oe)}}function ce(he){return Z(fe,L),q}function me(he){return L.restore(),++ae<G.length?A(G[ae]):H}}}function le(Z,K){Z.resolveAll&&!s.includes(Z)&&s.push(Z),Z.resolve&&Zn(h.events,K,h.events.length-K,Z.resolve(h.events.slice(K),h)),Z.resolveTo&&(h.events=Z.resolveTo(h.events,h))}function V(){const Z=S(),K=h.previous,W=h.currentConstruct,ie=h.events.length,q=Array.from(f);return{from:ie,restore:H};function H(){a=Z,h.previous=K,h.currentConstruct=W,h.events.length=ie,f=q,se()}}function se(){a.line in o&&a.column<2&&(a.column=o[a.line],a.offset+=o[a.line]-1)}}function Lk(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 Rk(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
+ `;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 Dk(e){const a={constructs:UC([Ak,...(e||{}).extensions||[]]),content:o(qC),defined:[],document:o(XC),flow:o(fk),lazy:{},string:o(mk),text:o(gk)};return a;function o(s){return c;function c(f){return Tk(a,s,f)}}}function Nk(e){for(;!$v(e););return e}const L0=/[\0\t\n\r]/g;function Ok(){let e=1,t="",i=!0,a;return o;function o(s,c,f){const d=[];let h,y,g,b,v;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),g=0,t="",i&&(s.charCodeAt(0)===65279&&g++,i=void 0);g<s.length;){if(L0.lastIndex=g,h=L0.exec(s),b=h&&h.index!==void 0?h.index:s.length,v=s.charCodeAt(b),!h){t=s.slice(g);break}if(v===10&&g===b&&a)d.push(-3),a=void 0;else switch(a&&(d.push(-5),a=void 0),g<b&&(d.push(s.slice(g,b)),e+=b-g),v){case 0:{d.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,d.push(-2);e++<y;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:a=!0,e=1}g=b+1}return f&&(a&&d.push(-5),t&&d.push(t),d.push(null)),d}}const Mk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ik(e){return e.replace(Mk,zk)}function zk(e,t,i){if(t)return t;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),s=o===120||o===88;return Bv(i.slice(s?2:1),s?16:10)}return kh(i)||e}const Zv={}.hasOwnProperty;function Hk(e,t,i){return t&&typeof t=="object"&&(i=t,t=void 0),Uk(i)(Nk(Dk(i).document().write(Ok()(e,t,!0))))}function Uk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(_i),autolinkProtocol:V,autolinkEmail:V,atxHeading:s(An),blockQuote:s(He),characterEscape:V,characterReference:V,codeFenced:s(tt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(tt,c),codeText:s(At,c),codeTextData:V,data:V,codeFlowValue:V,definition:s(jt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(ut),hardBreakEscape:s(gt),hardBreakTrailing:s(gt),htmlFlow:s(Cr,c),htmlFlowData:V,htmlText:s(Cr,c),htmlTextData:V,image:s(wr),label:c,link:s(_i),listItem:s(Ki),listItemValue:b,listOrdered:s(Si,g),listUnordered:s(Si),paragraph:s(Ha),reference:A,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(An),strong:s(kr),thematicBreak:s(Ua)},exit:{atxHeading:d(),atxHeadingSequence:z,autolink:d(),autolinkEmail:be,autolinkProtocol:Oe,blockQuote:d(),characterEscapeValue:se,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:he,characterReference:Se,codeFenced:d(D),codeFencedFence:w,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:se,codeIndented:d(x),codeText:d(q),codeTextData:se,data:se,definition:d(),definitionDestinationString:U,definitionLabelString:T,definitionTitleString:k,emphasis:d(),hardBreakEscape:d(K),hardBreakTrailing:d(K),htmlFlow:d(W),htmlFlowData:se,htmlText:d(ie),htmlTextData:se,image:d(G),label:fe,labelText:ae,lineEnding:Z,link:d(H),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ce,resourceDestinationString:L,resourceTitleString:O,resource:X,setextHeading:d(le),setextHeadingLineSequence:F,setextHeadingText:R,strong:d(),thematicBreak:d()}};Kv(t,(e||{}).mdastExtensions||[]);const i={};return a;function a(J){let ue={type:"root",children:[]};const _e={stack:[ue],tokenStack:[],config:t,enter:f,exit:h,buffer:c,resume:y,data:i},Re=[];let Ue=-1;for(;++Ue<J.length;)if(J[Ue][1].type==="listOrdered"||J[Ue][1].type==="listUnordered")if(J[Ue][0]==="enter")Re.push(Ue);else{const Mt=Re.pop();Ue=o(J,Mt,Ue)}for(Ue=-1;++Ue<J.length;){const Mt=t[J[Ue][0]];Zv.call(Mt,J[Ue][1].type)&&Mt[J[Ue][1].type].call(Object.assign({sliceSerialize:J[Ue][2].sliceSerialize},_e),J[Ue][1])}if(_e.tokenStack.length>0){const Mt=_e.tokenStack[_e.tokenStack.length-1];(Mt[1]||R0).call(_e,void 0,Mt[0])}for(ue.position={start:qi(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:qi(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ue=-1;++Ue<t.transforms.length;)ue=t.transforms[Ue](ue)||ue;return ue}function o(J,ue,_e){let Re=ue-1,Ue=-1,Mt=!1,dn,Tt,at,It;for(;++Re<=_e;){const Ge=J[Re];switch(Ge[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ge[0]==="enter"?Ue++:Ue--,It=void 0;break}case"lineEndingBlank":{Ge[0]==="enter"&&(dn&&!It&&!Ue&&!at&&(at=Re),It=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:It=void 0}if(!Ue&&Ge[0]==="enter"&&Ge[1].type==="listItemPrefix"||Ue===-1&&Ge[0]==="exit"&&(Ge[1].type==="listUnordered"||Ge[1].type==="listOrdered")){if(dn){let Hn=Re;for(Tt=void 0;Hn--;){const zt=J[Hn];if(zt[1].type==="lineEnding"||zt[1].type==="lineEndingBlank"){if(zt[0]==="exit")continue;Tt&&(J[Tt][1].type="lineEndingBlank",Mt=!0),zt[1].type="lineEnding",Tt=Hn}else if(!(zt[1].type==="linePrefix"||zt[1].type==="blockQuotePrefix"||zt[1].type==="blockQuotePrefixWhitespace"||zt[1].type==="blockQuoteMarker"||zt[1].type==="listItemIndent"))break}at&&(!Tt||at<Tt)&&(dn._spread=!0),dn.end=Object.assign({},Tt?J[Tt][1].start:Ge[1].end),J.splice(Tt||Re,0,["exit",dn,Ge[2]]),Re++,_e++}if(Ge[1].type==="listItemPrefix"){const Hn={type:"listItem",_spread:!1,start:Object.assign({},Ge[1].start),end:void 0};dn=Hn,J.splice(Re,0,["enter",Hn,Ge[2]]),Re++,_e++,at=void 0,It=!0}}}return J[ue][1]._spread=Mt,_e}function s(J,ue){return _e;function _e(Re){f.call(this,J(Re),Re),ue&&ue.call(this,Re)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(J,ue,_e){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ue,_e||void 0]),J.position={start:qi(ue.start),end:void 0}}function d(J){return ue;function ue(_e){J&&J.call(this,_e),h.call(this,_e)}}function h(J,ue){const _e=this.stack.pop(),Re=this.tokenStack.pop();if(Re)Re[0].type!==J.type&&(ue?ue.call(this,J,Re[0]):(Re[1]||R0).call(this,J,Re[0]));else throw new Error("Cannot close `"+J.type+"` ("+Gl({start:J.start,end:J.end})+"): it’s not open");_e.position.end=qi(J.end)}function y(){return zC(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function v(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=J}function S(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=J}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function D(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.value=J.replace(/(\r?\n|\r)$/g,"")}function T(J){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.label=ue,_e.identifier=Aa(this.sliceSerialize(J)).toLowerCase()}function k(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.title=J}function U(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.url=J}function z(J){const ue=this.stack[this.stack.length-1];if(!ue.depth){const _e=this.sliceSerialize(J).length;ue.depth=_e}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function F(J){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function le(){this.data.setextHeadingSlurpLineEnding=void 0}function V(J){const _e=this.stack[this.stack.length-1].children;let Re=_e[_e.length-1];(!Re||Re.type!=="text")&&(Re=yt(),Re.position={start:qi(J.start),end:void 0},_e.push(Re)),this.stack.push(Re)}function se(J){const ue=this.stack.pop();ue.value+=this.sliceSerialize(J),ue.position.end=qi(J.end)}function Z(J){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const _e=ue.children[ue.children.length-1];_e.position.end=qi(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ue.type)&&(V.call(this,J),se.call(this,J))}function K(){this.data.atHardBreak=!0}function W(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.value=J}function ie(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.value=J}function q(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.value=J}function H(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ue,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function G(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ue,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function ae(J){const ue=this.sliceSerialize(J),_e=this.stack[this.stack.length-2];_e.label=Ik(ue),_e.identifier=Aa(ue).toLowerCase()}function fe(){const J=this.stack[this.stack.length-1],ue=this.resume(),_e=this.stack[this.stack.length-1];if(this.data.inReference=!0,_e.type==="link"){const Re=J.children;_e.children=Re}else _e.alt=ue}function L(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.url=J}function O(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.title=J}function X(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function ce(J){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.label=ue,_e.identifier=Aa(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function me(J){this.data.characterReferenceType=J.type}function he(J){const ue=this.sliceSerialize(J),_e=this.data.characterReferenceType;let Re;_e?(Re=Bv(ue,_e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Re=kh(ue);const Ue=this.stack[this.stack.length-1];Ue.value+=Re}function Se(J){const ue=this.stack.pop();ue.position.end=qi(J.end)}function Oe(J){se.call(this,J);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(J)}function be(J){se.call(this,J);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(J)}function He(){return{type:"blockquote",children:[]}}function tt(){return{type:"code",lang:null,meta:null,value:""}}function At(){return{type:"inlineCode",value:""}}function jt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ut(){return{type:"emphasis",children:[]}}function An(){return{type:"heading",depth:0,children:[]}}function gt(){return{type:"break"}}function Cr(){return{type:"html",value:""}}function wr(){return{type:"image",title:null,url:"",alt:null}}function _i(){return{type:"link",title:null,url:"",children:[]}}function Si(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function Ki(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Ha(){return{type:"paragraph",children:[]}}function kr(){return{type:"strong",children:[]}}function yt(){return{type:"text",value:""}}function Ua(){return{type:"thematicBreak"}}}function qi(e){return{line:e.line,column:e.column,offset:e.offset}}function Kv(e,t){let i=-1;for(;++i<t.length;){const a=t[i];Array.isArray(a)?Kv(e,a):Pk(e,a)}}function Pk(e,t){let i;for(i in t)if(Zv.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 R0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Gl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Gl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Gl({start:t.start,end:t.end})+") is still open")}function Bk(e){const t=this;t.parser=i;function i(a){return Hk(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function jk(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 Vk(e,t){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,i),[e.applyData(t,i),{type:"text",value:`
14
+ `}]}function Gk(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 $k(e,t){const i={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Fk(e,t){const i={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function qk(e,t){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),o=Oa(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 h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function Yk(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 Xk(e,t){if(e.options.allowDangerousHtml){const i={type:"raw",value:t.value};return e.patch(t,i),e.applyData(t,i)}}function Wv(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 Qk(e,t){const i=String(t.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return Wv(e,t);const o={src:Oa(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 Zk(e,t){const i={src:Oa(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 Kk(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 Wk(e,t){const i=String(t.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return Wv(e,t);const o={href:Oa(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 Jk(e,t){const i={href:Oa(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 eA(e,t,i){const a=e.all(t),o=i?tA(i):Jv(t),s={},c=[];if(typeof t.checked=="boolean"){const y=a[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},a.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.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 y=a[f];(o||f!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
16
+ `}),y.type==="element"&&y.tagName==="p"&&!o?c.push(...y.children):c.push(y)}const d=a[a.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&c.push({type:"text",value:`
17
+ `});const h={type:"element",tagName:"li",properties:s,children:c};return e.patch(t,h),e.applyData(t,h)}function tA(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=Jv(i[a])}return t}function Jv(e){const t=e.spread;return t??e.children.length>1}function nA(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 iA(e,t){const i={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function rA(e,t){const i={type:"root",children:e.wrap(e.all(t))};return e.patch(t,i),e.applyData(t,i)}function aA(e,t){const i={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function lA(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=Eh(t.children[1]),d=Ov(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 oA(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 h=[];for(;++d<f;){const g=t.children[d],b={},v=c?c[d]:void 0;v&&(b.align=v);let S={type:"element",tagName:s,properties:b,children:[]};g&&(S.children=e.all(g),e.patch(g,S),S=e.applyData(g,S)),h.push(S)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,y),e.applyData(t,y)}function sA(e,t){const i={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}const D0=9,N0=32;function uA(e){const t=String(e),i=/\r?\n|\r/g;let a=i.exec(t),o=0;const s=[];for(;a;)s.push(O0(t.slice(o,a.index),o>0,!0),a[0]),o=a.index+a[0].length,a=i.exec(t);return s.push(O0(t.slice(o),o>0,!1)),s.join("")}function O0(e,t,i){let a=0,o=e.length;if(t){let s=e.codePointAt(a);for(;s===D0||s===N0;)a++,s=e.codePointAt(a)}if(i){let s=e.codePointAt(o-1);for(;s===D0||s===N0;)o--,s=e.codePointAt(o-1)}return o>a?e.slice(a,o):""}function cA(e,t){const i={type:"text",value:uA(String(t.value))};return e.patch(t,i),e.applyData(t,i)}function dA(e,t){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,i),e.applyData(t,i)}const fA={blockquote:jk,break:Vk,code:Gk,delete:$k,emphasis:Fk,footnoteReference:qk,heading:Yk,html:Xk,imageReference:Qk,image:Zk,inlineCode:Kk,linkReference:Wk,link:Jk,listItem:eA,list:nA,paragraph:iA,root:rA,strong:aA,table:lA,tableCell:sA,tableRow:oA,text:cA,thematicBreak:dA,toml:Ss,yaml:Ss,definition:Ss,footnoteDefinition:Ss};function Ss(){}const e1=-1,du=0,Fl=1,Xs=2,Lh=3,Rh=4,Dh=5,Nh=6,t1=7,n1=8,hA=typeof self=="object"?self:globalThis,M0=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new hA[e](t)},pA=(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 du:case e1:return i(c,o);case Fl:{const f=i([],o);for(const d of c)f.push(a(d));return f}case Xs:{const f=i({},o);for(const[d,h]of c)f[a(d)]=a(h);return f}case Lh:return i(new Date(c),o);case Rh:{const{source:f,flags:d}=c;return i(new RegExp(f,d),o)}case Dh:{const f=i(new Map,o);for(const[d,h]of c)f.set(a(d),a(h));return f}case Nh:{const f=i(new Set,o);for(const d of c)f.add(a(d));return f}case t1:{const{name:f,message:d}=c;return i(M0(f,d),o)}case n1: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(M0(s,c),o)};return a},I0=e=>pA(new Map,e)(0),ma="",{toString:mA}={},{keys:gA}=Object,Ml=e=>{const t=typeof e;if(t!=="object"||!e)return[du,t];const i=mA.call(e).slice(8,-1);switch(i){case"Array":return[Fl,ma];case"Object":return[Xs,ma];case"Date":return[Lh,ma];case"RegExp":return[Rh,ma];case"Map":return[Dh,ma];case"Set":return[Nh,ma];case"DataView":return[Fl,i]}return i.includes("Array")?[Fl,i]:i.includes("Error")?[t1,i]:[Xs,i]},Es=([e,t])=>e===du&&(t==="function"||t==="symbol"),yA=(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]=Ml(c);switch(f){case du:{let y=c;switch(d){case"bigint":f=n1,y=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);y=null;break;case"undefined":return o([e1],c)}return o([f,y],c)}case Fl:{if(d){let b=c;return d==="DataView"?b=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(c)),o([d,[...b]],c)}const y=[],g=o([f,y],c);for(const b of c)y.push(s(b));return g}case Xs:{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 y=[],g=o([f,y],c);for(const b of gA(c))(e||!Es(Ml(c[b])))&&y.push([s(b),s(c[b])]);return g}case Lh:return o([f,c.toISOString()],c);case Rh:{const{source:y,flags:g}=c;return o([f,{source:y,flags:g}],c)}case Dh:{const y=[],g=o([f,y],c);for(const[b,v]of c)(e||!(Es(Ml(b))||Es(Ml(v))))&&y.push([s(b),s(v)]);return g}case Nh:{const y=[],g=o([f,y],c);for(const b of c)(e||!Es(Ml(b)))&&y.push(s(b));return g}}const{message:h}=c;return o([f,{name:d,message:h}],c)};return s},z0=(e,{json:t,lossy:i}={})=>{const a=[];return yA(!(t||i),!!t,new Map,a)(e),a},Qs=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?I0(z0(e,t)):structuredClone(e):(e,t)=>I0(z0(e,t));function bA(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 vA(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function _A(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||bA,a=e.options.footnoteBackLabel||vA,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 h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const y=e.all(h),g=String(h.identifier).toUpperCase(),b=Oa(g.toLowerCase());let v=0;const S=[],w=e.footnoteCounts.get(g);for(;w!==void 0&&++v<=w;){S.length>0&&S.push({type:"text",value:" "});let T=typeof i=="string"?i:i(d,v);typeof T=="string"&&(T={type:"text",value:T}),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(T)?T:[T]})}const D=y[y.length-1];if(D&&D.type==="element"&&D.tagName==="p"){const T=D.children[D.children.length-1];T&&T.type==="text"?T.value+=" ":D.children.push({type:"text",value:" "}),D.children.push(...S)}else y.push(...S);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(y,!0)};e.patch(h,x),f.push(x)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Qs(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
18
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
19
+ `}]}}const i1=(function(e){if(e==null)return CA;if(typeof e=="function")return fu(e);if(typeof e=="object")return Array.isArray(e)?SA(e):EA(e);if(typeof e=="string")return xA(e);throw new Error("Expected function, string, or object as test")});function SA(e){const t=[];let i=-1;for(;++i<e.length;)t[i]=i1(e[i]);return fu(a);function a(...o){let s=-1;for(;++s<t.length;)if(t[s].apply(this,o))return!0;return!1}}function EA(e){const t=e;return fu(i);function i(a){const o=a;let s;for(s in e)if(o[s]!==t[s])return!1;return!0}}function xA(e){return fu(t);function t(i){return i&&i.type===e}}function fu(e){return t;function t(i,a,o){return!!(wA(i)&&e.call(this,i,typeof a=="number"?a:void 0,o||void 0))}}function CA(){return!0}function wA(e){return e!==null&&typeof e=="object"&&"type"in e}const r1=[],kA=!0,H0=!1,AA="skip";function TA(e,t,i,a){let o;typeof t=="function"&&typeof i!="function"?(a=i,i=t):o=t;const s=i1(o),c=a?-1:1;f(e,void 0,[])();function f(d,h,y){const g=d&&typeof d=="object"?d:{};if(typeof g.type=="string"){const v=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(v?"<"+v+">":""))+")"})}return b;function b(){let v=r1,S,w,D;if((!t||s(d,h,y[y.length-1]||void 0))&&(v=LA(i(d,y)),v[0]===H0))return v;if("children"in d&&d.children){const x=d;if(x.children&&v[0]!==AA)for(w=(a?x.children.length:-1)+c,D=y.concat(x);w>-1&&w<x.children.length;){const T=x.children[w];if(S=f(T,w,D)(),S[0]===H0)return S;w=typeof S[1]=="number"?S[1]:w+c}}return v}}}function LA(e){return Array.isArray(e)?e:typeof e=="number"?[kA,e]:e==null?r1:[e]}function a1(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),TA(e,s,f,o);function f(d,h){const y=h[h.length-1],g=y?y.children.indexOf(d):void 0;return c(d,g,y)}}const Bf={}.hasOwnProperty,RA={};function DA(e,t){const i=t||RA,a=new Map,o=new Map,s=new Map,c={...fA,...i.handlers},f={all:h,applyData:OA,definitionById:a,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:d,options:i,patch:NA,wrap:IA};return a1(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?a:o,b=String(y.identifier).toUpperCase();g.has(b)||g.set(b,y)}}),f;function d(y,g){const b=y.type,v=f.handlers[b];if(Bf.call(f.handlers,b)&&v)return v(f,y,g);if(f.options.passThrough&&f.options.passThrough.includes(b)){if("children"in y){const{children:w,...D}=y,x=Qs(D);return x.children=f.all(y),x}return Qs(y)}return(f.options.unknownHandler||MA)(f,y,g)}function h(y){const g=[];if("children"in y){const b=y.children;let v=-1;for(;++v<b.length;){const S=f.one(b[v],y);if(S){if(v&&b[v-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=U0(S.value)),!Array.isArray(S)&&S.type==="element")){const w=S.children[0];w&&w.type==="text"&&(w.value=U0(w.value))}Array.isArray(S)?g.push(...S):g.push(S)}}}return g}}function NA(e,t){e.position&&(t.position=pC(e))}function OA(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,Qs(s)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function MA(e,t){const i=t.data||{},a="value"in t&&!(Bf.call(i,"hProperties")||Bf.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 IA(e,t){const i=[];let a=-1;for(t&&i.push({type:"text",value:`
20
+ `});++a<e.length;)a&&i.push({type:"text",value:`
21
+ `}),i.push(e[a]);return t&&e.length>0&&i.push({type:"text",value:`
22
+ `}),i}function U0(e){let t=0,i=e.charCodeAt(t);for(;i===9||i===32;)t++,i=e.charCodeAt(t);return e.slice(t)}function P0(e,t){const i=DA(e,t),a=i.one(e,void 0),o=_A(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 zA(e,t){return e&&"run"in e?async function(i,a){const o=P0(i,{file:a,...t});await e.run(o,a)}:function(i,a){return P0(i,{file:a,...e||t})}}function B0(e){if(e)throw e}var Zd,j0;function HA(){if(j0)return Zd;j0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},s=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var y=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!y&&!g)return!1;var b;for(b in h);return typeof b>"u"||e.call(h,b)},c=function(h,y){i&&y.name==="__proto__"?i(h,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):h[y.name]=y.newValue},f=function(h,y){if(y==="__proto__")if(e.call(h,y)){if(a)return a(h,y).value}else return;return h[y]};return Zd=function d(){var h,y,g,b,v,S,w=arguments[0],D=1,x=arguments.length,T=!1;for(typeof w=="boolean"&&(T=w,w=arguments[1]||{},D=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});D<x;++D)if(h=arguments[D],h!=null)for(y in h)g=f(w,y),b=f(h,y),w!==b&&(T&&b&&(s(b)||(v=o(b)))?(v?(v=!1,S=g&&o(g)?g:[]):S=g&&s(g)?g:{},c(w,{name:y,newValue:d(T,S,b)})):typeof b<"u"&&c(w,{name:y,newValue:b}));return w},Zd}var UA=HA();const Kd=pv(UA);function jf(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 PA(){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,...h){const y=e[++s];let g=-1;if(d){c(d);return}for(;++g<o.length;)(h[g]===null||h[g]===void 0)&&(h[g]=o[g]);o=h,y?BA(y,f)(...h):c(null,...h)}}function a(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function BA(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(h){const y=h;if(f&&i)throw y;return o(y)}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 Fn={basename:jA,dirname:VA,extname:GA,join:$A,sep:"/"};function jA(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ao(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 VA(e){if(ao(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 GA(e){ao(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 $A(...e){let t=-1,i;for(;++t<e.length;)ao(e[t]),e[t]&&(i=i===void 0?e[t]:i+"/"+e[t]);return i===void 0?".":FA(i)}function FA(e){ao(e);const t=e.codePointAt(0)===47;let i=qA(e,!t);return i.length===0&&!t&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),t?"/"+i:i}function qA(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 ao(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const YA={cwd:XA};function XA(){return"/"}function Vf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function QA(e){if(typeof e=="string")e=new URL(e);else if(!Vf(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 ZA(e)}function ZA(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 Wd=["history","path","basename","stem","extname","dirname"];class l1{constructor(t){let i;t?Vf(t)?i={path:t}:typeof t=="string"||KA(t)?i={value:t}:i=t:i={},this.cwd="cwd"in i?"":YA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Wd.length;){const s=Wd[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)Wd.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?Fn.basename(this.path):void 0}set basename(t){ef(t,"basename"),Jd(t,"basename"),this.path=Fn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Fn.dirname(this.path):void 0}set dirname(t){V0(this.basename,"dirname"),this.path=Fn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Fn.extname(this.path):void 0}set extname(t){if(Jd(t,"extname"),V0(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=Fn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Vf(t)&&(t=QA(t)),ef(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Fn.basename(this.path,this.extname):void 0}set stem(t){ef(t,"stem"),Jd(t,"stem"),this.path=Fn.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 Bt(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 Jd(e,t){if(e&&e.includes(Fn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Fn.sep+"`")}function ef(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function V0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function KA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const WA=(function(e){const a=this.constructor.prototype,o=a[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,a),s}),JA={}.hasOwnProperty;class Oh extends WA{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=PA()}copy(){const t=new Oh;let i=-1;for(;++i<this.attachers.length;){const a=this.attachers[i];t.use(...a)}return t.data(Kd(!0,{},this.namespace)),t}data(t,i){return typeof t=="string"?arguments.length===2?(rf("data",this.frozen),this.namespace[t]=i,this):JA.call(this.namespace,t)&&this.namespace[t]||void 0:t?(rf("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=xs(t),a=this.parser||this.Parser;return tf("parse",a),a(String(i),i)}process(t,i){const a=this;return this.freeze(),tf("process",this.parser||this.Parser),nf("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(s,c){const f=xs(t),d=a.parse(f);a.run(d,f,function(y,g,b){if(y||!g||!b)return h(y);const v=g,S=a.stringify(v,b);nT(S)?b.value=S:b.result=S,h(y,b)});function h(y,g){y||!g?c(y):s?s(g):i(void 0,g)}}}processSync(t){let i=!1,a;return this.freeze(),tf("processSync",this.parser||this.Parser),nf("processSync",this.compiler||this.Compiler),this.process(t,o),$0("processSync","process",i),a;function o(s,c){i=!0,B0(s),a=c}}run(t,i,a){G0(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=xs(i);o.run(t,d,h);function h(y,g,b){const v=g||t;y?f(y):c?c(v):a(void 0,v,b)}}}runSync(t,i){let a=!1,o;return this.run(t,i,s),$0("runSync","run",a),o;function s(c,f){B0(c),o=f,a=!0}}stringify(t,i){this.freeze();const a=xs(i),o=this.compiler||this.Compiler;return nf("stringify",o),G0(t),o(t,a)}use(t,...i){const a=this.attachers,o=this.namespace;if(rf("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(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[y,...g]=h;d(y,g)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))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(h.plugins),h.settings&&(o.settings=Kd(!0,o.settings,h.settings))}function f(h){let y=-1;if(h!=null)if(Array.isArray(h))for(;++y<h.length;){const g=h[y];s(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,y){let g=-1,b=-1;for(;++g<a.length;)if(a[g][0]===h){b=g;break}if(b===-1)a.push([h,...y]);else if(y.length>0){let[v,...S]=y;const w=a[b][1];jf(w)&&jf(v)&&(v=Kd(!0,w,v)),a[b]=[h,v,...S]}}}}const eT=new Oh().freeze();function tf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function nf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function rf(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 G0(e){if(!jf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $0(e,t,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function xs(e){return tT(e)?e:new l1(e)}function tT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function nT(e){return typeof e=="string"||iT(e)}function iT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rT="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",F0=[],q0={allowDangerousHtml:!0},aT=/^(https?|ircs?|mailto|xmpp)$/i,lT=[{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 oT(e){const t=sT(e),i=uT(e);return cT(t.runSync(t.parse(i),i),e)}function sT(e){const t=e.rehypePlugins||F0,i=e.remarkPlugins||F0,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...q0}:q0;return eT().use(Bk).use(i).use(zA,a).use(t)}function uT(e){const t=e.children||"",i=new l1;return typeof t=="string"&&(i.value=t),i}function cT(e,t){const i=t.allowedElements,a=t.allowElement,o=t.components,s=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||dT;for(const y of lT)Object.hasOwn(t,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+rT+y.id,void 0);return a1(e,h),vC(e,{Fragment:I.Fragment,components:o,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function h(y,g,b){if(y.type==="raw"&&b&&typeof g=="number")return c?b.children.splice(g,1):b.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let v;for(v in Yd)if(Object.hasOwn(Yd,v)&&Object.hasOwn(y.properties,v)){const S=y.properties[v],w=Yd[v];(w===null||w.includes(y.tagName))&&(y.properties[v]=d(String(S||""),v,y))}}if(y.type==="element"){let v=i?!i.includes(y.tagName):s?s.includes(y.tagName):!1;if(!v&&a&&typeof g=="number"&&(v=!a(y,g,b)),v&&b&&typeof g=="number")return f&&y.children?b.children.splice(g,1,...y.children):b.children.splice(g,1),g}}}function dT(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||aT.test(e.slice(0,t))?e:""}const fT="modulepreload",hT=function(e){return"/"+e},Y0={},C=function(t,i,a){let o=Promise.resolve();if(i&&i.length>0){let h=function(y){return Promise.all(y.map(g=>Promise.resolve(g).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};var c=h;document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),d=f?.nonce||f?.getAttribute("nonce");o=h(i.map(y=>{if(y=hT(y),y in Y0)return;Y0[y]=!0;const g=y.endsWith(".css"),b=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${y}"]${b}`))return;const v=document.createElement("link");if(v.rel=g?"stylesheet":fT,g||(v.as="script"),v.crossOrigin="",v.href=y,d&&v.setAttribute("nonce",d),document.head.appendChild(v),g)return new Promise((S,w)=>{v.addEventListener("load",S),v.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${y}`)))})}))}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 mt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function pT(e){return Mh(e)}function Mh(e){return Array.isArray(e)?mT(e):e instanceof RegExp?e:typeof e=="object"?gT(e):e}function mT(e){let t=[];for(let i=0,a=e.length;i<a;i++)t[i]=Mh(e[i]);return t}function gT(e){let t={};for(let i in e)t[i]=Mh(e[i]);return t}function o1(e,...t){return t.forEach(i=>{for(let a in i)e[a]=i[a]}),e}function s1(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?s1(e.substring(0,e.length-1)):e.substr(~t+1)}var af=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Cs=class{static hasCaptures(e){return e===null?!1:(af.lastIndex=0,af.test(e))}static replaceCaptures(e,t,i){return e.replace(af,(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 u1(e,t){return e<t?-1:e>t?1:0}function c1(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=u1(e[o],t[o]);if(s!==0)return s}return 0}return i-a}function X0(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 d1(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var f1=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}},Zs=class{constructor(e,t,i){this._colorMap=e,this._defaults=t,this._root=i}static createFromRawTheme(e,t){return this.createFromParsedTheme(vT(e),t)}static createFromParsedTheme(e,t){return ST(e,t)}_cachedMatchRoot=new f1(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=>yT(e.parent,o.parentScopes));return a?new h1(a.fontStyle,a.foreground,a.background):null}},lf=class Gs{constructor(t,i){this.parent=t,this.scopeName=i}static push(t,i){for(const a of i)t=new Gs(t,a);return t}static from(...t){let i=null;for(let a=0;a<t.length;a++)i=new Gs(i,t[a]);return i}push(t){return new Gs(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 yT(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&&!bT(e.scopeName,a);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function bT(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var h1=class{constructor(e,t,i){this.fontStyle=e,this.foregroundId=t,this.backgroundId=i}};function vT(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 g=c.scope;g=g.replace(/^[,]+/,""),g=g.replace(/[,]+$/,""),f=g.split(",")}else Array.isArray(c.scope)?f=c.scope:f=[""];let d=-1;if(typeof c.settings.fontStyle=="string"){d=0;let g=c.settings.fontStyle.split(" ");for(let b=0,v=g.length;b<v;b++)switch(g[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 h=null;typeof c.settings.foreground=="string"&&X0(c.settings.foreground)&&(h=c.settings.foreground);let y=null;typeof c.settings.background=="string"&&X0(c.settings.background)&&(y=c.settings.background);for(let g=0,b=f.length;g<b;g++){let S=f[g].trim().split(" "),w=S[S.length-1],D=null;S.length>1&&(D=S.slice(0,S.length-1),D.reverse()),i[a++]=new _T(w,D,o,d,h,y)}}return i}var _T=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}},Pt=(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))(Pt||{});function ST(e,t){e.sort((d,h)=>{let y=u1(d.scope,h.scope);return y!==0||(y=c1(d.parentScopes,h.parentScopes),y!==0)?y:d.index-h.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 ET(t),c=new h1(i,s.getId(a),s.getId(o)),f=new CT(new Gf(0,null,-1,0,0),[]);for(let d=0,h=e.length;d<h;d++){let y=e[d];f.insert(0,y.scope,y.parentScopes,y.fontStyle,s.getId(y.foreground),s.getId(y.background))}return new Zs(s,c,f)}var ET=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)}},xT=Object.freeze([]),Gf=class p1{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,i,a,o,s){this.scopeDepth=t,this.parentScopes=i||xT,this.fontStyle=a,this.foreground=o,this.background=s}clone(){return new p1(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)}},CT=class $f{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($f._cmpBySpecificity),i}insert(t,i,a,o,s,c){if(i===""){this._doInsertHere(t,a,o,s,c);return}let f=i.indexOf("."),d,h;f===-1?(d=i,h=""):(d=i.substring(0,f),h=i.substring(f+1));let y;this._children.hasOwnProperty(d)?y=this._children[d]:(y=new $f(this._mainRule.clone(),Gf.cloneArr(this._rulesWithParentScopes)),this._children[d]=y),y.insert(t+1,h,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(c1(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 Gf(t,i,a,o,s))}},Ra=class En{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const i=En.getLanguageId(t),a=En.getTokenType(t),o=En.getFontStyle(t),s=En.getForeground(t),c=En.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=En.getLanguageId(t),h=En.getTokenType(t),y=En.containsBalancedBrackets(t)?1:0,g=En.getFontStyle(t),b=En.getForeground(t),v=En.getBackground(t);return i!==0&&(d=i),a!==8&&(h=a),o!==null&&(y=o?1:0),s!==-1&&(g=s),c!==0&&(b=c),f!==0&&(v=f),(d<<0|h<<8|y<<10|g<<11|b<<15|v<<24)>>>0}};function Ks(e,t){const i=[],a=wT(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 h=c();if(i.push({matcher:h,priority:d}),o!==",")break;o=a.next()}return i;function s(){if(o==="-"){o=a.next();const d=s();return h=>!!d&&!d(h)}if(o==="("){o=a.next();const d=f();return o===")"&&(o=a.next()),d}if(Q0(o)){const d=[];do d.push(o),o=a.next();while(Q0(o));return h=>t(d,h)}return null}function c(){const d=[];let h=s();for(;h;)d.push(h),h=s();return y=>d.every(g=>g(y))}function f(){const d=[];let h=c();for(;h&&(d.push(h),o==="|"||o===",");){do o=a.next();while(o==="|"||o===",");h=c()}return y=>d.some(g=>g(y))}}function Q0(e){return!!e&&!!e.match(/[\w\.:]+/)}function wT(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 m1(e){typeof e.dispose=="function"&&e.dispose()}var Zl=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},kT=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},AT=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))}},TT=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Zl(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new AT;for(const i of e)LT(i,this.initialScopeName,this.repo,t);for(const i of t.references)if(i instanceof Zl){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 LT(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 Zl?$s({baseGrammar:s,selfGrammar:o},a):Ff(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 Zl(f))}function Ff(e,t,i){if(t.repository&&t.repository[e]){const a=t.repository[e];Ws([a],t,i)}}function $s(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ws(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ws(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ws(e,t,i){for(const a of e){if(i.visitedRule.has(a))continue;i.visitedRule.add(a);const o=a.repository?o1({},t.repository,a.repository):t.repository;Array.isArray(a.patterns)&&Ws(a.patterns,{...t,repository:o},i);const s=a.include;if(!s)continue;const c=g1(s);switch(c.kind){case 0:$s({...t,selfGrammar:t.baseGrammar},i);break;case 1:$s(t,i);break;case 2:Ff(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?Ff(c.ruleName,d,i):$s(d,i)}else c.kind===4?i.add(new kT(c.scopeName,c.ruleName)):i.add(new Zl(c.scopeName));break}}}var RT=class{kind=0},DT=class{kind=1},NT=class{constructor(e){this.ruleName=e}kind=2},OT=class{constructor(e){this.scopeName=e}kind=3},MT=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function g1(e){if(e==="$base")return new RT;if(e==="$self")return new DT;const t=e.indexOf("#");if(t===-1)return new OT(e);if(t===0)return new NT(e.substring(1));{const i=e.substring(0,t),a=e.substring(t+1);return new MT(i,a)}}var IT=/\\(\d+)/,Z0=/\\(\d+)/g,zT=-1,y1=-2;var lo=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,i,a){this.$location=e,this.id=t,this._name=i||null,this._nameIsCapturing=Cs.hasCaptures(this._name),this._contentName=a||null,this._contentNameIsCapturing=Cs.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${s1(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:Cs.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Cs.replaceCaptures(this._contentName,e,t)}},HT=class extends lo{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!")}},UT=class extends lo{_match;captures;_cachedCompiledPatterns;constructor(e,t,i,a,o){super(e,t,i,null),this._match=new Kl(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 Wl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},K0=class extends lo{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 Wl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},qf=class extends lo{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,i,a,o,s,c,f,d,h){super(e,t,i,a),this._begin=new Kl(o,this.id),this.beginCaptures=s,this._end=new Kl(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=f,this.applyEndPatternLast=d||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.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 Wl;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}},Js=class extends lo{_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 Kl(o,this.id),this.beginCaptures=s,this.whileCaptures=f,this._while=new Kl(c,y1),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 Wl;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 Wl,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},b1=class Ut{static createCaptureRule(t,i,a,o,s){return t.registerRule(c=>new HT(i,c,a,o,s))}static getCompiledRuleId(t,i,a){return t.id||i.registerRule(o=>{if(t.id=o,t.match)return new UT(t.$vscodeTextmateLocation,t.id,t.name,t.match,Ut._compileCaptures(t.captures,i,a));if(typeof t.begin>"u"){t.repository&&(a=o1({},a,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new K0(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Ut._compilePatterns(s,i,a))}return t.while?new Js(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ut._compileCaptures(t.beginCaptures||t.captures,i,a),t.while,Ut._compileCaptures(t.whileCaptures||t.captures,i,a),Ut._compilePatterns(t.patterns,i,a)):new qf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ut._compileCaptures(t.beginCaptures||t.captures,i,a),t.end,Ut._compileCaptures(t.endCaptures||t.captures,i,a),t.applyEndPatternLast,Ut._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=Ut.getCompiledRuleId(t[c],i,a)),o[f]=Ut.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 h=g1(f.include);switch(h.kind){case 0:case 1:d=Ut.getCompiledRuleId(a[f.include],i,a);break;case 2:let y=a[h.ruleName];y&&(d=Ut.getCompiledRuleId(y,i,a));break;case 3:case 4:const g=h.scopeName,b=h.kind===4?h.ruleName:null,v=i.getExternalGrammar(g,a);if(v)if(b){let S=v.repository[b];S&&(d=Ut.getCompiledRuleId(S,i,v.repository))}else d=Ut.getCompiledRuleId(v.repository.$self,i,v.repository);break}}else d=Ut.getCompiledRuleId(f,i,a);if(d!==-1){const h=i.getRule(d);let y=!1;if((h instanceof K0||h instanceof qf||h instanceof Js)&&h.hasMissingPatterns&&h.patterns.length===0&&(y=!0),y)continue;o.push(d)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Kl=class v1{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 h=t.charAt(f+1);h==="z"?(s.push(t.substring(o,f)),s.push("$(?!\\n)(?<!\\n)"),o=f+2):(h==="A"||h==="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=IT.test(this.source):this.hasBackReferences=!1}clone(){return new v1(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 Z0.lastIndex=0,this.source.replace(Z0,(o,s)=>d1(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}},Wl=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 W0(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 W0(e,a,this._items.map(o=>o.ruleId))}},W0=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}},of=class{constructor(e,t){this.languageId=e,this.tokenType=t}},PT=class Yf{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,i){this._defaultAttributes=new of(t,8),this._embeddedLanguagesMatcher=new BT(Object.entries(i||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Yf._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new of(0,0);_getBasicScopeAttributes=new f1(t=>{const i=this._scopeToLanguage(t),a=this._toStandardTokenType(t);return new of(i,a)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const i=t.match(Yf.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/},BT=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])=>d1(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])}},J0=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function _1(e,t,i,a,o,s,c,f){const d=t.content.length;let h=!1,y=-1;if(c){const v=jT(e,t,i,a,o,s);o=v.stack,a=v.linePos,i=v.isFirstLine,y=v.anchorPosition}const g=Date.now();for(;!h;){if(f!==0&&Date.now()-g>f)return new J0(o,!0);b()}return new J0(o,!1);function b(){const v=VT(e,t,i,a,o,y);if(!v){s.produce(o,d),h=!0;return}const S=v.captureIndices,w=v.matchedRuleId,D=S&&S.length>0?S[0].end>a:!1;if(w===zT){const x=o.getRule(e);s.produce(o,S[0].start),o=o.withContentNameScopesList(o.nameScopesList),Ul(e,t,i,o,s,x.endCaptures,S),s.produce(o,S[0].end);const T=o;if(o=o.parent,y=T.getAnchorPos(),!D&&T.getEnterPos()===a){o=T,s.produce(o,d),h=!0;return}}else{const x=e.getRule(w);s.produce(o,S[0].start);const T=o,k=x.getName(t.content,S),U=o.contentNameScopesList.pushAttributed(k,e);if(o=o.push(w,a,y,S[0].end===d,null,U,U),x instanceof qf){const z=x;Ul(e,t,i,o,s,z.beginCaptures,S),s.produce(o,S[0].end),y=S[0].end;const R=z.getContentName(t.content,S),F=U.pushAttributed(R,e);if(o=o.withContentNameScopesList(F),z.endHasBackReferences&&(o=o.withEndRule(z.getEndWithResolvedBackReferences(t.content,S))),!D&&T.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),h=!0;return}}else if(x instanceof Js){const z=x;Ul(e,t,i,o,s,z.beginCaptures,S),s.produce(o,S[0].end),y=S[0].end;const R=z.getContentName(t.content,S),F=U.pushAttributed(R,e);if(o=o.withContentNameScopesList(F),z.whileHasBackReferences&&(o=o.withEndRule(z.getWhileWithResolvedBackReferences(t.content,S))),!D&&T.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),h=!0;return}}else if(Ul(e,t,i,o,s,x.captures,S),s.produce(o,S[0].end),o=o.pop(),!D){o=o.safePop(),s.produce(o,d),h=!0;return}}S[0].end>a&&(a=S[0].end,i=!1)}}function jT(e,t,i,a,o,s){let c=o.beginRuleCapturedEOL?0:-1;const f=[];for(let d=o;d;d=d.pop()){const h=d.getRule(e);h instanceof Js&&f.push({rule:h,stack:d})}for(let d=f.pop();d;d=f.pop()){const{ruleScanner:h,findOptions:y}=FT(d.rule,e,d.stack.endRule,i,a===c),g=h.findNextMatchSync(t,a,y);if(g){if(g.ruleId!==y1){o=d.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(s.produce(d.stack,g.captureIndices[0].start),Ul(e,t,i,d.stack,s,d.rule.whileCaptures,g.captureIndices),s.produce(d.stack,g.captureIndices[0].end),c=g.captureIndices[0].end,g.captureIndices[0].end>a&&(a=g.captureIndices[0].end,i=!1))}else{o=d.stack.pop();break}}return{stack:o,linePos:a,anchorPosition:c,isFirstLine:i}}function VT(e,t,i,a,o,s){const c=GT(e,t,i,a,o,s),f=e.getInjections();if(f.length===0)return c;const d=$T(f,e,t,i,a,o,s);if(!d)return c;if(!c)return d;const h=c.captureIndices[0].start,y=d.captureIndices[0].start;return y<h||d.priorityMatch&&y===h?d:c}function GT(e,t,i,a,o,s){const c=o.getRule(e),{ruleScanner:f,findOptions:d}=S1(c,e,o.endRule,i,a===s),h=f.findNextMatchSync(t,a,d);return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}function $T(e,t,i,a,o,s,c){let f=Number.MAX_VALUE,d=null,h,y=0;const g=s.contentNameScopesList.getScopeNames();for(let b=0,v=e.length;b<v;b++){const S=e[b];if(!S.matcher(g))continue;const w=t.getRule(S.ruleId),{ruleScanner:D,findOptions:x}=S1(w,t,null,a,o===c),T=D.findNextMatchSync(i,o,x);if(!T)continue;const k=T.captureIndices[0].start;if(!(k>=f)&&(f=k,d=T.captureIndices,h=T.ruleId,y=S.priority,f===o))break}return d?{priorityMatch:y===-1,captureIndices:d,matchedRuleId:h}:null}function S1(e,t,i,a,o){return{ruleScanner:e.compileAG(t,i,a,o),findOptions:0}}function FT(e,t,i,a,o){return{ruleScanner:e.compileWhileAG(t,i,a,o),findOptions:0}}function Ul(e,t,i,a,o,s,c){if(s.length===0)return;const f=t.content,d=Math.min(s.length,c.length),h=[],y=c[0].end;for(let g=0;g<d;g++){const b=s[g];if(b===null)continue;const v=c[g];if(v.length===0)continue;if(v.start>y)break;for(;h.length>0&&h[h.length-1].endPos<=v.start;)o.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?o.produceFromScopes(h[h.length-1].scopes,v.start):o.produce(a,v.start),b.retokenizeCapturedWithRuleId){const w=b.getName(f,c),D=a.contentNameScopesList.pushAttributed(w,e),x=b.getContentName(f,c),T=D.pushAttributed(x,e),k=a.push(b.retokenizeCapturedWithRuleId,v.start,-1,!1,null,D,T),U=e.createOnigString(f.substring(0,v.end));_1(e,U,i&&v.start===0,v.start,k,o,!1,0),m1(U);continue}const S=b.getName(f,c);if(S!==null){const D=(h.length>0?h[h.length-1].scopes:a.contentNameScopesList).pushAttributed(S,e);h.push(new qT(D,v.end))}}for(;h.length>0;)o.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var qT=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function YT(e,t,i,a,o,s,c,f){return new QT(e,t,i,a,o,s,c,f)}function eb(e,t,i,a,o){const s=Ks(t,eu),c=b1.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 eu(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(XT(t[o],a))return i=o+1,!0;return!1})}function XT(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 QT=class{constructor(e,t,i,a,o,s,c,f){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=f,this._basicScopeAttributesProvider=new PT(i,a),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=c,this._grammar=tb(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const d of Object.keys(o)){const h=Ks(d,eu);for(const y of h)this._tokenTypeMatchers.push({matcher:y.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)eb(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&&eb(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]=tb(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=b1.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===Xf.NULL){o=!0;const h=this._basicScopeAttributesProvider.getDefaultAttributes(),y=this.themeProvider.getDefaults(),g=Ra.set(0,h.languageId,h.tokenType,null,y.fontStyle,y.foregroundId,y.backgroundId),b=this.getRule(this._rootId).getName(null,null);let v;b?v=ql.createRootAndLookUpScopeName(b,g,this):v=ql.createRoot("unknown",g),t=new Xf(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 KT(i,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=_1(this,s,o,0,t,f,!0,a);return m1(s),{lineLength:c,lineTokens:f,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function tb(e,t){return e=pT(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 ql=class Gn{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=lf.push(o,s.scopeNames),a=new Gn(a,o,s.encodedTokenAttributes);return a}static createRoot(t,i){return new Gn(null,new lf(null,t),i)}static createRootAndLookUpScopeName(t,i,a){const o=a.getMetadataForScope(t),s=new lf(null,t),c=a.themeProvider.themeMatch(s),f=Gn.mergeAttributes(i,o,c);return new Gn(null,s,f)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Gn.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),Ra.set(t,i.languageId,i.tokenType,null,o,s,c)}pushAttributed(t,i){if(t===null)return this;if(t.indexOf(" ")===-1)return Gn._pushAttributed(this,t,i);const a=t.split(/ /g);let o=this;for(const s of a)o=Gn._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=Gn.mergeAttributes(t.tokenAttributes,o,c);return new Gn(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}},Xf=class gr{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 gr(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:gr._equals(this,t)}static _equals(t,i){return t===i?!0:this._structuralEquals(t,i)?ql.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(){gr._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,i,a,o,s,c,f){return new gr(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 gr(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=ql.fromExtension(t?.nameScopesList??null,i.nameScopesList);return new gr(t,i.ruleId,i.enterPos??-1,i.anchorPos??-1,i.beginRuleCapturedEOL,i.endRule,a,ql.fromExtension(a,i.contentNameScopesList))}},ZT=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(i=>i==="*"?(this.allowAny=!0,[]):Ks(i,eu).map(a=>a.matcher)),this.unbalancedBracketScopes=t.flatMap(i=>Ks(i,eu).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}},KT=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=Ra.set(a,0,c.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(a=Ra.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}},WT=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,YT(e,s,t,i,a,o,this,this._onigLib))}return this._grammars.get(e)}},JT=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new WT(Zs.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,i){this._syncRegistry.setTheme(Zs.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 ZT(a.balancedBracketSelectors||[],a.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,i,a,o,s){const c=new TT(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)}},Qf=Xf.NULL;const eL=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],nb={}.hasOwnProperty;function tL(e,t){const i=t||{};function a(o,...s){let c=a.invalid;const f=a.handlers;if(o&&nb.call(o,e)){const d=String(o[e]);c=nb.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 nL=/["&'<>`]/g,iL=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,rL=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,aL=/[|\\{}()[\]^$+*?.]/g,ib=new WeakMap;function lL(e,t){if(e=e.replace(t.subset?oL(t.subset):nL,a),t.subset||t.escapeOnly)return e;return e.replace(iL,i).replace(rL,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 oL(e){let t=ib.get(e);return t||(t=sL(e),ib.set(e,t)),t}function sL(e){const t=[];let i=-1;for(;++i<e.length;)t.push(e[i].replace(aL,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const uL=/[\dA-Fa-f]/;function cL(e,t,i){const a="&#x"+e.toString(16).toUpperCase();return i&&t&&!uL.test(String.fromCharCode(t))?a:a+";"}const dL=/\d/;function fL(e,t,i){const a="&#"+String(e);return i&&t&&!dL.test(String.fromCharCode(t))?a:a+";"}const hL=["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"],sf={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:"€"},pL=["cent","copy","divide","gt","lt","not","para","times"],E1={}.hasOwnProperty,Zf={};let ws;for(ws in sf)E1.call(sf,ws)&&(Zf[sf[ws]]=ws);const mL=/[^\dA-Za-z]/;function gL(e,t,i,a){const o=String.fromCharCode(e);if(E1.call(Zf,o)){const s=Zf[o],c="&"+s;return i&&hL.includes(s)&&!pL.includes(s)&&(!a||t&&t!==61&&mL.test(String.fromCharCode(t)))?c:c+";"}return""}function yL(e,t,i){let a=cL(e,t,i.omitOptionalSemicolons),o;if((i.useNamedReferences||i.useShortestReferences)&&(o=gL(e,t,i.omitOptionalSemicolons,i.attribute)),(i.useShortestReferences||!o)&&i.useShortestReferences){const s=fL(e,t,i.omitOptionalSemicolons);s.length<a.length&&(a=s)}return o&&(!i.useShortestReferences||o.length<a.length)?o:a}function Ta(e,t){return lL(e,Object.assign({format:yL},t))}const bL=/^>|^->|<!--|-->|--!>|<!-$/g,vL=[">"],_L=["<",">"];function SL(e,t,i,a){return a.settings.bogusComments?"<?"+Ta(e.value,Object.assign({},a.settings.characterReferences,{subset:vL}))+">":"<!--"+e.value.replace(bL,o)+"-->";function o(s){return Ta(s,Object.assign({},a.settings.characterReferences,{subset:_L}))}}function EL(e,t,i,a){return"<!"+(a.settings.upperDoctype?"DOCTYPE":"doctype")+(a.settings.tightDoctype?"":" ")+"html>"}function rb(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 Et=C1(1),x1=C1(-1),xL=[];function C1(e){return t;function t(i,a,o){const s=i?i.children:xL;let c=(a||0)+e,f=s[c];if(!o)for(;f&&uu(f);)c+=e,f=s[c];return f}}const CL={}.hasOwnProperty;function w1(e){return t;function t(i,a,o){return CL.call(e,i.tagName)&&e[i.tagName](i,a,o)}}const Ih=w1({body:kL,caption:uf,colgroup:uf,dd:RL,dt:LL,head:uf,html:wL,li:TL,optgroup:DL,option:NL,p:AL,rp:ab,rt:ab,tbody:ML,td:lb,tfoot:IL,th:lb,thead:OL,tr:zL});function uf(e,t,i){const a=Et(i,t,!0);return!a||a.type!=="comment"&&!(a.type==="text"&&uu(a.value.charAt(0)))}function wL(e,t,i){const a=Et(i,t);return!a||a.type!=="comment"}function kL(e,t,i){const a=Et(i,t);return!a||a.type!=="comment"}function AL(e,t,i){const a=Et(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 TL(e,t,i){const a=Et(i,t);return!a||a.type==="element"&&a.tagName==="li"}function LL(e,t,i){const a=Et(i,t);return!!(a&&a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd"))}function RL(e,t,i){const a=Et(i,t);return!a||a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd")}function ab(e,t,i){const a=Et(i,t);return!a||a.type==="element"&&(a.tagName==="rp"||a.tagName==="rt")}function DL(e,t,i){const a=Et(i,t);return!a||a.type==="element"&&a.tagName==="optgroup"}function NL(e,t,i){const a=Et(i,t);return!a||a.type==="element"&&(a.tagName==="option"||a.tagName==="optgroup")}function OL(e,t,i){const a=Et(i,t);return!!(a&&a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot"))}function ML(e,t,i){const a=Et(i,t);return!a||a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot")}function IL(e,t,i){return!Et(i,t)}function zL(e,t,i){const a=Et(i,t);return!a||a.type==="element"&&a.tagName==="tr"}function lb(e,t,i){const a=Et(i,t);return!a||a.type==="element"&&(a.tagName==="td"||a.tagName==="th")}const HL=w1({body:BL,colgroup:jL,head:PL,html:UL,tbody:VL});function UL(e){const t=Et(e,-1);return!t||t.type!=="comment"}function PL(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 BL(e){const t=Et(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&uu(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function jL(e,t,i){const a=x1(i,t),o=Et(e,-1,!0);return i&&a&&a.type==="element"&&a.tagName==="colgroup"&&Ih(a,i.children.indexOf(a),i)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function VL(e,t,i){const a=x1(i,t),o=Et(e,-1);return i&&a&&a.type==="element"&&(a.tagName==="thead"||a.tagName==="tbody")&&Ih(a,i.children.indexOf(a),i)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const ks={name:[[`
26
+ \f\r &/=>`.split(""),`
27
+ \f\r "&'/=>\``.split("")],[`\0
28
+ \f\r "&'/<=>`.split(""),`\0
29
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
30
+ \f\r &>`.split(""),`\0
31
+ \f\r "&'<=>\``.split("")],[`\0
32
+ \f\r "&'<=>\``.split(""),`\0
33
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function GL(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=ro);const h=$L(a,e.properties),y=a.all(o.space==="html"&&e.tagName==="template"?e.content:e);return a.schema=o,y&&(c=!1),(h||!s||!HL(e,t,i))&&(f.push("<",e.tagName,h?" "+h:""),c&&(o.space==="svg"||a.settings.closeSelfClosing)&&(d=h.charAt(h.length-1),(!a.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&f.push(" "),f.push("/")),f.push(">")),f.push(y),!c&&(!s||!Ih(e,t,i))&&f.push("</"+e.tagName+">"),f.join("")}function $L(e,t){const i=[];let a=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const s=FL(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 FL(e,t,i){const a=Rv(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=Ta(a.attribute,Object.assign({},e.settings.characterReferences,{subset:ks.name[o][s]}));return i===!0||(i=Array.isArray(i)?(a.commaSeparated?Ev:Nv)(i,{padLeft:!e.settings.tightCommaSeparatedLists}):String(i),e.settings.collapseEmptyAttributes&&!i)?d:(e.settings.preferUnquoted&&(f=Ta(i,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:ks.unquoted[o][s]}))),f!==i&&(e.settings.quoteSmart&&rb(i,c)>rb(i,e.alternative)&&(c=e.alternative),f=c+Ta(i,Object.assign({},e.settings.characterReferences,{subset:(c==="'"?ks.single:ks.double)[o][s],attribute:!0}))+c),d+(f&&"="+f))}const qL=["<","&"];function k1(e,t,i,a){return i&&i.type==="element"&&(i.tagName==="script"||i.tagName==="style")?e.value:Ta(e.value,Object.assign({},a.settings.characterReferences,{subset:qL}))}function YL(e,t,i,a){return a.settings.allowDangerousHtml?e.value:k1(e,t,i,a)}function XL(e,t,i,a){return a.all(e)}const QL=tL("type",{invalid:ZL,unknown:KL,handlers:{comment:SL,doctype:EL,element:GL,raw:YL,root:XL,text:k1}});function ZL(e){throw new Error("Expected node, not `"+e+"`")}function KL(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const WL={},JL={},e2=[];function La(e,t){const i=t||WL,a=i.quote||'"',o=a==='"'?"'":'"';if(a!=='"'&&a!=="'")throw new Error("Invalid quote `"+a+"`, expected `'` or `\"`");return{one:t2,all:n2,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||eL,characterReferences:i.characterReferences||JL,closeSelfClosing:i.closeSelfClosing||!1,closeEmptyElements:i.closeEmptyElements||!1},schema:i.space==="svg"?ro:Dv,quote:a,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function t2(e,t,i){return QL(e,t,i,this)}function n2(e){const t=[],i=e&&e.children||e2;let a=-1;for(;++a<i.length;)t[a]=this.one(i[a],a,e);return t.join("")}function tu(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 Qi(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function i2(e){return Array.isArray(e)?e:[e]}async function A1(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function zh(e){return!e||["plaintext","txt","text","plain"].includes(e)}function T1(e){return e==="ansi"||zh(e)}function Hh(e){return e==="none"}function L1(e){return Hh(e)}function R1(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 hu(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 r2(e){const t=hu(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 a2(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 Uh="light-dark()",l2=["color","background-color"];function o2(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 s2(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?o2(o,s):o})):e}function u2(e,t,i,a,o="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},c=t.map(y=>nu(e.variants[y])),f=new Set(c.flatMap(y=>Object.keys(y))),d={},h=(y,g)=>{const b=g==="color"?"":g==="background-color"?"-bg":`-${g}`;return i+t[y]+(g==="color"?"":b)};return c.forEach((y,g)=>{for(const b of f){const v=y[b]||"inherit";if(g===0&&a&&l2.includes(b))if(a===Uh&&c.length>1){const S=t.findIndex(T=>T==="light"),w=t.findIndex(T=>T==="dark");if(S===-1||w===-1)throw new mt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const D=c[S][b]||"inherit",x=c[w][b]||"inherit";d[b]=`light-dark(${D}, ${x})`,o==="css-vars"&&(d[h(g,b)]=v)}else d[b]=v;else o==="css-vars"&&(d[h(g,b)]=v)}}),s.htmlStyle=d,s}function nu(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Pt.Italic&&(t["font-style"]="italic"),e.fontStyle&Pt.Bold&&(t["font-weight"]="bold");const i=[];e.fontStyle&Pt.Underline&&i.push("underline"),e.fontStyle&Pt.Strikethrough&&i.push("line-through"),i.length&&(t["text-decoration"]=i.join(" "))}return t}function Kf(e){return typeof e=="string"?e:Object.entries(e).map(([t,i])=>`${t}:${i}`).join(";")}const D1=new WeakMap;function pu(e,t){D1.set(e,t)}function Jl(e){return D1.get(e)}class Ma{_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 Ma(Object.fromEntries(i2(i).map(a=>[a,Qf])),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 c2(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function c2(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 d2(e,t){if(!(e instanceof Ma))throw new mt("Invalid grammar state");return e.getInternalStack(t)}function f2(){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 mt(`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 mt(`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 mt(`Invalid decoration position ${JSON.stringify(c)}. Line ${c.line} length: ${f.length}`);return{...c,character:d,offset:o.posToIndex(c.line,d)}}};const o=r2(i.source),s=(i.options.decorations||[]).map(c=>({...c,start:a(c.start),end:a(c.end)}));h2(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 s2(i,o)},code(i){if(!this.options.decorations?.length)return;const a=t(this),o=Array.from(i.children).filter(y=>y.type==="element"&&y.tagName==="span");if(o.length!==a.converter.lines.length)throw new mt(`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(y,g,b,v){const S=o[y];let w="",D=-1,x=-1;if(g===0&&(D=0),b===0&&(x=0),b===Number.POSITIVE_INFINITY&&(x=S.children.length),D===-1||x===-1)for(let k=0;k<S.children.length;k++)w+=N1(S.children[k]),D===-1&&w.length===g&&(D=k+1),x===-1&&w.length===b&&(x=k+1);if(D===-1)throw new mt(`Failed to find start index for decoration ${JSON.stringify(v.start)}`);if(x===-1)throw new mt(`Failed to find end index for decoration ${JSON.stringify(v.end)}`);const T=S.children.slice(D,x);if(!v.alwaysWrap&&T.length===S.children.length)f(S,v,"line");else if(!v.alwaysWrap&&T.length===1&&T[0].type==="element")f(T[0],v,"token");else{const k={type:"element",tagName:"span",properties:{},children:T};f(k,v,"wrapper"),S.children.splice(D,T.length,k)}}function c(y,g){o[y]=f(o[y],g,"line")}function f(y,g,b){const v=g.properties||{},S=g.transform||(w=>w);return y.tagName=g.tagName||"span",y.properties={...y.properties,...v,class:y.properties.class},g.properties?.class&&R1(y,g.properties.class),y=S(y,b)||y,y}const d=[],h=a.decorations.sort((y,g)=>g.start.offset-y.start.offset||y.end.offset-g.end.offset);for(const y of h){const{start:g,end:b}=y;if(g.line===b.line)s(g.line,g.character,b.character,y);else if(g.line<b.line){s(g.line,g.character,Number.POSITIVE_INFINITY,y);for(let v=g.line+1;v<b.line;v++)d.unshift(()=>c(v,y));s(b.line,0,b.character,y)}}d.forEach(y=>y())}}}function h2(e){for(let t=0;t<e.length;t++){const i=e[t];if(i.start.offset>i.end.offset)throw new mt(`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 mt(`Decorations ${JSON.stringify(i.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function N1(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(N1).join(""):""}const p2=[f2()];function iu(e){const t=m2(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...p2]}function m2(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 br=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],cf={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function g2(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 ob(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 y2(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)cf[a]&&t.push({type:"setDecoration",value:cf[a]});else if(a<=29){const o=cf[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:br[a-30]}});else if(a===38){const o=ob(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:br[a-40]}});else if(a===48){const o=ob(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:br[a-90+8]}}):a>=100&&a<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:br[a-100+8]}})}return t}function b2(){let e=null,t=null,i=new Set;return{parse(a){const o=[];let s=0;do{const c=g2(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=y2(c.sequence);for(const h of d)h.type==="resetAll"?(e=null,t=null,i.clear()):h.type==="resetForegroundColor"?e=null:h.type==="resetBackgroundColor"?t=null:h.type==="resetDecoration"&&i.delete(h.value);for(const h of d)h.type==="setForegroundColor"?e=h.value:h.type==="setBackgroundColor"?t=h.value:h.type==="setDecoration"&&i.add(h.value)}s=c.position}while(s<a.length);return o}}}var v2={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 _2(e=v2){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 h=0;h<br.length;h++)a.push(t(br[h]));let f=[0,95,135,175,215,255];for(let h=0;h<6;h++)for(let y=0;y<6;y++)for(let g=0;g<6;g++)a.push(i([f[h],f[y],f[g]]));let d=8;for(let h=0;h<24;h++,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 S2={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 E2(e,t,i){const a=tu(e,i),o=hu(t),s=Object.fromEntries(br.map(d=>{const h=`terminal.ansi${d[0].toUpperCase()}${d.substring(1)}`,y=e.colors?.[h];return[d,y||S2[d]]})),c=_2(s),f=b2();return o.map(d=>f.parse(d[0]).map(h=>{let y,g;h.decorations.has("reverse")?(y=h.background?c.value(h.background):e.bg,g=h.foreground?c.value(h.foreground):e.fg):(y=h.foreground?c.value(h.foreground):e.fg,g=h.background?c.value(h.background):void 0),y=Qi(y,a),g=Qi(g,a),h.decorations.has("dim")&&(y=x2(y));let b=Pt.None;return h.decorations.has("bold")&&(b|=Pt.Bold),h.decorations.has("italic")&&(b|=Pt.Italic),h.decorations.has("underline")&&(b|=Pt.Underline),h.decorations.has("strikethrough")&&(b|=Pt.Strikethrough),{content:h.value,offset:d[1],color:y,bgColor:g,fontStyle:b}}))}function x2(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 Ph(e,t,i={}){const{theme:a=e.getLoadedThemes()[0]}=i,o=e.resolveLangAlias(i.lang||"text");if(zh(o)||Hh(a))return hu(t).map(d=>[{content:d[0],offset:d[1]}]);const{theme:s,colorMap:c}=e.setTheme(a);if(o==="ansi")return E2(s,t,i);const f=e.getLanguage(i.lang||"text");if(i.grammarState){if(i.grammarState.lang!==f.name)throw new mt(`Grammar state language "${i.grammarState.lang}" does not match highlight language "${f.name}"`);if(!i.grammarState.themes.includes(s.name))throw new mt(`Grammar state themes "${i.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return w2(t,f,s,c,i)}function C2(...e){if(e.length===2)return Jl(e[1]);const[t,i,a={}]=e,{lang:o="text",theme:s=t.getLoadedThemes()[0]}=a;if(zh(o)||Hh(s))throw new mt("Plain language does not have grammar state");if(o==="ansi")throw new mt("ANSI language does not have grammar state");const{theme:c,colorMap:f}=t.setTheme(s),d=t.getLanguage(o);return new Ma(Bh(i,d,c,f,a).stateStack,d.name,c.name)}function w2(e,t,i,a,o){const s=Bh(e,t,i,a,o),c=new Ma(s.stateStack,t.name,i.name);return pu(s.tokens,c),s.tokens}function Bh(e,t,i,a,o){const s=tu(i,o),{tokenizeMaxLineLength:c=0,tokenizeTimeLimit:f=500}=o,d=hu(e);let h=o.grammarState?d2(o.grammarState,i.name)??Qf:o.grammarContextCode!=null?Bh(o.grammarContextCode,t,i,a,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:Qf,y=[];const g=[];for(let b=0,v=d.length;b<v;b++){const[S,w]=d[b];if(S===""){y=[],g.push([]);continue}if(c>0&&S.length>=c){y=[],g.push([{content:S,offset:w,color:"",fontStyle:0}]);continue}let D,x,T;o.includeExplanation&&(D=t.tokenizeLine(S,h,f),x=D.tokens,T=0);const k=t.tokenizeLine2(S,h,f),U=k.tokens.length/2;for(let z=0;z<U;z++){const R=k.tokens[2*z],F=z+1<U?k.tokens[2*z+2]:S.length;if(R===F)continue;const le=k.tokens[2*z+1],V=Qi(a[Ra.getForeground(le)],s),se=Ra.getFontStyle(le),Z={content:S.substring(R,F),offset:w+R,color:V,fontStyle:se};if(o.includeExplanation){const K=[];if(o.includeExplanation!=="scopeName")for(const ie of i.settings){let q;switch(typeof ie.scope){case"string":q=ie.scope.split(/,/).map(H=>H.trim());break;case"object":q=ie.scope;break;default:continue}K.push({settings:ie,selectors:q.map(H=>H.split(/ /))})}Z.explanation=[];let W=0;for(;R+W<F;){const ie=x[T],q=S.substring(ie.startIndex,ie.endIndex);W+=q.length,Z.explanation.push({content:q,scopes:o.includeExplanation==="scopeName"?k2(ie.scopes):A2(K,ie.scopes)}),T+=1}}y.push(Z)}g.push(y),y=[],h=k.ruleStack}return{tokens:g,stateStack:h}}function k2(e){return e.map(t=>({scopeName:t}))}function A2(e,t){const i=[];for(let a=0,o=t.length;a<o;a++){const s=t[a];i[a]={scopeName:s,themeMatches:L2(e,s,t.slice(0,a))}}return i}function sb(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function T2(e,t,i){if(!sb(e[e.length-1],t))return!1;let a=e.length-2,o=i.length-1;for(;a>=0&&o>=0;)sb(e[a],i[o])&&(a-=1),o-=1;return a===-1}function L2(e,t,i){const a=[];for(const{selectors:o,settings:s}of e)for(const c of o)if(T2(c,t,i)){a.push(s);break}return a}function O1(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 h=Ph(e,t,{...i,theme:d.theme}),y=Jl(h),g=typeof d.theme=="string"?d.theme:d.theme.name;return{tokens:h,state:y,theme:g}}),s=R2(...o.map(d=>d.tokens)),c=s[0].map((d,h)=>d.map((y,g)=>{const b={content:y.content,variants:{},offset:y.offset};return"includeExplanation"in i&&i.includeExplanation&&(b.explanation=y.explanation),s.forEach((v,S)=>{const{content:w,explanation:D,offset:x,...T}=v[h][g];b.variants[a[S].color]=T}),b})),f=o[0].state?new Ma(Object.fromEntries(o.map(d=>[d.theme,d.state?.getInternalStack(d.theme)])),o[0].state.lang):void 0;return f&&pu(c,f),c}function R2(...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,h)=>d.push(s[h]));const c=o.map(()=>0),f=o.map(d=>d[0]);for(;f.every(d=>d);){const d=Math.min(...f.map(h=>h.content.length));for(let h=0;h<i;h++){const y=f[h];y.content.length===d?(s[h].push(y),c[h]+=1,f[h]=o[h][c[h]]):(s[h].push({...y,content:y.content.slice(0,d)}),f[h]={...y,content:y.content.slice(d),offset:y.offset+d})}}}return t}function ru(e,t,i){let a,o,s,c,f,d;if("themes"in i){const{defaultColor:h="light",cssVariablePrefix:y="--shiki-",colorsRendering:g="css-vars"}=i,b=Object.entries(i.themes).filter(x=>x[1]).map(x=>({color:x[0],theme:x[1]})).sort((x,T)=>x.color===h?-1:T.color===h?1:0);if(b.length===0)throw new mt("`themes` option must not be empty");const v=O1(e,t,i);if(d=Jl(v),h&&Uh!==h&&!b.find(x=>x.color===h))throw new mt(`\`themes\` option must contain the defaultColor key \`${h}\``);const S=b.map(x=>e.getTheme(x.theme)),w=b.map(x=>x.color);s=v.map(x=>x.map(T=>u2(T,w,y,h,g))),d&&pu(s,d);const D=b.map(x=>tu(x.theme,i));o=ub(b,S,D,y,h,"fg",g),a=ub(b,S,D,y,h,"bg",g),c=`shiki-themes ${S.map(x=>x.name).join(" ")}`,f=h?void 0:[o,a].join(";")}else if("theme"in i){const h=tu(i.theme,i);s=Ph(e,t,i);const y=e.getTheme(i.theme);a=Qi(y.bg,h),o=Qi(y.fg,h),c=y.name,d=Jl(s)}else throw new mt("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:o,bg:a,themeName:c,rootStyle:f,grammarState:d}}function ub(e,t,i,a,o,s,c){return e.map((f,d)=>{const h=Qi(t[d][s],i[d])||"inherit",y=`${a+f.color}${s==="bg"?"-bg":""}:${h}`;if(d===0&&o){if(o===Uh&&e.length>1){const g=e.findIndex(w=>w.color==="light"),b=e.findIndex(w=>w.color==="dark");if(g===-1||b===-1)throw new mt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const v=Qi(t[g][s],i[g])||"inherit",S=Qi(t[b][s],i[b])||"inherit";return`light-dark(${v}, ${S});${y}`}return h}return c==="css-vars"?y:null}).filter(f=>!!f).join(";")}function au(e,t,i,a={meta:{},options:i,codeToHast:(o,s)=>au(e,o,s),codeToTokens:(o,s)=>ru(e,o,s)}){let o=t;for(const S of iu(i))o=S.preprocess?.call(a,o,i)||o;let{tokens:s,fg:c,bg:f,themeName:d,rootStyle:h,grammarState:y}=ru(e,o,i);const{mergeWhitespaces:g=!0,mergeSameStyleTokens:b=!1}=i;g===!0?s=N2(s):g==="never"&&(s=O2(s)),b&&(s=M2(s));const v={...a,get source(){return o}};for(const S of iu(i))s=S.tokens?.call(v,s)||s;return D2(s,{...i,fg:c,bg:f,themeName:d,rootStyle:i.rootStyle===!1?!1:i.rootStyle??h},v,y)}function D2(e,t,i,a=Jl(e)){const o=iu(t),s=[],c={type:"root",children:[]},{structure:f="classic",tabindex:d="0"}=t,h={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?h.style=t.rootStyle:h.style=`background-color:${t.bg};color:${t.fg}`),d!==!1&&d!=null&&(h.tabindex=d.toString());for(const[w,D]of Object.entries(t.meta||{}))w.startsWith("_")||(h[w]=D);let y={type:"element",tagName:"pre",properties:h,children:[],data:t.data},g={type:"element",tagName:"code",properties:{},children:s};const b=[],v={...i,structure:f,addClassToHast:R1,get source(){return i.source},get tokens(){return e},get options(){return t},get root(){return c},get pre(){return y},get code(){return g},get lines(){return b}};if(e.forEach((w,D)=>{D&&(f==="inline"?c.children.push({type:"element",tagName:"br",properties:{},children:[]}):f==="classic"&&s.push({type:"text",value:`
34
+ `}));let x={type:"element",tagName:"span",properties:{class:"line"},children:[]},T=0;for(const k of w){let U={type:"element",tagName:"span",properties:{...k.htmlAttrs},children:[{type:"text",value:k.content}]};const z=Kf(k.htmlStyle||nu(k));z&&(U.properties.style=z);for(const R of o)U=R?.span?.call(v,U,D+1,T,x,k)||U;f==="inline"?c.children.push(U):f==="classic"&&x.children.push(U),T+=k.content.length}if(f==="classic"){for(const k of o)x=k?.line?.call(v,x,D+1)||x;b.push(x),s.push(x)}else f==="inline"&&b.push(x)}),f==="classic"){for(const w of o)g=w?.code?.call(v,g)||g;y.children.push(g);for(const w of o)y=w?.pre?.call(v,y)||y;c.children.push(y)}else if(f==="inline"){const w=[];let D={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const k of c.children)k.type==="element"&&k.tagName==="br"?(w.push(D),D={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(k.type==="element"||k.type==="text")&&D.children.push(k);w.push(D);let T={type:"element",tagName:"code",properties:{},children:w};for(const k of o)T=k?.code?.call(v,T)||T;c.children=[];for(let k=0;k<T.children.length;k++){k>0&&c.children.push({type:"element",tagName:"br",properties:{},children:[]});const U=T.children[k];U.type==="element"&&c.children.push(...U.children)}}let S=c;for(const w of o)S=w?.root?.call(v,S)||S;return a&&pu(S,a),S}function N2(e){return e.map(t=>{const i=[];let a="",o;return t.forEach((s,c)=>{const d=!(s.fontStyle&&(s.fontStyle&Pt.Underline||s.fontStyle&Pt.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 O2(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 M2(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=Kf(o.htmlStyle||nu(o)),c=Kf(a.htmlStyle||nu(a)),f=o.fontStyle&&(o.fontStyle&Pt.Underline||o.fontStyle&Pt.Strikethrough),d=a.fontStyle&&(a.fontStyle&Pt.Underline||a.fontStyle&Pt.Strikethrough);!f&&!d&&s===c?o.content+=a.content:i.push({...a})}return i})}const I2=La;function z2(e,t,i){const a={meta:{},options:i,codeToHast:(s,c)=>au(e,s,c),codeToTokens:(s,c)=>ru(e,s,c)};let o=I2(au(e,t,i,a));for(const s of iu(i))o=s.postprocess?.call(a,o,i)||o;return o}const cb={light:"#333333",dark:"#bbbbbb"},db={light:"#fffffe",dark:"#1e1e1e"},fb="__shiki_resolved";function mu(e){if(e?.[fb])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"?cb.light:cb.dark),i||(i=t.type==="light"?db.light:db.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("#"),h=f.settings?.background&&!f.settings.background.startsWith("#");if(!d&&!h)return f;const y={...f,settings:{...f.settings}};if(d){const g=c(f.settings.foreground);t.colorReplacements[g]=f.settings.foreground,y.settings.foreground=g}if(h){const g=c(f.settings.background);t.colorReplacements[g]=f.settings.background,y.settings.background=g}return y});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,fb,{enumerable:!1,writable:!1,value:!0}),t}async function M1(e){return Array.from(new Set((await Promise.all(e.filter(t=>!T1(t)).map(async t=>await A1(t).then(i=>Array.isArray(i)?i:[i])))).flat()))}async function I1(e){return(await Promise.all(e.map(async i=>L1(i)?null:mu(await A1(i))))).filter(i=>!!i)}let H2=3;function U2(e,t=3){t>H2||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let Ca=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function z1(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 Ca(`Circular alias \`${Array.from(i).join(" -> ")} -> ${e}\``);i.add(e)}}return e}class P2 extends JT{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=mu(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=Zs.createFromRawTheme(t),this._textmateThemeCache.set(t,i)),this._syncRegistry.setTheme(i)}getGrammar(t){return t=z1(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(([h])=>h).includes(d)):!1).filter(s=>!a.includes(s));throw new Ca(`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 B2{_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 Il=0;function j2(e){Il+=1,e.warnings!==!1&&Il>=10&&Il%10===0&&console.warn(`[Shiki] ${Il} 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 Ca("`engine` option is required for synchronous mode");const i=(e.langs||[]).flat(1),a=(e.themes||[]).flat(1).map(mu),o=new B2(e.engine,i),s=new P2(o,a,i,e.langAlias);let c;function f(k){return z1(k,e.langAlias)}function d(k){x();const U=s.getGrammar(typeof k=="string"?k:k.name);if(!U)throw new Ca(`Language \`${k}\` not found, you may need to load it first`);return U}function h(k){if(k==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};x();const U=s.getTheme(k);if(!U)throw new Ca(`Theme \`${k}\` not found, you may need to load it first`);return U}function y(k){x();const U=h(k);c!==k&&(s.setTheme(U),c=k);const z=s.getColorMap();return{theme:U,colorMap:z}}function g(){return x(),s.getLoadedThemes()}function b(){return x(),s.getLoadedLanguages()}function v(...k){x(),s.loadLanguages(k.flat(1))}async function S(...k){return v(await M1(k))}function w(...k){x();for(const U of k.flat(1))s.loadTheme(U)}async function D(...k){return x(),w(await I1(k))}function x(){if(t)throw new Ca("Shiki instance has been disposed")}function T(){t||(t=!0,s.dispose(),Il-=1)}return{setTheme:y,getTheme:h,getLanguage:d,getLoadedThemes:g,getLoadedLanguages:b,resolveLangAlias:f,loadLanguage:S,loadLanguageSync:v,loadTheme:D,loadThemeSync:w,dispose:T,[Symbol.dispose]:T}}async function V2(e){e.engine||U2("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,i,a]=await Promise.all([I1(e.themes||[]),M1(e.langs||[]),e.engine]);return j2({...e,themes:t,langs:i,engine:a})}async function G2(e){const t=await V2(e);return{getLastGrammarState:(...i)=>C2(t,...i),codeToTokensBase:(i,a)=>Ph(t,i,a),codeToTokensWithThemes:(i,a)=>O1(t,i,a),codeToTokens:(i,a)=>ru(t,i,a),codeToHast:(i,a)=>au(t,i,a),codeToHtml:(i,a)=>z2(t,i,a),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function $2(e){const t=e.langs,i=e.themes,a=e.engine;async function o(s){function c(g){if(typeof g=="string"){if(g=s.langAlias?.[g]||g,T1(g))return[];const b=t[g];if(!b)throw new mt(`Language \`${g}\` is not included in this bundle. You may want to load it from external source.`);return b}return g}function f(g){if(L1(g))return"none";if(typeof g=="string"){const b=i[g];if(!b)throw new mt(`Theme \`${g}\` is not included in this bundle. You may want to load it from external source.`);return b}return g}const d=(s.themes??[]).map(g=>f(g)),h=(s.langs??[]).map(g=>c(g)),y=await G2({engine:s.engine??a(),...s,themes:d,langs:h});return{...y,loadLanguage(...g){return y.loadLanguage(...g.map(c))},loadTheme(...g){return y.loadTheme(...g.map(f))},getBundledLanguages(){return t},getBundledThemes(){return i}}}return o}function F2(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 q2(e,t){const i=F2(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 H1=[{id:"abap",name:"ABAP",import:(()=>C(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>C(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>C(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>C(()=>import("./angular-html-DMxchsRu.js").then(e=>e.a),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>C(()=>import("./angular-ts-DzOHUlBM.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>C(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>C(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>C(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>C(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>C(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>C(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>C(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>C(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>C(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>C(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>C(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>C(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>C(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>C(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>C(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>C(()=>import("./bird2-DPOp833l.js"),[]))},{id:"blade",name:"Blade",import:(()=>C(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>C(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>C(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>C(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>C(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>C(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>C(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>C(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>C(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>C(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>C(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>C(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>C(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>C(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>C(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>C(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>C(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>C(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>C(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>C(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>C(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>C(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>C(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>C(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>C(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>C(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>C(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>C(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>C(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>C(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>C(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>C(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>C(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>C(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>C(()=>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:(()=>C(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>C(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>C(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>C(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>C(()=>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:(()=>C(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>C(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>C(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>C(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>C(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>C(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>C(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>C(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>C(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>C(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>C(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>C(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>C(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>C(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>C(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>C(()=>import("./go-CxLEBnE3.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>C(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>C(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>C(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>C(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>C(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>C(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>C(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>C(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>C(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>C(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>C(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>C(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>C(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>C(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>C(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>C(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>C(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>C(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>C(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>C(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>C(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>C(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>C(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>C(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>C(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>C(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>C(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>C(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>C(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>C(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>C(()=>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:(()=>C(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>C(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>C(()=>import("./kusto-DZf3V79B.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>C(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>C(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>C(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>C(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>C(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>C(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>C(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>C(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>C(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>C(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>C(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>C(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>C(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>C(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>C(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>C(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>C(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>C(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>C(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>C(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>C(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>C(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>C(()=>import("./nextflow-groovy-BeH2EWoN.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>C(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>C(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>C(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>C(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>C(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>C(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>C(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>C(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>C(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>C(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>C(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>C(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>C(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>C(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>C(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>C(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>C(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>C(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>C(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>C(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>C(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>C(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>C(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>C(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>C(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>C(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>C(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>C(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>C(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>C(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>C(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>C(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>C(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>C(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>C(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>C(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>C(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>C(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>C(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>C(()=>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:(()=>C(()=>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:(()=>C(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>C(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>C(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>C(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>C(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>C(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>C(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>C(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>C(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>C(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>C(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>C(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>C(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>C(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>C(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>C(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>C(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>C(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>C(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>C(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>C(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>C(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>C(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>C(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>C(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>C(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>C(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>C(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>C(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>C(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>C(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>C(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>C(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>C(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>C(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>C(()=>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:(()=>C(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>C(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>C(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>C(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>C(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>C(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>C(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>C(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>C(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>C(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>C(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>C(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>C(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>C(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>C(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>C(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>C(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>C(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>C(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>C(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>C(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>C(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>C(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>C(()=>import("./zig-VOosw3JB.js"),[]))}],Y2=Object.fromEntries(H1.map(e=>[e.id,e.import])),X2=Object.fromEntries(H1.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Wf={...Y2,...X2},Q2=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>C(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>C(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>C(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>C(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>C(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>C(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>C(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>C(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>C(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>C(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>C(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>C(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>C(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>C(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>C(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>C(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>C(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>C(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>C(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>C(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>C(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>C(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>C(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>C(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>C(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>C(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>C(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>C(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>C(()=>import("./horizon-bright-Cn-bp-IR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>C(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>C(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>C(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>C(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>C(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>C(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>C(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>C(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>C(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>C(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>C(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>C(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>C(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>C(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>C(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>C(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>C(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>C(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>C(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>C(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>C(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>C(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>C(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>C(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>C(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>C(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>C(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>C(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>C(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>C(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>C(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>C(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>C(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>C(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>C(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>C(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],U1=Object.fromEntries(Q2.map(e=>[e.id,e.import]));class jh extends Error{constructor(t){super(t),this.name="ShikiError"}}function Z2(){return 2147483648}function K2(){return typeof performance<"u"?performance.now():Date.now()}const W2=(e,t)=>e+(t-e%t)%t;async function J2(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,w){a.HEAPU8.copyWithin(v,S,S+w)}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 w=Z2();if(v>w)return!1;for(let D=1;D<=4;D*=2){let x=S*(1+.2/D);x=Math.min(x,v+100663296);const T=Math.min(w,W2(Math.max(v,x),65536));if(c(T))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function h(v,S,w=1024){const D=S+w;let x=S;for(;v[x]&&!(x>=D);)++x;if(x-S>16&&v.buffer&&d)return d.decode(v.subarray(S,x));let T="";for(;S<x;){let k=v[S++];if(!(k&128)){T+=String.fromCharCode(k);continue}const U=v[S++]&63;if((k&224)===192){T+=String.fromCharCode((k&31)<<6|U);continue}const z=v[S++]&63;if((k&240)===224?k=(k&15)<<12|U<<6|z:k=(k&7)<<18|U<<12|z<<6|v[S++]&63,k<65536)T+=String.fromCharCode(k);else{const R=k-65536;T+=String.fromCharCode(55296|R>>10,56320|R&1023)}}return T}function y(v,S){return v?h(a.HEAPU8,v,S):""}const g={emscripten_get_now:K2,emscripten_memcpy_big:s,emscripten_resize_heap:f,fd_write:()=>0};async function b(){const S=await e({env:g,wasi_snapshot_preview1:g});t=S.memory,o(t.buffer),Object.assign(a,S),a.UTF8ToString=y}return await b(),a}var eR=Object.defineProperty,tR=(e,t,i)=>t in e?eR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,_t=(e,t,i)=>tR(e,typeof t!="symbol"?t+"":t,i);let wt=null;function nR(e){throw new jh(e.UTF8ToString(e.getLastOnigError()))}class gu{constructor(t){_t(this,"utf16Length"),_t(this,"utf8Length"),_t(this,"utf16Value"),_t(this,"utf8Value"),_t(this,"utf16OffsetToUtf8"),_t(this,"utf8OffsetToUtf16");const i=t.length,a=gu._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 h=0;h<i;h++){const y=t.charCodeAt(h);let g=y,b=!1;if(y>=55296&&y<=56319&&h+1<i){const v=t.charCodeAt(h+1);v>=56320&&v<=57343&&(g=(y-55296<<10)+65536|v-56320,b=!0)}o&&(s[h]=d,b&&(s[h+1]=d),g<=127?c[d+0]=h:g<=2047?(c[d+0]=h,c[d+1]=h):g<=65535?(c[d+0]=h,c[d+1]=h,c[d+2]=h):(c[d+0]=h,c[d+1]=h,c[d+2]=h,c[d+3]=h)),g<=127?f[d++]=g:g<=2047?(f[d++]=192|(g&1984)>>>6,f[d++]=128|(g&63)>>>0):g<=65535?(f[d++]=224|(g&61440)>>>12,f[d++]=128|(g&4032)>>>6,f[d++]=128|(g&63)>>>0):(f[d++]=240|(g&1835008)>>>18,f[d++]=128|(g&258048)>>>12,f[d++]=128|(g&4032)>>>6,f[d++]=128|(g&63)>>>0),b&&h++}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 yu=class $n{constructor(t){if(_t(this,"id",++$n.LAST_ID),_t(this,"_onigBinding"),_t(this,"content"),_t(this,"utf16Length"),_t(this,"utf8Length"),_t(this,"utf16OffsetToUtf8"),_t(this,"utf8OffsetToUtf16"),_t(this,"ptr"),!wt)throw new jh("Must invoke loadWasm first.");this._onigBinding=wt,this.content=t;const i=new gu(t);this.utf16Length=i.utf16Length,this.utf8Length=i.utf8Length,this.utf16OffsetToUtf8=i.utf16OffsetToUtf8,this.utf8OffsetToUtf16=i.utf8OffsetToUtf16,this.utf8Length<1e4&&!$n._sharedPtrInUse?($n._sharedPtr||($n._sharedPtr=wt.omalloc(1e4)),$n._sharedPtrInUse=!0,wt.HEAPU8.set(i.utf8Value,$n._sharedPtr),this.ptr=$n._sharedPtr):this.ptr=i.createString(wt)}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===$n._sharedPtr?$n._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};_t(yu,"LAST_ID",0);_t(yu,"_sharedPtr",0);_t(yu,"_sharedPtrInUse",!1);let P1=yu;class iR{constructor(t){if(_t(this,"_onigBinding"),_t(this,"_ptr"),!wt)throw new jh("Must invoke loadWasm first.");const i=[],a=[];for(let f=0,d=t.length;f<d;f++){const h=new gu(t[f]);i[f]=h.createString(wt),a[f]=h.utf8Length}const o=wt.omalloc(4*t.length);wt.HEAPU32.set(i,o/4);const s=wt.omalloc(4*t.length);wt.HEAPU32.set(a,s/4);const c=wt.createOnigScanner(o,s,t.length);for(let f=0,d=t.length;f<d;f++)wt.ofree(i[f]);wt.ofree(s),wt.ofree(o),c===0&&nR(wt),this._onigBinding=wt,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 P1(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 h=f[d++],y=f[d++],g=[];for(let b=0;b<y;b++){const v=t.convertUtf8OffsetToUtf16(f[d++]),S=t.convertUtf8OffsetToUtf16(f[d++]);g[b]={start:v,end:S,length:S-v}}return{index:h,captureIndices:g}}}function rR(e){return typeof e.instantiator=="function"}function aR(e){return typeof e.default=="function"}function lR(e){return typeof e.data<"u"}function oR(e){return typeof Response<"u"&&e instanceof Response}function sR(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 As;function uR(e){if(As)return As;async function t(){wt=await J2(async i=>{let a=e;return a=await a,typeof a=="function"&&(a=await a(i)),typeof a=="function"&&(a=await a(i)),rR(a)?a=await a.instantiator(i):aR(a)?a=await a.default(i):(lR(a)&&(a=a.data),oR(a)?typeof WebAssembly.instantiateStreaming=="function"?a=await cR(a)(i):a=await dR(a)(i):sR(a)?a=await df(a)(i):a instanceof WebAssembly.Module?a=await df(a)(i):"default"in a&&a.default instanceof WebAssembly.Module&&(a=await df(a.default)(i))),"instance"in a&&(a=a.instance),"exports"in a&&(a=a.exports),a})}return As=t(),As}function df(e){return t=>WebAssembly.instantiate(e,t)}function cR(e){return t=>WebAssembly.instantiateStreaming(e,t)}function dR(e){return async t=>{const i=await e.arrayBuffer();return WebAssembly.instantiate(i,t)}}async function B1(e){return e&&await uR(e),{createScanner(t){return new iR(t.map(i=>typeof i=="string"?i:i.source))},createString(t){return new P1(t)}}}const j1=$2({langs:Wf,themes:U1,engine:()=>B1(C(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:hb}=q2(j1,{guessEmbeddedLanguages:a2});function Ia(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function fR(e,t,i){return e.has(t)||e.set(t,i),e.get(t)}const Vh=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),kt=String.raw;function za(e,t){if(e==null)throw new Error(t??"Value expected");return e}const V1=kt`\[\^?`,G1=`c.? | C(?:-.?)?|${kt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${kt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${kt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${kt`o\{[^\}]*\}?`}|${kt`\d{1,3}`}`,Gh=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Ts=new RegExp(kt`
35
+ \\ (?:
36
+ ${G1}
37
+ | [gk]<[^>]*>?
38
+ | [gk]'[^']*'?
39
+ | .
40
+ )
41
+ | \( (?:
42
+ \? (?:
43
+ [:=!>({]
44
+ | <[=!]
45
+ | <[^>]*>
46
+ | '[^']*'
47
+ | ~\|?
48
+ | #(?:[^)\\]|\\.?)*
49
+ | [^:)]*[:)]
50
+ )?
51
+ | \*[^\)]*\)?
52
+ )?
53
+ | (?:${Gh.source})+
54
+ | ${V1}
55
+ | .
56
+ `.replace(/\s+/g,""),"gsu"),ff=new RegExp(kt`
57
+ \\ (?:
58
+ ${G1}
59
+ | .
60
+ )
61
+ | \[:(?:\^?\p{Alpha}+|\^):\]
62
+ | ${V1}
63
+ | &&
64
+ | .
65
+ `.replace(/\s+/g,""),"gsu");function hR(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=NR(i.flags),o=[a.extended],s={captureGroup:i.rules.captureGroup,getCurrentModX(){return o.at(-1)},numOpenGroups:0,popModX(){o.pop()},pushModX(g){o.push(g)},replaceCurrentModX(g){o[o.length-1]=g},singleline:i.rules.singleline};let c=[],f;for(Ts.lastIndex=0;f=Ts.exec(e);){const g=pR(s,e,f[0],Ts.lastIndex);g.tokens?c.push(...g.tokens):g.token&&c.push(g.token),g.lastIndex!==void 0&&(Ts.lastIndex=g.lastIndex)}const d=[];let h=0;c.filter(g=>g.type==="GroupOpen").forEach(g=>{g.kind==="capturing"?g.number=++h:g.raw==="("&&d.push(g)}),h||d.forEach((g,b)=>{g.kind="capturing",g.number=b+1});const y=h||d.length;return{tokens:c.map(g=>g.type==="EscapedNumber"?MR(g,y):g).flat(),flags:a}}function pR(e,t,i,a){const[o,s]=i;if(i==="["||i==="[^"){const c=mR(t,i,a);return{tokens:c.tokens,lastIndex:c.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(s))return{token:pb(i,i)};if(/^\\g[<']/.test(i)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(i))throw new Error(`Invalid group name "${i}"`);return{token:wR(i)}}if(/^\\k[<']/.test(i)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(i))throw new Error(`Invalid group name "${i}"`);return{token:F1(i)}}if(s==="K")return{token:q1("keep",i)};if(s==="N"||s==="R")return{token:vr("newline",i,{negate:s==="N"})};if(s==="O")return{token:vr("any",i)};if(s==="X")return{token:vr("text_segment",i)};const c=$1(i,{inCharClass:!1});return Array.isArray(c)?{tokens:c}:{token:c}}if(o==="("){if(s==="*")return{token:LR(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:TR(i,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,i==="("&&!e.captureGroup||i==="(?:")return{token:Sa("group",i)};if(i==="(?>")return{token:Sa("atomic",i)};if(i==="(?="||i==="(?!"||i==="(?<="||i==="(?<!")return{token:Sa(i[2]==="<"?"lookbehind":"lookahead",i,{negate:i.endsWith("!")})};if(i==="("&&e.captureGroup||i.startsWith("(?<")&&i.endsWith(">")||i.startsWith("(?'")&&i.endsWith("'"))return{token:Sa("capturing",i,{...i!=="("&&{name:i.slice(3,-1)}})};if(i.startsWith("(?~")){if(i==="(?~|")throw new Error(`Unsupported absence function kind "${i}"`);return{token:Sa("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:ER(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:vr("dot",i)};if(i==="^"||i==="$"){const c=e.singleline?{"^":kt`\A`,$:kt`\Z`}[i]:i;return{token:pb(c,i)}}return i==="|"?{token:yR(i)}:Gh.test(i)?{tokens:IR(i)}:{token:vi(Ia(i),i)}}function mR(e,t,i){const a=[mb(t[1]==="^",t)];let o=1,s;for(ff.lastIndex=i;s=ff.exec(e);){const c=s[0];if(c[0]==="["&&c[1]!==":")o++,a.push(mb(c[1]==="^",c));else if(c==="]"){if(a.at(-1).type==="CharacterClassOpen")a.push(vi(93,c));else if(o--,a.push(bR(c)),!o)break}else{const f=gR(c);Array.isArray(f)?a.push(...f):a.push(f)}}return{tokens:a,lastIndex:ff.lastIndex||e.length}}function gR(e){if(e[0]==="\\")return $1(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Vh.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return vr("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?vR(e):e==="&&"?_R(e):vi(Ia(e),e)}function $1(e,{inCharClass:t}){const i=e[1];if(i==="c"||i==="C")return AR(e);if("dDhHsSwW".includes(i))return RR(e);if(e.startsWith(kt`\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 DR(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 vi(Ia(c),f)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(i==="u"||i==="x")return vi(OR(e),e);if(gb.has(i))return vi(gb.get(i),e);if(/\d/.test(i))return SR(t,e);if(e==="\\")throw new Error(kt`Incomplete escape "\"`);if(i==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return vi(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function yR(e){return{type:"Alternator",raw:e}}function pb(e,t){return{type:"Assertion",kind:e,raw:t}}function F1(e){return{type:"Backreference",raw:e}}function vi(e,t){return{type:"Character",value:e,raw:t}}function bR(e){return{type:"CharacterClassClose",raw:e}}function vR(e){return{type:"CharacterClassHyphen",raw:e}}function _R(e){return{type:"CharacterClassIntersector",raw:e}}function mb(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function vr(e,t,i={}){return{type:"CharacterSet",kind:e,...i,raw:t}}function q1(e,t,i={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:za(i.flags),raw:t}}function SR(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function ER(e){return{type:"GroupClose",raw:e}}function Sa(e,t,i={}){return{type:"GroupOpen",kind:e,...i,raw:t}}function xR(e,t,i,a){return{type:"NamedCallout",kind:e,tag:t,arguments:i,raw:a}}function CR(e,t,i,a){return{type:"Quantifier",kind:e,min:t,max:i,raw:a}}function wR(e){return{type:"Subroutine",raw:e}}const kR=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),gb=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function AR(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 vi(Ia(t.toUpperCase())-64,e)}function TR(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=bb(i),c=bb(a),f={};if(s&&(f.enable=s),c&&(f.disable=c),e.endsWith(")"))return t.replaceCurrentModX(o),q1("flags",e,{flags:f});if(e.endsWith(":"))return t.pushModX(o),t.numOpenGroups++,Sa("group",e,{...(s||c)&&{flags:f}});throw new Error(`Unexpected flag modifier "${e}"`)}function LR(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(y=>y!=="").map(y=>/^[+-]?\d+$/.test(y)?+y:y):[],[c,f,d]=s,h=kR.has(i)?i.toLowerCase():"custom";switch(h){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 "${h}"`)}return xR(h,a??null,o?.split(",")??null,e)}function yb(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 CR(t,i,a,e)}function RR(e){const t=e[1].toLowerCase();return vr({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function DR(e){const{p:t,neg:i,value:a}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return vr("property",e,{value:a,negate:t==="P"&&!i||t==="p"&&!!i})}function bb(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 NR(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 OR(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 MR(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[F1(i)];const s=[],c=o.match(/^[0-7]+|\d/g);for(let f=0;f<c.length;f++){const d=c[f];let h;if(f===0&&d!=="8"&&d!=="9"){if(h=parseInt(d,8),h>127)throw new Error(kt`Octal encoded byte above 177 unsupported "${i}"`)}else h=Ia(d);s.push(vi(h,(f===0?"\\":"")+d))}return s}function IR(e){const t=[],i=new RegExp(Gh,"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(yb(o.slice(0,-1)));continue}}}t.push(yb(o))}return t}function Y1(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 zR(e){return HR.has(e.type)}const HR=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function X1(e,t={}){const i={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},a=hR(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 Er();case"Assertion":return UR(S);case"Backreference":return PR(S,s);case"Character":return bu(S.value,{useLastValid:!!v.isCheckingRangeEnd});case"CharacterClassHyphen":return BR(S,s,v);case"CharacterClassOpen":return jR(S,s,v);case"CharacterSet":return VR(S,s);case"Directive":return XR(S.kind,{flags:S.flags});case"GroupOpen":return GR(S,s,v);case"NamedCallout":return ZR(S.kind,S.tag,S.arguments);case"Quantifier":return $R(S,s);case"Subroutine":return FR(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=WR(QR(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:h,namedGroupsByName:y,subroutines:g}=s;if(h&&y.size&&!i.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:b}of g)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(y.has(b)){if(y.get(b).length>1)throw new Error(kt`Subroutine uses a duplicate group name "\g<${b}>"`);y.get(b)[0].isSubroutined=!0}else throw new Error(kt`Subroutine uses a group name that's not defined "\g<${b}>"`);return c}function UR({kind:e}){return Jf(za({"^":"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===kt`\B`||e===kt`\Y`})}function PR({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,eh(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 eh(a)}return o(+a)}function BR(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(),YR(c,d);throw new Error("Invalid character class range")}return bu(Ia("-"))}function jR({negate:e},t,i){const{tokens:a,walk:o}=t,s=[Fs()],c=a[t.nextIndex];let f=Sb(c);for(;f.type!=="CharacterClassClose";){if(f.type==="CharacterClassIntersector")s.push(Fs()),t.nextIndex++;else{const h=s.at(-1);h.body.push(o(h,i))}f=Sb(a[t.nextIndex],c)}const d=Fs({negate:e});return s.length===1?d.body=s[0].body:(d.kind="intersection",d.body=s.map(h=>h.body.length===1?h.body[0]:h)),t.nextIndex++,d}function VR({kind:e,negate:t,value:i},a){const{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:c}=a;if(e==="property"){const f=vu(i);if(Vh.has(f)&&!c?.has(f))e="posix",i=f;else return Ea(i,{negate:t,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:c})}return e==="posix"?KR(i,{negate:t}):th(e,{negate:t})}function GR(e,t,i){const{tokens:a,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:c,walk:f}=t,d=JR(e),h=d.type==="AbsenceFunction",y=_b(d),g=y&&d.negate;if(d.type==="CapturingGroup"&&(o.push(d),d.name&&fR(s,d.name,[]).push(d)),h&&i.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let b=Eb(a[t.nextIndex]);for(;b.type!=="GroupClose";){if(b.type==="Alternator")d.body.push(Er()),t.nextIndex++;else{const v=d.body.at(-1),S=f(v,{...i,isInAbsenceFunction:i.isInAbsenceFunction||h,isInLookbehind:i.isInLookbehind||y,isInNegLookbehind:i.isInNegLookbehind||g});if(v.body.push(S),(y||i.isInLookbehind)&&!c){const w="Lookbehind includes a pattern not allowed by Oniguruma";if(g||i.isInNegLookbehind){if(vb(S)||S.type==="CapturingGroup")throw new Error(w)}else if(vb(S)||_b(S)&&S.negate)throw new Error(w)}}b=Eb(a[t.nextIndex])}return t.nextIndex++,d}function $R({kind:e,min:t,max:i},a){const o=a.parent,s=o.body.at(-1);if(!s||!zR(s))throw new Error("Quantifier requires a repeatable token");const c=Z1(e,t,i,s);return o.body.pop(),c}function FR({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=K1(o);return a.push(c),c}function qR(e,t){return{type:"AbsenceFunction",kind:e,body:oo(t?.body)}}function Er(e){return{type:"Alternative",body:W1(e?.body)}}function Jf(e,t){const i={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(i.negate=!!t?.negate),i}function eh(e,t){const i=!!t?.orphan;return{type:"Backreference",ref:e,...i&&{orphan:i}}}function Q1(e,t){const i={name:void 0,isSubroutined:!1,...t};if(i.name!==void 0&&!eD(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:oo(t?.body)}}function bu(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 Fs(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:W1(e?.body)}}function YR(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function th(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 XR(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:za(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function QR(e){return{type:"Flags",...e}}function Mn(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:oo(e?.body)}}function yr(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:oo(e?.body)}}function ZR(e,t,i){return{type:"NamedCallout",kind:e,tag:t,arguments:i}}function KR(e,t){const i=!!t?.negate;if(!Vh.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:i}}function Z1(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 WR(e,t){return{type:"Regex",body:oo(t?.body),flags:e}}function K1(e){return{type:"Subroutine",ref:e}}function Ea(e,t){const i={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let a=i.unicodePropertyMap?.get(vu(e));if(!a){if(i.normalizeUnknownPropertyNames)a=tD(e);else if(i.unicodePropertyMap&&!i.skipPropertyNameValidation)throw new Error(kt`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:a??e,negate:i.negate}}function JR({flags:e,kind:t,name:i,negate:a,number:o}){switch(t){case"absence_repeater":return qR("repeater");case"atomic":return Mn({atomic:!0});case"capturing":return Q1(o,{name:i});case"group":return Mn({flags:e});case"lookahead":case"lookbehind":return yr({behind:t==="lookbehind",negate:a});default:throw new Error(`Unexpected group kind "${t}"`)}}function oo(e){if(e===void 0)e=[Er()];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 W1(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 vb(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function _b(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function eD(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function tD(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 vu(e){return e.replace(/[- _]+/g,"").toLowerCase()}function Sb(e,t){const i=t;return za(e,`Unclosed character class${i?.type==="Character"&&i.value===93&&i.raw==="]"?' (started with "]")':""}`)}function Eb(e){return za(e,"Unclosed group")}function Yl(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 h=0,y=!1;const g={node:s,parent:c,key:f,container:d,root:e,remove(){Ls(d).splice(Math.max(0,ga(f)+h),1),h--,y=!0},removeAllNextSiblings(){return Ls(d).splice(ga(f)+1)},removeAllPrevSiblings(){const x=ga(f)+h;return h-=x,Ls(d).splice(0,Math.max(0,x))},replaceWith(x,T={}){const k=!!T.traverse;d?d[Math.max(0,ga(f)+h)]=x:za(c,"Can't replace root node")[f]=x,k&&o(x,c,f,d),y=!0},replaceWithMultiple(x,T={}){const k=!!T.traverse;if(Ls(d).splice(Math.max(0,ga(f)+h),1,...x),h+=x.length-1,k){let U=0;for(let z=0;z<x.length;z++)U+=o(x[z],c,ga(f)+z+U,d)}y=!0},skip(){y=!0}},{type:b}=s,v=t["*"],S=t[b],w=typeof v=="function"?v:v?.enter,D=typeof S=="function"?S:S?.enter;if(w?.(g,i),D?.(g,i),!y)switch(b){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":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"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?.(g,i),v?.exit?.(g,i),h}return o(e),e}function Ls(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function ga(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const nD=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function iD(e,t){for(let i=0;i<e.length;i++)e[i]>=t&&e[i]++}function rD(e,t,i,a){return e.slice(0,t)+a+e.slice(t+i.length)}const wn=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function $h(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:h,groups:{$skip:y}}=d;if(!y&&(!a||a===wn.DEFAULT==!c)){i instanceof Function?f+=i(d,{context:c?wn.CHAR_CLASS:wn.DEFAULT,negated:s[s.length-1]}):f+=i;continue}h[0]==="["?(c++,s.push(h[1]==="^")):h==="]"&&c&&(c--,s.pop()),f+=h}return f}function J1(e,t,i,a){$h(e,t,i,a)}function aD(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===wn.DEFAULT==!s))return c;f==="["?s++:f==="]"&&s&&s--,o.lastIndex==c.index&&o.lastIndex++}return null}function Rs(e,t,i){return!!aD(e,t,0,i)}function lD(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 xb=new RegExp(String.raw`(?<noncapturingStart>${nD})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function oD(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,h=0,y=NaN,g;do{g=!1;let b=0,v=0,S=!1,w;for(xb.lastIndex=Number.isNaN(y)?0:y+s.length;w=xb.exec(e);){const{0:D,index:x,groups:{capturingStart:T,noncapturingStart:k}}=w;if(D==="[")b++;else if(b)D==="]"&&b--;else if(D===o&&!S)y=x,S=!0;else if(S&&k)v++;else if(T)S?v++:(d++,c.push(d+h));else if(D===")"&&S){if(!v){h++;const U=d+h;if(e=`${e.slice(0,y)}${s}${e.slice(y+o.length,x)}))<$$${U}>)${e.slice(x+1)}`,g=!0,f.push(U),iD(i,U),a.size){const z=new Map;a.forEach((R,F)=>{z.set(F>=U?F+1:F,R.map(le=>le>=U?le+1:le))}),a=z}break}v--}}}while(g);return i.push(...f),e=$h(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:b,groups:{backrefNum:v,wrappedBackrefNum:S}})=>{if(v){const w=+v;if(w>c.length-1)throw new Error(`Backref "${b}" greater than number of captures`);return`\\${c[w]}`}return`\\${S}`},wn.DEFAULT),{pattern:e,captureTransfers:a,hiddenCaptures:i}}const e_=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,hf=new RegExp(String.raw`
67
+ \\(?: \d+
68
+ | c[A-Za-z]
69
+ | [gk]<[^>]+>
70
+ | [pPu]\{[^\}]+\}
71
+ | u[A-Fa-f\d]{4}
72
+ | x[A-Fa-f\d]{2}
73
+ )
74
+ | \((?: \? (?: [:=!>]
75
+ | <(?:[=!]|[^>]+>)
76
+ | [A-Za-z\-]+:
77
+ | \(DEFINE\)
78
+ ))?
79
+ | (?<qBase>${e_})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
80
+ | \\?.
81
+ `.replace(/\s+/g,""),"gsu");function sD(e){if(!new RegExp(`${e_}\\+`).test(e))return{pattern:e};const t=[];let i=null,a=null,o="",s=0,c;for(hf.lastIndex=0;c=hf.exec(e);){const{0:f,index:d,groups:{qBase:h,qMod:y,invalidQ:g}}=c;if(f==="[")s||(a=d),s++;else if(f==="]")s?s--:a=null;else if(!s)if(y==="+"&&o&&!o.startsWith("(")){if(g)throw new Error(`Invalid quantifier "${f}"`);let b=-1;if(/^\{\d+\}$/.test(h))e=rD(e,d+h.length,y,"");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)}${h})${e.slice(d+f.length)}`}else e=`${e.slice(0,d-o.length)}(?>${o}${h})${e.slice(d+f.length)}`;b+=4}hf.lastIndex+=b}else f[0]==="("?t.push(d):f===")"&&(i=t.length?t.pop():null);o=f}return{pattern:e}}const Cn=String.raw,uD=Cn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,nh=Cn`\(\?R=(?<rDepth>[^\)]+)\)|${uD}`,_u=Cn`\(\?<(?![=!])(?<captureName>[^>]+)>`,t_=Cn`${_u}|(?<unnamed>\()(?!\?)`,mr=new RegExp(Cn`${_u}|${nh}|\(\?|\\?.`,"gsu"),pf="Cannot use multiple overlapping recursions";function cD(e,t){const{hiddenCaptures:i,mode:a}={hiddenCaptures:[],mode:"plugin",...t};let o=t?.captureTransfers??new Map;if(!new RegExp(nh,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:i};if(a==="plugin"&&Rs(e,Cn`\(\?\(DEFINE\)`,wn.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],c=Rs(e,Cn`\\[1-9]`,wn.DEFAULT),f=new Map,d=[];let h=!1,y=0,g=0,b;for(mr.lastIndex=0;b=mr.exec(e);){const{0:v,groups:{captureName:S,rDepth:w,gRNameOrNum:D,gRDepth:x}}=b;if(v==="[")y++;else if(y)v==="]"&&y--;else if(w){if(Cb(w),h)throw new Error(pf);if(c)throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const T=e.slice(0,b.index),k=e.slice(mr.lastIndex);if(Rs(k,nh,wn.DEFAULT))throw new Error(pf);const U=+w-1;e=wb(T,k,U,!1,i,s,g),o=Ab(o,T,U,s.length,0,g);break}else if(D){Cb(x);let T=!1;for(const K of d)if(K.name===D||K.num===+D){if(T=!0,K.hasRecursedWithin)throw new Error(pf);break}if(!T)throw new Error(Cn`Recursive \g cannot be used outside the referenced group "${a==="external"?D:Cn`\g<${D}&R=${x}>`}"`);const k=f.get(D),U=lD(e,k);if(c&&Rs(U,Cn`${_u}|\((?!\?)`,wn.DEFAULT))throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const z=e.slice(k,b.index),R=U.slice(z.length+v.length),F=s.length,le=+x-1,V=wb(z,R,le,!0,i,s,g);o=Ab(o,z,le,s.length-F,F,g);const se=e.slice(0,k),Z=e.slice(k+U.length);e=`${se}${V}${Z}`,mr.lastIndex+=V.length-v.length-z.length-R.length,d.forEach(K=>K.hasRecursedWithin=!0),h=!0}else if(S)g++,f.set(String(g),mr.lastIndex),f.set(S,mr.lastIndex),d.push({num:g,name:S});else if(v[0]==="("){const T=v==="(";T&&(g++,f.set(String(g),mr.lastIndex)),d.push(T?{num:g}:{})}else v===")"&&d.pop()}return i.push(...s),{pattern:e,captureTransfers:o,hiddenCaptures:i}}function Cb(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 wb(e,t,i,a,o,s,c){const f=new Set;a&&J1(e+t,_u,({groups:{captureName:h}})=>{f.add(h)},wn.DEFAULT);const d=[i,a?f:null,o,s,c];return`${e}${kb(`(?:${e}`,"forward",...d)}(?:)${kb(`${t})`,"backward",...d)}${t}`}function kb(e,t,i,a,o,s,c){const d=y=>t==="forward"?y+2:i-y+2-1;let h="";for(let y=0;y<i;y++){const g=d(y);h+=$h(e,Cn`${t_}|\\k<(?<backref>[^>]+)>`,({0:b,groups:{captureName:v,unnamed:S,backref:w}})=>{if(w&&a&&!a.has(w))return b;const D=`_$${g}`;if(S||v){const x=c+s.length+1;return s.push(x),dD(o,x),S?b:`(?<${v}${D}>`}return Cn`\k<${w}${D}>`},wn.DEFAULT)}return h}function dD(e,t){for(let i=0;i<e.length;i++)e[i]>=t&&e[i]++}function Ab(e,t,i,a,o,s){if(e.size&&a){let c=0;J1(t,t_,()=>c++,wn.DEFAULT);const f=s-c+o,d=new Map;return e.forEach((h,y)=>{const g=(a-c*i)/i,b=c*i,v=y>f+c?y+a:y,S=[];for(const w of h)if(w<=f)S.push(w);else if(w>f+c+g)S.push(w+a);else if(w<=f+c)for(let D=0;D<=i;D++)S.push(w+c*D);else for(let D=0;D<=i;D++)S.push(w+b+g*D);d.set(v,S)}),d}return e}var St=String.fromCodePoint,we=String.raw,In={},Su=globalThis.RegExp;In.flagGroups=(()=>{try{new Su("(?i:)")}catch{return!1}return!0})();In.unicodeSets=(()=>{try{new Su("[[]]","v")}catch{return!1}return!0})();In.bugFlagVLiteralHyphenIsRange=In.unicodeSets?(()=>{try{new Su(we`[\d\-a]`,"v")}catch{return!0}return!1})():!1;In.bugNestedClassIgnoresNegation=In.unicodeSets&&new Su("[[^a]]","v").test("a");function lu(e,{enable:t,disable:i}){return{dotAll:!i?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!i?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function eo(e,t,i){return e.has(t)||e.set(t,i),e.get(t)}function ih(e,t){return Tb[e]>=Tb[t]}function fD(e,t){if(e==null)throw new Error(t??"Value expected");return e}var Tb={ES2025:2025,ES2024:2024,ES2018:2018},hD={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function n_(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!hD[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=In.flagGroups?"ES2025":In.unicodeSets?"ES2024":"ES2018"),t}var pD="[ -\r ]",mD=new Set([St(304),St(305)]),mi=we`[\p{L}\p{M}\p{N}\p{Pc}]`;function i_(e){if(mD.has(e))return[e];const t=new Set,i=e.toLowerCase(),a=i.toUpperCase(),o=bD.get(i),s=gD.get(i),c=yD.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 Fh=new Map(`C Other
82
+ Cc Control cntrl
83
+ Cf Format
84
+ Cn Unassigned
85
+ Co Private_Use
86
+ Cs Surrogate
87
+ L Letter
88
+ LC Cased_Letter
89
+ Ll Lowercase_Letter
90
+ Lm Modifier_Letter
91
+ Lo Other_Letter
92
+ Lt Titlecase_Letter
93
+ Lu Uppercase_Letter
94
+ M Mark Combining_Mark
95
+ Mc Spacing_Mark
96
+ Me Enclosing_Mark
97
+ Mn Nonspacing_Mark
98
+ N Number
99
+ Nd Decimal_Number digit
100
+ Nl Letter_Number
101
+ No Other_Number
102
+ P Punctuation punct
103
+ Pc Connector_Punctuation
104
+ Pd Dash_Punctuation
105
+ Pe Close_Punctuation
106
+ Pf Final_Punctuation
107
+ Pi Initial_Punctuation
108
+ Po Other_Punctuation
109
+ Ps Open_Punctuation
110
+ S Symbol
111
+ Sc Currency_Symbol
112
+ Sk Modifier_Symbol
113
+ Sm Math_Symbol
114
+ So Other_Symbol
115
+ Z Separator
116
+ Zl Line_Separator
117
+ Zp Paragraph_Separator
118
+ Zs Space_Separator
119
+ ASCII
120
+ ASCII_Hex_Digit AHex
121
+ Alphabetic Alpha
122
+ Any
123
+ Assigned
124
+ Bidi_Control Bidi_C
125
+ Bidi_Mirrored Bidi_M
126
+ Case_Ignorable CI
127
+ Cased
128
+ Changes_When_Casefolded CWCF
129
+ Changes_When_Casemapped CWCM
130
+ Changes_When_Lowercased CWL
131
+ Changes_When_NFKC_Casefolded CWKCF
132
+ Changes_When_Titlecased CWT
133
+ Changes_When_Uppercased CWU
134
+ Dash
135
+ Default_Ignorable_Code_Point DI
136
+ Deprecated Dep
137
+ Diacritic Dia
138
+ Emoji
139
+ Emoji_Component EComp
140
+ Emoji_Modifier EMod
141
+ Emoji_Modifier_Base EBase
142
+ Emoji_Presentation EPres
143
+ Extended_Pictographic ExtPict
144
+ Extender Ext
145
+ Grapheme_Base Gr_Base
146
+ Grapheme_Extend Gr_Ext
147
+ Hex_Digit Hex
148
+ IDS_Binary_Operator IDSB
149
+ IDS_Trinary_Operator IDST
150
+ ID_Continue IDC
151
+ ID_Start IDS
152
+ Ideographic Ideo
153
+ Join_Control Join_C
154
+ Logical_Order_Exception LOE
155
+ Lowercase Lower
156
+ Math
157
+ Noncharacter_Code_Point NChar
158
+ Pattern_Syntax Pat_Syn
159
+ Pattern_White_Space Pat_WS
160
+ Quotation_Mark QMark
161
+ Radical
162
+ Regional_Indicator RI
163
+ Sentence_Terminal STerm
164
+ Soft_Dotted SD
165
+ Terminal_Punctuation Term
166
+ Unified_Ideograph UIdeo
167
+ Uppercase Upper
168
+ Variation_Selector VS
169
+ White_Space space
170
+ XID_Continue XIDC
171
+ XID_Start XIDS`.split(/\s/).map(e=>[vu(e),e])),gD=new Map([["s",St(383)],[St(383),"s"]]),yD=new Map([[St(223),St(7838)],[St(107),St(8490)],[St(229),St(8491)],[St(969),St(8486)]]),bD=new Map([Yi(453),Yi(456),Yi(459),Yi(498),...mf(8072,8079),...mf(8088,8095),...mf(8104,8111),Yi(8124),Yi(8140),Yi(8188)]),vD=new Map([["alnum",we`[\p{Alpha}\p{Nd}]`],["alpha",we`\p{Alpha}`],["ascii",we`\p{ASCII}`],["blank",we`[\p{Zs}\t]`],["cntrl",we`\p{Cc}`],["digit",we`\p{Nd}`],["graph",we`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",we`\p{Lower}`],["print",we`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",we`[\p{P}\p{S}]`],["space",we`\p{space}`],["upper",we`\p{Upper}`],["word",we`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",we`\p{AHex}`]]);function _D(e,t){const i=[];for(let a=e;a<=t;a++)i.push(a);return i}function Yi(e){const t=St(e);return[t.toLowerCase(),t]}function mf(e,t){return _D(e,t).map(i=>Yi(i))}var r_=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function SD(e,t){const i={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};a_(e);const a={accuracy:i.accuracy,asciiWordBoundaries:i.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:ih(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};Yl(e,ED,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};Yl(e,xD,s);const c={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Yl(e,CD,c),e._originMap=s.groupOriginByCopy,e._strategy=a.strategy,e}var ED={AbsenceFunction({node:e,parent:t,replaceWith:i}){const{body:a,kind:o}=e;if(o==="repeater"){const s=Mn();s.body[0].body.push(yr({negate:!0,body:a}),Ea("Any"));const c=Mn();c.body[0].body.push(Z1("greedy",0,1/0,s)),i(st(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];eo(a,c,[]).push(...o)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const i=o_(t.get(e));if(i){const a=Mn({flags:i});a.body[0].body=e.body,e.body=[st(a,e)]}}}},Assertion({node:e,parent:t,key:i,container:a,root:o,remove:s,replaceWith:c},f){const{kind:d,negate:h}=e,{asciiWordBoundaries:y,avoidSubclass:g,supportedGNodes:b,wordIsAscii:v}=f;if(d==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${h?"Y":"y"}"`);if(d==="line_end")c(st(yr({body:[Er({body:[Jf("string_end")]}),Er({body:[bu(10)]})]}),t));else if(d==="line_start")c(st(gi(we`(?<=\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&&RD(S))c(st(yr({negate:!0}),t));else{if(g)throw new Error(we`Uses "\G" in a way that requires a subclass`);c(Xi(Jf("string_start"),t)),f.strategy="clip_search"}}else if(!(d==="string_end"||d==="string_start"))if(d==="string_end_newline")c(st(gi(we`(?=\n?\z)`),t));else if(d==="word_boundary"){if(!v&&!y){const S=`(?:(?<=${mi})(?!${mi})|(?<!${mi})(?=${mi}))`,w=`(?:(?<=${mi})(?=${mi})|(?<!${mi})(?!${mi}))`;c(st(gi(h?w:S),t))}}else throw new Error(`Unexpected assertion kind "${d}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:i}=e;typeof i=="string"&&!yf(i)&&(i=gf(i,t),e.ref=i)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:i}){let{name:a}=e;a&&!yf(a)&&(a=gf(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=Fs({body:[e]});i(st(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:h,value:y}=e;if(s&&(d==="digit"||y==="digit")){i(Xi(th("digit",{negate:h}),t));return}if(c&&(d==="space"||y==="space")){i(st(bf(gi(pD),h),t));return}if(f&&(d==="word"||y==="word")){i(Xi(th("word",{negate:h}),t));return}if(d==="any")i(Xi(Ea("Any"),t));else if(d==="digit")i(Xi(Ea("Nd",{negate:h}),t));else if(d!=="dot")if(d==="text_segment"){if(a==="strict")throw new Error(we`Use of "\X" requires non-strict accuracy`);const g="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",b=we`\p{RI}{2}|${g}(?:\u200D${g})*`;i(st(gi(we`(?>\r\n|${o?we`\p{RGI_Emoji}`:b}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(d==="hex")i(Xi(Ea("AHex",{negate:h}),t));else if(d==="newline")i(st(gi(h?`[^
172
+ ]`:`(?>\r
173
+ ?|[
174
+ \v\f…\u2028\u2029])`),t));else if(d==="posix")if(!o&&(y==="graph"||y==="print")){if(a==="strict")throw new Error(`POSIX class "${y}" requires min target ES2024 or non-strict accuracy`);let g={graph:"!-~",print:" -~"}[y];h&&(g=`\0-${St(g.codePointAt(0)-1)}${St(g.codePointAt(2)+1)}-􏿿`),i(st(gi(`[${g}]`),t))}else i(st(bf(gi(vD.get(y)),h),t));else if(d==="property")Fh.has(vu(y))||(e.key="sc");else if(d==="space")i(Xi(Ea("space",{negate:h}),t));else if(d==="word")i(st(bf(gi(mi),h),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 h=Mn({flags:d});h.body[0].body=c(),o(st(h,t),{traverse:!0})}else if(f==="keep"){const h=i.body[0],g=i.body.length===1&&Y1(h,{type:"Group"})&&h.body[0].body.length===1?h.body[0]:i;if(t.parent!==g||g.body.length>1)throw new Error(we`Uses "\K" in a way that's unsupported`);const b=yr({behind:!0});b.body[0].body=s(),o(st(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(st(yr({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${a.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Mn();t.body[0].body.push(e.body),e.body=st(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=u_(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(we`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:i}=e;typeof i=="string"&&!yf(i)&&(i=gf(i,t),e.ref=i)}},xD={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 h=o.get(e);if(h&&f.has(e.number)){const g=Xi(Lb(e.number),t);d.set(g,f.get(e.number)),i(g);return}f.set(e.number,e),c.set(e.number,[]),e.name&&eo(c,e.name,[]);const y=c.get(e.name??e.number);for(let g=0;g<y.length;g++){const b=y[g];if(h===b.node||h&&h===b.origin||e===b.origin){y.splice(g,1);break}}if(c.get(e.number).push({node:e,origin:h}),e.name&&c.get(e.name).push({node:e,origin:h}),e.name){const g=eo(s,e.name,new Map);let b=!1;if(h)b=!0;else for(const v of g.values())if(!v.hasDuplicateNameToRemove){b=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:b})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=lu(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 y=t;for(;(y=y.parent)&&!(y.type==="CapturingGroup"&&(y.name===s||y.number===s)););a.reffedNodesByReferencer.set(e,y);return}const c=a.subroutineRefMap.get(s),f=s===0,d=f?Lb(0):l_(c,a.groupOriginByCopy,null);let h=d;if(!f){const y=o_(AD(c,b=>b.type==="Group"&&!!b.flags)),g=y?lu(a.globalFlags,y):a.globalFlags;wD(g,a.currentFlags)||(h=Mn({flags:TD(g)}),h.body[0].body.push(d))}i(st(h,t),{traverse:!f})}},CD={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=>kD(c,e));if(!s.length)i(st(yr({negate:!0}),t));else if(s.length>1){const c=Mn({atomic:!0,body:s.reverse().map(f=>Er({body:[eh(f.number)]}))});i(st(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=Q1();e.body.at(-1).body.push(o)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function a_(e){Yl(e,{"*"({node:t,parent:i}){t.parent=i}})}function wD(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function kD(e,t){let i=t;do{if(i.type==="Regex")return!1;if(i.type==="Alternative")continue;if(i===e)return!1;const a=s_(i.parent);for(const o of a){if(o===i)break;if(o===e||c_(o,e))return!0}}while(i=i.parent);throw new Error("Unexpected path")}function l_(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]=l_(c,t,o,i):(s==="type"&&c==="CapturingGroup"&&t.set(o,t.get(e)??e),o[s]=c);return o}function Lb(e){const t=K1(e);return t.isRecursive=!0,t}function AD(e,t){const i=[];for(;e=e.parent;)(!t||t(e))&&i.push(e);return i}function gf(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 o_(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 TD({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 s_(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function u_(e){const t=e.find(i=>i.kind==="search_start"||DD(i,{negate:!1})||!LD(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=u_(a.body);if(!o)return null;Array.isArray(o)?i.push(...o):i.push(o)}return i}return null}function c_(e,t){const i=s_(e)??[];for(const a of i)if(a===t||c_(a,t))return!0;return!1}function LD({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function RD(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function DD(e,t){const i={negate:null,...t};return e.type==="LookaroundAssertion"&&(i.negate===null||e.negate===i.negate)&&e.body.length===1&&Y1(e.body[0],{type:"Assertion",kind:"search_start"})}function yf(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function gi(e,t){const a=X1(e,{...t,unicodePropertyMap:Fh}).body;return a.length>1||a[0].body.length>1?Mn({body:a}):a[0].body[0]}function bf(e,t){return e.negate=t,e}function Xi(e,t){return e.parent=t,e}function st(e,t){return a_(e),e.parent=t,e}function ND(e,t){const i=n_(t),a=ih(i.target,"ES2024"),o=ih(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];Yl(e,OD,{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 h=e;const y={accuracy:i.accuracy,appliedGlobalFlags:d,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:h,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!o&&c&&f),useFlagMods:o,useFlagV:a,verbose:i.verbose};function g(v){return y.lastNode=h,h=v,fD(MD[v.type],`Unexpected node type "${v.type}"`)(v,y,g)}const b={pattern:e.body.map(g).join("|"),flags:g(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=[],y.captureMap.forEach((v,S)=>{v.hidden&&b._hiddenCaptures.push(S),v.transferTo&&eo(b._captureTransfers,v.transferTo,[]).push(S)}),b}var OD={"*":{enter({node:e},t){if(Db(e)){const i=t.getCurrentModI();t.pushModI(e.flags?lu({ignoreCase:i},e.flags).ignoreCase:i)}},exit({node:e},t){Db(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){qh(St(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},i){t(),d_(e,{firstOnly:!0}).length&&i.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&r_.has(e.value)&&t.setHasCasedChar()}},MD={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?we`\B`:we`\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=St(e),a=ya(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(a!==i)return a;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&qh(i)){const o=i_(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");In.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&c.some(Nb)&&(c=[bu(45),...c.filter(h=>!Nb(h))]);const f=()=>`[${o?"^":""}${c.map(i).join(a==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||In.bugNestedClassIgnoresNegation)&&!o){const y=c.filter(g=>g.type==="CharacterClass"&&g.kind==="union"&&g.negate);if(y.length){const g=Mn(),b=g.body[0];return g.parent=s,b.parent=g,c=c.filter(v=>!y.includes(v)),e.body=c,c.length?(e.parent=b,b.body.push(e)):g.body.pop(),y.forEach(v=>{const S=Er({body:[v]});v.parent=S,S.parent=g,g.body.push(S)}),i(g)}}t.inCharClass=!0;const h=f();return t.inCharClass=!1,h}const d=c[0];if(a==="union"&&!o&&d&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(In.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=ya(i,o),c=ya(a,o),f=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const d=d_(e);PD(d).forEach(y=>{f.add(Array.isArray(y)?`${ya(y[0],o)}-${ya(y[1],o)}`:ya(y,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?".":"[^]":we`[^\n]`;if(e==="digit")return t?we`\D`:we`\d`;if(e==="property"){if(o.useAppliedIgnoreCase&&o.currentFlags.ignoreCase&&r_.has(i))throw new Error(`Unicode property "${i}" can't be case-insensitive when other chars have specific case`);return`${t?we`\P`:we`\p`}{${a?`${a}=`:""}${i}}`}if(e==="word")return t?we`\W`:we`\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=lu(c,i));const f=t.map(s).join("|"),d=!o.verbose&&t.length===1&&a.type!=="Quantifier"&&!e&&(!o.useFlagMods||!i)?f:`(?${BD(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)+jD(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})`:we`\g<${t}&R=${a}>`}},ID=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),zD=new Set(["-","\\","]","^","["]),HD=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),Rb=new Map([[9,we`\t`],[10,we`\n`],[11,we`\v`],[12,we`\f`],[13,we`\r`],[8232,we`\u2028`],[8233,we`\u2029`],[65279,we`\uFEFF`]]),UD=new RegExp("^\\p{Cased}$","u");function qh(e){return UD.test(e)}function d_(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=St(c);if(!qh(f))continue;const d=i_(f).filter(h=>{const y=h.codePointAt(0);return y<a||y>o});if(d.length&&(s.push(...d),i))break}return s}function ya(e,{escDigit:t,inCharClass:i,useFlagV:a}){if(Rb.has(e))return Rb.get(e);if(e<32||e>126&&e<160||e>262143||t&&VD(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const o=i?a?HD:zD:ID,s=St(e);return(o.has(s)?"\\":"")+s}function PD(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 BD(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 jD({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 Db({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function VD(e){return e>47&&e<58}function Nb({type:e,value:t}){return e==="Character"&&t===45}var GD=class rh 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 rh&&(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=FD(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 rh(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&&($D(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 h=s[d];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(i[h]=a[c],this.hasIndices&&(i.indices[h]=o[c]),i.groups){this.#n||(this.#n=qD(this.source));const y=this.#n.get(d);y&&(i.groups[y]=a[c],this.hasIndices&&(i.indices.groups[y]=o[c]))}}}return i}};function $D(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 FD(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)eo(i,s,{}).transferTo=a;return i}function qD(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 YD(e,t){const i=XD(e,t);return i.options?new GD(i.pattern,i.flags,i.options):new RegExp(i.pattern,i.flags)}function XD(e,t){const i=n_(t),a=X1(e,{flags:i.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:i.rules.captureGroup,singleline:i.rules.singleline},skipBackrefValidation:i.rules.allowOrphanBackrefs,unicodePropertyMap:Fh}),o=SD(a,{accuracy:i.accuracy,asciiWordBoundaries:i.rules.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,bestEffortTarget:i.target}),s=ND(o,i),c=cD(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),f=sD(c.pattern),d=oD(f.pattern,{captureTransfers:c.captureTransfers,hiddenCaptures:c.hiddenCaptures}),h={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 y=d.hiddenCaptures.sort((S,w)=>S-w),g=Array.from(d.captureTransfers),b=o._strategy,v=h.pattern.length>=i.lazyCompileLength;(y.length||g.length||b||v)&&(h.options={...y.length&&{hiddenCaptures:y},...g.length&&{transfers:g},...b&&{strategy:b},...v&&{lazyCompile:v}})}return h}const Ob=4294967295;class QD{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,h=0){return{index:f,captureIndices:d.indices.map(y=>y==null?{start:Ob,end:Ob,length:0}:{start:y[0]+h,end:y[1]+h,length:y[1]-y[0]})}}for(let f=0;f<this.regexps.length;f++){const d=this.regexps[f];if(d)try{d.lastIndex=i;const h=d.exec(o);if(!h)continue;if(h.index===i)return c(f,h,0);s.push([f,h,0])}catch(h){if(this.options.forgiving)continue;throw h}}if(s.length){const f=Math.min(...s.map(d=>d[1].index));for(const[d,h,y]of s)if(h.index===f)return c(d,h,y)}return null}}function ZD(e,t){return YD(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function KD(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=i=>ZD(i,{target:t.target}),{createScanner(i){return new QD(i,t)},createString(i){return{content:i}}}}const Mb=new Map;function WD({className:e,children:t}){const[i,a]=ne.useState(null),o=e?.match(/language-([^\s]+)/)?.[1]??"text",s=String(t??"").replace(/\n$/,"");return ne.useEffect(()=>{let c=!1;return a(null),JD(s,o).then(f=>{c||a(f)}),()=>{c=!0}},[s,o]),i===null?I.jsx("pre",{children:I.jsx("code",{children:t})}):I.jsx("div",{dangerouslySetInnerHTML:{__html:i}})}async function JD(e,t){const i=`${t}\0${e}`,a=Mb.get(i);if(a)return a;const o=eN(e,t).catch(()=>null);return Mb.set(i,o),o}async function eN(e,t){try{return await hb(e,{lang:t,theme:"github-dark-default"})}catch{return hb(e,{lang:"text",theme:"github-dark-default"})}}function Yh({content:e,className:t,variant:i}){const a=["markdown-content",i?`markdown-content-${i}`:null,t].filter(Boolean).join(" ");return I.jsx("div",{className:a,children:I.jsx(oT,{components:{pre({children:o}){if(ne.isValidElement(o)){const{className:s,children:c}=o.props;return I.jsx(WD,{className:s,children:c})}return I.jsx("pre",{children:o})}},children:e})})}function tN({open:e,content:t,loading:i,onClose:a}){return I.jsx(Sv,{open:e,title:"brief",ariaLabel:"Reviewer brief",closeLabel:"close brief",bodyClassName:"brief-dialog-body-wrap",onClose:a,children:i&&!t?I.jsx("div",{className:"brief-dialog-empty",children:"Generating brief…"}):I.jsx(Yh,{content:t,className:"brief-dialog-body",variant:"brief"})})}function Eu({checked:e,label:t,onChange:i,className:a}){return I.jsxs("label",{className:`checkbox-btn${a?` ${a}`:""}`,children:[I.jsx("input",{type:"checkbox",className:"checkbox-input",checked:e,onChange:o=>i(o.target.checked)}),I.jsx("span",{className:"checkbox-box","aria-hidden":"true",children:e&&I.jsx(Rx,{size:10,strokeWidth:3})}),I.jsx("span",{children:t})]})}function nN({open:e,thread:t,body:i,skipAgentResponse:a,onBodyChange:o,onSkipAgentResponseChange:s,onSubmit:c,onClose:f,onToggleResolved:d}){const h=ne.useRef(null),y=ne.useRef(null),g=t?"conversation":"new conversation",b=t?.resolved?"reopen":"resolve",v=t?"comment":"start thread",S=i.trim().length>0,w=ne.useMemo(()=>t?.messages??[],[t]);ne.useEffect(()=>{e&&h.current?.focus()},[e,t?.id]),ne.useLayoutEffect(()=>{if(!e)return;const x=y.current;x&&(x.scrollTop=x.scrollHeight)},[w.length,e,t?.id,t?.loading]);const D=x=>{x.key==="Enter"&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),S&&c()),x.key==="Escape"&&(x.preventDefault(),f())};return I.jsx(Sv,{open:e,title:g,ariaLabel:g,closeLabel:"close conversation",bodyClassName:"detached-thread-dialog-body-wrap",onClose:f,children:I.jsxs("div",{className:"detached-thread-dialog-layout",children:[I.jsxs("div",{ref:y,className:"detached-thread-dialog-messages",children:[w.map((x,T)=>I.jsxs("div",{className:`detached-thread-dialog-message detached-thread-dialog-message-${x.role}`,children:[I.jsx("span",{className:"detached-thread-dialog-role",children:x.role==="user"?"you":"agent"}),I.jsx(Yh,{content:x.text,className:"detached-thread-dialog-text",variant:"thread"})]},`${x.role}:${T}:${x.text}`)),t?.loading&&I.jsxs("div",{className:"detached-thread-dialog-message detached-thread-dialog-message-assistant",children:[I.jsx("span",{className:"detached-thread-dialog-role",children:"agent"}),I.jsx("span",{className:"detached-thread-dialog-thinking",children:"thinking…"})]})]}),I.jsxs("div",{className:"detached-thread-dialog-composer",style:{borderTop:w.length===0?"none":void 0},children:[I.jsx("textarea",{ref:h,className:"text-input-area detached-thread-dialog-input",value:i,onChange:x=>o(x.target.value),onKeyDown:D,placeholder:t?"Reply…":"Start a conversation…",rows:3}),I.jsxs("div",{className:"detached-thread-dialog-actions",children:[I.jsx(Eu,{checked:a,label:"skip agent reply",onChange:s}),t&&I.jsx("button",{type:"button",className:"btn detached-thread-dialog-secondary",onClick:()=>d(!t.resolved),children:b}),I.jsx("button",{type:"button",className:"btn primary",disabled:!S,onClick:c,children:v})]})]})]})})}const iN={position:"absolute",top:0,bottom:0,textAlign:"center",whiteSpace:"normal",touchAction:"none"},rN={display:"contents"};function Ib(){return null}const ou="diffs-container";(()=>{try{return!1}catch{return!1}})();const aN=/(?=^From [a-f0-9]+ .+$)/m,f_=/(?=^diff --git)/gm,zb=/(?=^---\s+\S)/gm,lN=/^(---|\+\+\+)\s+([^\t\r\n]+)/,oN=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,sN=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,uN=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Xh="header-prefix",Qh="header-metadata",Zh="header-custom",kn={dark:"pierre-dark",light:"pierre-light"},ah="data-theme-css",lh="data-unsafe-css",cN="data-diffs-scrollbar-measure",h_="--diffs-scrollbar-gutter-measured",sn=1,oh=1e5,dN={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},fN=Object.freeze({fromStart:0,fromEnd:0}),Hb={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},hN={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function to(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function pN({hunkIndex:e,lineIndex:t,conflictIndex:i}){return`merge-conflict-action-${e}-${t}-${i}`}function mN(e,t){const i=t.hunks[e.hunkIndex];if(i!=null)return{hunkIndex:e.hunkIndex,lineIndex:gN(i,e.startContentIndex)}}function gN(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 yN({fileDiff:e,actions:t,renderCustomHeader:i,renderHeaderPrefix:a,renderHeaderMetadata:o,renderAnnotation:s,renderGutterUtility:c,renderMergeConflictUtility:f,lineAnnotations:d,getHoveredLine:h,getInstance:y}){const g=i?.(e),b=a?.(e),v=o?.(e);return I.jsxs(I.Fragment,{children:[g!=null?I.jsx("div",{slot:Zh,children:g}):I.jsxs(I.Fragment,{children:[b!=null&&I.jsx("div",{slot:Xh,children:b}),v!=null&&I.jsx("div",{slot:Qh,children:v})]}),s!=null&&d?.map((S,w)=>I.jsx("div",{slot:to(S),children:s(S)},w)),t!=null&&f!=null&&y!=null&&t.map(S=>{if(S==null)return;const w=bN(S,e);return I.jsx("div",{slot:w,style:rN,children:f(S,y)},w)}),c!=null&&I.jsx("div",{slot:"gutter-utility-slot",style:iN,children:c(h)})]})}function bN(e,t){const i=mN(e,t);return i!=null?pN({hunkIndex:i.hunkIndex,lineIndex:i.lineIndex,conflictIndex:e.conflictIndex}):void 0}function vN(e){const t=ne.useRef(e);return ne.useInsertionEffect(()=>{t.current=e}),ne.useCallback((...i)=>t.current(...i),[])}function Kh(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}const _r=new Map,vf=new Map,sh=new Map,uh=new Set;function Ub(e,t){e=Array.isArray(e)?e:[e];for(let i of e){let a;if(typeof i=="string"){if(a=_r.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,_r.has(i)||_r.set(i,a);uh.has(i)||(uh.add(i),t.loadThemeSync(a))}}const no=new Map,_f=new Map,_N=new Map,ch=new Set;function Pb(e,t){e=Array.isArray(e)?e:[e];for(const i of e){if(ch.has(i.name))continue;let a=no.get(i.name);a==null&&(a=i,no.set(i.name,a)),ch.add(a.name),t.loadLanguageSync(a.data)}}function p_(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function SN(e){if(p_())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=_f.get(e);if(t!=null)return t;try{let i=_N.get(e);if(i==null&&Object.prototype.hasOwnProperty.call(Wf,e)&&(i=Wf[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 no.has(e)||no.set(e,s),s});return _f.set(e,a),await a}finally{_f.delete(e)}}function EN(e){return no.get(e)??SN(e)}async function xN(e){if(p_())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=vf.get(e);if(t!=null)return t;try{const i=sh.get(e)??U1[e];if(i==null)throw new Error(`resolveTheme: No valid loader for ${e}`);const a=i().then(s=>CN(e,"default"in s?s.default:s));vf.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 _r.set(o.name,o),o}finally{vf.delete(e)}}function CN(e,t){const i=_r.get(e);return i??(t=mu(t),_r.set(e,t),t)}function wN(e){return _r.get(e)??xN(e)}function xu(e,t){if(sh.has(e)){console.error("SharedHighlight.registerCustomTheme: theme name already registered",e);return}sh.set(e,t)}let qn;async function kN({themes:e,langs:t,preferredHighlighter:i="shiki-js"}){qn??=j1({themes:[],langs:["text"],engine:i==="shiki-wasm"?B1(C(()=>import("./wasm-CG6Dc4jp.js"),[])):KD()});const a=TN(qn)?await qn:qn;qn=a;const o=[];for(const c of t){if(c==="text"||c==="ansi")continue;const f=EN(c);"then"in f?o.push(f):Pb(f,a)}const s=[];for(const c of e){const f=wN(c);"then"in f?s.push(f):Ub(f,qn)}return(o.length>0||s.length>0)&&await Promise.all([Promise.all(o).then(c=>{Pb(c,a)}),Promise.all(s).then(c=>{Ub(c,a)})]),a}function AN(){if(qn!=null&&!("then"in qn))return qn}function TN(e=qn){return e!=null&&"then"in e}xu("pierre-dark",async()=>{const{default:e}=await C(async()=>{const{default:t}=await import("./pierre-dark-Dy3oF52j.js");return{default:t}},[]);return{...e,name:"pierre-dark"}});xu("pierre-dark-soft",async()=>{const{default:e}=await C(async()=>{const{default:t}=await import("./pierre-dark-soft-K7D5SChL.js");return{default:t}},[]);return{...e,name:"pierre-dark-soft"}});xu("pierre-light",async()=>{const{default:e}=await C(async()=>{const{default:t}=await import("./pierre-light-DhMpYZcV.js");return{default:t}},[]);return{...e,name:"pierre-light"}});xu("pierre-light-soft",async()=>{const{default:e}=await C(async()=>{const{default:t}=await import("./pierre-light-soft-cPlVRKcQ.js");return{default:t}},[]);return{...e,name:"pierre-light-soft"}});function m_(e=kn){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Bb(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}const ba=new Map,zl={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function Sr(e){if(ba.has(e))return ba.get(e)??"text";if(zl[e]!=null)return zl[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(ba.has(t[1]))return ba.get(t[1])??"text";if(zl[t[1]]!=null)return zl[t[1]]??"text"}const i=e.match(/\.([^.]+)$/)?.[1]??"";return ba.has(i)?ba.get(i)??"text":zl[i]??"text"}function Da(e){return e.replace(/\n$|\r\n$/,"")}function Xn(e){return{type:"text",value:e}}function Le({tagName:e,children:t=[],properties:i={}}){return{type:"element",tagName:e,properties:i,children:t}}function su({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 LN(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 Ds(e){return Le({tagName:"div",properties:{"data-gutter":""},children:e})}function RN(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:[Xn(`${t}`)]})]:void 0})}function Nn(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 DN(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(Xn(`
175
+ `)),e}const Ns=Symbol("no-token"),Sf=Symbol("multiple-tokens");function g_(e){const t=NN(e);if(t!=null)return t;let i=Ns;const a=[];let o=[],s;const c=()=>{if(o.length===0||s==null){o=[],s=void 0;return}if(o.length===1){const d=o[0];if(d?.type==="element"){ON(d,s);for(const h of d.children)qs(h)}else qs(d);a.push(d),o=[],s=void 0;return}for(const d of o)qs(d);a.push(Le({tagName:"span",properties:{"data-char":s},children:o})),o=[],s=void 0},f=d=>{if(d!==Ns){if(d===Sf){i=Sf;return}if(i===Ns){i=d;return}i!==d&&(i=Sf)}};for(const d of e.children){const h=d.type==="element"?g_(d):Ns;if(f(h),typeof h!="number"){c(),a.push(d);continue}s!=null&&s!==h&&c(),s??=h,o.push(d)}return c(),e.children=a,i}function NN(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function qs(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)qs(t)}}function ON(e,t){e.properties["data-char"]=t}function MN(e={}){const{classPrefix:t="__shiki_",classSuffix:i="",classReplacer:a=f=>f}=e,o=new Map;function s(f){return Object.entries(f).map(([d,h])=>`${d}:${h}`).join(";")}function c(f){const d=typeof f=="string"?f:s(f);let h=t+IN(d)+i;return h=a(h),o.has(h)||o.set(h,typeof f=="string"?f:{...f}),h}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 h of d){if(!h.htmlStyle)continue;const y=c(h.htmlStyle);h.htmlStyle={},h.htmlAttrs||={},h.htmlAttrs.class?h.htmlAttrs.class+=` ${y}`:h.htmlAttrs.class=y}},getClassRegistry(){return o},getCSS(){let f="";for(const[d,h]of o.entries())f+=`.${d}{${typeof h=="string"?h:s(h)}}`;return f},clearRegistry(){o.clear()}}}function IN(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 zN(e=!1,t=!1){const i={lineInfo:[]},a=[{line(o){return delete o.properties.class,o},pre(o){const s=LN(o),c=[];if(s!=null){let f=1;for(const d of s.children)d.type==="element"&&(e&&g_(d),c.push(DN(d,f,i)),f++);s.children=c}return o},...e?{tokens(o){for(const s of o){let c=0;for(const f of s){const d=f;d.__lineChar??=c,c+=f.content.length}}},preprocess(o,s){s.mergeWhitespaces="never"},span(o,s,c,f,d){if(d?.offset!=null&&d.content!=null){const h=d.__lineChar;return h!=null&&(o.properties["data-char"]=h),o}return o}}:null}];return t&&a.push(HN,jb),{state:i,transformers:a,toClass:jb}}const jb=MN({classPrefix:"hl-"}),HN={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 On(e){return`--${e==="token"?"diffs-token":"diffs"}-`}function UN({theme:e=kn,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+=`${On("global")}fg:${o.fg};`,a+=`${On("global")}bg:${o.bg};`,a+=Ef(o,i)}else{let o=t.getTheme(e.dark);a+=`${On("global")}dark:${o.fg};`,a+=`${On("global")}dark-bg:${o.bg};`,a+=Ef(o,"dark"),o=t.getTheme(e.light),a+=`${On("global")}light:${o.fg};`,a+=`${On("global")}light-bg:${o.bg};`,a+=Ef(o,"light")}return a}function Ef(e,t){t=t!=null?`${t}-`:"";let i="";const a=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];a!=null&&(i+=`${On("global")}${t}addition-color:${a};`);const o=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];o!=null&&(i+=`${On("global")}${t}deletion-color:${o};`);const s=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return s!=null&&(i+=`${On("global")}${t}modified-color:${s};`),i}function Vb(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 Pl(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}function Hl(e,t){return Kh(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function dh(e){const t=e.lang??Sr(e.name),i=e.lang??(e.prevName!=null?Sr(e.prevName):"text");return t==="text"&&i==="text"}function xf(e){return{...dN,...e}}function xa(e,t){const i=PN(e,t);return t?i:e.diffHeaderHeight+i}function PN(e,t){return e.paddingTop??(t?e.spacing:0)}function y_(e){return e.paddingBottom??e.spacing}function BN(e){switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}function Qn({isPartial:e,rangeSize:t,expandedHunks:i,hunkIndex:a,collapsedContextThreshold:o}){const s=Math.max(t,0);if(s===0||e)return{fromStart:0,fromEnd:0,rangeSize:s,collapsedLines:s,renderAll:!1};if(i===!0||s<=o)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};const c=i?.get(a),f=Math.min(Math.max(c?.fromStart??0,0),s),d=Math.min(Math.max(c?.fromEnd??0,0),s),h=f+d,y=h>=s;return{fromStart:y?s:f,fromEnd:y?0:d,rangeSize:s,collapsedLines:Math.max(s-h,0),renderAll:y}}function b_({type:e,metrics:t}){return t.hunkSeparatorHeight??BN(e)}function v_({type:e,metrics:t}){return e==="simple"||e==="metadata"||e==="line-info-basic"?0:t.spacing}function jN({type:e,hunkIndex:t,hunkSpecs:i}){switch(e){case"simple":return t>0;case"metadata":return i!=null;case"line-info":case"line-info-basic":case"custom":return!0}}function VN(e){return e!=="simple"&&e!=="metadata"}function Bl({type:e,metrics:t,hunkIndex:i,hunkSpecs:a}){if(!jN({type:e,hunkIndex:i,hunkSpecs:a}))return;const o=b_({type:e,metrics:t}),s=v_({type:e,metrics:t}),c=i>0?s:0,f=s;return{height:o,gapBefore:c,gapAfter:f,totalHeight:c+o+f}}function jl({type:e,metrics:t}){if(!VN(e))return;const i=b_({type:e,metrics:t}),a=v_({type:e,metrics:t});return{height:i,gapBefore:a,gapAfter:0,totalHeight:a+i}}function Xl({diff:e,diffStyle:t,startingLine:i=0,totalLines:a=1/0,expandedHunks:o,collapsedContextThreshold:s=sn,callback:c}){const f=GN({diff:e,diffStyle:t,startingLine:i,expandedHunks:o,collapsedContextThreshold:s}),d={finalHunk:e.hunks.at(-1),viewportStart:i,viewportEnd:i+a,isWindowedHighlight:i>0||a<1/0,splitCount:f.splitCount,unifiedCount:f.unifiedCount,shouldBreak(){if(!d.isWindowedHighlight)return!1;const g=d.unifiedCount>=i+a,b=d.splitCount>=i+a;return t==="unified"?g:(t==="split"||g)&&b},shouldSkip(g,b){if(!d.isWindowedHighlight)return!1;const v=d.unifiedCount+g<i,S=d.splitCount+b<i;return t==="unified"?v:(t==="split"||v)&&S},incrementCounts(g,b){(t==="unified"||t==="both")&&(d.unifiedCount+=g),(t==="split"||t==="both")&&(d.splitCount+=b)},isInWindow(g,b){if(!d.isWindowedHighlight)return!0;const v=d.isInUnifiedWindow(g),S=d.isInSplitWindow(b);return t==="unified"?v:t==="split"?S:v||S},isInUnifiedWindow(g){return!d.isWindowedHighlight||d.unifiedCount>=i-g&&d.unifiedCount<i+a},isInSplitWindow(g){return!d.isWindowedHighlight||d.splitCount>=i-g&&d.splitCount<i+a},emit(g,b=!1){return b||(t==="unified"?d.incrementCounts(1,0):t==="split"?d.incrementCounts(0,1):d.incrementCounts(1,1)),c(g)??!1}};e:for(let g=f.hunkIndex;g<e.hunks.length;g++){let D=function(V,se){return S==null||S.collapsedLines<=0||S.fromStart+S.fromEnd>0?0:t==="unified"?V===b.unifiedLineStart+b.unifiedLineCount-1?S.collapsedLines:0:se===b.splitLineStart+b.splitLineCount-1?S.collapsedLines:0},x=function(){if(v.collapsedLines===0)return 0;const V=v.collapsedLines;return v.collapsedLines=0,V};var h=D,y=x;const b=e.hunks[g];if(b==null)throw new Error("iterateOverDiff: invalid hunk index");if(d.shouldBreak())break;const v=Qn({isPartial:e.isPartial,rangeSize:b.collapsedBefore,expandedHunks:o,hunkIndex:g,collapsedContextThreshold:s}),S=(()=>{if(b!==d.finalHunk||!__(e))return;const V=e.additionLines.length-(b.additionLineIndex+b.additionCount),se=e.deletionLines.length-(b.deletionLineIndex+b.deletionCount);if(V!==se)throw new Error(`iterateOverDiff: trailing context mismatch (additions=${V}, deletions=${se}) for ${e.name}`);const Z=Math.min(V,se);return Qn({isPartial:e.isPartial,rangeSize:Z,expandedHunks:o,hunkIndex:e.hunks.length,collapsedContextThreshold:s})})(),w=v.fromStart+v.fromEnd;if(d.shouldSkip(w,w))d.incrementCounts(w,w),x();else{let V=b.unifiedLineStart-v.rangeSize,se=b.splitLineStart-v.rangeSize,Z=b.deletionLineIndex-v.rangeSize,K=b.additionLineIndex-v.rangeSize,W=b.deletionStart-v.rangeSize,ie=b.additionStart-v.rangeSize;const[q,H]=Os(d,v.fromStart,t);q>0&&d.incrementCounts(q,q);let G=q;for(;G<v.fromStart;){if(G>=H){d.incrementCounts(v.fromStart-G,v.fromStart-G);break}if(d.isInWindow(0,0)){if(d.emit({hunkIndex:g,hunk:b,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:W+G,lineIndex:Z+G,noEOFCR:!1,unifiedLineIndex:V+G,splitLineIndex:se+G},additionLine:{unifiedLineIndex:V+G,splitLineIndex:se+G,lineIndex:K+G,lineNumber:ie+G,noEOFCR:!1}}))break e}else d.incrementCounts(1,1);G++}V=b.unifiedLineStart-v.fromEnd,se=b.splitLineStart-v.fromEnd,Z=b.deletionLineIndex-v.fromEnd,K=b.additionLineIndex-v.fromEnd,W=b.deletionStart-v.fromEnd,ie=b.additionStart-v.fromEnd;const[ae,fe]=Os(d,v.fromEnd,t);for(ae>0&&d.incrementCounts(ae,ae),G=ae;G<v.fromEnd;){if(G>=fe){d.incrementCounts(v.fromEnd-G,v.fromEnd-G);break}if(d.isInWindow(0,0)){if(d.emit({hunkIndex:g,hunk:b,collapsedBefore:x(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:W+G,lineIndex:Z+G,noEOFCR:!1,unifiedLineIndex:V+G,splitLineIndex:se+G},additionLine:{unifiedLineIndex:V+G,splitLineIndex:se+G,lineIndex:K+G,lineNumber:ie+G,noEOFCR:!1}}))break e}else d.incrementCounts(1,1);G++}}let T=b.unifiedLineStart,k=b.splitLineStart,U=b.deletionLineIndex,z=b.additionLineIndex,R=b.deletionStart,F=b.additionStart;const le=b.hunkContent.at(-1);for(const V of b.hunkContent){if(d.shouldBreak())break e;const se=V===le;if(V.type==="context"){if(d.shouldSkip(V.lines,V.lines))d.incrementCounts(V.lines,V.lines),x();else{const[Z,K]=Os(d,V.lines,t);Z>0&&d.incrementCounts(Z,Z);let W=Z;for(;W<V.lines;){if(W>=K){d.incrementCounts(V.lines-W,V.lines-W);break}if(d.isInWindow(0,0)){const ie=se&&W===V.lines-1,q=T+W,H=k+W;if(d.emit({hunkIndex:g,hunk:b,collapsedBefore:x(),collapsedAfter:D(q,H),type:"context",deletionLine:{lineNumber:R+W,lineIndex:U+W,noEOFCR:ie&&b.noEOFCRDeletions,unifiedLineIndex:q,splitLineIndex:H},additionLine:{unifiedLineIndex:q,splitLineIndex:H,lineIndex:z+W,lineNumber:F+W,noEOFCR:ie&&b.noEOFCRAdditions}}))break e}else d.incrementCounts(1,1);W++}}T+=V.lines,k+=V.lines,U+=V.lines,z+=V.lines,R+=V.lines,F+=V.lines}else{const Z=Math.max(V.deletions,V.additions),K=V.deletions+V.additions;if(!d.shouldSkip(K,Z)){const W=qN(d,V,t);for(const[ie,q]of W)for(let H=ie;H<q;H++){const G=D(T+H,t==="unified"?k+(H<V.deletions?H:H-V.deletions):k+H);if(d.emit(YN({hunkIndex:g,hunk:b,collapsedBefore:x(),collapsedAfter:G,diffStyle:t,index:H,unifiedLineIndex:T,splitLineIndex:k,additionLineIndex:z,deletionLineIndex:U,additionLineNumber:F,deletionLineNumber:R,content:V,isLastContent:se,unifiedCount:K,splitCount:Z}),!0))break e}}x(),d.incrementCounts(K,Z),T+=K,k+=Z,U+=V.deletions,z+=V.additions,R+=V.deletions,F+=V.additions}}if(S!=null){const{collapsedLines:V,fromStart:se,fromEnd:Z}=S,K=se+Z,[W,ie]=Os(d,K,t);W>0&&d.incrementCounts(W,W);let q=W;for(;q<K;){if(d.shouldBreak())break e;if(q>=ie){d.incrementCounts(K-q,K-q);break}if(d.isInWindow(0,0)){const H=q===K-1;if(d.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:H?V:0,type:"context-expanded",deletionLine:{lineNumber:R+q,lineIndex:U+q,noEOFCR:!1,unifiedLineIndex:T+q,splitLineIndex:k+q},additionLine:{unifiedLineIndex:T+q,splitLineIndex:k+q,lineIndex:z+q,lineNumber:F+q,noEOFCR:!1}}))break e}else d.incrementCounts(1,1);q++}}}}function GN({diff:e,diffStyle:t,startingLine:i,expandedHunks:a,collapsedContextThreshold:o}){if(i<=0||t==="both")return{hunkIndex:0,splitCount:0,unifiedCount:0};const s=$N({diff:e,expandedHunks:a,collapsedContextThreshold:o});let c=0,f=e.hunks.length-1,d=e.hunks.length;for(;c<=f;){const y=c+f>>1,g=s[y+1];if(g==null)throw new Error("iterateOverDiff: invalid hunk prefix index");(t==="unified"?g.unifiedCount:g.splitCount)>i?(d=y,f=y-1):c=y+1}if(d>=e.hunks.length){const y=s[e.hunks.length];if(y==null)throw new Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:e.hunks.length,splitCount:y.splitCount,unifiedCount:y.unifiedCount}}const h=s[d];if(h==null)throw new Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:d,splitCount:h.splitCount,unifiedCount:h.unifiedCount}}function $N({diff:e,expandedHunks:t,collapsedContextThreshold:i}){let a=0,o=0;const s=e.hunks.length-1,c=[{splitCount:0,unifiedCount:0}];for(let f=0;f<e.hunks.length;f++){const d=e.hunks[f];if(d==null)throw new Error("iterateOverDiff: invalid hunk summary index");const h=Qn({isPartial:e.isPartial,rangeSize:d.collapsedBefore,expandedHunks:t,hunkIndex:f,collapsedContextThreshold:i}),y=h.fromStart+h.fromEnd;if(a+=y+d.splitLineCount,o+=y+d.unifiedLineCount,f===s&&__(e)){const g=FN(e,d),b=Qn({isPartial:e.isPartial,rangeSize:g,expandedHunks:t,hunkIndex:e.hunks.length,collapsedContextThreshold:i}),v=b.fromStart+b.fromEnd;a+=v,o+=v}c.push({splitCount:a,unifiedCount:o})}return c}function Os(e,t,i){if(!e.isWindowedHighlight||t<=0)return[0,t];const a=[];function o(f){const d=Math.max(0,e.viewportStart-f),h=Math.min(t,e.viewportEnd-f);h>d&&a.push([d,h])}if(i!=="split"&&o(e.unifiedCount),i!=="unified"&&o(e.splitCount),a.length===0)return[0,0];let s=a[0][0],c=a[0][1];for(let f=1;f<a.length;f++){const d=a[f];s=Math.min(s,d[0]),c=Math.max(c,d[1])}return[s,c]}function FN(e,t){const i=e.additionLines.length-(t.additionLineIndex+t.additionCount),a=e.deletionLines.length-(t.deletionLineIndex+t.deletionCount);if(i!==a)throw new Error(`iterateOverDiff: trailing context mismatch (additions=${i}, deletions=${a}) for ${e.name}`);return Math.min(i,a)}function __(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 qN(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(g,b){if(g+b<=e.viewportStart||g>=e.viewportEnd)return;const v=Math.max(0,e.viewportStart-g),S=Math.min(b,e.viewportEnd-g);return S>v?[v,S]:void 0}function d(g,b){return s==="split"?g:b==="additions"?[g[0]+t.deletions,g[1]+t.deletions]:g}function h(g,b){if(g==null)return;const[v,S]=d(g,b);S>v&&c.push([v,S])}if(a&&(h(f(e.unifiedCount,t.deletions),"deletions"),h(f(e.unifiedCount+t.deletions,t.additions),"additions")),o&&(h(f(e.splitCount,t.deletions),"deletions"),h(f(e.splitCount,t.additions),"additions")),c.length===0)return c;c.sort((g,b)=>g[0]-b[0]);const y=[c[0]];for(const[g,b]of c.slice(1)){const v=y[y.length-1];g<=v[1]?v[1]=Math.max(v[1],b):y.push([g,b])}return y}function YN({hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,diffStyle:o,index:s,unifiedLineIndex:c,splitLineIndex:f,additionLineIndex:d,deletionLineIndex:h,additionLineNumber:y,deletionLineNumber:g,content:b,isLastContent:v,unifiedCount:S,splitCount:w}){const D=s<b.deletions?c+s:void 0,x=o==="unified"?s>=b.deletions?c+s:void 0:s<b.additions?c+b.deletions+s:void 0,T=o==="unified"?f+(s<b.deletions?s:s-b.deletions):f+s,k=s<b.deletions?h+s:void 0,U=s<b.deletions?g+s:void 0,z=o==="unified"?s>=b.deletions?d+(s-b.deletions):void 0:s<b.additions?d+s:void 0,R=o==="unified"?s>=b.deletions?y+(s-b.deletions):void 0:s<b.additions?y+s:void 0,F=o==="unified"?v&&s===b.deletions-1&&t.noEOFCRDeletions:v&&s===w-1&&t.noEOFCRDeletions,le=o==="unified"?v&&s===S-1&&t.noEOFCRAdditions:v&&s===w-1&&t.noEOFCRAdditions,V=k!=null&&U!=null&&D!=null?{lineNumber:U,lineIndex:k,noEOFCR:F,unifiedLineIndex:D,splitLineIndex:T}:void 0,se=z!=null&&R!=null&&x!=null?{unifiedLineIndex:x,splitLineIndex:T,lineIndex:z,lineNumber:R,noEOFCR:le}:void 0;if(V==null&&se!=null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:void 0,additionLine:se};if(V!=null&&se==null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:V,additionLine:void 0};if(V==null||se==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:a,deletionLine:V,additionLine:se}}class Wh{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=T=>{if(T=this.postProcess(T,a),o){setTimeout(function(){o(T)},0);return}else return T},f=i.length,d=t.length;let h=1,y=f+d;a.maxEditLength!=null&&(y=Math.min(y,a.maxEditLength));const g=(s=a.timeout)!==null&&s!==void 0?s:1/0,b=Date.now()+g,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 w=-1/0,D=1/0;const x=()=>{for(let T=Math.max(w,-h);T<=Math.min(D,h);T+=2){let k;const U=v[T-1],z=v[T+1];U&&(v[T-1]=void 0);let R=!1;if(z){const le=z.oldPos-T;R=z&&0<=le&&le<f}const F=U&&U.oldPos+1<d;if(!R&&!F){v[T]=void 0;continue}if(!F||R&&U.oldPos<z.oldPos?k=this.addToPath(z,!0,!1,0,a):k=this.addToPath(U,!1,!0,1,a),S=this.extractCommon(k,i,t,T,a),k.oldPos+1>=d&&S+1>=f)return c(this.buildValues(k.lastComponent,i,t))||!0;v[T]=k,k.oldPos+1>=d&&(D=Math.min(D,T-1)),S+1>=f&&(w=Math.max(w,T+1))}h++};if(o)(function T(){setTimeout(function(){if(h>y||Date.now()>b)return o(void 0);x()||T()},0)})();else for(;h<=y&&Date.now()<=b;){const T=x();if(T)return T}}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,h=d-o,y=0;for(;h+1<c&&d+1<f&&this.equals(a[d+1],i[h+1],s);)h++,d++,y++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return y&&!s.oneChangePerToken&&(t.lastComponent={count:y,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=d,h}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,h=0;for(;f<c;f++){const y=o[f];if(y.removed)y.value=this.join(a.slice(h,h+y.count)),h+=y.count;else{if(!y.added&&this.useLongestToken){let g=i.slice(d,d+y.count);g=g.map(function(b,v){const S=a[h+v];return S.length>b.length?S:b}),y.value=this.join(g)}else y.value=this.join(i.slice(d,d+y.count));d+=y.count,y.added||(h+=y.count)}}return o}}class XN extends Wh{}const QN=new XN;function ZN(e,t,i){return QN.diff(e,t,i)}const Gb="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 KN extends Wh{tokenize(t){const i=new RegExp(`(\\r?\\n)|[${Gb}]+|[^\\S\\n\\r]+|[^${Gb}]`,"ug");return t.match(i)||[]}}const WN=new KN;function JN(e,t,i){return WN.diff(e,t,i)}class eO extends Wh{constructor(){super(...arguments),this.tokenize=nO}equals(t,i,a){return a.ignoreWhitespace?((!a.newlineIsToken||!t.includes(`
176
+ `))&&(t=t.trim()),(!a.newlineIsToken||!i.includes(`
177
+ `))&&(i=i.trim())):a.ignoreNewlineAtEof&&!a.newlineIsToken&&(t.endsWith(`
178
+ `)&&(t=t.slice(0,-1)),i.endsWith(`
179
+ `)&&(i=i.slice(0,-1))),super.equals(t,i,a)}}const tO=new eO;function $b(e,t,i){return tO.diff(e,t,i)}function nO(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 iO={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function Fb(e,t,i,a,o,s,c){let f;c?typeof c=="function"?f={callback:c}:f=c: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:y}=f;$b(i,a,Object.assign(Object.assign({},f),{callback:g=>{const b=h(g);y(b)}}))}else return h($b(i,a,f));function h(y){if(!y)return;y.push({value:"",lines:[]});function g(T){return T.map(function(k){return" "+k})}const b=[];let v=0,S=0,w=[],D=1,x=1;for(let T=0;T<y.length;T++){const k=y[T],U=k.lines||aO(k.value);if(k.lines=U,k.added||k.removed){if(!v){const z=y[T-1];v=D,S=x,z&&(w=d>0?g(z.lines.slice(-d)):[],v-=w.length,S-=w.length)}for(const z of U)w.push((k.added?"+":"-")+z);k.added?x+=U.length:D+=U.length}else{if(v)if(U.length<=d*2&&T<y.length-2)for(const z of g(U))w.push(z);else{const z=Math.min(U.length,d);for(const F of g(U.slice(0,z)))w.push(F);const R={oldStart:v,oldLines:D-v+z,newStart:S,newLines:x-S+z,lines:w};b.push(R),v=0,S=0,w=[]}D+=U.length,x+=U.length}}for(const T of b)for(let k=0;k<T.lines.length;k++)T.lines[k].endsWith(`
181
+ `)?T.lines[k]=T.lines[k].slice(0,-1):(T.lines.splice(k+1,0,"\"),k++);return{oldFileName:e,newFileName:t,oldHeader:o,newHeader:s,hunks:b}}}function fh(e,t){if(t||(t=iO),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=>fh(a,t)).join(`
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
+ `)+`
184
+ `}function rO(e,t,i,a,o,s,c){if(typeof c=="function"&&(c={callback:c}),c?.callback){const{callback:f}=c;Fb(e,t,i,a,o,s,Object.assign(Object.assign({},c),{callback:d=>{f(d?fh(d,c.headerOptions):void 0)}}))}else{const f=Fb(e,t,i,a,o,s,c);return f?fh(f,c?.headerOptions):void 0}}function aO(e){const t=e.endsWith(`
185
+ `),i=e.split(`
186
+ `).map(a=>a+`
187
+ `);return t?i.pop():i.push(i.pop().slice(0,-1)),i}function qb({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 Ms({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 lO={forcePlainText:!1};function oO(e,t,i,{forcePlainText:a,startingLine:o,totalLines:s,expandedHunks:c,collapsedContextThreshold:f=sn}=lO){a?(o??=0,s??=1/0):(o=0,s=1/0);const d=o>0||s<1/0,h=typeof i.theme=="string"?t.getTheme(i.theme).type:void 0,y=UN({theme:i.theme,highlighter:t}),g=a&&!d&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":i.lineDiffType,b={deletionLines:[],additionLines:[]},{maxLineDiffLength:v}=i,S=!a&&!e.isPartial,w=a?c:void 0,D=new Map;function x(k){const U=S?0:k,z=D.get(U)??uO();return D.set(U,z),z}function T(k,U,z,R){if(d){let F=z.at(-1);(F==null||F.targetIndex+F.count!==U)&&(F={targetIndex:U,originalOffset:R.length,count:0},z.push(F)),F.count++}R.push(k)}Xl({diff:e,diffStyle:"both",startingLine:o,totalLines:s,expandedHunks:d?w:!0,collapsedContextThreshold:f,callback:({hunkIndex:k,additionLine:U,deletionLine:z,type:R})=>{const F=x(k),le=U!=null?U.splitLineIndex:z.splitLineIndex;R==="change"&&U!=null&&z!=null&&sO({additionLine:e.additionLines[U.lineIndex],deletionLine:e.deletionLines[z.lineIndex],deletionLineIndex:F.deletionContent.length,additionLineIndex:F.additionContent.length,deletionDecorations:F.deletionDecorations,additionDecorations:F.additionDecorations,lineDiffType:g,maxLineDiffLength:v}),z!=null&&(T(e.deletionLines[z.lineIndex],z.lineIndex,F.deletionSegments,F.deletionContent),F.deletionInfo.push({type:R==="change"?"change-deletion":R,lineNumber:z.lineNumber,altLineNumber:R==="change"?void 0:U.lineNumber??void 0,lineIndex:`${z.unifiedLineIndex},${le}`})),U!=null&&(T(e.additionLines[U.lineIndex],U.lineIndex,F.additionSegments,F.additionContent),F.additionInfo.push({type:R==="change"?"change-addition":R,lineNumber:U.lineNumber,altLineNumber:R==="change"?void 0:z.lineNumber??void 0,lineIndex:`${U.unifiedLineIndex},${le}`}))}});for(const k of D.values()){if(k.deletionContent.length===0&&k.additionContent.length===0)continue;const U={name:e.prevName??e.name,contents:k.deletionContent.value},z={name:e.name,contents:k.additionContent.value},{deletionLines:R,additionLines:F}=cO({deletionFile:U,deletionInfo:k.deletionInfo,deletionDecorations:k.deletionDecorations,additionFile:z,additionInfo:k.additionInfo,additionDecorations:k.additionDecorations,highlighter:t,options:i,languageOverride:a?"text":e.lang});if(S){b.deletionLines=R,b.additionLines=F;continue}if(k.deletionSegments.length>0)for(const le of k.deletionSegments)for(let V=0;V<le.count;V++)b.deletionLines[le.targetIndex+V]=R[le.originalOffset+V];else b.deletionLines.push(...R);if(k.additionSegments.length>0)for(const le of k.additionSegments)for(let V=0;V<le.count;V++)b.additionLines[le.targetIndex+V]=F[le.originalOffset+V];else b.additionLines.push(...F)}return{code:b,themeStyles:y,baseThemeType:h}}function sO({deletionLine:e,additionLine:t,deletionLineIndex:i,additionLineIndex:a,deletionDecorations:o,additionDecorations:s,lineDiffType:c,maxLineDiffLength:f}){if(e==null||t==null||c==="none"||(e=Da(e),t=Da(t),e.length>f||t.length>f))return;const d=c==="char"?ZN(e,t):JN(e,t),h=[],y=[],g=c==="word-alt",b=d.at(-1);for(const S of d){const w=S===b;!S.added&&!S.removed?(Ms({item:S,arr:h,enableJoin:g,isNeutral:!0,isLastItem:w}),Ms({item:S,arr:y,enableJoin:g,isNeutral:!0,isLastItem:w})):S.removed?Ms({item:S,arr:h,enableJoin:g,isLastItem:w}):Ms({item:S,arr:y,enableJoin:g,isLastItem:w})}let v=0;for(const S of h)S[0]===1&&o.push(qb({line:i,spanStart:v,spanLength:S[1].length})),v+=S[1].length;v=0;for(const S of y)S[0]===1&&s.push(qb({line:a,spanStart:v,spanLength:S[1].length})),v+=S[1].length}function uO(){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 cO({deletionFile:e,additionFile:t,deletionInfo:i,additionInfo:a,highlighter:o,deletionDecorations:s,additionDecorations:c,languageOverride:f,options:{theme:d=kn,...h}}){const y=f??Sr(e.name),g=f??Sr(t.name),{state:b,transformers:v}=zN(h.useTokenTransformer),S=typeof d=="string"?{...h,lang:"text",theme:d,transformers:v,decorations:void 0,defaultColor:!1,cssVariablePrefix:On("token")}:{...h,lang:"text",themes:d,transformers:v,decorations:void 0,defaultColor:!1,cssVariablePrefix:On("token")};return{deletionLines:e.contents===""?[]:(S.lang=y,b.lineInfo=i,S.decorations=s,Vb(o.codeToHast(Da(e.contents),S))),additionLines:t.contents===""?[]:(S.lang=g,S.decorations=c,b.lineInfo=a,Vb(o.codeToHast(Da(t.contents),S)))}}const dO=ne.createContext(void 0);function hh(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 S_(e,t){const i=e?.theme??kn,a=t?.theme??kn,o=Yb(e),s=Yb(t);return Kh(i,a)&&hh(e,t,["theme","parseDiffOptions"])&&hh(o,s)}function Yb(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function Xb(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Qb(e){if(typeof HTMLStyleElement<"u"&&e instanceof HTMLStyleElement)return!0;const t=e.tagName??e.nodeName;return typeof t=="string"&&t.toLowerCase()==="style"}function fO(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function hO(){return Le({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[su({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}var pO=class{hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:t=!1,enableGutterUtility:i=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),i?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){const i=!(e===this.selectedRange||Xb(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!i||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),i&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:i,onLineNumberClick:a,onTokenClick:o,onMergeConflictActionClick:s}=this.options;t==null&&i==null&&a==null&&s==null&&o==null||this.options.onGutterUtilityClick!=null&&zs(e.composedPath())||(yi(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:i,onLineLeave:a,onTokenEnter:o,onTokenLeave:s,enableGutterUtility:c=!1}=this.options;t==="disabled"&&!c&&i==null&&a==null&&o==null&&s==null||(yi(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(yi(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){yi(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:i}=this.options,a=t.composedPath();yi(i,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:a});const o=this.resolvePointerTarget(a);yi(i,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",o);const{onLineClick:s,onLineNumberClick:c,onLineEnter:f,onLineLeave:d,onTokenClick:h,onTokenEnter:y,onTokenLeave:g,onHunkExpand:b,onMergeConflictActionClick:v}=this.options;switch(e){case"move":{const S=Cf(o)&&this.hoveredLine?.lineElement===o.lineElement;Ys(o)&&this.hoveredToken?.tokenElement===o.tokenElement||(this.hoveredToken!=null&&(g?.(this.hoveredToken,t),this.clearHoveredToken()),Ys(o)&&(this.setHoveredToken(this.toTokenEventBaseProps(o)),y?.(this.hoveredToken,t))),S||(this.hoveredLine!=null&&(d?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Cf(o)?(this.setHoveredLine(this.toEventBaseProps(o)),this.placeUtility(),f?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(o==null)break;if(yO(o)&&v!=null){v(o);break}if(gO(o)&&b!=null){b(o.hunkIndex,o.all||t.shiftKey?"both":o.direction,o.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!Cf(o))break;Ys(o)&&h!=null&&h(this.toTokenEventBaseProps(o),t);const S=this.toEventBaseProps(o);c!=null&&o.numberColumn?c({...S,event:t}):s?.({...S,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:i="disabled",onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:f,onTokenEnter:d,onTokenLeave:h,onHunkExpand:y,onMergeConflictActionClick:g,enableGutterUtility:b=!1,enableLineSelection:v=!1,onGutterUtilityClick:S}=this.options,w=S!=null,D=i!=="disabled"||a!=null||o!=null||s!=null||c!=null||f!=null||d!=null||h!=null||y!=null||g!=null||b||v||w;D&&!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,yi(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const k=[];return(t==="both"||t==="click")&&(a!=null&&k.push("onLineClick"),o!=null&&k.push("onLineNumberClick"),y!=null&&k.push("expandable hunk separators"),g!=null&&k.push("merge conflict actions")),k})()),yi(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),yi(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!D&&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 x=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",T=this.pointerSession.mode==="gutterSelecting";(!v&&x||!w&&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();zs(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const i=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(i==null)return;const{pre:a}=this;if(a==null)return;e.preventDefault();const{lineNumber:o,eventSide:s,lineIndex:c}=i;if(e.shiftKey&&this.selectedRange!=null){const f=this.getIndexesFromSelection(this.selectedRange,a.getAttribute("data-diff-type")==="split");if(f==null)return;const d=f.start<=f.end?c>=f.start:c<=f.end;this.selectionAnchor={lineNumber:d?this.selectedRange.start:this.selectedRange.end,side:d?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(o,s,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===o&&this.selectedRange?.end===o){const f={lineNumber:o,side:s};this.selectionAnchor=f,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:f,pending:f},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:o,side:s},this.updateSelection(o,s,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:t=!1,onGutterUtilityClick:i}=this.options;if(i==null)return;const a=this.currentSelectionEnds(),o=a?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),s=a?.top??o;o==null||s==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:s,current:o},t&&(this.selectionAnchor={lineNumber:s.lineNumber,side:s.side},this.updateSelection(o.lineNumber,o.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionPoint(e,{source:"coordinates-first"});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;e.preventDefault();const i=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(i==null||this.selectionAnchor==null)return;this.updateSelection(i.lineNumber,i.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(i==null||this.selectionAnchor==null)return;const a={lineNumber:i.lineNumber,side:i.eventSide};if(fO(this.pointerSession.pending,a))return;this.updateSelection(i.lineNumber,i.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),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;e.preventDefault();const a=this.resolveSelectionPoint(e,{source:"coordinates-first"});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.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const t=document.createElement("div");t.innerHTML=La(hO());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)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);Vl(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const t={lineNumber:e.start,side:e.side},i={lineNumber:e.end,side:e.endSide??e.side},a=this.selectionPointRowIndex(t),o=this.selectionPointRowIndex(i);if(!(a==null||o==null))return a>o?{top:i,bottom:t}:{top:t,bottom:i}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const i=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,a=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${i}"]`);for(const o of a){if(!(o instanceof HTMLElement))continue;const s=this.resolvePointerTarget(Is(o));if(Vl(s)&&!(this.mode==="diff"&&e.side!=null&&s.side!==e.side))return s}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){const 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}}resolveSelectionInfo(e,t){const i=this.resolveSelectionPath(e,t);return i!=null?this.selectionInfoFromPath(i,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(Vl(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const i=this.resolveSelectionPath(e,t);return i!=null?this.selectionPointFromPath(i):void 0}resolveSelectionPath(e,t){const i=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),i);case"coordinates-first":{const a=this.pathFromCoordinates(e,i);return a!==void 0?a??void 0:this.pathFromEventPath(e.composedPath(),i)}}}pathFromCoordinates(e,t){const i=this.hitTest(e);if(i!==void 0)return i===null?null:this.pathFromElement(i,t)??null}pathFromEventPath(e,t){if(!(t&&zs(e))){for(const i of e)if(i instanceof Element)return this.pathFromElement(i,t)}}pathFromElement(e,t){const i=Is(e);if(t&&zs(i))return;const a=vO(e);return a!=null?Is(a):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=SO(_O(e));if(t==null)return;const i=this.targetForSelectionPoint(t);return i!=null?Is(i.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),i=Wb(t)?t:Wb(document)?document:void 0;if(i!=null)return i.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:i}=this.options;return i!=null?i(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,i=!0){const a=this.getCurrentSelectionRange();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)}Xb(a??void 0,o??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=o:(this.selectedRange=o,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),i&&this.notifySelectionChangeDelta())}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,h]=f.children,y=h.children.length;if(y!==d.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let g=0;g<y;g++){const b=h.children[g],v=d.children[g];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 w=o?"single":S===s?"first":S===c?"last":"";b.setAttribute("data-selected-line",w),v.setAttribute("data-selected-line",w),v.nextSibling instanceof HTMLElement&&b.nextSibling instanceof HTMLElement&&(b.nextSibling.hasAttribute("data-line-annotation")||b.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(o?(w="last",b.setAttribute("data-selected-line","first")):S===s?w="":S===c&&b.setAttribute("data-selected-line",""),b.nextSibling.setAttribute("data-selected-line",w),v.nextSibling.setAttribute("data-selected-line",w))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode==="file"?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:i,side:a,tokenElement:o,tokenText:s}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:i,tokenElement:o,tokenText:s}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:i,side:a,tokenElement:o,tokenText:s}}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,h,y,g;for(const v of e){if(!(v instanceof HTMLElement))continue;if(g==null&&v.hasAttribute("data-merge-conflict-action")){const x=v.getAttribute("data-merge-conflict-action")??void 0,T=v.getAttribute("data-merge-conflict-conflict-index")??void 0,k=T!=null?Number.parseInt(T,10):NaN;bO(x)&&Number.isFinite(k)&&(g={kind:"merge-conflict-action",resolution:x,conflictIndex:k})}if(f==null&&v.hasAttribute("data-char")){f=v;const x=v.getAttribute("data-char");if(x!=null){const T=Number.parseInt(x,10);if(!Number.isNaN(T)){const k=v.textContent??"",U=T+k.length;(k.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(d={tokenElement:f,lineCharStart:T,lineCharEnd:U,tokenText:k});continue}}}const S=c==null?v.getAttribute("data-column-number")??void 0:void 0;if(S!=null){c=v,y=Number.parseInt(S,10),t=!0,i=ev(v),s=v.getAttribute("data-line-index")??void 0;continue}const w=o==null?v.getAttribute("data-line")??void 0:void 0;if(w!=null){o=v,y=Number.parseInt(w,10),i=ev(v),s=v.getAttribute("data-line-index")??void 0;continue}if(h==null&&(v.hasAttribute("data-expand-button")||v.hasAttribute("data-unmodified-lines"))){h={hunkIndex:void 0,direction:v.hasAttribute("data-expand-up")?"up":v.hasAttribute("data-expand-down")?"down":"both",all:v.hasAttribute("data-expand-all-button")};continue}const D=h!=null?v.getAttribute("data-expand-index")??void 0:void 0;if(h!=null&&D!=null){const x=Number.parseInt(D,10);Number.isNaN(x)||(h.hunkIndex=x);continue}if(a==null&&v.hasAttribute("data-code")){a=v;break}}if(g!=null)return g;if(h?.hunkIndex!=null)return{type:"line-info",hunkIndex:h.hunkIndex,direction:h.direction,all:h.all};if(o??=s!=null?Kb(a,`[data-line][data-line-index="${s}"]`):void 0,c??=s!=null?Kb(a,`[data-column-number][data-line-index="${s}"]`):void 0,a==null||o==null||c==null||i==null||y==null||Number.isNaN(y))return;const b=this.parseLineIndex(o,this.isSplitDiff());return d!=null?this.mode==="file"?{kind:"token",lineType:i,lineElement:o,lineNumber:y,numberColumn:t,numberElement:c,side:void 0,splitLineIndex:b,...d}:{kind:"token",lineType:i,lineElement:o,lineNumber:y,numberColumn:t,numberElement:c,side:Jb(i,a),splitLineIndex:b,...d}:this.mode==="file"?{kind:"line",lineType:i,lineElement:o,lineNumber:y,numberColumn:t,numberElement:c,side:void 0,splitLineIndex:b}:{kind:"line",lineType:i,lineElement:o,lineNumber:y,numberColumn:t,numberElement:c,side:Jb(i,a),splitLineIndex:b}}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 Zb({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:i,onGutterUtilityClick:a,onLineClick:o,onLineEnter:s,onLineLeave:c,onLineNumberClick:f,onTokenClick:d,onTokenEnter:h,onTokenLeave:y,renderGutterUtility:g,__debugPointerEvents:b,enableLineSelection:v,controlledSelection:S,onLineSelected:w,onLineSelectionStart:D,onLineSelectionChange:x,onLineSelectionEnd:T},k,U,z){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:mO({enableGutterUtility:t,renderGutterUtility:g,onGutterUtilityClick:a}),usesCustomGutterUtility:g!=null,lineHoverHighlight:i,onGutterUtilityClick:a,onHunkExpand:k,onMergeConflictActionClick:z,onLineClick:o,onLineEnter:s,onLineLeave:c,onLineNumberClick:f,onTokenClick:d,onTokenEnter:h,onTokenLeave:y,__debugPointerEvents:b,enableLineSelection:v,controlledSelection:S,onLineSelected:w,onLineSelectionStart:D,onLineSelectionChange:x,onLineSelectionEnd:T,getLineIndex:U}}function mO({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:i}){if(i!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function Vl(e){return e!=null&&"kind"in e&&e.kind==="line"}function Ys(e){return e!=null&&"kind"in e&&e.kind==="token"}function Cf(e){return Vl(e)||Ys(e)}function gO(e){return"type"in e&&e.type==="line-info"}function yO(e){return"kind"in e&&e.kind==="merge-conflict-action"}function bO(e){return e==="current"||e==="incoming"||e==="both"}function Kb(e,t){const i=e?.querySelector(t);return i instanceof HTMLElement?i:void 0}function Is(e){const t=[];let i=e;for(;i!=null;)t.push(i),i=i.parentNode;return t}function vO(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const i=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(i instanceof HTMLElement))return;const a=i.previousElementSibling;return a instanceof HTMLElement&&(a.hasAttribute("data-line")||a.hasAttribute("data-column-number"))?a:void 0}function _O(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const i=e.getAttribute("name")??void 0;return i!=null&&i.startsWith("annotation-")?i:void 0}}function SO(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const i=Number.parseInt(t[2],10);if(Number.isFinite(i))return{lineNumber:i,side:t[1]}}function Wb(e){return e!=null&&typeof e.elementFromPoint=="function"}function Jb(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function ev(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 zs(e){for(const t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||t.getAttribute("slot")==="gutter-utility-slot"||t.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function yi(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 EO=class bi{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=bi.resizeObserver??new ResizeObserver(bi.handleSharedResizeEntries);return bi.resizeObserver=t,t}static handleSharedResizeEntries(t){const i=new Map;for(const a of t){const o=bi.managersByElement.get(a.target);if(o==null)continue;const s=i.get(o);s==null?i.set(o,[a]):s.push(a)}for(const[a,o]of i)a.handleResizeEntries(o)}observedNodes=new Map;setup(t,i){const a=new Set;let o=0;const s=new Map(this.observedNodes);this.observedNodes.clear();for(const c of t.children){if(o===2)break;const f=(()=>{if(c instanceof HTMLElement&&c.tagName==="CODE")return c})();if(f==null)continue;o++;let d=s.get(f);if(d!=null&&d.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let h=f.firstElementChild;h instanceof HTMLElement||(h=null),d!=null?(this.observedNodes.set(f,d),s.delete(f),d.numberElement!==h?(d.numberElement!=null&&(this.unobserve(d.numberElement),s.delete(d.numberElement)),h!=null&&(this.observe(h),s.delete(h),this.observedNodes.set(h,d)),d.numberElement=h,d.numberWidth=0):d.numberElement!=null?(s.delete(d.numberElement),this.observedNodes.set(d.numberElement,d)):d.numberWidth=0):(d={type:"code",codeElement:f,numberElement:h,codeWidth:"auto",numberWidth:0},this.observedNodes.set(f,d),this.observe(f),h!=null&&(this.observedNodes.set(h,d),this.observe(h)))}if(o>1&&!i){const c=t.querySelectorAll('[data-line-annotation*=","]'),f=new Map;for(const d of c){if(!(d instanceof HTMLElement))continue;const h=d.getAttribute("data-line-annotation")??"";if(!/^\d+,\d+$/.test(h)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:h,element:d});continue}let y=f.get(h);y==null&&(y=[],f.set(h,y)),y.push(d)}for(const[d,h]of f){if(h.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",d,h);continue}const[y,g]=h,b=y.firstElementChild,v=g.firstElementChild;if(!(y instanceof HTMLElement)||!(g instanceof HTMLElement)||!(b instanceof HTMLElement)||!(v instanceof HTMLElement))continue;let S=s.get(b);if(S!=null){this.observedNodes.set(b,S),this.observedNodes.set(v,S),s.delete(b),s.delete(v);continue}const w=b.getBoundingClientRect().height,D=v.getBoundingClientRect().height;S={type:"annotations",column1:{container:y,child:b,childHeight:w},column2:{container:g,child:v,childHeight:D},currentHeight:"auto"},a.add({child1:b,child2:v,item:S,newHeight:Math.max(w,D)})}for(const d of a)this.applyNewHeight(d.item,d.newHeight),this.observedNodes.set(d.child1,d.item),this.observedNodes.set(d.child2,d.item),this.observe(d.child1),this.observe(d.child2);a.clear()}for(const[c,f]of s)this.unobserve(c),f.type==="code"?wO(f):kO(f);s.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:i}=bi,a=i.get(t);if(a!==this){if(a!=null&&a!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");i.set(t,this),bi.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:i,resizeObserver:a}=bi,o=i.get(t);if(o!=null){if(o!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");i.delete(t),a?.unobserve(t),a!=null&&i.size===0&&(a.disconnect(),bi.resizeObserver=void 0)}}handleResizeEntries(t){const i=new Map,a=new Set;for(const o of t){const{target:s,borderBoxSize:c,contentBoxSize:f}=o;if(!(s instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",o);continue}const d=this.observedNodes.get(s);if(d==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",o);continue}if(d.type==="annotations"){const h=(()=>{if(s===d.column1.child)return d.column1;if(s===d.column2.child)return d.column2})();if(h==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:d,target:s});continue}h.childHeight=c[0].blockSize,a.add(d)}else if(d.type==="code"){const h=i.get(d)??{},y=f[0].inlineSize;s===d.codeElement?h.codeInlineSize=y:s===d.numberElement&&(h.numberInlineSize=y),i.set(d,h)}}this.applyAnnotationUpdates(a),a.clear(),this.applyColumnUpdates(i),i.clear()}applyAnnotationUpdates(t){for(const i of t)this.applyNewHeight(i,Math.max(i.column1.childHeight,i.column2.childHeight))}applyColumnUpdates=t=>{for(const[i,a]of t){const o=a.codeInlineSize!=null?xO(a.codeInlineSize):i.codeWidth,s=a.numberInlineSize!=null?CO(a.numberInlineSize):i.numberWidth,c=o!==i.codeWidth,f=s!==i.numberWidth;if(!(!c&&!f)&&(i.codeWidth=o,i.numberWidth=s,c&&i.codeElement.style.setProperty("--diffs-column-width",`${typeof o=="number"?`${o}px`:"auto"}`),f&&i.codeElement.style.setProperty("--diffs-column-number-width",`${s===0?"auto":`${s}px`}`),c||f&&o!=="auto")){const d=typeof o=="number"?Math.max(o-s,0):0;i.codeElement.style.setProperty("--diffs-column-content-width",`${d>0?`${d}px`:"auto"}`)}}};applyNewHeight(t,i){i!==t.currentHeight&&(t.currentHeight=Math.max(i,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function xO(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function CO(e){return Math.max(Math.ceil(e),0)}function wO(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width"))}function kO(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}function E_(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 tv(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!ch.has(t))return!1;return!0}function wf(e){for(const t of m_(e))if(!uh.has(t))return!1;return!0}function AO(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 TO(e,t){return Le({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 RO({fileOrDiff:e,mode:t,stickyHeader:i}){const a="type"in e?e:void 0,o={"data-diffs-header":t,"data-change-type":a?.type,"data-sticky":i?"":void 0};return Le({tagName:"div",children:[t==="custom"?Le({tagName:"slot",properties:{name:Zh}}):DO({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:a?.type??"file"}),...t==="custom"?[]:[NO(a)]],properties:o})}function DO({name:e,prevName:t,iconType:i}){const a=[Le({tagName:"slot",properties:{name:Xh}}),su({name:LO(i),properties:{"data-change-icon":i}})];return t!=null&&(a.push(Le({tagName:"div",children:[Le({tagName:"bdi",children:[Xn(t)]})],properties:{"data-prev-name":""}})),a.push(su({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),a.push(Le({tagName:"div",children:[Le({tagName:"bdi",children:[Xn(e)]})],properties:{"data-title":""}})),Le({tagName:"div",children:a,properties:{"data-header-content":""}})}function NO(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:[Xn(`-${a}`)],properties:{"data-deletions-count":""}})),(i>0||a===0)&&t.push(Le({tagName:"span",children:[Xn(`+${i}`)],properties:{"data-additions-count":""}}))}return t.push(Le({tagName:"slot",properties:{name:Qh}})),Le({tagName:"div",children:t,properties:{"data-metadata":""}})}function OO(e){return Le({tagName:"pre",properties:MO(e)})}function MO({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 IO(e,{theme:t,preferredHighlighter:i="shiki-js"}){return{langs:[e??"text"],themes:m_(t),preferredHighlighter:i}}function zO(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}const HO=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
188
+ <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
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
+ </symbol>
191
+ <symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
192
+ <path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
193
+ </symbol>
194
+ <symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
195
+ <path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
196
+ </symbol>
197
+ <symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
198
+ <path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
199
+ </symbol>
200
+ <symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
201
+ <path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
202
+ </symbol>
203
+ <symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
204
+ <path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
205
+ </symbol>
206
+ <symbol id="diffs-icon-expand" viewBox="0 0 16 16">
207
+ <path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
208
+ </symbol>
209
+ <symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
210
+ <path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
211
+ </symbol>
212
+ <symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
213
+ <path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
214
+ </symbol>
215
+ <symbol id="diffs-icon-plus" viewBox="0 0 16 16">
216
+ <path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
217
+ </symbol>
218
+ <symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
219
+ <path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 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.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
220
+ </symbol>
221
+ <symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
222
+ <path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 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.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
223
+ </symbol>
224
+ <symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
225
+ <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 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.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
226
+ </symbol>
227
+ <symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
228
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.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.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
229
+ </symbol>
230
+ <symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
231
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.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.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
232
+ </symbol>
233
+ <symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
234
+ <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 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.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
235
+ </symbol>
236
+ <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
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
+ </symbol>
239
+ </svg>`;function UO(e,t){return e==null||t==null?e===t:PO(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 nv={};function PO(e=nv,t=nv){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 BO(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function jO(){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.style.touchAction="none",e}function VO(){const e=document.createElement("style");return e.setAttribute(lh,""),e}let Hs;function ph(e){if(Hs!=null)return Hs;const t=e.host;if(typeof HTMLElement<"u"&&t instanceof HTMLElement&&!t.isConnected)return;const i=document.createElement("div");i.setAttribute("data-code",""),i.setAttribute(cN,"true");const a=document.createElement("div");return a.style.position="relative",a.style.width="200%",a.style.height="200%",i.appendChild(a),e.appendChild(i),Hs=Math.max(i.offsetHeight-i.clientHeight,0),i.remove(),Hs}function x_(e){return`${h_}: ${e==null?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}var GO='@layer base,theme,rendered,unsafe;@layer base{:host{--diffs-font-fallback:"SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono", "Courier New", monospace;--diffs-header-font-fallback:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;--diffs-mixer:light-dark(#000,#fff);--diffs-gap-fallback:8px;--diffs-scrollbar-gutter-fallback:6px;--diffs-scrollbar-gutter:var(--diffs-scrollbar-gutter-override,var(--diffs-scrollbar-gutter-measured,var(--diffs-scrollbar-gutter-fallback)));--diffs-added-light:#0dbe4e;--diffs-added-dark:#5ecc71;--diffs-modified-light:#009fff;--diffs-modified-dark:#69b1ff;--diffs-deleted-light:#ff2e3f;--diffs-deleted-dark:#ff6762;color-scheme:light dark;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);font-feature-settings:var(--diffs-font-features);--diffs-bg:light-dark(var(--diffs-light-bg,#fff),var(--diffs-dark-bg,#000));--diffs-bg-buffer:var(--diffs-bg-buffer-override,light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));--diffs-bg-context:var(--diffs-bg-context-override,light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));--diffs-bg-context-gutter:var(--diffs-bg-context-gutter-override,light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)),color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));--diffs-bg-separator:var(--diffs-bg-separator-override,light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));--diffs-fg:light-dark(var(--diffs-light,#000),var(--diffs-dark,#fff));--diffs-fg-number:var(--diffs-fg-number-override,light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)),color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));--diffs-fg-conflict-marker:var(--diffs-fg-conflict-marker-override,var(--diffs-fg-number));--diffs-deletion-base:var(--diffs-deletion-color-override,light-dark(var(--diffs-light-deletion-color,var(--diffs-deletion-color,var(--diffs-deleted-light))),var(--diffs-dark-deletion-color,var(--diffs-deletion-color,var(--diffs-deleted-dark)))));--diffs-addition-base:var(--diffs-addition-color-override,light-dark(var(--diffs-light-addition-color,var(--diffs-addition-color,var(--diffs-added-light))),var(--diffs-dark-addition-color,var(--diffs-addition-color,var(--diffs-added-dark)))));--diffs-modified-base:var(--diffs-modified-color-override,light-dark(var(--diffs-light-modified-color,var(--diffs-modified-color,var(--diffs-modified-light))),var(--diffs-dark-modified-color,var(--diffs-modified-color,var(--diffs-modified-dark)))));--diffs-bg-deletion:var(--diffs-bg-deletion-override,light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)),color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));--diffs-bg-deletion-emphasis:var(--diffs-bg-deletion-emphasis-override,light-dark(rgb(from var(--diffs-deletion-base) r g b / .15),rgb(from var(--diffs-deletion-base) r g b / .2)));--diffs-bg-addition:var(--diffs-bg-addition-override,light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)),color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));--diffs-bg-addition-emphasis:var(--diffs-bg-addition-emphasis-override,light-dark(rgb(from var(--diffs-addition-base) r g b / .15),rgb(from var(--diffs-addition-base) r g b / .2)));--diffs-selection-base:var(--diffs-modified-base);--diffs-selection-number-fg:light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));background-color:var(--diffs-bg);color:var(--diffs-fg);display:block}pre,code,[data-error-wrapper]{isolation:isolate;font-family:var(--diffs-font-family,var(--diffs-font-fallback));outline:none;margin:0;padding:0;display:block}pre,code{background-color:var(--diffs-bg)}code{contain:content}*,:before,:after{box-sizing:border-box}[data-icon-sprite]{display:none}[data-diffs-header],[data-separator]{font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback))}[data-diffs-header][data-sticky]{z-index:1;background-color:var(--diffs-bg);position:sticky;top:0}[data-file-info]{color:var(--fg);background-color:color-mix(in lab, var(--bg) 98%, var(--fg));border-block:1px solid color-mix(in lab, var(--bg) 95%, var(--fg));padding:10px;font-weight:700}[data-diff],[data-file]{--diffs-grid-number-column-width:minmax(min-content, max-content);--diffs-code-grid:var(--diffs-grid-number-column-width) 1fr}[data-dehydrated]:is([data-diff],[data-file]){--diffs-code-grid:var(--diffs-grid-number-column-width) minmax(0, 1fr)}:is([data-diff],[data-file]):hover [data-code]::-webkit-scrollbar-thumb{background-color:var(--diffs-bg-context)}@supports (-webkit-touch-callout:none){:host{--diffs-scrollbar-gutter-fallback:0px}}[data-line] span{color:light-dark(var(--diffs-token-light,var(--diffs-light)),var(--diffs-token-dark,var(--diffs-dark)));background-color:light-dark(var(--diffs-token-light-bg,inherit),var(--diffs-token-dark-bg,inherit));font-weight:light-dark(var(--diffs-token-light-font-weight,inherit),var(--diffs-token-dark-font-weight,inherit));font-style:light-dark(var(--diffs-token-light-font-style,inherit),var(--diffs-token-dark-font-style,inherit));-webkit-text-decoration:light-dark(var(--diffs-token-light-text-decoration,inherit),var(--diffs-token-dark-text-decoration,inherit));text-decoration:light-dark(var(--diffs-token-light-text-decoration,inherit),var(--diffs-token-dark-text-decoration,inherit))}[data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-bg);--diffs-computed-selected-line-bg:var(--diffs-bg);color:var(--diffs-fg);background-color:var(--diffs-line-bg,var(--diffs-bg))}@media (pointer:fine){:is([data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions]):where([data-hovered]){--diffs-computed-hovered-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-selected-line-bg) 97%, var(--diffs-bg-hover-override,var(--diffs-mixer))),color-mix(in lab, var(--diffs-computed-selected-line-bg) 91%, var(--diffs-bg-hover-override,var(--diffs-mixer))));--diffs-line-bg:var(--diffs-computed-hovered-line-bg,inherit)}}[data-decoration-bg]:is([data-line],[data-no-newline]){--mix-deco-light:92%;--mix-deco-dark:85%}[data-decoration-bg][data-decoration-bg-depth="2"]:is([data-line],[data-no-newline]){--mix-deco-light:88%;--mix-deco-dark:80%}[data-decoration-bg][data-decoration-bg-depth="3"]:is([data-line],[data-no-newline]){--mix-deco-light:85%;--mix-deco-dark:78%}@media (pointer:fine){[data-decoration-bg][data-hovered]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:85%;--mix-deco-dark:85%}[data-decoration-bg][data-hovered][data-decoration-bg-depth="2"]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:83%;--mix-deco-dark:83%}[data-decoration-bg][data-hovered][data-decoration-bg-depth="3"]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:81%;--mix-deco-dark:81%}}[data-decoration-bg]:is([data-line],[data-no-newline]){--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) var(--mix-deco-light), var(--diffs-decoration-bg)),color-mix(in lab, var(--diffs-bg) var(--mix-deco-dark), var(--diffs-decoration-bg)));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-line-annotation],[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context);--diffs-computed-decoration-bg:var(--diffs-annotation-bg);--diffs-computed-diff-line-bg:var(--diffs-annotation-bg);--diffs-computed-selected-line-bg:var(--diffs-annotation-bg);--diffs-line-bg:var(--diffs-annotation-bg)}[data-merge-conflict-actions],[data-gutter-buffer=merge-conflict-action],[data-gutter-buffer=merge-conflict-marker-base],[data-gutter-buffer=merge-conflict-marker-separator],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator]{--diffs-computed-decoration-bg:var(--diffs-bg-context);--diffs-computed-diff-line-bg:var(--diffs-bg-context);--diffs-computed-selected-line-bg:var(--diffs-bg-context);--diffs-line-bg:var(--diffs-bg-context)}[data-gutter-buffer=merge-conflict-marker-start],[data-merge-conflict=marker-start]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-gutter-buffer=merge-conflict-marker-end],[data-merge-conflict=marker-end]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-has-merge-conflict] [data-line-annotation],[data-has-merge-conflict] [data-gutter-buffer=annotation]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-bg);--diffs-computed-selected-line-bg:var(--diffs-bg);--diffs-line-bg:var(--diffs-bg)}:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number]{--mix-light:91%;--mix-dark:85%}:where([data-background]) [data-line],:where([data-background]) [data-no-newline]{--mix-light:88%;--mix-dark:80%}:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]{--diffs-diff-line-mix-target:var(--diffs-bg)}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--diffs-bg-deletion-override,var(--diffs-deletion-base))}@media (pointer:fine){[data-line-type=change-deletion][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:75%}}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-deletion-override,var(--diffs-deletion-base));--diffs-diff-line-mix-target:var(--diffs-bg-deletion-number-override,var(--diffs-deletion-base))}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--diffs-bg-addition-override,var(--diffs-addition-base))}@media (pointer:fine){[data-line-type=change-addition][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--diffs-bg-addition-number-override,var(--diffs-addition-base))}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--conflict-bg-current-override,var(--diffs-addition-base))}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--conflict-bg-current-number-override,var(--diffs-addition-base))}@media (pointer:fine){[data-merge-conflict=current][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--conflict-bg-incoming-override,var(--diffs-modified-base))}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-modified-base);--diffs-diff-line-mix-target:var(--conflict-bg-incoming-number-override,var(--diffs-modified-base))}@media (pointer:fine){[data-merge-conflict=incoming][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]{--diffs-selection-mix-target:var(--diffs-bg-selection-override,var(--diffs-selection-base))}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]){--mix-selection-light:82%;--mix-selection-dark:75%}@media (pointer:fine){[data-selected-line][data-hovered]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):not([data-merge-conflict],[data-line-type=change-addition],[data-line-type=change-deletion]){--mix-selection-light:75%;--mix-selection-dark:70%}}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-gutter-buffer],[data-column-number]){--mix-selection-light:75%;--mix-selection-dark:60%;--diffs-selection-mix-target:var(--diffs-bg-selection-number-override,var(--diffs-selection-base))}@media (pointer:fine){[data-selected-line][data-hovered]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-gutter-buffer],[data-column-number]):not([data-merge-conflict],[data-line-type=change-addition],[data-line-type=change-deletion]){--mix-selection-light:70%;--mix-selection-dark:55%}}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]){--diffs-computed-selected-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-light), var(--diffs-selection-mix-target)),color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-dark), var(--diffs-selection-mix-target)));--diffs-line-bg:var(--diffs-computed-selected-line-bg,inherit)}[data-selected-line]:is([data-gutter-buffer],[data-column-number]){color:var(--diffs-selection-number-fg)}[data-no-newline]{-webkit-user-select:none;user-select:none}[data-no-newline] span{opacity:.6}[data-diff-type=split][data-overflow=scroll]{grid-template-columns:1fr 1fr;display:grid}[data-diff-type=split][data-overflow=scroll] [data-additions]{border-left:1px solid var(--diffs-bg)}[data-diff-type=split][data-overflow=scroll] [data-deletions]{border-right:1px solid var(--diffs-bg)}[data-code]{grid-auto-flow:dense;grid-template-columns:var(--diffs-code-grid);overflow:var(--diffs-overflow-override,scroll) clip;overscroll-behavior-x:none;tab-size:var(--diffs-tab-size,2);padding-top:var(--diffs-gap-block,var(--diffs-gap-fallback));padding-bottom:max(0px, calc(var(--diffs-gap-block,var(--diffs-gap-fallback)) - var(--diffs-scrollbar-gutter)));scrollbar-gutter:stable;align-self:flex-start;display:grid}[data-diffs-scrollbar-measure]{opacity:0;pointer-events:none;scrollbar-gutter:auto;grid-template-columns:none;width:100px;height:100px;padding:0;position:absolute;top:-200px;left:-200px}[data-container-size]{container-type:inline-size}[data-code]::-webkit-scrollbar{width:0;height:var(--diffs-scrollbar-gutter)}[data-code]::-webkit-scrollbar-track{background:0 0}[data-code]::-webkit-scrollbar-thumb{background-color:#0000;background-clip:content-box;border:1px solid #0000;border-radius:3px}[data-code]::-webkit-scrollbar-corner{background-color:#0000}@supports ((-moz-appearance:none)){[data-code]{scrollbar-width:thin;scrollbar-color:var(--diffs-bg-context) transparent;padding-bottom:var(--diffs-gap-block,var(--diffs-gap-fallback))}}:is([data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]) [data-code],[data-overflow=wrap]:is([data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]){padding-top:0}[data-gutter]{grid-template-rows:subgrid;grid-template-columns:subgrid;z-index:3;background-color:var(--diffs-bg);grid-column:1;display:grid;position:relative}[data-gutter] [data-gutter-buffer],[data-gutter] [data-column-number]{border-right:var(--diffs-gap-style,2px solid var(--diffs-bg))}[data-content]{grid-template-rows:subgrid;grid-template-columns:subgrid;background-color:var(--diffs-bg);grid-column:2;min-width:0;display:grid}[data-diff-type=split][data-overflow=wrap]{grid-auto-flow:dense;grid-template-columns:repeat(2, var(--diffs-code-grid));padding-block:var(--diffs-gap-block,var(--diffs-gap-fallback));display:grid}[data-diff-type=split][data-overflow=wrap] [data-deletions]{display:contents}:is([data-diff-type=split][data-overflow=wrap] [data-deletions]) [data-gutter]{grid-column:1}:is([data-diff-type=split][data-overflow=wrap] [data-deletions]) [data-content]{border-right:1px solid var(--diffs-bg);grid-column:2}[data-diff-type=split][data-overflow=wrap] [data-additions]{display:contents}:is([data-diff-type=split][data-overflow=wrap] [data-additions]) [data-gutter]{border-left:1px solid var(--diffs-bg);grid-column:3}:is([data-diff-type=split][data-overflow=wrap] [data-additions]) [data-content]{grid-column:4}[data-overflow=scroll] [data-gutter]{position:sticky;left:0}[data-interactive-lines] [data-line]{cursor:pointer}[data-interactive-line-numbers] [data-column-number]{cursor:pointer;touch-action:none}[data-content-buffer],[data-gutter-buffer]{-webkit-user-select:none;user-select:none;min-height:1lh;position:relative}[data-gutter-buffer]{padding-left:2ch;padding-right:1ch}[data-gutter-buffer]:before{content:"";min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));display:block}[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context-gutter);min-height:0}[data-gutter-buffer=buffer]{--diffs-line-bg:var(--diffs-bg-context-gutter)}[data-content-buffer]{background-position:5px 0;background-size:8px 8px;background-origin:border-box;background-image:repeating-linear-gradient(-45deg, transparent, transparent 4.242px, var(--diffs-bg-buffer) 4.242px, var(--diffs-bg-buffer) 5.656px);grid-column:1}[data-separator]{box-sizing:content-box;background-color:var(--diffs-bg)}[data-separator=simple]{min-height:4px}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata],[data-separator=simple]{background-color:var(--diffs-bg-separator)}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata]{height:32px;position:relative}[data-separator-wrapper]{-webkit-user-select:none;user-select:none;fill:currentColor;background-color:var(--diffs-bg);align-items:center;height:100%;display:flex;position:absolute;inset-inline:0}[data-content] [data-separator-wrapper]{display:none}[data-separator=metadata] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;color:var(--diffs-fg-number);white-space:nowrap;text-overflow:ellipsis;min-width:min-content;padding-inline:1ch;inset-inline:100% auto;overflow:hidden}[data-separator=line-info]{margin-block:var(--diffs-gap-block,var(--diffs-gap-fallback))}[data-separator=line-info] [data-separator-wrapper]{min-width:16px}[data-separator=line-info-basic],[data-separator=metadata]{margin-block:0}[data-separator=line-info][data-separator-first]{margin-top:0}[data-separator=line-info][data-separator-last]{margin-bottom:0}[data-expand-index] [data-separator-wrapper]{grid-template-columns:32px auto;display:grid}[data-expand-index] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:32px 32px auto}[data-expand-button],[data-separator-content]{background-color:var(--diffs-bg-separator);flex:none;align-items:center;display:flex}[data-expand-index] [data-separator-content]:hover{cursor:pointer;text-decoration:underline}[data-expand-button]{cursor:pointer;min-width:32px;color:var(--diffs-fg-number);border-right:2px solid var(--diffs-bg);flex-shrink:0;justify-content:center;align-self:stretch}[data-expand-button]:hover{color:var(--diffs-fg)}[data-expand-button][data-expand-all-button]{display:none}[data-expand-down] [data-icon]{transform:scaleY(-1)}[data-separator-content]{height:100%;color:var(--diffs-fg-number);flex:auto;justify-content:flex-start;padding:0 1ch;overflow:hidden}:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-content]{-webkit-user-select:none;user-select:none;height:100%;overflow:clip}[data-unmodified-lines]{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;display:block;overflow:hidden}@supports (width:1cqi){[data-unified] [data-separator=line-info] [data-separator-wrapper]{padding-inline:var(--diffs-gap-inline,var(--diffs-gap-fallback));width:100cqi}:is([data-unified] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content]{border-radius:6px}[data-unified] [data-separator=line-info][data-expand-index] [data-separator-wrapper] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}[data-gutter] [data-separator=line-info] [data-separator-wrapper]{padding-left:var(--diffs-gap-inline,var(--diffs-gap-fallback))}[data-gutter] [data-separator=line-info] [data-separator-content]{border-top-left-radius:6px;border-bottom-left-radius:6px}[data-gutter] [data-separator=line-info][data-expand-index] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}[data-additions] [data-content] [data-separator=line-info]{background-color:var(--diffs-bg)}:is([data-additions] [data-content] [data-separator=line-info]) [data-separator-wrapper]{display:none}[data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);border-top-right-radius:6px;border-bottom-right-radius:6px;height:100%;display:block}:is([data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content],:is([data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]) [data-expand-button]{display:none}[data-overflow=scroll] [data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{width:calc(100cqi - var(--diffs-gap-inline,var(--diffs-gap-fallback)))}[data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;margin-right:var(--diffs-gap-inline,var(--diffs-gap-fallback));border-top-right-radius:6px;border-bottom-right-radius:6px;display:block}:is([data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content],:is([data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]) [data-expand-button]{display:none}:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-both],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}@media (pointer:fine){[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:unset}[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down]{border-bottom-left-radius:6px;border-top-left-radius:unset}}}@media (pointer:coarse){[data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px 34px auto}:is([data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]) [data-separator-content]{grid-column:unset;grid-row:unset}@supports (width:1cqi){:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-both],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up],[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down]{border-bottom-left-radius:unset;border-top-left-radius:unset}}}@media (pointer:fine){[data-separator-wrapper][data-separator-multi-button]{grid-template-rows:50% 50%;display:grid}[data-separator-wrapper][data-separator-multi-button] [data-separator-content]{grid-area:1/2/-1;min-width:min-content}[data-separator-wrapper][data-separator-multi-button] [data-expand-button]{grid-column:1}[data-separator=line-info] [data-separator-wrapper],[data-separator=line-info] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px auto}[data-separator=line-info-basic][data-expand-index] [data-separator-wrapper]{grid-template-columns:100% auto}:is(:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-multi-button]) [data-expand-up]{border-bottom:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}:is(:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-multi-button]) [data-expand-down]{border-top:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}}[data-additions] [data-gutter] [data-separator-wrapper],[data-additions] [data-separator=line-info-basic] [data-separator-wrapper],[data-content] [data-separator-wrapper]{display:none}[data-line-annotation]{min-height:var(--diffs-annotation-min-height,0);z-index:2}[data-merge-conflict-actions]{z-index:2}[data-separator=custom]{grid-template-columns:subgrid;display:grid}[data-line],[data-column-number],[data-no-newline]{padding-inline:1ch;position:relative}[data-indicators=classic] [data-line]{padding-inline-start:2ch}:is([data-no-newline]:is([data-indicators=classic] [data-line-type=change-addition],[data-indicators=classic] [data-line-type=change-deletion]),[data-line]:is([data-indicators=classic] [data-line-type=change-addition],[data-indicators=classic] [data-line-type=change-deletion])):before{-webkit-user-select:none;user-select:none;width:1ch;height:1lh;display:inline-block;position:absolute;top:0;left:0}:is([data-line]:is([data-indicators=classic] [data-line-type=change-addition]),[data-no-newline]:is([data-indicators=classic] [data-line-type=change-addition])):before{content:"+";color:var(--diffs-addition-base)}:is([data-line]:is([data-indicators=classic] [data-line-type=change-deletion]),[data-no-newline]:is([data-indicators=classic] [data-line-type=change-deletion])):before{content:"-";color:var(--diffs-deletion-base)}[data-column-number]:is([data-indicators=bars] [data-line-type=change-deletion],[data-indicators=bars] [data-line-type=change-addition]):before{content:"";-webkit-user-select:none;user-select:none;contain:strict;width:4px;height:100%;display:block;position:absolute;top:0;left:0}[data-column-number]:is([data-indicators=bars] [data-line-type=change-deletion]):before{background-image:linear-gradient(0deg, var(--diffs-bg-deletion) 50%, var(--diffs-deletion-base) 50%);background-repeat:repeat;background-size:2px 2px;background-size:calc(1lh/round(1lh / 2px)) calc(1lh/round(1lh / 2px))}[data-column-number]:is([data-indicators=bars] [data-line-type=change-addition]):before{background-color:var(--diffs-addition-base)}[data-overflow=wrap] [data-line],[data-overflow=wrap] [data-annotation-content]{white-space:pre-wrap;word-break:break-word}[data-overflow=scroll] [data-line]{white-space:pre;min-height:1lh}[data-column-number]{box-sizing:content-box;text-align:right;-webkit-user-select:none;user-select:none;color:var(--diffs-fg-number);padding-left:2ch}[data-line-number-content]{min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));z-index:1;display:inline-block;position:relative}[data-disable-line-numbers] [data-gutter-buffer],[data-disable-line-numbers] [data-column-number]{min-width:4px;padding:0}:is([data-disable-line-numbers] [data-gutter-buffer],[data-disable-line-numbers] [data-column-number]):before{min-width:0}[data-disable-line-numbers] [data-line-number-content]{display:none}[data-disable-line-numbers] [data-gutter-utility-slot]{right:unset;justify-content:flex-start;left:0}[data-disable-line-numbers][data-indicators=bars] [data-gutter-utility-slot]{left:6px}[data-file][data-disable-line-numbers] [data-gutter-buffer],[data-file][data-disable-line-numbers] [data-column-number]{border-right:0;min-width:0}[data-diff-span]{-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:3px}[data-line-type=change-addition] [data-diff-span]{background-color:var(--diffs-bg-addition-emphasis)}[data-line-type=change-deletion] [data-diff-span]{background-color:var(--diffs-bg-deletion-emphasis)}[data-merge-conflict=marker-start],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator],[data-merge-conflict=marker-end]{color:var(--diffs-fg);padding-left:1ch}[data-merge-conflict=marker-start],[data-merge-conflict=marker-end]{align-items:center;display:flex}:is([data-merge-conflict=marker-start],[data-merge-conflict=marker-end]):after{color:var(--diffs-fg-conflict-marker);font-size:.75rem;font-style:normal;line-height:1.25rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));padding-left:1ch}[data-merge-conflict=marker-start]:after{content:"(Current Change)"}[data-merge-conflict=marker-end]:after{content:"(Incoming Change)"}[data-merge-conflict-actions-content]{min-height:1.75rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));color:var(--diffs-fg);align-items:center;gap:.25rem;padding-inline:.5rem;font-size:.75rem;line-height:1.2;display:flex}[data-merge-conflict-action]{appearance:none;color:var(--diffs-fg-number);font:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-style:normal}[data-merge-conflict-action]:hover{color:var(--diffs-fg)}[data-merge-conflict-action=current]:hover{color:var(--diffs-addition-base)}[data-merge-conflict-action=incoming]:hover{color:var(--diffs-modified-base)}[data-merge-conflict-action-separator]{color:var(--diffs-fg-number);opacity:.6;-webkit-user-select:none;user-select:none}[data-diffs-header=default]{background-color:var(--diffs-bg);justify-content:space-between;align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));min-height:calc(1lh + var(--diffs-gap-block,var(--diffs-gap-fallback))*3);z-index:2;flex-direction:row;padding-inline:16px;display:flex;position:relative;top:0}[data-header-content]{align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));white-space:nowrap;flex-direction:row;min-width:0;display:flex}[data-header-content] [data-prev-name],[data-header-content] [data-title]{text-overflow:ellipsis;white-space:nowrap;direction:rtl;min-width:0;overflow:hidden}[data-prev-name]{opacity:.7}[data-rename-icon]{fill:currentColor;flex-grow:0;flex-shrink:0}[data-diffs-header=default] [data-metadata]{white-space:nowrap;align-items:center;gap:1ch;display:flex}[data-diffs-header=default] [data-additions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-addition-base)}[data-diffs-header=default] [data-deletions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-deletion-base)}[data-change-icon]{fill:currentColor;flex-shrink:0}[data-change-icon=change],[data-change-icon=rename-pure],[data-change-icon=rename-changed]{color:var(--diffs-modified-base)}[data-change-icon=new]{color:var(--diffs-addition-base)}[data-change-icon=deleted]{color:var(--diffs-deletion-base)}[data-change-icon=file]{opacity:.6}[data-annotation-content]{z-index:2;isolation:isolate;align-self:flex-start;min-width:0;display:flow-root;position:relative}[data-overflow=scroll] [data-annotation-content],[data-overflow=scroll] [data-merge-conflict-actions-content]{width:var(--diffs-column-content-width,auto);left:var(--diffs-column-number-width,0);position:sticky}[data-annotation-slot]{text-wrap-mode:wrap;word-break:normal;white-space-collapse:collapse}[data-gutter-utility-slot]{touch-action:none;justify-content:flex-end;display:flex;position:absolute;top:0;bottom:0;right:0}[data-utility-button]{appearance:none;cursor:pointer;width:1lh;height:1lh;font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);background-color:var(--diffs-modified-base);color:var(--diffs-bg);fill:currentColor;z-index:4;touch-action:none;border:none;border-radius:4px;justify-content:center;align-items:center;margin-right:calc(1ch - 1lh);padding:0;display:flex;position:relative}[data-utility-button]:before{content:"";display:block;position:absolute;inset:0 0 0 -4px}[data-decoration-bar-stack]{pointer-events:none;isolation:isolate;z-index:1;background-color:var(--diffs-decoration-bar-color,transparent);box-sizing:content-box;border-left:2px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg);width:6px;position:absolute;top:0;bottom:0;right:-2px}[data-decoration-bar-depth="1"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 20%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="2"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 45%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="3"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 65%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-start] [data-decoration-bar-stack]{border-top-left-radius:5px;border-top-right-radius:5px}[data-decoration-bar-end] [data-decoration-bar-stack]{z-index:3;border-bottom-right-radius:5px;border-bottom-left-radius:5px}[data-placeholder]{contain:strict}[data-error-wrapper]{padding:var(--diffs-gap-block,var(--diffs-gap-fallback)) var(--diffs-gap-inline,var(--diffs-gap-fallback));scrollbar-width:none;max-height:400px;overflow:auto}[data-error-wrapper] [data-error-message]{color:var(--diffs-deletion-base);font-size:18px;font-weight:700}[data-error-wrapper] [data-error-stack]{color:var(--diffs-fg-number)}}@layer theme,rendered,unsafe;';const C_="@layer base, theme, rendered, unsafe;",$O=new RegExp(`${XO(h_)}\\s*:\\s*[^;]+;`);function FO(e){return`${C_}
240
+ @layer unsafe {
241
+ ${e}
242
+ }`}function qO(e,t="system",i){return`${C_}
243
+ @layer rendered {
244
+ :host {${t==="system"?"":`
245
+ color-scheme: ${t};`}
246
+ ${x_(i)}
247
+ ${e}
248
+ }
249
+ }`}function YO(e,t){const i=x_(t);return e.replace($O,i)}function XO(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function kf({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 QO({shadowRoot:e,currentNode:t,themeCSS:i}){if(i.trim()===""){t?.remove();return}return t??=ZO(),t.textContent=i,t.parentNode!==e&&e.appendChild(t),t}function ZO(){const e=document.createElement("style");return e.setAttribute(ah,""),e}function KO(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 h in d){const y=d[h];y!=null&&e.setAttribute(h,`${y}`)}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(ou)==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(GO)),a.adoptedStyleSheets=[e]}connectedCallback(){ph(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(ou,t)}const JO=!0;function e8({fileDiff:e,metrics:t,disableFileHeader:i,hunkSeparators:a,expandUnchanged:o,expandedHunks:s,collapsedContextThreshold:c}){let f=xa(t,i),d=f;const h=o?!0:s,y=e.hunks.length-1;for(let g=0;g<e.hunks.length;g++){const b=e.hunks[g];if(b==null)throw new Error("computeEstimatedDiffHeights: invalid hunk index");const v=Qn({isPartial:e.isPartial,rangeSize:b.collapsedBefore,expandedHunks:h,hunkIndex:g,collapsedContextThreshold:c}),S=(v.fromStart+v.fromEnd)*t.lineHeight;if(f+=S,d+=S,v.collapsedLines>0){const D=Bl({type:a,metrics:t,hunkIndex:g,hunkSpecs:b.hunkSpecs})?.totalHeight??0;f+=D,d+=D}f+=b.splitLineCount*t.lineHeight,d+=b.unifiedLineCount*t.lineHeight;const w=t8(b);if(f+=w.split*t.lineHeight,d+=w.unified*t.lineHeight,g===y&&i8(e)){const D=Qn({isPartial:e.isPartial,rangeSize:r8(e,b),expandedHunks:h,hunkIndex:e.hunks.length,collapsedContextThreshold:c}),x=(D.fromStart+D.fromEnd)*t.lineHeight;if(f+=x,d+=x,D.collapsedLines>0){const T=jl({type:a,metrics:t})?.totalHeight??0;f+=T,d+=T}}}if(e.hunks.length>0){const g=y_(t);f+=g,d+=g}return{splitHeight:f,unifiedHeight:d}}function t8(e){if(!e.noEOFCRAdditions&&!e.noEOFCRDeletions)return{split:0,unified:0};const t=e.hunkContent.at(-1);if(t==null)return{split:0,unified:0};if(t.type==="context"){const i=t.lines>0?1:0;return{split:i,unified:i}}return n8(e,t)}function n8(e,t){const i=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),a=t.deletions>0&&e.noEOFCRDeletions,o=t.additions>0&&e.noEOFCRAdditions;return{split:a||o?1:0,unified:i}}function i8(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 r8(e,t){const i=e.additionLines.length-(t.additionLineIndex+t.additionCount),a=e.deletionLines.length-(t.deletionLineIndex+t.deletionCount);if(i!==a)throw new Error(`computeEstimatedDiffHeights: trailing context mismatch (additions=${i}, deletions=${a}) for ${e.name}`);return Math.min(i,a)}const a8=new TextEncoder,l8=new TextDecoder("utf-8",{ignoreBOM:!0}),o8=/[\uD800-\uDFFF]/,mh=1024;let wa=new Uint8Array(mh);function w_(){wa.length!==mh&&(wa=new Uint8Array(mh))}function vt(e){if(e.length===0)return e;if(o8.test(e))return JSON.parse(JSON.stringify(e));const t=e.length*3;wa.length<t&&(wa=new Uint8Array(t));const{written:i}=a8.encodeInto(e,wa);return l8.decode(wa.subarray(0,i))}function s8(e,t,i){try{return u8(e,t,i)}finally{w_()}}function u8(e,t,i=!1){const a=m8(e),o=a?T_(e,"diff --git"):e.split(zb);let s;const c=[];for(const f of o){if(a&&!f_.test(f)){if(s==null)s=vt(f);else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",f)}continue}else if(!a&&!zb.test(f)){if(s==null)s=vt(f);else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",f)}continue}const d=k_(f,{cacheKey:t!=null?`${t}-${c.length}`:void 0,isGitDiff:a,throwOnError:i});d!=null&&c.push(d)}return{patchMetadata:s,files:c}}function c8(e,t){try{return k_(e,t)}finally{w_()}}function k_(e,{cacheKey:t,isGitDiff:i=f_.test(e),oldFile:a,newFile:o,throwOnError:s=!1}={}){let c=0;const f=T_(e,"@@ ");let d;const h=a==null||o==null;let y=0,g=0;for(const b of f){const v=A_(b),S=v[0];if(S==null){if(s)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",b);continue}const w=h8(S);let D=0,x=0;if(w==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:h,additionLines:!h&&a!=null&&o!=null?iv(o.contents):[],deletionLines:!h&&a!=null&&o!=null?iv(a.contents):[],cacheKey:av(t)},d.additionLines.length===1&&o?.contents===""&&(d.additionLines.length=0),d.deletionLines.length===1&&a?.contents===""&&(d.deletionLines.length=0);for(const V of v){if(V.startsWith("diff --git")){const Z=V.trim().match(sN),K=Z?.[1]??Z?.[2],W=Z?.[3]??Z?.[4];if(K==null||W==null){if(s)throw Error("parsePatchContent: invalid git diff header");console.error("parsePatchContent: invalid git diff header",V);continue}d.name=vt(W.trim()),K!==W&&(d.prevName=vt(K.trim()));continue}const se=V.startsWith("---")||V.startsWith("+++")?V.match(i?oN:lN):null;if(se!=null){const[,Z,K]=se;if(Z==="---"&&K!=="/dev/null"){const W=vt(K.trim());d.prevName=W,d.name=W}else Z==="+++"&&K!=="/dev/null"&&(d.name=vt(K.trim()))}else if(i){if(V.startsWith("new mode ")&&(d.mode=vt(V.slice(8).trim())),V.startsWith("old mode ")&&(d.prevMode=vt(V.slice(8).trim())),V.startsWith("new file mode")&&(d.type="new",d.mode=vt(V.slice(13).trim())),V.startsWith("deleted file mode")&&(d.type="deleted",d.mode=vt(V.slice(17).trim())),V.startsWith("similarity index")&&(V.startsWith("similarity index 100%")?d.type="rename-pure":d.type="rename-changed"),V.startsWith("index ")){const[,Z,K,W]=V.trim().match(uN)??[];Z!=null&&(d.prevObjectId=vt(Z)),K!=null&&(d.newObjectId=vt(K)),W!=null&&(d.mode=vt(W))}V.startsWith("rename from ")&&(d.prevName=vt(V.slice(12).trim())),V.startsWith("rename to ")&&(d.name=vt(V.slice(10).trim()))}}continue}let T,k;for(;v.length>0&&(v[v.length-1]===`
250
+ `||v[v.length-1]==="\r"||v[v.length-1]===`\r
251
+ `||v[v.length-1]==="");)v.pop();const{additionStart:U,deletionStart:z}=w;y=h?y:z-1,g=h?g:U-1;const R={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:w.additionCount,additionStart:U,additionLines:D,deletionCount:w.deletionCount,deletionStart:z,deletionLines:x,deletionLineIndex:y,additionLineIndex:g,hunkContent:[],hunkContext:av(w.hunkContext),hunkSpecs:vt(S),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let F=0,le=0;for(let V=1;V<v.length;V++){const se=v[V];if(F>=R.additionCount&&le>=R.deletionCount&&!se.startsWith("\\"))break;const Z=se[0];if(Z!=="+"&&Z!=="-"&&Z!==" "&&Z!=="\\"){console.error(`parseLineType: Invalid firstChar: "${Z}", full line: "${se}"`),console.error("processFile: invalid rawLine:",se);continue}const K=g8(Z);if(K==="addition"){const W=Af(se);(T==null||T.type!=="change")&&(T=Tf("change",y,g),R.hunkContent.push(T)),g++,F++,h&&d.additionLines.push(W),T.additions++,D++,k="addition"}else if(K==="deletion"){const W=Af(se);(T==null||T.type!=="change")&&(T=Tf("change",y,g),R.hunkContent.push(T)),y++,le++,h&&d.deletionLines.push(W),T.deletions++,x++,k="deletion"}else if(K==="context"){const W=Af(se);(T==null||T.type!=="context")&&(T=Tf("context",y,g),R.hunkContent.push(T)),g++,y++,F++,le++,h&&(d.deletionLines.push(W),d.additionLines.push(W)),T.lines++,k="context"}else if(K==="metadata"&&T!=null){if(T.type==="context"?(R.noEOFCRAdditions=!0,R.noEOFCRDeletions=!0):k==="deletion"?R.noEOFCRDeletions=!0:k==="addition"&&(R.noEOFCRAdditions=!0),h&&(k==="addition"||k==="context")){const W=d.additionLines.length-1;W>=0&&(d.additionLines[W]=Da(d.additionLines[W]))}if(h&&(k==="deletion"||k==="context")){const W=d.deletionLines.length-1;W>=0&&(d.deletionLines[W]=Da(d.deletionLines[W]))}}}R.additionLines=D,R.deletionLines=x,R.collapsedBefore=Math.max(R.additionStart-1-c,0),d.hunks.push(R),c=R.additionStart+R.additionCount-1;for(const V of R.hunkContent)V.type==="context"?(R.splitLineCount+=V.lines,R.unifiedLineCount+=V.lines):(R.splitLineCount+=Math.max(V.additions,V.deletions),R.unifiedLineCount+=V.deletions+V.additions);R.splitLineStart=d.splitLineCount+R.collapsedBefore,R.unifiedLineStart=d.unifiedLineCount+R.collapsedBefore,d.splitLineCount+=R.collapsedBefore+R.splitLineCount,d.unifiedLineCount+=R.collapsedBefore+R.unifiedLineCount}if(d!=null){if(d.hunks.length>0&&!h&&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,w=Math.max(S-v,0);d.splitLineCount+=w,d.unifiedLineCount+=w}return i||(d.prevName!=null&&d.name!==d.prevName?d.hunks.length>0?d.type="rename-changed":d.type="rename-pure":(a==null||a.contents==="")&&o!=null&&o.contents!==""?d.type="new":a!=null&&a.contents!==""&&(o==null||o.contents==="")&&(d.type="deleted")),d.type!=="rename-pure"&&d.type!=="rename-changed"&&(d.prevName=void 0),d}}function d8(e,t,i=!1){const a=[],o=f8(e)?e.split(aN):[e];for(const s of o)try{a.push(s8(s,t!=null?`${t}-${a.length}`:void 0,i))}catch(c){if(i)throw c;console.error(c)}return a}function f8(e){return e.startsWith("From ")||e.includes(`
252
+ From `)}function iv(e){const t=A_(e);for(let i=0;i<t.length;i++)t[i]=vt(t[i]);return t}function A_(e){if(e.length===0)return[""];const t=[];let i=0;for(;;){const a=e.indexOf(`
253
+ `,i);if(a===-1)break;t.push(e.slice(i,a+1)),i=a+1}return i<e.length&&t.push(e.slice(i)),t}function h8(e){if(!e.startsWith("@@ -"))return;let t=4;const i=Us(e,t);if(i==null)return;const a=i.value;t=i.endIndex;let o=1;if(e[t]===","){const y=Us(e,t+1);if(y==null)return;o=y.value,t=y.endIndex}if(e[t]!==" "||e[t+1]!=="+")return;t+=2;const s=Us(e,t);if(s==null)return;const c=s.value;t=s.endIndex;let f=1;if(e[t]===","){const y=Us(e,t+1);if(y==null)return;f=y.value,t=y.endIndex}if(e[t]!==" "||e[t+1]!=="@"||e[t+2]!=="@")return;let d;const h=t+3;return e[h]===" "&&(d=p8(e.slice(h+1))),{additionCount:f,additionStart:c,deletionCount:o,deletionStart:a,hunkContext:d}}function Us(e,t){let i=t,a=0;for(;i<e.length;i++){const o=e.charCodeAt(i)-48;if(o<0||o>9)break;a=a*10+o}if(i!==t)return{value:a,endIndex:i}}function p8(e){return e.endsWith(`\r
254
+ `)?e.slice(0,-2):e.endsWith(`
255
+ `)?e.slice(0,-1):e}function m8(e){return e.startsWith("diff --git")||e.includes(`
256
+ diff --git`)}function T_(e,t){if(e.length===0)return[""];const i=`
257
+ ${t}`,a=e.startsWith(t)?0:rv(e,i,0);if(a===-1)return[e];const o=[];a>0&&o.push(e.slice(0,a));let s=a;for(;;){const c=rv(e,i,s+1);if(c===-1)break;o.push(e.slice(s,c)),s=c}return o.push(e.slice(s)),o}function rv(e,t,i){const a=e.indexOf(t,i);return a===-1?-1:a+1}function av(e){return e==null?e:vt(e)}function g8(e){return e===" "?"context":e==="\\"?"metadata":e==="+"?"addition":"deletion"}function Af(e){const t=e.slice(1);return vt(t===""?`
258
+ `:t)}function Tf(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 gh(e,t,i,a=!1){const o=c8(rO(e.name,t.name,e.contents,t.contents,e.header,t.header,i),{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 t.lang!=null&&(o.lang=t.lang),o}var y8=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 Ps(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:[Xn("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function Lf(e){return Le({tagName:"div",children:[su({name:e==="both"?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{role:"button","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 va({type:e,content:t,expandIndex:i,chunked:a=!1,slotName:o,isFirstHunk:s,isLastHunk:c}){let f=0;const d=[];if(e==="metadata"&&t!=null&&d.push(Le({tagName:"div",children:[Xn(t)],properties:{"data-separator-wrapper":""}})),(e==="line-info"||e==="line-info-basic")&&t!=null){const h=[];i!=null&&(a?(s||(h.push(Lf("up")),f++),c||(h.push(Lf("down")),f++)):(h.push(Lf(!s&&!c?"both":s?"down":"up")),f++)),h.push(Le({tagName:"div",children:[Le({tagName:"span",children:[Xn(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),a&&i!=null&&h.push(Le({tagName:"div",children:[Xn("Expand all")],properties:{role:"button","data-expand-button":"","data-expand-all-button":""}})),d.push(Le({tagName:"div",children:h,properties:{"data-separator-wrapper":"","data-separator-multi-button":f>1?"":void 0}}))}return e==="custom"&&o!=null&&d.push(Le({tagName:"slot",properties:{name:o}})),Le({tagName:"div",children:d,properties:{"data-separator":d.length===0?"simple":e,"data-expand-index":i,"data-separator-first":s?"":void 0,"data-separator-last":c?"":void 0}})}function b8(e,t){return`hunk-separator-${e}-${t}`}function v8(e){const t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function _8(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}let S8=-1;var E8=class{__id=`diff-hunks-renderer:${++S8}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(e={theme:kn},t,i){this.options=e,this.onRenderUpdate=t,this.workerManager=i,i?.isWorkingPool()!==!0&&(this.highlighter=wf(e.theme??kn)?AN():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}clearRenderCache(){this.renderCache=void 0}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.clearRenderCache(),this.expandedHunks.set(e,a)}getExpandedHunk(e){return this.expandedHunks.get(e)??fN}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 AO(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=sn,expansionLineCount:h=100,hunkSeparators:y="line-info",lineDiffType:g="word-alt",maxLineDiffLength:b=1e3,overflow:v="scroll",stickyHeader:S=!1,theme:w=kn,headerRenderMode:D="default",tokenizeMaxLineLength:x=1e3,tokenizeMaxLength:T=oh,useTokenTransformer:k=!1,useCSSClasses:U=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:i,disableFileHeader:a,disableLineNumbers:o,disableVirtualizationBuffers:s,collapsed:c,expandUnchanged:f,collapsedContextThreshold:d,expansionLineCount:h,hunkSeparators:y,lineDiffType:g,maxLineDiffLength:b,overflow:v,stickyHeader:S,theme:this.workerManager?.getDiffRenderOptions().theme??w,headerRenderMode:D,tokenizeMaxLineLength:x,tokenizeMaxLength:T,useTokenTransformer:k,useCSSClasses:U}}async initializeHighlighter(){return this.highlighter=await kN(IO(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:t}=this.getRenderOptions(e),i=Df(e,this.getTokenizeMaxLength());let a=this.workerManager?.getDiffResultCache(e);a!=null&&!Hl(t,a.options)&&(a=void 0),this.renderCache??={diff:e,highlighted:!i&&!dh(e),options:t,result:i?void 0:a?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!i&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter==null&&(this.computedLang=e.lang??Sr(e.name),this.initializeHighlighter())}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();const{theme:a,tokenizeMaxLineLength:o,lineDiffType:s,maxLineDiffLength:c}=this.getOptionsWithDefaults();return{theme:a,useTokenTransformer:zO(this.options),tokenizeMaxLineLength:o,lineDiffType:s,maxLineDiffLength:c}})();this.getOptionsWithDefaults();const{renderCache:i}=this;return i?.result==null?{options:t,forceHighlight:!0}:!Pl(e,i.diff)||!Hl(t,i.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}renderDiff(e=this.renderCache?.diff,t=Hb){if(e==null)return;const{expandUnchanged:i=!1,collapsedContextThreshold:a}=this.getOptionsWithDefaults();let{options:o,forceHighlight:s}=this.getRenderOptions(e);const c=this.getMatchingWorkerResultCache(e,o);c!=null&&!this.hasHighlightedRenderCache(e,o)&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...c},s=!1),this.renderCache??={diff:e,highlighted:!1,options:o,result:void 0,renderRange:void 0};const f=e.additionLines.length>0||e.deletionLines.length>0,d=!f||dh(e)||Df(e,this.getTokenizeMaxLength()),h=!Pl(e,this.renderCache.diff),y=!E_(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(d||this.renderCache.result==null||!this.renderCache.highlighted&&(h||y))&&(this.renderCache.diff=e,this.renderCache.options=o,this.renderCache.highlighted=!1,(this.renderCache.result==null||h||y||s)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,_8(t)||i?!0:this.expandedHunks,a)),this.renderCache.renderRange=t),!d&&f&&(!this.renderCache.highlighted||s)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??Sr(e.name);const g=this.highlighter!=null&&wf(o.theme),b=this.highlighter!=null&&tv(this.computedLang),v=!d&&b;if(this.highlighter!=null&&g&&(s||d||!this.renderCache.highlighted&&v||this.renderCache.result==null)){const{result:S,options:w}=this.renderDiffWithHighlighter(e,this.highlighter,d||!b);this.renderCache={diff:e,options:w,highlighted:v,result:S,renderRange:void 0}}(!g||!d&&!b)&&this.asyncHighlight(e).then(({result:S,options:w})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,S,w,!d)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,t,this.renderCache.result):void 0}async asyncRender(e,t=Hb){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 OO({type:"diff",diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:e,totalLines:t,customProperties:i})}async asyncHighlight(e){const t=Df(e,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??Sr(e.name);const i=this.highlighter!=null&&wf(this.options.theme??kn),a=t||this.highlighter!=null&&tv(this.computedLang);return(this.highlighter==null||!i||!a)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,i=!1){const{options:a}=this.getRenderOptions(e),{collapsedContextThreshold:o}=this.getOptionsWithDefaults();return{result:oO(e,t,a,{forcePlainText:i,expandedHunks:i?!0:void 0,collapsedContextThreshold:o}),options:a}}onHighlightSuccess(e,t,i,a=!0){if(this.renderCache==null)return;const o=!this.renderCache.highlighted||!Hl(this.renderCache.options,i)||!Pl(this.renderCache.diff,e);this.renderCache={diff:e,options:i,highlighted:a,result:t,renderRange:void 0},o&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){const i=this.workerManager?.getDiffResultCache(e);if(!(i==null||!Hl(t,i.options)))return i}hasHighlightedRenderCache(e,t){const{renderCache:i}=this;return i?.result!=null&&i.highlighted&&Pl(e,i.diff)&&Hl(t,i.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??oh}processDiffResult(e,t,{code:i,themeStyles:a,baseThemeType:o}){const{diffStyle:s,disableFileHeader:c,expandUnchanged:f,expansionLineCount:d,collapsedContextThreshold:h,hunkSeparators:y}=this.getOptionsWithDefaults();this.diff=e;const g=s==="unified";let b=[],v=[],S=[];const w=[],{additionLines:D,deletionLines:x}=i,T={rowCount:0,hunkSeparators:y,additionsContentAST:b,deletionsContentAST:v,unifiedContentAST:S,unifiedGutterAST:Ds(),deletionsGutterAST:Ds(),additionsGutterAST:Ds(),expansionLineCount:d,hunkData:w,incrementRowCount(W=1){T.rowCount+=W},pushToGutter(W,ie){switch(W){case"unified":T.unifiedGutterAST.children.push(ie);break;case"deletions":T.deletionsGutterAST.children.push(ie);break;case"additions":T.additionsGutterAST.children.push(ie);break}}},k=x8(e),U={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"?(T.pushToGutter("additions",Nn(void 0,"buffer",this.size)),b?.push(Ps(this.size))):(T.pushToGutter("deletions",Nn(void 0,"buffer",this.size)),v?.push(Ps(this.size))),this.size=0,this.side=void 0}}},z=(W,ie,q,H,G)=>{T.pushToGutter(W,RN(ie,q,H,G))};function R(W){U.flush(),s==="unified"?Rf("unified",W,T):(Rf("deletions",W,T),Rf("additions",W,T))}Xl({diff:e,diffStyle:s,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:f?!0:this.expandedHunks,collapsedContextThreshold:h,callback:({hunkIndex:W,hunk:ie,collapsedBefore:q,collapsedAfter:H,additionLine:G,deletionLine:ae,type:fe})=>{const L=ae!=null?ae.splitLineIndex:G.splitLineIndex,O=G!=null?G.unifiedLineIndex:ae.unifiedLineIndex;s==="split"&&fe!=="change"&&U.flush(),q>0&&R({hunkIndex:W,collapsedLines:q,rangeSize:Math.max(ie?.collapsedBefore??0,0),hunkSpecs:ie?.hunkSpecs,isFirstHunk:W===0,isLastHunk:!1,isExpandable:!e.isPartial});const X=s==="unified"?O:L,A={type:fe,hunkIndex:W,lineIndex:X,unifiedLineIndex:O,splitLineIndex:L,deletionLine:ae,additionLine:G};if(s==="unified"){const be=this.getUnifiedInjectedRowsForLine?.(A);be?.before!=null&&ov(be.before,T);let He=ae!=null?x[ae.lineIndex]:void 0,tt=G!=null?D[G.lineIndex]:void 0;if(He==null&&tt==null){const ut="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(ut,{file:e.name}),new Error(ut)}const At=fe==="change"?G!=null?"change-addition":"change-deletion":fe,jt=this.getUnifiedLineDecoration({type:fe,lineType:At,additionLineIndex:G?.lineIndex,deletionLineIndex:ae?.lineIndex});z("unified",jt.gutterLineType,G!=null?G.lineNumber:ae.lineNumber,`${O},${L}`,jt.gutterProperties),tt!=null?tt=js(tt,jt.contentProperties):He!=null&&(He=js(He,jt.contentProperties)),uv({diffStyle:"unified",type:fe,deletionLine:He,additionLine:tt,unifiedSpan:this.getAnnotations("unified",ae?.lineNumber,G?.lineNumber,W,X),createAnnotationElement:ut=>this.createAnnotationElement(ut),context:T}),be?.after!=null&&ov(be.after,T)}else{const be=this.getSplitInjectedRowsForLine?.(A);be?.before!=null&&sv(be.before,T,U);let He=ae!=null?x[ae.lineIndex]:void 0,tt=G!=null?D[G.lineIndex]:void 0;const At=this.getSplitLineDecoration({side:"deletions",type:fe,lineIndex:ae?.lineIndex}),jt=this.getSplitLineDecoration({side:"additions",type:fe,lineIndex:G?.lineIndex});if(He==null&&tt==null){const gt="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(gt,{file:e.name}),new Error(gt)}const ut=(()=>{if(fe==="change"){if(tt==null)return"additions";if(He==null)return"deletions"}})();if(ut!=null){if(U.side!=null&&U.side!==ut)throw new Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");U.side=ut,U.increment()}const An=this.getAnnotations("split",ae?.lineNumber,G?.lineNumber,W,X);if(An!=null&&U.size>0&&U.flush(),ae!=null){const gt=js(He,At.contentProperties);z("deletions",At.gutterLineType,ae.lineNumber,`${ae.unifiedLineIndex},${L}`,At.gutterProperties),gt!=null&&(He=gt)}if(G!=null){const gt=js(tt,jt.contentProperties);z("additions",jt.gutterLineType,G.lineNumber,`${G.unifiedLineIndex},${L}`,jt.gutterProperties),gt!=null&&(tt=gt)}uv({diffStyle:"split",type:fe,additionLine:tt,deletionLine:He,...An,createAnnotationElement:gt=>this.createAnnotationElement(gt),context:T}),be?.after!=null&&sv(be.after,T,U)}const ce=s==="split"&&ie!=null&&L===ie.splitLineStart+ie.splitLineCount-1,me=ce?ie.noEOFCRDeletions:!1,he=ce?ie.noEOFCRAdditions:!1,Se=(ae?.noEOFCR??!1)||me,Oe=(G?.noEOFCR??!1)||he;if(Oe||Se){if(s==="split"&&U.flush(),Se){const be=fe==="context"||fe==="context-expanded"?fe:"change-deletion";s==="unified"?(T.unifiedContentAST.push(Bs(be)),T.pushToGutter("unified",Nn(be,"metadata",1))):(T.deletionsContentAST.push(Bs(be)),T.pushToGutter("deletions",Nn(be,"metadata",1)),Oe||(T.pushToGutter("additions",Nn(void 0,"buffer",1)),T.additionsContentAST.push(Ps(1))))}if(Oe){const be=fe==="context"||fe==="context-expanded"?fe:"change-addition";s==="unified"?(T.unifiedContentAST.push(Bs(be)),T.pushToGutter("unified",Nn(be,"metadata",1))):(T.additionsContentAST.push(Bs(be)),T.pushToGutter("additions",Nn(be,"metadata",1)),Se||(T.pushToGutter("deletions",Nn(void 0,"buffer",1)),T.deletionsContentAST.push(Ps(1))))}T.incrementRowCount(1)}H>0&&y!=="simple"&&R({hunkIndex:fe==="context-expanded"?W:W+1,collapsedLines:H,rangeSize:k,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),T.incrementRowCount(1)}}),s==="split"&&U.flush();const F=Math.max(v8(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),le=t.bufferBefore>0||t.bufferAfter>0,V=!g&&e.type!=="deleted",se=!g&&e.type!=="new",Z=T.rowCount>0||le;b=V&&Z?b:void 0,v=se&&Z?v:void 0,S=g&&Z?S:void 0;const K=this.createPreElement(v!=null&&b!=null,F);return{unifiedGutterAST:g&&Z?T.unifiedGutterAST.children:void 0,unifiedContentAST:S,deletionsGutterAST:se&&Z?T.deletionsGutterAST.children:void 0,deletionsContentAST:v,additionsGutterAST:V&&Z?T.additionsGutterAST.children:void 0,additionsContentAST:b,hunkData:w,preNode:K,themeStyles:a,baseThemeType:o,headerElement:c?void 0:this.renderHeader(this.diff),totalLines:F,rowCount:T.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=Ds(i);return o.properties.style=`grid-row: span ${t.rowCount}`,[o,TO(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 La(this.renderFullAST(e,t))}renderPartialHTML(e,t){return t==null?La(e):La(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(to(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(to(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,stickyHeader:i}=this.getOptionsWithDefaults();return RO({fileOrDiff:e,mode:t,stickyHeader:i})}};function lv(e){return`${e} unmodified line${e>1?"s":""}`}function ov(e,t){for(const i of e)t.unifiedContentAST.push(i.content),t.pushToGutter("unified",i.gutter),t.incrementRowCount(1)}function sv(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 uv({diffStyle:e,type:t,deletionLine:i,additionLine:a,unifiedSpan:o,deletionSpan:s,additionSpan:c,createAnnotationElement:f,context:d}){let h=!1;if(e==="unified"){if(a!=null?d.unifiedContentAST.push(a):i!=null&&d.unifiedContentAST.push(i),o!=null){const y=t==="change"?i!=null?"change-deletion":"change-addition":t;d.unifiedContentAST.push(f(o)),d.pushToGutter("unified",Nn(y,"annotation",1)),h=!0}}else if(e==="split"){if(i!=null&&d.deletionsContentAST.push(i),a!=null&&d.additionsContentAST.push(a),s!=null){const y=t==="change"?i!=null?"change-deletion":"context":t;d.deletionsContentAST.push(f(s)),d.pushToGutter("deletions",Nn(y,"annotation",1)),h=!0}if(c!=null){const y=t==="change"?a!=null?"change-addition":"context":t;d.additionsContentAST.push(f(c)),d.pushToGutter("additions",Nn(y,"annotation",1)),h=!0}}h&&d.incrementRowCount(1)}function Rf(e,{hunkIndex:t,collapsedLines:i,rangeSize:a,hunkSpecs:o,isFirstHunk:s,isLastHunk:c,isExpandable:f},d){if(i<=0)return;const h=e==="unified"?d.unifiedContentAST:e==="deletions"?d.deletionsContentAST:d.additionsContentAST;if(d.hunkSeparators==="metadata"){o!=null&&(d.pushToGutter(e,va({type:"metadata",content:o,isFirstHunk:s,isLastHunk:c})),h.push(va({type:"metadata",content:o,isFirstHunk:s,isLastHunk:c})),e!=="additions"&&d.incrementRowCount(1));return}if(d.hunkSeparators==="simple"){t>0&&(d.pushToGutter(e,va({type:"simple",isFirstHunk:s,isLastHunk:!1})),h.push(va({type:"simple",isFirstHunk:s,isLastHunk:!1})),e!=="additions"&&d.incrementRowCount(1));return}const y=b8(e,t),g=a>d.expansionLineCount,b=f?t:void 0;d.pushToGutter(e,va({type:d.hunkSeparators,content:lv(i),expandIndex:b,chunked:g,slotName:y,isFirstHunk:s,isLastHunk:c})),h.push(va({type:d.hunkSeparators,content:lv(i),expandIndex:b,chunked:g,slotName:y,isFirstHunk:s,isLastHunk:c})),e!=="additions"&&d.incrementRowCount(1),d.hunkData.push({slotName:y,hunkIndex:t,lines:i,type:e,expandable:f?{up:!s,down:!c,chunked:g}:void 0})}function js(e,t){return e==null||e.type!=="element"||t==null?e:{...e,properties:{...e.properties,...t}}}function Df(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function x8(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 C8(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function w8(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 k8(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:e?.useTokenTransformer,tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators=="function"?"custom":e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}let A8=-1;var L_=class{static LoadedCustomComponent=JO;__id=`file-diff:${++A8}`;type="file-diff";fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;constructor(t={theme:kn},i,a=!1){this.options=t,this.workerManager=i,this.isContainerManaged=a,this.hunksRenderer=this.createHunksRenderer(t),this.resizeManager=new EO,this.scrollSyncManager=new y8,this.interactionManager=new pO("diff",Zb(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 k8(t)}createHunksRenderer(t){return new E8(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 h=c.splitLineStart,y=c.unifiedLineStart;if(t<f){const g=f-t;o=Math.max(y-g,0),s=Math.max(h-g,0);break e}if(t>=f+d){if(c===a){const g=t-(f+d);o=y+c.unifiedLineCount+g,s=h+c.splitLineCount+g;break e}continue}for(const g of c.hunkContent)if(g.type==="context")if(t<f+g.lines){const b=t-f;s=h+b,o=y+b;break e}else f+=g.lines,h+=g.lines,y+=g.lines;else{const b=i==="deletions"?g.deletions:g.additions;if(t<f+b){const v=t-f;o=y+(i==="additions"?g.deletions:0)+v,s=h+v;break e}else f+=b,h+=Math.max(g.deletions,g.additions),y+=g.deletions+g.additions}break e}if(!(o==null||s==null))return[o,s]};setOptions(t){t!=null&&(this.options=t,this.cachedHeaderHTML=void 0,this.hunksRenderer.setOptions(this.getHunksRendererOptions(t)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(Zb(this.options,typeof this.options.hunkSeparators=="function"||(this.options.hunkSeparators??"line-info")==="line-info"||this.options.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}),this.applyCachedThemeState(t))}applyCachedThemeState(t){if(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)return!1;const i=this.appliedThemeCSS.baseThemeType??t;return this.appliedThemeCSS.themeType===i?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!Kh(this.appliedThemeCSS.theme,this.options.theme??kn)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}canPartiallyRender(t,i,a){return!(t||i||a||typeof this.options.hunkSeparators=="function")}setSelectedLines(t,i){this.interactionManager.setSelection(t,i)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{diffStyle:t="split",overflow:i="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,i==="wrap"),i==="scroll"&&t==="split"?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}cleanUp(t=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,this.lineAnnotations=[],this.clearAuxiliaryNodes(),this.annotationCache.clear(),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.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,t||(this.cachedHeaderHTML=void 0),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,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),R8(this.pre,T8({fileDiff:d,oldFile:c,newFile:f}),this.options.collapsed)||D8(this.headerElement,L8({fileDiff:d,oldFile:c,newFile:f}),this.options.disableFileHeader)?this.render({...t,preventEmit:!0}):this.hydrationSetup({fileDiff:d,oldFile:c,newFile:f,lineAnnotations:s}),o||this.emitPostRender()}hydrateElements(t,i){this.fileContainer!==t&&this.emitPostRender(!0),KO(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(ah)){this.themeCSSStyle=a;continue}if(a instanceof HTMLStyleElement&&a.hasAttribute(lh)){this.unsafeCSSStyle=a,this.appliedUnsafeCSS=a.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=t,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:t,oldFile:i,newFile:a,lineAnnotations:o}){this.lineAnnotations=o??this.lineAnnotations,this.additionFile=a,this.deletionFile=i,this.fileDiff=t??(i!=null&&a!=null?gh(i,a,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}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,deferManagers:o=!1,forceRender:s=!1,preventEmit:c=!1,lineAnnotations:f,fileContainer:d,containerWrapper:h,renderRange:y}){if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");const{collapsed:g=!1,themeType:b="system"}=this.options,v=g?void 0:y,S=this.hasThemeChanged(),w=t!=null&&i!=null&&(!Bb(t,this.deletionFile)||!Bb(i,this.additionFile));let D=a!=null&&a!==this.fileDiff;const x=f!=null&&(f.length>0||this.lineAnnotations.length>0)?f!==this.lineAnnotations:!1;if(!g&&E_(v,this.renderRange)&&!s&&!x&&!S&&(a!=null&&a===this.fileDiff||a==null&&!w))return this.applyCachedThemeState(b);const{renderRange:T}=this;if(this.renderRange=v,this.deletionFile=t,this.additionFile=i,a!=null?this.fileDiff=a:t!=null&&i!=null&&w&&(D=!0,this.fileDiff=gh(t,i,this.options.parseDiffOptions)),D&&(this.cachedHeaderHTML=void 0),f!=null&&this.setLineAnnotations(f),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:k=!1,disableFileHeader:U=!1}=this.options;if(U&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),d=this.getOrCreateFileContainer(d,h),this.applyCachedThemeState(b),g){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const z=this.hunksRenderer.renderDiff(this.fileDiff,hN);z!=null&&this.applyThemeState(d,z.themeStyles,b,z.baseThemeType),z?.headerElement!=null&&this.applyHeaderToDOM(z.headerElement,d),this.renderSeparators([]),this.injectUnsafeCSS()}catch(z){if(k)throw z;console.error(z),z instanceof Error&&this.applyErrorToDOM(z,d)}return c||this.emitPostRender(),!0}try{const z=this.getOrCreatePreNode(d);if(!(this.canPartiallyRender(s,x,w||D||S)&&this.applyPartialRender({previousRenderRange:T,renderRange:v}))){const R=this.hunksRenderer.renderDiff(this.fileDiff,v);if(R==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(d,R.themeStyles,b,R.baseThemeType),R.headerElement!=null&&this.applyHeaderToDOM(R.headerElement,d),R.additionsContentAST!=null||R.deletionsContentAST!=null||R.unifiedContentAST!=null?this.applyHunksToDOM(z,R):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(R.hunkData)}this.applyBuffers(z,v),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,o||this.flushManagers()}catch(z){if(k)throw z;console.error(z),z instanceof Error&&this.applyErrorToDOM(z,d)}return c||this.emitPostRender(),!0}emitPostRender(t=!1){const{fileContainer:i,options:{onPostRender:a}}=this;if(t){if(!this.mounted||(this.mounted=!1,i==null))return;this.options.onPostRender?.(i,this,"unmount");return}if(i==null)return;const o=this.mounted?"update":"mount";this.mounted=!0,a?.(i,this,o)}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.emitPostRender(!0),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}primeHighlightCache(){const{fileDiff:t,workerManager:i}=this;if(t==null||i==null||dh(t))return;const a=this.options.tokenizeMaxLength??oh;Math.max(t.additionLines.length,t.deletionLines.length)>a||i.primeDiffHighlightCache(t)}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.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.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.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}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||!w8(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}-${to(o)}`;let c=this.annotationCache.get(s);if(c==null||!C8(o,c.annotation)){c?.element.remove();const f=i(o);if(f==null)continue;c={element:BO(to(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{renderGutterUtility:t}=this.options;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=jO();a.appendChild(i),this.fileContainer.appendChild(a),this.gutterUtilityContent=a}getOrCreateFileContainer(t,i){const{fileContainer:a}=this,o=t??a??document.createElement(ou),s=a!==o;return s&&this.emitPostRender(!0),this.fileContainer=o,a!=null&&s&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),i!=null&&this.fileContainer.parentNode!==i&&i.appendChild(this.fileContainer),s&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(t){const{shadowRoot:i}=t;if(i!=null)for(const a of i.children)a instanceof SVGElement?this.spriteSVG??=a:Qb(a)&&a.hasAttribute(ah)?(this.themeCSSStyle??=a,this.hasAdoptedThemeCSS=!0):Qb(a)&&a.hasAttribute(lh)&&(this.unsafeCSSStyle??=a,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(t){const i=t.shadowRoot??t.attachShadow({mode:"open"});if(this.spriteSVG==null){const a=document.createElement("div");a.innerHTML=HO;const o=a.firstChild;o instanceof SVGElement&&(this.spriteSVG=o)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==i&&i.appendChild(this.spriteSVG)}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=this.cachedHeaderHTML??La(t);if(this.cachedHeaderHTML=o,o!==this.lastRenderedHeaderHTML){const y=document.createElement("div");y.innerHTML=o;const g=y.firstElementChild;if(!(g instanceof HTMLElement))return;this.headerElement!=null?i.shadowRoot?.replaceChild(g,this.headerElement):i.shadowRoot?.prepend(g),this.headerElement=g,this.lastRenderedHeaderHTML=o}if(this.isContainerManaged||a==null)return;const{renderCustomHeader:s,renderHeaderPrefix:c,renderHeaderMetadata:f}=this.options;if(s!=null){const y=s(a)??void 0;this.headerCustom=this.upsertHeaderSlotElement(i,this.headerCustom,Zh,y),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}const d=c?.(a)??void 0,h=f?.(a)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(i,this.headerPrefix,Xh,d),this.headerMetadata=this.upsertHeaderSlotElement(i,this.headerMetadata,Qh,h),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??=VO(),this.unsafeCSSStyle.parentNode!==i&&i.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=FO(t),this.appliedUnsafeCSS=t)}}applyThemeState(t,i,a,o){const s=t.shadowRoot??t.attachShadow({mode:"open"}),c=o??a,f=this.options.theme??kn,d=typeof f=="string"?f:{...f},h=ph(s);if(this.themeCSSStyle?.parentNode===s&&this.appliedThemeCSS?.themeStyles===i&&this.appliedThemeCSS.themeType===c&&this.appliedThemeCSS.scrollbarGutter===h){this.appliedThemeCSS.theme=d;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===s){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:d,themeStyles:i,themeType:c,baseThemeType:o,scrollbarGutter:h};return}this.themeCSSStyle=QO({shadowRoot:s,currentNode:this.themeCSSStyle,themeCSS:qO(i,c,h)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:d,themeStyles:i,themeType:c,baseThemeType:o,scrollbarGutter:h}:void 0}hydrateMeasuredScrollbar(){const t=this.fileContainer?.shadowRoot;t==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=YO(this.themeCSSStyle.textContent??"",ph(t)))}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),h=this.hunksRenderer.renderCodeAST("deletions",i),y=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=kf({code:this.codeUnified,columnType:"unified",rowSpan:s,containerSize:o}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(d),f.push(this.codeUnified)):h!=null||y!=null?(h!=null?(c=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=kf({code:this.codeDeletions,columnType:"deletions",rowSpan:s,containerSize:o}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(h),f.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),y!=null?(c=c||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=kf({code:this.codeAdditions,columnType:"additions",rowSpan:s,containerSize:o}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(y),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 h=t.startingLine,y=i.startingLine,g=h+t.totalLines,b=y+i.totalLines,v=Math.max(h,y),S=Math.min(g,b);if(S<=v)return!1;const w=Math.max(0,v-h),D=Math.max(0,g-S),x=this.trimColumns({columns:d,trimStart:w,trimEnd:D,previousStart:h,overlapStart:v,overlapEnd:S,diffStyle:f});if(x<0)throw new Error("applyPartialRender: failed to trim to overlap");if(this.lastRowCount<x)throw new Error("applyPartialRender: trimmed beyond DOM row count");let T=this.lastRowCount-x;const k=(F,le)=>{if(!(le<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:F,totalLines:le,bufferBefore:0,bufferAfter:0})},U=k(y,Math.max(v-y,0));if(U==null&&y<v)return!1;const z=k(S,Math.max(b-S,0));if(z==null&&b>S)return!1;const R=(F,le)=>{if(F!=null){if(f==="unified"&&!Array.isArray(d))this.insertPartialHTML(f,d,F,le);else if(f==="split"&&Array.isArray(d))this.insertPartialHTML(f,d,F,le);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");T+=F.rowCount}};return this.cleanupErrorWrapper(),R(U,"afterbegin"),R(z,"beforeend"),this.lastRowCount!==T&&(this.applyRowSpan(f,d,T),this.lastRowCount=T),!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=cv(i[0]),s=cv(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 h=Array.from(t.content.children),y=Array.from(t.gutter.children);if(h.length!==y.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;c<h.length&&!(i<=0&&!d&&!f);){const g=y[c],b=h[c];if(c++,!(g instanceof HTMLElement)||!(b instanceof HTMLElement))throw console.error({gutterElement:g,contentElement:b}),new Error("FileDiff.trimColumnRows: invalid row elements");if(f&&(f=!1,g.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in b.dataset||g.dataset.gutterBuffer==="metadata"&&"noNewline"in b.dataset)){g.remove(),b.remove(),s++;continue}if("lineIndex"in g.dataset&&"lineIndex"in b.dataset){(i>0||d&&o>=a)&&(g.remove(),b.remove(),i>0&&(i--,i===0&&(f=!0)),s++),o++;continue}if("separator"in g.dataset&&"separator"in b.dataset){(i>0||d&&o>=a)&&(g.remove(),b.remove(),s++);continue}if(g.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in b.dataset){(i>0||d&&o>=a)&&(g.remove(),b.remove(),s++);continue}if(g.dataset.gutterBuffer==="metadata"&&"noNewline"in b.dataset){(i>0||d&&o>=a)&&(g.remove(),b.remove(),s++);continue}if(g.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),w=v-S;w>0?(this.updateBufferSize(g,w),this.updateBufferSize(b,w),s+=S):(g.remove(),b.remove(),s+=v),i-=S,i===0&&w===0&&(f=!0)}else if(d){const S=o,w=o+v-1;if(a<=S)g.remove(),b.remove(),s+=v;else if(a<=w){const D=w-a+1,x=v-D;this.updateBufferSize(g,x),this.updateBufferSize(b,x),s+=D}}o+=v;continue}throw console.error({gutterElement:g,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),h=a-s;if(h<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const y=f>0,g=c>0;if(!y&&!g)return 0;const b=y?d:0,v=g?h:-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),w=this.trimColumnRows(t[1],b,v);if(t[0]!=null&&t[1]!=null&&S!==w)throw new Error("FileDiff.trimColumns: split columns out of sync");return t[0]!=null?S:w}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){if(i==null||this.shouldDisableVirtualizationBuffers()){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)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(t,{additionsContentAST:i,deletionsContentAST:a,totalLines:o},s){const{diffIndicators:c="bars",disableBackground:f=!1,disableLineNumbers:d=!1,overflow:h="scroll",diffStyle:y="split"}=this.options,g={type:"diff",diffIndicators:c,disableBackground:f,disableLineNumbers:d,overflow:h,split:y==="unified"?!1:i!=null&&a!=null,totalLines:o,customProperties:s};UO(g,this.appliedPreAttributes)||(WO(t,g),this.appliedPreAttributes=g)}applyErrorToDOM(t,i){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const a=i.shadowRoot??i.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",a.appendChild(this.errorWrapper);const o=document.createElement("div");o.dataset.errorMessage="",o.innerText=t.message,this.errorWrapper.appendChild(o);const s=document.createElement("pre");s.dataset.errorStack="",s.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(s)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function T8({fileDiff:e,oldFile:t,newFile:i}){return e!=null&&e.hunks.length>0||t!=null||i!=null}function L8({fileDiff:e,oldFile:t,newFile:i}){return e!=null||t!=null||i!=null}function R8(e,t,i=!1){return!i&&e==null&&t}function D8(e,t,i=!1){return e==null&&t&&!i}function cv(e){if(!(e==null||e.type!=="element"))return e.children??[]}const yh=5e3;let N8=-1;var O8=class extends L_{__id=`little-virtualized-file-diff:${++N8}`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,i,a,o=!1){super(e,a,o),this.virtualizer=t,this.metrics=xf(i)}setMetrics(e,t=!1){const i=xf(e);!t&&hh(this.metrics,i)||(this.metrics=i,this.resetLayoutCache({includeEstimatedHeights:!0}))}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){const t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(e==null)return;const{options:t}=this,i=!S_(t,e),a=i&&P8(t,e);super.setOptions(e),a&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:B8(t,e)}),i&&(this.forceRenderOverride=!0),i&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,a)}setThemeType(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1}={}){this.layoutDirty=!0,this.cache.heightDeltas.size>0&&this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal!==0&&(this.cache.measuredHeightDeltaTotal=0),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),t&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1;const{overflow:t="scroll"}=this.options;if(this.fileContainer==null||this.fileDiff==null)return this.height!==0&&(e=!0),this.height=0,e;if(this.top=this.getVirtualizedTop(),t==="scroll"&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled())return e;const i=this.getDiffStyle(),a=i==="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=V8(f,i);let h=c.getBoundingClientRect().height,y=!1;c.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in c.nextElementSibling.dataset||"noNewline"in c.nextElementSibling.dataset)&&("noNewline"in c.nextElementSibling.dataset&&(y=!0),h+=c.nextElementSibling.getBoundingClientRect().height);const g=this.getEstimatedLineHeight(y),b=this.cache.heightDeltas.get(d)??0,v=h-g;v!==b&&(e=!0,this.cache.measuredHeightDeltaTotal+=v-b,v===0?this.cache.heightDeltas.delete(d):this.cache.heightDeltas.set(d,v))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render());prepareCodeViewItem(e,t,i){const a=!Pl(this.fileDiff,e);let o=i?.resetDiffLayoutCache===!0||a,s=a||i?.resetDiffLayoutCache===!0&&i.includeEstimatedDiffHeights;i?.metrics!=null&&(this.metrics=xf(i.metrics),o=!0,s=!0);const{collapsed:c=!1}=this.options;return this.currentCollapsed!==c&&(this.currentCollapsed=c,o=!0),o&&this.resetLayoutCache({includeEstimatedHeights:s}),this.fileDiff=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e,t="additions"){if(this.fileDiff==null)return;const i=this.getLineIndex(e,t);if(i==null)return;const{disableFileHeader:a=!1,expandUnchanged:o=!1,collapsed:s=!1,collapsedContextThreshold:c=sn}=this.options,f=this.getDiffStyle(),d=this.getHunkSeparatorType(),h=f==="split"?i[1]:i[0];this.approximateLayoutCheckpoints();const y=this.getLayoutCheckpointBeforeLineIndex(h);let g=y?.top??xa(this.metrics,a);if(s)return{top:g,height:0};let b;return Xl({diff:this.fileDiff,diffStyle:f,startingLine:y?.renderedLineIndex??0,expandedHunks:o?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:c,callback:({hunkIndex:v,hunk:S,collapsedBefore:w,collapsedAfter:D,deletionLine:x,additionLine:T})=>{const k=f==="split"?T?.splitLineIndex??x?.splitLineIndex:T?.unifiedLineIndex??x?.unifiedLineIndex;if(k==null)throw new Error("VirtualizedFileDiff.getLinePosition: missing line index data");if(w>0){const z=Bl({type:d,metrics:this.metrics,hunkIndex:v,hunkSpecs:S?.hunkSpecs});if(z!=null){if(g+=z.gapBefore,h>=k-w&&h<k)return b={top:g,height:z.height},!0;g+=z.height+z.gapAfter}}const U=this.getLineHeight(k,(T?.noEOFCR??!1)||(x?.noEOFCR??!1));if(k===h)return b={top:g,height:U},!0;if(g+=U,D>0){const z=jl({type:d,metrics:this.metrics});if(z!=null){if(h>k&&h<=k+D)return b={top:g+z.gapBefore,height:z.height},!0;g+=z.totalHeight}}return!1}}),b}getNumericScrollAnchor(e){if(this.fileDiff==null)return;const{disableFileHeader:t=!1,expandUnchanged:i=!1,collapsed:a=!1,collapsedContextThreshold:o=sn}=this.options;if(a)return;const s=this.getDiffStyle(),c=this.getHunkSeparatorType();this.approximateLayoutCheckpoints();const f=this.getLayoutCheckpointBeforeTop(e);let d=f?.top??xa(this.metrics,t),h;return Xl({diff:this.fileDiff,diffStyle:s,startingLine:f?.renderedLineIndex??0,expandedHunks:i?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:y,hunk:g,collapsedBefore:b,collapsedAfter:v,deletionLine:S,additionLine:w})=>{const D=s==="split"?w?.splitLineIndex??S?.splitLineIndex:w?.unifiedLineIndex??S?.unifiedLineIndex;if(D==null)throw new Error("VirtualizedFileDiff.getNumericScrollAnchor: missing line index data");if(b>0){const T=Bl({type:c,metrics:this.metrics,hunkIndex:y,hunkSpecs:g?.hunkSpecs});T!=null&&(d+=T.totalHeight)}if(d>=e&&(S!=null?h={lineNumber:S.lineNumber,side:"deletions",top:d}:w!=null&&(h={lineNumber:w.lineNumber,side:"additions",top:d}),h!=null))return!0;const x=this.getLineHeight(D,(w?.noEOFCR??!1)||(S?.noEOFCR??!1));if(d+=x,v>0){const T=jl({type:c,metrics:this.metrics});T!=null&&(d+=T.totalHeight)}return!1}}),h}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.fileDiff==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};const t=e!=null?this.computeRenderRangeFromWindow(this.fileDiff,this.top,e):this.renderRange;if(t==null)return;const{bufferBefore:i,bufferAfter:a,totalLines:o}=t;return{topOffset:this.top+i+(o===0?a:0),height:this.height-(i+a)}}cleanUp(e=!1){this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSetup=!1,super.cleanUp(e)}expandHunk=(e,t,i)=>{this.hunksRenderer.expandHunk(e,t,i),this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize(),this.virtualizer.instanceChanged(this,!0)};setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}computeApproximateSize(e=!1){const t=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!t)return;const i=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,this.fileDiff==null){this.layoutDirty=!1;return}const{disableFileHeader:a=!1,collapsed:o=!1}=this.options,s=xa(this.metrics,a);if(this.height+=s,o){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight()+this.cache.measuredHeightDeltaTotal,t&&!i&&this.validateComputedHeight(),this.layoutDirty=!1}getActiveEstimatedHeight(){this.ensureEstimatedDiffHeights();const e=this.getDiffStyle()==="split"?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(e==null)throw new Error("VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height");return e}ensureEstimatedDiffHeights(){if(this.fileDiff==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;const{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:i=sn}=this.options,{splitHeight:a,unifiedHeight:o}=e8({fileDiff:this.fileDiff,metrics:this.metrics,disableFileHeader:e,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:t,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i});this.cache.estimatedSplitHeight=a,this.cache.estimatedUnifiedHeight=o}validateComputedHeight(){if(this.fileContainer==null||this.fileDiff==null)return;const e=this.fileContainer.getBoundingClientRect();e.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:this.fileDiff.name,elementHeight:e.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}render({fileContainer:e,oldFile:t,newFile:i,fileDiff:a,forceRender:o=!1,...s}={}){const{forceRenderOverride:c,isSetup:f}=this;if(this.forceRenderOverride=void 0,this.fileDiff??=a??(t!=null&&i!=null?gh(t,i,this.options.parseDiffOptions):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(f)this.top??=this.getVirtualizedTop();else{this.computeApproximateSize();const g=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(g==null)throw new Error("VirtualizedFileDiff.render: simple virtualizer is not available");g.connect(e,this),this.isVisible=g.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);const d=this.virtualizer.getWindowSpecs(),h=this.top??0,y=this.computeRenderRangeFromWindow(this.fileDiff,h,d);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:y,oldFile:t,newFile:i,forceRender:c??o,...s})}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}isSimpleMode(){return this.virtualizer.type==="simple"}isAdvancedMode(){return this.virtualizer.type==="advanced"}getVirtualizedTop(){return this.virtualizer.type==="advanced"?this.virtualizer.getLocalTopForInstance(this):this.fileContainer!=null?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return this.virtualizer.type==="simple"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??"split"}getHunkSeparatorType(){return j8(this.options.hunkSeparators)}approximateLayoutCheckpoints(){if(this.cache.checkpoints.length>0||this.fileDiff==null||this.fileDiff.hunks.length===0||this.options.collapsed===!0)return;const{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:i=sn}=this.options,a=this.getDiffStyle(),o=this.getHunkSeparatorType(),s=t?!0:this.hunksRenderer.getExpandedHunksMap(),c=M8(this.cache.heightDeltas);let f=xa(this.metrics,e),d=0;const h=({rowCount:y,startLineIndex:g,preSeparatorHeight:b=0,postSeparatorHeight:v=0,metadataOffsets:S=[]})=>{if(y<=0)return;const w=d,D=d+y;let x=I8(w);for(;x<D;){const T=x-w,k=f+(T>0?b:0)+T*this.metrics.lineHeight+z8(S,T)*this.metrics.lineHeight+dv(c,g,g+T);this.cache.checkpoints.push({renderedLineIndex:x,lineIndex:g+T,top:k}),x+=yh}f+=b+y*this.metrics.lineHeight+S.length*this.metrics.lineHeight+dv(c,g,g+y)+v,d=D};for(let y=0;y<this.fileDiff.hunks.length;y++){const g=this.fileDiff.hunks[y];if(g==null)throw new Error("VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index");const b=Qn({isPartial:this.fileDiff.isPartial,rangeSize:g.collapsedBefore,expandedHunks:s,hunkIndex:y,collapsedContextThreshold:i}),v=b.collapsedLines>0?Bl({type:o,metrics:this.metrics,hunkIndex:y,hunkSpecs:g.hunkSpecs})?.totalHeight??0:0;h({rowCount:b.fromStart,startLineIndex:(a==="split"?g.splitLineStart:g.unifiedLineStart)-b.rangeSize});let S=v;h({rowCount:b.fromEnd,startLineIndex:(a==="split"?g.splitLineStart:g.unifiedLineStart)-b.fromEnd,preSeparatorHeight:S}),b.fromEnd>0&&(S=0);const w=U8({fileDiff:this.fileDiff,hunk:g,hunkIndex:y,expandedHunks:s,collapsedContextThreshold:i}),D=w!=null&&w.collapsedLines>0?jl({type:o,metrics:this.metrics})?.totalHeight??0:0,x=w!=null?w.fromStart+w.fromEnd:0,T=a==="split"?g.splitLineCount:g.unifiedLineCount,k=a==="split"?g.splitLineStart:g.unifiedLineStart;h({rowCount:T,startLineIndex:k,preSeparatorHeight:S,postSeparatorHeight:x===0?D:0,metadataOffsets:H8({diffStyle:a,hunk:g,rowCount:T})}),w!=null&&x>0&&h({rowCount:x,startLineIndex:k+T,postSeparatorHeight:D})}this.cache.totalLines=d}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,i=this.cache.checkpoints.length-1,a;for(;t<=i;){const o=t+i>>1,s=this.cache.checkpoints[o];if(s==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");s.lineIndex<=e?(a=s,t=o+1):i=o-1}return a}getLayoutCheckpointBeforeTop(e,t){let i=0,a=this.cache.checkpoints.length-1,o=-1;for(;i<=a;){const s=i+a>>1,c=this.cache.checkpoints[s];if(c==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");c.top<=e?(o=s,i=s+1):a=s-1}if(t==null)return o>=0?this.cache.checkpoints[o]:void 0;for(let s=o;s>=0;s--){const c=this.cache.checkpoints[s];if(c==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");if(c.renderedLineIndex%t===0)return c}}getExpandedLineCount(e,t){let i=0;if(e.isPartial){for(const f of e.hunks)i+=t==="split"?f.splitLineCount:f.unifiedLineCount;return i}const{expandUnchanged:a=!1,collapsedContextThreshold:o=sn}=this.options,s=a?!0:this.hunksRenderer.getExpandedHunksMap();for(const[f,d]of e.hunks.entries()){const h=t==="split"?d.splitLineCount:d.unifiedLineCount;i+=h;const y=Math.max(d.collapsedBefore,0),{fromStart:g,fromEnd:b,renderAll:v}=Qn({isPartial:e.isPartial,rangeSize:y,expandedHunks:s,hunkIndex:f,collapsedContextThreshold:o});y>0&&(i+=v?y:g+b)}const c=e.hunks.at(-1);if(c!=null&&R_(e)){const f=e.additionLines.length-(c.additionLineIndex+c.additionCount),d=e.deletionLines.length-(c.deletionLineIndex+c.deletionCount);if(c!=null&&f!==d)throw new Error(`VirtualizedFileDiff: trailing context mismatch (additions=${f}, deletions=${d}) for ${e.name}`);const h=Math.min(f,d);if(c!=null&&h>0){const{fromStart:y,renderAll:g}=Qn({isPartial:e.isPartial,rangeSize:h,expandedHunks:s,hunkIndex:e.hunks.length,collapsedContextThreshold:o});i+=g?h:y}}return i}computeRenderRangeFromWindow(e,t,{top:i,bottom:a}){const{disableFileHeader:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=sn}=this.options,{hunkLineCount:f,lineHeight:d}=this.metrics,h=this.getDiffStyle(),y=this.getHunkSeparatorType(),g=this.height;let b=this.cache.totalLines>0?this.cache.totalLines:this.getExpandedLineCount(e,h);const v=xa(this.metrics,o),S=e.hunks.length>0?y_(this.metrics):0;if(t<i-g||t>a)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:g-v-S};if(b<=f||e.hunks.length===0)return{startingLine:0,totalLines:f,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(),b=this.cache.totalLines>0?this.cache.totalLines:b;const w=Math.ceil(Math.max(a-i,0)/d),D=Math.ceil(w/f)*f+f,x=D/f,T=x,k=[],U=(i+a)/2,z=this.getLayoutCheckpointBeforeTop(Math.max(0,i-t-D*d*2),f);let R=t+(z?.top??v),F=z?.renderedLineIndex??0,le,V,se;if(Xl({diff:e,diffStyle:h,startingLine:z?.renderedLineIndex??0,expandedHunks:s?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:c,callback:({hunkIndex:ae,hunk:fe,collapsedBefore:L,collapsedAfter:O,deletionLine:X,additionLine:A})=>{const ce=A!=null?A.splitLineIndex:X.splitLineIndex,me=A!=null?A.unifiedLineIndex:X.unifiedLineIndex,he=(A?.noEOFCR??!1)||(X?.noEOFCR??!1),Se=(L>0?Bl({type:y,metrics:this.metrics,hunkIndex:ae,hunkSpecs:fe?.hunkSpecs}):void 0)?.totalHeight??0;R+=Se;const Oe=F%f===0,be=Math.floor(F/f);if(Oe&&(k[be]=R-(t+v+Se),se!=null)){if(se<=0)return!0;se--}const He=this.getLineHeight(h==="split"?ce:me,he);return R>i-He&&R<a&&(le??=be),V==null&&R+He>U&&(V=be),se==null&&R>=a&&Oe&&(se=T),F++,R+=He,O>0&&(R+=jl({type:y,metrics:this.metrics})?.totalHeight??0),!1}}),le==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:g-v-S};V??=le;const Z=Math.round(V-x/2),K=Math.max(0,Math.ceil(b/f)-x),W=Math.max(0,Math.min(Z,K)),ie=W*f,q=Z<0?D+Z*f:D,H=k[W]??0,G=W+q/f;return{startingLine:ie,totalLines:q,bufferBefore:H,bufferAfter:G<k.length?g-v-k[G]-S:g-(R-t)-S}}};function M8(e){const t=Array.from(e).sort((s,c)=>s[0]-c[0]),i=[],a=[0];let o=0;for(const[s,c]of t)i.push(s),o+=c,a.push(o);return{lineIndexes:i,prefixTotals:a}}function dv({lineIndexes:e,prefixTotals:t},i,a){if(i>=a||e.length===0)return 0;const o=fv(e,i);return(t[fv(e,a)]??0)-(t[o]??0)}function fv(e,t){let i=0,a=e.length;for(;i<a;){const o=i+a>>1,s=e[o];if(s==null)throw new Error("VirtualizedFileDiff: invalid prefix index");s<t?i=o+1:a=o}return i}function I8(e){return Math.ceil(e/yh)*yh}function z8(e,t){let i=0;for(const a of e)a<t&&i++;return i}function H8({diffStyle:e,hunk:t,rowCount:i}){if(i<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];const a=t.hunkContent.at(-1);if(a==null)return[];if(a.type==="context")return[i-1];const o=Math.max(a.deletions,a.additions),s=a.deletions+a.additions;if(e==="split")return o>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[i-1]:[];const c=[],f=i-s;return a.deletions>0&&t.noEOFCRDeletions&&c.push(f+a.deletions-1),a.additions>0&&t.noEOFCRAdditions&&c.push(i-1),c}function U8({fileDiff:e,hunk:t,hunkIndex:i,expandedHunks:a,collapsedContextThreshold:o}){if(i!==e.hunks.length-1||!R_(e))return;const s=e.additionLines.length-(t.additionLineIndex+t.additionCount),c=e.deletionLines.length-(t.deletionLineIndex+t.deletionCount);if(s!==c)throw new Error(`VirtualizedFileDiff: trailing context mismatch (additions=${s}, deletions=${c}) for ${e.name}`);return Qn({isPartial:e.isPartial,rangeSize:Math.min(s,c),expandedHunks:a,hunkIndex:e.hunks.length,collapsedContextThreshold:o})}function P8(e,t){return(e.diffStyle??"split")!==(t.diffStyle??"split")||(e.overflow??"scroll")!==(t.overflow??"scroll")||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??"bars")!==(t.diffIndicators??"bars")||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??sn)!==(t.collapsedContextThreshold??sn)||e.unsafeCSS!==t.unsafeCSS}function B8(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??sn)!==(t.collapsedContextThreshold??sn)}function j8(e){return typeof e=="function"?"custom":e??"line-info"}function R_(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 V8(e,t){const[i,a]=e.split(",").map(Number);return t==="split"?a:i}function G8(e,t){return typeof window>"u"&&t!=null?I.jsxs(I.Fragment,{children:[I.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:t}}),e]}):I.jsx(I.Fragment,{children:e})}const $8=ne.createContext(void 0);function F8(){return ne.useContext($8)}const q8=typeof window>"u"?ne.useEffect:ne.useLayoutEffect;function Y8({fileDiff:e,options:t,lineAnnotations:i,selectedLines:a,prerenderedHTML:o,metrics:s,hasGutterRenderUtility:c,hasCustomHeader:f,disableWorkerPool:d}){const h=F8(),y=a!==void 0,g=ne.useContext(dO),b=ne.useRef(null),v=vN(S=>{if(S!=null){if(b.current!=null)throw new Error("useFileDiffInstance: An instance should not already exist when a node is created");h!=null?b.current=new O8(Nf({controlledSelection:y,hasCustomHeader:f,hasGutterRenderUtility:c,options:t}),h,s,d?void 0:g,!0):b.current=new L_(Nf({controlledSelection:y,hasCustomHeader:f,hasGutterRenderUtility:c,options:t}),d?void 0:g,!0),b.current.hydrate({fileDiff:e,fileContainer:S,lineAnnotations:i,prerenderedHTML:o})}else{if(b.current==null)throw new Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");b.current.cleanUp(),b.current=null}});return q8(()=>{const{current:S}=b;if(S==null)return;const w=Nf({controlledSelection:y,hasCustomHeader:f,hasGutterRenderUtility:c,options:t}),D=!S_(S.options,w);S.setOptions(w),S.render({forceRender:D,fileDiff:e,lineAnnotations:i}),a!==void 0&&S.setSelectedLines(a)}),{ref:v,getHoveredLine:ne.useCallback(()=>b.current?.getHoveredLine(),[])}}function Nf({options:e,controlledSelection:t,hasCustomHeader:i,hasGutterRenderUtility:a}){return!t&&!a&&!i?e:{...e,controlledSelection:t,renderCustomHeader:i?Ib:e?.renderCustomHeader,renderGutterUtility:a?Ib:e?.renderGutterUtility}}function X8({fileDiff:e,options:t,metrics:i,lineAnnotations:a,selectedLines:o,className:s,style:c,prerenderedHTML:f,renderAnnotation:d,renderCustomHeader:h,renderHeaderPrefix:y,renderHeaderMetadata:g,renderGutterUtility:b,disableWorkerPool:v=!1}){const{ref:S,getHoveredLine:w}=Y8({fileDiff:e,options:t,metrics:i,lineAnnotations:a,selectedLines:o,prerenderedHTML:f,hasGutterRenderUtility:b!=null,hasCustomHeader:h!=null,disableWorkerPool:v});return I.jsx(ou,{ref:S,className:s,style:c,children:G8(yN({fileDiff:e,renderCustomHeader:h,renderHeaderPrefix:y,renderHeaderMetadata:g,renderAnnotation:d,renderGutterUtility:b,lineAnnotations:a,getHoveredLine:w}),f)})}const Q8=ne.memo(function({onSave:t,onCancel:i}){const a=ne.useRef(null),[o,s]=ne.useState(!1);ne.useEffect(()=>{a.current?.focus()},[]);const c=()=>{const d=a.current?.value??"";t(d,o)},f=d=>{d.key==="Enter"&&(d.metaKey||d.ctrlKey)&&(d.preventDefault(),c()),d.key==="Escape"&&(d.preventDefault(),i())};return I.jsxs("div",{className:"comment-editor",children:[I.jsx("textarea",{ref:a,className:"text-input-area comment-input",onKeyDown:f,placeholder:"Add a comment…",rows:2}),I.jsxs("div",{className:"comment-actions",children:[I.jsx(Eu,{checked:o,label:"ask agent",onChange:s}),I.jsx("button",{type:"button",className:"btn ghost",onClick:i,children:"cancel"}),I.jsx("button",{type:"button",className:"btn primary",onClick:c,children:"comment"})]})]})});function Jh({additions:e,deletions:t,className:i}){const a=["diff-stats",i].filter(Boolean).join(" ");return I.jsxs("span",{className:a,children:[I.jsxs("span",{className:"stat-add",children:["+",e]}),I.jsxs("span",{className:"stat-del",children:["-",t]})]})}const Z8=ne.memo(function({thread:t,onAddReply:i,onRequestAgent:a,onToggleResolved:o,onToggleCollapsed:s}){const[c,f]=ne.useState(!1),[d,h]=ne.useState(!1),[y,g]=ne.useState(!1),b=ne.useRef(null),S=t.messages[t.messages.length-1]?.role==="user"&&!t.loading&&!t.resolved,w=t.messages.length,D=`${t.resolved?"Resolved thread":"Thread"} with ${w} comment${w===1?"":"s"}`,x=t.resolved?"reopen":"resolve";ne.useEffect(()=>{c&&b.current?.focus()},[c]);const T=ne.useCallback(()=>{const R=b.current?.value.trim()??"";R&&(b.current&&(b.current.value=""),h(!1),f(!1),i(R,y),g(!1))},[i,y]),k=ne.useCallback(R=>{R.key==="Enter"&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),T())},[T]),U=ne.useCallback(()=>{o(!t.resolved)},[o,t.resolved]),z=ne.useCallback(()=>{b.current&&(b.current.value=""),h(!1),g(!1),f(!1)},[]);return t.collapsed?I.jsx("div",{className:`thread-card collapsed${t.resolved?" resolved":""}`,children:I.jsx("div",{className:"thread-collapsed-row",children:I.jsxs("button",{type:"button",className:"thread-toggle",onClick:()=>s(!1),"aria-label":"Expand thread","aria-expanded":!1,children:[I.jsx(bv,{size:14}),I.jsx("span",{className:"thread-summary",children:D})]})})}):I.jsxs("div",{className:`thread-card${t.resolved?" resolved":""}`,children:[I.jsx("div",{className:"thread-header-row",children:I.jsxs("button",{type:"button",className:"thread-toggle",onClick:()=>s(!0),"aria-label":"Collapse thread","aria-expanded":!0,children:[I.jsx(yv,{size:14}),I.jsx("span",{className:"thread-summary",children:D})]})}),I.jsxs("div",{className:"thread-messages",children:[t.messages.map((R,F)=>I.jsxs("div",{className:`thread-msg thread-msg-${R.role}`,children:[I.jsx("span",{className:"thread-msg-role",children:R.role==="user"?"you":"agent"}),I.jsx(Yh,{content:R.text,className:"thread-msg-text",variant:"thread"})]},`${R.role}:${F}:${R.text}`)),t.loading&&I.jsxs("div",{className:"thread-msg thread-msg-assistant",children:[I.jsx("span",{className:"thread-msg-role",children:"agent"}),I.jsx("span",{className:"thread-msg-thinking",children:"thinking…"})]})]}),I.jsx("div",{className:"thread-footer",children:c?I.jsxs(I.Fragment,{children:[I.jsx("textarea",{ref:b,className:"text-input-area thread-reply-input",onChange:R=>{const F=R.target.value.trim().length>0;h(le=>le===F?le:F)},onKeyDown:k,placeholder:"Reply…",rows:3}),I.jsxs("div",{className:"thread-actions",children:[I.jsx(Eu,{checked:y,label:"ask agent",onChange:g}),I.jsx("button",{type:"button",className:"btn ghost",onClick:z,children:"cancel"}),I.jsx("button",{type:"button",className:"btn primary",disabled:!d,onClick:T,children:"comment"})]})]}):I.jsxs("div",{className:"thread-actions",children:[I.jsx("button",{type:"button",className:"btn ghost",onClick:U,children:x}),I.jsx("button",{type:"button",className:"btn",onClick:()=>f(!0),children:"reply"}),S&&I.jsxs("button",{type:"button",className:"btn",onClick:a,children:[I.jsx(Xx,{size:14}),"ask agent"]})]})})]})}),K8={theme:vh,themeType:"dark",diffStyle:"unified",diffIndicators:"none",hunkSeparators:"line-info-basic",lineDiffType:"word-alt",disableFileHeader:!0,overflow:"wrap",unsafeCSS:[":host { --diffs-dark-bg: var(--bg); --diffs-bg: var(--bg); --diffs-annotation-bg-override: color-mix(in srgb, var(--bg) 96%, var(--text)); --diffs-bg-separator-override: color-mix(in srgb, var(--bg) 92%, var(--text)); --diffs-bg-context-override: var(--diffs-annotation-bg-override); --diffs-bg-context-gutter-override: var(--diffs-annotation-bg-override); font-weight: var(--font-weight-code); }","pre { background-color: var(--bg) !important; --diffs-bg: var(--bg) !important; }","[data-line-annotation], [data-gutter-buffer='annotation'] { --diffs-annotation-bg: var(--diffs-annotation-bg-override); }","[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(" ")},W8=ne.memo(function({file:t,diffStyle:i,overflowMode:a,codeTheme:o,collapsed:s,viewed:c,annotations:f,unresolvedThreadCount:d,onToggleCollapsed:h,onToggleViewed:y,onLineActivate:g,onSaveDraft:b,onCancelDraft:v,onAddReply:S,onRequestAgent:w,onToggleResolved:D,onToggleThreadCollapsed:x}){const T=ne.useMemo(()=>({...K8,theme:o,diffStyle:i==="split"?"split":"unified",overflow:a,onLineNumberClick:({lineNumber:z,annotationSide:R})=>{g(t.id,z,R)}}),[o,i,t.id,g,a]),k=ne.useCallback(U=>{if(U.metadata.type==="draft")return I.jsx(Q8,{onSave:b,onCancel:v});const{thread:z}=U.metadata;return I.jsx(Z8,{thread:z,onAddReply:(R,F)=>S(z.id,R,F),onRequestAgent:()=>w(z.id),onToggleResolved:R=>D(z.id,R),onToggleCollapsed:R=>x(z.id,R)})},[S,v,w,b,D,x]);return I.jsxs("section",{className:`file-section${s?" collapsed":""}`,id:`file-${t.id}`,children:[I.jsxs("div",{className:"file-header",children:[I.jsxs("button",{type:"button",className:"file-toggle",onClick:()=>h(t.id),"aria-label":s?"Expand file":"Collapse file",children:[s?I.jsx(Ox,{size:14}):I.jsx(gv,{size:14}),I.jsx("span",{className:"file-path",children:t.displayPath}),d>0&&I.jsxs("span",{className:"file-thread-count","aria-label":`${d} unresolved comment thread${d===1?"":"s"}`,title:`${d} unresolved comment thread${d===1?"":"s"}`,children:[I.jsx(vv,{size:12}),I.jsx("span",{children:d})]})]}),I.jsxs("div",{className:"file-meta",children:[I.jsx(Jh,{additions:t.additions,deletions:t.deletions}),I.jsx(Eu,{checked:c,label:"viewed",className:"viewed-checkbox",onChange:()=>y(t.id)})]})]}),!s&&I.jsx("div",{className:"file-body",children:I.jsx(X8,{className:"diff-view",fileDiff:t.file,options:T,lineAnnotations:f,renderAnnotation:k})})]})});function J8({open:e,files:t,viewed:i,threads:a,selectedThreadId:o,onJumpToFile:s,onCreateDetachedThread:c,onOpenThread:f}){const d=tM(t);return I.jsxs("aside",{className:`sidebar${e?" open":""}`,children:[I.jsxs("section",{className:"sidebar-section",children:[I.jsxs("div",{className:"sidebar-section-header",children:[I.jsx("h2",{className:"sidebar-section-title",children:"conversations"}),I.jsx("button",{type:"button",className:"btn sidebar-action",onClick:c,children:"new thread"})]}),I.jsx("div",{className:"sidebar-conversations",children:a.length===0?I.jsx("p",{className:"sidebar-empty",children:"no conversations yet"}):a.map(h=>{const y=cM(h),g=h.loading?"active":"idle",b=h.anchor.kind==="line"?Px:Vx,v=h.anchor.kind==="line"?"diff comment":"thread";return I.jsx("button",{type:"button",className:`sidebar-thread-item${o===h.id?" selected":""}${h.resolved?" resolved":""}`,onClick:()=>f(h),title:y,children:I.jsxs("span",{className:"sidebar-thread-row",children:[I.jsx(b,{className:"sidebar-thread-kind",size:13,"aria-label":v}),I.jsx("span",{className:"sidebar-thread-name",children:y}),I.jsx("span",{className:`sidebar-thread-status-dot ${g}`,"aria-label":g,title:g})]})},h.id)})})]}),I.jsx("div",{className:"sidebar-divider"}),I.jsxs("section",{className:"sidebar-section",children:[I.jsx("div",{className:"sidebar-section-header",children:I.jsx("h2",{className:"sidebar-section-title",children:"files"})}),I.jsx("div",{className:"sidebar-file-list",children:d.map((h,y)=>I.jsxs("div",{className:"sidebar-file-group",children:[I.jsx(eM,{directory:h.directory}),h.files.map(g=>I.jsx("button",{type:"button",className:`sidebar-item${i[g.id]?" viewed":""}`,onClick:()=>s(g.id),title:g.displayPath,children:I.jsxs("span",{className:"sidebar-row",children:[I.jsx("span",{className:`sidebar-file-status ${g.status}`,"aria-label":g.status,children:uM(g.status)}),I.jsx("span",{className:"sidebar-file-name",children:oM(g)}),I.jsx(Jh,{additions:g.additions,deletions:g.deletions,className:"sidebar-stats"})]})},g.id))]},`${h.directory}:${y}`))})]})]})}function eM({directory:e}){const t=ne.useRef(null),[i,a]=ne.useState(()=>rM(e)),o=ne.useMemo(()=>iM(),[]);return ne.useLayoutEffect(()=>{const s=t.current;if(!s)return;const c=()=>{const d=window.getComputedStyle(s);a(aM(e,s.clientWidth,d.font,o))};c();const f=new ResizeObserver(c);return f.observe(s),()=>{f.disconnect()}},[e,o]),I.jsx("div",{ref:t,className:"sidebar-file-directory",title:e,children:i})}function tM(e){const t=[];for(const i of e){const a=nM(i.newRepoPath),o=t[t.length-1];if(o?.directory===a){o.files.push(i);continue}t.push({directory:a,files:[i]})}return t}function nM(e){const t=e.lastIndexOf("/");return t<0?"./":`${e.slice(0,t)}/`}function iM(){const t=document.createElement("canvas").getContext("2d");return(i,a)=>t?(t.font=a,t.measureText(i).width):i.length*8}function rM(e){const t=D_(e);return t.length<=2?e:`${t[0]}/…/${t[t.length-1]}/`}function aM(e,t,i,a){const o=lM(e);for(const s of o)if(a(s,i)<=t)return s;return o[o.length-1]??e}function lM(e){const t=D_(e),i=[e];return t.length>2&&(i.push(`${t[0]}/…/${t.slice(1).join("/")}/`),i.push(`${t[0]}/…/${t.slice(-2).join("/")}/`),i.push(`${t[0]}/…/${t[t.length-1]}/`)),t.length>0&&i.push(`…/${t[t.length-1]}/`),[...new Set(i)]}function D_(e){return e==="./"?[]:e.split("/").filter(Boolean)}function oM(e){return sM(e.newRepoPath)}function sM(e){const t=e.lastIndexOf("/");return t<0?e:e.slice(t+1)}function uM(e){switch(e){case"added":return"A";case"deleted":return"D";case"renamed":return"R";case"copied":return"C";case"type-changed":return"T";case"unmerged":return"U";case"modified":return"M";case"unknown":return"?"}}function cM(e){const t=e.messages.find(a=>a.role==="user"),i=dM(t?.text??"");return i?i.length<=128?i:`${i.slice(0,125).trimEnd()}…`:"new conversation"}function dM(e){return e.replace(/\s+/g," ").trim()}function fM({value:e,options:t,onChange:i}){return I.jsx("div",{className:"toggle-group",role:"radiogroup",children:t.map(a=>I.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 hM({fileCount:e,viewedCount:t,additions:i,deletions:a,commentCount:o,diffCommand:s,diffStyle:c,overflowMode:f,sidebarOpen:d,finished:h,status:y,briefLoading:g,hasBrief:b,hasUnresolvedFileThreads:v,onBriefClick:S,onToggleSidebar:w,onExpandAll:D,onExpandUnresolved:x,onCollapseViewed:T,onCollapseAll:k,onDiffStyleChange:U,onOverflowModeChange:z,onSubmit:R,onOpenSubmitPopover:F,onCancel:le}){const V=c==="split"?"split":"stacked",se=f==="scroll"?"scroll":"wrap",Z=e>0?Math.round(t/e*100):0;return I.jsxs("header",{className:"top-bar",children:[I.jsxs("div",{className:"top-bar-left",children:[I.jsx(_a,{icon:$x,label:"Toggle sidebar",className:d?"active":"",onClick:w}),I.jsxs("button",{type:"button",className:"btn top-bar-action top-bar-brief-action",onClick:S,disabled:g,children:[I.jsx(qx,{size:14}),g?"generating brief…":b?"view brief":"brief"]}),I.jsxs("div",{className:"top-bar-diff-meta","aria-label":`${i} additions and ${a} deletions${s?`, ${s}`:""}`,children:[I.jsx(Jh,{additions:i,deletions:a}),s&&I.jsx("span",{className:"top-bar-meta top-bar-meta-dim top-bar-diff-command",title:s,children:s})]})]}),I.jsxs("div",{className:"top-bar-right",children:[I.jsxs("div",{className:"top-bar-viewed","aria-label":`${t} of ${e} viewed, ${o} unresolved comments`,children:[I.jsx("span",{className:"top-bar-viewed-ring",style:{background:`conic-gradient(var(--accent-add) ${Z}%, var(--border) ${Z}% 100%)`},"aria-hidden":"true",children:I.jsx("span",{className:"top-bar-viewed-ring-inner"})}),I.jsxs("span",{className:"top-bar-viewed-text",children:[t," of ",e," viewed"]})]}),y&&I.jsx("span",{className:"top-bar-meta top-bar-status",children:y}),I.jsxs("div",{className:"btn-group",children:[I.jsx(_a,{icon:bv,label:"Expand all files",onClick:D}),I.jsx(_a,{icon:vv,label:"Expand files with unresolved threads",onClick:x,disabled:!v}),I.jsx(_a,{icon:Hx,label:"Collapse viewed files",onClick:T}),I.jsx(_a,{icon:yv,label:"Collapse all files",onClick:k})]}),I.jsxs("button",{type:"button",className:`top-bar-toggle${se==="wrap"?" active":""}`,onClick:()=>z(se==="wrap"?"scroll":"wrap"),"aria-pressed":se==="wrap","aria-label":"Toggle wrapped diff lines",children:[I.jsx("span",{className:"top-bar-toggle-switch","aria-hidden":"true",children:I.jsx("span",{className:"top-bar-toggle-thumb"})}),I.jsx("span",{className:"top-bar-toggle-label",children:"wrap"})]}),I.jsx(fM,{value:V,options:[{value:"split",label:"split"},{value:"stacked",label:"stacked"}],onChange:U}),I.jsxs("div",{className:"top-bar-submit-group",children:[I.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-primary top-bar-submit-main",onClick:R,disabled:h,children:"submit"}),I.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-primary top-bar-submit-menu",onClick:K=>F(K.currentTarget.getBoundingClientRect()),disabled:h,"aria-label":"submit with message",children:I.jsx(gv,{size:14})})]}),I.jsx("button",{type:"button",className:"btn top-bar-action top-bar-action-cancel",onClick:le,disabled:h,"aria-label":"cancel",children:I.jsx(_v,{size:14,strokeWidth:2.25})})]})]})}function pM(e,t,i){if(!e.trim())return[];const a=d8(e,i),o=gM(t);let s=0;return a.flatMap(c=>c.files.map(f=>{const d=yM(f,o);return{id:f.cacheKey??`${f.name}::${s++}`,file:f,displayPath:d.displayPath,status:d.status,oldRepoPath:d.oldRepoPath,newRepoPath:d.newRepoPath,additions:hv(f,"additions"),deletions:hv(f,"deletions")}}))}function mM(e){return e.prevName&&e.prevName!==e.name?"renamed":"modified"}function hv(e,t){return e.hunks.reduce((i,a)=>i+a.hunkContent.reduce((o,s)=>o+(s.type==="change"?s[t]:0),0),0)}function gM(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,status:i.status,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 yM(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,status:mM(e),oldRepoPath:e.prevName,newRepoPath:e.name}}const bM=[];function vM(){const[e,t]=ne.useState(null),[i,a]=ne.useState(null),[o,s]=ne.useState(dx),[c,f]=ne.useState(null),[d,h]=ne.useState(""),[y,g]=ne.useState(!1),[b,v]=ne.useState(null),[S,w]=ne.useState(!1),[D,x]=ne.useState(""),[T,k]=ne.useState(!1),[U,z]=ne.useState(!1),[R,F]=ne.useState(null),[le,V]=ne.useState(""),se=ne.useRef(null),Z=ne.useRef(null),K=ne.useRef(0),W=ne.useCallback(re=>{s(hx(re))},[]),ie=ne.useCallback(async(re,ge={})=>{try{const xe=await re;W(xe.state)}catch(xe){ge.onError?.(),x(xe instanceof Error?xe.message:String(xe))}},[W]),q=ne.useCallback((re,ge)=>{ie(ix(re),ge)},[ie]),H=ne.useCallback((re,ge)=>{s(xe=>_x(xe,re,ge))},[]),G=ne.useCallback(re=>{s(ge=>Sx(ge,re))},[]),ae=ne.useCallback(async re=>{H(re,!0);try{const ge=await rx(re);W(ge.state)}catch(ge){H(re,!1),x(ge instanceof Error?ge.message:String(ge))}},[W,H]);ne.useEffect(()=>{let re=!0;return(async()=>{try{const xe=await tx();if(!xe.state)throw new Error("diff tool bootstrap response did not include review state");if(!re)return;t(xe),W(xe.state);const We=await nx();re&&a(We)}catch(xe){re&&x(xe instanceof Error?xe.message:String(xe))}})(),()=>{re=!1}},[W]);const fe=i&&"patch"in i?i.patch:"",L=ne.useMemo(()=>pM(fe,e?.files,e?.context.sessionId),[fe,e]),O=ne.useMemo(()=>l0(o.collapsedFileIds),[o.collapsedFileIds]),X=ne.useMemo(()=>l0(o.viewedFileIds),[o.viewedFileIds]),A=ne.useMemo(()=>o.threads.filter(re=>!re.resolved),[o.threads]),ce=A.length,me=ne.useMemo(()=>[...o.threads].reverse(),[o.threads]),he=ne.useMemo(()=>o.threads.filter(px),[o.threads]),Se=ne.useMemo(()=>b?.mode!=="thread"?null:he.find(re=>re.id===b.threadId)??null,[b,he]),Oe=ne.useMemo(()=>Gd(A.filter(_h).map(re=>re.anchor.fileId)),[A]),be=ne.useMemo(()=>bx(A),[A]),He=o.brief.content.trim().length>0,tt=ne.useMemo(()=>L.reduce(mx,{additions:0,deletions:0}),[L]),At=ne.useCallback((re,ge="smooth")=>{document.getElementById(`file-${re}`)?.scrollIntoView({behavior:ge,block:"start"})},[]),jt=ne.useCallback(re=>{q({collapsedFileIds:o0(o.collapsedFileIds,re)})},[q,o.collapsedFileIds]),ut=ne.useCallback(re=>{const ge=o0(o.viewedFileIds,re),xe=ge.includes(re),We=xe?Gd([...o.collapsedFileIds,re]):o.collapsedFileIds;Z.current=xe&&!o.collapsedFileIds.includes(re)?re:null,q({viewedFileIds:ge,collapsedFileIds:We},{onError:()=>{Z.current=null}})},[q,o.collapsedFileIds,o.viewedFileIds]),An=ne.useCallback(()=>{q({collapsedFileIds:[]})},[q]),gt=ne.useCallback(()=>{q({collapsedFileIds:L.map(re=>re.id)})},[q,L]),Cr=ne.useCallback(()=>{if(Oe.length===0)return;const re=new Set(Oe);q({collapsedFileIds:o.collapsedFileIds.filter(ge=>!re.has(ge))})},[q,Oe,o.collapsedFileIds]),wr=ne.useCallback(()=>{q({collapsedFileIds:Gd([...o.collapsedFileIds,...o.viewedFileIds])})},[q,o.collapsedFileIds,o.viewedFileIds]);ne.useLayoutEffect(()=>{const re=Z.current;re&&(Z.current=null,At(re,"auto"))},[o.collapsedFileIds,At]);const _i=ne.useCallback((re,ge,xe)=>{f(We=>We&&We.fileId===re&&We.lineNumber===ge&&We.side===xe?We:{fileId:re,lineNumber:ge,side:xe})},[]),Si=ne.useCallback((re,ge)=>{if(!c)return;const xe=re.trim();if(!xe){f(null);return}const We={kind:"line",fileId:c.fileId,filePath:Ex(c,L),lineNumber:c.lineNumber,side:c.side};(async()=>{try{const Un=await a0({body:xe,anchor:We});if(W(Un.state),f(null),!ge)return;await ae(Un.threadId)}catch(Un){x(Un instanceof Error?Un.message:String(Un))}})()},[W,c,L,ae]),Ki=ne.useCallback(()=>f(null),[]),Ha=ne.useCallback(()=>{K.current+=1,h(""),g(!1),v({mode:"new"})},[]),kr=ne.useCallback(re=>{K.current+=1,h(""),g(!1),v({mode:"thread",threadId:re})},[]),yt=ne.useCallback(()=>{K.current+=1,h(""),g(!1),v(null)},[]),Ua=ne.useCallback(re=>{if(re.anchor.kind==="detached"){kr(re.id);return}yt();const ge=re.anchor.fileId;if(o.collapsedFileIds.includes(ge)){Z.current=ge,q({collapsedFileIds:o.collapsedFileIds.filter(xe=>xe!==ge)});return}At(ge)},[q,yt,kr,o.collapsedFileIds,At]),J=ne.useCallback(re=>{h(re)},[]),ue=ne.useCallback(re=>K.current!==re?!1:(h(""),g(!1),!0),[]),_e=ne.useCallback(async()=>{const re=d.trim();if(!re)return;const ge=!y,xe=K.current;x("");try{if(b?.mode==="thread"){const Tn=await Vd({id:b.threadId,text:re});if(W(Tn.state),!ue(xe)||!ge)return;await ae(b.threadId);return}const We=await a0({body:re,anchor:{kind:"detached"}});if(W(We.state),!ue(xe)||(v({mode:"thread",threadId:We.threadId}),!ge))return;await ae(We.threadId)}catch(We){x(We instanceof Error?We.message:String(We))}},[W,d,y,b,ae,ue]),Re=ne.useCallback((re,ge,xe)=>{if(!xe){ie(Vd({id:re,text:ge}));return}(async()=>{try{const Tn=await Vd({id:re,text:ge});W(Tn.state),await ae(re)}catch(Tn){x(Tn instanceof Error?Tn.message:String(Tn))}})()},[W,ae,ie]),Ue=ne.useCallback(re=>{x(""),ae(re)},[ae]),Mt=ne.useCallback(()=>{x(""),G(!0),ie(ox(),{onError:()=>{G(!1)}})},[G,ie]),dn=ne.useCallback((re,ge)=>{ie(ax({id:re,resolved:ge}))},[ie]),Tt=ne.useCallback((re,ge)=>{ie(lx({id:re,collapsed:ge}))},[ie]),at=ne.useMemo(()=>yx(o.threads),[o.threads]),It=ne.useMemo(()=>c?{lineNumber:c.lineNumber,side:c.side,metadata:{type:"draft",draft:c}}:null,[c]),Ge=ne.useCallback(re=>{F(re),z(!0)},[]),Hn=ne.useCallback(()=>{z(!1)},[]),zt=ne.useCallback(async re=>{w(!0),z(!1),x("Returning review…");try{await sx(re),x("Review returned. You can close this tab.")}catch(ge){w(!1),x(ge instanceof Error?ge.message:String(ge))}},[]),Cu=ne.useCallback(()=>{zt("")},[zt]),Ar=ne.useCallback(()=>{zt(le)},[le,zt]);ne.useEffect(()=>{if(!U)return;const re=xe=>{const We=xe.target;We instanceof Node&&se.current?.contains(We)||z(!1)},ge=xe=>{xe.key==="Escape"&&z(!1)};return window.addEventListener("pointerdown",re),window.addEventListener("keydown",ge),()=>{window.removeEventListener("pointerdown",re),window.removeEventListener("keydown",ge)}},[U]);const Tr=ne.useCallback(async()=>{w(!0),x("Cancelling…");try{await ux(),x("Cancelled. You can close this tab.")}catch(re){w(!1),x(re instanceof Error?re.message:String(re))}},[]),Lr=ne.useCallback(()=>{if(He){k(!0);return}Mt()},[He,Mt]);return I.jsxs(I.Fragment,{children:[I.jsxs("div",{className:`app${o.sidebarOpen?" sidebar-open":""}`,children:[I.jsx(hM,{fileCount:L.length,viewedCount:o.viewedFileIds.length,additions:tt.additions,deletions:tt.deletions,commentCount:ce,diffCommand:e?.context.diffCommand,diffStyle:o.diffStyle,overflowMode:o.overflowMode,sidebarOpen:o.sidebarOpen,finished:S,status:D,briefLoading:o.brief.loading,hasBrief:He,hasUnresolvedFileThreads:Oe.length>0,onBriefClick:Lr,onToggleSidebar:()=>{q({sidebarOpen:!o.sidebarOpen})},onExpandAll:An,onExpandUnresolved:Cr,onCollapseViewed:wr,onCollapseAll:gt,onDiffStyleChange:re=>{q({diffStyle:re})},onOverflowModeChange:re=>{q({overflowMode:re})},onSubmit:Cu,onOpenSubmitPopover:Ge,onCancel:Tr}),I.jsx(J8,{open:o.sidebarOpen,files:L,viewed:X,threads:me,selectedThreadId:b?.mode==="thread"?b.threadId:null,onJumpToFile:At,onCreateDetachedThread:Ha,onOpenThread:Ua}),I.jsxs("main",{className:"content",children:[L.length===0&&I.jsx("div",{className:"empty",children:D||"loading…"}),L.map(re=>{const ge=at.get(re.id)??bM,xe=vx(ge,re.id,c,It);return I.jsx(W8,{file:re,diffStyle:o.diffStyle,overflowMode:o.overflowMode,codeTheme:o.codeTheme,collapsed:O[re.id]??!1,viewed:X[re.id]??!1,annotations:xe,unresolvedThreadCount:be.get(re.id)??0,onToggleCollapsed:jt,onToggleViewed:ut,onLineActivate:_i,onSaveDraft:Si,onCancelDraft:Ki,onAddReply:Re,onRequestAgent:Ue,onToggleResolved:dn,onToggleThreadCollapsed:Tt},re.id)})]})]}),I.jsx(tN,{open:T,content:o.brief.content,loading:o.brief.loading,onClose:()=>k(!1)}),U&&R?I.jsxs("div",{ref:se,className:"submit-popover",style:{top:R.bottom+6,right:window.innerWidth-R.right},children:[I.jsx("textarea",{className:"text-input-area submit-popover-input",value:le,onChange:re=>V(re.target.value),placeholder:"Optional message…",rows:5}),I.jsxs("div",{className:"submit-popover-actions",children:[I.jsx("button",{type:"button",className:"btn ghost",onClick:Hn,children:"cancel"}),I.jsx("button",{type:"button",className:"btn primary",disabled:S,onClick:Ar,children:"submit"})]})]}):null,I.jsx(nN,{open:b!==null,thread:Se,body:d,skipAgentResponse:y,onBodyChange:J,onSkipAgentResponseChange:g,onSubmit:_e,onClose:yt,onToggleResolved:re=>{Se&&dn(Se.id,re)}}),null]})}JE.createRoot(document.getElementById("root")).render(I.jsx(ne.StrictMode,{children:I.jsx(vM,{})}));