@xbghc/warden 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,192 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/scss-OYdSNvt2.js","assets/css-DPfMkruS.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/vue-DVfSmUF7.js","assets/typescript-BPQ3VLAy.js","assets/json-Cp-IABpG.js","assets/svelte-DZMnMd3x.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/cpp-BRuaLJcg.js","assets/c-BIGW1oBm.js","assets/sql-BLtJtn59.js","assets/php-Dhbhpdrm.js","assets/ruby-BGX7qA9Y.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/tsx-COt5Ahok.js","assets/shellscript-Yzrsuije.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/nginx-BpAMiNFr.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"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function zc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cu={exports:{}},ls={},_u={exports:{}},Le={};var np;function lk(){if(np)return Le;np=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function w(M){return M===null||typeof M!="object"?null:(M=m&&M[m]||M["@@iterator"],typeof M=="function"?M:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,_={};function A(M,G,N){this.props=M,this.context=G,this.refs=_,this.updater=N||v}A.prototype.isReactComponent={},A.prototype.setState=function(M,G){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,G,"setState")},A.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function S(){}S.prototype=A.prototype;function b(M,G,N){this.props=M,this.context=G,this.refs=_,this.updater=N||v}var T=b.prototype=new S;T.constructor=b,k(T,A.prototype),T.isPureReactComponent=!0;var $=Array.isArray,j=Object.prototype.hasOwnProperty,P={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function ie(M,G,N){var we,Ie={},me=null,Oe=null;if(G!=null)for(we in G.ref!==void 0&&(Oe=G.ref),G.key!==void 0&&(me=""+G.key),G)j.call(G,we)&&!H.hasOwnProperty(we)&&(Ie[we]=G[we]);var Ae=arguments.length-2;if(Ae===1)Ie.children=N;else if(1<Ae){for(var je=Array(Ae),Qe=0;Qe<Ae;Qe++)je[Qe]=arguments[Qe+2];Ie.children=je}if(M&&M.defaultProps)for(we in Ae=M.defaultProps,Ae)Ie[we]===void 0&&(Ie[we]=Ae[we]);return{$$typeof:e,type:M,key:me,ref:Oe,props:Ie,_owner:P.current}}function ue(M,G){return{$$typeof:e,type:M.type,key:G,ref:M.ref,props:M.props,_owner:M._owner}}function R(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function X(M){var G={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(N){return G[N]})}var ne=/\/+/g;function de(M,G){return typeof M=="object"&&M!==null&&M.key!=null?X(""+M.key):G.toString(36)}function te(M,G,N,we,Ie){var me=typeof M;(me==="undefined"||me==="boolean")&&(M=null);var Oe=!1;if(M===null)Oe=!0;else switch(me){case"string":case"number":Oe=!0;break;case"object":switch(M.$$typeof){case e:case t:Oe=!0}}if(Oe)return Oe=M,Ie=Ie(Oe),M=we===""?"."+de(Oe,0):we,$(Ie)?(N="",M!=null&&(N=M.replace(ne,"$&/")+"/"),te(Ie,G,N,"",function(Qe){return Qe})):Ie!=null&&(R(Ie)&&(Ie=ue(Ie,N+(!Ie.key||Oe&&Oe.key===Ie.key?"":(""+Ie.key).replace(ne,"$&/")+"/")+M)),G.push(Ie)),1;if(Oe=0,we=we===""?".":we+":",$(M))for(var Ae=0;Ae<M.length;Ae++){me=M[Ae];var je=we+de(me,Ae);Oe+=te(me,G,N,je,Ie)}else if(je=w(M),typeof je=="function")for(M=je.call(M),Ae=0;!(me=M.next()).done;)me=me.value,je=we+de(me,Ae++),Oe+=te(me,G,N,je,Ie);else if(me==="object")throw G=String(M),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return Oe}function Q(M,G,N){if(M==null)return M;var we=[],Ie=0;return te(M,we,"","",function(me){return G.call(N,me,Ie++)}),we}function pe(M){if(M._status===-1){var G=M._result;G=G(),G.then(function(N){(M._status===0||M._status===-1)&&(M._status=1,M._result=N)},function(N){(M._status===0||M._status===-1)&&(M._status=2,M._result=N)}),M._status===-1&&(M._status=0,M._result=G)}if(M._status===1)return M._result.default;throw M._result}var ge={current:null},ee={transition:null},ce={ReactCurrentDispatcher:ge,ReactCurrentBatchConfig:ee,ReactCurrentOwner:P};function E(){throw Error("act(...) is not supported in production builds of React.")}return Le.Children={map:Q,forEach:function(M,G,N){Q(M,function(){G.apply(this,arguments)},N)},count:function(M){var G=0;return Q(M,function(){G++}),G},toArray:function(M){return Q(M,function(G){return G})||[]},only:function(M){if(!R(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Le.Component=A,Le.Fragment=n,Le.Profiler=o,Le.PureComponent=b,Le.StrictMode=i,Le.Suspense=f,Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ce,Le.act=E,Le.cloneElement=function(M,G,N){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var we=k({},M.props),Ie=M.key,me=M.ref,Oe=M._owner;if(G!=null){if(G.ref!==void 0&&(me=G.ref,Oe=P.current),G.key!==void 0&&(Ie=""+G.key),M.type&&M.type.defaultProps)var Ae=M.type.defaultProps;for(je in G)j.call(G,je)&&!H.hasOwnProperty(je)&&(we[je]=G[je]===void 0&&Ae!==void 0?Ae[je]:G[je])}var je=arguments.length-2;if(je===1)we.children=N;else if(1<je){Ae=Array(je);for(var Qe=0;Qe<je;Qe++)Ae[Qe]=arguments[Qe+2];we.children=Ae}return{$$typeof:e,type:M.type,key:Ie,ref:me,props:we,_owner:Oe}},Le.createContext=function(M){return M={$$typeof:a,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:l,_context:M},M.Consumer=M},Le.createElement=ie,Le.createFactory=function(M){var G=ie.bind(null,M);return G.type=M,G},Le.createRef=function(){return{current:null}},Le.forwardRef=function(M){return{$$typeof:c,render:M}},Le.isValidElement=R,Le.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:pe}},Le.memo=function(M,G){return{$$typeof:h,type:M,compare:G===void 0?null:G}},Le.startTransition=function(M){var G=ee.transition;ee.transition={};try{M()}finally{ee.transition=G}},Le.unstable_act=E,Le.useCallback=function(M,G){return ge.current.useCallback(M,G)},Le.useContext=function(M){return ge.current.useContext(M)},Le.useDebugValue=function(){},Le.useDeferredValue=function(M){return ge.current.useDeferredValue(M)},Le.useEffect=function(M,G){return ge.current.useEffect(M,G)},Le.useId=function(){return ge.current.useId()},Le.useImperativeHandle=function(M,G,N){return ge.current.useImperativeHandle(M,G,N)},Le.useInsertionEffect=function(M,G){return ge.current.useInsertionEffect(M,G)},Le.useLayoutEffect=function(M,G){return ge.current.useLayoutEffect(M,G)},Le.useMemo=function(M,G){return ge.current.useMemo(M,G)},Le.useReducer=function(M,G,N){return ge.current.useReducer(M,G,N)},Le.useRef=function(M){return ge.current.useRef(M)},Le.useState=function(M){return ge.current.useState(M)},Le.useSyncExternalStore=function(M,G,N){return ge.current.useSyncExternalStore(M,G,N)},Le.useTransition=function(){return ge.current.useTransition()},Le.version="18.3.1",Le}var rp;function $c(){return rp||(rp=1,_u.exports=lk()),_u.exports}var ip;function ak(){if(ip)return ls;ip=1;var e=$c(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(c,f,h){var p,m={},w=null,v=null;h!==void 0&&(w=""+h),f.key!==void 0&&(w=""+f.key),f.ref!==void 0&&(v=f.ref);for(p in f)i.call(f,p)&&!l.hasOwnProperty(p)&&(m[p]=f[p]);if(c&&c.defaultProps)for(p in f=c.defaultProps,f)m[p]===void 0&&(m[p]=f[p]);return{$$typeof:t,type:c,key:w,ref:v,props:m,_owner:o.current}}return ls.Fragment=n,ls.jsx=a,ls.jsxs=a,ls}var sp;function uk(){return sp||(sp=1,Cu.exports=ak()),Cu.exports}var C=uk(),se=$c();const ps=zc(se);var Vo={},Eu={exports:{}},Ft={},bu={exports:{}},Iu={};var op;function ck(){return op||(op=1,(function(e){function t(ee,ce){var E=ee.length;ee.push(ce);e:for(;0<E;){var M=E-1>>>1,G=ee[M];if(0<o(G,ce))ee[M]=ce,ee[E]=G,E=M;else break e}}function n(ee){return ee.length===0?null:ee[0]}function i(ee){if(ee.length===0)return null;var ce=ee[0],E=ee.pop();if(E!==ce){ee[0]=E;e:for(var M=0,G=ee.length,N=G>>>1;M<N;){var we=2*(M+1)-1,Ie=ee[we],me=we+1,Oe=ee[me];if(0>o(Ie,E))me<G&&0>o(Oe,Ie)?(ee[M]=Oe,ee[me]=E,M=me):(ee[M]=Ie,ee[we]=E,M=we);else if(me<G&&0>o(Oe,E))ee[M]=Oe,ee[me]=E,M=me;else break e}}return ce}function o(ee,ce){var E=ee.sortIndex-ce.sortIndex;return E!==0?E:ee.id-ce.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var f=[],h=[],p=1,m=null,w=3,v=!1,k=!1,_=!1,A=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(ee){for(var ce=n(h);ce!==null;){if(ce.callback===null)i(h);else if(ce.startTime<=ee)i(h),ce.sortIndex=ce.expirationTime,t(f,ce);else break;ce=n(h)}}function $(ee){if(_=!1,T(ee),!k)if(n(f)!==null)k=!0,pe(j);else{var ce=n(h);ce!==null&&ge($,ce.startTime-ee)}}function j(ee,ce){k=!1,_&&(_=!1,S(ie),ie=-1),v=!0;var E=w;try{for(T(ce),m=n(f);m!==null&&(!(m.expirationTime>ce)||ee&&!X());){var M=m.callback;if(typeof M=="function"){m.callback=null,w=m.priorityLevel;var G=M(m.expirationTime<=ce);ce=e.unstable_now(),typeof G=="function"?m.callback=G:m===n(f)&&i(f),T(ce)}else i(f);m=n(f)}if(m!==null)var N=!0;else{var we=n(h);we!==null&&ge($,we.startTime-ce),N=!1}return N}finally{m=null,w=E,v=!1}}var P=!1,H=null,ie=-1,ue=5,R=-1;function X(){return!(e.unstable_now()-R<ue)}function ne(){if(H!==null){var ee=e.unstable_now();R=ee;var ce=!0;try{ce=H(!0,ee)}finally{ce?de():(P=!1,H=null)}}else P=!1}var de;if(typeof b=="function")de=function(){b(ne)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,Q=te.port2;te.port1.onmessage=ne,de=function(){Q.postMessage(null)}}else de=function(){A(ne,0)};function pe(ee){H=ee,P||(P=!0,de())}function ge(ee,ce){ie=A(function(){ee(e.unstable_now())},ce)}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(ee){ee.callback=null},e.unstable_continueExecution=function(){k||v||(k=!0,pe(j))},e.unstable_forceFrameRate=function(ee){0>ee||125<ee?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ue=0<ee?Math.floor(1e3/ee):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(ee){switch(w){case 1:case 2:case 3:var ce=3;break;default:ce=w}var E=w;w=ce;try{return ee()}finally{w=E}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(ee,ce){switch(ee){case 1:case 2:case 3:case 4:case 5:break;default:ee=3}var E=w;w=ee;try{return ce()}finally{w=E}},e.unstable_scheduleCallback=function(ee,ce,E){var M=e.unstable_now();switch(typeof E=="object"&&E!==null?(E=E.delay,E=typeof E=="number"&&0<E?M+E:M):E=M,ee){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=E+G,ee={id:p++,callback:ce,priorityLevel:ee,startTime:E,expirationTime:G,sortIndex:-1},E>M?(ee.sortIndex=E,t(h,ee),n(f)===null&&ee===n(h)&&(_?(S(ie),ie=-1):_=!0,ge($,E-M))):(ee.sortIndex=G,t(f,ee),k||v||(k=!0,pe(j))),ee},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(ee){var ce=w;return function(){var E=w;w=ce;try{return ee.apply(this,arguments)}finally{w=E}}}})(Iu)),Iu}var lp;function fk(){return lp||(lp=1,bu.exports=ck()),bu.exports}var ap;function dk(){if(ap)return Ft;ap=1;var e=$c(),t=fk();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,o={};function l(r,s){a(r,s),a(r+"Capture",s)}function a(r,s){for(o[r]=s,r=0;r<s.length;r++)i.add(s[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[: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]*$/,p={},m={};function w(r){return f.call(m,r)?!0:f.call(p,r)?!1:h.test(r)?m[r]=!0:(p[r]=!0,!1)}function v(r,s,u,d){if(u!==null&&u.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return d?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function k(r,s,u,d){if(s===null||typeof s>"u"||v(r,s,u,d))return!0;if(d)return!1;if(u!==null)switch(u.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function _(r,s,u,d,g,y,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=d,this.attributeNamespace=g,this.mustUseProperty=u,this.propertyName=r,this.type=s,this.sanitizeURL=y,this.removeEmptyString=x}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){A[r]=new _(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];A[s]=new _(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){A[r]=new _(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){A[r]=new _(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){A[r]=new _(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){A[r]=new _(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){A[r]=new _(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){A[r]=new _(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){A[r]=new _(r,5,!1,r.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function b(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var s=r.replace(S,b);A[s]=new _(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(S,b);A[s]=new _(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(S,b);A[s]=new _(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){A[r]=new _(r,1,!1,r.toLowerCase(),null,!1,!1)}),A.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){A[r]=new _(r,1,!1,r.toLowerCase(),null,!0,!0)});function T(r,s,u,d){var g=A.hasOwnProperty(s)?A[s]:null;(g!==null?g.type!==0:d||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(k(s,u,g,d)&&(u=null),d||g===null?w(s)&&(u===null?r.removeAttribute(s):r.setAttribute(s,""+u)):g.mustUseProperty?r[g.propertyName]=u===null?g.type===3?!1:"":u:(s=g.attributeName,d=g.attributeNamespace,u===null?r.removeAttribute(s):(g=g.type,u=g===3||g===4&&u===!0?"":""+u,d?r.setAttributeNS(d,s,u):r.setAttribute(s,u))))}var $=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,j=Symbol.for("react.element"),P=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),ue=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),X=Symbol.for("react.context"),ne=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),ge=Symbol.for("react.offscreen"),ee=Symbol.iterator;function ce(r){return r===null||typeof r!="object"?null:(r=ee&&r[ee]||r["@@iterator"],typeof r=="function"?r:null)}var E=Object.assign,M;function G(r){if(M===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);M=s&&s[1]||""}return`
3
- `+M+r}var N=!1;function we(r,s){if(!r||N)return"";N=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(z){var d=z}Reflect.construct(r,[],s)}else{try{s.call()}catch(z){d=z}r.call(s.prototype)}else{try{throw Error()}catch(z){d=z}r()}}catch(z){if(z&&d&&typeof z.stack=="string"){for(var g=z.stack.split(`
4
- `),y=d.stack.split(`
5
- `),x=g.length-1,I=y.length-1;1<=x&&0<=I&&g[x]!==y[I];)I--;for(;1<=x&&0<=I;x--,I--)if(g[x]!==y[I]){if(x!==1||I!==1)do if(x--,I--,0>I||g[x]!==y[I]){var L=`
6
- `+g[x].replace(" at new "," at ");return r.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",r.displayName)),L}while(1<=x&&0<=I);break}}}finally{N=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?G(r):""}function Ie(r){switch(r.tag){case 5:return G(r.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return r=we(r.type,!1),r;case 11:return r=we(r.type.render,!1),r;case 1:return r=we(r.type,!0),r;default:return""}}function me(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case H:return"Fragment";case P:return"Portal";case ue:return"Profiler";case ie:return"StrictMode";case de:return"Suspense";case te:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case X:return(r.displayName||"Context")+".Consumer";case R:return(r._context.displayName||"Context")+".Provider";case ne:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case Q:return s=r.displayName||null,s!==null?s:me(r.type)||"Memo";case pe:s=r._payload,r=r._init;try{return me(r(s))}catch{}}return null}function Oe(r){var s=r.type;switch(r.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=s.render,r=r.displayName||r.name||"",s.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return me(s);case 8:return s===ie?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ae(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function je(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Qe(r){var s=je(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),d=""+r[s];if(!r.hasOwnProperty(s)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var g=u.get,y=u.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return g.call(this)},set:function(x){d=""+x,y.call(this,x)}}),Object.defineProperty(r,s,{enumerable:u.enumerable}),{getValue:function(){return d},setValue:function(x){d=""+x},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function on(r){r._valueTracker||(r._valueTracker=Qe(r))}function Fr(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var u=s.getValue(),d="";return r&&(d=je(r)?r.checked?"true":"false":r.value),r=d,r!==u?(s.setValue(r),!0):!1}function B(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function K(r,s){var u=s.checked;return E({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function ye(r,s){var u=s.defaultValue==null?"":s.defaultValue,d=s.checked!=null?s.checked:s.defaultChecked;u=Ae(s.value!=null?s.value:u),r._wrapperState={initialChecked:d,initialValue:u,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function _e(r,s){s=s.checked,s!=null&&T(r,"checked",s,!1)}function De(r,s){_e(r,s);var u=Ae(s.value),d=s.type;if(u!=null)d==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(d==="submit"||d==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?Xe(r,s.type,u):s.hasOwnProperty("defaultValue")&&Xe(r,s.type,Ae(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function Te(r,s,u){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var d=s.type;if(!(d!=="submit"&&d!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+r._wrapperState.initialValue,u||s===r.value||(r.value=s),r.defaultValue=s}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function Xe(r,s,u){(s!=="number"||B(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var st=Array.isArray;function We(r,s,u,d){if(r=r.options,s){s={};for(var g=0;g<u.length;g++)s["$"+u[g]]=!0;for(u=0;u<r.length;u++)g=s.hasOwnProperty("$"+r[u].value),r[u].selected!==g&&(r[u].selected=g),g&&d&&(r[u].defaultSelected=!0)}else{for(u=""+Ae(u),s=null,g=0;g<r.length;g++){if(r[g].value===u){r[g].selected=!0,d&&(r[g].defaultSelected=!0);return}s!==null||r[g].disabled||(s=r[g])}s!==null&&(s.selected=!0)}}function bn(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return E({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function fr(r,s){var u=s.value;if(u==null){if(u=s.children,s=s.defaultValue,u!=null){if(s!=null)throw Error(n(92));if(st(u)){if(1<u.length)throw Error(n(93));u=u[0]}s=u}s==null&&(s=""),u=s}r._wrapperState={initialValue:Ae(u)}}function Os(r,s){var u=Ae(s.value),d=Ae(s.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),s.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),d!=null&&(r.defaultValue=""+d)}function Ms(r){var s=r.textContent;s===r._wrapperState.initialValue&&s!==""&&s!==null&&(r.value=s)}function U(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function re(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?U(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Se,Pe=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,u,d,g){MSApp.execUnsafeLocalFunction(function(){return r(s,u,d,g)})}:r})(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(Se=Se||document.createElement("div"),Se.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Se.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function Fe(r,s){if(s){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=s;return}}r.textContent=s}var yt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},In=["Webkit","ms","Moz","O"];Object.keys(yt).forEach(function(r){In.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),yt[s]=yt[r]})});function Kt(r,s,u){return s==null||typeof s=="boolean"||s===""?"":u||typeof s!="number"||s===0||yt.hasOwnProperty(r)&&yt[r]?(""+s).trim():s+"px"}function $n(r,s){r=r.style;for(var u in s)if(s.hasOwnProperty(u)){var d=u.indexOf("--")===0,g=Kt(u,s[u],d);u==="float"&&(u="cssFloat"),d?r.setProperty(u,g):r[u]=g}}var dr=E({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wt(r,s){if(s){if(dr[r]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function yn(r,s){if(r.indexOf("-")===-1)return typeof s.is=="string";switch(r){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 Bt=null;function Fl(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var zl=null,zr=null,$r=null;function vf(r){if(r=Hi(r)){if(typeof zl!="function")throw Error(n(280));var s=r.stateNode;s&&(s=io(s),zl(r.stateNode,r.type,s))}}function kf(r){zr?$r?$r.push(r):$r=[r]:zr=r}function xf(){if(zr){var r=zr,s=$r;if($r=zr=null,vf(r),s)for(r=0;r<s.length;r++)vf(s[r])}}function Sf(r,s){return r(s)}function Cf(){}var $l=!1;function _f(r,s,u){if($l)return r(s,u);$l=!0;try{return Sf(r,s,u)}finally{$l=!1,(zr!==null||$r!==null)&&(Cf(),xf())}}function Ei(r,s){var u=r.stateNode;if(u===null)return null;var d=io(u);if(d===null)return null;u=d[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,s,typeof u));return u}var Bl=!1;if(c)try{var bi={};Object.defineProperty(bi,"passive",{get:function(){Bl=!0}}),window.addEventListener("test",bi,bi),window.removeEventListener("test",bi,bi)}catch{Bl=!1}function hw(r,s,u,d,g,y,x,I,L){var z=Array.prototype.slice.call(arguments,3);try{s.apply(u,z)}catch(W){this.onError(W)}}var Ii=!1,js=null,Ds=!1,Ul=null,pw={onError:function(r){Ii=!0,js=r}};function mw(r,s,u,d,g,y,x,I,L){Ii=!1,js=null,hw.apply(pw,arguments)}function gw(r,s,u,d,g,y,x,I,L){if(mw.apply(this,arguments),Ii){if(Ii){var z=js;Ii=!1,js=null}else throw Error(n(198));Ds||(Ds=!0,Ul=z)}}function hr(r){var s=r,u=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(u=s.return),r=s.return;while(r)}return s.tag===3?u:null}function Ef(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function bf(r){if(hr(r)!==r)throw Error(n(188))}function yw(r){var s=r.alternate;if(!s){if(s=hr(r),s===null)throw Error(n(188));return s!==r?null:r}for(var u=r,d=s;;){var g=u.return;if(g===null)break;var y=g.alternate;if(y===null){if(d=g.return,d!==null){u=d;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===u)return bf(g),r;if(y===d)return bf(g),s;y=y.sibling}throw Error(n(188))}if(u.return!==d.return)u=g,d=y;else{for(var x=!1,I=g.child;I;){if(I===u){x=!0,u=g,d=y;break}if(I===d){x=!0,d=g,u=y;break}I=I.sibling}if(!x){for(I=y.child;I;){if(I===u){x=!0,u=y,d=g;break}if(I===d){x=!0,d=y,u=g;break}I=I.sibling}if(!x)throw Error(n(189))}}if(u.alternate!==d)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:s}function If(r){return r=yw(r),r!==null?Nf(r):null}function Nf(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=Nf(r);if(s!==null)return s;r=r.sibling}return null}var Af=t.unstable_scheduleCallback,Tf=t.unstable_cancelCallback,ww=t.unstable_shouldYield,vw=t.unstable_requestPaint,tt=t.unstable_now,kw=t.unstable_getCurrentPriorityLevel,Gl=t.unstable_ImmediatePriority,Pf=t.unstable_UserBlockingPriority,Fs=t.unstable_NormalPriority,xw=t.unstable_LowPriority,Lf=t.unstable_IdlePriority,zs=null,wn=null;function Sw(r){if(wn&&typeof wn.onCommitFiberRoot=="function")try{wn.onCommitFiberRoot(zs,r,void 0,(r.current.flags&128)===128)}catch{}}var ln=Math.clz32?Math.clz32:Ew,Cw=Math.log,_w=Math.LN2;function Ew(r){return r>>>=0,r===0?32:31-(Cw(r)/_w|0)|0}var $s=64,Bs=4194304;function Ni(r){switch(r&-r){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: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Us(r,s){var u=r.pendingLanes;if(u===0)return 0;var d=0,g=r.suspendedLanes,y=r.pingedLanes,x=u&268435455;if(x!==0){var I=x&~g;I!==0?d=Ni(I):(y&=x,y!==0&&(d=Ni(y)))}else x=u&~g,x!==0?d=Ni(x):y!==0&&(d=Ni(y));if(d===0)return 0;if(s!==0&&s!==d&&(s&g)===0&&(g=d&-d,y=s&-s,g>=y||g===16&&(y&4194240)!==0))return s;if((d&4)!==0&&(d|=u&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=d;0<s;)u=31-ln(s),g=1<<u,d|=r[u],s&=~g;return d}function bw(r,s){switch(r){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64: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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Iw(r,s){for(var u=r.suspendedLanes,d=r.pingedLanes,g=r.expirationTimes,y=r.pendingLanes;0<y;){var x=31-ln(y),I=1<<x,L=g[x];L===-1?((I&u)===0||(I&d)!==0)&&(g[x]=bw(I,s)):L<=s&&(r.expiredLanes|=I),y&=~I}}function Vl(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Rf(){var r=$s;return $s<<=1,($s&4194240)===0&&($s=64),r}function Wl(r){for(var s=[],u=0;31>u;u++)s.push(r);return s}function Ai(r,s,u){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-ln(s),r[s]=u}function Nw(r,s){var u=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s,s=r.entanglements;var d=r.eventTimes;for(r=r.expirationTimes;0<u;){var g=31-ln(u),y=1<<g;s[g]=0,d[g]=-1,r[g]=-1,u&=~y}}function Hl(r,s){var u=r.entangledLanes|=s;for(r=r.entanglements;u;){var d=31-ln(u),g=1<<d;g&s|r[d]&s&&(r[d]|=s),u&=~g}}var Be=0;function Of(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var Mf,ql,jf,Df,Ff,Kl=!1,Gs=[],Bn=null,Un=null,Gn=null,Ti=new Map,Pi=new Map,Vn=[],Aw="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 submit".split(" ");function zf(r,s){switch(r){case"focusin":case"focusout":Bn=null;break;case"dragenter":case"dragleave":Un=null;break;case"mouseover":case"mouseout":Gn=null;break;case"pointerover":case"pointerout":Ti.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pi.delete(s.pointerId)}}function Li(r,s,u,d,g,y){return r===null||r.nativeEvent!==y?(r={blockedOn:s,domEventName:u,eventSystemFlags:d,nativeEvent:y,targetContainers:[g]},s!==null&&(s=Hi(s),s!==null&&ql(s)),r):(r.eventSystemFlags|=d,s=r.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),r)}function Tw(r,s,u,d,g){switch(s){case"focusin":return Bn=Li(Bn,r,s,u,d,g),!0;case"dragenter":return Un=Li(Un,r,s,u,d,g),!0;case"mouseover":return Gn=Li(Gn,r,s,u,d,g),!0;case"pointerover":var y=g.pointerId;return Ti.set(y,Li(Ti.get(y)||null,r,s,u,d,g)),!0;case"gotpointercapture":return y=g.pointerId,Pi.set(y,Li(Pi.get(y)||null,r,s,u,d,g)),!0}return!1}function $f(r){var s=pr(r.target);if(s!==null){var u=hr(s);if(u!==null){if(s=u.tag,s===13){if(s=Ef(u),s!==null){r.blockedOn=s,Ff(r.priority,function(){jf(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Vs(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var u=Xl(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var d=new u.constructor(u.type,u);Bt=d,u.target.dispatchEvent(d),Bt=null}else return s=Hi(u),s!==null&&ql(s),r.blockedOn=u,!1;s.shift()}return!0}function Bf(r,s,u){Vs(r)&&u.delete(s)}function Pw(){Kl=!1,Bn!==null&&Vs(Bn)&&(Bn=null),Un!==null&&Vs(Un)&&(Un=null),Gn!==null&&Vs(Gn)&&(Gn=null),Ti.forEach(Bf),Pi.forEach(Bf)}function Ri(r,s){r.blockedOn===s&&(r.blockedOn=null,Kl||(Kl=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Pw)))}function Oi(r){function s(g){return Ri(g,r)}if(0<Gs.length){Ri(Gs[0],r);for(var u=1;u<Gs.length;u++){var d=Gs[u];d.blockedOn===r&&(d.blockedOn=null)}}for(Bn!==null&&Ri(Bn,r),Un!==null&&Ri(Un,r),Gn!==null&&Ri(Gn,r),Ti.forEach(s),Pi.forEach(s),u=0;u<Vn.length;u++)d=Vn[u],d.blockedOn===r&&(d.blockedOn=null);for(;0<Vn.length&&(u=Vn[0],u.blockedOn===null);)$f(u),u.blockedOn===null&&Vn.shift()}var Br=$.ReactCurrentBatchConfig,Ws=!0;function Lw(r,s,u,d){var g=Be,y=Br.transition;Br.transition=null;try{Be=1,Ql(r,s,u,d)}finally{Be=g,Br.transition=y}}function Rw(r,s,u,d){var g=Be,y=Br.transition;Br.transition=null;try{Be=4,Ql(r,s,u,d)}finally{Be=g,Br.transition=y}}function Ql(r,s,u,d){if(Ws){var g=Xl(r,s,u,d);if(g===null)ha(r,s,d,Hs,u),zf(r,d);else if(Tw(g,r,s,u,d))d.stopPropagation();else if(zf(r,d),s&4&&-1<Aw.indexOf(r)){for(;g!==null;){var y=Hi(g);if(y!==null&&Mf(y),y=Xl(r,s,u,d),y===null&&ha(r,s,d,Hs,u),y===g)break;g=y}g!==null&&d.stopPropagation()}else ha(r,s,d,null,u)}}var Hs=null;function Xl(r,s,u,d){if(Hs=null,r=Fl(d),r=pr(r),r!==null)if(s=hr(r),s===null)r=null;else if(u=s.tag,u===13){if(r=Ef(s),r!==null)return r;r=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null);return Hs=r,null}function Uf(r){switch(r){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(kw()){case Gl:return 1;case Pf:return 4;case Fs:case xw:return 16;case Lf:return 536870912;default:return 16}default:return 16}}var Wn=null,Yl=null,qs=null;function Gf(){if(qs)return qs;var r,s=Yl,u=s.length,d,g="value"in Wn?Wn.value:Wn.textContent,y=g.length;for(r=0;r<u&&s[r]===g[r];r++);var x=u-r;for(d=1;d<=x&&s[u-d]===g[y-d];d++);return qs=g.slice(r,1<d?1-d:void 0)}function Ks(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function Qs(){return!0}function Vf(){return!1}function Ut(r){function s(u,d,g,y,x){this._reactName=u,this._targetInst=g,this.type=d,this.nativeEvent=y,this.target=x,this.currentTarget=null;for(var I in r)r.hasOwnProperty(I)&&(u=r[I],this[I]=u?u(y):y[I]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Qs:Vf,this.isPropagationStopped=Vf,this}return E(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Qs)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Qs)},persist:function(){},isPersistent:Qs}),s}var Ur={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jl=Ut(Ur),Mi=E({},Ur,{view:0,detail:0}),Ow=Ut(Mi),Zl,ea,ji,Xs=E({},Mi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:na,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==ji&&(ji&&r.type==="mousemove"?(Zl=r.screenX-ji.screenX,ea=r.screenY-ji.screenY):ea=Zl=0,ji=r),Zl)},movementY:function(r){return"movementY"in r?r.movementY:ea}}),Wf=Ut(Xs),Mw=E({},Xs,{dataTransfer:0}),jw=Ut(Mw),Dw=E({},Mi,{relatedTarget:0}),ta=Ut(Dw),Fw=E({},Ur,{animationName:0,elapsedTime:0,pseudoElement:0}),zw=Ut(Fw),$w=E({},Ur,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Bw=Ut($w),Uw=E({},Ur,{data:0}),Hf=Ut(Uw),Gw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Vw={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"},Ww={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Hw(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=Ww[r])?!!s[r]:!1}function na(){return Hw}var qw=E({},Mi,{key:function(r){if(r.key){var s=Gw[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=Ks(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?Vw[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:na,charCode:function(r){return r.type==="keypress"?Ks(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Ks(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),Kw=Ut(qw),Qw=E({},Xs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qf=Ut(Qw),Xw=E({},Mi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:na}),Yw=Ut(Xw),Jw=E({},Ur,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zw=Ut(Jw),ev=E({},Xs,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),tv=Ut(ev),nv=[9,13,27,32],ra=c&&"CompositionEvent"in window,Di=null;c&&"documentMode"in document&&(Di=document.documentMode);var rv=c&&"TextEvent"in window&&!Di,Kf=c&&(!ra||Di&&8<Di&&11>=Di),Qf=" ",Xf=!1;function Yf(r,s){switch(r){case"keyup":return nv.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jf(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Gr=!1;function iv(r,s){switch(r){case"compositionend":return Jf(s);case"keypress":return s.which!==32?null:(Xf=!0,Qf);case"textInput":return r=s.data,r===Qf&&Xf?null:r;default:return null}}function sv(r,s){if(Gr)return r==="compositionend"||!ra&&Yf(r,s)?(r=Gf(),qs=Yl=Wn=null,Gr=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Kf&&s.locale!=="ko"?null:s.data;default:return null}}var ov={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 Zf(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!ov[r.type]:s==="textarea"}function ed(r,s,u,d){kf(d),s=to(s,"onChange"),0<s.length&&(u=new Jl("onChange","change",null,u,d),r.push({event:u,listeners:s}))}var Fi=null,zi=null;function lv(r){wd(r,0)}function Ys(r){var s=Kr(r);if(Fr(s))return r}function av(r,s){if(r==="change")return s}var td=!1;if(c){var ia;if(c){var sa="oninput"in document;if(!sa){var nd=document.createElement("div");nd.setAttribute("oninput","return;"),sa=typeof nd.oninput=="function"}ia=sa}else ia=!1;td=ia&&(!document.documentMode||9<document.documentMode)}function rd(){Fi&&(Fi.detachEvent("onpropertychange",id),zi=Fi=null)}function id(r){if(r.propertyName==="value"&&Ys(zi)){var s=[];ed(s,zi,r,Fl(r)),_f(lv,s)}}function uv(r,s,u){r==="focusin"?(rd(),Fi=s,zi=u,Fi.attachEvent("onpropertychange",id)):r==="focusout"&&rd()}function cv(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Ys(zi)}function fv(r,s){if(r==="click")return Ys(s)}function dv(r,s){if(r==="input"||r==="change")return Ys(s)}function hv(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var an=typeof Object.is=="function"?Object.is:hv;function $i(r,s){if(an(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var u=Object.keys(r),d=Object.keys(s);if(u.length!==d.length)return!1;for(d=0;d<u.length;d++){var g=u[d];if(!f.call(s,g)||!an(r[g],s[g]))return!1}return!0}function sd(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function od(r,s){var u=sd(r);r=0;for(var d;u;){if(u.nodeType===3){if(d=r+u.textContent.length,r<=s&&d>=s)return{node:u,offset:s-r};r=d}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=sd(u)}}function ld(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?ld(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function ad(){for(var r=window,s=B();s instanceof r.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)r=s.contentWindow;else break;s=B(r.document)}return s}function oa(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}function pv(r){var s=ad(),u=r.focusedElem,d=r.selectionRange;if(s!==u&&u&&u.ownerDocument&&ld(u.ownerDocument.documentElement,u)){if(d!==null&&oa(u)){if(s=d.start,r=d.end,r===void 0&&(r=s),"selectionStart"in u)u.selectionStart=s,u.selectionEnd=Math.min(r,u.value.length);else if(r=(s=u.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var g=u.textContent.length,y=Math.min(d.start,g);d=d.end===void 0?y:Math.min(d.end,g),!r.extend&&y>d&&(g=d,d=y,y=g),g=od(u,y);var x=od(u,d);g&&x&&(r.rangeCount!==1||r.anchorNode!==g.node||r.anchorOffset!==g.offset||r.focusNode!==x.node||r.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),r.removeAllRanges(),y>d?(r.addRange(s),r.extend(x.node,x.offset)):(s.setEnd(x.node,x.offset),r.addRange(s)))}}for(s=[],r=u;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<s.length;u++)r=s[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var mv=c&&"documentMode"in document&&11>=document.documentMode,Vr=null,la=null,Bi=null,aa=!1;function ud(r,s,u){var d=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;aa||Vr==null||Vr!==B(d)||(d=Vr,"selectionStart"in d&&oa(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Bi&&$i(Bi,d)||(Bi=d,d=to(la,"onSelect"),0<d.length&&(s=new Jl("onSelect","select",null,s,u),r.push({event:s,listeners:d}),s.target=Vr)))}function Js(r,s){var u={};return u[r.toLowerCase()]=s.toLowerCase(),u["Webkit"+r]="webkit"+s,u["Moz"+r]="moz"+s,u}var Wr={animationend:Js("Animation","AnimationEnd"),animationiteration:Js("Animation","AnimationIteration"),animationstart:Js("Animation","AnimationStart"),transitionend:Js("Transition","TransitionEnd")},ua={},cd={};c&&(cd=document.createElement("div").style,"AnimationEvent"in window||(delete Wr.animationend.animation,delete Wr.animationiteration.animation,delete Wr.animationstart.animation),"TransitionEvent"in window||delete Wr.transitionend.transition);function Zs(r){if(ua[r])return ua[r];if(!Wr[r])return r;var s=Wr[r],u;for(u in s)if(s.hasOwnProperty(u)&&u in cd)return ua[r]=s[u];return r}var fd=Zs("animationend"),dd=Zs("animationiteration"),hd=Zs("animationstart"),pd=Zs("transitionend"),md=new Map,gd="abort auxClick 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(" ");function Hn(r,s){md.set(r,s),l(s,[r])}for(var ca=0;ca<gd.length;ca++){var fa=gd[ca],gv=fa.toLowerCase(),yv=fa[0].toUpperCase()+fa.slice(1);Hn(gv,"on"+yv)}Hn(fd,"onAnimationEnd"),Hn(dd,"onAnimationIteration"),Hn(hd,"onAnimationStart"),Hn("dblclick","onDoubleClick"),Hn("focusin","onFocus"),Hn("focusout","onBlur"),Hn(pd,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ui="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(" "),wv=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ui));function yd(r,s,u){var d=r.type||"unknown-event";r.currentTarget=u,gw(d,s,void 0,r),r.currentTarget=null}function wd(r,s){s=(s&4)!==0;for(var u=0;u<r.length;u++){var d=r[u],g=d.event;d=d.listeners;e:{var y=void 0;if(s)for(var x=d.length-1;0<=x;x--){var I=d[x],L=I.instance,z=I.currentTarget;if(I=I.listener,L!==y&&g.isPropagationStopped())break e;yd(g,I,z),y=L}else for(x=0;x<d.length;x++){if(I=d[x],L=I.instance,z=I.currentTarget,I=I.listener,L!==y&&g.isPropagationStopped())break e;yd(g,I,z),y=L}}}if(Ds)throw r=Ul,Ds=!1,Ul=null,r}function He(r,s){var u=s[va];u===void 0&&(u=s[va]=new Set);var d=r+"__bubble";u.has(d)||(vd(s,r,2,!1),u.add(d))}function da(r,s,u){var d=0;s&&(d|=4),vd(u,r,d,s)}var eo="_reactListening"+Math.random().toString(36).slice(2);function Gi(r){if(!r[eo]){r[eo]=!0,i.forEach(function(u){u!=="selectionchange"&&(wv.has(u)||da(u,!1,r),da(u,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[eo]||(s[eo]=!0,da("selectionchange",!1,s))}}function vd(r,s,u,d){switch(Uf(s)){case 1:var g=Lw;break;case 4:g=Rw;break;default:g=Ql}u=g.bind(null,s,u,r),g=void 0,!Bl||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),d?g!==void 0?r.addEventListener(s,u,{capture:!0,passive:g}):r.addEventListener(s,u,!0):g!==void 0?r.addEventListener(s,u,{passive:g}):r.addEventListener(s,u,!1)}function ha(r,s,u,d,g){var y=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var x=d.tag;if(x===3||x===4){var I=d.stateNode.containerInfo;if(I===g||I.nodeType===8&&I.parentNode===g)break;if(x===4)for(x=d.return;x!==null;){var L=x.tag;if((L===3||L===4)&&(L=x.stateNode.containerInfo,L===g||L.nodeType===8&&L.parentNode===g))return;x=x.return}for(;I!==null;){if(x=pr(I),x===null)return;if(L=x.tag,L===5||L===6){d=y=x;continue e}I=I.parentNode}}d=d.return}_f(function(){var z=y,W=Fl(u),q=[];e:{var V=md.get(r);if(V!==void 0){var oe=Jl,ae=r;switch(r){case"keypress":if(Ks(u)===0)break e;case"keydown":case"keyup":oe=Kw;break;case"focusin":ae="focus",oe=ta;break;case"focusout":ae="blur",oe=ta;break;case"beforeblur":case"afterblur":oe=ta;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":oe=Wf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=jw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=Yw;break;case fd:case dd:case hd:oe=zw;break;case pd:oe=Zw;break;case"scroll":oe=Ow;break;case"wheel":oe=tv;break;case"copy":case"cut":case"paste":oe=Bw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=qf}var fe=(s&4)!==0,nt=!fe&&r==="scroll",D=fe?V!==null?V+"Capture":null:V;fe=[];for(var O=z,F;O!==null;){F=O;var Z=F.stateNode;if(F.tag===5&&Z!==null&&(F=Z,D!==null&&(Z=Ei(O,D),Z!=null&&fe.push(Vi(O,Z,F)))),nt)break;O=O.return}0<fe.length&&(V=new oe(V,ae,null,u,W),q.push({event:V,listeners:fe}))}}if((s&7)===0){e:{if(V=r==="mouseover"||r==="pointerover",oe=r==="mouseout"||r==="pointerout",V&&u!==Bt&&(ae=u.relatedTarget||u.fromElement)&&(pr(ae)||ae[Nn]))break e;if((oe||V)&&(V=W.window===W?W:(V=W.ownerDocument)?V.defaultView||V.parentWindow:window,oe?(ae=u.relatedTarget||u.toElement,oe=z,ae=ae?pr(ae):null,ae!==null&&(nt=hr(ae),ae!==nt||ae.tag!==5&&ae.tag!==6)&&(ae=null)):(oe=null,ae=z),oe!==ae)){if(fe=Wf,Z="onMouseLeave",D="onMouseEnter",O="mouse",(r==="pointerout"||r==="pointerover")&&(fe=qf,Z="onPointerLeave",D="onPointerEnter",O="pointer"),nt=oe==null?V:Kr(oe),F=ae==null?V:Kr(ae),V=new fe(Z,O+"leave",oe,u,W),V.target=nt,V.relatedTarget=F,Z=null,pr(W)===z&&(fe=new fe(D,O+"enter",ae,u,W),fe.target=F,fe.relatedTarget=nt,Z=fe),nt=Z,oe&&ae)t:{for(fe=oe,D=ae,O=0,F=fe;F;F=Hr(F))O++;for(F=0,Z=D;Z;Z=Hr(Z))F++;for(;0<O-F;)fe=Hr(fe),O--;for(;0<F-O;)D=Hr(D),F--;for(;O--;){if(fe===D||D!==null&&fe===D.alternate)break t;fe=Hr(fe),D=Hr(D)}fe=null}else fe=null;oe!==null&&kd(q,V,oe,fe,!1),ae!==null&&nt!==null&&kd(q,nt,ae,fe,!0)}}e:{if(V=z?Kr(z):window,oe=V.nodeName&&V.nodeName.toLowerCase(),oe==="select"||oe==="input"&&V.type==="file")var he=av;else if(Zf(V))if(td)he=dv;else{he=cv;var ve=uv}else(oe=V.nodeName)&&oe.toLowerCase()==="input"&&(V.type==="checkbox"||V.type==="radio")&&(he=fv);if(he&&(he=he(r,z))){ed(q,he,u,W);break e}ve&&ve(r,V,z),r==="focusout"&&(ve=V._wrapperState)&&ve.controlled&&V.type==="number"&&Xe(V,"number",V.value)}switch(ve=z?Kr(z):window,r){case"focusin":(Zf(ve)||ve.contentEditable==="true")&&(Vr=ve,la=z,Bi=null);break;case"focusout":Bi=la=Vr=null;break;case"mousedown":aa=!0;break;case"contextmenu":case"mouseup":case"dragend":aa=!1,ud(q,u,W);break;case"selectionchange":if(mv)break;case"keydown":case"keyup":ud(q,u,W)}var ke;if(ra)e:{switch(r){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else Gr?Yf(r,u)&&(Ce="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ce="onCompositionStart");Ce&&(Kf&&u.locale!=="ko"&&(Gr||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&Gr&&(ke=Gf()):(Wn=W,Yl="value"in Wn?Wn.value:Wn.textContent,Gr=!0)),ve=to(z,Ce),0<ve.length&&(Ce=new Hf(Ce,r,null,u,W),q.push({event:Ce,listeners:ve}),ke?Ce.data=ke:(ke=Jf(u),ke!==null&&(Ce.data=ke)))),(ke=rv?iv(r,u):sv(r,u))&&(z=to(z,"onBeforeInput"),0<z.length&&(W=new Hf("onBeforeInput","beforeinput",null,u,W),q.push({event:W,listeners:z}),W.data=ke))}wd(q,s)})}function Vi(r,s,u){return{instance:r,listener:s,currentTarget:u}}function to(r,s){for(var u=s+"Capture",d=[];r!==null;){var g=r,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=Ei(r,u),y!=null&&d.unshift(Vi(r,y,g)),y=Ei(r,s),y!=null&&d.push(Vi(r,y,g))),r=r.return}return d}function Hr(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function kd(r,s,u,d,g){for(var y=s._reactName,x=[];u!==null&&u!==d;){var I=u,L=I.alternate,z=I.stateNode;if(L!==null&&L===d)break;I.tag===5&&z!==null&&(I=z,g?(L=Ei(u,y),L!=null&&x.unshift(Vi(u,L,I))):g||(L=Ei(u,y),L!=null&&x.push(Vi(u,L,I)))),u=u.return}x.length!==0&&r.push({event:s,listeners:x})}var vv=/\r\n?/g,kv=/\u0000|\uFFFD/g;function xd(r){return(typeof r=="string"?r:""+r).replace(vv,`
7
- `).replace(kv,"")}function no(r,s,u){if(s=xd(s),xd(r)!==s&&u)throw Error(n(425))}function ro(){}var pa=null,ma=null;function ga(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var ya=typeof setTimeout=="function"?setTimeout:void 0,xv=typeof clearTimeout=="function"?clearTimeout:void 0,Sd=typeof Promise=="function"?Promise:void 0,Sv=typeof queueMicrotask=="function"?queueMicrotask:typeof Sd<"u"?function(r){return Sd.resolve(null).then(r).catch(Cv)}:ya;function Cv(r){setTimeout(function(){throw r})}function wa(r,s){var u=s,d=0;do{var g=u.nextSibling;if(r.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"){if(d===0){r.removeChild(g),Oi(s);return}d--}else u!=="$"&&u!=="$?"&&u!=="$!"||d++;u=g}while(u);Oi(s)}function qn(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return r}function Cd(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(s===0)return r;s--}else u==="/$"&&s++}r=r.previousSibling}return null}var qr=Math.random().toString(36).slice(2),vn="__reactFiber$"+qr,Wi="__reactProps$"+qr,Nn="__reactContainer$"+qr,va="__reactEvents$"+qr,_v="__reactListeners$"+qr,Ev="__reactHandles$"+qr;function pr(r){var s=r[vn];if(s)return s;for(var u=r.parentNode;u;){if(s=u[Nn]||u[vn]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(r=Cd(r);r!==null;){if(u=r[vn])return u;r=Cd(r)}return s}r=u,u=r.parentNode}return null}function Hi(r){return r=r[vn]||r[Nn],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Kr(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function io(r){return r[Wi]||null}var ka=[],Qr=-1;function Kn(r){return{current:r}}function qe(r){0>Qr||(r.current=ka[Qr],ka[Qr]=null,Qr--)}function Ve(r,s){Qr++,ka[Qr]=r.current,r.current=s}var Qn={},xt=Kn(Qn),Rt=Kn(!1),mr=Qn;function Xr(r,s){var u=r.type.contextTypes;if(!u)return Qn;var d=r.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===s)return d.__reactInternalMemoizedMaskedChildContext;var g={},y;for(y in u)g[y]=s[y];return d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=g),g}function Ot(r){return r=r.childContextTypes,r!=null}function so(){qe(Rt),qe(xt)}function _d(r,s,u){if(xt.current!==Qn)throw Error(n(168));Ve(xt,s),Ve(Rt,u)}function Ed(r,s,u){var d=r.stateNode;if(s=s.childContextTypes,typeof d.getChildContext!="function")return u;d=d.getChildContext();for(var g in d)if(!(g in s))throw Error(n(108,Oe(r)||"Unknown",g));return E({},u,d)}function oo(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||Qn,mr=xt.current,Ve(xt,r),Ve(Rt,Rt.current),!0}function bd(r,s,u){var d=r.stateNode;if(!d)throw Error(n(169));u?(r=Ed(r,s,mr),d.__reactInternalMemoizedMergedChildContext=r,qe(Rt),qe(xt),Ve(xt,r)):qe(Rt),Ve(Rt,u)}var An=null,lo=!1,xa=!1;function Id(r){An===null?An=[r]:An.push(r)}function bv(r){lo=!0,Id(r)}function Xn(){if(!xa&&An!==null){xa=!0;var r=0,s=Be;try{var u=An;for(Be=1;r<u.length;r++){var d=u[r];do d=d(!0);while(d!==null)}An=null,lo=!1}catch(g){throw An!==null&&(An=An.slice(r+1)),Af(Gl,Xn),g}finally{Be=s,xa=!1}}return null}var Yr=[],Jr=0,ao=null,uo=0,Qt=[],Xt=0,gr=null,Tn=1,Pn="";function yr(r,s){Yr[Jr++]=uo,Yr[Jr++]=ao,ao=r,uo=s}function Nd(r,s,u){Qt[Xt++]=Tn,Qt[Xt++]=Pn,Qt[Xt++]=gr,gr=r;var d=Tn;r=Pn;var g=32-ln(d)-1;d&=~(1<<g),u+=1;var y=32-ln(s)+g;if(30<y){var x=g-g%5;y=(d&(1<<x)-1).toString(32),d>>=x,g-=x,Tn=1<<32-ln(s)+g|u<<g|d,Pn=y+r}else Tn=1<<y|u<<g|d,Pn=r}function Sa(r){r.return!==null&&(yr(r,1),Nd(r,1,0))}function Ca(r){for(;r===ao;)ao=Yr[--Jr],Yr[Jr]=null,uo=Yr[--Jr],Yr[Jr]=null;for(;r===gr;)gr=Qt[--Xt],Qt[Xt]=null,Pn=Qt[--Xt],Qt[Xt]=null,Tn=Qt[--Xt],Qt[Xt]=null}var Gt=null,Vt=null,Ke=!1,un=null;function Ad(r,s){var u=en(5,null,null,0);u.elementType="DELETED",u.stateNode=s,u.return=r,s=r.deletions,s===null?(r.deletions=[u],r.flags|=16):s.push(u)}function Td(r,s){switch(r.tag){case 5:var u=r.type;return s=s.nodeType!==1||u.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(r.stateNode=s,Gt=r,Vt=qn(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,Gt=r,Vt=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(u=gr!==null?{id:Tn,overflow:Pn}:null,r.memoizedState={dehydrated:s,treeContext:u,retryLane:1073741824},u=en(18,null,null,0),u.stateNode=s,u.return=r,r.child=u,Gt=r,Vt=null,!0):!1;default:return!1}}function _a(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Ea(r){if(Ke){var s=Vt;if(s){var u=s;if(!Td(r,s)){if(_a(r))throw Error(n(418));s=qn(u.nextSibling);var d=Gt;s&&Td(r,s)?Ad(d,u):(r.flags=r.flags&-4097|2,Ke=!1,Gt=r)}}else{if(_a(r))throw Error(n(418));r.flags=r.flags&-4097|2,Ke=!1,Gt=r}}}function Pd(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Gt=r}function co(r){if(r!==Gt)return!1;if(!Ke)return Pd(r),Ke=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!ga(r.type,r.memoizedProps)),s&&(s=Vt)){if(_a(r))throw Ld(),Error(n(418));for(;s;)Ad(r,s),s=qn(s.nextSibling)}if(Pd(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,s=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(s===0){Vt=qn(r.nextSibling);break e}s--}else u!=="$"&&u!=="$!"&&u!=="$?"||s++}r=r.nextSibling}Vt=null}}else Vt=Gt?qn(r.stateNode.nextSibling):null;return!0}function Ld(){for(var r=Vt;r;)r=qn(r.nextSibling)}function Zr(){Vt=Gt=null,Ke=!1}function ba(r){un===null?un=[r]:un.push(r)}var Iv=$.ReactCurrentBatchConfig;function qi(r,s,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var d=u.stateNode}if(!d)throw Error(n(147,r));var g=d,y=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===y?s.ref:(s=function(x){var I=g.refs;x===null?delete I[y]:I[y]=x},s._stringRef=y,s)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function fo(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function Rd(r){var s=r._init;return s(r._payload)}function Od(r){function s(D,O){if(r){var F=D.deletions;F===null?(D.deletions=[O],D.flags|=16):F.push(O)}}function u(D,O){if(!r)return null;for(;O!==null;)s(D,O),O=O.sibling;return null}function d(D,O){for(D=new Map;O!==null;)O.key!==null?D.set(O.key,O):D.set(O.index,O),O=O.sibling;return D}function g(D,O){return D=ir(D,O),D.index=0,D.sibling=null,D}function y(D,O,F){return D.index=F,r?(F=D.alternate,F!==null?(F=F.index,F<O?(D.flags|=2,O):F):(D.flags|=2,O)):(D.flags|=1048576,O)}function x(D){return r&&D.alternate===null&&(D.flags|=2),D}function I(D,O,F,Z){return O===null||O.tag!==6?(O=yu(F,D.mode,Z),O.return=D,O):(O=g(O,F),O.return=D,O)}function L(D,O,F,Z){var he=F.type;return he===H?W(D,O,F.props.children,Z,F.key):O!==null&&(O.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===pe&&Rd(he)===O.type)?(Z=g(O,F.props),Z.ref=qi(D,O,F),Z.return=D,Z):(Z=jo(F.type,F.key,F.props,null,D.mode,Z),Z.ref=qi(D,O,F),Z.return=D,Z)}function z(D,O,F,Z){return O===null||O.tag!==4||O.stateNode.containerInfo!==F.containerInfo||O.stateNode.implementation!==F.implementation?(O=wu(F,D.mode,Z),O.return=D,O):(O=g(O,F.children||[]),O.return=D,O)}function W(D,O,F,Z,he){return O===null||O.tag!==7?(O=Er(F,D.mode,Z,he),O.return=D,O):(O=g(O,F),O.return=D,O)}function q(D,O,F){if(typeof O=="string"&&O!==""||typeof O=="number")return O=yu(""+O,D.mode,F),O.return=D,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case j:return F=jo(O.type,O.key,O.props,null,D.mode,F),F.ref=qi(D,null,O),F.return=D,F;case P:return O=wu(O,D.mode,F),O.return=D,O;case pe:var Z=O._init;return q(D,Z(O._payload),F)}if(st(O)||ce(O))return O=Er(O,D.mode,F,null),O.return=D,O;fo(D,O)}return null}function V(D,O,F,Z){var he=O!==null?O.key:null;if(typeof F=="string"&&F!==""||typeof F=="number")return he!==null?null:I(D,O,""+F,Z);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case j:return F.key===he?L(D,O,F,Z):null;case P:return F.key===he?z(D,O,F,Z):null;case pe:return he=F._init,V(D,O,he(F._payload),Z)}if(st(F)||ce(F))return he!==null?null:W(D,O,F,Z,null);fo(D,F)}return null}function oe(D,O,F,Z,he){if(typeof Z=="string"&&Z!==""||typeof Z=="number")return D=D.get(F)||null,I(O,D,""+Z,he);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case j:return D=D.get(Z.key===null?F:Z.key)||null,L(O,D,Z,he);case P:return D=D.get(Z.key===null?F:Z.key)||null,z(O,D,Z,he);case pe:var ve=Z._init;return oe(D,O,F,ve(Z._payload),he)}if(st(Z)||ce(Z))return D=D.get(F)||null,W(O,D,Z,he,null);fo(O,Z)}return null}function ae(D,O,F,Z){for(var he=null,ve=null,ke=O,Ce=O=0,pt=null;ke!==null&&Ce<F.length;Ce++){ke.index>Ce?(pt=ke,ke=null):pt=ke.sibling;var $e=V(D,ke,F[Ce],Z);if($e===null){ke===null&&(ke=pt);break}r&&ke&&$e.alternate===null&&s(D,ke),O=y($e,O,Ce),ve===null?he=$e:ve.sibling=$e,ve=$e,ke=pt}if(Ce===F.length)return u(D,ke),Ke&&yr(D,Ce),he;if(ke===null){for(;Ce<F.length;Ce++)ke=q(D,F[Ce],Z),ke!==null&&(O=y(ke,O,Ce),ve===null?he=ke:ve.sibling=ke,ve=ke);return Ke&&yr(D,Ce),he}for(ke=d(D,ke);Ce<F.length;Ce++)pt=oe(ke,D,Ce,F[Ce],Z),pt!==null&&(r&&pt.alternate!==null&&ke.delete(pt.key===null?Ce:pt.key),O=y(pt,O,Ce),ve===null?he=pt:ve.sibling=pt,ve=pt);return r&&ke.forEach(function(sr){return s(D,sr)}),Ke&&yr(D,Ce),he}function fe(D,O,F,Z){var he=ce(F);if(typeof he!="function")throw Error(n(150));if(F=he.call(F),F==null)throw Error(n(151));for(var ve=he=null,ke=O,Ce=O=0,pt=null,$e=F.next();ke!==null&&!$e.done;Ce++,$e=F.next()){ke.index>Ce?(pt=ke,ke=null):pt=ke.sibling;var sr=V(D,ke,$e.value,Z);if(sr===null){ke===null&&(ke=pt);break}r&&ke&&sr.alternate===null&&s(D,ke),O=y(sr,O,Ce),ve===null?he=sr:ve.sibling=sr,ve=sr,ke=pt}if($e.done)return u(D,ke),Ke&&yr(D,Ce),he;if(ke===null){for(;!$e.done;Ce++,$e=F.next())$e=q(D,$e.value,Z),$e!==null&&(O=y($e,O,Ce),ve===null?he=$e:ve.sibling=$e,ve=$e);return Ke&&yr(D,Ce),he}for(ke=d(D,ke);!$e.done;Ce++,$e=F.next())$e=oe(ke,D,Ce,$e.value,Z),$e!==null&&(r&&$e.alternate!==null&&ke.delete($e.key===null?Ce:$e.key),O=y($e,O,Ce),ve===null?he=$e:ve.sibling=$e,ve=$e);return r&&ke.forEach(function(ok){return s(D,ok)}),Ke&&yr(D,Ce),he}function nt(D,O,F,Z){if(typeof F=="object"&&F!==null&&F.type===H&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case j:e:{for(var he=F.key,ve=O;ve!==null;){if(ve.key===he){if(he=F.type,he===H){if(ve.tag===7){u(D,ve.sibling),O=g(ve,F.props.children),O.return=D,D=O;break e}}else if(ve.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===pe&&Rd(he)===ve.type){u(D,ve.sibling),O=g(ve,F.props),O.ref=qi(D,ve,F),O.return=D,D=O;break e}u(D,ve);break}else s(D,ve);ve=ve.sibling}F.type===H?(O=Er(F.props.children,D.mode,Z,F.key),O.return=D,D=O):(Z=jo(F.type,F.key,F.props,null,D.mode,Z),Z.ref=qi(D,O,F),Z.return=D,D=Z)}return x(D);case P:e:{for(ve=F.key;O!==null;){if(O.key===ve)if(O.tag===4&&O.stateNode.containerInfo===F.containerInfo&&O.stateNode.implementation===F.implementation){u(D,O.sibling),O=g(O,F.children||[]),O.return=D,D=O;break e}else{u(D,O);break}else s(D,O);O=O.sibling}O=wu(F,D.mode,Z),O.return=D,D=O}return x(D);case pe:return ve=F._init,nt(D,O,ve(F._payload),Z)}if(st(F))return ae(D,O,F,Z);if(ce(F))return fe(D,O,F,Z);fo(D,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,O!==null&&O.tag===6?(u(D,O.sibling),O=g(O,F),O.return=D,D=O):(u(D,O),O=yu(F,D.mode,Z),O.return=D,D=O),x(D)):u(D,O)}return nt}var ei=Od(!0),Md=Od(!1),ho=Kn(null),po=null,ti=null,Ia=null;function Na(){Ia=ti=po=null}function Aa(r){var s=ho.current;qe(ho),r._currentValue=s}function Ta(r,s,u){for(;r!==null;){var d=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),r===u)break;r=r.return}}function ni(r,s){po=r,Ia=ti=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(Mt=!0),r.firstContext=null)}function Yt(r){var s=r._currentValue;if(Ia!==r)if(r={context:r,memoizedValue:s,next:null},ti===null){if(po===null)throw Error(n(308));ti=r,po.dependencies={lanes:0,firstContext:r}}else ti=ti.next=r;return s}var wr=null;function Pa(r){wr===null?wr=[r]:wr.push(r)}function jd(r,s,u,d){var g=s.interleaved;return g===null?(u.next=u,Pa(s)):(u.next=g.next,g.next=u),s.interleaved=u,Ln(r,d)}function Ln(r,s){r.lanes|=s;var u=r.alternate;for(u!==null&&(u.lanes|=s),u=r,r=r.return;r!==null;)r.childLanes|=s,u=r.alternate,u!==null&&(u.childLanes|=s),u=r,r=r.return;return u.tag===3?u.stateNode:null}var Yn=!1;function La(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Dd(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Rn(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function Jn(r,s,u){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(ze&2)!==0){var g=d.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),d.pending=s,Ln(r,u)}return g=d.interleaved,g===null?(s.next=s,Pa(d)):(s.next=g.next,g.next=s),d.interleaved=s,Ln(r,u)}function mo(r,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194240)!==0)){var d=s.lanes;d&=r.pendingLanes,u|=d,s.lanes=u,Hl(r,u)}}function Fd(r,s){var u=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,u===d)){var g=null,y=null;if(u=u.firstBaseUpdate,u!==null){do{var x={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};y===null?g=y=x:y=y.next=x,u=u.next}while(u!==null);y===null?g=y=s:y=y.next=s}else g=y=s;u={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:d.shared,effects:d.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=s:r.next=s,u.lastBaseUpdate=s}function go(r,s,u,d){var g=r.updateQueue;Yn=!1;var y=g.firstBaseUpdate,x=g.lastBaseUpdate,I=g.shared.pending;if(I!==null){g.shared.pending=null;var L=I,z=L.next;L.next=null,x===null?y=z:x.next=z,x=L;var W=r.alternate;W!==null&&(W=W.updateQueue,I=W.lastBaseUpdate,I!==x&&(I===null?W.firstBaseUpdate=z:I.next=z,W.lastBaseUpdate=L))}if(y!==null){var q=g.baseState;x=0,W=z=L=null,I=y;do{var V=I.lane,oe=I.eventTime;if((d&V)===V){W!==null&&(W=W.next={eventTime:oe,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var ae=r,fe=I;switch(V=s,oe=u,fe.tag){case 1:if(ae=fe.payload,typeof ae=="function"){q=ae.call(oe,q,V);break e}q=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=fe.payload,V=typeof ae=="function"?ae.call(oe,q,V):ae,V==null)break e;q=E({},q,V);break e;case 2:Yn=!0}}I.callback!==null&&I.lane!==0&&(r.flags|=64,V=g.effects,V===null?g.effects=[I]:V.push(I))}else oe={eventTime:oe,lane:V,tag:I.tag,payload:I.payload,callback:I.callback,next:null},W===null?(z=W=oe,L=q):W=W.next=oe,x|=V;if(I=I.next,I===null){if(I=g.shared.pending,I===null)break;V=I,I=V.next,V.next=null,g.lastBaseUpdate=V,g.shared.pending=null}}while(!0);if(W===null&&(L=q),g.baseState=L,g.firstBaseUpdate=z,g.lastBaseUpdate=W,s=g.shared.interleaved,s!==null){g=s;do x|=g.lane,g=g.next;while(g!==s)}else y===null&&(g.shared.lanes=0);xr|=x,r.lanes=x,r.memoizedState=q}}function zd(r,s,u){if(r=s.effects,s.effects=null,r!==null)for(s=0;s<r.length;s++){var d=r[s],g=d.callback;if(g!==null){if(d.callback=null,d=u,typeof g!="function")throw Error(n(191,g));g.call(d)}}}var Ki={},kn=Kn(Ki),Qi=Kn(Ki),Xi=Kn(Ki);function vr(r){if(r===Ki)throw Error(n(174));return r}function Ra(r,s){switch(Ve(Xi,s),Ve(Qi,r),Ve(kn,Ki),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:re(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=re(s,r)}qe(kn),Ve(kn,s)}function ri(){qe(kn),qe(Qi),qe(Xi)}function $d(r){vr(Xi.current);var s=vr(kn.current),u=re(s,r.type);s!==u&&(Ve(Qi,r),Ve(kn,u))}function Oa(r){Qi.current===r&&(qe(kn),qe(Qi))}var Ye=Kn(0);function yo(r){for(var s=r;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Ma=[];function ja(){for(var r=0;r<Ma.length;r++)Ma[r]._workInProgressVersionPrimary=null;Ma.length=0}var wo=$.ReactCurrentDispatcher,Da=$.ReactCurrentBatchConfig,kr=0,Je=null,at=null,dt=null,vo=!1,Yi=!1,Ji=0,Nv=0;function St(){throw Error(n(321))}function Fa(r,s){if(s===null)return!1;for(var u=0;u<s.length&&u<r.length;u++)if(!an(r[u],s[u]))return!1;return!0}function za(r,s,u,d,g,y){if(kr=y,Je=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,wo.current=r===null||r.memoizedState===null?Lv:Rv,r=u(d,g),Yi){y=0;do{if(Yi=!1,Ji=0,25<=y)throw Error(n(301));y+=1,dt=at=null,s.updateQueue=null,wo.current=Ov,r=u(d,g)}while(Yi)}if(wo.current=So,s=at!==null&&at.next!==null,kr=0,dt=at=Je=null,vo=!1,s)throw Error(n(300));return r}function $a(){var r=Ji!==0;return Ji=0,r}function xn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?Je.memoizedState=dt=r:dt=dt.next=r,dt}function Jt(){if(at===null){var r=Je.alternate;r=r!==null?r.memoizedState:null}else r=at.next;var s=dt===null?Je.memoizedState:dt.next;if(s!==null)dt=s,at=r;else{if(r===null)throw Error(n(310));at=r,r={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},dt===null?Je.memoizedState=dt=r:dt=dt.next=r}return dt}function Zi(r,s){return typeof s=="function"?s(r):s}function Ba(r){var s=Jt(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var d=at,g=d.baseQueue,y=u.pending;if(y!==null){if(g!==null){var x=g.next;g.next=y.next,y.next=x}d.baseQueue=g=y,u.pending=null}if(g!==null){y=g.next,d=d.baseState;var I=x=null,L=null,z=y;do{var W=z.lane;if((kr&W)===W)L!==null&&(L=L.next={lane:0,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),d=z.hasEagerState?z.eagerState:r(d,z.action);else{var q={lane:W,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null};L===null?(I=L=q,x=d):L=L.next=q,Je.lanes|=W,xr|=W}z=z.next}while(z!==null&&z!==y);L===null?x=d:L.next=I,an(d,s.memoizedState)||(Mt=!0),s.memoizedState=d,s.baseState=x,s.baseQueue=L,u.lastRenderedState=d}if(r=u.interleaved,r!==null){g=r;do y=g.lane,Je.lanes|=y,xr|=y,g=g.next;while(g!==r)}else g===null&&(u.lanes=0);return[s.memoizedState,u.dispatch]}function Ua(r){var s=Jt(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var d=u.dispatch,g=u.pending,y=s.memoizedState;if(g!==null){u.pending=null;var x=g=g.next;do y=r(y,x.action),x=x.next;while(x!==g);an(y,s.memoizedState)||(Mt=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),u.lastRenderedState=y}return[y,d]}function Bd(){}function Ud(r,s){var u=Je,d=Jt(),g=s(),y=!an(d.memoizedState,g);if(y&&(d.memoizedState=g,Mt=!0),d=d.queue,Ga(Wd.bind(null,u,d,r),[r]),d.getSnapshot!==s||y||dt!==null&&dt.memoizedState.tag&1){if(u.flags|=2048,es(9,Vd.bind(null,u,d,g,s),void 0,null),ht===null)throw Error(n(349));(kr&30)!==0||Gd(u,s,g)}return g}function Gd(r,s,u){r.flags|=16384,r={getSnapshot:s,value:u},s=Je.updateQueue,s===null?(s={lastEffect:null,stores:null},Je.updateQueue=s,s.stores=[r]):(u=s.stores,u===null?s.stores=[r]:u.push(r))}function Vd(r,s,u,d){s.value=u,s.getSnapshot=d,Hd(s)&&qd(r)}function Wd(r,s,u){return u(function(){Hd(s)&&qd(r)})}function Hd(r){var s=r.getSnapshot;r=r.value;try{var u=s();return!an(r,u)}catch{return!0}}function qd(r){var s=Ln(r,1);s!==null&&hn(s,r,1,-1)}function Kd(r){var s=xn();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Zi,lastRenderedState:r},s.queue=r,r=r.dispatch=Pv.bind(null,Je,r),[s.memoizedState,r]}function es(r,s,u,d){return r={tag:r,create:s,destroy:u,deps:d,next:null},s=Je.updateQueue,s===null?(s={lastEffect:null,stores:null},Je.updateQueue=s,s.lastEffect=r.next=r):(u=s.lastEffect,u===null?s.lastEffect=r.next=r:(d=u.next,u.next=r,r.next=d,s.lastEffect=r)),r}function Qd(){return Jt().memoizedState}function ko(r,s,u,d){var g=xn();Je.flags|=r,g.memoizedState=es(1|s,u,void 0,d===void 0?null:d)}function xo(r,s,u,d){var g=Jt();d=d===void 0?null:d;var y=void 0;if(at!==null){var x=at.memoizedState;if(y=x.destroy,d!==null&&Fa(d,x.deps)){g.memoizedState=es(s,u,y,d);return}}Je.flags|=r,g.memoizedState=es(1|s,u,y,d)}function Xd(r,s){return ko(8390656,8,r,s)}function Ga(r,s){return xo(2048,8,r,s)}function Yd(r,s){return xo(4,2,r,s)}function Jd(r,s){return xo(4,4,r,s)}function Zd(r,s){if(typeof s=="function")return r=r(),s(r),function(){s(null)};if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function eh(r,s,u){return u=u!=null?u.concat([r]):null,xo(4,4,Zd.bind(null,s,r),u)}function Va(){}function th(r,s){var u=Jt();s=s===void 0?null:s;var d=u.memoizedState;return d!==null&&s!==null&&Fa(s,d[1])?d[0]:(u.memoizedState=[r,s],r)}function nh(r,s){var u=Jt();s=s===void 0?null:s;var d=u.memoizedState;return d!==null&&s!==null&&Fa(s,d[1])?d[0]:(r=r(),u.memoizedState=[r,s],r)}function rh(r,s,u){return(kr&21)===0?(r.baseState&&(r.baseState=!1,Mt=!0),r.memoizedState=u):(an(u,s)||(u=Rf(),Je.lanes|=u,xr|=u,r.baseState=!0),s)}function Av(r,s){var u=Be;Be=u!==0&&4>u?u:4,r(!0);var d=Da.transition;Da.transition={};try{r(!1),s()}finally{Be=u,Da.transition=d}}function ih(){return Jt().memoizedState}function Tv(r,s,u){var d=nr(r);if(u={lane:d,action:u,hasEagerState:!1,eagerState:null,next:null},sh(r))oh(s,u);else if(u=jd(r,s,u,d),u!==null){var g=Tt();hn(u,r,d,g),lh(u,s,d)}}function Pv(r,s,u){var d=nr(r),g={lane:d,action:u,hasEagerState:!1,eagerState:null,next:null};if(sh(r))oh(s,g);else{var y=r.alternate;if(r.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var x=s.lastRenderedState,I=y(x,u);if(g.hasEagerState=!0,g.eagerState=I,an(I,x)){var L=s.interleaved;L===null?(g.next=g,Pa(s)):(g.next=L.next,L.next=g),s.interleaved=g;return}}catch{}u=jd(r,s,g,d),u!==null&&(g=Tt(),hn(u,r,d,g),lh(u,s,d))}}function sh(r){var s=r.alternate;return r===Je||s!==null&&s===Je}function oh(r,s){Yi=vo=!0;var u=r.pending;u===null?s.next=s:(s.next=u.next,u.next=s),r.pending=s}function lh(r,s,u){if((u&4194240)!==0){var d=s.lanes;d&=r.pendingLanes,u|=d,s.lanes=u,Hl(r,u)}}var So={readContext:Yt,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useInsertionEffect:St,useLayoutEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useMutableSource:St,useSyncExternalStore:St,useId:St,unstable_isNewReconciler:!1},Lv={readContext:Yt,useCallback:function(r,s){return xn().memoizedState=[r,s===void 0?null:s],r},useContext:Yt,useEffect:Xd,useImperativeHandle:function(r,s,u){return u=u!=null?u.concat([r]):null,ko(4194308,4,Zd.bind(null,s,r),u)},useLayoutEffect:function(r,s){return ko(4194308,4,r,s)},useInsertionEffect:function(r,s){return ko(4,2,r,s)},useMemo:function(r,s){var u=xn();return s=s===void 0?null:s,r=r(),u.memoizedState=[r,s],r},useReducer:function(r,s,u){var d=xn();return s=u!==void 0?u(s):s,d.memoizedState=d.baseState=s,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:s},d.queue=r,r=r.dispatch=Tv.bind(null,Je,r),[d.memoizedState,r]},useRef:function(r){var s=xn();return r={current:r},s.memoizedState=r},useState:Kd,useDebugValue:Va,useDeferredValue:function(r){return xn().memoizedState=r},useTransition:function(){var r=Kd(!1),s=r[0];return r=Av.bind(null,r[1]),xn().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,u){var d=Je,g=xn();if(Ke){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),ht===null)throw Error(n(349));(kr&30)!==0||Gd(d,s,u)}g.memoizedState=u;var y={value:u,getSnapshot:s};return g.queue=y,Xd(Wd.bind(null,d,y,r),[r]),d.flags|=2048,es(9,Vd.bind(null,d,y,u,s),void 0,null),u},useId:function(){var r=xn(),s=ht.identifierPrefix;if(Ke){var u=Pn,d=Tn;u=(d&~(1<<32-ln(d)-1)).toString(32)+u,s=":"+s+"R"+u,u=Ji++,0<u&&(s+="H"+u.toString(32)),s+=":"}else u=Nv++,s=":"+s+"r"+u.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},Rv={readContext:Yt,useCallback:th,useContext:Yt,useEffect:Ga,useImperativeHandle:eh,useInsertionEffect:Yd,useLayoutEffect:Jd,useMemo:nh,useReducer:Ba,useRef:Qd,useState:function(){return Ba(Zi)},useDebugValue:Va,useDeferredValue:function(r){var s=Jt();return rh(s,at.memoizedState,r)},useTransition:function(){var r=Ba(Zi)[0],s=Jt().memoizedState;return[r,s]},useMutableSource:Bd,useSyncExternalStore:Ud,useId:ih,unstable_isNewReconciler:!1},Ov={readContext:Yt,useCallback:th,useContext:Yt,useEffect:Ga,useImperativeHandle:eh,useInsertionEffect:Yd,useLayoutEffect:Jd,useMemo:nh,useReducer:Ua,useRef:Qd,useState:function(){return Ua(Zi)},useDebugValue:Va,useDeferredValue:function(r){var s=Jt();return at===null?s.memoizedState=r:rh(s,at.memoizedState,r)},useTransition:function(){var r=Ua(Zi)[0],s=Jt().memoizedState;return[r,s]},useMutableSource:Bd,useSyncExternalStore:Ud,useId:ih,unstable_isNewReconciler:!1};function cn(r,s){if(r&&r.defaultProps){s=E({},s),r=r.defaultProps;for(var u in r)s[u]===void 0&&(s[u]=r[u]);return s}return s}function Wa(r,s,u,d){s=r.memoizedState,u=u(d,s),u=u==null?s:E({},s,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var Co={isMounted:function(r){return(r=r._reactInternals)?hr(r)===r:!1},enqueueSetState:function(r,s,u){r=r._reactInternals;var d=Tt(),g=nr(r),y=Rn(d,g);y.payload=s,u!=null&&(y.callback=u),s=Jn(r,y,g),s!==null&&(hn(s,r,g,d),mo(s,r,g))},enqueueReplaceState:function(r,s,u){r=r._reactInternals;var d=Tt(),g=nr(r),y=Rn(d,g);y.tag=1,y.payload=s,u!=null&&(y.callback=u),s=Jn(r,y,g),s!==null&&(hn(s,r,g,d),mo(s,r,g))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var u=Tt(),d=nr(r),g=Rn(u,d);g.tag=2,s!=null&&(g.callback=s),s=Jn(r,g,d),s!==null&&(hn(s,r,d,u),mo(s,r,d))}};function ah(r,s,u,d,g,y,x){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,y,x):s.prototype&&s.prototype.isPureReactComponent?!$i(u,d)||!$i(g,y):!0}function uh(r,s,u){var d=!1,g=Qn,y=s.contextType;return typeof y=="object"&&y!==null?y=Yt(y):(g=Ot(s)?mr:xt.current,d=s.contextTypes,y=(d=d!=null)?Xr(r,g):Qn),s=new s(u,y),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Co,r.stateNode=s,s._reactInternals=r,d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=g,r.__reactInternalMemoizedMaskedChildContext=y),s}function ch(r,s,u,d){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,d),s.state!==r&&Co.enqueueReplaceState(s,s.state,null)}function Ha(r,s,u,d){var g=r.stateNode;g.props=u,g.state=r.memoizedState,g.refs={},La(r);var y=s.contextType;typeof y=="object"&&y!==null?g.context=Yt(y):(y=Ot(s)?mr:xt.current,g.context=Xr(r,y)),g.state=r.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(Wa(r,s,y,u),g.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&Co.enqueueReplaceState(g,g.state,null),go(r,u,g,d),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308)}function ii(r,s){try{var u="",d=s;do u+=Ie(d),d=d.return;while(d);var g=u}catch(y){g=`
8
- Error generating stack: `+y.message+`
9
- `+y.stack}return{value:r,source:s,stack:g,digest:null}}function qa(r,s,u){return{value:r,source:null,stack:u??null,digest:s??null}}function Ka(r,s){try{console.error(s.value)}catch(u){setTimeout(function(){throw u})}}var Mv=typeof WeakMap=="function"?WeakMap:Map;function fh(r,s,u){u=Rn(-1,u),u.tag=3,u.payload={element:null};var d=s.value;return u.callback=function(){To||(To=!0,uu=d),Ka(r,s)},u}function dh(r,s,u){u=Rn(-1,u),u.tag=3;var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var g=s.value;u.payload=function(){return d(g)},u.callback=function(){Ka(r,s)}}var y=r.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(u.callback=function(){Ka(r,s),typeof d!="function"&&(er===null?er=new Set([this]):er.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),u}function hh(r,s,u){var d=r.pingCache;if(d===null){d=r.pingCache=new Mv;var g=new Set;d.set(s,g)}else g=d.get(s),g===void 0&&(g=new Set,d.set(s,g));g.has(u)||(g.add(u),r=Qv.bind(null,r,s,u),s.then(r,r))}function ph(r){do{var s;if((s=r.tag===13)&&(s=r.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return r;r=r.return}while(r!==null);return null}function mh(r,s,u,d,g){return(r.mode&1)===0?(r===s?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(s=Rn(-1,1),s.tag=2,Jn(u,s,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=g,r)}var jv=$.ReactCurrentOwner,Mt=!1;function At(r,s,u,d){s.child=r===null?Md(s,null,u,d):ei(s,r.child,u,d)}function gh(r,s,u,d,g){u=u.render;var y=s.ref;return ni(s,g),d=za(r,s,u,d,y,g),u=$a(),r!==null&&!Mt?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~g,On(r,s,g)):(Ke&&u&&Sa(s),s.flags|=1,At(r,s,d,g),s.child)}function yh(r,s,u,d,g){if(r===null){var y=u.type;return typeof y=="function"&&!gu(y)&&y.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(s.tag=15,s.type=y,wh(r,s,y,d,g)):(r=jo(u.type,null,d,s,s.mode,g),r.ref=s.ref,r.return=s,s.child=r)}if(y=r.child,(r.lanes&g)===0){var x=y.memoizedProps;if(u=u.compare,u=u!==null?u:$i,u(x,d)&&r.ref===s.ref)return On(r,s,g)}return s.flags|=1,r=ir(y,d),r.ref=s.ref,r.return=s,s.child=r}function wh(r,s,u,d,g){if(r!==null){var y=r.memoizedProps;if($i(y,d)&&r.ref===s.ref)if(Mt=!1,s.pendingProps=d=y,(r.lanes&g)!==0)(r.flags&131072)!==0&&(Mt=!0);else return s.lanes=r.lanes,On(r,s,g)}return Qa(r,s,u,d,g)}function vh(r,s,u){var d=s.pendingProps,g=d.children,y=r!==null?r.memoizedState:null;if(d.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ve(oi,Wt),Wt|=u;else{if((u&1073741824)===0)return r=y!==null?y.baseLanes|u:u,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,Ve(oi,Wt),Wt|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=y!==null?y.baseLanes:u,Ve(oi,Wt),Wt|=d}else y!==null?(d=y.baseLanes|u,s.memoizedState=null):d=u,Ve(oi,Wt),Wt|=d;return At(r,s,g,u),s.child}function kh(r,s){var u=s.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(s.flags|=512,s.flags|=2097152)}function Qa(r,s,u,d,g){var y=Ot(u)?mr:xt.current;return y=Xr(s,y),ni(s,g),u=za(r,s,u,d,y,g),d=$a(),r!==null&&!Mt?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~g,On(r,s,g)):(Ke&&d&&Sa(s),s.flags|=1,At(r,s,u,g),s.child)}function xh(r,s,u,d,g){if(Ot(u)){var y=!0;oo(s)}else y=!1;if(ni(s,g),s.stateNode===null)Eo(r,s),uh(s,u,d),Ha(s,u,d,g),d=!0;else if(r===null){var x=s.stateNode,I=s.memoizedProps;x.props=I;var L=x.context,z=u.contextType;typeof z=="object"&&z!==null?z=Yt(z):(z=Ot(u)?mr:xt.current,z=Xr(s,z));var W=u.getDerivedStateFromProps,q=typeof W=="function"||typeof x.getSnapshotBeforeUpdate=="function";q||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(I!==d||L!==z)&&ch(s,x,d,z),Yn=!1;var V=s.memoizedState;x.state=V,go(s,d,x,g),L=s.memoizedState,I!==d||V!==L||Rt.current||Yn?(typeof W=="function"&&(Wa(s,u,W,d),L=s.memoizedState),(I=Yn||ah(s,u,I,d,V,L,z))?(q||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=L),x.props=d,x.state=L,x.context=z,d=I):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{x=s.stateNode,Dd(r,s),I=s.memoizedProps,z=s.type===s.elementType?I:cn(s.type,I),x.props=z,q=s.pendingProps,V=x.context,L=u.contextType,typeof L=="object"&&L!==null?L=Yt(L):(L=Ot(u)?mr:xt.current,L=Xr(s,L));var oe=u.getDerivedStateFromProps;(W=typeof oe=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(I!==q||V!==L)&&ch(s,x,d,L),Yn=!1,V=s.memoizedState,x.state=V,go(s,d,x,g);var ae=s.memoizedState;I!==q||V!==ae||Rt.current||Yn?(typeof oe=="function"&&(Wa(s,u,oe,d),ae=s.memoizedState),(z=Yn||ah(s,u,z,d,V,ae,L)||!1)?(W||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(d,ae,L),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(d,ae,L)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||I===r.memoizedProps&&V===r.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||I===r.memoizedProps&&V===r.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=ae),x.props=d,x.state=ae,x.context=L,d=z):(typeof x.componentDidUpdate!="function"||I===r.memoizedProps&&V===r.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||I===r.memoizedProps&&V===r.memoizedState||(s.flags|=1024),d=!1)}return Xa(r,s,u,d,y,g)}function Xa(r,s,u,d,g,y){kh(r,s);var x=(s.flags&128)!==0;if(!d&&!x)return g&&bd(s,u,!1),On(r,s,y);d=s.stateNode,jv.current=s;var I=x&&typeof u.getDerivedStateFromError!="function"?null:d.render();return s.flags|=1,r!==null&&x?(s.child=ei(s,r.child,null,y),s.child=ei(s,null,I,y)):At(r,s,I,y),s.memoizedState=d.state,g&&bd(s,u,!0),s.child}function Sh(r){var s=r.stateNode;s.pendingContext?_d(r,s.pendingContext,s.pendingContext!==s.context):s.context&&_d(r,s.context,!1),Ra(r,s.containerInfo)}function Ch(r,s,u,d,g){return Zr(),ba(g),s.flags|=256,At(r,s,u,d),s.child}var Ya={dehydrated:null,treeContext:null,retryLane:0};function Ja(r){return{baseLanes:r,cachePool:null,transitions:null}}function _h(r,s,u){var d=s.pendingProps,g=Ye.current,y=!1,x=(s.flags&128)!==0,I;if((I=x)||(I=r!==null&&r.memoizedState===null?!1:(g&2)!==0),I?(y=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(g|=1),Ve(Ye,g&1),r===null)return Ea(s),r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((s.mode&1)===0?s.lanes=1:r.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=d.children,r=d.fallback,y?(d=s.mode,y=s.child,x={mode:"hidden",children:x},(d&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=x):y=Do(x,d,0,null),r=Er(r,d,u,null),y.return=s,r.return=s,y.sibling=r,s.child=y,s.child.memoizedState=Ja(u),s.memoizedState=Ya,r):Za(s,x));if(g=r.memoizedState,g!==null&&(I=g.dehydrated,I!==null))return Dv(r,s,x,d,I,g,u);if(y){y=d.fallback,x=s.mode,g=r.child,I=g.sibling;var L={mode:"hidden",children:d.children};return(x&1)===0&&s.child!==g?(d=s.child,d.childLanes=0,d.pendingProps=L,s.deletions=null):(d=ir(g,L),d.subtreeFlags=g.subtreeFlags&14680064),I!==null?y=ir(I,y):(y=Er(y,x,u,null),y.flags|=2),y.return=s,d.return=s,d.sibling=y,s.child=d,d=y,y=s.child,x=r.child.memoizedState,x=x===null?Ja(u):{baseLanes:x.baseLanes|u,cachePool:null,transitions:x.transitions},y.memoizedState=x,y.childLanes=r.childLanes&~u,s.memoizedState=Ya,d}return y=r.child,r=y.sibling,d=ir(y,{mode:"visible",children:d.children}),(s.mode&1)===0&&(d.lanes=u),d.return=s,d.sibling=null,r!==null&&(u=s.deletions,u===null?(s.deletions=[r],s.flags|=16):u.push(r)),s.child=d,s.memoizedState=null,d}function Za(r,s){return s=Do({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function _o(r,s,u,d){return d!==null&&ba(d),ei(s,r.child,null,u),r=Za(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function Dv(r,s,u,d,g,y,x){if(u)return s.flags&256?(s.flags&=-257,d=qa(Error(n(422))),_o(r,s,x,d)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(y=d.fallback,g=s.mode,d=Do({mode:"visible",children:d.children},g,0,null),y=Er(y,g,x,null),y.flags|=2,d.return=s,y.return=s,d.sibling=y,s.child=d,(s.mode&1)!==0&&ei(s,r.child,null,x),s.child.memoizedState=Ja(x),s.memoizedState=Ya,y);if((s.mode&1)===0)return _o(r,s,x,null);if(g.data==="$!"){if(d=g.nextSibling&&g.nextSibling.dataset,d)var I=d.dgst;return d=I,y=Error(n(419)),d=qa(y,d,void 0),_o(r,s,x,d)}if(I=(x&r.childLanes)!==0,Mt||I){if(d=ht,d!==null){switch(x&-x){case 4:g=2;break;case 16:g=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(d.suspendedLanes|x))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,Ln(r,g),hn(d,r,g,-1))}return mu(),d=qa(Error(n(421))),_o(r,s,x,d)}return g.data==="$?"?(s.flags|=128,s.child=r.child,s=Xv.bind(null,r),g._reactRetry=s,null):(r=y.treeContext,Vt=qn(g.nextSibling),Gt=s,Ke=!0,un=null,r!==null&&(Qt[Xt++]=Tn,Qt[Xt++]=Pn,Qt[Xt++]=gr,Tn=r.id,Pn=r.overflow,gr=s),s=Za(s,d.children),s.flags|=4096,s)}function Eh(r,s,u){r.lanes|=s;var d=r.alternate;d!==null&&(d.lanes|=s),Ta(r.return,s,u)}function eu(r,s,u,d,g){var y=r.memoizedState;y===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:u,tailMode:g}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=d,y.tail=u,y.tailMode=g)}function bh(r,s,u){var d=s.pendingProps,g=d.revealOrder,y=d.tail;if(At(r,s,d.children,u),d=Ye.current,(d&2)!==0)d=d&1|2,s.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Eh(r,u,s);else if(r.tag===19)Eh(r,u,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}d&=1}if(Ve(Ye,d),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(u=s.child,g=null;u!==null;)r=u.alternate,r!==null&&yo(r)===null&&(g=u),u=u.sibling;u=g,u===null?(g=s.child,s.child=null):(g=u.sibling,u.sibling=null),eu(s,!1,g,u,y);break;case"backwards":for(u=null,g=s.child,s.child=null;g!==null;){if(r=g.alternate,r!==null&&yo(r)===null){s.child=g;break}r=g.sibling,g.sibling=u,u=g,g=r}eu(s,!0,u,null,y);break;case"together":eu(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Eo(r,s){(s.mode&1)===0&&r!==null&&(r.alternate=null,s.alternate=null,s.flags|=2)}function On(r,s,u){if(r!==null&&(s.dependencies=r.dependencies),xr|=s.lanes,(u&s.childLanes)===0)return null;if(r!==null&&s.child!==r.child)throw Error(n(153));if(s.child!==null){for(r=s.child,u=ir(r,r.pendingProps),s.child=u,u.return=s;r.sibling!==null;)r=r.sibling,u=u.sibling=ir(r,r.pendingProps),u.return=s;u.sibling=null}return s.child}function Fv(r,s,u){switch(s.tag){case 3:Sh(s),Zr();break;case 5:$d(s);break;case 1:Ot(s.type)&&oo(s);break;case 4:Ra(s,s.stateNode.containerInfo);break;case 10:var d=s.type._context,g=s.memoizedProps.value;Ve(ho,d._currentValue),d._currentValue=g;break;case 13:if(d=s.memoizedState,d!==null)return d.dehydrated!==null?(Ve(Ye,Ye.current&1),s.flags|=128,null):(u&s.child.childLanes)!==0?_h(r,s,u):(Ve(Ye,Ye.current&1),r=On(r,s,u),r!==null?r.sibling:null);Ve(Ye,Ye.current&1);break;case 19:if(d=(u&s.childLanes)!==0,(r.flags&128)!==0){if(d)return bh(r,s,u);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),Ve(Ye,Ye.current),d)break;return null;case 22:case 23:return s.lanes=0,vh(r,s,u)}return On(r,s,u)}var Ih,tu,Nh,Ah;Ih=function(r,s){for(var u=s.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},tu=function(){},Nh=function(r,s,u,d){var g=r.memoizedProps;if(g!==d){r=s.stateNode,vr(kn.current);var y=null;switch(u){case"input":g=K(r,g),d=K(r,d),y=[];break;case"select":g=E({},g,{value:void 0}),d=E({},d,{value:void 0}),y=[];break;case"textarea":g=bn(r,g),d=bn(r,d),y=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(r.onclick=ro)}wt(u,d);var x;u=null;for(z in g)if(!d.hasOwnProperty(z)&&g.hasOwnProperty(z)&&g[z]!=null)if(z==="style"){var I=g[z];for(x in I)I.hasOwnProperty(x)&&(u||(u={}),u[x]="")}else z!=="dangerouslySetInnerHTML"&&z!=="children"&&z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&z!=="autoFocus"&&(o.hasOwnProperty(z)?y||(y=[]):(y=y||[]).push(z,null));for(z in d){var L=d[z];if(I=g?.[z],d.hasOwnProperty(z)&&L!==I&&(L!=null||I!=null))if(z==="style")if(I){for(x in I)!I.hasOwnProperty(x)||L&&L.hasOwnProperty(x)||(u||(u={}),u[x]="");for(x in L)L.hasOwnProperty(x)&&I[x]!==L[x]&&(u||(u={}),u[x]=L[x])}else u||(y||(y=[]),y.push(z,u)),u=L;else z==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,I=I?I.__html:void 0,L!=null&&I!==L&&(y=y||[]).push(z,L)):z==="children"?typeof L!="string"&&typeof L!="number"||(y=y||[]).push(z,""+L):z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&(o.hasOwnProperty(z)?(L!=null&&z==="onScroll"&&He("scroll",r),y||I===L||(y=[])):(y=y||[]).push(z,L))}u&&(y=y||[]).push("style",u);var z=y;(s.updateQueue=z)&&(s.flags|=4)}},Ah=function(r,s,u,d){u!==d&&(s.flags|=4)};function ts(r,s){if(!Ke)switch(r.tailMode){case"hidden":s=r.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function Ct(r){var s=r.alternate!==null&&r.alternate.child===r.child,u=0,d=0;if(s)for(var g=r.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags&14680064,d|=g.flags&14680064,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=d,r.childLanes=u,s}function zv(r,s,u){var d=s.pendingProps;switch(Ca(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ct(s),null;case 1:return Ot(s.type)&&so(),Ct(s),null;case 3:return d=s.stateNode,ri(),qe(Rt),qe(xt),ja(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(r===null||r.child===null)&&(co(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,un!==null&&(du(un),un=null))),tu(r,s),Ct(s),null;case 5:Oa(s);var g=vr(Xi.current);if(u=s.type,r!==null&&s.stateNode!=null)Nh(r,s,u,d,g),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!d){if(s.stateNode===null)throw Error(n(166));return Ct(s),null}if(r=vr(kn.current),co(s)){d=s.stateNode,u=s.type;var y=s.memoizedProps;switch(d[vn]=s,d[Wi]=y,r=(s.mode&1)!==0,u){case"dialog":He("cancel",d),He("close",d);break;case"iframe":case"object":case"embed":He("load",d);break;case"video":case"audio":for(g=0;g<Ui.length;g++)He(Ui[g],d);break;case"source":He("error",d);break;case"img":case"image":case"link":He("error",d),He("load",d);break;case"details":He("toggle",d);break;case"input":ye(d,y),He("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!y.multiple},He("invalid",d);break;case"textarea":fr(d,y),He("invalid",d)}wt(u,y),g=null;for(var x in y)if(y.hasOwnProperty(x)){var I=y[x];x==="children"?typeof I=="string"?d.textContent!==I&&(y.suppressHydrationWarning!==!0&&no(d.textContent,I,r),g=["children",I]):typeof I=="number"&&d.textContent!==""+I&&(y.suppressHydrationWarning!==!0&&no(d.textContent,I,r),g=["children",""+I]):o.hasOwnProperty(x)&&I!=null&&x==="onScroll"&&He("scroll",d)}switch(u){case"input":on(d),Te(d,y,!0);break;case"textarea":on(d),Ms(d);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(d.onclick=ro)}d=g,s.updateQueue=d,d!==null&&(s.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=U(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=x.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof d.is=="string"?r=x.createElement(u,{is:d.is}):(r=x.createElement(u),u==="select"&&(x=r,d.multiple?x.multiple=!0:d.size&&(x.size=d.size))):r=x.createElementNS(r,u),r[vn]=s,r[Wi]=d,Ih(r,s,!1,!1),s.stateNode=r;e:{switch(x=yn(u,d),u){case"dialog":He("cancel",r),He("close",r),g=d;break;case"iframe":case"object":case"embed":He("load",r),g=d;break;case"video":case"audio":for(g=0;g<Ui.length;g++)He(Ui[g],r);g=d;break;case"source":He("error",r),g=d;break;case"img":case"image":case"link":He("error",r),He("load",r),g=d;break;case"details":He("toggle",r),g=d;break;case"input":ye(r,d),g=K(r,d),He("invalid",r);break;case"option":g=d;break;case"select":r._wrapperState={wasMultiple:!!d.multiple},g=E({},d,{value:void 0}),He("invalid",r);break;case"textarea":fr(r,d),g=bn(r,d),He("invalid",r);break;default:g=d}wt(u,g),I=g;for(y in I)if(I.hasOwnProperty(y)){var L=I[y];y==="style"?$n(r,L):y==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&Pe(r,L)):y==="children"?typeof L=="string"?(u!=="textarea"||L!=="")&&Fe(r,L):typeof L=="number"&&Fe(r,""+L):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?L!=null&&y==="onScroll"&&He("scroll",r):L!=null&&T(r,y,L,x))}switch(u){case"input":on(r),Te(r,d,!1);break;case"textarea":on(r),Ms(r);break;case"option":d.value!=null&&r.setAttribute("value",""+Ae(d.value));break;case"select":r.multiple=!!d.multiple,y=d.value,y!=null?We(r,!!d.multiple,y,!1):d.defaultValue!=null&&We(r,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(r.onclick=ro)}switch(u){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return Ct(s),null;case 6:if(r&&s.stateNode!=null)Ah(r,s,r.memoizedProps,d);else{if(typeof d!="string"&&s.stateNode===null)throw Error(n(166));if(u=vr(Xi.current),vr(kn.current),co(s)){if(d=s.stateNode,u=s.memoizedProps,d[vn]=s,(y=d.nodeValue!==u)&&(r=Gt,r!==null))switch(r.tag){case 3:no(d.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&no(d.nodeValue,u,(r.mode&1)!==0)}y&&(s.flags|=4)}else d=(u.nodeType===9?u:u.ownerDocument).createTextNode(d),d[vn]=s,s.stateNode=d}return Ct(s),null;case 13:if(qe(Ye),d=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Ke&&Vt!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Ld(),Zr(),s.flags|=98560,y=!1;else if(y=co(s),d!==null&&d.dehydrated!==null){if(r===null){if(!y)throw Error(n(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[vn]=s}else Zr(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Ct(s),y=!1}else un!==null&&(du(un),un=null),y=!0;if(!y)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=u,s):(d=d!==null,d!==(r!==null&&r.memoizedState!==null)&&d&&(s.child.flags|=8192,(s.mode&1)!==0&&(r===null||(Ye.current&1)!==0?ut===0&&(ut=3):mu())),s.updateQueue!==null&&(s.flags|=4),Ct(s),null);case 4:return ri(),tu(r,s),r===null&&Gi(s.stateNode.containerInfo),Ct(s),null;case 10:return Aa(s.type._context),Ct(s),null;case 17:return Ot(s.type)&&so(),Ct(s),null;case 19:if(qe(Ye),y=s.memoizedState,y===null)return Ct(s),null;if(d=(s.flags&128)!==0,x=y.rendering,x===null)if(d)ts(y,!1);else{if(ut!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(x=yo(r),x!==null){for(s.flags|=128,ts(y,!1),d=x.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),s.subtreeFlags=0,d=u,u=s.child;u!==null;)y=u,r=d,y.flags&=14680066,x=y.alternate,x===null?(y.childLanes=0,y.lanes=r,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=x.childLanes,y.lanes=x.lanes,y.child=x.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=x.memoizedProps,y.memoizedState=x.memoizedState,y.updateQueue=x.updateQueue,y.type=x.type,r=x.dependencies,y.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return Ve(Ye,Ye.current&1|2),s.child}r=r.sibling}y.tail!==null&&tt()>li&&(s.flags|=128,d=!0,ts(y,!1),s.lanes=4194304)}else{if(!d)if(r=yo(x),r!==null){if(s.flags|=128,d=!0,u=r.updateQueue,u!==null&&(s.updateQueue=u,s.flags|=4),ts(y,!0),y.tail===null&&y.tailMode==="hidden"&&!x.alternate&&!Ke)return Ct(s),null}else 2*tt()-y.renderingStartTime>li&&u!==1073741824&&(s.flags|=128,d=!0,ts(y,!1),s.lanes=4194304);y.isBackwards?(x.sibling=s.child,s.child=x):(u=y.last,u!==null?u.sibling=x:s.child=x,y.last=x)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=tt(),s.sibling=null,u=Ye.current,Ve(Ye,d?u&1|2:u&1),s):(Ct(s),null);case 22:case 23:return pu(),d=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==d&&(s.flags|=8192),d&&(s.mode&1)!==0?(Wt&1073741824)!==0&&(Ct(s),s.subtreeFlags&6&&(s.flags|=8192)):Ct(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function $v(r,s){switch(Ca(s),s.tag){case 1:return Ot(s.type)&&so(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return ri(),qe(Rt),qe(xt),ja(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return Oa(s),null;case 13:if(qe(Ye),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Zr()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return qe(Ye),null;case 4:return ri(),null;case 10:return Aa(s.type._context),null;case 22:case 23:return pu(),null;case 24:return null;default:return null}}var bo=!1,_t=!1,Bv=typeof WeakSet=="function"?WeakSet:Set,le=null;function si(r,s){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(d){Ze(r,s,d)}else u.current=null}function nu(r,s,u){try{u()}catch(d){Ze(r,s,d)}}var Th=!1;function Uv(r,s){if(pa=Ws,r=ad(),oa(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var d=u.getSelection&&u.getSelection();if(d&&d.rangeCount!==0){u=d.anchorNode;var g=d.anchorOffset,y=d.focusNode;d=d.focusOffset;try{u.nodeType,y.nodeType}catch{u=null;break e}var x=0,I=-1,L=-1,z=0,W=0,q=r,V=null;t:for(;;){for(var oe;q!==u||g!==0&&q.nodeType!==3||(I=x+g),q!==y||d!==0&&q.nodeType!==3||(L=x+d),q.nodeType===3&&(x+=q.nodeValue.length),(oe=q.firstChild)!==null;)V=q,q=oe;for(;;){if(q===r)break t;if(V===u&&++z===g&&(I=x),V===y&&++W===d&&(L=x),(oe=q.nextSibling)!==null)break;q=V,V=q.parentNode}q=oe}u=I===-1||L===-1?null:{start:I,end:L}}else u=null}u=u||{start:0,end:0}}else u=null;for(ma={focusedElem:r,selectionRange:u},Ws=!1,le=s;le!==null;)if(s=le,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,le=r;else for(;le!==null;){s=le;try{var ae=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ae!==null){var fe=ae.memoizedProps,nt=ae.memoizedState,D=s.stateNode,O=D.getSnapshotBeforeUpdate(s.elementType===s.type?fe:cn(s.type,fe),nt);D.__reactInternalSnapshotBeforeUpdate=O}break;case 3:var F=s.stateNode.containerInfo;F.nodeType===1?F.textContent="":F.nodeType===9&&F.documentElement&&F.removeChild(F.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Z){Ze(s,s.return,Z)}if(r=s.sibling,r!==null){r.return=s.return,le=r;break}le=s.return}return ae=Th,Th=!1,ae}function ns(r,s,u){var d=s.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var g=d=d.next;do{if((g.tag&r)===r){var y=g.destroy;g.destroy=void 0,y!==void 0&&nu(s,u,y)}g=g.next}while(g!==d)}}function Io(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var u=s=s.next;do{if((u.tag&r)===r){var d=u.create;u.destroy=d()}u=u.next}while(u!==s)}}function ru(r){var s=r.ref;if(s!==null){var u=r.stateNode;r.tag,r=u,typeof s=="function"?s(r):s.current=r}}function Ph(r){var s=r.alternate;s!==null&&(r.alternate=null,Ph(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[vn],delete s[Wi],delete s[va],delete s[_v],delete s[Ev])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function Lh(r){return r.tag===5||r.tag===3||r.tag===4}function Rh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Lh(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function iu(r,s,u){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?u.nodeType===8?u.parentNode.insertBefore(r,s):u.insertBefore(r,s):(u.nodeType===8?(s=u.parentNode,s.insertBefore(r,u)):(s=u,s.appendChild(r)),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=ro));else if(d!==4&&(r=r.child,r!==null))for(iu(r,s,u),r=r.sibling;r!==null;)iu(r,s,u),r=r.sibling}function su(r,s,u){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?u.insertBefore(r,s):u.appendChild(r);else if(d!==4&&(r=r.child,r!==null))for(su(r,s,u),r=r.sibling;r!==null;)su(r,s,u),r=r.sibling}var vt=null,fn=!1;function Zn(r,s,u){for(u=u.child;u!==null;)Oh(r,s,u),u=u.sibling}function Oh(r,s,u){if(wn&&typeof wn.onCommitFiberUnmount=="function")try{wn.onCommitFiberUnmount(zs,u)}catch{}switch(u.tag){case 5:_t||si(u,s);case 6:var d=vt,g=fn;vt=null,Zn(r,s,u),vt=d,fn=g,vt!==null&&(fn?(r=vt,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):vt.removeChild(u.stateNode));break;case 18:vt!==null&&(fn?(r=vt,u=u.stateNode,r.nodeType===8?wa(r.parentNode,u):r.nodeType===1&&wa(r,u),Oi(r)):wa(vt,u.stateNode));break;case 4:d=vt,g=fn,vt=u.stateNode.containerInfo,fn=!0,Zn(r,s,u),vt=d,fn=g;break;case 0:case 11:case 14:case 15:if(!_t&&(d=u.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){g=d=d.next;do{var y=g,x=y.destroy;y=y.tag,x!==void 0&&((y&2)!==0||(y&4)!==0)&&nu(u,s,x),g=g.next}while(g!==d)}Zn(r,s,u);break;case 1:if(!_t&&(si(u,s),d=u.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=u.memoizedProps,d.state=u.memoizedState,d.componentWillUnmount()}catch(I){Ze(u,s,I)}Zn(r,s,u);break;case 21:Zn(r,s,u);break;case 22:u.mode&1?(_t=(d=_t)||u.memoizedState!==null,Zn(r,s,u),_t=d):Zn(r,s,u);break;default:Zn(r,s,u)}}function Mh(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new Bv),s.forEach(function(d){var g=Yv.bind(null,r,d);u.has(d)||(u.add(d),d.then(g,g))})}}function dn(r,s){var u=s.deletions;if(u!==null)for(var d=0;d<u.length;d++){var g=u[d];try{var y=r,x=s,I=x;e:for(;I!==null;){switch(I.tag){case 5:vt=I.stateNode,fn=!1;break e;case 3:vt=I.stateNode.containerInfo,fn=!0;break e;case 4:vt=I.stateNode.containerInfo,fn=!0;break e}I=I.return}if(vt===null)throw Error(n(160));Oh(y,x,g),vt=null,fn=!1;var L=g.alternate;L!==null&&(L.return=null),g.return=null}catch(z){Ze(g,s,z)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)jh(s,r),s=s.sibling}function jh(r,s){var u=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(dn(s,r),Sn(r),d&4){try{ns(3,r,r.return),Io(3,r)}catch(fe){Ze(r,r.return,fe)}try{ns(5,r,r.return)}catch(fe){Ze(r,r.return,fe)}}break;case 1:dn(s,r),Sn(r),d&512&&u!==null&&si(u,u.return);break;case 5:if(dn(s,r),Sn(r),d&512&&u!==null&&si(u,u.return),r.flags&32){var g=r.stateNode;try{Fe(g,"")}catch(fe){Ze(r,r.return,fe)}}if(d&4&&(g=r.stateNode,g!=null)){var y=r.memoizedProps,x=u!==null?u.memoizedProps:y,I=r.type,L=r.updateQueue;if(r.updateQueue=null,L!==null)try{I==="input"&&y.type==="radio"&&y.name!=null&&_e(g,y),yn(I,x);var z=yn(I,y);for(x=0;x<L.length;x+=2){var W=L[x],q=L[x+1];W==="style"?$n(g,q):W==="dangerouslySetInnerHTML"?Pe(g,q):W==="children"?Fe(g,q):T(g,W,q,z)}switch(I){case"input":De(g,y);break;case"textarea":Os(g,y);break;case"select":var V=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var oe=y.value;oe!=null?We(g,!!y.multiple,oe,!1):V!==!!y.multiple&&(y.defaultValue!=null?We(g,!!y.multiple,y.defaultValue,!0):We(g,!!y.multiple,y.multiple?[]:"",!1))}g[Wi]=y}catch(fe){Ze(r,r.return,fe)}}break;case 6:if(dn(s,r),Sn(r),d&4){if(r.stateNode===null)throw Error(n(162));g=r.stateNode,y=r.memoizedProps;try{g.nodeValue=y}catch(fe){Ze(r,r.return,fe)}}break;case 3:if(dn(s,r),Sn(r),d&4&&u!==null&&u.memoizedState.isDehydrated)try{Oi(s.containerInfo)}catch(fe){Ze(r,r.return,fe)}break;case 4:dn(s,r),Sn(r);break;case 13:dn(s,r),Sn(r),g=r.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(au=tt())),d&4&&Mh(r);break;case 22:if(W=u!==null&&u.memoizedState!==null,r.mode&1?(_t=(z=_t)||W,dn(s,r),_t=z):dn(s,r),Sn(r),d&8192){if(z=r.memoizedState!==null,(r.stateNode.isHidden=z)&&!W&&(r.mode&1)!==0)for(le=r,W=r.child;W!==null;){for(q=le=W;le!==null;){switch(V=le,oe=V.child,V.tag){case 0:case 11:case 14:case 15:ns(4,V,V.return);break;case 1:si(V,V.return);var ae=V.stateNode;if(typeof ae.componentWillUnmount=="function"){d=V,u=V.return;try{s=d,ae.props=s.memoizedProps,ae.state=s.memoizedState,ae.componentWillUnmount()}catch(fe){Ze(d,u,fe)}}break;case 5:si(V,V.return);break;case 22:if(V.memoizedState!==null){zh(q);continue}}oe!==null?(oe.return=V,le=oe):zh(q)}W=W.sibling}e:for(W=null,q=r;;){if(q.tag===5){if(W===null){W=q;try{g=q.stateNode,z?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(I=q.stateNode,L=q.memoizedProps.style,x=L!=null&&L.hasOwnProperty("display")?L.display:null,I.style.display=Kt("display",x))}catch(fe){Ze(r,r.return,fe)}}}else if(q.tag===6){if(W===null)try{q.stateNode.nodeValue=z?"":q.memoizedProps}catch(fe){Ze(r,r.return,fe)}}else if((q.tag!==22&&q.tag!==23||q.memoizedState===null||q===r)&&q.child!==null){q.child.return=q,q=q.child;continue}if(q===r)break e;for(;q.sibling===null;){if(q.return===null||q.return===r)break e;W===q&&(W=null),q=q.return}W===q&&(W=null),q.sibling.return=q.return,q=q.sibling}}break;case 19:dn(s,r),Sn(r),d&4&&Mh(r);break;case 21:break;default:dn(s,r),Sn(r)}}function Sn(r){var s=r.flags;if(s&2){try{e:{for(var u=r.return;u!==null;){if(Lh(u)){var d=u;break e}u=u.return}throw Error(n(160))}switch(d.tag){case 5:var g=d.stateNode;d.flags&32&&(Fe(g,""),d.flags&=-33);var y=Rh(r);su(r,y,g);break;case 3:case 4:var x=d.stateNode.containerInfo,I=Rh(r);iu(r,I,x);break;default:throw Error(n(161))}}catch(L){Ze(r,r.return,L)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function Gv(r,s,u){le=r,Dh(r)}function Dh(r,s,u){for(var d=(r.mode&1)!==0;le!==null;){var g=le,y=g.child;if(g.tag===22&&d){var x=g.memoizedState!==null||bo;if(!x){var I=g.alternate,L=I!==null&&I.memoizedState!==null||_t;I=bo;var z=_t;if(bo=x,(_t=L)&&!z)for(le=g;le!==null;)x=le,L=x.child,x.tag===22&&x.memoizedState!==null?$h(g):L!==null?(L.return=x,le=L):$h(g);for(;y!==null;)le=y,Dh(y),y=y.sibling;le=g,bo=I,_t=z}Fh(r)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,le=y):Fh(r)}}function Fh(r){for(;le!==null;){var s=le;if((s.flags&8772)!==0){var u=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:_t||Io(5,s);break;case 1:var d=s.stateNode;if(s.flags&4&&!_t)if(u===null)d.componentDidMount();else{var g=s.elementType===s.type?u.memoizedProps:cn(s.type,u.memoizedProps);d.componentDidUpdate(g,u.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&zd(s,y,d);break;case 3:var x=s.updateQueue;if(x!==null){if(u=null,s.child!==null)switch(s.child.tag){case 5:u=s.child.stateNode;break;case 1:u=s.child.stateNode}zd(s,x,u)}break;case 5:var I=s.stateNode;if(u===null&&s.flags&4){u=I;var L=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&u.focus();break;case"img":L.src&&(u.src=L.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var z=s.alternate;if(z!==null){var W=z.memoizedState;if(W!==null){var q=W.dehydrated;q!==null&&Oi(q)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}_t||s.flags&512&&ru(s)}catch(V){Ze(s,s.return,V)}}if(s===r){le=null;break}if(u=s.sibling,u!==null){u.return=s.return,le=u;break}le=s.return}}function zh(r){for(;le!==null;){var s=le;if(s===r){le=null;break}var u=s.sibling;if(u!==null){u.return=s.return,le=u;break}le=s.return}}function $h(r){for(;le!==null;){var s=le;try{switch(s.tag){case 0:case 11:case 15:var u=s.return;try{Io(4,s)}catch(L){Ze(s,u,L)}break;case 1:var d=s.stateNode;if(typeof d.componentDidMount=="function"){var g=s.return;try{d.componentDidMount()}catch(L){Ze(s,g,L)}}var y=s.return;try{ru(s)}catch(L){Ze(s,y,L)}break;case 5:var x=s.return;try{ru(s)}catch(L){Ze(s,x,L)}}}catch(L){Ze(s,s.return,L)}if(s===r){le=null;break}var I=s.sibling;if(I!==null){I.return=s.return,le=I;break}le=s.return}}var Vv=Math.ceil,No=$.ReactCurrentDispatcher,ou=$.ReactCurrentOwner,Zt=$.ReactCurrentBatchConfig,ze=0,ht=null,ot=null,kt=0,Wt=0,oi=Kn(0),ut=0,rs=null,xr=0,Ao=0,lu=0,is=null,jt=null,au=0,li=1/0,Mn=null,To=!1,uu=null,er=null,Po=!1,tr=null,Lo=0,ss=0,cu=null,Ro=-1,Oo=0;function Tt(){return(ze&6)!==0?tt():Ro!==-1?Ro:Ro=tt()}function nr(r){return(r.mode&1)===0?1:(ze&2)!==0&&kt!==0?kt&-kt:Iv.transition!==null?(Oo===0&&(Oo=Rf()),Oo):(r=Be,r!==0||(r=window.event,r=r===void 0?16:Uf(r.type)),r)}function hn(r,s,u,d){if(50<ss)throw ss=0,cu=null,Error(n(185));Ai(r,u,d),((ze&2)===0||r!==ht)&&(r===ht&&((ze&2)===0&&(Ao|=u),ut===4&&rr(r,kt)),Dt(r,d),u===1&&ze===0&&(s.mode&1)===0&&(li=tt()+500,lo&&Xn()))}function Dt(r,s){var u=r.callbackNode;Iw(r,s);var d=Us(r,r===ht?kt:0);if(d===0)u!==null&&Tf(u),r.callbackNode=null,r.callbackPriority=0;else if(s=d&-d,r.callbackPriority!==s){if(u!=null&&Tf(u),s===1)r.tag===0?bv(Uh.bind(null,r)):Id(Uh.bind(null,r)),Sv(function(){(ze&6)===0&&Xn()}),u=null;else{switch(Of(d)){case 1:u=Gl;break;case 4:u=Pf;break;case 16:u=Fs;break;case 536870912:u=Lf;break;default:u=Fs}u=Xh(u,Bh.bind(null,r))}r.callbackPriority=s,r.callbackNode=u}}function Bh(r,s){if(Ro=-1,Oo=0,(ze&6)!==0)throw Error(n(327));var u=r.callbackNode;if(ai()&&r.callbackNode!==u)return null;var d=Us(r,r===ht?kt:0);if(d===0)return null;if((d&30)!==0||(d&r.expiredLanes)!==0||s)s=Mo(r,d);else{s=d;var g=ze;ze|=2;var y=Vh();(ht!==r||kt!==s)&&(Mn=null,li=tt()+500,Cr(r,s));do try{qv();break}catch(I){Gh(r,I)}while(!0);Na(),No.current=y,ze=g,ot!==null?s=0:(ht=null,kt=0,s=ut)}if(s!==0){if(s===2&&(g=Vl(r),g!==0&&(d=g,s=fu(r,g))),s===1)throw u=rs,Cr(r,0),rr(r,d),Dt(r,tt()),u;if(s===6)rr(r,d);else{if(g=r.current.alternate,(d&30)===0&&!Wv(g)&&(s=Mo(r,d),s===2&&(y=Vl(r),y!==0&&(d=y,s=fu(r,y))),s===1))throw u=rs,Cr(r,0),rr(r,d),Dt(r,tt()),u;switch(r.finishedWork=g,r.finishedLanes=d,s){case 0:case 1:throw Error(n(345));case 2:_r(r,jt,Mn);break;case 3:if(rr(r,d),(d&130023424)===d&&(s=au+500-tt(),10<s)){if(Us(r,0)!==0)break;if(g=r.suspendedLanes,(g&d)!==d){Tt(),r.pingedLanes|=r.suspendedLanes&g;break}r.timeoutHandle=ya(_r.bind(null,r,jt,Mn),s);break}_r(r,jt,Mn);break;case 4:if(rr(r,d),(d&4194240)===d)break;for(s=r.eventTimes,g=-1;0<d;){var x=31-ln(d);y=1<<x,x=s[x],x>g&&(g=x),d&=~y}if(d=g,d=tt()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*Vv(d/1960))-d,10<d){r.timeoutHandle=ya(_r.bind(null,r,jt,Mn),d);break}_r(r,jt,Mn);break;case 5:_r(r,jt,Mn);break;default:throw Error(n(329))}}}return Dt(r,tt()),r.callbackNode===u?Bh.bind(null,r):null}function fu(r,s){var u=is;return r.current.memoizedState.isDehydrated&&(Cr(r,s).flags|=256),r=Mo(r,s),r!==2&&(s=jt,jt=u,s!==null&&du(s)),r}function du(r){jt===null?jt=r:jt.push.apply(jt,r)}function Wv(r){for(var s=r;;){if(s.flags&16384){var u=s.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var d=0;d<u.length;d++){var g=u[d],y=g.getSnapshot;g=g.value;try{if(!an(y(),g))return!1}catch{return!1}}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function rr(r,s){for(s&=~lu,s&=~Ao,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var u=31-ln(s),d=1<<u;r[u]=-1,s&=~d}}function Uh(r){if((ze&6)!==0)throw Error(n(327));ai();var s=Us(r,0);if((s&1)===0)return Dt(r,tt()),null;var u=Mo(r,s);if(r.tag!==0&&u===2){var d=Vl(r);d!==0&&(s=d,u=fu(r,d))}if(u===1)throw u=rs,Cr(r,0),rr(r,s),Dt(r,tt()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,_r(r,jt,Mn),Dt(r,tt()),null}function hu(r,s){var u=ze;ze|=1;try{return r(s)}finally{ze=u,ze===0&&(li=tt()+500,lo&&Xn())}}function Sr(r){tr!==null&&tr.tag===0&&(ze&6)===0&&ai();var s=ze;ze|=1;var u=Zt.transition,d=Be;try{if(Zt.transition=null,Be=1,r)return r()}finally{Be=d,Zt.transition=u,ze=s,(ze&6)===0&&Xn()}}function pu(){Wt=oi.current,qe(oi)}function Cr(r,s){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,xv(u)),ot!==null)for(u=ot.return;u!==null;){var d=u;switch(Ca(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&so();break;case 3:ri(),qe(Rt),qe(xt),ja();break;case 5:Oa(d);break;case 4:ri();break;case 13:qe(Ye);break;case 19:qe(Ye);break;case 10:Aa(d.type._context);break;case 22:case 23:pu()}u=u.return}if(ht=r,ot=r=ir(r.current,null),kt=Wt=s,ut=0,rs=null,lu=Ao=xr=0,jt=is=null,wr!==null){for(s=0;s<wr.length;s++)if(u=wr[s],d=u.interleaved,d!==null){u.interleaved=null;var g=d.next,y=u.pending;if(y!==null){var x=y.next;y.next=g,d.next=x}u.pending=d}wr=null}return r}function Gh(r,s){do{var u=ot;try{if(Na(),wo.current=So,vo){for(var d=Je.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}vo=!1}if(kr=0,dt=at=Je=null,Yi=!1,Ji=0,ou.current=null,u===null||u.return===null){ut=1,rs=s,ot=null;break}e:{var y=r,x=u.return,I=u,L=s;if(s=kt,I.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var z=L,W=I,q=W.tag;if((W.mode&1)===0&&(q===0||q===11||q===15)){var V=W.alternate;V?(W.updateQueue=V.updateQueue,W.memoizedState=V.memoizedState,W.lanes=V.lanes):(W.updateQueue=null,W.memoizedState=null)}var oe=ph(x);if(oe!==null){oe.flags&=-257,mh(oe,x,I,y,s),oe.mode&1&&hh(y,z,s),s=oe,L=z;var ae=s.updateQueue;if(ae===null){var fe=new Set;fe.add(L),s.updateQueue=fe}else ae.add(L);break e}else{if((s&1)===0){hh(y,z,s),mu();break e}L=Error(n(426))}}else if(Ke&&I.mode&1){var nt=ph(x);if(nt!==null){(nt.flags&65536)===0&&(nt.flags|=256),mh(nt,x,I,y,s),ba(ii(L,I));break e}}y=L=ii(L,I),ut!==4&&(ut=2),is===null?is=[y]:is.push(y),y=x;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var D=fh(y,L,s);Fd(y,D);break e;case 1:I=L;var O=y.type,F=y.stateNode;if((y.flags&128)===0&&(typeof O.getDerivedStateFromError=="function"||F!==null&&typeof F.componentDidCatch=="function"&&(er===null||!er.has(F)))){y.flags|=65536,s&=-s,y.lanes|=s;var Z=dh(y,I,s);Fd(y,Z);break e}}y=y.return}while(y!==null)}Hh(u)}catch(he){s=he,ot===u&&u!==null&&(ot=u=u.return);continue}break}while(!0)}function Vh(){var r=No.current;return No.current=So,r===null?So:r}function mu(){(ut===0||ut===3||ut===2)&&(ut=4),ht===null||(xr&268435455)===0&&(Ao&268435455)===0||rr(ht,kt)}function Mo(r,s){var u=ze;ze|=2;var d=Vh();(ht!==r||kt!==s)&&(Mn=null,Cr(r,s));do try{Hv();break}catch(g){Gh(r,g)}while(!0);if(Na(),ze=u,No.current=d,ot!==null)throw Error(n(261));return ht=null,kt=0,ut}function Hv(){for(;ot!==null;)Wh(ot)}function qv(){for(;ot!==null&&!ww();)Wh(ot)}function Wh(r){var s=Qh(r.alternate,r,Wt);r.memoizedProps=r.pendingProps,s===null?Hh(r):ot=s,ou.current=null}function Hh(r){var s=r;do{var u=s.alternate;if(r=s.return,(s.flags&32768)===0){if(u=zv(u,s,Wt),u!==null){ot=u;return}}else{if(u=$v(u,s),u!==null){u.flags&=32767,ot=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{ut=6,ot=null;return}}if(s=s.sibling,s!==null){ot=s;return}ot=s=r}while(s!==null);ut===0&&(ut=5)}function _r(r,s,u){var d=Be,g=Zt.transition;try{Zt.transition=null,Be=1,Kv(r,s,u,d)}finally{Zt.transition=g,Be=d}return null}function Kv(r,s,u,d){do ai();while(tr!==null);if((ze&6)!==0)throw Error(n(327));u=r.finishedWork;var g=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var y=u.lanes|u.childLanes;if(Nw(r,y),r===ht&&(ot=ht=null,kt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||Po||(Po=!0,Xh(Fs,function(){return ai(),null})),y=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||y){y=Zt.transition,Zt.transition=null;var x=Be;Be=1;var I=ze;ze|=4,ou.current=null,Uv(r,u),jh(u,r),pv(ma),Ws=!!pa,ma=pa=null,r.current=u,Gv(u),vw(),ze=I,Be=x,Zt.transition=y}else r.current=u;if(Po&&(Po=!1,tr=r,Lo=g),y=r.pendingLanes,y===0&&(er=null),Sw(u.stateNode),Dt(r,tt()),s!==null)for(d=r.onRecoverableError,u=0;u<s.length;u++)g=s[u],d(g.value,{componentStack:g.stack,digest:g.digest});if(To)throw To=!1,r=uu,uu=null,r;return(Lo&1)!==0&&r.tag!==0&&ai(),y=r.pendingLanes,(y&1)!==0?r===cu?ss++:(ss=0,cu=r):ss=0,Xn(),null}function ai(){if(tr!==null){var r=Of(Lo),s=Zt.transition,u=Be;try{if(Zt.transition=null,Be=16>r?16:r,tr===null)var d=!1;else{if(r=tr,tr=null,Lo=0,(ze&6)!==0)throw Error(n(331));var g=ze;for(ze|=4,le=r.current;le!==null;){var y=le,x=y.child;if((le.flags&16)!==0){var I=y.deletions;if(I!==null){for(var L=0;L<I.length;L++){var z=I[L];for(le=z;le!==null;){var W=le;switch(W.tag){case 0:case 11:case 15:ns(8,W,y)}var q=W.child;if(q!==null)q.return=W,le=q;else for(;le!==null;){W=le;var V=W.sibling,oe=W.return;if(Ph(W),W===z){le=null;break}if(V!==null){V.return=oe,le=V;break}le=oe}}}var ae=y.alternate;if(ae!==null){var fe=ae.child;if(fe!==null){ae.child=null;do{var nt=fe.sibling;fe.sibling=null,fe=nt}while(fe!==null)}}le=y}}if((y.subtreeFlags&2064)!==0&&x!==null)x.return=y,le=x;else e:for(;le!==null;){if(y=le,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:ns(9,y,y.return)}var D=y.sibling;if(D!==null){D.return=y.return,le=D;break e}le=y.return}}var O=r.current;for(le=O;le!==null;){x=le;var F=x.child;if((x.subtreeFlags&2064)!==0&&F!==null)F.return=x,le=F;else e:for(x=O;le!==null;){if(I=le,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:Io(9,I)}}catch(he){Ze(I,I.return,he)}if(I===x){le=null;break e}var Z=I.sibling;if(Z!==null){Z.return=I.return,le=Z;break e}le=I.return}}if(ze=g,Xn(),wn&&typeof wn.onPostCommitFiberRoot=="function")try{wn.onPostCommitFiberRoot(zs,r)}catch{}d=!0}return d}finally{Be=u,Zt.transition=s}}return!1}function qh(r,s,u){s=ii(u,s),s=fh(r,s,1),r=Jn(r,s,1),s=Tt(),r!==null&&(Ai(r,1,s),Dt(r,s))}function Ze(r,s,u){if(r.tag===3)qh(r,r,u);else for(;s!==null;){if(s.tag===3){qh(s,r,u);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(er===null||!er.has(d))){r=ii(u,r),r=dh(s,r,1),s=Jn(s,r,1),r=Tt(),s!==null&&(Ai(s,1,r),Dt(s,r));break}}s=s.return}}function Qv(r,s,u){var d=r.pingCache;d!==null&&d.delete(s),s=Tt(),r.pingedLanes|=r.suspendedLanes&u,ht===r&&(kt&u)===u&&(ut===4||ut===3&&(kt&130023424)===kt&&500>tt()-au?Cr(r,0):lu|=u),Dt(r,s)}function Kh(r,s){s===0&&((r.mode&1)===0?s=1:(s=Bs,Bs<<=1,(Bs&130023424)===0&&(Bs=4194304)));var u=Tt();r=Ln(r,s),r!==null&&(Ai(r,s,u),Dt(r,u))}function Xv(r){var s=r.memoizedState,u=0;s!==null&&(u=s.retryLane),Kh(r,u)}function Yv(r,s){var u=0;switch(r.tag){case 13:var d=r.stateNode,g=r.memoizedState;g!==null&&(u=g.retryLane);break;case 19:d=r.stateNode;break;default:throw Error(n(314))}d!==null&&d.delete(s),Kh(r,u)}var Qh;Qh=function(r,s,u){if(r!==null)if(r.memoizedProps!==s.pendingProps||Rt.current)Mt=!0;else{if((r.lanes&u)===0&&(s.flags&128)===0)return Mt=!1,Fv(r,s,u);Mt=(r.flags&131072)!==0}else Mt=!1,Ke&&(s.flags&1048576)!==0&&Nd(s,uo,s.index);switch(s.lanes=0,s.tag){case 2:var d=s.type;Eo(r,s),r=s.pendingProps;var g=Xr(s,xt.current);ni(s,u),g=za(null,s,d,r,g,u);var y=$a();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Ot(d)?(y=!0,oo(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,La(s),g.updater=Co,s.stateNode=g,g._reactInternals=s,Ha(s,d,r,u),s=Xa(null,s,d,!0,y,u)):(s.tag=0,Ke&&y&&Sa(s),At(null,s,g,u),s=s.child),s;case 16:d=s.elementType;e:{switch(Eo(r,s),r=s.pendingProps,g=d._init,d=g(d._payload),s.type=d,g=s.tag=Zv(d),r=cn(d,r),g){case 0:s=Qa(null,s,d,r,u);break e;case 1:s=xh(null,s,d,r,u);break e;case 11:s=gh(null,s,d,r,u);break e;case 14:s=yh(null,s,d,cn(d.type,r),u);break e}throw Error(n(306,d,""))}return s;case 0:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:cn(d,g),Qa(r,s,d,g,u);case 1:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:cn(d,g),xh(r,s,d,g,u);case 3:e:{if(Sh(s),r===null)throw Error(n(387));d=s.pendingProps,y=s.memoizedState,g=y.element,Dd(r,s),go(s,d,null,u);var x=s.memoizedState;if(d=x.element,y.isDehydrated)if(y={element:d,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){g=ii(Error(n(423)),s),s=Ch(r,s,d,u,g);break e}else if(d!==g){g=ii(Error(n(424)),s),s=Ch(r,s,d,u,g);break e}else for(Vt=qn(s.stateNode.containerInfo.firstChild),Gt=s,Ke=!0,un=null,u=Md(s,null,d,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Zr(),d===g){s=On(r,s,u);break e}At(r,s,d,u)}s=s.child}return s;case 5:return $d(s),r===null&&Ea(s),d=s.type,g=s.pendingProps,y=r!==null?r.memoizedProps:null,x=g.children,ga(d,g)?x=null:y!==null&&ga(d,y)&&(s.flags|=32),kh(r,s),At(r,s,x,u),s.child;case 6:return r===null&&Ea(s),null;case 13:return _h(r,s,u);case 4:return Ra(s,s.stateNode.containerInfo),d=s.pendingProps,r===null?s.child=ei(s,null,d,u):At(r,s,d,u),s.child;case 11:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:cn(d,g),gh(r,s,d,g,u);case 7:return At(r,s,s.pendingProps,u),s.child;case 8:return At(r,s,s.pendingProps.children,u),s.child;case 12:return At(r,s,s.pendingProps.children,u),s.child;case 10:e:{if(d=s.type._context,g=s.pendingProps,y=s.memoizedProps,x=g.value,Ve(ho,d._currentValue),d._currentValue=x,y!==null)if(an(y.value,x)){if(y.children===g.children&&!Rt.current){s=On(r,s,u);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var I=y.dependencies;if(I!==null){x=y.child;for(var L=I.firstContext;L!==null;){if(L.context===d){if(y.tag===1){L=Rn(-1,u&-u),L.tag=2;var z=y.updateQueue;if(z!==null){z=z.shared;var W=z.pending;W===null?L.next=L:(L.next=W.next,W.next=L),z.pending=L}}y.lanes|=u,L=y.alternate,L!==null&&(L.lanes|=u),Ta(y.return,u,s),I.lanes|=u;break}L=L.next}}else if(y.tag===10)x=y.type===s.type?null:y.child;else if(y.tag===18){if(x=y.return,x===null)throw Error(n(341));x.lanes|=u,I=x.alternate,I!==null&&(I.lanes|=u),Ta(x,u,s),x=y.sibling}else x=y.child;if(x!==null)x.return=y;else for(x=y;x!==null;){if(x===s){x=null;break}if(y=x.sibling,y!==null){y.return=x.return,x=y;break}x=x.return}y=x}At(r,s,g.children,u),s=s.child}return s;case 9:return g=s.type,d=s.pendingProps.children,ni(s,u),g=Yt(g),d=d(g),s.flags|=1,At(r,s,d,u),s.child;case 14:return d=s.type,g=cn(d,s.pendingProps),g=cn(d.type,g),yh(r,s,d,g,u);case 15:return wh(r,s,s.type,s.pendingProps,u);case 17:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:cn(d,g),Eo(r,s),s.tag=1,Ot(d)?(r=!0,oo(s)):r=!1,ni(s,u),uh(s,d,g),Ha(s,d,g,u),Xa(null,s,d,!0,r,u);case 19:return bh(r,s,u);case 22:return vh(r,s,u)}throw Error(n(156,s.tag))};function Xh(r,s){return Af(r,s)}function Jv(r,s,u,d){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(r,s,u,d){return new Jv(r,s,u,d)}function gu(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Zv(r){if(typeof r=="function")return gu(r)?1:0;if(r!=null){if(r=r.$$typeof,r===ne)return 11;if(r===Q)return 14}return 2}function ir(r,s){var u=r.alternate;return u===null?(u=en(r.tag,s,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=s,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,s=r.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function jo(r,s,u,d,g,y){var x=2;if(d=r,typeof r=="function")gu(r)&&(x=1);else if(typeof r=="string")x=5;else e:switch(r){case H:return Er(u.children,g,y,s);case ie:x=8,g|=8;break;case ue:return r=en(12,u,s,g|2),r.elementType=ue,r.lanes=y,r;case de:return r=en(13,u,s,g),r.elementType=de,r.lanes=y,r;case te:return r=en(19,u,s,g),r.elementType=te,r.lanes=y,r;case ge:return Do(u,g,y,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case R:x=10;break e;case X:x=9;break e;case ne:x=11;break e;case Q:x=14;break e;case pe:x=16,d=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=en(x,u,s,g),s.elementType=r,s.type=d,s.lanes=y,s}function Er(r,s,u,d){return r=en(7,r,d,s),r.lanes=u,r}function Do(r,s,u,d){return r=en(22,r,d,s),r.elementType=ge,r.lanes=u,r.stateNode={isHidden:!1},r}function yu(r,s,u){return r=en(6,r,null,s),r.lanes=u,r}function wu(r,s,u){return s=en(4,r.children!==null?r.children:[],r.key,s),s.lanes=u,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function ek(r,s,u,d,g){this.tag=s,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wl(0),this.expirationTimes=Wl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wl(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function vu(r,s,u,d,g,y,x,I,L){return r=new ek(r,s,u,I,L),s===1?(s=1,y===!0&&(s|=8)):s=0,y=en(3,null,null,s),r.current=y,y.stateNode=r,y.memoizedState={element:d,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},La(y),r}function tk(r,s,u){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:P,key:d==null?null:""+d,children:r,containerInfo:s,implementation:u}}function Yh(r){if(!r)return Qn;r=r._reactInternals;e:{if(hr(r)!==r||r.tag!==1)throw Error(n(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Ot(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(Ot(u))return Ed(r,u,s)}return s}function Jh(r,s,u,d,g,y,x,I,L){return r=vu(u,d,!0,r,g,y,x,I,L),r.context=Yh(null),u=r.current,d=Tt(),g=nr(u),y=Rn(d,g),y.callback=s??null,Jn(u,y,g),r.current.lanes=g,Ai(r,g,d),Dt(r,d),r}function Fo(r,s,u,d){var g=s.current,y=Tt(),x=nr(g);return u=Yh(u),s.context===null?s.context=u:s.pendingContext=u,s=Rn(y,x),s.payload={element:r},d=d===void 0?null:d,d!==null&&(s.callback=d),r=Jn(g,s,x),r!==null&&(hn(r,g,x,y),mo(r,g,x)),x}function zo(r){return r=r.current,r.child?(r.child.tag===5,r.child.stateNode):null}function Zh(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<s?u:s}}function ku(r,s){Zh(r,s),(r=r.alternate)&&Zh(r,s)}function nk(){return null}var ep=typeof reportError=="function"?reportError:function(r){console.error(r)};function xu(r){this._internalRoot=r}$o.prototype.render=xu.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));Fo(r,s,null,null)},$o.prototype.unmount=xu.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Sr(function(){Fo(null,r,null,null)}),s[Nn]=null}};function $o(r){this._internalRoot=r}$o.prototype.unstable_scheduleHydration=function(r){if(r){var s=Df();r={blockedOn:null,target:r,priority:s};for(var u=0;u<Vn.length&&s!==0&&s<Vn[u].priority;u++);Vn.splice(u,0,r),u===0&&$f(r)}};function Su(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Bo(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function tp(){}function rk(r,s,u,d,g){if(g){if(typeof d=="function"){var y=d;d=function(){var z=zo(x);y.call(z)}}var x=Jh(s,d,r,0,null,!1,!1,"",tp);return r._reactRootContainer=x,r[Nn]=x.current,Gi(r.nodeType===8?r.parentNode:r),Sr(),x}for(;g=r.lastChild;)r.removeChild(g);if(typeof d=="function"){var I=d;d=function(){var z=zo(L);I.call(z)}}var L=vu(r,0,!1,null,null,!1,!1,"",tp);return r._reactRootContainer=L,r[Nn]=L.current,Gi(r.nodeType===8?r.parentNode:r),Sr(function(){Fo(s,L,u,d)}),L}function Uo(r,s,u,d,g){var y=u._reactRootContainer;if(y){var x=y;if(typeof g=="function"){var I=g;g=function(){var L=zo(x);I.call(L)}}Fo(s,x,r,g)}else x=rk(u,s,r,g,d);return zo(x)}Mf=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var u=Ni(s.pendingLanes);u!==0&&(Hl(s,u|1),Dt(s,tt()),(ze&6)===0&&(li=tt()+500,Xn()))}break;case 13:Sr(function(){var d=Ln(r,1);if(d!==null){var g=Tt();hn(d,r,1,g)}}),ku(r,1)}},ql=function(r){if(r.tag===13){var s=Ln(r,134217728);if(s!==null){var u=Tt();hn(s,r,134217728,u)}ku(r,134217728)}},jf=function(r){if(r.tag===13){var s=nr(r),u=Ln(r,s);if(u!==null){var d=Tt();hn(u,r,s,d)}ku(r,s)}},Df=function(){return Be},Ff=function(r,s){var u=Be;try{return Be=r,s()}finally{Be=u}},zl=function(r,s,u){switch(s){case"input":if(De(r,u),s=u.name,u.type==="radio"&&s!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<u.length;s++){var d=u[s];if(d!==r&&d.form===r.form){var g=io(d);if(!g)throw Error(n(90));Fr(d),De(d,g)}}}break;case"textarea":Os(r,u);break;case"select":s=u.value,s!=null&&We(r,!!u.multiple,s,!1)}},Sf=hu,Cf=Sr;var ik={usingClientEntryPoint:!1,Events:[Hi,Kr,io,kf,xf,hu]},os={findFiberByHostInstance:pr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},sk={bundleType:os.bundleType,version:os.version,rendererPackageName:os.rendererPackageName,rendererConfig:os.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=If(r),r===null?null:r.stateNode},findFiberByHostInstance:os.findFiberByHostInstance||nk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Go=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Go.isDisabled&&Go.supportsFiber)try{zs=Go.inject(sk),wn=Go}catch{}}return Ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ik,Ft.createPortal=function(r,s){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Su(s))throw Error(n(200));return tk(r,s,null,u)},Ft.createRoot=function(r,s){if(!Su(r))throw Error(n(299));var u=!1,d="",g=ep;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=vu(r,1,!1,null,null,u,!1,d,g),r[Nn]=s.current,Gi(r.nodeType===8?r.parentNode:r),new xu(s)},Ft.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=If(s),r=r===null?null:r.stateNode,r},Ft.flushSync=function(r){return Sr(r)},Ft.hydrate=function(r,s,u){if(!Bo(s))throw Error(n(200));return Uo(null,r,s,!0,u)},Ft.hydrateRoot=function(r,s,u){if(!Su(r))throw Error(n(405));var d=u!=null&&u.hydratedSources||null,g=!1,y="",x=ep;if(u!=null&&(u.unstable_strictMode===!0&&(g=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onRecoverableError!==void 0&&(x=u.onRecoverableError)),s=Jh(s,null,r,1,u??null,g,!1,y,x),r[Nn]=s.current,Gi(r),d)for(r=0;r<d.length;r++)u=d[r],g=u._getVersion,g=g(u._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[u,g]:s.mutableSourceEagerHydrationData.push(u,g);return new $o(s)},Ft.render=function(r,s,u){if(!Bo(s))throw Error(n(200));return Uo(null,r,s,!1,u)},Ft.unmountComponentAtNode=function(r){if(!Bo(r))throw Error(n(40));return r._reactRootContainer?(Sr(function(){Uo(null,null,r,!1,function(){r._reactRootContainer=null,r[Nn]=null})}),!0):!1},Ft.unstable_batchedUpdates=hu,Ft.unstable_renderSubtreeIntoContainer=function(r,s,u,d){if(!Bo(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Uo(r,s,u,!1,d)},Ft.version="18.3.1-next-f1338f8080-20240426",Ft}var up;function Xm(){if(up)return Eu.exports;up=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(),Eu.exports=dk(),Eu.exports}var cp;function hk(){if(cp)return Vo;cp=1;var e=Xm();return Vo.createRoot=e.createRoot,Vo.hydrateRoot=e.hydrateRoot,Vo}var pk=hk();const fp=e=>{let t;const n=new Set,i=(h,p)=>{const m=typeof h=="function"?h(t):h;if(!Object.is(m,t)){const w=t;t=p??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(v=>v(t,w))}},o=()=>t,c={setState:i,getState:o,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h))},f=t=e(i,o,c);return c},mk=(e=>e?fp(e):fp),gk=e=>e;function yk(e,t=gk){const n=ps.useSyncExternalStore(e.subscribe,ps.useCallback(()=>t(e.getState()),[e,t]),ps.useCallback(()=>t(e.getInitialState()),[e,t]));return ps.useDebugValue(n),n}const dp=e=>{const t=mk(e),n=i=>yk(t,i);return Object.assign(n,t),n},wk=(e=>e?dp(e):dp);class Bc extends Error{constructor(t,n,i){super(t),this.status=n,this.code=i,this.name="ApiError"}status;code}async function rt(e,t,n){const i=await fetch(t,{method:e,headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}),o=await i.text();let l=null;if(o)try{l=JSON.parse(o)}catch{l=null}if(!i.ok){const a=l??{};throw new Bc(a.error??`${i.status} ${i.statusText}`,i.status,a.code)}return l}const Pt=encodeURIComponent,Wo=e=>{const t=[];for(const[n,i]of Object.entries(e))i===void 0||i===""||i===!1||t.push(`${Pt(n)}=${Pt(i===!0?"1":String(i))}`);return t.length?`?${t.join("&")}`:""},et={repo:()=>rt("GET","/api/repo"),state:()=>rt("GET","/api/state"),patchPrefs:e=>rt("PATCH","/api/prefs",e),files:e=>rt("GET",`/api/targets/${Pt(e)}/files`),file:(e,t,n={})=>rt("GET",`/api/targets/${Pt(e)}/file${Wo({path:t,old:n.oldPath,untracked:n.untracked})}`),fullFile:(e,t,n)=>rt("GET",`/api/targets/${Pt(e)}/file/full${Wo({path:t,side:n})}`),setViewed:(e,t,n,i)=>rt("PUT",`/api/targets/${Pt(e)}/viewed`,{path:t,viewed:n,contentHash:i}),createComment:(e,t)=>rt("POST",`/api/targets/${Pt(e)}/comments`,t),updateComment:(e,t,n)=>rt("PATCH",`/api/targets/${Pt(e)}/comments/${Pt(t)}`,n),deleteComment:(e,t)=>rt("DELETE",`/api/targets/${Pt(e)}/comments/${Pt(t)}`),reanchor:(e,t)=>rt("POST",`/api/targets/${Pt(e)}/comments/reanchor`,{files:t}),exportComments:e=>rt("POST","/api/comments/export",{commentIds:e}),issues:()=>rt("GET","/api/issues"),createIssue:e=>rt("POST","/api/issues",e),updateIssue:(e,t)=>rt("PATCH",`/api/issues/${Pt(e)}`,t),deleteIssue:e=>rt("DELETE",`/api/issues/${Pt(e)}`),exportIssue:e=>rt("POST",`/api/issues/${Pt(e)}/export`),commits:e=>rt("GET",`/api/commits${Wo(e)}`),nvimInstances:(e,t=!1)=>rt("GET",`/api/nvim/instances${Wo({root:e,rescan:t})}`),nvimSelect:(e,t)=>rt("POST","/api/nvim/select",{root:e,socket:t}),nvimOpen:(e,t,n)=>rt("POST","/api/nvim/open",{socket:e,absPath:t,line:n})};async function hp(e){if(navigator.clipboard&&window.isSecureContext){await navigator.clipboard.writeText(e);return}const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.left="-9999px",document.body.appendChild(t),t.select();try{if(!document.execCommand("copy"))throw new Error("copy command failed")}finally{document.body.removeChild(t)}}let vk=0,Nu=null;function Ho(e){return e instanceof Bc||e instanceof Error?e.message:String(e)}const J=wk((e,t)=>{const n=o=>t().showToast(Ho(o),"error"),i=async o=>{const{targetKey:l,files:a}=t(),c=a.find(f=>f.path===o);e(f=>({diffs:{...f.diffs,[o]:{status:"loading"}}}));try{const f=await et.file(l,o,{oldPath:c?.oldPath,untracked:c?.untracked});return t().targetKey!==l?void 0:(e(h=>({diffs:{...h.diffs,[o]:{status:"ok",diff:f}}})),f)}catch(f){if(t().targetKey!==l)return;e(h=>({diffs:{...h.diffs,[o]:{status:"error",message:Ho(f)}}}));return}};return{repo:null,initError:null,prefs:{viewMode:"unified",nvimSocketByRoot:{}},targetKey:"working",root:"",files:[],filesLoading:!1,filesError:null,activeFile:null,diffs:{},comments:[],issues:[],allComments:[],nvim:null,nvimScanning:!1,panel:"diff",includeExported:!1,selectedCommentIds:[],jumpTo:null,toast:null,reattaching:null,refreshNonce:0,editor:null,focusedCommentId:null,railFilter:"file",async init(){try{const[o,l]=await Promise.all([et.repo(),et.state()]);e({repo:o,prefs:l.prefs,issues:l.issues,root:o.root}),await t().setTarget(o.defaultTarget||"working")}catch(o){e({initError:Ho(o)})}},async setTarget(o){e({targetKey:o,files:[],diffs:{},activeFile:null,comments:[],filesError:null,selectedCommentIds:[],reattaching:null,panel:"diff",editor:null,focusedCommentId:null}),et.patchPrefs({lastTarget:o}).catch(()=>{}),await t().loadFiles()},async loadFiles(){const o=t().targetKey;e({filesLoading:!0,filesError:null});try{await et.reanchor(o).catch(()=>{});const l=await et.files(o);if(t().targetKey!==o)return;const a=t().activeFile&&l.files.some(c=>c.path===t().activeFile)?t().activeFile:null;e({files:l.files,root:l.root,comments:l.comments,filesLoading:!1,activeFile:a}),l.root!==t().nvim?.root&&t().scanNvim()}catch(l){if(t().targetKey!==o)return;e({filesLoading:!1,filesError:Ho(l),files:[]})}},async refresh(){const{activeFile:o}=t();e({diffs:{},refreshNonce:t().refreshNonce+1}),await t().loadFiles(),o&&t().files.some(l=>l.path===o)&&await i(o)},async openFile(o,l=!1){e({activeFile:o,panel:"diff"});const a=t().diffs[o];!l&&a&&a.status!=="error"||await i(o)},setActiveFile(o){e({activeFile:o}),o&&t().openFile(o)},setViewMode(o){e(l=>({prefs:{...l.prefs,viewMode:o}})),et.patchPrefs({viewMode:o}).catch(n)},async toggleViewed(o){const{targetKey:l,files:a}=t(),c=a.find(h=>h.path===o);if(!c)return;const f=!c.viewed;e({files:a.map(h=>h.path===o?{...h,viewed:f,changed:!1}:h)});try{await et.setViewed(l,o,f,c.contentHash)}catch(h){n(h),e(p=>({files:p.files.map(m=>m.path===o?{...m,viewed:!f}:m)}))}},async createComment(o){try{const l=await et.createComment(t().targetKey,o);return e(a=>({comments:[...a.comments,l],editor:null,focusedCommentId:l.id})),l}catch(l){n(l);return}},async updateComment(o,l){try{const a=await et.updateComment(t().targetKey,o,l);return e(c=>({comments:c.comments.map(f=>f.id===o?a:f),reattaching:c.reattaching===o?null:c.reattaching})),a}catch(a){n(a);return}},async deleteComment(o){try{await et.deleteComment(t().targetKey,o),e(l=>({comments:l.comments.filter(a=>a.id!==o),selectedCommentIds:l.selectedCommentIds.filter(a=>a!==o),focusedCommentId:l.focusedCommentId===o?null:l.focusedCommentId,issues:l.issues.map(a=>a.commentIds.includes(o)?{...a,commentIds:a.commentIds.filter(c=>c!==o)}:a)}))}catch(l){n(l)}},async exportComments(o){if(o.length===0){t().showToast("没有可复制的评论");return}try{const l=await et.exportComments(o);await hp(l.text);const a=new Date().toISOString();e(c=>({comments:c.comments.map(f=>l.commentIds.includes(f.id)?{...f,status:f.status==="active"?"exported":f.status,exportedAt:a}:f)})),t().showToast(`已复制 ${l.count} 条评论到剪贴板`)}catch(l){n(l)}},async copyAllComments(){const{comments:o,includeExported:l}=t(),a=o.filter(c=>c.status==="active"||l&&c.status==="exported").map(c=>c.id);await t().exportComments(a)},async loadIssues(){try{const o=await et.state(),l=Object.values(o.targets).flatMap(a=>a.comments);e({issues:o.issues,allComments:l})}catch(o){n(o)}},async createIssue(o){try{const l=await et.createIssue(o);return e(a=>({issues:[...a.issues,l],selectedCommentIds:[]})),t().showToast(`已创建 Issue「${l.title}」`),l}catch(l){n(l);return}},async updateIssue(o,l){try{const a=await et.updateIssue(o,l);e(c=>({issues:c.issues.map(f=>f.id===o?a:f)}))}catch(a){n(a)}},async deleteIssue(o){try{await et.deleteIssue(o),e(l=>({issues:l.issues.filter(a=>a.id!==o)}))}catch(l){n(l)}},async exportIssue(o){try{const l=await et.exportIssue(o);await hp(l.text);const a=new Date().toISOString();e(c=>({comments:c.comments.map(f=>l.commentIds.includes(f.id)?{...f,status:f.status==="active"?"exported":f.status,exportedAt:a}:f)})),t().showToast(`已复制 Issue(含 ${l.count} 条评论)到剪贴板`)}catch(l){n(l)}},async scanNvim(o=!1){const l=t().root||t().repo?.root;if(l){e({nvimScanning:!0});try{const a=await et.nvimInstances(l,o);e({nvim:a,nvimScanning:!1})}catch(a){e({nvimScanning:!1}),n(a)}}},async selectNvim(o){const l=t().root;e(a=>a.nvim?{nvim:{...a.nvim,selected:o}}:{});try{await et.nvimSelect(l,o)}catch(a){n(a)}},async openInNvim(o,l){const{nvim:a,root:c}=t(),f=a?.selected;if(!f){t().showToast(a&&a.instances.length>1?"请先在顶部选择一个 nvim 实例":"未发现在此仓库打开的 nvim","error");return}const h=`${c.replace(/\/+$/,"")}/${o}`;try{await et.nvimOpen(f,h,l)}catch(p){n(p),p instanceof Bc&&p.code==="nvim_gone"&&t().scanNvim(!0)}},setPanel(o){e({panel:o}),o==="issues"&&t().loadIssues()},setIncludeExported(o){e({includeExported:o})},toggleSelectComment(o){e(l=>({selectedCommentIds:l.selectedCommentIds.includes(o)?l.selectedCommentIds.filter(a=>a!==o):[...l.selectedCommentIds,o]}))},clearSelectedComments(){e({selectedCommentIds:[]})},async jumpToComment(o){o.targetKey!==t().targetKey&&await t().setTarget(o.targetKey),e({panel:"diff"}),await t().openFile(o.filePath),e({jumpTo:{file:o.filePath,side:o.side,line:o.endLine,nonce:Date.now()}})},setReattaching(o){e({reattaching:o,editor:o?null:t().editor}),o&&t().showToast("在 diff 中点击或拖选行,将评论重新附着到该位置")},setEditor(o){e({editor:o,focusedCommentId:o?null:t().focusedCommentId})},async focusComment(o,l=!0){if(e({focusedCommentId:o}),!o||!l)return;const a=t().comments.find(c=>c.id===o)??t().allComments.find(c=>c.id===o);!a||a.status==="orphaned"||await t().jumpToComment(a)},setRailFilter(o){e({railFilter:o})},showToast(o,l="info"){const a=++vk;e({toast:{id:a,message:o,kind:l}}),Nu&&clearTimeout(Nu),Nu=setTimeout(()=>{t().toast?.id===a&&e({toast:null})},l==="error"?6e3:3e3)}}});class Pr extends Error{constructor(t){super(t),this.name="TargetKeyError"}}function Au(e){return!(!e||e.length>256||e.startsWith("-")||e.startsWith(".")||/[\s\0]/.test(e)||e.includes(".."))}function pp(e){if(e==="working"||e==="staged"||e==="all")return{kind:e};if(e.startsWith("commit:")){const t=e.slice(7);if(!Au(t))throw new Pr(`invalid commit ref: ${t}`);return{kind:"commit",sha:t}}if(e.startsWith("range:")){const t=e.slice(6),n=t.indexOf("..");if(n<=0)throw new Pr(`invalid range: ${t}`);const i=t.slice(0,n),o=t.slice(n+2);if(!Au(i)||!Au(o))throw new Pr(`invalid range refs: ${t}`);return{kind:"range",base:i,head:o}}throw new Pr(`unknown target key: ${e}`)}function fc(e){if(typeof e!="string"||!e)throw new Pr("empty target key");if(e.startsWith("worktree:")){const t=e.slice(9),n=/^(.+):(working|staged|all|commit:.+|range:.+)$/.exec(t);if(!n||!n[1]||!n[2])throw new Pr(`invalid worktree target key: ${e}`);const i=n[1];if(!i.startsWith("/"))throw new Pr(`worktree path must be absolute: ${i}`);return{...pp(n[2]),worktree:i}}return pp(e)}function Ym(e){let t;switch(e.kind){case"working":case"staged":case"all":t=e.kind;break;case"commit":t=`commit:${e.sha}`;break;case"range":t=`range:${e.base}..${e.head}`;break}return e.worktree?`worktree:${e.worktree}:${t}`:t}function kk(e){let t;switch(e.kind){case"working":t="Working tree";break;case"staged":t="Staged";break;case"all":t="Working tree vs HEAD";break;case"commit":t=`Commit ${e.sha.length>12?e.sha.slice(0,8):e.sha}`;break;case"range":t=`${e.base}..${e.head}`;break}return e.worktree?`[${e.worktree.split("/").filter(Boolean).pop()??e.worktree}] ${t}`:t}function xk(){const e=J(a=>a.nvim),t=J(a=>a.nvimScanning),n=J(a=>a.scanNvim),i=J(a=>a.selectNvim),o=e?.instances??[];let l;if(!e)l=C.jsx("span",{className:"muted",children:"nvim: 未扫描"});else if(!e.nvimAvailable)l=C.jsx("span",{className:"muted",title:"PATH 中找不到 nvim 可执行文件",children:"nvim 不可用"});else if(o.length===0)l=C.jsx("span",{className:"muted",children:"未发现在此仓库打开的 nvim"});else if(o.length===1){const a=o[0];l=C.jsxs("span",{className:"nvim-one",title:`${a.socket}
10
- cwd: ${a.cwd}`,children:["nvim",a.pid?` #${a.pid}`:""]})}else l=C.jsxs("select",{value:e.selected??"",onChange:a=>{i(a.target.value)},title:"多个 nvim 实例,请选择跳转目标",children:[!e.selected&&C.jsx("option",{value:"",children:"选择 nvim…"}),o.map(a=>C.jsxs("option",{value:a.socket,children:["nvim",a.pid?` #${a.pid}`:""," — ",a.cwd]},a.socket))]});return C.jsxs("div",{className:"nvim",children:[l,C.jsx("button",{className:"icon",onClick:()=>{n(!0)},disabled:t,title:"重新扫描 nvim 实例",children:t?"…":"⟳"})]})}function Sk(){const e=J(R=>R.repo),t=J(R=>R.targetKey),n=J(R=>R.setTarget),i=J(R=>R.refresh),o=J(R=>R.filesLoading),l=J(R=>R.prefs.viewMode),a=J(R=>R.setViewMode),c=J(R=>R.panel),f=J(R=>R.setPanel),h=J(R=>R.issues),p=se.useMemo(()=>fc(t),[t]),[m,w]=se.useState(p.kind),[v,k]=se.useState(p.worktree??""),[_,A]=se.useState(p.kind==="commit"?p.sha:""),[S,b]=se.useState(p.kind==="range"?p.base:"@"),[T,$]=se.useState(p.kind==="range"?p.head:""),[j,P]=se.useState(t);j!==t&&(P(t),w(p.kind),k(p.worktree??""),p.kind==="commit"&&A(p.sha),p.kind==="range"&&(b(p.base),$(p.head)));const H=(R={})=>{const X=R.kind??m,ne=R.worktree??v,de=ne?{worktree:ne}:{};let te;if(X==="commit"){const pe=(R.sha??_).trim();if(!pe)return;te={kind:"commit",sha:pe,...de}}else if(X==="range"){const pe=(R.base??S).trim()||"@",ge=(R.head??T).trim();if(!ge)return;te={kind:"range",base:pe,head:ge,...de}}else te={kind:X,...de};const Q=Ym(te);Q!==t&&n(Q)},ie=h.filter(R=>R.status==="open").length,ue=e.worktrees.filter(R=>R.path!==e.root);return C.jsxs("header",{className:"topbar",children:[C.jsxs("div",{className:"brand",title:e.root,children:[C.jsx("span",{className:"logo",children:"warden"}),C.jsx("span",{className:"repo-name",children:e.root.split("/").filter(Boolean).pop()}),C.jsx("span",{className:"branch",children:e.branch})]}),C.jsxs("div",{className:"target-switcher",children:[ue.length>0&&C.jsxs("select",{value:v,title:"Worktree",onChange:R=>{k(R.target.value),H({worktree:R.target.value})},children:[C.jsxs("option",{value:"",children:["主仓库 (",e.branch,")"]}),ue.map(R=>C.jsxs("option",{value:R.path,children:["worktree: ",R.path.split("/").filter(Boolean).pop()," (",R.branch??R.head.slice(0,7),")"]},R.path))]}),C.jsxs("select",{value:m,onChange:R=>{const X=R.target.value;w(X),(X==="working"||X==="staged"||X==="all")&&H({kind:X})},children:[C.jsx("option",{value:"working",children:"工作区未提交"}),C.jsx("option",{value:"staged",children:"已 staged"}),C.jsx("option",{value:"all",children:"工作区全部 (vs HEAD)"}),C.jsx("option",{value:"commit",children:"单个 commit"}),C.jsx("option",{value:"range",children:"两个 ref 对比"})]}),m==="commit"&&C.jsxs("form",{className:"inline-form",onSubmit:R=>{R.preventDefault(),H()},children:[C.jsx("input",{value:_,onChange:R=>A(R.target.value),placeholder:"sha / ref",spellCheck:!1}),C.jsx("button",{type:"submit",children:"查看"})]}),m==="range"&&C.jsxs("form",{className:"inline-form",onSubmit:R=>{R.preventDefault(),H()},children:[C.jsx("input",{value:S,onChange:R=>b(R.target.value),placeholder:"base (@ = HEAD)",spellCheck:!1}),C.jsx("span",{children:".."}),C.jsx("input",{value:T,onChange:R=>$(R.target.value),placeholder:"head",spellCheck:!1}),C.jsx("button",{type:"submit",children:"对比"})]}),C.jsx("span",{className:"target-label",title:t,children:kk(p)})]}),C.jsx("div",{className:"spacer"}),C.jsxs("div",{className:"actions",children:[C.jsx("button",{className:c==="commits"?"active":"",onClick:()=>f(c==="commits"?"diff":"commits"),title:"历史 commit",children:"Commits"}),C.jsxs("button",{className:c==="issues"?"active":"",onClick:()=>f(c==="issues"?"diff":"issues"),title:"本地 Issue",children:["Issues",ie?` (${ie})`:""]}),C.jsxs("div",{className:"seg",children:[C.jsx("button",{className:l==="unified"?"active":"",onClick:()=>a("unified"),children:"Unified"}),C.jsx("button",{className:l==="split"?"active":"",onClick:()=>a("split"),children:"Split"})]}),C.jsx(xk,{}),C.jsx("button",{onClick:()=>{i()},disabled:o,title:"刷新 (r)",children:o?"刷新中…":"刷新"})]})]})}function Jm(e,t,n){const i=[];let o=0;const l=[...e.dirs.keys()].sort((a,c)=>a.localeCompare(c));for(const a of l){let c=Jm(e.dirs.get(a),a,n?`${n}/${a}`:a);for(;c.children.length===1&&c.children[0].kind==="dir";){const f=c.children[0];c={...f,name:`${c.name}/${f.name}`}}o+=c.fileCount,i.push(c)}for(const a of[...e.files].sort((c,f)=>c.path.localeCompare(f.path)))i.push({kind:"file",name:a.path.split("/").pop()??a.path,path:a.path,entry:a}),o++;return{kind:"dir",name:t,path:n,children:i,fileCount:o}}function Ck(e){const t={dirs:new Map,files:[]};for(const n of e){const i=n.path.split("/");let o=t;for(let l=0;l<i.length-1;l++){const a=i[l];let c=o.dirs.get(a);c||(c={dirs:new Map,files:[]},o.dirs.set(a,c)),o=c}o.files.push(n)}return Jm(t,"","")}function dc(e,t=[]){for(const n of e.children)n.kind==="dir"&&(t.push(n.path),dc(n,t));return t}const _k={added:"A",modified:"M",deleted:"D",renamed:"R"};function Zm({node:e,depth:t}){const n=J(c=>c.activeFile===e.path),i=J(c=>c.openFile),o=J(c=>c.toggleViewed),l=J(c=>c.comments.filter(f=>f.filePath===e.path).length),a=e.entry;return C.jsxs("div",{className:`tree-row file ${n?"active":""} ${a.viewed?"viewed":""}`,style:{paddingLeft:8+t*14},onClick:()=>{i(e.path)},title:a.oldPath?`${a.oldPath} → ${a.path}`:a.path,children:[C.jsx("input",{type:"checkbox",className:"viewed-box",checked:a.viewed,onClick:c=>c.stopPropagation(),onChange:()=>{o(e.path)},title:"标记为已查看"}),C.jsx("span",{className:`status status-${a.status}`,children:_k[a.status]}),C.jsx("span",{className:"name",children:e.name}),a.changed&&C.jsx("span",{className:"changed",title:"文件自上次标记已查看后发生变化",children:"已变化"}),l>0&&C.jsx("span",{className:"cc",title:"评论数",children:l}),C.jsx("span",{className:"counts",children:a.binary?C.jsx("span",{className:"muted",children:"bin"}):C.jsxs(C.Fragment,{children:[C.jsxs("span",{className:"add",children:["+",a.additions]}),C.jsxs("span",{className:"del",children:["-",a.deletions]})]})})]})}function eg({node:e,depth:t,open:n,toggle:i}){const o=n.has(e.path);return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:"tree-row dir",style:{paddingLeft:8+t*14},onClick:()=>i(e.path),children:[C.jsx("span",{className:`chev ${o?"open":""}`,children:"▸"}),C.jsx("span",{className:"name",children:e.name}),C.jsx("span",{className:"muted count",children:e.fileCount})]}),o&&e.children.map(l=>l.kind==="dir"?C.jsx(eg,{node:l,depth:t+1,open:n,toggle:i},l.path):C.jsx(Zm,{node:l,depth:t+1},l.path))]})}function Ek(){const e=J(w=>w.files),t=J(w=>w.filesLoading),n=J(w=>w.filesError),i=J(w=>w.targetKey),o=J(w=>w.activeFile),l=se.useMemo(()=>Ck(e),[e]),[a,c]=se.useState(new Set);se.useEffect(()=>{c(new Set)},[i]),se.useEffect(()=>{o&&c(w=>{const v=new Set(w),k=dc(l);for(const _ of k)o.startsWith(_+"/")&&v.add(_);return v.size===w.size?w:v})},[o,l]);const f=w=>c(v=>{const k=new Set(v);return k.has(w)?k.delete(w):k.add(w),k}),h=e.filter(w=>w.viewed).length,p=e.reduce((w,v)=>w+v.additions,0),m=e.reduce((w,v)=>w+v.deletions,0);return C.jsxs("aside",{className:"sidebar",children:[C.jsxs("div",{className:"sidebar-head",children:[C.jsxs("span",{children:[e.length," 个文件 ",C.jsxs("span",{className:"add",children:["+",p]})," ",C.jsxs("span",{className:"del",children:["-",m]})]}),C.jsxs("span",{className:"muted",children:[h,"/",e.length," viewed"]}),C.jsxs("span",{className:"tree-tools",children:[C.jsx("button",{className:"link",onClick:()=>c(new Set(dc(l))),children:"展开"}),C.jsx("button",{className:"link",onClick:()=>c(new Set),children:"折叠"})]})]}),C.jsxs("div",{className:"tree",children:[n&&C.jsx("div",{className:"error-box",children:n}),!n&&!t&&e.length===0&&C.jsx("div",{className:"muted empty",children:"没有改动"}),t&&e.length===0&&C.jsx("div",{className:"muted empty",children:"加载中…"}),l.children.map(w=>w.kind==="dir"?C.jsx(eg,{node:w,depth:0,open:a,toggle:f},w.path):C.jsx(Zm,{node:w,depth:0},w.path))]})]})}var bk=Xm();function Ik(e,t,n){const i=new Array(e);return new Proxy(i,{get(o,l,a){if(typeof l=="string"){const c=l.charCodeAt(0);if(c>=48&&c<=57){const f=+l;if(Number.isInteger(f)&&f>=0&&f<e){let h=o[f];if(!h){const p=t[f*2];h=o[f]={index:f,key:n(f),start:p,size:t[f*2+1],end:p+t[f*2+1],lane:0}}return h}}if(l==="length")return e}return Reflect.get(o,l,a)}})}function ui(e,t,n){let i=n.initialDeps??[],o,l=!0;function a(){const c=e();return(c.length!==i.length||c.some((h,p)=>i[p]!==h))&&(i=c,o=t(...c),n?.onChange&&!(l&&n.skipInitialOnChange)&&n.onChange(o),l=!1),o}return a.updateDeps=c=>{i=c},a}function mp(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Nk=(e,t)=>Math.abs(e-t)<1.01,Ak=(e,t,n)=>{let i;return Object.assign(function(...o){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,o),n)},{cancel:()=>{e.clearTimeout(i)}})};let as;const Tu=()=>{if(as!==void 0)return as;if(typeof navigator>"u")return as=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return as=!0;const e=navigator.maxTouchPoints;return as=navigator.platform==="MacIntel"&&e!==void 0&&e>0},gp=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Tk=e=>e,Pk=e=>{const t=Math.max(e.startIndex-e.overscan,0),i=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,o=new Array(i);for(let l=0;l<i;l++)o[l]=t+l;return o},Lk=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const o=a=>{const{width:c,height:f}=a;t({width:Math.round(c),height:Math.round(f)})};if(o(gp(n)),!i.ResizeObserver)return()=>{};const l=new i.ResizeObserver(a=>{const c=()=>{const f=a[0];if(f?.borderBoxSize){const h=f.borderBoxSize[0];if(h){o({width:h.inlineSize,height:h.blockSize});return}}o(gp(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return l.observe(n,{box:"border-box"}),()=>{l.unobserve(n)}},ul={passive:!0},Rk=typeof window>"u"?!0:"onscrollend"in window,Ok=(e,t,n)=>{const i=e.scrollElement;if(!i)return;const o=e.targetWindow;if(!o)return;const l=e.options.useScrollendEvent&&Rk;let a=0;const c=l?null:Ak(o,()=>t(a,!1),e.options.isScrollingResetDelay),f=m=>()=>{a=n(i),c?.(),t(a,m)},h=f(!0),p=f(!1);return i.addEventListener("scroll",h,ul),l&&i.addEventListener("scrollend",p,ul),()=>{i.removeEventListener("scroll",h),l&&i.removeEventListener("scrollend",p),c?.cancel()}},Mk=(e,t)=>Ok(e,t,n=>{const{horizontal:i,isRtl:o}=e.options;return i?n.scrollLeft*(o&&-1||1):n.scrollTop}),jk=(e,t,n)=>{if(n.options.useCachedMeasurements){const i=n.indexFromElement(e),o=n.options.getItemKey(i);return n.itemSizeCache.get(o)??n.options.estimateSize(i)}if(t?.borderBoxSize){const i=t.borderBoxSize[0];if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}if(!t){const i=n.indexFromElement(e),o=n.options.getItemKey(i),l=n.itemSizeCache.get(o);if(l!==void 0)return l}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Dk=(e,{adjustments:t=0,behavior:n},i)=>{var o,l;(l=(o=i.scrollElement)==null?void 0:o.scrollTo)==null||l.call(o,{[i.options.horizontal?"left":"top"]:e+t,behavior:n})},Fk=Dk;class zk{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var n,i,o;return((o=(i=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:i.now)==null?void 0:o.call(i))??Date.now()},this.observer=(()=>{let n=null;const i=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(l=>{const a=()=>{const c=l.target,f=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);for(const[h,p]of this.elementsCache)if(p===c){this.elementsCache.delete(h);break}return}this.isIndexInRange(f)&&this.shouldMeasureDuringScroll(f)&&this.resizeItem(f,this.options.measureElement(c,l,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var o;(o=i())==null||o.disconnect(),n=null},observe:o=>{var l;return(l=i())==null?void 0:l.observe(o,{box:"border-box"})},unobserve:o=>{var l;return(l=i())==null?void 0:l.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{var i,o;const l={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Tk,rangeExtractor:Pk,onChange:()=>{},measureElement:jk,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const w in n){const v=n[w];v!==void 0&&(l[w]=v)}const a=this.options;let c=null,f=null,h=!1;if(a!==void 0&&a.enabled&&l.enabled&&l.anchorTo==="end"&&this.scrollElement!==null){const w=a.count,v=l.count,k=this.getMeasurements(),_=w>0?((i=k[0])==null?void 0:i.key)??a.getItemKey(0):null,A=w>0?((o=k[w-1])==null?void 0:o.key)??a.getItemKey(w-1):null;if(v!==w||w>0&&v>0&&(l.getItemKey(0)!==_||l.getItemKey(v-1)!==A)){h=!0;const T=w>0?this.getVirtualItemForOffset(this.getScrollOffset())??k[0]:null;T&&(c=[T.key,this.getScrollOffset()-T.start]);const $=l.followOnAppend===!0?"auto":l.followOnAppend||null;$&&v>w&&this.isAtEnd(a.scrollEndThreshold)&&(w===0||l.getItemKey(v-1)!==A)&&(f=$)}}this.options=l,h&&(this.pendingMin=0,this.itemSizeCacheVersion++);let p=!1,m=0;if(c&&this.scrollOffset!==null){const[w,v]=c,k=this.getMeasurements(),{count:_,getItemKey:A}=this.options;let S=0;for(;S<_&&A(S)!==w;)S++;if(S<_){const b=k[S];if(b){const T=Math.max(0,b.start+v);T!==this.scrollOffset&&(m=T-this.scrollOffset,this.scrollOffset=T,p=!0)}}}(p||f)&&(this.pendingScrollAnchor=[p?c[0]:null,p?c[1]:0,f,m])},this.notify=n=>{var i,o;(o=(i=this.options).onChange)==null||o.call(i,this,n)},this.maybeNotify=ui(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}if(this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(l=>{this.observer.observe(l)}),this.unsubs.push(this.options.observeElementRect(this,l=>{this.scrollRect=l,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(l,a)=>{if(a&&this._intendedScrollOffset===null&&l===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(l-this._intendedScrollOffset)<1.5&&(l=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(l-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const c=this.getScrollOffset();this.scrollDirection=a?c===l?this.scrollDirection:c<l?"forward":"backward":null,this.scrollOffset=l,this.isScrolling=a,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const l=this.scrollElement,a=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},c=()=>{this._iosTouching=!1,!(!Tu()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};l.addEventListener("touchstart",a,ul),l.addEventListener("touchend",c,ul),this.unsubs.push(()=>{l.removeEventListener("touchstart",a),l.removeEventListener("touchend",c),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const o=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,o&&this.scrollElement&&this.options.enabled){const[l,a,c,f]=o;l!==null&&!c&&(Tu()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?f!==0&&(this._iosDeferredAdjustment+=f):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),c&&this.scrollToEnd({behavior:c})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:n,maxAtWrite:i}=this._clampedAdjustment,o=this.getMaxScrollOffset();o>i+.5&&(this._clampedAdjustment=n>o+.5?{target:n,maxAtWrite:o}:null,this._scrollToOffset(n,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const n=this.getScrollOffset(),i=this.getMaxScrollOffset();if(n<0||n>i)return;if(this._iosDeferredAdjustment<0&&n>=i-1){this._iosDeferredAdjustment=0;return}const o=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(n,{adjustments:this.scrollAdjustments+=o,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=ui(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(n,i,o,l,a,c,f,h)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMin=null,{count:n,paddingStart:i,scrollMargin:o,getItemKey:l,enabled:a,lanes:c,laneAssignmentMode:f,gap:h}),{key:!1}),this.isIndexInRange=n=>n>=0&&n<this.options.count,this.getMeasurements=ui(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:i,scrollMargin:o,getItemKey:l,enabled:a,lanes:c,laneAssignmentMode:f,gap:h},p)=>{const m=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const S of this.laneAssignments.keys())S>=n&&this.laneAssignments.delete(S);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(S=>{this.itemSizeCache.set(S.key,S.size)}));const w=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1),c===1){const S=n*2;let b=this._flatMeasurements;if(!b||b.length<S){const j=new Float64Array(S);b&&w>0&&j.set(b.subarray(0,w*2)),b=j,this._flatMeasurements=b}let T;if(w===0)T=i+o;else{const j=w-1;T=b[j*2]+b[j*2+1]+h}for(let j=w;j<n;j++){const P=l(j),H=m.get(P),ie=typeof H=="number"?H:this.options.estimateSize(j);b[j*2]=T,b[j*2+1]=ie,T+=ie+h}const $=Ik(n,b,l);return this.measurementsCache=$,$}const v=this.measurementsCache.slice(0,w),k=new Array(c).fill(void 0),_=new Float64Array(c);let A=0;for(let S=0;S<w;S++){const b=v[S];b&&(k[b.lane]===void 0&&A++,k[b.lane]=S,_[b.lane]=b.end)}for(let S=w;S<n;S++){const b=l(S),T=this.laneAssignments.get(S);let $,j;const P=f==="estimate"||m.has(b);if(T!==void 0&&this.options.lanes>1){$=T;const R=k[$],X=R!==void 0?v[R]:void 0;j=X?X.end+h:i+o}else if(A===c){let R=0,X=_[0],ne=k[0];for(let de=1;de<c;de++){const te=_[de];(te<X||te===X&&k[de]<ne)&&(R=de,X=te,ne=k[de])}$=R,j=X+h,P&&this.laneAssignments.set(S,$)}else $=S%this.options.lanes,j=i+o,P&&this.laneAssignments.set(S,$);const H=m.get(b),ie=typeof H=="number"?H:this.options.estimateSize(S),ue=j+ie;v[S]={index:S,start:j,size:ie,end:ue,key:b,lane:$},k[$]===void 0&&A++,k[$]=S,_[$]=ue}return this.measurementsCache=v,v},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ui(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,i,o,l)=>n.length===0||i===0?(this.range=null,null):(this.range=Bk(n,i,o,l,l===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ui(()=>{let n=null,i=null;const o=this.calculateRange();return o&&(n=o.startIndex,i=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,i]},(n,i,o,l,a)=>l===null||a===null?[]:n({startIndex:l,endIndex:a,overscan:i,count:o}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const i=this.options.indexAttribute,o=n.getAttribute(i);return o?parseInt(o,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var i;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const o=this.scrollState.index??((i=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:i.index);if(o!==void 0&&this.range){const l=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,o-l),c=Math.min(this.options.count-1,o+l);return n>=a&&n<=c}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((a,c)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(c))});return}const i=this.indexFromElement(n);if(!this.isIndexInRange(i))return;const o=this.options.getItemKey(i),l=this.elementsCache.get(o);l!==n&&(l&&this.observer.unobserve(l),this.observer.observe(n),this.elementsCache.set(o,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(i)&&this.resizeItem(i,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,i)=>{var o,l;if(!this.isIndexInRange(n))return;let a,c,f;const h=this._flatMeasurements;if(this.options.lanes===1&&h!==null)f=this.options.getItemKey(n),c=h[n*2],a=h[n*2+1];else{const w=this.measurementsCache[n];if(!w)return;f=w.key,c=w.start,a=w.size}const p=this.itemSizeCache.get(f)??a,m=i-p;if(m!==0){const w=this.options.anchorTo==="end"&&((o=this.scrollState)==null?void 0:o.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,v=w?this.getTotalSize():0,k=this.getScrollOffset()+this.scrollAdjustments,A=!this.itemSizeCache.has(f)?c<k:c+p<=k&&this.scrollDirection!=="backward",S=((l=this.scrollState)==null?void 0:l.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[n]??{index:n,key:f,start:c,size:a,end:c+a,lane:0},m,this):A);(this.pendingMin===null||n<this.pendingMin)&&(this.pendingMin=n),this.itemSizeCache.set(f,i),this.itemSizeCacheVersion++;let b=!1;w?b=this.applyScrollAdjustment(this.getTotalSize()-v):S&&(b=this.applyScrollAdjustment(m)),this.notify(b),this._retryClampedAdjustment()}},this.getVirtualItems=ui(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,i)=>{const o=[];for(let l=0,a=n.length;l<a;l++){const c=n[l],f=i[c];o.push(f)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const i=this.getMeasurements();if(i.length===0)return;const o=this._flatMeasurements,l=this.options.lanes===1&&o!=null,a=tg(0,i.length-1,l?c=>o[c*2]:c=>mp(i[c]).start,n);return mp(i[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(n=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=n,this.getOffsetForAlignment=(n,i,o=0)=>{if(!this.scrollElement)return 0;const l=this.getSize(),a=this.getScrollOffset();i==="auto"&&(i=n>=a+l?"end":"start"),i==="center"?n+=(o-l)/2:i==="end"&&(n-=l);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,i="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=this.getSize(),l=this.getScrollOffset(),a=this.measurementsCache[n];if(!a)return;if(i==="auto")if(a.end>=l+o-this.options.scrollPaddingEnd)i="end";else if(a.start<=l+this.options.scrollPaddingStart)i="start";else return[l,i];if(i==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),i];const c=i==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,i,a.size),i]},this.scrollToOffset=(n,{align:i="start",behavior:o="auto"}={})=>{this._iosDeferredAdjustment=0;const l=this.getOffsetForAlignment(n,i),a=this.now();this.scrollState={index:null,align:i,behavior:o,startedAt:a,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:i="auto",behavior:o="auto"}={})=>{this._iosDeferredAdjustment=0,n=Math.max(0,Math.min(n,this.options.count-1));const l=this.getOffsetForIndex(n,i);if(!l)return;const[a,c]=l,f=this.now();this.scrollState={index:n,align:c,behavior:o,startedAt:f,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:i="auto"}={})=>{const o=this.getScrollOffset()+n,l=this.now();this.scrollState={index:null,align:"start",behavior:i,startedAt:l,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:n="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:n});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:n})},this.getTotalSize=()=>{var n;const i=this.getMeasurements();let o;if(i.length===0)o=this.options.paddingStart;else if(this.options.lanes===1){const l=i.length-1,a=this._flatMeasurements;a!=null?o=a[l*2]+a[l*2+1]:o=((n=i[l])==null?void 0:n.end)??0}else{const l=Array(this.options.lanes).fill(null);let a=i.length-1;for(;a>=0&&l.some(c=>c===null);){const c=i[a];l[c.lane]===null&&(l[c.lane]=c.end),a--}o=Math.max(...l.filter(c=>c!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const n=[];if(this.itemSizeCache.size===0)return n;const i=this.getMeasurements();for(const o of i)o&&this.itemSizeCache.has(o.key)&&n.push({index:o.index,key:o.key,start:o.start,size:o.size,end:o.end,lane:o.lane});return n},this._scrollToOffset=(n,{adjustments:i,behavior:o})=>{this._intendedScrollOffset=n+(i??0),this.options.scrollToFn(n,{behavior:o,adjustments:i},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(t)}applyScrollAdjustment(t,n){if(t===0)return!1;if(Tu()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=t,!1;{const i=this.getScrollOffset()+this.scrollAdjustments+t,o=this.scrollElement,l=o!==null&&("scrollHeight"in o||"document"in o)?this.getMaxScrollOffset():null;return this._clampedAdjustment=l!==null&&i>l+.5?{target:i,maxAtWrite:l}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=t,behavior:n}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const i=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,o=i?i[0]:this.scrollState.lastTargetOffset,l=1,a=o!==this.scrollState.lastTargetOffset;if(!a&&Nk(o,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=l){this.getScrollOffset()!==o&&this._scrollToOffset(o,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const c=this.getSize()||600,f=Math.abs(o-this.getScrollOffset()),h=this.scrollState.behavior==="smooth"&&f>c;this.scrollState.lastTargetOffset=o,h||(this.scrollState.behavior="auto"),this._scrollToOffset(o,{adjustments:void 0,behavior:h?"smooth":"auto"})}this.scheduleScrollReconcile()}}const tg=(e,t,n,i)=>{for(;e<=t;){const o=(e+t)/2|0,l=n(o);if(l<i)e=o+1;else if(l>i)t=o-1;else return o}return e>0?e-1:0};function $k(e,t,n){let i=0;for(;i<=t;){const o=(i+t)/2|0,l=e[o*2];if(l<n)i=o+1;else if(l>n)t=o-1;else return o}return i>0?i-1:0}function Bk(e,t,n,i,o){const l=e.length-1;if(e.length<=i)return{startIndex:0,endIndex:l};if(i===1&&o!==null){const h=$k(o,l,n);let p=h;const m=n+t;for(;p<l&&o[p*2]+o[p*2+1]<m;)p++;return{startIndex:h,endIndex:p}}let c=tg(0,l,h=>e[h].start,n),f=c;if(i===1)for(;f<l&&e[f].end<n+t;)f++;else if(i>1){const h=Array(i).fill(0);for(;f<l&&h.some(m=>m<n+t);){const m=e[f];h[m.lane]=m.end,f++}const p=Array(i).fill(n+t);for(;c>=0&&p.some(m=>m>=n);){const m=e[c];p[m.lane]=m.start,c--}c=Math.max(0,c-c%i),f=Math.min(l,f+(i-1-f%i))}return{startIndex:c,endIndex:f}}const Pu=typeof document<"u"?se.useLayoutEffect:se.useEffect;function Uk({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n="transform",...i}){const o=se.useReducer(p=>p+1,0)[1],l=se.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});l.current.enabled=t,l.current.mode=n;const a=p=>{const m=l.current;if(!m.enabled||!m.container)return;const w=p.getTotalSize();if(w!==m.lastSize){m.lastSize=w;const v=p.options.horizontal?"width":"height";m.container.style[v]=`${w}px`}},c=p=>{const m=l.current;if(!m.enabled||!m.container)return;a(p);const w=!!p.options.horizontal,v=m.mode==="transform",k=w?"left":"top",_=p.options.scrollMargin,A=p.getVirtualItems();for(const S of A){const b=S.start-_,T=p.elementsCache.get(S.key);T&&m.lastPositions.get(T)!==b&&(m.lastPositions.set(T,b),v?T.style.transform=w?`translate3d(${b}px, 0, 0)`:`translate3d(0, ${b}px, 0)`:T.style[k]=`${b}px`)}},f={...i,onChange:(p,m)=>{var w;const v=l.current;let k=!0;if(v.enabled){c(p);const _=p.range,A=v.prevRange;k=!A||A.isScrolling!==p.isScrolling||A.startIndex!==_?.startIndex||A.endIndex!==_?.endIndex,k&&(v.prevRange=_?{startIndex:_.startIndex,endIndex:_.endIndex,isScrolling:p.isScrolling}:null)}k&&(e&&m?bk.flushSync(o):o()),(w=i.onChange)==null||w.call(i,p,m)}},[h]=se.useState(()=>{const p=new zk(f);return Object.assign(p,{containerRef:m=>{const w=l.current;if(w.container=m,w.lastSize=null,m&&w.enabled){const v=p.getTotalSize();w.lastSize=v;const k=p.options.horizontal?"width":"height";m.style[k]=`${v}px`}}})});return h.setOptions(f),Pu(()=>h._didMount(),[]),Pu(()=>(a(h),h._willUpdate())),Pu(()=>{c(h)}),h}function Gk(e){return Uk({observeElementRect:Lk,observeElementOffset:Mk,scrollToFn:Fk,...e})}function Vk(e,t){const n=[],i=e.hunks;if(i.length===0)return n;const o=i[0];n.push({index:0,newFrom:1,newTo:o.newStart-1,oldFrom:1});for(let a=1;a<i.length;a++){const c=i[a-1],f=i[a];n.push({index:a,newFrom:c.newStart+c.newLines,newTo:f.newStart-1,oldFrom:c.oldStart+c.oldLines})}const l=i[i.length-1];return n.push({index:i.length,newFrom:l.newStart+l.newLines,newTo:t,oldFrom:l.oldStart+l.oldLines}),n}function yp(e,t,n){const i={top:[],bottom:[],hidden:e.newTo===null?null:Math.max(0,e.newTo-e.newFrom+1)};if(!n||!t)return i;const o=e.newTo??n.length,l=Math.max(0,o-e.newFrom+1);if(l===0)return{top:[],bottom:[],hidden:0};let a=t.all?l:Math.min(l,t.top),c=t.all?0:Math.min(l-a,t.bottom);a+c>=l&&(a=l,c=0);const f=e.oldFrom-e.newFrom,h=w=>({type:"context",newLineNo:w,oldLineNo:w+f,content:n[w-1]??""}),p=[];for(let w=e.newFrom;w<e.newFrom+a;w++)p.push(h(w));const m=[];for(let w=o-c+1;w<=o;w++)m.push(h(w));return{top:p,bottom:m,hidden:l-a-c}}function Wk(e){const t=[];let n=[],i=[];const o=()=>{const l=Math.max(n.length,i.length);for(let a=0;a<l;a++)t.push({left:n[a],right:i[a]});n=[],i=[]};for(const l of e)l.type==="del"?n.push(l):l.type==="add"?i.push(l):(o(),t.push({left:l,right:l}));return o(),t}function Hk({diff:e,viewMode:t,expansions:n,fullLines:i}){const o=[],a=e.status!=="deleted"&&e.status!=="added"&&!e.binary?Vk(e,i?i.length:null):[],c=(h,p,m)=>{if(t==="unified")for(const w of h)o.push({key:`l:${p}:${w.oldLineNo??"-"}:${w.newLineNo??"-"}`,kind:"line",line:w,hunkIndex:p,expanded:m});else for(const w of Wk(h))o.push({key:`p:${p}:${w.left?.oldLineNo??"-"}:${w.right?.newLineNo??"-"}`,kind:"pair",left:w.left,right:w.right,hunkIndex:p,expanded:m})};e.hunks.forEach((h,p)=>{const m=a[p];if(m){const{top:w,bottom:v,hidden:k}=yp(m,n[m.index],i);w.length&&c(w,p-1,!0),(k===null||k>0)&&o.push({key:`g:${m.index}`,kind:"gap",gap:m,hidden:k}),v.length&&c(v,p,!0)}o.push({key:`h:${p}`,kind:"hunk",hunkIndex:p,hunk:h}),c(h.lines,p,!1)});const f=a[e.hunks.length];if(f){const{top:h,hidden:p}=yp(f,n[f.index],i);h.length&&c(h,e.hunks.length-1,!0),(p===null||p>0)&&o.push({key:`g:${f.index}`,kind:"gap",gap:f,hidden:p})}return o}function qk(e,t,n){return e.findIndex(i=>i.kind==="line"?t==="new"?i.line.newLineNo===n:i.line.oldLineNo===n:i.kind==="pair"?t==="new"?i.right?.newLineNo===n:i.left?.oldLineNo===n:!1)}function Kk(e){const t=[];return e.forEach((n,i)=>{n.kind==="hunk"&&t.push(i)}),t}function Qk(e){let t=0;for(const n of e.hunks)t+=n.lines.length;return t}const Xk="modulepreload",Yk=function(e){return"/"+e},wp={},Ne=function(t,n,i){let o=Promise.resolve();if(n&&n.length>0){let h=function(p){return Promise.all(p.map(m=>Promise.resolve(m).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};var a=h;document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");o=h(n.map(p=>{if(p=Yk(p),p in wp)return;wp[p]=!0;const m=p.endsWith(".css"),w=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${w}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":Xk,m||(v.as="script"),v.crossOrigin="",v.href=p,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((k,_)=>{v.addEventListener("load",k),v.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${p}`)))})}))}function l(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return o.then(c=>{for(const f of c||[])f.status==="rejected"&&l(f.reason);return t().catch(l)})};let mt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Jk(e){return Uc(e)}function Uc(e){return Array.isArray(e)?Zk(e):e instanceof RegExp?e:typeof e=="object"?e0(e):e}function Zk(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=Uc(e[n]);return t}function e0(e){let t={};for(let n in e)t[n]=Uc(e[n]);return t}function ng(e,...t){return t.forEach(n=>{for(let i in n)e[i]=n[i]}),e}function rg(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?rg(e.substring(0,e.length-1)):e.substr(~t+1)}var Lu=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,qo=class{static hasCaptures(e){return e===null?!1:(Lu.lastIndex=0,Lu.test(e))}static replaceCaptures(e,t,n){return e.replace(Lu,(i,o,l,a)=>{let c=n[parseInt(o||l,10)];if(c){let f=t.substring(c.start,c.end);for(;f[0]===".";)f=f.substring(1);switch(a){case"downcase":return f.toLowerCase();case"upcase":return f.toUpperCase();default:return f}}else return i})}};function ig(e,t){return e<t?-1:e>t?1:0}function sg(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,i=t.length;if(n===i){for(let o=0;o<n;o++){let l=ig(e[o],t[o]);if(l!==0)return l}return 0}return n-i}function vp(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 og(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var lg=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}},cl=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(r0(e),t)}static createFromParsedTheme(e,t){return s0(e,t)}_cachedMatchRoot=new lg(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,i=this._cachedMatchRoot.get(t).find(o=>t0(e.parent,o.parentScopes));return i?new ag(i.fontStyle,i.foreground,i.background):null}},Ru=class sl{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const i of n)t=new sl(t,i);return t}static from(...t){let n=null;for(let i=0;i<t.length;i++)n=new sl(n,t[i]);return n}push(t){return new sl(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let i=this;for(;i&&i!==t;)n.push(i.scopeName),i=i.parent;return i===t?n.reverse():void 0}};function t0(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let i=t[n],o=!1;if(i===">"){if(n===t.length-1)return!1;i=t[++n],o=!0}for(;e&&!n0(e.scopeName,i);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function n0(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var ag=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function r0(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],i=0;for(let o=0,l=t.length;o<l;o++){let a=t[o];if(!a.settings)continue;let c;if(typeof a.scope=="string"){let m=a.scope;m=m.replace(/^[,]+/,""),m=m.replace(/[,]+$/,""),c=m.split(",")}else Array.isArray(a.scope)?c=a.scope:c=[""];let f=-1;if(typeof a.settings.fontStyle=="string"){f=0;let m=a.settings.fontStyle.split(" ");for(let w=0,v=m.length;w<v;w++)switch(m[w]){case"italic":f=f|1;break;case"bold":f=f|2;break;case"underline":f=f|4;break;case"strikethrough":f=f|8;break}}let h=null;typeof a.settings.foreground=="string"&&vp(a.settings.foreground)&&(h=a.settings.foreground);let p=null;typeof a.settings.background=="string"&&vp(a.settings.background)&&(p=a.settings.background);for(let m=0,w=c.length;m<w;m++){let k=c[m].trim().split(" "),_=k[k.length-1],A=null;k.length>1&&(A=k.slice(0,k.length-1),A.reverse()),n[i++]=new i0(_,A,o,f,h,p)}}return n}var i0=class{constructor(e,t,n,i,o,l){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=i,this.foreground=o,this.background=l}},bt=(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))(bt||{});function s0(e,t){e.sort((f,h)=>{let p=ig(f.scope,h.scope);return p!==0||(p=sg(f.parentScopes,h.parentScopes),p!==0)?p:f.index-h.index});let n=0,i="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let f=e.shift();f.fontStyle!==-1&&(n=f.fontStyle),f.foreground!==null&&(i=f.foreground),f.background!==null&&(o=f.background)}let l=new o0(t),a=new ag(n,l.getId(i),l.getId(o)),c=new a0(new hc(0,null,-1,0,0),[]);for(let f=0,h=e.length;f<h;f++){let p=e[f];c.insert(0,p.scope,p.parentScopes,p.fontStyle,l.getId(p.foreground),l.getId(p.background))}return new cl(l,a,c)}var o0=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,n=e.length;t<n;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)}},l0=Object.freeze([]),hc=class ug{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,i,o,l){this.scopeDepth=t,this.parentScopes=n||l0,this.fontStyle=i,this.foreground=o,this.background=l}clone(){return new ug(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let i=0,o=t.length;i<o;i++)n[i]=t[i].clone();return n}acceptOverwrite(t,n,i,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),i!==0&&(this.foreground=i),o!==0&&(this.background=o)}},a0=class pc{constructor(t,n=[],i={}){this._mainRule=t,this._children=i,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let i=0,o=0;for(;t.parentScopes[i]===">"&&i++,n.parentScopes[o]===">"&&o++,!(i>=t.parentScopes.length||o>=n.parentScopes.length);){const l=n.parentScopes[o].length-t.parentScopes[i].length;if(l!==0)return l;i++,o++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let i=t.indexOf("."),o,l;if(i===-1?(o=t,l=""):(o=t.substring(0,i),l=t.substring(i+1)),this._children.hasOwnProperty(o))return this._children[o].match(l)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(pc._cmpBySpecificity),n}insert(t,n,i,o,l,a){if(n===""){this._doInsertHere(t,i,o,l,a);return}let c=n.indexOf("."),f,h;c===-1?(f=n,h=""):(f=n.substring(0,c),h=n.substring(c+1));let p;this._children.hasOwnProperty(f)?p=this._children[f]:(p=new pc(this._mainRule.clone(),hc.cloneArr(this._rulesWithParentScopes)),this._children[f]=p),p.insert(t+1,h,i,o,l,a)}_doInsertHere(t,n,i,o,l){if(n===null){this._mainRule.acceptOverwrite(t,i,o,l);return}for(let a=0,c=this._rulesWithParentScopes.length;a<c;a++){let f=this._rulesWithParentScopes[a];if(sg(f.parentScopes,n)===0){f.acceptOverwrite(t,i,o,l);return}}i===-1&&(i=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),l===0&&(l=this._mainRule.background),this._rulesWithParentScopes.push(new hc(t,n,i,o,l))}},wi=class tn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=tn.getLanguageId(t),i=tn.getTokenType(t),o=tn.getFontStyle(t),l=tn.getForeground(t),a=tn.getBackground(t);console.log({languageId:n,tokenType:i,fontStyle:o,foreground:l,background:a})}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,n,i,o,l,a,c){let f=tn.getLanguageId(t),h=tn.getTokenType(t),p=tn.containsBalancedBrackets(t)?1:0,m=tn.getFontStyle(t),w=tn.getForeground(t),v=tn.getBackground(t);return n!==0&&(f=n),i!==8&&(h=i),o!==null&&(p=o?1:0),l!==-1&&(m=l),a!==0&&(w=a),c!==0&&(v=c),(f<<0|h<<8|p<<10|m<<11|w<<15|v<<24)>>>0}};function fl(e,t){const n=[],i=u0(e);let o=i.next();for(;o!==null;){let f=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":f=1;break;case"L":f=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=i.next()}let h=a();if(n.push({matcher:h,priority:f}),o!==",")break;o=i.next()}return n;function l(){if(o==="-"){o=i.next();const f=l();return h=>!!f&&!f(h)}if(o==="("){o=i.next();const f=c();return o===")"&&(o=i.next()),f}if(kp(o)){const f=[];do f.push(o),o=i.next();while(kp(o));return h=>t(f,h)}return null}function a(){const f=[];let h=l();for(;h;)f.push(h),h=l();return p=>f.every(m=>m(p))}function c(){const f=[];let h=a();for(;h&&(f.push(h),o==="|"||o===",");){do o=i.next();while(o==="|"||o===",");h=a()}return p=>f.some(m=>m(p))}}function kp(e){return!!e&&!!e.match(/[\w\.:]+/)}function u0(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const i=n[0];return n=t.exec(e),i}}}function cg(e){typeof e.dispose=="function"&&e.dispose()}var xs=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},c0=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},f0=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))}},d0=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new xs(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new f0;for(const n of e)h0(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof xs){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function h0(e,t,n,i){const o=n.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const l=n.lookup(t);e instanceof xs?ol({baseGrammar:l,selfGrammar:o},i):mc(e.ruleName,{baseGrammar:l,selfGrammar:o,repository:o.repository},i);const a=n.injections(e.scopeName);if(a)for(const c of a)i.add(new xs(c))}function mc(e,t,n){if(t.repository&&t.repository[e]){const i=t.repository[e];dl([i],t,n)}}function ol(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&dl(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&dl(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function dl(e,t,n){for(const i of e){if(n.visitedRule.has(i))continue;n.visitedRule.add(i);const o=i.repository?ng({},t.repository,i.repository):t.repository;Array.isArray(i.patterns)&&dl(i.patterns,{...t,repository:o},n);const l=i.include;if(!l)continue;const a=fg(l);switch(a.kind){case 0:ol({...t,selfGrammar:t.baseGrammar},n);break;case 1:ol(t,n);break;case 2:mc(a.ruleName,{...t,repository:o},n);break;case 3:case 4:const c=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(c){const f={baseGrammar:t.baseGrammar,selfGrammar:c,repository:o};a.kind===4?mc(a.ruleName,f,n):ol(f,n)}else a.kind===4?n.add(new c0(a.scopeName,a.ruleName)):n.add(new xs(a.scopeName));break}}}var p0=class{kind=0},m0=class{kind=1},g0=class{constructor(e){this.ruleName=e}kind=2},y0=class{constructor(e){this.scopeName=e}kind=3},w0=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function fg(e){if(e==="$base")return new p0;if(e==="$self")return new m0;const t=e.indexOf("#");if(t===-1)return new y0(e);if(t===0)return new g0(e.substring(1));{const n=e.substring(0,t),i=e.substring(t+1);return new w0(n,i)}}var v0=/\\(\d+)/,xp=/\\(\d+)/g,k0=-1,dg=-2;var Ns=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,i){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=qo.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=qo.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${rg(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:qo.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:qo.replaceCaptures(this._contentName,e,t)}},x0=class extends Ns{retokenizeCapturedWithRuleId;constructor(e,t,n,i,o){super(e,t,n,i),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,i){throw new Error("Not supported!")}},S0=class extends Ns{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,i,o){super(e,t,n,null),this._match=new Ss(i,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,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Cs,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Sp=class extends Ns{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,o){super(e,t,n,i),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 n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Cs,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gc=class extends Ns{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,o,l,a,c,f,h){super(e,t,n,i),this._begin=new Ss(o,this.id),this.beginCaptures=l,this._end=new Ss(a||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=f||!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,n,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Cs;for(const n of this.patterns)e.getRule(n).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}},hl=class extends Ns{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,i,o,l,a,c,f){super(e,t,n,i),this._begin=new Ss(o,this.id),this.beginCaptures=l,this.whileCaptures=c,this._while=new Ss(a,dg),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.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,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Cs;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,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Cs,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},hg=class Et{static createCaptureRule(t,n,i,o,l){return t.registerRule(a=>new x0(n,a,i,o,l))}static getCompiledRuleId(t,n,i){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new S0(t.$vscodeTextmateLocation,t.id,t.name,t.match,Et._compileCaptures(t.captures,n,i));if(typeof t.begin>"u"){t.repository&&(i=ng({},i,t.repository));let l=t.patterns;return typeof l>"u"&&t.include&&(l=[{include:t.include}]),new Sp(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Et._compilePatterns(l,n,i))}return t.while?new hl(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Et._compileCaptures(t.beginCaptures||t.captures,n,i),t.while,Et._compileCaptures(t.whileCaptures||t.captures,n,i),Et._compilePatterns(t.patterns,n,i)):new gc(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Et._compileCaptures(t.beginCaptures||t.captures,n,i),t.end,Et._compileCaptures(t.endCaptures||t.captures,n,i),t.applyEndPatternLast,Et._compilePatterns(t.patterns,n,i))}),t.id}static _compileCaptures(t,n,i){let o=[];if(t){let l=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const c=parseInt(a,10);c>l&&(l=c)}for(let a=0;a<=l;a++)o[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const c=parseInt(a,10);let f=0;t[a].patterns&&(f=Et.getCompiledRuleId(t[a],n,i)),o[c]=Et.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,f)}}return o}static _compilePatterns(t,n,i){let o=[];if(t)for(let l=0,a=t.length;l<a;l++){const c=t[l];let f=-1;if(c.include){const h=fg(c.include);switch(h.kind){case 0:case 1:f=Et.getCompiledRuleId(i[c.include],n,i);break;case 2:let p=i[h.ruleName];p&&(f=Et.getCompiledRuleId(p,n,i));break;case 3:case 4:const m=h.scopeName,w=h.kind===4?h.ruleName:null,v=n.getExternalGrammar(m,i);if(v)if(w){let k=v.repository[w];k&&(f=Et.getCompiledRuleId(k,n,v.repository))}else f=Et.getCompiledRuleId(v.repository.$self,n,v.repository);break}}else f=Et.getCompiledRuleId(c,n,i);if(f!==-1){const h=n.getRule(f);let p=!1;if((h instanceof Sp||h instanceof gc||h instanceof hl)&&h.hasMissingPatterns&&h.patterns.length===0&&(p=!0),p)continue;o.push(f)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Ss=class pg{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const i=t.length;let o=0,l=[],a=!1;for(let c=0;c<i;c++)if(t.charAt(c)==="\\"&&c+1<i){const h=t.charAt(c+1);h==="z"?(l.push(t.substring(o,c)),l.push("$(?!\\n)(?<!\\n)"),o=c+2):(h==="A"||h==="G")&&(a=!0),c++}this.hasAnchor=a,o===0?this.source=t:(l.push(t.substring(o,i)),this.source=l.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=v0.test(this.source):this.hasBackReferences=!1}clone(){return new pg(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let i=n.map(o=>t.substring(o.start,o.end));return xp.lastIndex=0,this.source.replace(xp,(o,l)=>og(i[parseInt(l,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],i=[],o=[],l,a,c,f;for(l=0,a=this.source.length;l<a;l++)c=this.source.charAt(l),t[l]=c,n[l]=c,i[l]=c,o[l]=c,c==="\\"&&l+1<a&&(f=this.source.charAt(l+1),f==="A"?(t[l+1]="￿",n[l+1]="￿",i[l+1]="A",o[l+1]="A"):f==="G"?(t[l+1]="￿",n[l+1]="G",i[l+1]="￿",o[l+1]="G"):(t[l+1]=f,n[l+1]=f,i[l+1]=f,o[l+1]=f),l++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:i.join(""),A1_G1:o.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Cs=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(n=>n.source);this._cached=new Cp(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let i=this._items.map(o=>o.resolveAnchors(t,n));return new Cp(e,i,this._items.map(o=>o.ruleId))}},Cp=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
11
- `)}findNextMatchSync(e,t,n){const i=this.scanner.findNextMatchSync(e,t,n);return i?{ruleId:this.rules[i.index],captureIndices:i.captureIndices}:null}},Ou=class{constructor(e,t){this.languageId=e,this.tokenType=t}},C0=class yc{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new Ou(t,8),this._embeddedLanguagesMatcher=new _0(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?yc._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Ou(0,0);_getBasicScopeAttributes=new lg(t=>{const n=this._scopeToLanguage(t),i=this._toStandardTokenType(t);return new Ou(n,i)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(yc.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[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/},_0=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(([n,i])=>og(n));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])}},_p=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function mg(e,t,n,i,o,l,a,c){const f=t.content.length;let h=!1,p=-1;if(a){const v=E0(e,t,n,i,o,l);o=v.stack,i=v.linePos,n=v.isFirstLine,p=v.anchorPosition}const m=Date.now();for(;!h;){if(c!==0&&Date.now()-m>c)return new _p(o,!0);w()}return new _p(o,!1);function w(){const v=b0(e,t,n,i,o,p);if(!v){l.produce(o,f),h=!0;return}const k=v.captureIndices,_=v.matchedRuleId,A=k&&k.length>0?k[0].end>i:!1;if(_===k0){const S=o.getRule(e);l.produce(o,k[0].start),o=o.withContentNameScopesList(o.nameScopesList),ms(e,t,n,o,l,S.endCaptures,k),l.produce(o,k[0].end);const b=o;if(o=o.parent,p=b.getAnchorPos(),!A&&b.getEnterPos()===i){o=b,l.produce(o,f),h=!0;return}}else{const S=e.getRule(_);l.produce(o,k[0].start);const b=o,T=S.getName(t.content,k),$=o.contentNameScopesList.pushAttributed(T,e);if(o=o.push(_,i,p,k[0].end===f,null,$,$),S instanceof gc){const j=S;ms(e,t,n,o,l,j.beginCaptures,k),l.produce(o,k[0].end),p=k[0].end;const P=j.getContentName(t.content,k),H=$.pushAttributed(P,e);if(o=o.withContentNameScopesList(H),j.endHasBackReferences&&(o=o.withEndRule(j.getEndWithResolvedBackReferences(t.content,k))),!A&&b.hasSameRuleAs(o)){o=o.pop(),l.produce(o,f),h=!0;return}}else if(S instanceof hl){const j=S;ms(e,t,n,o,l,j.beginCaptures,k),l.produce(o,k[0].end),p=k[0].end;const P=j.getContentName(t.content,k),H=$.pushAttributed(P,e);if(o=o.withContentNameScopesList(H),j.whileHasBackReferences&&(o=o.withEndRule(j.getWhileWithResolvedBackReferences(t.content,k))),!A&&b.hasSameRuleAs(o)){o=o.pop(),l.produce(o,f),h=!0;return}}else if(ms(e,t,n,o,l,S.captures,k),l.produce(o,k[0].end),o=o.pop(),!A){o=o.safePop(),l.produce(o,f),h=!0;return}}k[0].end>i&&(i=k[0].end,n=!1)}}function E0(e,t,n,i,o,l){let a=o.beginRuleCapturedEOL?0:-1;const c=[];for(let f=o;f;f=f.pop()){const h=f.getRule(e);h instanceof hl&&c.push({rule:h,stack:f})}for(let f=c.pop();f;f=c.pop()){const{ruleScanner:h,findOptions:p}=A0(f.rule,e,f.stack.endRule,n,i===a),m=h.findNextMatchSync(t,i,p);if(m){if(m.ruleId!==dg){o=f.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(l.produce(f.stack,m.captureIndices[0].start),ms(e,t,n,f.stack,l,f.rule.whileCaptures,m.captureIndices),l.produce(f.stack,m.captureIndices[0].end),a=m.captureIndices[0].end,m.captureIndices[0].end>i&&(i=m.captureIndices[0].end,n=!1))}else{o=f.stack.pop();break}}return{stack:o,linePos:i,anchorPosition:a,isFirstLine:n}}function b0(e,t,n,i,o,l){const a=I0(e,t,n,i,o,l),c=e.getInjections();if(c.length===0)return a;const f=N0(c,e,t,n,i,o,l);if(!f)return a;if(!a)return f;const h=a.captureIndices[0].start,p=f.captureIndices[0].start;return p<h||f.priorityMatch&&p===h?f:a}function I0(e,t,n,i,o,l){const a=o.getRule(e),{ruleScanner:c,findOptions:f}=gg(a,e,o.endRule,n,i===l),h=c.findNextMatchSync(t,i,f);return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}function N0(e,t,n,i,o,l,a){let c=Number.MAX_VALUE,f=null,h,p=0;const m=l.contentNameScopesList.getScopeNames();for(let w=0,v=e.length;w<v;w++){const k=e[w];if(!k.matcher(m))continue;const _=t.getRule(k.ruleId),{ruleScanner:A,findOptions:S}=gg(_,t,null,i,o===a),b=A.findNextMatchSync(n,o,S);if(!b)continue;const T=b.captureIndices[0].start;if(!(T>=c)&&(c=T,f=b.captureIndices,h=b.ruleId,p=k.priority,c===o))break}return f?{priorityMatch:p===-1,captureIndices:f,matchedRuleId:h}:null}function gg(e,t,n,i,o){return{ruleScanner:e.compileAG(t,n,i,o),findOptions:0}}function A0(e,t,n,i,o){return{ruleScanner:e.compileWhileAG(t,n,i,o),findOptions:0}}function ms(e,t,n,i,o,l,a){if(l.length===0)return;const c=t.content,f=Math.min(l.length,a.length),h=[],p=a[0].end;for(let m=0;m<f;m++){const w=l[m];if(w===null)continue;const v=a[m];if(v.length===0)continue;if(v.start>p)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(i,v.start),w.retokenizeCapturedWithRuleId){const _=w.getName(c,a),A=i.contentNameScopesList.pushAttributed(_,e),S=w.getContentName(c,a),b=A.pushAttributed(S,e),T=i.push(w.retokenizeCapturedWithRuleId,v.start,-1,!1,null,A,b),$=e.createOnigString(c.substring(0,v.end));mg(e,$,n&&v.start===0,v.start,T,o,!1,0),cg($);continue}const k=w.getName(c,a);if(k!==null){const A=(h.length>0?h[h.length-1].scopes:i.contentNameScopesList).pushAttributed(k,e);h.push(new T0(A,v.end))}}for(;h.length>0;)o.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var T0=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function P0(e,t,n,i,o,l,a,c){return new R0(e,t,n,i,o,l,a,c)}function Ep(e,t,n,i,o){const l=fl(t,pl),a=hg.getCompiledRuleId(n,i,o.repository);for(const c of l)e.push({debugSelector:t,matcher:c.matcher,ruleId:a,grammar:o,priority:c.priority})}function pl(e,t){if(t.length<e.length)return!1;let n=0;return e.every(i=>{for(let o=n;o<t.length;o++)if(L0(t[o],i))return n=o+1,!0;return!1})}function L0(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var R0=class{constructor(e,t,n,i,o,l,a,c){if(this._rootScopeName=e,this.balancedBracketSelectors=l,this._onigLib=c,this._basicScopeAttributesProvider=new C0(n,i),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=bp(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const f of Object.keys(o)){const h=fl(f,pl);for(const p of h)this._tokenTypeMatchers.push({matcher:p.matcher,type:o[f]})}}_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=[],n=this._rootScopeName,i=e.lookup(n);if(i){const o=i.injections;if(o)for(let a in o)Ep(t,a,o[a],this,i);const l=this._grammarRepository.injections(n);l&&l.forEach(a=>{const c=this.getExternalGrammar(a);if(c){const f=c.injectionSelector;f&&Ep(t,f,c,this,c)}})}return t.sort((o,l)=>o.priority-l.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=bp(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const i=this._tokenize(e,t,!1,n);return{tokens:i.lineTokens.getResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}tokenizeLine2(e,t,n=0){const i=this._tokenize(e,t,!0,n);return{tokens:i.lineTokens.getBinaryResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}_tokenize(e,t,n,i){this._rootId===-1&&(this._rootId=hg.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===wc.NULL){o=!0;const h=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),m=wi.set(0,h.languageId,h.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),w=this.getRule(this._rootId).getName(null,null);let v;w?v=gs.createRootAndLookUpScopeName(w,m,this):v=gs.createRoot("unknown",m),t=new wc(null,this._rootId,-1,-1,!1,null,v,v)}else o=!1,t.reset();e=e+`
12
- `;const l=this.createOnigString(e),a=l.content.length,c=new M0(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),f=mg(this,l,o,0,t,c,!0,i);return cg(l),{lineLength:a,lineTokens:c,ruleStack:f.stack,stoppedEarly:f.stoppedEarly}}};function bp(e,t){return e=Jk(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 gs=class Cn{constructor(t,n,i){this.parent=t,this.scopePath=n,this.tokenAttributes=i}static fromExtension(t,n){let i=t,o=t?.scopePath??null;for(const l of n)o=Ru.push(o,l.scopeNames),i=new Cn(i,o,l.encodedTokenAttributes);return i}static createRoot(t,n){return new Cn(null,new Ru(null,t),n)}static createRootAndLookUpScopeName(t,n,i){const o=i.getMetadataForScope(t),l=new Ru(null,t),a=i.themeProvider.themeMatch(l),c=Cn.mergeAttributes(n,o,a);return new Cn(null,l,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Cn.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,i){let o=-1,l=0,a=0;return i!==null&&(o=i.fontStyle,l=i.foregroundId,a=i.backgroundId),wi.set(t,n.languageId,n.tokenType,null,o,l,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Cn._pushAttributed(this,t,n);const i=t.split(/ /g);let o=this;for(const l of i)o=Cn._pushAttributed(o,l,n);return o}static _pushAttributed(t,n,i){const o=i.getMetadataForScope(n),l=t.scopePath.push(n),a=i.themeProvider.themeMatch(l),c=Cn.mergeAttributes(t.tokenAttributes,o,a);return new Cn(t,l,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let i=this;for(;i&&i!==t;)n.push({encodedTokenAttributes:i.tokenAttributes,scopeNames:i.scopePath.getExtensionIfDefined(i.parent?.scopePath??null)}),i=i.parent;return i===t?n.reverse():void 0}},wc=class Nr{constructor(t,n,i,o,l,a,c,f){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=l,this.endRule=a,this.nameScopesList=c,this.contentNameScopesList=f,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=i,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new Nr(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Nr._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?gs.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Nr._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,i,o,l,a,c){return new Nr(this,t,n,i,o,l,a,c)}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,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Nr(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.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,n){const i=gs.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new Nr(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,i,gs.fromExtension(i,n.contentNameScopesList))}},O0=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):fl(n,pl).map(i=>i.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>fl(n,pl).map(i=>i.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}},M0=class{constructor(e,t,n,i){this.balancedBracketSelectors=i,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,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 i=e?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const l=e?.getScopeNames()??[];for(const a of this._tokenTypeOverrides)a.matcher(l)&&(i=wi.set(i,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(l))}if(o&&(i=wi.set(i,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),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 n=new Uint32Array(this._binaryTokens.length);for(let i=0,o=this._binaryTokens.length;i<o;i++)n[i]=this._binaryTokens[i];return n}},j0=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,n,i,o){if(!this._grammars.has(e)){let l=this._rawGrammars.get(e);if(!l)return null;this._grammars.set(e,P0(e,l,t,n,i,o,this,this._onigLib))}return this._grammars.get(e)}},D0=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new j0(cl.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(cl.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,i){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:i})}loadGrammarWithConfiguration(t,n,i){return this._loadGrammar(t,n,i.embeddedLanguages,i.tokenTypes,new O0(i.balancedBracketSelectors||[],i.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,i,o,l){const a=new d0(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(c=>this._loadSingleGrammar(c.scopeName)),a.processQueue();return this._grammarForScopeName(t,n,i,o,l)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const i=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,i)}}addGrammar(t,n=[],i=0,o=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,i,o)}_grammarForScopeName(t,n=0,i=null,o=null,l=null){return this._syncRegistry.grammarForScopeName(t,n,i,o,l)}},vc=wc.NULL;const F0=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class As{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}As.prototype.normal={};As.prototype.property={};As.prototype.space=void 0;function yg(e,t){const n={},i={};for(const o of e)Object.assign(n,o.property),Object.assign(i,o.normal);return new As(n,i,t)}function kc(e){return e.toLowerCase()}class $t{constructor(t,n){this.attribute=n,this.property=t}}$t.prototype.attribute="";$t.prototype.booleanish=!1;$t.prototype.boolean=!1;$t.prototype.commaOrSpaceSeparated=!1;$t.prototype.commaSeparated=!1;$t.prototype.defined=!1;$t.prototype.mustUseProperty=!1;$t.prototype.number=!1;$t.prototype.overloadedBoolean=!1;$t.prototype.property="";$t.prototype.spaceSeparated=!1;$t.prototype.space=void 0;let z0=0;const Ee=Dr(),lt=Dr(),xc=Dr(),Y=Dr(),Ue=Dr(),Or=Dr(),Ht=Dr();function Dr(){return 2**++z0}const Sc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:lt,commaOrSpaceSeparated:Ht,commaSeparated:Or,number:Y,overloadedBoolean:xc,spaceSeparated:Ue},Symbol.toStringTag,{value:"Module"})),Mu=Object.keys(Sc);class Gc extends $t{constructor(t,n,i,o){let l=-1;if(super(t,n),Ip(this,"space",o),typeof i=="number")for(;++l<Mu.length;){const a=Mu[l];Ip(this,Mu[l],(i&Sc[a])===Sc[a])}}}Gc.prototype.defined=!0;function Ip(e,t,n){n&&(e[t]=n)}function ki(e){const t={},n={};for(const[i,o]of Object.entries(e.properties)){const l=new Gc(i,e.transform(e.attributes||{},i),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(l.mustUseProperty=!0),t[i]=l,n[kc(i)]=i,n[kc(l.attribute)]=i}return new As(t,n,e.space)}const wg=ki({properties:{ariaActiveDescendant:null,ariaAtomic:lt,ariaAutoComplete:null,ariaBusy:lt,ariaChecked:lt,ariaColCount:Y,ariaColIndex:Y,ariaColSpan:Y,ariaControls:Ue,ariaCurrent:null,ariaDescribedBy:Ue,ariaDetails:null,ariaDisabled:lt,ariaDropEffect:Ue,ariaErrorMessage:null,ariaExpanded:lt,ariaFlowTo:Ue,ariaGrabbed:lt,ariaHasPopup:null,ariaHidden:lt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ue,ariaLevel:Y,ariaLive:null,ariaModal:lt,ariaMultiLine:lt,ariaMultiSelectable:lt,ariaOrientation:null,ariaOwns:Ue,ariaPlaceholder:null,ariaPosInSet:Y,ariaPressed:lt,ariaReadOnly:lt,ariaRelevant:null,ariaRequired:lt,ariaRoleDescription:Ue,ariaRowCount:Y,ariaRowIndex:Y,ariaRowSpan:Y,ariaSelected:lt,ariaSetSize:Y,ariaSort:null,ariaValueMax:Y,ariaValueMin:Y,ariaValueNow:Y,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function vg(e,t){return t in e?e[t]:t}function kg(e,t){return vg(e,t.toLowerCase())}const $0=ki({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Or,acceptCharset:Ue,accessKey:Ue,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alpha:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:Ue,autoFocus:Ee,autoPlay:Ee,blocking:Ue,capture:null,charSet:null,checked:Ee,cite:null,className:Ue,closedBy:null,colorSpace:null,cols:Y,colSpan:Y,command:null,commandFor:null,content:null,contentEditable:lt,controls:Ee,controlsList:Ue,coords:Y|Or,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:xc,draggable:lt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:Ue,height:Y,hidden:xc,high:Y,href:null,hrefLang:null,htmlFor:Ue,httpEquiv:Ue,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:Ue,itemRef:Ue,itemScope:Ee,itemType:Ue,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:Y,manifest:null,max:null,maxLength:Y,media:null,method:null,min:null,minLength:Y,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,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:Ee,optimum:Y,pattern:null,ping:Ue,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:Ue,required:Ee,reversed:Ee,rows:Y,rowSpan:Y,sandbox:Ue,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootClonable:Ee,shadowRootCustomElementRegistry:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shadowRootSerializable:Ee,shape:null,size:Y,sizes:null,slot:null,span:Y,spellCheck:lt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Y,step:null,style:null,tabIndex:Y,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:lt,width:Y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ue,axis:null,background:null,bgColor:null,border:Y,borderColor:null,bottomMargin:Y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:Y,leftMargin:Y,link:null,longDesc:null,lowSrc:null,marginHeight:Y,marginWidth:Y,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:Y,rules:null,scheme:null,scrolling:lt,standby:null,summary:null,text:null,topMargin:Y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Y,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ee,disablePictureInPicture:Ee,disableRemotePlayback:Ee,exportParts:Or,part:Ue,prefix:null,property:null,results:Y,security:null,unselectable:null},space:"html",transform:kg}),B0=ki({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ht,accentHeight:Y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Y,amplitude:Y,arabicForm:null,ascent:Y,attributeName:null,attributeType:null,azimuth:Y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Y,by:null,calcMode:null,capHeight:Y,className:Ue,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:Y,diffuseConstant:Y,direction:null,display:null,dur:null,divisor:Y,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:Y,enableBackground:null,end:null,event:null,exponent:Y,externalResourcesRequired:null,fill:null,fillOpacity:Y,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:Or,g2:Or,glyphName:Or,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Y,horizOriginX:Y,horizOriginY:Y,id:null,ideographic:Y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Y,k:Y,k1:Y,k2:Y,k3:Y,k4:Y,kernelMatrix:Ht,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Y,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Y,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:Y,overlineThickness:Y,paintOrder:null,panose1:null,path:null,pathLength:Y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ue,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Y,pointsAtY:Y,pointsAtZ:Y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ht,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ht,rev:Ht,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ht,requiredFeatures:Ht,requiredFonts:Ht,requiredFormats:Ht,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:Y,specularExponent:Y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Y,strikethroughThickness:Y,string:null,stroke:null,strokeDashArray:Ht,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Y,strokeOpacity:Y,strokeWidth:null,style:null,surfaceScale:Y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ht,tabIndex:Y,tableValues:null,target:null,targetX:Y,targetY:Y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ht,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Y,underlineThickness:Y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Y,values:null,vAlphabetic:Y,vMathematical:Y,vectorEffect:null,vHanging:Y,vIdeographic:Y,version:null,vertAdvY:Y,vertOriginX:Y,vertOriginY:Y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:vg}),xg=ki({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()}}),Sg=ki({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:kg}),Cg=ki({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),U0={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"},G0=/[A-Z]/g,Np=/-[a-z]/g,V0=/^data[-\w.:]+$/i;function _g(e,t){const n=kc(t);let i=t,o=$t;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&V0.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Np,H0);i="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Np.test(l)){let a=l.replace(G0,W0);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Gc}return new o(i,t)}function W0(e){return"-"+e.toLowerCase()}function H0(e){return e.charAt(1).toUpperCase()}const Eg=yg([wg,$0,xg,Sg,Cg],"html"),Ts=yg([wg,B0,xg,Sg,Cg],"svg"),Ap={}.hasOwnProperty;function q0(e,t){const n=t||{};function i(o,...l){let a=i.invalid;const c=i.handlers;if(o&&Ap.call(o,e)){const f=String(o[e]);a=Ap.call(c,f)?c[f]:i.unknown}if(a)return a.call(this,o,...l)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}const K0=/["&'<>`]/g,Q0=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,X0=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Y0=/[|\\{}()[\]^$+*?.]/g,Tp=new WeakMap;function J0(e,t){if(e=e.replace(t.subset?Z0(t.subset):K0,i),t.subset||t.escapeOnly)return e;return e.replace(Q0,n).replace(X0,i);function n(o,l,a){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,a.charCodeAt(l+2),t)}function i(o,l,a){return t.format(o.charCodeAt(0),a.charCodeAt(l+1),t)}}function Z0(e){let t=Tp.get(e);return t||(t=ex(e),Tp.set(e,t)),t}function ex(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Y0,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const tx=/[\dA-Fa-f]/;function nx(e,t,n){const i="&#x"+e.toString(16).toUpperCase();return n&&t&&!tx.test(String.fromCharCode(t))?i:i+";"}const rx=/\d/;function ix(e,t,n){const i="&#"+String(e);return n&&t&&!rx.test(String.fromCharCode(t))?i:i+";"}const sx=["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"],ju={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:"€"},ox=["cent","copy","divide","gt","lt","not","para","times"],bg={}.hasOwnProperty,Cc={};let Ko;for(Ko in ju)bg.call(ju,Ko)&&(Cc[ju[Ko]]=Ko);const lx=/[^\dA-Za-z]/;function ax(e,t,n,i){const o=String.fromCharCode(e);if(bg.call(Cc,o)){const l=Cc[o],a="&"+l;return n&&sx.includes(l)&&!ox.includes(l)&&(!i||t&&t!==61&&lx.test(String.fromCharCode(t)))?a:a+";"}return""}function ux(e,t,n){let i=nx(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=ax(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){const l=ix(e,t,n.omitOptionalSemicolons);l.length<i.length&&(i=l)}return o&&(!n.useShortestReferences||o.length<i.length)?o:i}function yi(e,t){return J0(e,Object.assign({format:ux},t))}const cx=/^>|^->|<!--|-->|--!>|<!-$/g,fx=[">"],dx=["<",">"];function hx(e,t,n,i){return i.settings.bogusComments?"<?"+yi(e.value,Object.assign({},i.settings.characterReferences,{subset:fx}))+">":"<!--"+e.value.replace(cx,o)+"-->";function o(l){return yi(l,Object.assign({},i.settings.characterReferences,{subset:dx}))}}function px(e,t,n,i){return"<!"+(i.settings.upperDoctype?"DOCTYPE":"doctype")+(i.settings.tightDoctype?"":" ")+"html>"}function ml(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,o=n.indexOf(t);for(;o!==-1;)i++,o=n.indexOf(t,o+t.length);return i}function Ig(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Ng(e){return e.join(" ").trim()}const mx=/[ \t\n\f\r]/g;function bl(e){return typeof e=="object"?e.type==="text"?Pp(e.value):!1:Pp(e)}function Pp(e){return e.replace(mx,"")===""}const ft=Tg(1),Ag=Tg(-1),gx=[];function Tg(e){return t;function t(n,i,o){const l=n?n.children:gx;let a=(i||0)+e,c=l[a];if(!o)for(;c&&bl(c);)a+=e,c=l[a];return c}}const yx={}.hasOwnProperty;function Pg(e){return t;function t(n,i,o){return yx.call(e,n.tagName)&&e[n.tagName](n,i,o)}}const Vc=Pg({body:vx,caption:Du,colgroup:Du,dd:Cx,dt:Sx,head:Du,html:wx,li:xx,optgroup:_x,option:Ex,p:kx,rp:Lp,rt:Lp,tbody:Ix,td:Rp,tfoot:Nx,th:Rp,thead:bx,tr:Ax});function Du(e,t,n){const i=ft(n,t,!0);return!i||i.type!=="comment"&&!(i.type==="text"&&bl(i.value.charAt(0)))}function wx(e,t,n){const i=ft(n,t);return!i||i.type!=="comment"}function vx(e,t,n){const i=ft(n,t);return!i||i.type!=="comment"}function kx(e,t,n){const i=ft(n,t);return i?i.type==="element"&&(i.tagName==="address"||i.tagName==="article"||i.tagName==="aside"||i.tagName==="blockquote"||i.tagName==="details"||i.tagName==="div"||i.tagName==="dl"||i.tagName==="fieldset"||i.tagName==="figcaption"||i.tagName==="figure"||i.tagName==="footer"||i.tagName==="form"||i.tagName==="h1"||i.tagName==="h2"||i.tagName==="h3"||i.tagName==="h4"||i.tagName==="h5"||i.tagName==="h6"||i.tagName==="header"||i.tagName==="hgroup"||i.tagName==="hr"||i.tagName==="main"||i.tagName==="menu"||i.tagName==="nav"||i.tagName==="ol"||i.tagName==="p"||i.tagName==="pre"||i.tagName==="section"||i.tagName==="table"||i.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function xx(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&i.tagName==="li"}function Sx(e,t,n){const i=ft(n,t);return!!(i&&i.type==="element"&&(i.tagName==="dt"||i.tagName==="dd"))}function Cx(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&(i.tagName==="dt"||i.tagName==="dd")}function Lp(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&(i.tagName==="rp"||i.tagName==="rt")}function _x(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&i.tagName==="optgroup"}function Ex(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&(i.tagName==="option"||i.tagName==="optgroup")}function bx(e,t,n){const i=ft(n,t);return!!(i&&i.type==="element"&&(i.tagName==="tbody"||i.tagName==="tfoot"))}function Ix(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&(i.tagName==="tbody"||i.tagName==="tfoot")}function Nx(e,t,n){return!ft(n,t)}function Ax(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&i.tagName==="tr"}function Rp(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&(i.tagName==="td"||i.tagName==="th")}const Tx=Pg({body:Rx,colgroup:Ox,head:Lx,html:Px,tbody:Mx});function Px(e){const t=ft(e,-1);return!t||t.type!=="comment"}function Lx(e){const t=new Set;for(const i of e.children)if(i.type==="element"&&(i.tagName==="base"||i.tagName==="title")){if(t.has(i.tagName))return!1;t.add(i.tagName)}const n=e.children[0];return!n||n.type==="element"}function Rx(e){const t=ft(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&bl(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function Ox(e,t,n){const i=Ag(n,t),o=ft(e,-1,!0);return n&&i&&i.type==="element"&&i.tagName==="colgroup"&&Vc(i,n.children.indexOf(i),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function Mx(e,t,n){const i=Ag(n,t),o=ft(e,-1);return n&&i&&i.type==="element"&&(i.tagName==="thead"||i.tagName==="tbody")&&Vc(i,n.children.indexOf(i),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const Qo={name:[[`
13
- \f\r &/=>`.split(""),`
14
- \f\r "&'/=>\``.split("")],[`\0
15
- \f\r "&'/<=>`.split(""),`\0
16
- \f\r "&'/<=>\``.split("")]],unquoted:[[`
17
- \f\r &>`.split(""),`\0
18
- \f\r "&'<=>\``.split("")],[`\0
19
- \f\r "&'<=>\``.split(""),`\0
20
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function jx(e,t,n,i){const o=i.schema,l=o.space==="svg"?!1:i.settings.omitOptionalTags;let a=o.space==="svg"?i.settings.closeEmptyElements:i.settings.voids.includes(e.tagName.toLowerCase());const c=[];let f;o.space==="html"&&e.tagName==="svg"&&(i.schema=Ts);const h=Dx(i,e.properties),p=i.all(o.space==="html"&&e.tagName==="template"?e.content:e);return i.schema=o,p&&(a=!1),(h||!l||!Tx(e,t,n))&&(c.push("<",e.tagName,h?" "+h:""),a&&(o.space==="svg"||i.settings.closeSelfClosing)&&(f=h.charAt(h.length-1),(!i.settings.tightSelfClosing||f==="/"||f&&f!=='"'&&f!=="'")&&c.push(" "),c.push("/")),c.push(">")),c.push(p),!a&&(!l||!Vc(e,t,n))&&c.push("</"+e.tagName+">"),c.join("")}function Dx(e,t){const n=[];let i=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const l=Fx(e,o,t[o]);l&&n.push(l)}}for(;++i<n.length;){const l=e.settings.tightAttributes?n[i].charAt(n[i].length-1):void 0;i!==n.length-1&&l!=='"'&&l!=="'"&&(n[i]+=" ")}return n.join("")}function Fx(e,t,n){const i=_g(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,l=e.settings.allowDangerousCharacters?0:1;let a=e.quote,c;if(i.overloadedBoolean&&(n===i.attribute||n==="")?n=!0:(i.boolean||i.overloadedBoolean)&&(typeof n!="string"||n===i.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const f=yi(i.attribute,Object.assign({},e.settings.characterReferences,{subset:Qo.name[o][l]}));return n===!0||(n=Array.isArray(n)?(i.commaSeparated?Ig:Ng)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?f:(e.settings.preferUnquoted&&(c=yi(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Qo.unquoted[o][l]}))),c!==n&&(e.settings.quoteSmart&&ml(n,a)>ml(n,e.alternative)&&(a=e.alternative),c=a+yi(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?Qo.single:Qo.double)[o][l],attribute:!0}))+a),f+(c&&"="+c))}const zx=["<","&"];function Lg(e,t,n,i){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:yi(e.value,Object.assign({},i.settings.characterReferences,{subset:zx}))}function $x(e,t,n,i){return i.settings.allowDangerousHtml?e.value:Lg(e,t,n,i)}function Bx(e,t,n,i){return i.all(e)}const Ux=q0("type",{invalid:Gx,unknown:Vx,handlers:{comment:hx,doctype:px,element:jx,raw:$x,root:Bx,text:Lg}});function Gx(e){throw new Error("Expected node, not `"+e+"`")}function Vx(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const Wx={},Hx={},qx=[];function Kx(e,t){const n=t||Wx,i=n.quote||'"',o=i==='"'?"'":'"';if(i!=='"'&&i!=="'")throw new Error("Invalid quote `"+i+"`, expected `'` or `\"`");return{one:Qx,all:Xx,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||F0,characterReferences:n.characterReferences||Hx,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Ts:Eg,quote:i,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Qx(e,t,n){return Ux(e,t,n,this)}function Xx(e){const t=[],n=e&&e.children||qx;let i=-1;for(;++i<n.length;)t[i]=this.one(n[i],i,e);return t.join("")}function gl(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},i=typeof e=="string"?e:e.name;for(const[o,l]of Object.entries(t?.colorReplacements||{}))typeof l=="string"?n[o]=l:o===i&&Object.assign(n,l);return n}function ur(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Yx(e){return Array.isArray(e)?e:[e]}async function Rg(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Wc(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Jx(e){return e==="ansi"||Wc(e)}function Hc(e){return e==="none"}function Zx(e){return Hc(e)}function Og(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 n=Array.isArray(t)?t:t.split(/\s+/g);for(const i of n)i&&!e.properties.class.includes(i)&&e.properties.class.push(i);return e}function Il(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let i=0;const o=[];for(let l=0;l<n.length;l+=2){const a=t?n[l]+(n[l+1]||""):n[l];o.push([a,i]),i+=n[l].length,i+=n[l+1]?.length||0}return o}function e1(e){const t=Il(e,!0).map(([o])=>o);function n(o){if(o===e.length)return{line:t.length-1,character:t[t.length-1].length};let l=o,a=0;for(const c of t){if(l<c.length)break;l-=c.length,a++}return{line:a,character:l}}function i(o,l){let a=0;for(let c=0;c<o;c++)a+=t[c].length;return a+=l,a}return{lines:t,indexToPos:n,posToIndex:i}}const qc="light-dark()",t1=["color","background-color"];function n1(e,t){let n=0;const i=[];for(const o of t)o>n&&i.push({...e,content:e.content.slice(n,o),offset:e.offset+n}),n=o;return n<e.content.length&&i.push({...e,content:e.content.slice(n),offset:e.offset+n}),i}function r1(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((i,o)=>i-o);return n.length?e.map(i=>i.flatMap(o=>{const l=n.filter(a=>o.offset<a&&a<o.offset+o.content.length).map(a=>a-o.offset).sort((a,c)=>a-c);return l.length?n1(o,l):o})):e}function i1(e,t,n,i,o="css-vars"){const l={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(p=>yl(e.variants[p])),c=new Set(a.flatMap(p=>Object.keys(p))),f={},h=(p,m)=>{const w=m==="color"?"":m==="background-color"?"-bg":`-${m}`;return n+t[p]+(m==="color"?"":w)};return a.forEach((p,m)=>{for(const w of c){const v=p[w]||"inherit";if(m===0&&i&&t1.includes(w))if(i===qc&&a.length>1){const k=t.findIndex(b=>b==="light"),_=t.findIndex(b=>b==="dark");if(k===-1||_===-1)throw new mt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const A=a[k][w]||"inherit",S=a[_][w]||"inherit";f[w]=`light-dark(${A}, ${S})`,o==="css-vars"&&(f[h(m,w)]=v)}else f[w]=v;else o==="css-vars"&&(f[h(m,w)]=v)}}),l.htmlStyle=f,l}function yl(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&bt.Italic&&(t["font-style"]="italic"),e.fontStyle&bt.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&bt.Underline&&n.push("underline"),e.fontStyle&bt.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function _c(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const Mg=new WeakMap;function Nl(e,t){Mg.set(e,t)}function _s(e){return Mg.get(e)}class xi{_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,n){return new xi(Object.fromEntries(Yx(n).map(i=>[i,vc])),t)}constructor(...t){if(t.length===2){const[n,i]=t;this.lang=i,this._stacks=n}else{const[n,i,o]=t;this.lang=i,this._stacks={[o]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return s1(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function s1(e){const t=[],n=new Set;function i(o){if(n.has(o))return;n.add(o);const l=o?.nameScopesList?.scopeName;l&&t.push(l),o.parent&&i(o.parent)}return i(e),t}function o1(e,t){if(!(e instanceof xi))throw new mt("Invalid grammar state");return e.getInternalStack(t)}function l1(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let i=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new mt(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...o.indexToPos(a),offset:a}}else{const c=o.lines[a.line];if(c===void 0)throw new mt(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${o.lines.length}`);let f=a.character;if(f<0&&(f=c.length+f),f<0||f>c.length)throw new mt(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${c.length}`);return{...a,character:f,offset:o.posToIndex(a.line,f)}}};const o=e1(n.source),l=(n.options.decorations||[]).map(a=>({...a,start:i(a.start),end:i(a.end)}));a1(l),e.set(n.meta,{decorations:l,converter:o,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const o=t(this).decorations.flatMap(a=>[a.start.offset,a.end.offset]);return r1(n,o)},code(n){if(!this.options.decorations?.length)return;const i=t(this),o=Array.from(n.children).filter(p=>p.type==="element"&&p.tagName==="span");if(o.length!==i.converter.lines.length)throw new mt(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${i.converter.lines.length}). Failed to apply decorations.`);function l(p,m,w,v){const k=o[p];let _="",A=-1,S=-1;if(m===0&&(A=0),w===0&&(S=0),w===Number.POSITIVE_INFINITY&&(S=k.children.length),A===-1||S===-1)for(let T=0;T<k.children.length;T++)_+=jg(k.children[T]),A===-1&&_.length===m&&(A=T+1),S===-1&&_.length===w&&(S=T+1);if(A===-1)throw new mt(`Failed to find start index for decoration ${JSON.stringify(v.start)}`);if(S===-1)throw new mt(`Failed to find end index for decoration ${JSON.stringify(v.end)}`);const b=k.children.slice(A,S);if(!v.alwaysWrap&&b.length===k.children.length)c(k,v,"line");else if(!v.alwaysWrap&&b.length===1&&b[0].type==="element")c(b[0],v,"token");else{const T={type:"element",tagName:"span",properties:{},children:b};c(T,v,"wrapper"),k.children.splice(A,b.length,T)}}function a(p,m){o[p]=c(o[p],m,"line")}function c(p,m,w){const v=m.properties||{},k=m.transform||(_=>_);return p.tagName=m.tagName||"span",p.properties={...p.properties,...v,class:p.properties.class},m.properties?.class&&Og(p,m.properties.class),p=k(p,w)||p,p}const f=[],h=i.decorations.sort((p,m)=>m.start.offset-p.start.offset||p.end.offset-m.end.offset);for(const p of h){const{start:m,end:w}=p;if(m.line===w.line)l(m.line,m.character,w.character,p);else if(m.line<w.line){l(m.line,m.character,Number.POSITIVE_INFINITY,p);for(let v=m.line+1;v<w.line;v++)f.unshift(()=>a(v,p));l(w.line,0,w.character,p)}}f.forEach(p=>p())}}}function a1(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new mt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let i=t+1;i<e.length;i++){const o=e[i],l=n.start.offset<=o.start.offset&&o.start.offset<n.end.offset,a=n.start.offset<o.end.offset&&o.end.offset<=n.end.offset,c=o.start.offset<=n.start.offset&&n.start.offset<o.end.offset,f=o.start.offset<n.end.offset&&n.end.offset<=o.end.offset;if(l||a||c||f){if(l&&a||c&&f||c&&n.start.offset===n.end.offset||a&&o.start.offset===o.end.offset)continue;throw new mt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function jg(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(jg).join(""):""}const u1=[l1()];function wl(e){const t=c1(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...u1]}function c1(e){const t=[],n=[],i=[];for(const o of e)switch(o.enforce){case"pre":t.push(o);break;case"post":n.push(o);break;default:i.push(o)}return{pre:t,post:n,normal:i}}var Lr=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Fu={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function f1(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const i=e.indexOf("m",n);if(i!==-1)return{sequence:e.substring(n+2,i).split(";"),startPosition:n,position:i+1}}return{position:e.length}}function Op(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(i=>Number.parseInt(i));return n.length!==3||n.some(i=>Number.isNaN(i))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function d1(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const i=Number.parseInt(n);if(!Number.isNaN(i))if(i===0)t.push({type:"resetAll"});else if(i<=9)Fu[i]&&t.push({type:"setDecoration",value:Fu[i]});else if(i<=29){const o=Fu[i-20];o&&(t.push({type:"resetDecoration",value:o}),o==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(i<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Lr[i-30]}});else if(i===38){const o=Op(e);o&&t.push({type:"setForegroundColor",value:o})}else if(i===39)t.push({type:"resetForegroundColor"});else if(i<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Lr[i-40]}});else if(i===48){const o=Op(e);o&&t.push({type:"setBackgroundColor",value:o})}else i===49?t.push({type:"resetBackgroundColor"}):i===53?t.push({type:"setDecoration",value:"overline"}):i===55?t.push({type:"resetDecoration",value:"overline"}):i>=90&&i<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Lr[i-90+8]}}):i>=100&&i<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Lr[i-100+8]}})}return t}function h1(){let e=null,t=null,n=new Set;return{parse(i){const o=[];let l=0;do{const a=f1(i,l),c=a.sequence?i.substring(l,a.startPosition):i.substring(l);if(c.length>0&&o.push({value:c,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const f=d1(a.sequence);for(const h of f)h.type==="resetAll"?(e=null,t=null,n.clear()):h.type==="resetForegroundColor"?e=null:h.type==="resetBackgroundColor"?t=null:h.type==="resetDecoration"&&n.delete(h.value);for(const h of f)h.type==="setForegroundColor"?e=h.value:h.type==="setBackgroundColor"?t=h.value:h.type==="setDecoration"&&n.add(h.value)}l=a.position}while(l<i.length);return o}}}var p1={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 m1(e=p1){function t(c){return e[c]}function n(c){return`#${c.map(f=>Math.max(0,Math.min(f,255)).toString(16).padStart(2,"0")).join("")}`}let i;function o(){if(i)return i;i=[];for(let h=0;h<Lr.length;h++)i.push(t(Lr[h]));let c=[0,95,135,175,215,255];for(let h=0;h<6;h++)for(let p=0;p<6;p++)for(let m=0;m<6;m++)i.push(n([c[h],c[p],c[m]]));let f=8;for(let h=0;h<24;h++,f+=10)i.push(n([f,f,f]));return i}function l(c){return o()[c]}function a(c){switch(c.type){case"named":return t(c.name);case"rgb":return n(c.rgb);case"table":return l(c.index)}}return{value:a}}const g1={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 y1(e,t,n){const i=gl(e,n),o=Il(t),l=Object.fromEntries(Lr.map(f=>{const h=`terminal.ansi${f[0].toUpperCase()}${f.substring(1)}`,p=e.colors?.[h];return[f,p||g1[f]]})),a=m1(l),c=h1();return o.map(f=>c.parse(f[0]).map(h=>{let p,m;h.decorations.has("reverse")?(p=h.background?a.value(h.background):e.bg,m=h.foreground?a.value(h.foreground):e.fg):(p=h.foreground?a.value(h.foreground):e.fg,m=h.background?a.value(h.background):void 0),p=ur(p,i),m=ur(m,i),h.decorations.has("dim")&&(p=w1(p));let w=bt.None;return h.decorations.has("bold")&&(w|=bt.Bold),h.decorations.has("italic")&&(w|=bt.Italic),h.decorations.has("underline")&&(w|=bt.Underline),h.decorations.has("strikethrough")&&(w|=bt.Strikethrough),{content:h.value,offset:f[1],color:p,bgColor:m,fontStyle:w}}))}function w1(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const i=t[1];if(i.length===8){const o=Math.round(Number.parseInt(i.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${i.slice(0,6)}${o}`}else{if(i.length===6)return`#${i}80`;if(i.length===4){const o=i[0],l=i[1],a=i[2],c=i[3],f=Math.round(Number.parseInt(`${c}${c}`,16)/2).toString(16).padStart(2,"0");return`#${o}${o}${l}${l}${a}${a}${f}`}else if(i.length===3){const o=i[0],l=i[1],a=i[2];return`#${o}${o}${l}${l}${a}${a}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Kc(e,t,n={}){const{theme:i=e.getLoadedThemes()[0]}=n,o=e.resolveLangAlias(n.lang||"text");if(Wc(o)||Hc(i))return Il(t).map(f=>[{content:f[0],offset:f[1]}]);const{theme:l,colorMap:a}=e.setTheme(i);if(o==="ansi")return y1(l,t,n);const c=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==c.name)throw new mt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${c.name}"`);if(!n.grammarState.themes.includes(l.name))throw new mt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${l.name}"`)}return k1(t,c,l,a,n)}function v1(...e){if(e.length===2)return _s(e[1]);const[t,n,i={}]=e,{lang:o="text",theme:l=t.getLoadedThemes()[0]}=i;if(Wc(o)||Hc(l))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:a,colorMap:c}=t.setTheme(l),f=t.getLanguage(o);return new xi(Qc(n,f,a,c,i).stateStack,f.name,a.name)}function k1(e,t,n,i,o){const l=Qc(e,t,n,i,o),a=new xi(l.stateStack,t.name,n.name);return Nl(l.tokens,a),l.tokens}function Qc(e,t,n,i,o){const l=gl(n,o),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:c=500}=o,f=Il(e);let h=o.grammarState?o1(o.grammarState,n.name)??vc:o.grammarContextCode!=null?Qc(o.grammarContextCode,t,n,i,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:vc,p=[];const m=[];for(let w=0,v=f.length;w<v;w++){const[k,_]=f[w];if(k===""){p=[],m.push([]);continue}if(a>0&&k.length>=a){p=[],m.push([{content:k,offset:_,color:"",fontStyle:0}]);continue}let A,S,b;o.includeExplanation&&(A=t.tokenizeLine(k,h,c),S=A.tokens,b=0);const T=t.tokenizeLine2(k,h,c),$=T.tokens.length/2;for(let j=0;j<$;j++){const P=T.tokens[2*j],H=j+1<$?T.tokens[2*j+2]:k.length;if(P===H)continue;const ie=T.tokens[2*j+1],ue=ur(i[wi.getForeground(ie)],l),R=wi.getFontStyle(ie),X={content:k.substring(P,H),offset:_+P,color:ue,fontStyle:R};if(o.includeExplanation){const ne=[];if(o.includeExplanation!=="scopeName")for(const te of n.settings){let Q;switch(typeof te.scope){case"string":Q=te.scope.split(/,/).map(pe=>pe.trim());break;case"object":Q=te.scope;break;default:continue}ne.push({settings:te,selectors:Q.map(pe=>pe.split(/ /))})}X.explanation=[];let de=0;for(;P+de<H;){const te=S[b],Q=k.substring(te.startIndex,te.endIndex);de+=Q.length,X.explanation.push({content:Q,scopes:o.includeExplanation==="scopeName"?x1(te.scopes):S1(ne,te.scopes)}),b+=1}}p.push(X)}m.push(p),p=[],h=T.ruleStack}return{tokens:m,stateStack:h}}function x1(e){return e.map(t=>({scopeName:t}))}function S1(e,t){const n=[];for(let i=0,o=t.length;i<o;i++){const l=t[i];n[i]={scopeName:l,themeMatches:_1(e,l,t.slice(0,i))}}return n}function Mp(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function C1(e,t,n){if(!Mp(e[e.length-1],t))return!1;let i=e.length-2,o=n.length-1;for(;i>=0&&o>=0;)Mp(e[i],n[o])&&(i-=1),o-=1;return i===-1}function _1(e,t,n){const i=[];for(const{selectors:o,settings:l}of e)for(const a of o)if(C1(a,t,n)){i.push(l);break}return i}function Dg(e,t,n){const i=Object.entries(n.themes).filter(f=>f[1]).map(f=>({color:f[0],theme:f[1]})),o=i.map(f=>{const h=Kc(e,t,{...n,theme:f.theme}),p=_s(h),m=typeof f.theme=="string"?f.theme:f.theme.name;return{tokens:h,state:p,theme:m}}),l=E1(...o.map(f=>f.tokens)),a=l[0].map((f,h)=>f.map((p,m)=>{const w={content:p.content,variants:{},offset:p.offset};return"includeExplanation"in n&&n.includeExplanation&&(w.explanation=p.explanation),l.forEach((v,k)=>{const{content:_,explanation:A,offset:S,...b}=v[h][m];w.variants[i[k].color]=b}),w})),c=o[0].state?new xi(Object.fromEntries(o.map(f=>[f.theme,f.state?.getInternalStack(f.theme)])),o[0].state.lang):void 0;return c&&Nl(a,c),a}function E1(...e){const t=e.map(()=>[]),n=e.length;for(let i=0;i<e[0].length;i++){const o=e.map(f=>f[i]),l=t.map(()=>[]);t.forEach((f,h)=>f.push(l[h]));const a=o.map(()=>0),c=o.map(f=>f[0]);for(;c.every(f=>f);){const f=Math.min(...c.map(h=>h.content.length));for(let h=0;h<n;h++){const p=c[h];p.content.length===f?(l[h].push(p),a[h]+=1,c[h]=o[h][a[h]]):(l[h].push({...p,content:p.content.slice(0,f)}),c[h]={...p,content:p.content.slice(f),offset:p.offset+f})}}}return t}function vl(e,t,n){let i,o,l,a,c,f;if("themes"in n){const{defaultColor:h="light",cssVariablePrefix:p="--shiki-",colorsRendering:m="css-vars"}=n,w=Object.entries(n.themes).filter(S=>S[1]).map(S=>({color:S[0],theme:S[1]})).sort((S,b)=>S.color===h?-1:b.color===h?1:0);if(w.length===0)throw new mt("`themes` option must not be empty");const v=Dg(e,t,n);if(f=_s(v),h&&qc!==h&&!w.find(S=>S.color===h))throw new mt(`\`themes\` option must contain the defaultColor key \`${h}\``);const k=w.map(S=>e.getTheme(S.theme)),_=w.map(S=>S.color);l=v.map(S=>S.map(b=>i1(b,_,p,h,m))),f&&Nl(l,f);const A=w.map(S=>gl(S.theme,n));o=jp(w,k,A,p,h,"fg",m),i=jp(w,k,A,p,h,"bg",m),a=`shiki-themes ${k.map(S=>S.name).join(" ")}`,c=h?void 0:[o,i].join(";")}else if("theme"in n){const h=gl(n.theme,n);l=Kc(e,t,n);const p=e.getTheme(n.theme);i=ur(p.bg,h),o=ur(p.fg,h),a=p.name,f=_s(l)}else throw new mt("Invalid options, either `theme` or `themes` must be provided");return{tokens:l,fg:o,bg:i,themeName:a,rootStyle:c,grammarState:f}}function jp(e,t,n,i,o,l,a){return e.map((c,f)=>{const h=ur(t[f][l],n[f])||"inherit",p=`${i+c.color}${l==="bg"?"-bg":""}:${h}`;if(f===0&&o){if(o===qc&&e.length>1){const m=e.findIndex(_=>_.color==="light"),w=e.findIndex(_=>_.color==="dark");if(m===-1||w===-1)throw new mt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const v=ur(t[m][l],n[m])||"inherit",k=ur(t[w][l],n[w])||"inherit";return`light-dark(${v}, ${k});${p}`}return h}return a==="css-vars"?p:null}).filter(c=>!!c).join(";")}function kl(e,t,n,i={meta:{},options:n,codeToHast:(o,l)=>kl(e,o,l),codeToTokens:(o,l)=>vl(e,o,l)}){let o=t;for(const k of wl(n))o=k.preprocess?.call(i,o,n)||o;let{tokens:l,fg:a,bg:c,themeName:f,rootStyle:h,grammarState:p}=vl(e,o,n);const{mergeWhitespaces:m=!0,mergeSameStyleTokens:w=!1}=n;m===!0?l=I1(l):m==="never"&&(l=N1(l)),w&&(l=A1(l));const v={...i,get source(){return o}};for(const k of wl(n))l=k.tokens?.call(v,l)||l;return b1(l,{...n,fg:a,bg:c,themeName:f,rootStyle:n.rootStyle===!1?!1:n.rootStyle??h},v,p)}function b1(e,t,n,i=_s(e)){const o=wl(t),l=[],a={type:"root",children:[]},{structure:c="classic",tabindex:f="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}`),f!==!1&&f!=null&&(h.tabindex=f.toString());for(const[_,A]of Object.entries(t.meta||{}))_.startsWith("_")||(h[_]=A);let p={type:"element",tagName:"pre",properties:h,children:[],data:t.data},m={type:"element",tagName:"code",properties:{},children:l};const w=[],v={...n,structure:c,addClassToHast:Og,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return p},get code(){return m},get lines(){return w}};if(e.forEach((_,A)=>{A&&(c==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):c==="classic"&&l.push({type:"text",value:`
21
- `}));let S={type:"element",tagName:"span",properties:{class:"line"},children:[]},b=0;for(const T of _){let $={type:"element",tagName:"span",properties:{...T.htmlAttrs},children:[{type:"text",value:T.content}]};const j=_c(T.htmlStyle||yl(T));j&&($.properties.style=j);for(const P of o)$=P?.span?.call(v,$,A+1,b,S,T)||$;c==="inline"?a.children.push($):c==="classic"&&S.children.push($),b+=T.content.length}if(c==="classic"){for(const T of o)S=T?.line?.call(v,S,A+1)||S;w.push(S),l.push(S)}else c==="inline"&&w.push(S)}),c==="classic"){for(const _ of o)m=_?.code?.call(v,m)||m;p.children.push(m);for(const _ of o)p=_?.pre?.call(v,p)||p;a.children.push(p)}else if(c==="inline"){const _=[];let A={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const T of a.children)T.type==="element"&&T.tagName==="br"?(_.push(A),A={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(T.type==="element"||T.type==="text")&&A.children.push(T);_.push(A);let b={type:"element",tagName:"code",properties:{},children:_};for(const T of o)b=T?.code?.call(v,b)||b;a.children=[];for(let T=0;T<b.children.length;T++){T>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const $=b.children[T];$.type==="element"&&a.children.push(...$.children)}}let k=a;for(const _ of o)k=_?.root?.call(v,k)||k;return i&&Nl(k,i),k}function I1(e){return e.map(t=>{const n=[];let i="",o;return t.forEach((l,a)=>{const f=!(l.fontStyle&&(l.fontStyle&bt.Underline||l.fontStyle&bt.Strikethrough));f&&l.content.match(/^\s+$/)&&t[a+1]?(o===void 0&&(o=l.offset),i+=l.content):i?(f?n.push({...l,offset:o,content:i+l.content}):n.push({content:i,offset:o},l),o=void 0,i=""):n.push(l)}),n})}function N1(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const i=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!i)return n;const[,o,l,a]=i;if(!o&&!a)return n;const c=[{...n,offset:n.offset+o.length,content:l}];return o&&c.unshift({content:o,offset:n.offset}),a&&c.push({content:a,offset:n.offset+o.length+l.length}),c}))}function A1(e){return e.map(t=>{const n=[];for(const i of t){if(n.length===0){n.push({...i});continue}const o=n[n.length-1],l=_c(o.htmlStyle||yl(o)),a=_c(i.htmlStyle||yl(i)),c=o.fontStyle&&(o.fontStyle&bt.Underline||o.fontStyle&bt.Strikethrough),f=i.fontStyle&&(i.fontStyle&bt.Underline||i.fontStyle&bt.Strikethrough);!c&&!f&&l===a?o.content+=i.content:n.push({...i})}return n})}const T1=Kx;function P1(e,t,n){const i={meta:{},options:n,codeToHast:(l,a)=>kl(e,l,a),codeToTokens:(l,a)=>vl(e,l,a)};let o=T1(kl(e,t,n,i));for(const l of wl(n))o=l.postprocess?.call(i,o,n)||o;return o}const Dp={light:"#333333",dark:"#bbbbbb"},Fp={light:"#fffffe",dark:"#1e1e1e"},zp="__shiki_resolved";function Xc(e){if(e?.[zp])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:n,fg:i}=t;if(!n||!i){const c=t.settings?t.settings.find(f=>!f.name&&!f.scope):void 0;c?.settings?.foreground&&(i=c.settings.foreground),c?.settings?.background&&(n=c.settings.background),!i&&t?.colors?.["editor.foreground"]&&(i=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),i||(i=t.type==="light"?Dp.light:Dp.dark),n||(n=t.type==="light"?Fp.light:Fp.dark),t.fg=i,t.bg=n}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 l=new Map;function a(c){if(l.has(c))return l.get(c);o+=1;const f=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${f}`]?a(c):(l.set(c,f),f)}t.settings=t.settings.map(c=>{const f=c.settings?.foreground&&!c.settings.foreground.startsWith("#"),h=c.settings?.background&&!c.settings.background.startsWith("#");if(!f&&!h)return c;const p={...c,settings:{...c.settings}};if(f){const m=a(c.settings.foreground);t.colorReplacements[m]=c.settings.foreground,p.settings.foreground=m}if(h){const m=a(c.settings.background);t.colorReplacements[m]=c.settings.background,p.settings.background=m}return p});for(const c of Object.keys(t.colors||{}))if((c==="editor.foreground"||c==="editor.background"||c.startsWith("terminal.ansi"))&&!t.colors[c]?.startsWith("#")){const f=a(t.colors[c]);t.colorReplacements[f]=t.colors[c],t.colors[c]=f}return Object.defineProperty(t,zp,{enumerable:!1,writable:!1,value:!0}),t}async function Fg(e){return Array.from(new Set((await Promise.all(e.filter(t=>!Jx(t)).map(async t=>await Rg(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function zg(e){return(await Promise.all(e.map(async n=>Zx(n)?null:Xc(await Rg(n))))).filter(n=>!!n)}let L1=3;function R1(e,t=3){t>L1||console.trace(`[SHIKI DEPRECATE]: ${e}`)}class gi extends Error{constructor(t){super(t),this.name="ShikiError"}}function $g(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new gi(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class O1 extends D0{constructor(t,n,i,o={}){super(t),this._resolver=t,this._themes=n,this._langs=i,this._alias=o,this._themes.map(l=>this.loadTheme(l)),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 n=Xc(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=cl.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=$g(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(l=>l.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const i={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const o=this.loadGrammarWithConfiguration(t.scopeName,1,i);if(o.name=t.name,this._resolvedGrammars.set(t.name,o),t.aliases&&t.aliases.forEach(l=>{this._alias[l]=t.name}),this._loadedLanguagesCache=null,n.size)for(const l of n)this._resolvedGrammars.delete(l.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(l.scopeName),this._syncRegistry?._grammars?.delete(l.scopeName),this.loadLanguage(this._langMap.get(l.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 n=Array.from(this._langGraph.entries()),i=n.filter(([o,l])=>!l);if(i.length){const o=n.filter(([l,a])=>a?(a.embeddedLanguages||a.embeddedLangs)?.some(f=>i.map(([h])=>h).includes(f)):!1).filter(l=>!i.includes(l));throw new gi(`Missing languages ${i.map(([l])=>`\`${l}\``).join(", ")}, required by ${o.map(([l])=>`\`${l}\``).join(", ")}`)}for(const[o,l]of n)this._resolver.addLanguage(l);for(const[o,l]of n)this.loadLanguage(l)}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 n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const i of n)this._langGraph.set(i,this._langMap.get(i))}}class M1{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){this._onigLib={createOnigScanner:i=>t.createScanner(i),createOnigString:i=>t.createString(i)},n.forEach(i=>this.addLanguage(i))}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(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let i=[];for(let o=1;o<=n.length;o++){const l=n.slice(0,o).join(".");i=[...i,...this._injections.get(l)||[]]}return i}}let us=0;function j1(e){us+=1,e.warnings!==!1&&us>=10&&us%10===0&&console.warn(`[Shiki] ${us} 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 gi("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map(Xc),o=new M1(e.engine,n),l=new O1(o,i,n,e.langAlias);let a;function c(T){return $g(T,e.langAlias)}function f(T){S();const $=l.getGrammar(typeof T=="string"?T:T.name);if(!$)throw new gi(`Language \`${T}\` not found, you may need to load it first`);return $}function h(T){if(T==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};S();const $=l.getTheme(T);if(!$)throw new gi(`Theme \`${T}\` not found, you may need to load it first`);return $}function p(T){S();const $=h(T);a!==T&&(l.setTheme($),a=T);const j=l.getColorMap();return{theme:$,colorMap:j}}function m(){return S(),l.getLoadedThemes()}function w(){return S(),l.getLoadedLanguages()}function v(...T){S(),l.loadLanguages(T.flat(1))}async function k(...T){return v(await Fg(T))}function _(...T){S();for(const $ of T.flat(1))l.loadTheme($)}async function A(...T){return S(),_(await zg(T))}function S(){if(t)throw new gi("Shiki instance has been disposed")}function b(){t||(t=!0,l.dispose(),us-=1)}return{setTheme:p,getTheme:h,getLanguage:f,getLoadedThemes:m,getLoadedLanguages:w,resolveLangAlias:c,loadLanguage:k,loadLanguageSync:v,loadTheme:A,loadThemeSync:_,dispose:b,[Symbol.dispose]:b}}async function D1(e){e.engine||R1("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,i]=await Promise.all([zg(e.themes||[]),Fg(e.langs||[]),e.engine]);return j1({...e,themes:t,langs:n,engine:i})}async function F1(e){const t=await D1(e);return{getLastGrammarState:(...n)=>v1(t,...n),codeToTokensBase:(n,i)=>Kc(t,n,i),codeToTokensWithThemes:(n,i)=>Dg(t,n,i),codeToTokens:(n,i)=>vl(t,n,i),codeToHast:(n,i)=>kl(t,n,i),codeToHtml:(n,i)=>P1(t,n,i),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Si(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function z1(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const Yc=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),gt=String.raw;function Ci(e,t){if(e==null)throw new Error(t??"Value expected");return e}const Bg=gt`\[\^?`,Ug=`c.? | C(?:-.?)?|${gt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${gt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${gt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${gt`o\{[^\}]*\}?`}|${gt`\d{1,3}`}`,Jc=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Xo=new RegExp(gt`
22
- \\ (?:
23
- ${Ug}
24
- | [gk]<[^>]*>?
25
- | [gk]'[^']*'?
26
- | .
27
- )
28
- | \( (?:
29
- \? (?:
30
- [:=!>({]
31
- | <[=!]
32
- | <[^>]*>
33
- | '[^']*'
34
- | ~\|?
35
- | #(?:[^)\\]|\\.?)*
36
- | [^:)]*[:)]
37
- )?
38
- | \*[^\)]*\)?
39
- )?
40
- | (?:${Jc.source})+
41
- | ${Bg}
42
- | .
43
- `.replace(/\s+/g,""),"gsu"),zu=new RegExp(gt`
44
- \\ (?:
45
- ${Ug}
46
- | .
47
- )
48
- | \[:(?:\^?\p{Alpha}+|\^):\]
49
- | ${Bg}
50
- | &&
51
- | .
52
- `.replace(/\s+/g,""),"gsu");function $1(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const i=sS(n.flags),o=[i.extended],l={captureGroup:n.rules.captureGroup,getCurrentModX(){return o.at(-1)},numOpenGroups:0,popModX(){o.pop()},pushModX(m){o.push(m)},replaceCurrentModX(m){o[o.length-1]=m},singleline:n.rules.singleline};let a=[],c;for(Xo.lastIndex=0;c=Xo.exec(e);){const m=B1(l,e,c[0],Xo.lastIndex);m.tokens?a.push(...m.tokens):m.token&&a.push(m.token),m.lastIndex!==void 0&&(Xo.lastIndex=m.lastIndex)}const f=[];let h=0;a.filter(m=>m.type==="GroupOpen").forEach(m=>{m.kind==="capturing"?m.number=++h:m.raw==="("&&f.push(m)}),h||f.forEach((m,w)=>{m.kind="capturing",m.number=w+1});const p=h||f.length;return{tokens:a.map(m=>m.type==="EscapedNumber"?lS(m,p):m).flat(),flags:i}}function B1(e,t,n,i){const[o,l]=n;if(n==="["||n==="[^"){const a=U1(t,n,i);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(l))return{token:$p(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:J1(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Vg(n)}}if(l==="K")return{token:Wg("keep",n)};if(l==="N"||l==="R")return{token:Rr("newline",n,{negate:l==="N"})};if(l==="O")return{token:Rr("any",n)};if(l==="X")return{token:Rr("text_segment",n)};const a=Gg(n,{inCharClass:!1});return Array.isArray(a)?{tokens:a}:{token:a}}if(o==="("){if(l==="*")return{token:nS(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[i]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:i+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:tS(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:hi("group",n)};if(n==="(?>")return{token:hi("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:hi(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:hi("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:hi("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:Q1(n)}}if(e.getCurrentModX()){if(n==="#"){const a=t.indexOf(`
53
- `,i);return{lastIndex:a===-1?t.length:a}}if(/^\s$/.test(n)){const a=/\s+/y;return a.lastIndex=i,{lastIndex:a.exec(t)?a.lastIndex:i}}}if(n===".")return{token:Rr("dot",n)};if(n==="^"||n==="$"){const a=e.singleline?{"^":gt`\A`,$:gt`\Z`}[n]:n;return{token:$p(a,n)}}return n==="|"?{token:V1(n)}:Jc.test(n)?{tokens:aS(n)}:{token:Fn(Si(n),n)}}function U1(e,t,n){const i=[Bp(t[1]==="^",t)];let o=1,l;for(zu.lastIndex=n;l=zu.exec(e);){const a=l[0];if(a[0]==="["&&a[1]!==":")o++,i.push(Bp(a[1]==="^",a));else if(a==="]"){if(i.at(-1).type==="CharacterClassOpen")i.push(Fn(93,a));else if(o--,i.push(W1(a)),!o)break}else{const c=G1(a);Array.isArray(c)?i.push(...c):i.push(c)}}return{tokens:i,lastIndex:zu.lastIndex||e.length}}function G1(e){if(e[0]==="\\")return Gg(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Yc.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return Rr("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?H1(e):e==="&&"?q1(e):Fn(Si(e),e)}function Gg(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return eS(e);if("dDhHsSwW".includes(n))return rS(e);if(e.startsWith(gt`\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 iS(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const i=e.split(/\\x/).slice(1).map(a=>parseInt(a,16)),o=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(i)),l=new TextEncoder;return[...o].map(a=>{const c=[...l.encode(a)].map(f=>`\\x${f.toString(16)}`).join("");return Fn(Si(a),c)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Fn(oS(e),e);if(Up.has(n))return Fn(Up.get(n),e);if(/\d/.test(n))return K1(t,e);if(e==="\\")throw new Error(gt`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Fn(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function V1(e){return{type:"Alternator",raw:e}}function $p(e,t){return{type:"Assertion",kind:e,raw:t}}function Vg(e){return{type:"Backreference",raw:e}}function Fn(e,t){return{type:"Character",value:e,raw:t}}function W1(e){return{type:"CharacterClassClose",raw:e}}function H1(e){return{type:"CharacterClassHyphen",raw:e}}function q1(e){return{type:"CharacterClassIntersector",raw:e}}function Bp(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function Rr(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function Wg(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Ci(n.flags),raw:t}}function K1(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function Q1(e){return{type:"GroupClose",raw:e}}function hi(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function X1(e,t,n,i){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:i}}function Y1(e,t,n,i){return{type:"Quantifier",kind:e,min:t,max:n,raw:i}}function J1(e){return{type:"Subroutine",raw:e}}const Z1=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),Up=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function eS(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 Fn(Si(t.toUpperCase())-64,e)}function tS(e,t){let{on:n,off:i}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;i??="";const o=(t.getCurrentModX()||n.includes("x"))&&!i.includes("x"),l=Vp(n),a=Vp(i),c={};if(l&&(c.enable=l),a&&(c.disable=a),e.endsWith(")"))return t.replaceCurrentModX(o),Wg("flags",e,{flags:c});if(e.endsWith(":"))return t.pushModX(o),t.numOpenGroups++,hi("group",e,{...(l||a)&&{flags:c}});throw new Error(`Unexpected flag modifier "${e}"`)}function nS(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:n,tag:i,args:o}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(i==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const l=o?o.split(",").filter(p=>p!=="").map(p=>/^[+-]?\d+$/.test(p)?+p:p):[],[a,c,f]=l,h=Z1.has(n)?n.toLowerCase():"custom";switch(h){case"fail":case"mismatch":case"skip":if(l.length>0)throw new Error(`Named callout arguments not allowed "${l}"`);break;case"error":if(l.length>1)throw new Error(`Named callout allows only one argument "${l}"`);if(typeof a=="string")throw new Error(`Named callout argument must be a number "${a}"`);break;case"max":if(!l.length||l.length>2)throw new Error(`Named callout must have one or two arguments "${l}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(l.length===2&&(typeof c=="number"||!/^[<>X]$/.test(c)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${c}"`);break;case"count":case"total_count":if(l.length>1)throw new Error(`Named callout allows only one argument "${l}"`);if(l.length===1&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${a}"`);break;case"cmp":if(l.length!==3)throw new Error(`Named callout must have three arguments "${l}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(typeof c=="number"||!/^(?:[<>!=]=|[<>])$/.test(c))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${c}"`);if(typeof f=="string"&&!/^[A-Za-z_]\w*$/.test(f))throw new Error(`Named callout argument three must be a tag or number "${f}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${h}"`)}return X1(h,i??null,o?.split(",")??null,e)}function Gp(e){let t=null,n,i;if(e[0]==="{"){const{minStr:o,maxStr:l}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,a=1e5;if(+o>a||l&&+l>a)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+o,i=l===void 0?+o:l===""?1/0:+l,n>i&&(t="possessive",[n,i]=[i,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,i=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return Y1(t,n,i,e)}function rS(e){const t=e[1].toLowerCase();return Rr({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function iS(e){const{p:t,neg:n,value:i}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Rr("property",e,{value:i,negate:t==="P"&&!n||t==="p"&&!!n})}function Vp(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 sS(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const i=e[n];if(!"imxDPSWy".includes(i))throw new Error(`Invalid flag "${i}"`);if(i==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[i]]=!0}return t}function oS(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 lS(e,t){const{raw:n,inCharClass:i}=e,o=n.slice(1);if(!i&&(o!=="0"&&o.length===1||o[0]!=="0"&&+o<=t))return[Vg(n)];const l=[],a=o.match(/^[0-7]+|\d/g);for(let c=0;c<a.length;c++){const f=a[c];let h;if(c===0&&f!=="8"&&f!=="9"){if(h=parseInt(f,8),h>127)throw new Error(gt`Octal encoded byte above 177 unsupported "${n}"`)}else h=Si(f);l.push(Fn(h,(c===0?"\\":"")+f))}return l}function aS(e){const t=[],n=new RegExp(Jc,"gy");let i;for(;i=n.exec(e);){const o=i[0];if(o[0]==="{"){const l=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(o);if(l){const{min:a,max:c}=l.groups;if(+a>+c&&o.endsWith("?")){n.lastIndex--,t.push(Gp(o.slice(0,-1)));continue}}}t.push(Gp(o))}return t}function Hg(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(i=>t[i]===n[i])}function uS(e){return cS.has(e.type)}const cS=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function qg(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},i=$1(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),o=(w,v)=>{const k=i.tokens[l.nextIndex];switch(l.parent=w,l.nextIndex++,k.type){case"Alternator":return Mr();case"Assertion":return fS(k);case"Backreference":return dS(k,l);case"Character":return Al(k.value,{useLastValid:!!v.isCheckingRangeEnd});case"CharacterClassHyphen":return hS(k,l,v);case"CharacterClassOpen":return pS(k,l,v);case"CharacterSet":return mS(k,l);case"Directive":return xS(k.kind,{flags:k.flags});case"GroupOpen":return gS(k,l,v);case"NamedCallout":return CS(k.kind,k.tag,k.arguments);case"Quantifier":return yS(k,l);case"Subroutine":return wS(k,l);default:throw new Error(`Unexpected token type "${k.type}"`)}},l={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:i.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:o},a=ES(SS(i.flags));let c=a.body[0];for(;l.nextIndex<i.tokens.length;){const w=o(c,{});w.type==="Alternative"?(a.body.push(w),c=w):c.body.push(w)}const{capturingGroups:f,hasNumberedRef:h,namedGroupsByName:p,subroutines:m}=l;if(h&&p.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:w}of m)if(typeof w=="number"){if(w>f.length)throw new Error("Subroutine uses a group number that's not defined");w&&(f[w-1].isSubroutined=!0)}else if(p.has(w)){if(p.get(w).length>1)throw new Error(gt`Subroutine uses a duplicate group name "\g<${w}>"`);p.get(w)[0].isSubroutined=!0}else throw new Error(gt`Subroutine uses a group name that's not defined "\g<${w}>"`);return a}function fS({kind:e}){return Ec(Ci({"^":"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===gt`\B`||e===gt`\Y`})}function dS({raw:e},t){const n=/^\\k[<']/.test(e),i=n?e.slice(3,-1):e.slice(1),o=(l,a=!1)=>{const c=t.capturingGroups.length;let f=!1;if(l>c)if(t.skipBackrefValidation)f=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,bc(a?c+1-l:l,{orphan:f})};if(n){const l=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(i);if(l)return o(+l.groups.num,!!l.groups.sign);if(/[-+]/.test(i))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(i))throw new Error(`Group name not defined to the left "${e}"`);return bc(i)}return o(+i)}function hS(e,t,n){const{tokens:i,walk:o}=t,l=t.parent,a=l.body.at(-1),c=i[t.nextIndex];if(!n.isCheckingRangeEnd&&a&&a.type!=="CharacterClass"&&a.type!=="CharacterClassRange"&&c&&c.type!=="CharacterClassOpen"&&c.type!=="CharacterClassClose"&&c.type!=="CharacterClassIntersector"){const f=o(l,{...n,isCheckingRangeEnd:!0});if(a.type==="Character"&&f.type==="Character")return l.body.pop(),kS(a,f);throw new Error("Invalid character class range")}return Al(Si("-"))}function pS({negate:e},t,n){const{tokens:i,walk:o}=t,l=[ll()],a=i[t.nextIndex];let c=qp(a);for(;c.type!=="CharacterClassClose";){if(c.type==="CharacterClassIntersector")l.push(ll()),t.nextIndex++;else{const h=l.at(-1);h.body.push(o(h,n))}c=qp(i[t.nextIndex],a)}const f=ll({negate:e});return l.length===1?f.body=l[0].body:(f.kind="intersection",f.body=l.map(h=>h.body.length===1?h.body[0]:h)),t.nextIndex++,f}function mS({kind:e,negate:t,value:n},i){const{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:l,unicodePropertyMap:a}=i;if(e==="property"){const c=Tl(n);if(Yc.has(c)&&!a?.has(c))e="posix",n=c;else return pi(n,{negate:t,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:l,unicodePropertyMap:a})}return e==="posix"?_S(n,{negate:t}):Ic(e,{negate:t})}function gS(e,t,n){const{tokens:i,capturingGroups:o,namedGroupsByName:l,skipLookbehindValidation:a,walk:c}=t,f=bS(e),h=f.type==="AbsenceFunction",p=Hp(f),m=p&&f.negate;if(f.type==="CapturingGroup"&&(o.push(f),f.name&&z1(l,f.name,[]).push(f)),h&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let w=Kp(i[t.nextIndex]);for(;w.type!=="GroupClose";){if(w.type==="Alternator")f.body.push(Mr()),t.nextIndex++;else{const v=f.body.at(-1),k=c(v,{...n,isInAbsenceFunction:n.isInAbsenceFunction||h,isInLookbehind:n.isInLookbehind||p,isInNegLookbehind:n.isInNegLookbehind||m});if(v.body.push(k),(p||n.isInLookbehind)&&!a){const _="Lookbehind includes a pattern not allowed by Oniguruma";if(m||n.isInNegLookbehind){if(Wp(k)||k.type==="CapturingGroup")throw new Error(_)}else if(Wp(k)||Hp(k)&&k.negate)throw new Error(_)}}w=Kp(i[t.nextIndex])}return t.nextIndex++,f}function yS({kind:e,min:t,max:n},i){const o=i.parent,l=o.body.at(-1);if(!l||!uS(l))throw new Error("Quantifier requires a repeatable token");const a=Qg(e,t,n,l);return o.body.pop(),a}function wS({raw:e},t){const{capturingGroups:n,subroutines:i}=t;let o=e.slice(3,-1);const l=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);if(l){const c=+l.groups.num,f=n.length;if(t.hasNumberedRef=!0,o={"":c,"+":f+c,"-":f+1-c}[l.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);const a=Xg(o);return i.push(a),a}function vS(e,t){return{type:"AbsenceFunction",kind:e,body:Ps(t?.body)}}function Mr(e){return{type:"Alternative",body:Yg(e?.body)}}function Ec(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function bc(e,t){const n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function Kg(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!IS(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Ps(t?.body)}}function Al(e,t){const n={useLastValid:!1,...t};if(e>1114111){const i=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${i}}"`):new Error(`Invalid code point out of range in JS "\\x{${i}}"`)}return{type:"Character",value:e}}function ll(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:Yg(e?.body)}}function kS(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function Ic(e,t){const n=!!t?.negate,i={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(i.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(i.variableLength=!0),i}function xS(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Ci(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function SS(e){return{type:"Flags",...e}}function pn(e){const t=e?.atomic,n=e?.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:Ps(e?.body)}}function Tr(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Ps(e?.body)}}function CS(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function _S(e,t){const n=!!t?.negate;if(!Yc.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function Qg(e,t,n,i){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:i}}function ES(e,t){return{type:"Regex",body:Ps(t?.body),flags:e}}function Xg(e){return{type:"Subroutine",ref:e}}function pi(e,t){const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let i=n.unicodePropertyMap?.get(Tl(e));if(!i){if(n.normalizeUnknownPropertyNames)i=NS(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(gt`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:i??e,negate:n.negate}}function bS({flags:e,kind:t,name:n,negate:i,number:o}){switch(t){case"absence_repeater":return vS("repeater");case"atomic":return pn({atomic:!0});case"capturing":return Kg(o,{name:n});case"group":return pn({flags:e});case"lookahead":case"lookbehind":return Tr({behind:t==="lookbehind",negate:i});default:throw new Error(`Unexpected group kind "${t}"`)}}function Ps(e){if(e===void 0)e=[Mr()];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 Yg(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 Wp(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function Hp(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function IS(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function NS(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 Tl(e){return e.replace(/[- _]+/g,"").toLowerCase()}function qp(e,t){const n=t;return Ci(e,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function Kp(e){return Ci(e,"Unclosed group")}function ys(e,t,n=null){function i(l,a){for(let c=0;c<l.length;c++){const f=o(l[c],a,c,l);c=Math.max(-1,c+f)}}function o(l,a=null,c=null,f=null){let h=0,p=!1;const m={node:l,parent:a,key:c,container:f,root:e,remove(){Yo(f).splice(Math.max(0,ci(c)+h),1),h--,p=!0},removeAllNextSiblings(){return Yo(f).splice(ci(c)+1)},removeAllPrevSiblings(){const S=ci(c)+h;return h-=S,Yo(f).splice(0,Math.max(0,S))},replaceWith(S,b={}){const T=!!b.traverse;f?f[Math.max(0,ci(c)+h)]=S:Ci(a,"Can't replace root node")[c]=S,T&&o(S,a,c,f),p=!0},replaceWithMultiple(S,b={}){const T=!!b.traverse;if(Yo(f).splice(Math.max(0,ci(c)+h),1,...S),h+=S.length-1,T){let $=0;for(let j=0;j<S.length;j++)$+=o(S[j],a,ci(c)+j+$,f)}p=!0},skip(){p=!0}},{type:w}=l,v=t["*"],k=t[w],_=typeof v=="function"?v:v?.enter,A=typeof k=="function"?k:k?.enter;if(_?.(m,n),A?.(m,n),!p)switch(w){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":i(l.body,l);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":o(l.min,l,"min"),o(l.max,l,"max");break;case"Quantifier":o(l.body,l,"body");break;case"Regex":i(l.body,l),o(l.flags,l,"flags");break;default:throw new Error(`Unexpected node type "${w}"`)}return k?.exit?.(m,n),v?.exit?.(m,n),h}return o(e),e}function Yo(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function ci(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const AS=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function TS(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function PS(e,t,n,i){return e.slice(0,t)+i+e.slice(t+n.length)}const sn=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Zc(e,t,n,i){const o=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),l=[!1];let a=0,c="";for(const f of e.matchAll(o)){const{0:h,groups:{$skip:p}}=f;if(!p&&(!i||i===sn.DEFAULT==!a)){n instanceof Function?c+=n(f,{context:a?sn.CHAR_CLASS:sn.DEFAULT,negated:l[l.length-1]}):c+=n;continue}h[0]==="["?(a++,l.push(h[1]==="^")):h==="]"&&a&&(a--,l.pop()),c+=h}return c}function Jg(e,t,n,i){Zc(e,t,n,i)}function LS(e,t,n=0,i){if(!new RegExp(t,"su").test(e))return null;const o=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");o.lastIndex=n;let l=0,a;for(;a=o.exec(e);){const{0:c,groups:{$skip:f}}=a;if(!f&&(!i||i===sn.DEFAULT==!l))return a;c==="["?l++:c==="]"&&l&&l--,o.lastIndex==a.index&&o.lastIndex++}return null}function Jo(e,t,n){return!!LS(e,t,0,n)}function RS(e,t){const n=/\\?./gsu;n.lastIndex=t;let i=e.length,o=0,l=1,a;for(;a=n.exec(e);){const[c]=a;if(c==="[")o++;else if(o)c==="]"&&o--;else if(c==="(")l++;else if(c===")"&&(l--,!l)){i=a.index;break}}return e.slice(t,i)}const Qp=new RegExp(String.raw`(?<noncapturingStart>${AS})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function OS(e,t){const n=t?.hiddenCaptures??[];let i=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};const o="(?>",l="(?:(?=(",a=[0],c=[];let f=0,h=0,p=NaN,m;do{m=!1;let w=0,v=0,k=!1,_;for(Qp.lastIndex=Number.isNaN(p)?0:p+l.length;_=Qp.exec(e);){const{0:A,index:S,groups:{capturingStart:b,noncapturingStart:T}}=_;if(A==="[")w++;else if(w)A==="]"&&w--;else if(A===o&&!k)p=S,k=!0;else if(k&&T)v++;else if(b)k?v++:(f++,a.push(f+h));else if(A===")"&&k){if(!v){h++;const $=f+h;if(e=`${e.slice(0,p)}${l}${e.slice(p+o.length,S)}))<$$${$}>)${e.slice(S+1)}`,m=!0,c.push($),TS(n,$),i.size){const j=new Map;i.forEach((P,H)=>{j.set(H>=$?H+1:H,P.map(ie=>ie>=$?ie+1:ie))}),i=j}break}v--}}}while(m);return n.push(...c),e=Zc(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:w,groups:{backrefNum:v,wrappedBackrefNum:k}})=>{if(v){const _=+v;if(_>a.length-1)throw new Error(`Backref "${w}" greater than number of captures`);return`\\${a[_]}`}return`\\${k}`},sn.DEFAULT),{pattern:e,captureTransfers:i,hiddenCaptures:n}}const Zg=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,$u=new RegExp(String.raw`
54
- \\(?: \d+
55
- | c[A-Za-z]
56
- | [gk]<[^>]+>
57
- | [pPu]\{[^\}]+\}
58
- | u[A-Fa-f\d]{4}
59
- | x[A-Fa-f\d]{2}
60
- )
61
- | \((?: \? (?: [:=!>]
62
- | <(?:[=!]|[^>]+>)
63
- | [A-Za-z\-]+:
64
- | \(DEFINE\)
65
- ))?
66
- | (?<qBase>${Zg})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
67
- | \\?.
68
- `.replace(/\s+/g,""),"gsu");function MS(e){if(!new RegExp(`${Zg}\\+`).test(e))return{pattern:e};const t=[];let n=null,i=null,o="",l=0,a;for($u.lastIndex=0;a=$u.exec(e);){const{0:c,index:f,groups:{qBase:h,qMod:p,invalidQ:m}}=a;if(c==="[")l||(i=f),l++;else if(c==="]")l?l--:i=null;else if(!l)if(p==="+"&&o&&!o.startsWith("(")){if(m)throw new Error(`Invalid quantifier "${c}"`);let w=-1;if(/^\{\d+\}$/.test(h))e=PS(e,f+h.length,p,"");else{if(o===")"||o==="]"){const v=o===")"?n:i;if(v===null)throw new Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,v)}(?>${e.slice(v,f)}${h})${e.slice(f+c.length)}`}else e=`${e.slice(0,f-o.length)}(?>${o}${h})${e.slice(f+c.length)}`;w+=4}$u.lastIndex+=w}else c[0]==="("?t.push(f):c===")"&&(n=t.length?t.pop():null);o=c}return{pattern:e}}const rn=String.raw,jS=rn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Nc=rn`\(\?R=(?<rDepth>[^\)]+)\)|${jS}`,Pl=rn`\(\?<(?![=!])(?<captureName>[^>]+)>`,ey=rn`${Pl}|(?<unnamed>\()(?!\?)`,br=new RegExp(rn`${Pl}|${Nc}|\(\?|\\?.`,"gsu"),Bu="Cannot use multiple overlapping recursions";function DS(e,t){const{hiddenCaptures:n,mode:i}={hiddenCaptures:[],mode:"plugin",...t};let o=t?.captureTransfers??new Map;if(!new RegExp(Nc,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:n};if(i==="plugin"&&Jo(e,rn`\(\?\(DEFINE\)`,sn.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const l=[],a=Jo(e,rn`\\[1-9]`,sn.DEFAULT),c=new Map,f=[];let h=!1,p=0,m=0,w;for(br.lastIndex=0;w=br.exec(e);){const{0:v,groups:{captureName:k,rDepth:_,gRNameOrNum:A,gRDepth:S}}=w;if(v==="[")p++;else if(p)v==="]"&&p--;else if(_){if(Xp(_),h)throw new Error(Bu);if(a)throw new Error(`${i==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const b=e.slice(0,w.index),T=e.slice(br.lastIndex);if(Jo(T,Nc,sn.DEFAULT))throw new Error(Bu);const $=+_-1;e=Yp(b,T,$,!1,n,l,m),o=Zp(o,b,$,l.length,0,m);break}else if(A){Xp(S);let b=!1;for(const ne of f)if(ne.name===A||ne.num===+A){if(b=!0,ne.hasRecursedWithin)throw new Error(Bu);break}if(!b)throw new Error(rn`Recursive \g cannot be used outside the referenced group "${i==="external"?A:rn`\g<${A}&R=${S}>`}"`);const T=c.get(A),$=RS(e,T);if(a&&Jo($,rn`${Pl}|\((?!\?)`,sn.DEFAULT))throw new Error(`${i==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const j=e.slice(T,w.index),P=$.slice(j.length+v.length),H=l.length,ie=+S-1,ue=Yp(j,P,ie,!0,n,l,m);o=Zp(o,j,ie,l.length-H,H,m);const R=e.slice(0,T),X=e.slice(T+$.length);e=`${R}${ue}${X}`,br.lastIndex+=ue.length-v.length-j.length-P.length,f.forEach(ne=>ne.hasRecursedWithin=!0),h=!0}else if(k)m++,c.set(String(m),br.lastIndex),c.set(k,br.lastIndex),f.push({num:m,name:k});else if(v[0]==="("){const b=v==="(";b&&(m++,c.set(String(m),br.lastIndex)),f.push(b?{num:m}:{})}else v===")"&&f.pop()}return n.push(...l),{pattern:e,captureTransfers:o,hiddenCaptures:n}}function Xp(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 Yp(e,t,n,i,o,l,a){const c=new Set;i&&Jg(e+t,Pl,({groups:{captureName:h}})=>{c.add(h)},sn.DEFAULT);const f=[n,i?c:null,o,l,a];return`${e}${Jp(`(?:${e}`,"forward",...f)}(?:)${Jp(`${t})`,"backward",...f)}${t}`}function Jp(e,t,n,i,o,l,a){const f=p=>t==="forward"?p+2:n-p+2-1;let h="";for(let p=0;p<n;p++){const m=f(p);h+=Zc(e,rn`${ey}|\\k<(?<backref>[^>]+)>`,({0:w,groups:{captureName:v,unnamed:k,backref:_}})=>{if(_&&i&&!i.has(_))return w;const A=`_$${m}`;if(k||v){const S=a+l.length+1;return l.push(S),FS(o,S),k?w:`(?<${v}${A}>`}return rn`\k<${_}${A}>`},sn.DEFAULT)}return h}function FS(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Zp(e,t,n,i,o,l){if(e.size&&i){let a=0;Jg(t,ey,()=>a++,sn.DEFAULT);const c=l-a+o,f=new Map;return e.forEach((h,p)=>{const m=(i-a*n)/n,w=a*n,v=p>c+a?p+i:p,k=[];for(const _ of h)if(_<=c)k.push(_);else if(_>c+a+m)k.push(_+i);else if(_<=c+a)for(let A=0;A<=n;A++)k.push(_+a*A);else for(let A=0;A<=n;A++)k.push(_+w+m*A);f.set(v,k)}),f}return e}var ct=String.fromCodePoint,be=String.raw,mn={},Ll=globalThis.RegExp;mn.flagGroups=(()=>{try{new Ll("(?i:)")}catch{return!1}return!0})();mn.unicodeSets=(()=>{try{new Ll("[[]]","v")}catch{return!1}return!0})();mn.bugFlagVLiteralHyphenIsRange=mn.unicodeSets?(()=>{try{new Ll(be`[\d\-a]`,"v")}catch{return!0}return!1})():!1;mn.bugNestedClassIgnoresNegation=mn.unicodeSets&&new Ll("[[^a]]","v").test("a");function xl(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Es(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Ac(e,t){return em[e]>=em[t]}function zS(e,t){if(e==null)throw new Error(t??"Value expected");return e}var em={ES2025:2025,ES2024:2024,ES2018:2018},$S={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function ty(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!$S[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=mn.flagGroups?"ES2025":mn.unicodeSets?"ES2024":"ES2018"),t}var BS="[ -\r ]",US=new Set([ct(304),ct(305)]),jn=be`[\p{L}\p{M}\p{N}\p{Pc}]`;function ny(e){if(US.has(e))return[e];const t=new Set,n=e.toLowerCase(),i=n.toUpperCase(),o=WS.get(n),l=GS.get(n),a=VS.get(n);return[...i].length===1&&t.add(i),a&&t.add(a),o&&t.add(o),t.add(n),l&&t.add(l),[...t]}var ef=new Map(`C Other
69
- Cc Control cntrl
70
- Cf Format
71
- Cn Unassigned
72
- Co Private_Use
73
- Cs Surrogate
74
- L Letter
75
- LC Cased_Letter
76
- Ll Lowercase_Letter
77
- Lm Modifier_Letter
78
- Lo Other_Letter
79
- Lt Titlecase_Letter
80
- Lu Uppercase_Letter
81
- M Mark Combining_Mark
82
- Mc Spacing_Mark
83
- Me Enclosing_Mark
84
- Mn Nonspacing_Mark
85
- N Number
86
- Nd Decimal_Number digit
87
- Nl Letter_Number
88
- No Other_Number
89
- P Punctuation punct
90
- Pc Connector_Punctuation
91
- Pd Dash_Punctuation
92
- Pe Close_Punctuation
93
- Pf Final_Punctuation
94
- Pi Initial_Punctuation
95
- Po Other_Punctuation
96
- Ps Open_Punctuation
97
- S Symbol
98
- Sc Currency_Symbol
99
- Sk Modifier_Symbol
100
- Sm Math_Symbol
101
- So Other_Symbol
102
- Z Separator
103
- Zl Line_Separator
104
- Zp Paragraph_Separator
105
- Zs Space_Separator
106
- ASCII
107
- ASCII_Hex_Digit AHex
108
- Alphabetic Alpha
109
- Any
110
- Assigned
111
- Bidi_Control Bidi_C
112
- Bidi_Mirrored Bidi_M
113
- Case_Ignorable CI
114
- Cased
115
- Changes_When_Casefolded CWCF
116
- Changes_When_Casemapped CWCM
117
- Changes_When_Lowercased CWL
118
- Changes_When_NFKC_Casefolded CWKCF
119
- Changes_When_Titlecased CWT
120
- Changes_When_Uppercased CWU
121
- Dash
122
- Default_Ignorable_Code_Point DI
123
- Deprecated Dep
124
- Diacritic Dia
125
- Emoji
126
- Emoji_Component EComp
127
- Emoji_Modifier EMod
128
- Emoji_Modifier_Base EBase
129
- Emoji_Presentation EPres
130
- Extended_Pictographic ExtPict
131
- Extender Ext
132
- Grapheme_Base Gr_Base
133
- Grapheme_Extend Gr_Ext
134
- Hex_Digit Hex
135
- IDS_Binary_Operator IDSB
136
- IDS_Trinary_Operator IDST
137
- ID_Continue IDC
138
- ID_Start IDS
139
- Ideographic Ideo
140
- Join_Control Join_C
141
- Logical_Order_Exception LOE
142
- Lowercase Lower
143
- Math
144
- Noncharacter_Code_Point NChar
145
- Pattern_Syntax Pat_Syn
146
- Pattern_White_Space Pat_WS
147
- Quotation_Mark QMark
148
- Radical
149
- Regional_Indicator RI
150
- Sentence_Terminal STerm
151
- Soft_Dotted SD
152
- Terminal_Punctuation Term
153
- Unified_Ideograph UIdeo
154
- Uppercase Upper
155
- Variation_Selector VS
156
- White_Space space
157
- XID_Continue XIDC
158
- XID_Start XIDS`.split(/\s/).map(e=>[Tl(e),e])),GS=new Map([["s",ct(383)],[ct(383),"s"]]),VS=new Map([[ct(223),ct(7838)],[ct(107),ct(8490)],[ct(229),ct(8491)],[ct(969),ct(8486)]]),WS=new Map([lr(453),lr(456),lr(459),lr(498),...Uu(8072,8079),...Uu(8088,8095),...Uu(8104,8111),lr(8124),lr(8140),lr(8188)]),HS=new Map([["alnum",be`[\p{Alpha}\p{Nd}]`],["alpha",be`\p{Alpha}`],["ascii",be`\p{ASCII}`],["blank",be`[\p{Zs}\t]`],["cntrl",be`\p{Cc}`],["digit",be`\p{Nd}`],["graph",be`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",be`\p{Lower}`],["print",be`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",be`[\p{P}\p{S}]`],["space",be`\p{space}`],["upper",be`\p{Upper}`],["word",be`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",be`\p{AHex}`]]);function qS(e,t){const n=[];for(let i=e;i<=t;i++)n.push(i);return n}function lr(e){const t=ct(e);return[t.toLowerCase(),t]}function Uu(e,t){return qS(e,t).map(n=>lr(n))}var ry=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function KS(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};iy(e);const i={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Ac(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};ys(e,QS,i);const o={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},l={currentFlags:o,prevFlags:null,globalFlags:o,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:i.subroutineRefMap};ys(e,XS,l);const a={groupsByName:l.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:l.reffedNodesByReferencer};return ys(e,YS,a),e._originMap=l.groupOriginByCopy,e._strategy=i.strategy,e}var QS={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:i,kind:o}=e;if(o==="repeater"){const l=pn();l.body[0].body.push(Tr({negate:!0,body:i}),pi("Any"));const a=pn();a.body[0].body.push(Qg("greedy",0,1/0,l)),n(it(a,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:i}){const o=e.body.filter(l=>l.kind==="flags");for(let l=n+1;l<t.body.length;l++){const a=t.body[l];Es(i,a,[]).push(...o)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const n=oy(t.get(e));if(n){const i=pn({flags:n});i.body[0].body=e.body,e.body=[it(i,e)]}}}},Assertion({node:e,parent:t,key:n,container:i,root:o,remove:l,replaceWith:a},c){const{kind:f,negate:h}=e,{asciiWordBoundaries:p,avoidSubclass:m,supportedGNodes:w,wordIsAscii:v}=c;if(f==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${h?"Y":"y"}"`);if(f==="line_end")a(it(Tr({body:[Mr({body:[Ec("string_end")]}),Mr({body:[Al(10)]})]}),t));else if(f==="line_start")a(it(Dn(be`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(f==="search_start")if(w.has(e))o.flags.sticky=!0,l();else{const k=i[n-1];if(k&&rC(k))a(it(Tr({negate:!0}),t));else{if(m)throw new Error(be`Uses "\G" in a way that requires a subclass`);a(ar(Ec("string_start"),t)),c.strategy="clip_search"}}else if(!(f==="string_end"||f==="string_start"))if(f==="string_end_newline")a(it(Dn(be`(?=\n?\z)`),t));else if(f==="word_boundary"){if(!v&&!p){const k=`(?:(?<=${jn})(?!${jn})|(?<!${jn})(?=${jn}))`,_=`(?:(?<=${jn})(?=${jn})|(?<!${jn})(?!${jn}))`;a(it(Dn(h?_:k),t))}}else throw new Error(`Unexpected assertion kind "${f}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Vu(n)&&(n=Gu(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:i}=e;i&&!Vu(i)&&(i=Gu(i,t),e.name=i),n.set(e.number,e),i&&n.set(i,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const i=ll({body:[e]});n(it(i,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:i,minTargetEs2024:o,digitIsAscii:l,spaceIsAscii:a,wordIsAscii:c}){const{kind:f,negate:h,value:p}=e;if(l&&(f==="digit"||p==="digit")){n(ar(Ic("digit",{negate:h}),t));return}if(a&&(f==="space"||p==="space")){n(it(Wu(Dn(BS),h),t));return}if(c&&(f==="word"||p==="word")){n(ar(Ic("word",{negate:h}),t));return}if(f==="any")n(ar(pi("Any"),t));else if(f==="digit")n(ar(pi("Nd",{negate:h}),t));else if(f!=="dot")if(f==="text_segment"){if(i==="strict")throw new Error(be`Use of "\X" requires non-strict accuracy`);const m="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",w=be`\p{RI}{2}|${m}(?:\u200D${m})*`;n(it(Dn(be`(?>\r\n|${o?be`\p{RGI_Emoji}`:w}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(f==="hex")n(ar(pi("AHex",{negate:h}),t));else if(f==="newline")n(it(Dn(h?`[^
159
- ]`:`(?>\r
160
- ?|[
161
- \v\f…\u2028\u2029])`),t));else if(f==="posix")if(!o&&(p==="graph"||p==="print")){if(i==="strict")throw new Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let m={graph:"!-~",print:" -~"}[p];h&&(m=`\0-${ct(m.codePointAt(0)-1)}${ct(m.codePointAt(2)+1)}-􏿿`),n(it(Dn(`[${m}]`),t))}else n(it(Wu(Dn(HS.get(p)),h),t));else if(f==="property")ef.has(Tl(p))||(e.key="sc");else if(f==="space")n(ar(pi("space",{negate:h}),t));else if(f==="word")n(it(Wu(Dn(jn),h),t));else throw new Error(`Unexpected character set kind "${f}"`)},Directive({node:e,parent:t,root:n,remove:i,replaceWith:o,removeAllPrevSiblings:l,removeAllNextSiblings:a}){const{kind:c,flags:f}=e;if(c==="flags")if(!f.enable&&!f.disable)i();else{const h=pn({flags:f});h.body[0].body=a(),o(it(h,t),{traverse:!0})}else if(c==="keep"){const h=n.body[0],m=n.body.length===1&&Hg(h,{type:"Group"})&&h.body[0].body.length===1?h.body[0]:n;if(t.parent!==m||m.body.length>1)throw new Error(be`Uses "\K" in a way that's unsupported`);const w=Tr({behind:!0});w.body[0].body=l(),o(it(w,t))}else throw new Error(`Unexpected directive kind "${c}"`)},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(n=>delete e[n]),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:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:i}=e;if(i==="fail")n(it(Tr({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${i.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=pn();t.body[0].body.push(e.body),e.body=it(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let i=!1,o=!1;for(const l of e.body)if(l.body.length===1&&l.body[0].kind==="search_start")l.body.pop();else{const a=ay(l.body);a?(i=!0,Array.isArray(a)?n.push(...a):n.push(a)):o=!0}i&&!o&&n.forEach(l=>t.add(l))},exit(e,{accuracy:t,passedLookbehind:n,strategy:i}){if(t==="strict"&&n&&i)throw new Error(be`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Vu(n)&&(n=Gu(n,t),e.ref=n)}},XS={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:i,ref:o}=e;i||n.set(e,[...t.get(o).map(({node:l})=>l)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:i},{groupOriginByCopy:o,groupsByName:l,multiplexCapturesToLeftByRef:a,openRefs:c,reffedNodesByReferencer:f}){const h=o.get(e);if(h&&c.has(e.number)){const m=ar(tm(e.number),t);f.set(m,c.get(e.number)),n(m);return}c.set(e.number,e),a.set(e.number,[]),e.name&&Es(a,e.name,[]);const p=a.get(e.name??e.number);for(let m=0;m<p.length;m++){const w=p[m];if(h===w.node||h&&h===w.origin||e===w.origin){p.splice(m,1);break}}if(a.get(e.number).push({node:e,origin:h}),e.name&&a.get(e.name).push({node:e,origin:h}),e.name){const m=Es(l,e.name,new Map);let w=!1;if(h)w=!0;else for(const v of m.values())if(!v.hasDuplicateNameToRemove){w=!0;break}l.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:w})}},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=xl(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},i){const{isRecursive:o,ref:l}=e;if(o){let p=t;for(;(p=p.parent)&&!(p.type==="CapturingGroup"&&(p.name===l||p.number===l)););i.reffedNodesByReferencer.set(e,p);return}const a=i.subroutineRefMap.get(l),c=l===0,f=c?tm(0):sy(a,i.groupOriginByCopy,null);let h=f;if(!c){const p=oy(eC(a,w=>w.type==="Group"&&!!w.flags)),m=p?xl(i.globalFlags,p):i.globalFlags;JS(m,i.currentFlags)||(h=pn({flags:tC(m)}),h.body[0].body.push(f))}n(it(h,t),{traverse:!c})}},YS={Backreference({node:e,parent:t,replaceWith:n},i){if(e.orphan){i.highestOrphanBackref=Math.max(i.highestOrphanBackref,e.ref);return}const l=i.reffedNodesByReferencer.get(e).filter(a=>ZS(a,e));if(!l.length)n(it(Tr({negate:!0}),t));else if(l.length>1){const a=pn({atomic:!0,body:l.reverse().map(c=>Mr({body:[bc(c.number)]}))});n(it(a,t))}else e.ref=l[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 n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let i=0;i<n;i++){const o=Kg();e.body.at(-1).body.push(o)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function iy(e){ys(e,{"*"({node:t,parent:n}){t.parent=n}})}function JS(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function ZS(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const i=ly(n.parent);for(const o of i){if(o===n)break;if(o===e||uy(o,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function sy(e,t,n,i){const o=Array.isArray(e)?[]:{};for(const[l,a]of Object.entries(e))l==="parent"?o.parent=Array.isArray(n)?i:n:a&&typeof a=="object"?o[l]=sy(a,t,o,n):(l==="type"&&a==="CapturingGroup"&&t.set(o,t.get(e)??e),o[l]=a);return o}function tm(e){const t=Xg(e);return t.isRecursive=!0,t}function eC(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Gu(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function oy(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:i})=>{t.forEach(o=>{i.enable?.[o]&&(delete n.disable[o],n.enable[o]=!0),i.disable?.[o]&&(n.disable[o]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function tC({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function ly(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function ay(e){const t=e.find(n=>n.kind==="search_start"||iC(n,{negate:!1})||!nC(n));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 n=[];for(const i of t.body){const o=ay(i.body);if(!o)return null;Array.isArray(o)?n.push(...o):n.push(o)}return n}return null}function uy(e,t){const n=ly(e)??[];for(const i of n)if(i===t||uy(i,t))return!0;return!1}function nC({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function rC(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function iC(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&Hg(e.body[0],{type:"Assertion",kind:"search_start"})}function Vu(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Dn(e,t){const i=qg(e,{...t,unicodePropertyMap:ef}).body;return i.length>1||i[0].body.length>1?pn({body:i}):i[0].body[0]}function Wu(e,t){return e.negate=t,e}function ar(e,t){return e.parent=t,e}function it(e,t){return iy(e),e.parent=t,e}function sC(e,t){const n=ty(t),i=Ac(n.target,"ES2024"),o=Ac(n.target,"ES2025"),l=n.rules.recursionLimit;if(!Number.isInteger(l)||l<2||l>20)throw new Error("Invalid recursionLimit; use 2-20");let a=null,c=null;if(!o){const v=[e.flags.ignoreCase];ys(e,oC,{getCurrentModI:()=>v.at(-1),popModI(){v.pop()},pushModI(k){v.push(k)},setHasCasedChar(){v.at(-1)?a=!0:c=!0}})}const f={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!c)};let h=e;const p={accuracy:n.accuracy,appliedGlobalFlags:f,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:h,originMap:e._originMap,recursionLimit:l,useAppliedIgnoreCase:!!(!o&&a&&c),useFlagMods:o,useFlagV:i,verbose:n.verbose};function m(v){return p.lastNode=h,h=v,zS(lC[v.type],`Unexpected node type "${v.type}"`)(v,p,m)}const w={pattern:e.body.map(m).join("|"),flags:m(e.flags),options:{...e.options}};return i||(delete w.options.force.v,w.options.disable.v=!0,w.options.unicodeSetsPlugin=null),w._captureTransfers=new Map,w._hiddenCaptures=[],p.captureMap.forEach((v,k)=>{v.hidden&&w._hiddenCaptures.push(k),v.transferTo&&Es(w._captureTransfers,v.transferTo,[]).push(k)}),w}var oC={"*":{enter({node:e},t){if(rm(e)){const n=t.getCurrentModI();t.pushModI(e.flags?xl({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){rm(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){tf(ct(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),cy(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&ry.has(e.value)&&t.setHasCasedChar()}},lC={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?be`\B`:be`\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,n){const{body:i,name:o,number:l}=e,a={ignoreCase:t.currentFlags.ignoreCase},c=t.originMap.get(e);return c&&(a.hidden=!0,l>c.number&&(a.transferTo=c.number)),t.captureMap.set(l,a),`(${o?`?<${o}>`:""}${i.map(n).join("|")})`},Character({value:e},t){const n=ct(e),i=fi(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(i!==n)return i;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&tf(n)){const o=ny(n);return t.inCharClass?o.join(""):o.length>1?`[${o.join("")}]`:o[0]}return n},CharacterClass(e,t,n){const{kind:i,negate:o,parent:l}=e;let{body:a}=e;if(i==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");mn.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(im)&&(a=[Al(45),...a.filter(h=>!im(h))]);const c=()=>`[${o?"^":""}${a.map(n).join(i==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||mn.bugNestedClassIgnoresNegation)&&!o){const p=a.filter(m=>m.type==="CharacterClass"&&m.kind==="union"&&m.negate);if(p.length){const m=pn(),w=m.body[0];return m.parent=l,w.parent=m,a=a.filter(v=>!p.includes(v)),e.body=a,a.length?(e.parent=w,w.body.push(e)):m.body.pop(),p.forEach(v=>{const k=Mr({body:[v]});v.parent=k,k.parent=m,m.body.push(k)}),n(m)}}t.inCharClass=!0;const h=c();return t.inCharClass=!1,h}const f=a[0];if(i==="union"&&!o&&f&&((!t.useFlagV||!t.verbose)&&l.kind==="union"&&!(mn.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&l.kind==="intersection"&&a.length===1&&f.type!=="CharacterClassRange"))return a.map(n).join("");if(!t.useFlagV&&l.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return c()},CharacterClassRange(e,t){const n=e.min.value,i=e.max.value,o={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},l=fi(n,o),a=fi(i,o),c=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const f=cy(e);dC(f).forEach(p=>{c.add(Array.isArray(p)?`${fi(p[0],o)}-${fi(p[1],o)}`:fi(p,o))})}return`${l}-${a}${[...c].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:i},o){if(e==="dot")return o.currentFlags.dotAll?o.appliedGlobalFlags.dotAll||o.useFlagMods?".":"[^]":be`[^\n]`;if(e==="digit")return t?be`\D`:be`\d`;if(e==="property"){if(o.useAppliedIgnoreCase&&o.currentFlags.ignoreCase&&ry.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?be`\P`:be`\p`}{${i?`${i}=`:""}${n}}`}if(e==="word")return t?be`\W`:be`\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:n,parent:i},o,l){const a=o.currentFlags;n&&(o.currentFlags=xl(a,n));const c=t.map(l).join("|"),f=!o.verbose&&t.length===1&&i.type!=="Quantifier"&&!e&&(!o.useFlagMods||!n)?c:`(?${hC(e,n,o.useFlagMods)}${c})`;return o.currentFlags=a,f},LookaroundAssertion({body:e,kind:t,negate:n},i,o){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(o).join("|")})`},Quantifier(e,t,n){return n(e.body)+pC(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const i=n.recursionLimit;return t===0?`(?R=${i})`:be`\g<${t}&R=${i}>`}},aC=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),uC=new Set(["-","\\","]","^","["]),cC=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),nm=new Map([[9,be`\t`],[10,be`\n`],[11,be`\v`],[12,be`\f`],[13,be`\r`],[8232,be`\u2028`],[8233,be`\u2029`],[65279,be`\uFEFF`]]),fC=new RegExp("^\\p{Cased}$","u");function tf(e){return fC.test(e)}function cy(e,t){const n=!!t?.firstOnly,i=e.min.value,o=e.max.value,l=[];if(i<65&&(o===65535||o>=131071)||i===65536&&o>=131071)return l;for(let a=i;a<=o;a++){const c=ct(a);if(!tf(c))continue;const f=ny(c).filter(h=>{const p=h.codePointAt(0);return p<i||p>o});if(f.length&&(l.push(...f),n))break}return l}function fi(e,{escDigit:t,inCharClass:n,useFlagV:i}){if(nm.has(e))return nm.get(e);if(e<32||e>126&&e<160||e>262143||t&&mC(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const o=n?i?cC:uC:aC,l=ct(e);return(o.has(l)?"\\":"")+l}function dC(e){const t=e.map(o=>o.codePointAt(0)).sort((o,l)=>o-l),n=[];let i=null;for(let o=0;o<t.length;o++)t[o+1]===t[o]+1?i??=t[o]:i===null?n.push(t[o]):(n.push([i,t[o]]),i=null);return n}function hC(e,t,n){if(e)return">";let i="";if(t&&n){const{enable:o,disable:l}=t;i=(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")+(l?"-":"")+(l?.ignoreCase?"i":"")+(l?.dotAll?"s":"")}return`${i}:`}function pC({kind:e,max:t,min:n}){let i;return!n&&t===1?i="?":!n&&t===1/0?i="*":n===1&&t===1/0?i="+":n===t?i=`{${n}}`:i=`{${n},${t===1/0?"":t}}`,i+{greedy:"",lazy:"?",possessive:"+"}[e]}function rm({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function mC(e){return e>47&&e<58}function im({type:e,value:t}){return e==="Character"&&t===45}var gC=class Tc extends RegExp{#t=new Map;#e=null;#r;#n=null;#i=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(t,n,i){const o=!!i?.lazyCompile;if(t instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const l=t;super(l,n),this.#r=l.source,l instanceof Tc&&(this.#t=l.#t,this.#n=l.#n,this.#i=l.#i,this.rawOptions=l.rawOptions)}else{const l={hiddenCaptures:[],strategy:null,transfers:[],...i};super(o?"":t,n),this.#r=t,this.#t=wC(l.hiddenCaptures,l.transfers),this.#i=l.strategy,this.rawOptions=i??{}}o||(this.#e=this)}exec(t){if(!this.#e){const{lazyCompile:o,...l}=this.rawOptions;this.#e=new Tc(this.#r,this.flags,l)}const n=this.global||this.sticky,i=this.lastIndex;if(this.#i==="clip_search"&&n&&i){this.lastIndex=0;const o=this.#s(t.slice(i));return o&&(yC(o,i,t,this.hasIndices),this.lastIndex+=i),o}return this.#s(t)}#s(t){this.#e.lastIndex=this.lastIndex;const n=super.exec.call(this.#e,t);if(this.lastIndex=this.#e.lastIndex,!n||!this.#t.size)return n;const i=[...n];n.length=1;let o;this.hasIndices&&(o=[...n.indices],n.indices.length=1);const l=[0];for(let a=1;a<i.length;a++){const{hidden:c,transferTo:f}=this.#t.get(a)??{};if(c?l.push(null):(l.push(n.length),n.push(i[a]),this.hasIndices&&n.indices.push(o[a])),f&&i[a]!==void 0){const h=l[f];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(n[h]=i[a],this.hasIndices&&(n.indices[h]=o[a]),n.groups){this.#n||(this.#n=vC(this.source));const p=this.#n.get(f);p&&(n.groups[p]=i[a],this.hasIndices&&(n.indices.groups[p]=o[a]))}}}return n}};function yC(e,t,n,i){if(e.index+=t,e.input=n,i){const o=e.indices;for(let a=0;a<o.length;a++){const c=o[a];c&&(o[a]=[c[0]+t,c[1]+t])}const l=o.groups;l&&Object.keys(l).forEach(a=>{const c=l[a];c&&(l[a]=[c[0]+t,c[1]+t])})}}function wC(e,t){const n=new Map;for(const i of e)n.set(i,{hidden:!0});for(const[i,o]of t)for(const l of o)Es(n,l,{}).transferTo=i;return n}function vC(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let i=0,o=0,l;for(;l=t.exec(e);){const{0:a,groups:{capture:c,name:f}}=l;a==="["?i++:i?a==="]"&&i--:c&&(o++,f&&n.set(o,f))}return n}function kC(e,t){const n=xC(e,t);return n.options?new gC(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function xC(e,t){const n=ty(t),i=qg(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:ef}),o=KS(i,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),l=sC(o,n),a=DS(l.pattern,{captureTransfers:l._captureTransfers,hiddenCaptures:l._hiddenCaptures,mode:"external"}),c=MS(a.pattern),f=OS(c.pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),h={pattern:f.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${l.flags}${l.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const p=f.hiddenCaptures.sort((k,_)=>k-_),m=Array.from(f.captureTransfers),w=o._strategy,v=h.pattern.length>=n.lazyCompileLength;(p.length||m.length||w||v)&&(h.options={...p.length&&{hiddenCaptures:p},...m.length&&{transfers:m},...w&&{strategy:w},...v&&{lazyCompile:v}})}return h}const sm=4294967295;class SC{constructor(t,n={}){this.patterns=t,this.options=n;const{forgiving:i=!1,cache:o,regexConstructor:l}=n;if(!l)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(a=>{if(typeof a!="string")return a;const c=o?.get(a);if(c){if(c instanceof RegExp)return c;if(i)return null;throw c}try{const f=l(a);return o?.set(a,f),f}catch(f){if(o?.set(a,f),i)return null;throw f}})}regexps;findNextMatchSync(t,n,i){const o=typeof t=="string"?t:t.content,l=[];function a(c,f,h=0){return{index:c,captureIndices:f.indices.map(p=>p==null?{start:sm,end:sm,length:0}:{start:p[0]+h,end:p[1]+h,length:p[1]-p[0]})}}for(let c=0;c<this.regexps.length;c++){const f=this.regexps[c];if(f)try{f.lastIndex=n;const h=f.exec(o);if(!h)continue;if(h.index===n)return a(c,h,0);l.push([c,h,0])}catch(h){if(this.options.forgiving)continue;throw h}}if(l.length){const c=Math.min(...l.map(f=>f[1].index));for(const[f,h,p]of l)if(h.index===c)return a(f,h,p)}return null}}function CC(e,t){return kC(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function _C(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=n=>CC(n,{target:t.target}),{createScanner(n){return new SC(n,t)},createString(n){return{content:n}}}}const EC="github-light",fy={typescript:()=>Ne(()=>import("./typescript-BPQ3VLAy.js"),[]),tsx:()=>Ne(()=>import("./tsx-COt5Ahok.js"),[]),javascript:()=>Ne(()=>import("./javascript-wDzz0qaB.js"),[]),jsx:()=>Ne(()=>import("./jsx-g9-lgVsj.js"),[]),json:()=>Ne(()=>import("./json-Cp-IABpG.js"),[]),jsonc:()=>Ne(()=>import("./jsonc-Des-eS-w.js"),[]),json5:()=>Ne(()=>import("./json5-C9tS-k6U.js"),[]),css:()=>Ne(()=>import("./css-DPfMkruS.js"),[]),scss:()=>Ne(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([0,1])),less:()=>Ne(()=>import("./less-B1dDrJ26.js"),[]),html:()=>Ne(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([2,3,1])),vue:()=>Ne(()=>import("./vue-DVfSmUF7.js"),__vite__mapDeps([4,1,3,5,6,2])),svelte:()=>Ne(()=>import("./svelte-DZMnMd3x.js"),__vite__mapDeps([7,3,5,1])),markdown:()=>Ne(()=>import("./markdown-Cvjx9yec.js"),[]),mdx:()=>Ne(()=>import("./mdx-Cmh6b_Ma.js"),[]),yaml:()=>Ne(()=>import("./yaml-Buea-lGh.js"),[]),toml:()=>Ne(()=>import("./toml-vGWfd6FD.js"),[]),ini:()=>Ne(()=>import("./ini-BEwlwnbL.js"),[]),xml:()=>Ne(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([8,9])),shellscript:()=>Ne(()=>import("./shellscript-Yzrsuije.js"),[]),python:()=>Ne(()=>import("./python-B6aJPvgy.js"),[]),go:()=>Ne(()=>import("./go-CxLEBnE3.js"),[]),rust:()=>Ne(()=>import("./rust-B1yitclQ.js"),[]),java:()=>Ne(()=>import("./java-CylS5w8V.js"),[]),kotlin:()=>Ne(()=>import("./kotlin-BdnUsdx6.js"),[]),c:()=>Ne(()=>import("./c-BIGW1oBm.js"),[]),cpp:()=>Ne(()=>import("./cpp-BRuaLJcg.js"),__vite__mapDeps([10,11,12])),csharp:()=>Ne(()=>import("./csharp-COcwbKMJ.js"),[]),php:()=>Ne(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([13,2,3,1,8,9,12,6])),ruby:()=>Ne(()=>import("./ruby-BGX7qA9Y.js"),__vite__mapDeps([14,2,3,1,8,9,12,15,5,16,17,10,11,18,19,20])),sql:()=>Ne(()=>import("./sql-BLtJtn59.js"),[]),graphql:()=>Ne(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([15,3,5,16,17])),dockerfile:()=>Ne(()=>import("./dockerfile-BcOcwvcX.js"),[]),makefile:()=>Ne(()=>import("./makefile-CHLpvVh8.js"),[]),lua:()=>Ne(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([19,11])),swift:()=>Ne(()=>import("./swift-D82vCrfD.js"),[]),dart:()=>Ne(()=>import("./dart-CF10PKvl.js"),[]),diff:()=>Ne(()=>import("./diff-D97Zzqfu.js"),[]),dotenv:()=>Ne(()=>import("./dotenv-Da5cRb03.js"),[]),prisma:()=>Ne(()=>import("./prisma-Dd19v3D-.js"),[]),nginx:()=>Ne(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([21,19,11]))},bC={ts:"typescript",mts:"typescript",cts:"typescript",tsx:"tsx",js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"jsx",json:"json",jsonc:"jsonc",json5:"json5",css:"css",scss:"scss",less:"less",html:"html",htm:"html",vue:"vue",svelte:"svelte",md:"markdown",markdown:"markdown",mdx:"mdx",yml:"yaml",yaml:"yaml",toml:"toml",ini:"ini",cfg:"ini",conf:"ini",xml:"xml",svg:"xml",plist:"xml",sh:"shellscript",bash:"shellscript",zsh:"shellscript",py:"python",go:"go",rs:"rust",java:"java",kt:"kotlin",kts:"kotlin",c:"c",h:"c",cc:"cpp",cpp:"cpp",cxx:"cpp",hpp:"cpp",hh:"cpp",cs:"csharp",php:"php",rb:"ruby",sql:"sql",graphql:"graphql",gql:"graphql",lua:"lua",swift:"swift",dart:"dart",diff:"diff",patch:"diff",env:"dotenv",prisma:"prisma"},IC={dockerfile:"dockerfile",makefile:"makefile",gnumakefile:"makefile",".env":"dotenv","nginx.conf":"nginx",".bashrc":"shellscript",".zshrc":"shellscript",".prettierrc":"json",".eslintrc":"json",".babelrc":"json","tsconfig.json":"jsonc","jsconfig.json":"jsonc"};function NC(e){const t=(e.split("/").pop()??"").toLowerCase(),n=IC[t];if(n)return n;if(t.startsWith(".env."))return"dotenv";if(t.startsWith("dockerfile."))return"dockerfile";const i=t.lastIndexOf(".");if(i<0)return null;const o=bC[t.slice(i+1)];return o&&fy[o]?o:null}let Hu=null;function AC(){return Hu||(Hu=F1({themes:[Ne(()=>import("./github-light-DAi9KRSo.js"),[])],langs:[],engine:_C({forgiving:!0})})),Hu}const om=new Set,qu=new Map;async function TC(e,t){if(om.has(t))return!0;let n=qu.get(t);if(!n){const i=fy[t];if(!i)return!1;n=i().then(async o=>(await e.loadLanguage(...o.default),om.add(t),!0)).catch(()=>!1).finally(()=>qu.delete(t)),qu.set(t,n)}return n}async function PC(e,t){if(t.length===0)return[];const n=await AC();if(!await TC(n,e))return null;const i=t.join(`
162
- `),l=n.codeToTokensBase(i,{lang:e,theme:EC,includeExplanation:!1}).map(a=>a.map(c=>({content:c.content,color:c.color})));for(;l.length<t.length;)l.push([{content:t[l.length]??""}]);return l.slice(0,t.length)}const Zo=20;function el(e,t){return e.type==="context"||t==="new"?`new:${e.newLineNo??e.oldLineNo}`:`old:${e.oldLineNo}`}function lm({content:e,tokens:t}){return t?C.jsxs("span",{className:"code-text",children:[t.map((n,i)=>C.jsx("span",{style:n.color?{color:n.color}:void 0,children:n.content},i)),e===""&&"​"]}):C.jsx("span",{className:"code-text",children:e||"​"})}function LC(e,t){if(e.newLineNo!==void 0)return e.newLineNo;if(!t)return e.oldLineNo??1;const n=t.lines.indexOf(e);for(let i=n+1;i<t.lines.length;i++){const o=t.lines[i].newLineNo;if(o!==void 0)return o}for(let i=n-1;i>=0;i--){const o=t.lines[i].newLineNo;if(o!==void 0)return o}return t.newStart}function RC(e){switch(e.kind){case"hunk":case"gap":return 26;default:return 22}}function OC({diff:e}){const t=J(B=>B.prefs.viewMode),n=J(B=>B.targetKey),i=J(B=>B.comments),o=se.useMemo(()=>i.filter(B=>B.filePath===e.path),[i,e.path]),l=J(B=>B.updateComment),a=J(B=>B.setEditor),c=J(B=>B.focusComment),f=J(B=>B.editor),h=J(B=>B.focusedCommentId),p=J(B=>B.openInNvim),m=J(B=>B.showToast),w=J(B=>B.reattaching),v=J(B=>B.jumpTo),[k,_]=se.useState({}),[A,S]=se.useState(null),b=se.useRef(null),[T,$]=se.useState(null),j=se.useRef(null),P=se.useCallback(B=>{j.current=B,$(B)},[]),[H,ie]=se.useState(null),ue=se.useMemo(()=>Hk({diff:e,viewMode:t,expansions:k,fullLines:A}),[e,t,k,A]),R=se.useMemo(()=>{const B=new Map;for(const K of o){if(K.status==="orphaned")continue;const ye=`${K.side}:${K.endLine}`,_e=B.get(ye)??{count:0,active:!1,ids:[]};_e.count++,_e.ids.push(K.id),K.status==="active"&&(_e.active=!0),B.set(ye,_e)}return B},[o]),X=se.useMemo(()=>o.find(B=>B.id===h&&B.status!=="orphaned")??null,[o,h]),ne=f&&f.filePath===e.path?f:null,de=se.useMemo(()=>NC(e.path),[e.path]),te=se.useRef(new Map),[,Q]=se.useState(0);se.useEffect(()=>{if(!de)return;const B=te.current,K=new Map,ye=(Te,Xe,st)=>{if(B.has(Xe))return;let We=K.get(Te);We||(We={keys:[],lines:[]},K.set(Te,We)),!We.keys.includes(Xe)&&(We.keys.push(Xe),We.lines.push(st))},_e=(Te,Xe)=>{Te.type==="del"?ye(`${Xe}:old`,el(Te,"old"),Te.content):ye(`${Xe}:new`,el(Te,"new"),Te.content)};for(const Te of ue)Te.kind==="line"?_e(Te.line,Te.hunkIndex):Te.kind==="pair"&&(Te.left&&_e(Te.left,Te.hunkIndex),Te.right&&Te.right!==Te.left&&_e(Te.right,Te.hunkIndex));if(K.size===0)return;let De=!1;return(async()=>{let Te=!1;for(const Xe of K.values()){const st=await PC(de,Xe.lines);if(De||!st)return;Xe.keys.forEach((We,bn)=>{const fr=st[bn];fr&&B.set(We,fr)}),Te=!0}Te&&Q(Xe=>Xe+1)})().catch(()=>{}),()=>{De=!0}},[ue,de]);const pe=se.useRef(null),ge=Gk({count:ue.length,getScrollElement:()=>pe.current,estimateSize:B=>RC(ue[B]),overscan:12,getItemKey:B=>ue[B].key});se.useEffect(()=>{if(!v||v.file!==e.path)return;const B=qk(ue,v.side,v.line);if(B<0)return;ge.scrollToIndex(B,{align:"center"}),ie({side:v.side,line:v.line});const K=setTimeout(()=>ie(null),1600);return()=>clearTimeout(K)},[v]),se.useEffect(()=>{const B=K=>{if(K.ctrlKey||K.metaKey||K.altKey)return;const ye=K.target;if(ye&&(ye.tagName==="INPUT"&&ye.type!=="checkbox"||ye.tagName==="TEXTAREA"||ye.tagName==="SELECT"||ye.isContentEditable)||K.key!=="n"&&K.key!=="p")return;const _e=Kk(ue);if(!_e.length)return;const De=pe.current,Te=De?De.scrollTop:0,Xe=_e.map(We=>ge.getOffsetForIndex(We,"start")?.[0]??0);let st;if(K.key==="n")st=_e.find((We,bn)=>Xe[bn]>Te+4);else for(let We=_e.length-1;We>=0;We--)if(Xe[We]<Te-4){st=_e[We];break}st!==void 0&&(K.preventDefault(),ge.scrollToIndex(st,{align:"start"}))};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[ue,ge]),se.useEffect(()=>{const B=()=>{const K=j.current;if(!K)return;P(null);const ye=Math.min(K.anchor,K.head),_e=Math.max(K.anchor,K.head),De=J.getState().reattaching;De?l(De,{side:K.side,startLine:ye,endLine:_e}):a({filePath:e.path,side:K.side,startLine:ye,endLine:_e})};return window.addEventListener("mouseup",B),()=>window.removeEventListener("mouseup",B)},[P,l,a,e.path]);const ee=(B,K,ye,_e)=>{B.button===0&&(B.preventDefault(),B.stopPropagation(),P({side:K,hunkIndex:ye,anchor:_e,head:_e}))},ce=(B,K,ye)=>{const _e=j.current;!_e||_e.side!==B||_e.hunkIndex!==K||_e.head===ye||P({..._e,head:ye})},E=(B,K)=>!T||K===void 0||T.side!==B?!1:K>=Math.min(T.anchor,T.head)&&K<=Math.max(T.anchor,T.head),M=(B,K)=>!!H&&H.side===B&&H.line===K,G=(B,K,ye)=>!!B&&ye!==void 0&&B.side===K&&ye>=B.startLine&&ye<=B.endLine,N=(B,K)=>[E(B,K)||G(ne,B,K)?"selected":"",G(X,B,K)?"focused":"",M(B,K)?"flash":""].join(" "),we=(B,K)=>{if(K===void 0)return null;const ye=R.get(`${B}:${K}`);return ye?C.jsxs(C.Fragment,{children:[C.jsx("button",{className:`pill ${ye.active?"":"muted"}`,title:"查看评论",onClick:()=>{c(ye.ids[0]??null,!1)},children:ye.count}),C.jsx("span",{className:`pin ${ye.active?"":"muted"}`})]}):null},Ie=se.useCallback(async()=>A||(b.current||(b.current=et.fullFile(n,e.path,"new").then(B=>{if(B.content===null)return null;const K=B.content.split(`
163
- `);return K.length&&K[K.length-1]===""&&K.pop(),S(K),K}).catch(B=>(m(B instanceof Error?B.message:String(B),"error"),null)).finally(()=>{b.current=null})),b.current),[A,n,e.path,m]),me=async(B,K)=>{if(!await Ie()){m("无法读取完整文件内容","error");return}_(_e=>{const De=_e[B.index]??{top:0,bottom:0,all:!1},Te=K==="all"?{...De,all:!0}:K==="top"?{...De,top:De.top+Zo}:{...De,bottom:De.bottom+Zo};return{..._e,[B.index]:Te}})},Oe=(B,K)=>{const ye=e.hunks[K];p(e.path,LC(B,ye))},Ae=B=>{const{gap:K,hidden:ye}=B,_e=K.index===0,De=K.index===e.hunks.length;return C.jsxs("div",{className:"row gap-row",children:[!_e&&C.jsxs("button",{className:"link",onClick:()=>{me(K,"top")},title:"展开紧接上一个 hunk 之后的 20 行",children:["↑ 展开上方 ",Zo," 行"]}),C.jsxs("button",{className:"link",onClick:()=>{me(K,"all")},children:["展开全部",ye!==null?` (${ye} 行)`:""]}),!De&&C.jsxs("button",{className:"link",onClick:()=>{me(K,"bottom")},title:"展开紧接下一个 hunk 之前的 20 行",children:["↓ 展开下方 ",Zo," 行"]})]})},je=B=>{const K=B.line,ye=K.type==="del"?"old":"new",_e=ye==="old"?K.oldLineNo:K.newLineNo,De=te.current.get(el(K,ye));return C.jsxs("div",{className:`row line ${K.type} ${N(ye,_e)} ${B.expanded?"expanded":""}`,onMouseEnter:()=>_e!==void 0&&ce(ye,B.hunkIndex,_e),children:[C.jsx("span",{className:"gut",onClick:()=>Oe(K,B.hunkIndex),title:"在 nvim 中打开此行",children:K.oldLineNo??""}),C.jsx("span",{className:"gut",onClick:()=>Oe(K,B.hunkIndex),title:"在 nvim 中打开此行",children:K.newLineNo??""}),C.jsx("span",{className:"addc",children:!B.expanded&&_e!==void 0&&C.jsx("button",{className:"add-btn",onMouseDown:Te=>ee(Te,ye,B.hunkIndex,_e),title:"添加评论(可拖选多行)",children:"+"})}),C.jsx("span",{className:"marker",children:K.type==="add"?"+":K.type==="del"?"-":" "}),C.jsxs("span",{className:"code",children:[C.jsx(lm,{content:K.content,tokens:De}),K.noNewline&&C.jsx("span",{className:"nonl",title:"No newline at end of file",children:"⏎"})]}),we(ye,_e)]})},Qe=(B,K,ye,_e)=>{if(!B)return C.jsx("span",{className:"cell empty"});const De=K==="old"?B.oldLineNo:B.newLineNo,Te=B.type==="context"?"context":K==="old"?"del":"add",Xe=te.current.get(el(B,K));return C.jsxs("span",{className:`cell ${Te} ${N(K,De)}`,onMouseEnter:()=>De!==void 0&&ce(K,ye,De),children:[C.jsx("span",{className:"gut",onClick:()=>Oe(B,ye),title:"在 nvim 中打开此行",children:De??""}),C.jsx("span",{className:"addc",children:!_e&&De!==void 0&&C.jsx("button",{className:"add-btn",onMouseDown:st=>ee(st,K,ye,De),title:"添加评论(可拖选多行)",children:"+"})}),C.jsx("span",{className:"code",children:C.jsx(lm,{content:B.content,tokens:Xe})}),we(K,De)]})},on=B=>{switch(B.kind){case"gap":return Ae(B);case"hunk":return C.jsxs("div",{className:"row hunk-head",children:["@@ -",B.hunk.oldStart,",",B.hunk.oldLines," +",B.hunk.newStart,",",B.hunk.newLines," @@ ",C.jsx("span",{className:"muted",children:B.hunk.header})]});case"line":return je(B);case"pair":return C.jsxs("div",{className:`row pair ${B.expanded?"expanded":""}`,children:[Qe(B.left,"old",B.hunkIndex,B.expanded),Qe(B.right,"new",B.hunkIndex,B.expanded)]})}},Fr=ge.getVirtualItems();return C.jsx("div",{ref:pe,className:`diff-scroll ${T?"selecting":""} ${w?"reattaching":""}`,children:C.jsx("div",{className:`diff-list ${t}`,style:{height:ge.getTotalSize(),position:"relative"},children:Fr.map(B=>C.jsx("div",{"data-index":B.index,ref:ge.measureElement,className:"vrow",style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${B.start}px)`},children:on(ue[B.index])},B.key))})})}const MC=5e3;function jC({entry:e}){const t=J(o=>o.toggleViewed),n=J(o=>o.openInNvim),i=J(o=>!!o.nvim?.selected);return C.jsxs("div",{className:"file-head",children:[C.jsx("span",{className:`status status-${e.status}`,children:e.status}),C.jsx("span",{className:"path mono",children:e.oldPath?C.jsxs(C.Fragment,{children:[C.jsx("span",{className:"muted",children:e.oldPath})," → ",e.path]}):e.path}),e.oldMode&&e.newMode&&C.jsxs("span",{className:"muted mono",children:["mode ",e.oldMode," → ",e.newMode]}),C.jsxs("span",{className:"counts",children:[C.jsxs("span",{className:"add",children:["+",e.additions]})," ",C.jsxs("span",{className:"del",children:["-",e.deletions]})]}),e.changed&&C.jsx("span",{className:"changed",children:"文件已变化,viewed 已取消"}),C.jsx("span",{className:"spacer"}),C.jsx("button",{className:"link",disabled:!i,onClick:()=>{n(e.path,1)},title:"在 nvim 中打开",children:"在 nvim 中打开"}),C.jsxs("label",{className:"check",children:[C.jsx("input",{type:"checkbox",checked:e.viewed,onChange:()=>{t(e.path)}}),"Viewed"]})]})}function DC(){const e=J(p=>p.activeFile),t=J(p=>p.files.find(m=>m.path===p.activeFile)),n=J(p=>p.activeFile?p.diffs[p.activeFile]:void 0),i=J(p=>p.filesLoading),o=J(p=>p.files),l=J(p=>p.openFile),[a,c]=se.useState(null),f=se.useMemo(()=>n?.status==="ok"?Qk(n.diff):0,[n]);if(!e||!t)return C.jsx("div",{className:"placeholder",children:i&&o.length===0?C.jsx("p",{children:"加载文件列表…"}):o.length===0?C.jsx("p",{children:"当前 Target 没有改动。"}):C.jsxs(C.Fragment,{children:[C.jsx("p",{children:"在左侧选择一个文件查看 diff。"}),C.jsxs("p",{className:"muted",children:["快捷键:",C.jsx("kbd",{children:"j"}),"/",C.jsx("kbd",{children:"k"})," 切换文件,",C.jsx("kbd",{children:"n"}),"/",C.jsx("kbd",{children:"p"})," 切换 hunk,",C.jsx("kbd",{children:"r"})," 刷新"]})]})});let h;return!n||n.status==="loading"?h=C.jsx("div",{className:"placeholder",children:"加载 diff…"}):n.status==="error"?h=C.jsxs("div",{className:"placeholder error-box",children:[n.message," ",C.jsx("button",{className:"link",onClick:()=>{l(e,!0)},children:"重试"})]}):n.diff.binary?h=C.jsx("div",{className:"placeholder",children:"二进制文件,不展示 diff"}):n.diff.hunks.length===0?h=C.jsx("div",{className:"placeholder",children:t.oldMode&&t.newMode?`仅文件模式变更:${t.oldMode} → ${t.newMode}`:t.status==="renamed"?"仅重命名,内容无变化":"空文件 / 无内容变化"}):f>MC&&a!==e?h=C.jsxs("div",{className:"placeholder",children:[C.jsxs("p",{children:["该文件 diff 有 ",f," 行,默认不渲染。"]}),C.jsx("button",{className:"primary",onClick:()=>c(e),children:"仍然渲染"})]}):h=C.jsx(OC,{diff:n.diff},e+":"+n.diff.contentHash),C.jsxs("div",{className:"diff-panel",children:[C.jsx(jC,{entry:t}),h]})}const FC=200;function zC(){const e=J(P=>P.root),t=J(P=>P.targetKey),n=J(P=>P.setTarget),i=J(P=>P.showToast),[o,l]=se.useState([]),[a,c]=se.useState(!1),[f,h]=se.useState(!1),[p,m]=se.useState(""),[w,v]=se.useState(""),[k,_]=se.useState(""),A=se.useRef(null),S=se.useMemo(()=>fc(t).worktree,[t]),b=se.useMemo(()=>{const P=fc(t);return P.kind==="commit"?P.sha:null},[t]),T=se.useCallback(async P=>{h(!0);try{const H=await et.commits({root:e,path:k||void 0,before:P,limit:FC});l(ie=>P?[...ie,...H.commits]:H.commits),c(H.hasMore)}catch(H){i(H instanceof Error?H.message:String(H),"error")}finally{h(!1)}},[e,k,i]);se.useEffect(()=>{l([]),T()},[T]);const $=()=>{const P=A.current;if(!(!P||f||!a)&&P.scrollTop+P.clientHeight>=P.scrollHeight-200){const H=o[o.length-1];H&&T(H.sha)}},j=se.useMemo(()=>{const P=p.trim().toLowerCase();return P?o.filter(H=>H.subject.toLowerCase().includes(P)||H.author.toLowerCase().includes(P)||H.sha.startsWith(P)):o},[o,p]);return C.jsxs("div",{className:"commits-panel",children:[C.jsxs("div",{className:"commits-tools",children:[C.jsx("input",{value:p,onChange:P=>m(P.target.value),placeholder:"按 message / 作者过滤(已加载的)"}),C.jsxs("form",{className:"inline-form",onSubmit:P=>{P.preventDefault(),_(w.trim())},children:[C.jsx("input",{value:w,onChange:P=>v(P.target.value),placeholder:"按路径过滤 (git log -- path)",spellCheck:!1}),C.jsx("button",{type:"submit",children:"应用"}),k&&C.jsx("button",{type:"button",onClick:()=>{v(""),_("")},children:"清除"})]}),C.jsxs("span",{className:"muted",children:[j.length,"/",o.length," 条",a?",滚动加载更多":""]})]}),C.jsxs("div",{className:"commits-list",ref:A,onScroll:$,children:[j.map(P=>C.jsxs("div",{className:`commit-row ${b&&(P.sha===b||P.sha.startsWith(b))?"active":""}`,onClick:()=>{n(Ym({kind:"commit",sha:P.sha,...S?{worktree:S}:{}}))},title:P.sha,children:[C.jsx("span",{className:"mono sha",children:P.shortSha}),C.jsx("span",{className:"subject",children:P.subject}),P.parents.length>1&&C.jsx("span",{className:"badge",children:"merge"}),C.jsx("span",{className:"muted author",children:P.author}),C.jsx("span",{className:"muted date",children:new Date(P.date).toLocaleString()})]},P.sha)),f&&C.jsx("div",{className:"muted empty",children:"加载中…"}),!f&&o.length===0&&C.jsx("div",{className:"muted empty",children:"没有 commit"})]})]})}const $C=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,BC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,UC={};function am(e,t){return(UC.jsx?BC:$C).test(e)}var di={},Ku,um;function GC(){if(um)return Ku;um=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
164
- `,h="/",p="*",m="",w="comment",v="declaration";function k(A,S){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];S=S||{};var b=1,T=1;function $(te){var Q=te.match(t);Q&&(b+=Q.length);var pe=te.lastIndexOf(f);T=~pe?te.length-pe:T+te.length}function j(){var te={line:b,column:T};return function(Q){return Q.position=new P(te),ue(),Q}}function P(te){this.start=te,this.end={line:b,column:T},this.source=S.source}P.prototype.content=A;function H(te){var Q=new Error(S.source+":"+b+":"+T+": "+te);if(Q.reason=te,Q.filename=S.source,Q.line=b,Q.column=T,Q.source=A,!S.silent)throw Q}function ie(te){var Q=te.exec(A);if(Q){var pe=Q[0];return $(pe),A=A.slice(pe.length),Q}}function ue(){ie(n)}function R(te){var Q;for(te=te||[];Q=X();)Q!==!1&&te.push(Q);return te}function X(){var te=j();if(!(h!=A.charAt(0)||p!=A.charAt(1))){for(var Q=2;m!=A.charAt(Q)&&(p!=A.charAt(Q)||h!=A.charAt(Q+1));)++Q;if(Q+=2,m===A.charAt(Q-1))return H("End of comment missing");var pe=A.slice(2,Q-2);return T+=2,$(pe),A=A.slice(Q),T+=2,te({type:w,comment:pe})}}function ne(){var te=j(),Q=ie(i);if(Q){if(X(),!ie(o))return H("property missing ':'");var pe=ie(l),ge=te({type:v,property:_(Q[0].replace(e,m)),value:pe?_(pe[0].replace(e,m)):m});return ie(a),ge}}function de(){var te=[];R(te);for(var Q;Q=ne();)Q!==!1&&(te.push(Q),R(te));return te}return ue(),de()}function _(A){return A?A.replace(c,m):m}return Ku=k,Ku}var cm;function VC(){if(cm)return di;cm=1;var e=di&&di.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(di,"__esModule",{value:!0}),di.default=n;const t=e(GC());function n(i,o){let l=null;if(!i||typeof i!="string")return l;const a=(0,t.default)(i),c=typeof o=="function";return a.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:p}=f;c?o(h,p,f):p&&(l=l||{},l[h]=p)}),l}return di}var cs={},fm;function WC(){if(fm)return cs;fm=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,l=function(h){return!h||n.test(h)||e.test(h)},a=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},f=function(h,p){return p===void 0&&(p={}),l(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,c):h=h.replace(i,c),h.replace(t,a))};return cs.camelCase=f,cs}var fs,dm;function HC(){if(dm)return fs;dm=1;var e=fs&&fs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(VC()),n=WC();function i(o,l){var a={};return!o||typeof o!="string"||(0,t.default)(o,function(c,f){c&&f&&(a[(0,n.camelCase)(c,l)]=f)}),a}return i.default=i,fs=i,fs}var qC=HC();const KC=zc(qC),dy=hy("end"),nf=hy("start");function hy(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function QC(e){const t=nf(e),n=dy(e);if(t&&n)return{start:t,end:n}}function ws(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?hm(e.position):"start"in e||"end"in e?hm(e):"line"in e||"column"in e?Pc(e):""}function Pc(e){return pm(e&&e.line)+":"+pm(e&&e.column)}function hm(e){return Pc(e&&e.start)+"-"+Pc(e&&e.end)}function pm(e){return e&&typeof e=="number"?e:1}class Nt extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let o="",l={},a=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?o=t:!l.cause&&t&&(a=!0,o=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?l.ruleId=i:(l.source=i.slice(0,f),l.ruleId=i.slice(f+1))}if(!l.place&&l.ancestors&&l.ancestors){const f=l.ancestors[l.ancestors.length-1];f&&(l.place=f.position)}const c=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=c?c.line:void 0,this.name=ws(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=a&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Nt.prototype.file="";Nt.prototype.name="";Nt.prototype.reason="";Nt.prototype.message="";Nt.prototype.stack="";Nt.prototype.column=void 0;Nt.prototype.line=void 0;Nt.prototype.ancestors=void 0;Nt.prototype.cause=void 0;Nt.prototype.fatal=void 0;Nt.prototype.place=void 0;Nt.prototype.ruleId=void 0;Nt.prototype.source=void 0;const rf={}.hasOwnProperty,XC=new Map,YC=/[A-Z]/g,JC=new Set(["table","tbody","thead","tfoot","tr"]),ZC=new Set(["td","th"]),py="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function e_(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=a_(n,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");i=l_(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ts:Eg,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=my(o,e,void 0);return l&&typeof l!="string"?l:o.create(e,o.Fragment,{children:l||void 0},void 0)}function my(e,t,n){if(t.type==="element")return t_(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return n_(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return i_(e,t,n);if(t.type==="mdxjsEsm")return r_(e,t);if(t.type==="root")return s_(e,t,n);if(t.type==="text")return o_(e,t)}function t_(e,t,n){const i=e.schema;let o=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=Ts,e.schema=o),e.ancestors.push(t);const l=yy(e,t.tagName,!1),a=u_(e,t);let c=of(e,t);return JC.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!bl(f):!0})),gy(e,a,l,t),sf(a,c),e.ancestors.pop(),e.schema=i,e.create(t,l,a,n)}function n_(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}bs(e,t.position)}function r_(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);bs(e,t.position)}function i_(e,t,n){const i=e.schema;let o=i;t.name==="svg"&&i.space==="html"&&(o=Ts,e.schema=o),e.ancestors.push(t);const l=t.name===null?e.Fragment:yy(e,t.name,!0),a=c_(e,t),c=of(e,t);return gy(e,a,l,t),sf(a,c),e.ancestors.pop(),e.schema=i,e.create(t,l,a,n)}function s_(e,t,n){const i={};return sf(i,of(e,t)),e.create(t,e.Fragment,i,n)}function o_(e,t){return t.value}function gy(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function sf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function l_(e,t,n){return i;function i(o,l,a,c){const h=Array.isArray(a.children)?n:t;return c?h(l,a,c):h(l,a)}}function a_(e,t){return n;function n(i,o,l,a){const c=Array.isArray(l.children),f=nf(i);return t(o,l,a,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function u_(e,t){const n={};let i,o;for(o in t.properties)if(o!=="children"&&rf.call(t.properties,o)){const l=f_(e,o,t.properties[o]);if(l){const[a,c]=l;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&ZC.has(t.tagName)?i=c:n[a]=c}}if(i){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function c_(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const l=i.data.estree.body[0];l.type;const a=l.expression;a.type;const c=a.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else bs(e,t.position);else{const o=i.name;let l;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const c=i.value.data.estree.body[0];c.type,l=e.evaluater.evaluateExpression(c.expression)}else bs(e,t.position);else l=i.value===null?!0:i.value;n[o]=l}return n}function of(e,t){const n=[];let i=-1;const o=e.passKeys?new Map:XC;for(;++i<t.children.length;){const l=t.children[i];let a;if(e.passKeys){const f=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(f){const h=o.get(f)||0;a=f+"-"+h,o.set(f,h+1)}}const c=my(e,l,a);c!==void 0&&n.push(c)}return n}function f_(e,t,n){const i=_g(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?Ig(n):Ng(n)),i.property==="style"){let o=typeof n=="object"?n:d_(e,String(n));return e.stylePropertyNameCase==="css"&&(o=h_(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?U0[i.property]||i.property:i.attribute,n]}}function d_(e,t){try{return KC(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,o=new Nt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=py+"#cannot-parse-style-attribute",o}}function yy(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let l=-1,a;for(;++l<o.length;){const c=am(o[l])?{type:"Identifier",name:o[l]}:{type:"Literal",value:o[l]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(l&&c.type==="Literal"),optional:!1}:c}i=a}else i=am(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const o=i.value;return rf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(i);bs(e)}function bs(e,t){const n=new Nt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=py+"#cannot-handle-mdx-estrees-without-createevaluater",n}function h_(e){const t={};let n;for(n in e)rf.call(e,n)&&(t[p_(n)]=e[n]);return t}function p_(e){let t=e.replace(YC,m_);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function m_(e){return"-"+e.toLowerCase()}const Qu={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"]},g_={};function lf(e,t){const n=g_,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return wy(e,i,o)}function wy(e,t,n){if(y_(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return mm(e.children,t,n)}return Array.isArray(e)?mm(e,t,n):""}function mm(e,t,n){const i=[];let o=-1;for(;++o<e.length;)i[o]=wy(e[o],t,n);return i.join("")}function y_(e){return!!(e&&typeof e=="object")}const gm=document.createElement("i");function af(e){const t="&"+e+";";gm.innerHTML=t;const n=gm.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function qt(e,t,n,i){const o=e.length;let l=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,i.length<1e4)a=Array.from(i),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);l<i.length;)a=i.slice(l,l+1e4),a.unshift(t,0),e.splice(...a),l+=1e4,t+=1e4}function nn(e,t){return e.length>0?(qt(e,e.length,0,t),e):t}const ym={}.hasOwnProperty;function vy(e){const t={};let n=-1;for(;++n<e.length;)w_(t,e[n]);return t}function w_(e,t){let n;for(n in t){const o=(ym.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let a;if(l)for(a in l){ym.call(o,a)||(o[a]=[]);const c=l[a];v_(o[a],Array.isArray(c)?c:c?[c]:[])}}}function v_(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);qt(e,0,0,i)}function ky(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function gn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Lt=cr(/[A-Za-z]/),It=cr(/[\dA-Za-z]/),k_=cr(/[#-'*+\--9=?A-Z^-~]/);function Sl(e){return e!==null&&(e<32||e===127)}const Lc=cr(/\d/),x_=cr(/[\dA-Fa-f]/),S_=cr(/[!-/:-@[-`{-~]/);function xe(e){return e!==null&&e<-2}function Ge(e){return e!==null&&(e<0||e===32)}function Re(e){return e===-2||e===-1||e===32}const Rl=cr(new RegExp("\\p{P}|\\p{S}","u")),jr=cr(/\s/);function cr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function _i(e){const t=[];let n=-1,i=0,o=0;for(;++n<e.length;){const l=e.charCodeAt(n);let a="";if(l===37&&It(e.charCodeAt(n+1))&&It(e.charCodeAt(n+2)))o=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){const c=e.charCodeAt(n+1);l<56320&&c>56319&&c<57344?(a=String.fromCharCode(l,c),o=1):a="�"}else a=String.fromCharCode(l);a&&(t.push(e.slice(i,n),encodeURIComponent(a)),i=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(i)}function Me(e,t,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let l=0;return a;function a(f){return Re(f)?(e.enter(n),c(f)):t(f)}function c(f){return Re(f)&&l++<o?(e.consume(f),c):(e.exit(n),t(f))}}const C_={tokenize:__};function __(e){const t=e.attempt(this.parser.constructs.contentInitial,i,o);let n;return t;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Me(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),l(c)}function l(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return xe(c)?(e.consume(c),e.exit("chunkText"),l):(e.consume(c),a)}}const E_={tokenize:b_},wm={tokenize:I_};function b_(e){const t=this,n=[];let i=0,o,l,a;return c;function c(T){if(i<n.length){const $=n[i];return t.containerState=$[1],e.attempt($[0].continuation,f,h)(T)}return h(T)}function f(T){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&b();const $=t.events.length;let j=$,P;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){P=t.events[j][1].end;break}S(i);let H=$;for(;H<t.events.length;)t.events[H][1].end={...P},H++;return qt(t.events,j+1,0,t.events.slice($)),t.events.length=H,h(T)}return c(T)}function h(T){if(i===n.length){if(!o)return w(T);if(o.currentConstruct&&o.currentConstruct.concrete)return k(T);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(wm,p,m)(T)}function p(T){return o&&b(),S(i),w(T)}function m(T){return t.parser.lazy[t.now().line]=i!==n.length,a=t.now().offset,k(T)}function w(T){return t.containerState={},e.attempt(wm,v,k)(T)}function v(T){return i++,n.push([t.currentConstruct,t.containerState]),w(T)}function k(T){if(T===null){o&&b(),S(0),e.consume(T);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:l}),_(T)}function _(T){if(T===null){A(e.exit("chunkFlow"),!0),S(0),e.consume(T);return}return xe(T)?(e.consume(T),A(e.exit("chunkFlow")),i=0,t.interrupt=void 0,c):(e.consume(T),_)}function A(T,$){const j=t.sliceStream(T);if($&&j.push(null),T.previous=l,l&&(l.next=T),l=T,o.defineSkip(T.start),o.write(j),t.parser.lazy[T.start.line]){let P=o.events.length;for(;P--;)if(o.events[P][1].start.offset<a&&(!o.events[P][1].end||o.events[P][1].end.offset>a))return;const H=t.events.length;let ie=H,ue,R;for(;ie--;)if(t.events[ie][0]==="exit"&&t.events[ie][1].type==="chunkFlow"){if(ue){R=t.events[ie][1].end;break}ue=!0}for(S(i),P=H;P<t.events.length;)t.events[P][1].end={...R},P++;qt(t.events,ie+1,0,t.events.slice(H)),t.events.length=P}}function S(T){let $=n.length;for(;$-- >T;){const j=n[$];t.containerState=j[1],j[0].exit.call(t,e)}n.length=T}function b(){o.write([null]),l=void 0,o=void 0,t.containerState._closeFlow=void 0}}function I_(e,t,n){return Me(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function vi(e){if(e===null||Ge(e)||jr(e))return 1;if(Rl(e))return 2}function Ol(e,t,n){const i=[];let o=-1;for(;++o<e.length;){const l=e[o].resolveAll;l&&!i.includes(l)&&(t=l(t,n),i.push(l))}return t}const Rc={name:"attention",resolveAll:N_,tokenize:A_};function N_(e,t){let n=-1,i,o,l,a,c,f,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[i][1].end},w={...e[n][1].start};vm(m,-f),vm(w,f),a={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[i][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:w},l={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},o={type:f>1?"strong":"emphasis",start:{...a.start},end:{...c.end}},e[i][1].end={...a.start},e[n][1].start={...c.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=nn(h,[["enter",e[i][1],t],["exit",e[i][1],t]])),h=nn(h,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",l,t]]),h=nn(h,Ol(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),h=nn(h,[["exit",l,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=nn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,qt(e,i-1,n-i+3,h),n=i+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function A_(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,o=vi(i);let l;return a;function a(f){return l=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===l)return e.consume(f),c;const h=e.exit("attentionSequence"),p=vi(f),m=!p||p===2&&o||n.includes(f),w=!o||o===2&&p||n.includes(i);return h._open=!!(l===42?m:m&&(o||!w)),h._close=!!(l===42?w:w&&(p||!m)),t(f)}}function vm(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const T_={name:"autolink",tokenize:P_};function P_(e,t,n){let i=0;return o;function o(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(v){return Lt(v)?(e.consume(v),a):v===64?n(v):h(v)}function a(v){return v===43||v===45||v===46||It(v)?(i=1,c(v)):h(v)}function c(v){return v===58?(e.consume(v),i=0,f):(v===43||v===45||v===46||It(v))&&i++<32?(e.consume(v),c):(i=0,h(v))}function f(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||Sl(v)?n(v):(e.consume(v),f)}function h(v){return v===64?(e.consume(v),p):k_(v)?(e.consume(v),h):n(v)}function p(v){return It(v)?m(v):n(v)}function m(v){return v===46?(e.consume(v),i=0,p):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):w(v)}function w(v){if((v===45||It(v))&&i++<63){const k=v===45?w:m;return e.consume(v),k}return n(v)}}const Ls={partial:!0,tokenize:L_};function L_(e,t,n){return i;function i(l){return Re(l)?Me(e,o,"linePrefix")(l):o(l)}function o(l){return l===null||xe(l)?t(l):n(l)}}const xy={continuation:{tokenize:O_},exit:M_,name:"blockQuote",tokenize:R_};function R_(e,t,n){const i=this;return o;function o(a){if(a===62){const c=i.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),l}return n(a)}function l(a){return Re(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function O_(e,t,n){const i=this;return o;function o(a){return Re(a)?Me(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):l(a)}function l(a){return e.attempt(xy,t,n)(a)}}function M_(e){e.exit("blockQuote")}const Sy={name:"characterEscape",tokenize:j_};function j_(e,t,n){return i;function i(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),o}function o(l){return S_(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Cy={name:"characterReference",tokenize:D_};function D_(e,t,n){const i=this;let o=0,l,a;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),l=31,a=It,p(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,a=x_,p):(e.enter("characterReferenceValue"),l=7,a=Lc,p(m))}function p(m){if(m===59&&o){const w=e.exit("characterReferenceValue");return a===It&&!af(i.sliceSerialize(w))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(m)&&o++<l?(e.consume(m),p):n(m)}}const km={partial:!0,tokenize:z_},xm={concrete:!0,name:"codeFenced",tokenize:F_};function F_(e,t,n){const i=this,o={partial:!0,tokenize:j};let l=0,a=0,c;return f;function f(P){return h(P)}function h(P){const H=i.events[i.events.length-1];return l=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,c=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(P)}function p(P){return P===c?(a++,e.consume(P),p):a<3?n(P):(e.exit("codeFencedFenceSequence"),Re(P)?Me(e,m,"whitespace")(P):m(P))}function m(P){return P===null||xe(P)?(e.exit("codeFencedFence"),i.interrupt?t(P):e.check(km,_,$)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),w(P))}function w(P){return P===null||xe(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(P)):Re(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Me(e,v,"whitespace")(P)):P===96&&P===c?n(P):(e.consume(P),w)}function v(P){return P===null||xe(P)?m(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(P))}function k(P){return P===null||xe(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(P)):P===96&&P===c?n(P):(e.consume(P),k)}function _(P){return e.attempt(o,$,A)(P)}function A(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),S}function S(P){return l>0&&Re(P)?Me(e,b,"linePrefix",l+1)(P):b(P)}function b(P){return P===null||xe(P)?e.check(km,_,$)(P):(e.enter("codeFlowValue"),T(P))}function T(P){return P===null||xe(P)?(e.exit("codeFlowValue"),b(P)):(e.consume(P),T)}function $(P){return e.exit("codeFenced"),t(P)}function j(P,H,ie){let ue=0;return R;function R(Q){return P.enter("lineEnding"),P.consume(Q),P.exit("lineEnding"),X}function X(Q){return P.enter("codeFencedFence"),Re(Q)?Me(P,ne,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):ne(Q)}function ne(Q){return Q===c?(P.enter("codeFencedFenceSequence"),de(Q)):ie(Q)}function de(Q){return Q===c?(ue++,P.consume(Q),de):ue>=a?(P.exit("codeFencedFenceSequence"),Re(Q)?Me(P,te,"whitespace")(Q):te(Q)):ie(Q)}function te(Q){return Q===null||xe(Q)?(P.exit("codeFencedFence"),H(Q)):ie(Q)}}}function z_(e,t,n){const i=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l)}function l(a){return i.parser.lazy[i.now().line]?n(a):t(a)}}const Xu={name:"codeIndented",tokenize:B_},$_={partial:!0,tokenize:U_};function B_(e,t,n){const i=this;return o;function o(h){return e.enter("codeIndented"),Me(e,l,"linePrefix",5)(h)}function l(h){const p=i.events[i.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?a(h):n(h)}function a(h){return h===null?f(h):xe(h)?e.attempt($_,a,f)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||xe(h)?(e.exit("codeFlowValue"),a(h)):(e.consume(h),c)}function f(h){return e.exit("codeIndented"),t(h)}}function U_(e,t,n){const i=this;return o;function o(a){return i.parser.lazy[i.now().line]?n(a):xe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Me(e,l,"linePrefix",5)(a)}function l(a){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):xe(a)?o(a):n(a)}}const G_={name:"codeText",previous:W_,resolve:V_,tokenize:H_};function V_(e){let t=e.length-4,n=3,i,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)o===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(o=i):(i===t||e[i][1].type==="lineEnding")&&(e[o][1].type="codeTextData",i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),t-=i-o-2,i=o+2),o=void 0);return e}function W_(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function H_(e,t,n){let i=0,o,l;return a;function a(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),i++,c):(e.exit("codeTextSequence"),f(m))}function f(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(l=e.enter("codeTextSequence"),o=0,p(m)):xe(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||xe(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),h)}function p(m){return m===96?(e.consume(m),o++,p):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(l.type="codeTextData",h(m))}}class q_{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,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const o=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&ds(this.left,i),l.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),ds(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ds(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 n=this.left.splice(t,Number.POSITIVE_INFINITY);ds(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ds(this.left,n.reverse())}}}function ds(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function _y(e){const t={};let n=-1,i,o,l,a,c,f,h;const p=new q_(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(i=p.get(n),n&&i[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(f=i[1]._tokenizer.events,l=0,l<f.length&&f[l][1].type==="lineEndingBlank"&&(l+=2),l<f.length&&f[l][1].type==="content"))for(;++l<f.length&&f[l][1].type!=="content";)f[l][1].type==="chunkText"&&(f[l][1]._isInFirstContentOfListItem=!0,l++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,K_(p,n)),n=t[n],h=!0);else if(i[1]._container){for(l=n,o=void 0;l--;)if(a=p.get(l),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=l);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(i[1].end={...p.get(o)[1].start},c=p.slice(o,n),c.unshift(i),p.splice(o,n-o+1,c))}}return qt(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function K_(e,t){const n=e.get(t)[1],i=e.get(t)[2];let o=t-1;const l=[];let a=n._tokenizer;a||(a=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,f=[],h={};let p,m,w=-1,v=n,k=0,_=0;const A=[_];for(;v;){for(;e.get(++o)[1]!==v;);l.push(o),v._tokenizer||(p=i.sliceStream(v),v.next||p.push(null),m&&a.defineSkip(v.start),v._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(p),v._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),m=v,v=v.next}for(v=n;++w<c.length;)c[w][0]==="exit"&&c[w-1][0]==="enter"&&c[w][1].type===c[w-1][1].type&&c[w][1].start.line!==c[w][1].end.line&&(_=w+1,A.push(_),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(a.events=[],v?(v._tokenizer=void 0,v.previous=void 0):A.pop(),w=A.length;w--;){const S=c.slice(A[w],A[w+1]),b=l.pop();f.push([b,b+S.length-1]),e.splice(b,2,S)}for(f.reverse(),w=-1;++w<f.length;)h[k+f[w][0]]=k+f[w][1],k+=f[w][1]-f[w][0]-1;return h}const Q_={resolve:Y_,tokenize:J_},X_={partial:!0,tokenize:Z_};function Y_(e){return _y(e),e}function J_(e,t){let n;return i;function i(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?l(c):xe(c)?e.check(X_,a,l)(c):(e.consume(c),o)}function l(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function Z_(e,t,n){const i=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Me(e,l,"linePrefix")}function l(a){if(a===null||xe(a))return n(a);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):e.interrupt(i.parser.constructs.flow,n,t)(a)}}function Ey(e,t,n,i,o,l,a,c,f){const h=f||Number.POSITIVE_INFINITY;let p=0;return m;function m(S){return S===60?(e.enter(i),e.enter(o),e.enter(l),e.consume(S),e.exit(l),w):S===null||S===32||S===41||Sl(S)?n(S):(e.enter(i),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),_(S))}function w(S){return S===62?(e.enter(l),e.consume(S),e.exit(l),e.exit(o),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),v(S))}function v(S){return S===62?(e.exit("chunkString"),e.exit(c),w(S)):S===null||S===60||xe(S)?n(S):(e.consume(S),S===92?k:v)}function k(S){return S===60||S===62||S===92?(e.consume(S),v):v(S)}function _(S){return!p&&(S===null||S===41||Ge(S))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(i),t(S)):p<h&&S===40?(e.consume(S),p++,_):S===41?(e.consume(S),p--,_):S===null||S===32||S===40||Sl(S)?n(S):(e.consume(S),S===92?A:_)}function A(S){return S===40||S===41||S===92?(e.consume(S),_):_(S)}}function by(e,t,n,i,o,l){const a=this;let c=0,f;return h;function h(v){return e.enter(i),e.enter(o),e.consume(v),e.exit(o),e.enter(l),p}function p(v){return c>999||v===null||v===91||v===93&&!f||v===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?n(v):v===93?(e.exit(l),e.enter(o),e.consume(v),e.exit(o),e.exit(i),t):xe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||v===91||v===93||xe(v)||c++>999?(e.exit("chunkString"),p(v)):(e.consume(v),f||(f=!Re(v)),v===92?w:m)}function w(v){return v===91||v===92||v===93?(e.consume(v),c++,m):m(v)}}function Iy(e,t,n,i,o,l){let a;return c;function c(w){return w===34||w===39||w===40?(e.enter(i),e.enter(o),e.consume(w),e.exit(o),a=w===40?41:w,f):n(w)}function f(w){return w===a?(e.enter(o),e.consume(w),e.exit(o),e.exit(i),t):(e.enter(l),h(w))}function h(w){return w===a?(e.exit(l),f(a)):w===null?n(w):xe(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),Me(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===a||w===null||xe(w)?(e.exit("chunkString"),h(w)):(e.consume(w),w===92?m:p)}function m(w){return w===a||w===92?(e.consume(w),p):p(w)}}function vs(e,t){let n;return i;function i(o){return xe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,i):Re(o)?Me(e,i,n?"linePrefix":"lineSuffix")(o):t(o)}}const eE={name:"definition",tokenize:nE},tE={partial:!0,tokenize:rE};function nE(e,t,n){const i=this;let o;return l;function l(v){return e.enter("definition"),a(v)}function a(v){return by.call(i,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function c(v){return o=gn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),f):n(v)}function f(v){return Ge(v)?vs(e,h)(v):h(v)}function h(v){return Ey(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function p(v){return e.attempt(tE,m,m)(v)}function m(v){return Re(v)?Me(e,w,"whitespace")(v):w(v)}function w(v){return v===null||xe(v)?(e.exit("definition"),i.parser.defined.push(o),t(v)):n(v)}}function rE(e,t,n){return i;function i(c){return Ge(c)?vs(e,o)(c):n(c)}function o(c){return Iy(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function l(c){return Re(c)?Me(e,a,"whitespace")(c):a(c)}function a(c){return c===null||xe(c)?t(c):n(c)}}const iE={name:"hardBreakEscape",tokenize:sE};function sE(e,t,n){return i;function i(l){return e.enter("hardBreakEscape"),e.consume(l),o}function o(l){return xe(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const oE={name:"headingAtx",resolve:lE,tokenize:aE};function lE(e,t){let n=e.length-2,i=3,o,l;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},l={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},qt(e,i,n-i+1,[["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t]])),e}function aE(e,t,n){let i=0;return o;function o(p){return e.enter("atxHeading"),l(p)}function l(p){return e.enter("atxHeadingSequence"),a(p)}function a(p){return p===35&&i++<6?(e.consume(p),a):p===null||Ge(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),f(p)):p===null||xe(p)?(e.exit("atxHeading"),t(p)):Re(p)?Me(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function f(p){return p===35?(e.consume(p),f):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||Ge(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const uE=["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"],Sm=["pre","script","style","textarea"],cE={concrete:!0,name:"htmlFlow",resolveTo:hE,tokenize:pE},fE={partial:!0,tokenize:gE},dE={partial:!0,tokenize:mE};function hE(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 pE(e,t,n){const i=this;let o,l,a,c,f;return h;function h(N){return p(N)}function p(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),m}function m(N){return N===33?(e.consume(N),w):N===47?(e.consume(N),l=!0,_):N===63?(e.consume(N),o=3,i.interrupt?t:E):Lt(N)?(e.consume(N),a=String.fromCharCode(N),A):n(N)}function w(N){return N===45?(e.consume(N),o=2,v):N===91?(e.consume(N),o=5,c=0,k):Lt(N)?(e.consume(N),o=4,i.interrupt?t:E):n(N)}function v(N){return N===45?(e.consume(N),i.interrupt?t:E):n(N)}function k(N){const we="CDATA[";return N===we.charCodeAt(c++)?(e.consume(N),c===we.length?i.interrupt?t:ne:k):n(N)}function _(N){return Lt(N)?(e.consume(N),a=String.fromCharCode(N),A):n(N)}function A(N){if(N===null||N===47||N===62||Ge(N)){const we=N===47,Ie=a.toLowerCase();return!we&&!l&&Sm.includes(Ie)?(o=1,i.interrupt?t(N):ne(N)):uE.includes(a.toLowerCase())?(o=6,we?(e.consume(N),S):i.interrupt?t(N):ne(N)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(N):l?b(N):T(N))}return N===45||It(N)?(e.consume(N),a+=String.fromCharCode(N),A):n(N)}function S(N){return N===62?(e.consume(N),i.interrupt?t:ne):n(N)}function b(N){return Re(N)?(e.consume(N),b):R(N)}function T(N){return N===47?(e.consume(N),R):N===58||N===95||Lt(N)?(e.consume(N),$):Re(N)?(e.consume(N),T):R(N)}function $(N){return N===45||N===46||N===58||N===95||It(N)?(e.consume(N),$):j(N)}function j(N){return N===61?(e.consume(N),P):Re(N)?(e.consume(N),j):T(N)}function P(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),f=N,H):Re(N)?(e.consume(N),P):ie(N)}function H(N){return N===f?(e.consume(N),f=null,ue):N===null||xe(N)?n(N):(e.consume(N),H)}function ie(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Ge(N)?j(N):(e.consume(N),ie)}function ue(N){return N===47||N===62||Re(N)?T(N):n(N)}function R(N){return N===62?(e.consume(N),X):n(N)}function X(N){return N===null||xe(N)?ne(N):Re(N)?(e.consume(N),X):n(N)}function ne(N){return N===45&&o===2?(e.consume(N),pe):N===60&&o===1?(e.consume(N),ge):N===62&&o===4?(e.consume(N),M):N===63&&o===3?(e.consume(N),E):N===93&&o===5?(e.consume(N),ce):xe(N)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(fE,G,de)(N)):N===null||xe(N)?(e.exit("htmlFlowData"),de(N)):(e.consume(N),ne)}function de(N){return e.check(dE,te,G)(N)}function te(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),Q}function Q(N){return N===null||xe(N)?de(N):(e.enter("htmlFlowData"),ne(N))}function pe(N){return N===45?(e.consume(N),E):ne(N)}function ge(N){return N===47?(e.consume(N),a="",ee):ne(N)}function ee(N){if(N===62){const we=a.toLowerCase();return Sm.includes(we)?(e.consume(N),M):ne(N)}return Lt(N)&&a.length<8?(e.consume(N),a+=String.fromCharCode(N),ee):ne(N)}function ce(N){return N===93?(e.consume(N),E):ne(N)}function E(N){return N===62?(e.consume(N),M):N===45&&o===2?(e.consume(N),E):ne(N)}function M(N){return N===null||xe(N)?(e.exit("htmlFlowData"),G(N)):(e.consume(N),M)}function G(N){return e.exit("htmlFlow"),t(N)}}function mE(e,t,n){const i=this;return o;function o(a){return xe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l):n(a)}function l(a){return i.parser.lazy[i.now().line]?n(a):t(a)}}function gE(e,t,n){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ls,t,n)}}const yE={name:"htmlText",tokenize:wE};function wE(e,t,n){const i=this;let o,l,a;return c;function c(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),f}function f(E){return E===33?(e.consume(E),h):E===47?(e.consume(E),j):E===63?(e.consume(E),T):Lt(E)?(e.consume(E),ie):n(E)}function h(E){return E===45?(e.consume(E),p):E===91?(e.consume(E),l=0,k):Lt(E)?(e.consume(E),b):n(E)}function p(E){return E===45?(e.consume(E),v):n(E)}function m(E){return E===null?n(E):E===45?(e.consume(E),w):xe(E)?(a=m,ge(E)):(e.consume(E),m)}function w(E){return E===45?(e.consume(E),v):m(E)}function v(E){return E===62?pe(E):E===45?w(E):m(E)}function k(E){const M="CDATA[";return E===M.charCodeAt(l++)?(e.consume(E),l===M.length?_:k):n(E)}function _(E){return E===null?n(E):E===93?(e.consume(E),A):xe(E)?(a=_,ge(E)):(e.consume(E),_)}function A(E){return E===93?(e.consume(E),S):_(E)}function S(E){return E===62?pe(E):E===93?(e.consume(E),S):_(E)}function b(E){return E===null||E===62?pe(E):xe(E)?(a=b,ge(E)):(e.consume(E),b)}function T(E){return E===null?n(E):E===63?(e.consume(E),$):xe(E)?(a=T,ge(E)):(e.consume(E),T)}function $(E){return E===62?pe(E):T(E)}function j(E){return Lt(E)?(e.consume(E),P):n(E)}function P(E){return E===45||It(E)?(e.consume(E),P):H(E)}function H(E){return xe(E)?(a=H,ge(E)):Re(E)?(e.consume(E),H):pe(E)}function ie(E){return E===45||It(E)?(e.consume(E),ie):E===47||E===62||Ge(E)?ue(E):n(E)}function ue(E){return E===47?(e.consume(E),pe):E===58||E===95||Lt(E)?(e.consume(E),R):xe(E)?(a=ue,ge(E)):Re(E)?(e.consume(E),ue):pe(E)}function R(E){return E===45||E===46||E===58||E===95||It(E)?(e.consume(E),R):X(E)}function X(E){return E===61?(e.consume(E),ne):xe(E)?(a=X,ge(E)):Re(E)?(e.consume(E),X):ue(E)}function ne(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),o=E,de):xe(E)?(a=ne,ge(E)):Re(E)?(e.consume(E),ne):(e.consume(E),te)}function de(E){return E===o?(e.consume(E),o=void 0,Q):E===null?n(E):xe(E)?(a=de,ge(E)):(e.consume(E),de)}function te(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||Ge(E)?ue(E):(e.consume(E),te)}function Q(E){return E===47||E===62||Ge(E)?ue(E):n(E)}function pe(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):n(E)}function ge(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),ee}function ee(E){return Re(E)?Me(e,ce,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):ce(E)}function ce(E){return e.enter("htmlTextData"),a(E)}}const uf={name:"labelEnd",resolveAll:SE,resolveTo:CE,tokenize:_E},vE={tokenize:EE},kE={tokenize:bE},xE={tokenize:IE};function SE(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",t+=o}}return e.length!==n.length&&qt(e,0,e.length,n),e}function CE(e,t){let n=e.length,i=0,o,l,a,c;for(;n--;)if(o=e[n][1],l){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(l=n,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(a=n);const f={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[l][1].start},end:{...e[a][1].end}},p={type:"labelText",start:{...e[l+i+2][1].end},end:{...e[a-2][1].start}};return c=[["enter",f,t],["enter",h,t]],c=nn(c,e.slice(l+1,l+i+3)),c=nn(c,[["enter",p,t]]),c=nn(c,Ol(t.parser.constructs.insideSpan.null,e.slice(l+i+4,a-3),t)),c=nn(c,[["exit",p,t],e[a-2],e[a-1],["exit",h,t]]),c=nn(c,e.slice(a+1)),c=nn(c,[["exit",f,t]]),qt(e,l,e.length,c),e}function _E(e,t,n){const i=this;let o=i.events.length,l,a;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){l=i.events[o][1];break}return c;function c(w){return l?l._inactive?m(w):(a=i.parser.defined.includes(gn(i.sliceSerialize({start:l.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(w),e.exit("labelMarker"),e.exit("labelEnd"),f):n(w)}function f(w){return w===40?e.attempt(vE,p,a?p:m)(w):w===91?e.attempt(kE,p,a?h:m)(w):a?p(w):m(w)}function h(w){return e.attempt(xE,p,m)(w)}function p(w){return t(w)}function m(w){return l._balanced=!0,n(w)}}function EE(e,t,n){return i;function i(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return Ge(m)?vs(e,l)(m):l(m)}function l(m){return m===41?p(m):Ey(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function a(m){return Ge(m)?vs(e,f)(m):p(m)}function c(m){return n(m)}function f(m){return m===34||m===39||m===40?Iy(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function h(m){return Ge(m)?vs(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function bE(e,t,n){const i=this;return o;function o(c){return by.call(i,e,l,a,"reference","referenceMarker","referenceString")(c)}function l(c){return i.parser.defined.includes(gn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function a(c){return n(c)}}function IE(e,t,n){return i;function i(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),o}function o(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const NE={name:"labelStartImage",resolveAll:uf.resolveAll,tokenize:AE};function AE(e,t,n){const i=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),l}function l(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):n(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):t(c)}}const TE={name:"labelStartLink",resolveAll:uf.resolveAll,tokenize:PE};function PE(e,t,n){const i=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(a):t(a)}}const Yu={name:"lineEnding",tokenize:LE};function LE(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Me(e,t,"linePrefix")}}const al={name:"thematicBreak",tokenize:RE};function RE(e,t,n){let i=0,o;return l;function l(h){return e.enter("thematicBreak"),a(h)}function a(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),f(h)):i>=3&&(h===null||xe(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===o?(e.consume(h),i++,f):(e.exit("thematicBreakSequence"),Re(h)?Me(e,c,"whitespace")(h):c(h))}}const zt={continuation:{tokenize:DE},exit:zE,name:"list",tokenize:jE},OE={partial:!0,tokenize:$E},ME={partial:!0,tokenize:FE};function jE(e,t,n){const i=this,o=i.events[i.events.length-1];let l=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return c;function c(v){const k=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:Lc(v)){if(i.containerState.type||(i.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(al,n,h)(v):h(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(v)}return n(v)}function f(v){return Lc(v)&&++a<10?(e.consume(v),f):(!i.interrupt||a<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):n(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(Ls,i.interrupt?n:p,e.attempt(OE,w,m))}function p(v){return i.containerState.initialBlankLine=!0,l++,w(v)}function m(v){return Re(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),w):n(v)}function w(v){return i.containerState.size=l+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function DE(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Ls,o,l);function o(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Me(e,t,"listItemIndent",i.containerState.size+1)(c)}function l(c){return i.containerState.furtherBlankLines||!Re(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,a(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(ME,t,a)(c))}function a(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,Me(e,e.attempt(zt,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function FE(e,t,n){const i=this;return Me(e,o,"listItemIndent",i.containerState.size+1);function o(l){const a=i.events[i.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===i.containerState.size?t(l):n(l)}}function zE(e){e.exit(this.containerState.type)}function $E(e,t,n){const i=this;return Me(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(l){const a=i.events[i.events.length-1];return!Re(l)&&a&&a[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const Cm={name:"setextUnderline",resolveTo:BE,tokenize:UE};function BE(e,t){let n=e.length,i,o,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const a={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",l?(e.splice(o,0,["enter",a,t]),e.splice(l+1,0,["exit",e[i][1],t]),e[i][1].end={...e[l][1].end}):e[i][1]=a,e.push(["exit",a,t]),e}function UE(e,t,n){const i=this;let o;return l;function l(h){let p=i.events.length,m;for(;p--;)if(i.events[p][1].type!=="lineEnding"&&i.events[p][1].type!=="linePrefix"&&i.events[p][1].type!=="content"){m=i.events[p][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||m)?(e.enter("setextHeadingLine"),o=h,a(h)):n(h)}function a(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===o?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Re(h)?Me(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||xe(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const GE={tokenize:VE};function VE(e){const t=this,n=e.attempt(Ls,i,e.attempt(this.parser.constructs.flowInitial,o,Me(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Q_,o)),"linePrefix")));return n;function i(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const WE={resolveAll:Ay()},HE=Ny("string"),qE=Ny("text");function Ny(e){return{resolveAll:Ay(e==="text"?KE:void 0),tokenize:t};function t(n){const i=this,o=this.parser.constructs[e],l=n.attempt(o,a,c);return a;function a(p){return h(p)?l(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),f}function f(p){return h(p)?(n.exit("data"),l(p)):(n.consume(p),f)}function h(p){if(p===null)return!0;const m=o[p];let w=-1;if(m)for(;++w<m.length;){const v=m[w];if(!v.previous||v.previous.call(i,i.previous))return!0}return!1}}}function Ay(e){return t;function t(n,i){let o=-1,l;for(;++o<=n.length;)l===void 0?n[o]&&n[o][1].type==="data"&&(l=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==l+2&&(n[l][1].end=n[o-1][1].end,n.splice(l+2,o-l-2),o=l+2),l=void 0);return e?e(n,i):n}}function KE(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],o=t.sliceStream(i);let l=o.length,a=-1,c=0,f;for(;l--;){const h=o[l];if(typeof h=="string"){for(a=h.length;h.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(h===-2)f=!0,c++;else if(h!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:i.start._bufferIndex+a,_index:i.start._index+l,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const QE={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:xy},XE={91:eE},YE={[-2]:Xu,[-1]:Xu,32:Xu},JE={35:oE,42:al,45:[Cm,al],60:cE,61:Cm,95:al,96:xm,126:xm},ZE={38:Cy,92:Sy},eb={[-5]:Yu,[-4]:Yu,[-3]:Yu,33:NE,38:Cy,42:Rc,60:[T_,yE],91:TE,92:[iE,Sy],93:uf,95:Rc,96:G_},tb={null:[Rc,WE]},nb={null:[42,95]},rb={null:[]},ib=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:nb,contentInitial:XE,disable:rb,document:QE,flow:JE,flowInitial:YE,insideSpan:tb,string:ZE,text:eb},Symbol.toStringTag,{value:"Module"}));function sb(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},l=[];let a=[],c=[];const f={attempt:H(j),check:H(P),consume:b,enter:T,exit:$,interrupt:H(P,{interrupt:!0})},h={code:null,containerState:{},defineSkip:_,events:[],now:k,parser:e,previous:null,sliceSerialize:w,sliceStream:v,write:m};let p=t.tokenize.call(h,f);return t.resolveAll&&l.push(t),h;function m(X){return a=nn(a,X),A(),a[a.length-1]!==null?[]:(ie(t,0),h.events=Ol(l,h.events,h),h.events)}function w(X,ne){return lb(v(X),ne)}function v(X){return ob(a,X)}function k(){const{_bufferIndex:X,_index:ne,line:de,column:te,offset:Q}=i;return{_bufferIndex:X,_index:ne,line:de,column:te,offset:Q}}function _(X){o[X.line]=X.column,R()}function A(){let X;for(;i._index<a.length;){const ne=a[i._index];if(typeof ne=="string")for(X=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===X&&i._bufferIndex<ne.length;)S(ne.charCodeAt(i._bufferIndex));else S(ne)}}function S(X){p=p(X)}function b(X){xe(X)?(i.line++,i.column=1,i.offset+=X===-3?2:1,R()):X!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===a[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=X}function T(X,ne){const de=ne||{};return de.type=X,de.start=k(),h.events.push(["enter",de,h]),c.push(de),de}function $(X){const ne=c.pop();return ne.end=k(),h.events.push(["exit",ne,h]),ne}function j(X,ne){ie(X,ne.from)}function P(X,ne){ne.restore()}function H(X,ne){return de;function de(te,Q,pe){let ge,ee,ce,E;return Array.isArray(te)?G(te):"tokenize"in te?G([te]):M(te);function M(me){return Oe;function Oe(Ae){const je=Ae!==null&&me[Ae],Qe=Ae!==null&&me.null,on=[...Array.isArray(je)?je:je?[je]:[],...Array.isArray(Qe)?Qe:Qe?[Qe]:[]];return G(on)(Ae)}}function G(me){return ge=me,ee=0,me.length===0?pe:N(me[ee])}function N(me){return Oe;function Oe(Ae){return E=ue(),ce=me,me.partial||(h.currentConstruct=me),me.name&&h.parser.constructs.disable.null.includes(me.name)?Ie():me.tokenize.call(ne?Object.assign(Object.create(h),ne):h,f,we,Ie)(Ae)}}function we(me){return X(ce,E),Q}function Ie(me){return E.restore(),++ee<ge.length?N(ge[ee]):pe}}}function ie(X,ne){X.resolveAll&&!l.includes(X)&&l.push(X),X.resolve&&qt(h.events,ne,h.events.length-ne,X.resolve(h.events.slice(ne),h)),X.resolveTo&&(h.events=X.resolveTo(h.events,h))}function ue(){const X=k(),ne=h.previous,de=h.currentConstruct,te=h.events.length,Q=Array.from(c);return{from:te,restore:pe};function pe(){i=X,h.previous=ne,h.currentConstruct=de,h.events.length=te,c=Q,R()}}function R(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function ob(e,t){const n=t.start._index,i=t.start._bufferIndex,o=t.end._index,l=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(i,l)];else{if(a=e.slice(n,o),i>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(i):a.shift()}l>0&&a.push(e[o].slice(0,l))}return a}function lb(e,t){let n=-1;const i=[];let o;for(;++n<e.length;){const l=e[n];let a;if(typeof l=="string")a=l;else switch(l){case-5:{a="\r";break}case-4:{a=`
165
- `;break}case-3:{a=`\r
166
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(l)}o=l===-2,i.push(a)}return i.join("")}function ab(e){const i={constructs:vy([ib,...(e||{}).extensions||[]]),content:o(C_),defined:[],document:o(E_),flow:o(GE),lazy:{},string:o(HE),text:o(qE)};return i;function o(l){return a;function a(c){return sb(i,l,c)}}}function ub(e){for(;!_y(e););return e}const _m=/[\0\t\n\r]/g;function cb(){let e=1,t="",n=!0,i;return o;function o(l,a,c){const f=[];let h,p,m,w,v;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(a||void 0).decode(l)),m=0,t="",n&&(l.charCodeAt(0)===65279&&m++,n=void 0);m<l.length;){if(_m.lastIndex=m,h=_m.exec(l),w=h&&h.index!==void 0?h.index:l.length,v=l.charCodeAt(w),!h){t=l.slice(m);break}if(v===10&&m===w&&i)f.push(-3),i=void 0;else switch(i&&(f.push(-5),i=void 0),m<w&&(f.push(l.slice(m,w)),e+=w-m),v){case 0:{f.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,f.push(-2);e++<p;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:i=!0,e=1}m=w+1}return c&&(i&&f.push(-5),t&&f.push(t),f.push(null)),f}}const fb=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function db(e){return e.replace(fb,hb)}function hb(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),l=o===120||o===88;return ky(n.slice(l?2:1),l?16:10)}return af(n)||e}const Ty={}.hasOwnProperty;function pb(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),mb(n)(ub(ab(n).document().write(cb()(e,t,!0))))}function mb(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Xe),autolinkProtocol:ue,autolinkEmail:ue,atxHeading:l(ye),blockQuote:l(Qe),characterEscape:ue,characterReference:ue,codeFenced:l(on),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(on,a),codeText:l(Fr,a),codeTextData:ue,data:ue,codeFlowValue:ue,definition:l(B),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(K),hardBreakEscape:l(_e),hardBreakTrailing:l(_e),htmlFlow:l(De,a),htmlFlowData:ue,htmlText:l(De,a),htmlTextData:ue,image:l(Te),label:a,link:l(Xe),listItem:l(We),listItemValue:w,listOrdered:l(st,m),listUnordered:l(st),paragraph:l(bn),reference:N,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(ye),strong:l(fr),thematicBreak:l(Ms)},exit:{atxHeading:f(),atxHeadingSequence:j,autolink:f(),autolinkEmail:je,autolinkProtocol:Ae,blockQuote:f(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:Ie,characterReferenceMarkerNumeric:Ie,characterReferenceValue:me,characterReference:Oe,codeFenced:f(A),codeFencedFence:_,codeFencedFenceInfo:v,codeFencedFenceMeta:k,codeFlowValue:R,codeIndented:f(S),codeText:f(Q),codeTextData:R,data:R,definition:f(),definitionDestinationString:$,definitionLabelString:b,definitionTitleString:T,emphasis:f(),hardBreakEscape:f(ne),hardBreakTrailing:f(ne),htmlFlow:f(de),htmlFlowData:R,htmlText:f(te),htmlTextData:R,image:f(ge),label:ce,labelText:ee,lineEnding:X,link:f(pe),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:we,resourceDestinationString:E,resourceTitleString:M,resource:G,setextHeading:f(ie),setextHeadingLineSequence:H,setextHeadingText:P,strong:f(),thematicBreak:f()}};Py(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(U){let re={type:"root",children:[]};const Se={stack:[re],tokenStack:[],config:t,enter:c,exit:h,buffer:a,resume:p,data:n},Pe=[];let Fe=-1;for(;++Fe<U.length;)if(U[Fe][1].type==="listOrdered"||U[Fe][1].type==="listUnordered")if(U[Fe][0]==="enter")Pe.push(Fe);else{const yt=Pe.pop();Fe=o(U,yt,Fe)}for(Fe=-1;++Fe<U.length;){const yt=t[U[Fe][0]];Ty.call(yt,U[Fe][1].type)&&yt[U[Fe][1].type].call(Object.assign({sliceSerialize:U[Fe][2].sliceSerialize},Se),U[Fe][1])}if(Se.tokenStack.length>0){const yt=Se.tokenStack[Se.tokenStack.length-1];(yt[1]||Em).call(Se,void 0,yt[0])}for(re.position={start:or(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:or(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},Fe=-1;++Fe<t.transforms.length;)re=t.transforms[Fe](re)||re;return re}function o(U,re,Se){let Pe=re-1,Fe=-1,yt=!1,In,Kt,$n,dr;for(;++Pe<=Se;){const wt=U[Pe];switch(wt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{wt[0]==="enter"?Fe++:Fe--,dr=void 0;break}case"lineEndingBlank":{wt[0]==="enter"&&(In&&!dr&&!Fe&&!$n&&($n=Pe),dr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:dr=void 0}if(!Fe&&wt[0]==="enter"&&wt[1].type==="listItemPrefix"||Fe===-1&&wt[0]==="exit"&&(wt[1].type==="listUnordered"||wt[1].type==="listOrdered")){if(In){let yn=Pe;for(Kt=void 0;yn--;){const Bt=U[yn];if(Bt[1].type==="lineEnding"||Bt[1].type==="lineEndingBlank"){if(Bt[0]==="exit")continue;Kt&&(U[Kt][1].type="lineEndingBlank",yt=!0),Bt[1].type="lineEnding",Kt=yn}else if(!(Bt[1].type==="linePrefix"||Bt[1].type==="blockQuotePrefix"||Bt[1].type==="blockQuotePrefixWhitespace"||Bt[1].type==="blockQuoteMarker"||Bt[1].type==="listItemIndent"))break}$n&&(!Kt||$n<Kt)&&(In._spread=!0),In.end=Object.assign({},Kt?U[Kt][1].start:wt[1].end),U.splice(Kt||Pe,0,["exit",In,wt[2]]),Pe++,Se++}if(wt[1].type==="listItemPrefix"){const yn={type:"listItem",_spread:!1,start:Object.assign({},wt[1].start),end:void 0};In=yn,U.splice(Pe,0,["enter",yn,wt[2]]),Pe++,Se++,$n=void 0,dr=!0}}}return U[re][1]._spread=yt,Se}function l(U,re){return Se;function Se(Pe){c.call(this,U(Pe),Pe),re&&re.call(this,Pe)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(U,re,Se){this.stack[this.stack.length-1].children.push(U),this.stack.push(U),this.tokenStack.push([re,Se||void 0]),U.position={start:or(re.start),end:void 0}}function f(U){return re;function re(Se){U&&U.call(this,Se),h.call(this,Se)}}function h(U,re){const Se=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==U.type&&(re?re.call(this,U,Pe[0]):(Pe[1]||Em).call(this,U,Pe[0]));else throw new Error("Cannot close `"+U.type+"` ("+ws({start:U.start,end:U.end})+"): it’s not open");Se.position.end=or(U.end)}function p(){return lf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function w(U){if(this.data.expectingFirstListItemValue){const re=this.stack[this.stack.length-2];re.start=Number.parseInt(this.sliceSerialize(U),10),this.data.expectingFirstListItemValue=void 0}}function v(){const U=this.resume(),re=this.stack[this.stack.length-1];re.lang=U}function k(){const U=this.resume(),re=this.stack[this.stack.length-1];re.meta=U}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const U=this.resume(),re=this.stack[this.stack.length-1];re.value=U.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const U=this.resume(),re=this.stack[this.stack.length-1];re.value=U.replace(/(\r?\n|\r)$/g,"")}function b(U){const re=this.resume(),Se=this.stack[this.stack.length-1];Se.label=re,Se.identifier=gn(this.sliceSerialize(U)).toLowerCase()}function T(){const U=this.resume(),re=this.stack[this.stack.length-1];re.title=U}function $(){const U=this.resume(),re=this.stack[this.stack.length-1];re.url=U}function j(U){const re=this.stack[this.stack.length-1];if(!re.depth){const Se=this.sliceSerialize(U).length;re.depth=Se}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function H(U){const re=this.stack[this.stack.length-1];re.depth=this.sliceSerialize(U).codePointAt(0)===61?1:2}function ie(){this.data.setextHeadingSlurpLineEnding=void 0}function ue(U){const Se=this.stack[this.stack.length-1].children;let Pe=Se[Se.length-1];(!Pe||Pe.type!=="text")&&(Pe=Os(),Pe.position={start:or(U.start),end:void 0},Se.push(Pe)),this.stack.push(Pe)}function R(U){const re=this.stack.pop();re.value+=this.sliceSerialize(U),re.position.end=or(U.end)}function X(U){const re=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Se=re.children[re.children.length-1];Se.position.end=or(U.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(re.type)&&(ue.call(this,U),R.call(this,U))}function ne(){this.data.atHardBreak=!0}function de(){const U=this.resume(),re=this.stack[this.stack.length-1];re.value=U}function te(){const U=this.resume(),re=this.stack[this.stack.length-1];re.value=U}function Q(){const U=this.resume(),re=this.stack[this.stack.length-1];re.value=U}function pe(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=re,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function ge(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=re,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function ee(U){const re=this.sliceSerialize(U),Se=this.stack[this.stack.length-2];Se.label=db(re),Se.identifier=gn(re).toLowerCase()}function ce(){const U=this.stack[this.stack.length-1],re=this.resume(),Se=this.stack[this.stack.length-1];if(this.data.inReference=!0,Se.type==="link"){const Pe=U.children;Se.children=Pe}else Se.alt=re}function E(){const U=this.resume(),re=this.stack[this.stack.length-1];re.url=U}function M(){const U=this.resume(),re=this.stack[this.stack.length-1];re.title=U}function G(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function we(U){const re=this.resume(),Se=this.stack[this.stack.length-1];Se.label=re,Se.identifier=gn(this.sliceSerialize(U)).toLowerCase(),this.data.referenceType="full"}function Ie(U){this.data.characterReferenceType=U.type}function me(U){const re=this.sliceSerialize(U),Se=this.data.characterReferenceType;let Pe;Se?(Pe=ky(re,Se==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=af(re);const Fe=this.stack[this.stack.length-1];Fe.value+=Pe}function Oe(U){const re=this.stack.pop();re.position.end=or(U.end)}function Ae(U){R.call(this,U);const re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(U)}function je(U){R.call(this,U);const re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(U)}function Qe(){return{type:"blockquote",children:[]}}function on(){return{type:"code",lang:null,meta:null,value:""}}function Fr(){return{type:"inlineCode",value:""}}function B(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function ye(){return{type:"heading",depth:0,children:[]}}function _e(){return{type:"break"}}function De(){return{type:"html",value:""}}function Te(){return{type:"image",title:null,url:"",alt:null}}function Xe(){return{type:"link",title:null,url:"",children:[]}}function st(U){return{type:"list",ordered:U.type==="listOrdered",start:null,spread:U._spread,children:[]}}function We(U){return{type:"listItem",spread:U._spread,checked:null,children:[]}}function bn(){return{type:"paragraph",children:[]}}function fr(){return{type:"strong",children:[]}}function Os(){return{type:"text",value:""}}function Ms(){return{type:"thematicBreak"}}}function or(e){return{line:e.line,column:e.column,offset:e.offset}}function Py(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?Py(e,i):gb(e,i)}}function gb(e,t){let n;for(n in t)if(Ty.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function Em(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ws({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ws({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ws({start:t.start,end:t.end})+") is still open")}function yb(e){const t=this;t.parser=n;function n(i){return pb(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function wb(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function vb(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
167
- `}]}function kb(e,t){const n=t.value?t.value+`
168
- `:"",i={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(i.className=["language-"+o[0]]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function xb(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sb(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Cb(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=_i(i.toLowerCase()),l=e.footnoteOrder.indexOf(i);let a,c=e.footnoteCounts.get(i);c===void 0?(c=0,e.footnoteOrder.push(i),a=e.footnoteOrder.length):a=l+1,c+=1,e.footnoteCounts.set(i,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function _b(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Eb(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ly(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const o=e.all(t),l=o[0];l&&l.type==="text"?l.value="["+l.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=i:o.push({type:"text",value:i}),o}function bb(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Ly(e,t);const o={src:_i(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const l={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,l),e.applyData(t,l)}function Ib(e,t){const n={src:_i(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function Nb(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function Ab(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Ly(e,t);const o={href:_i(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const l={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function Tb(e,t){const n={href:_i(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Pb(e,t,n){const i=e.all(t),o=n?Lb(n):Ry(t),l={},a=[];if(typeof t.checked=="boolean"){const p=i[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},i.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let c=-1;for(;++c<i.length;){const p=i[c];(o||c!==0||p.type!=="element"||p.tagName!=="p")&&a.push({type:"text",value:`
169
- `}),p.type==="element"&&p.tagName==="p"&&!o?a.push(...p.children):a.push(p)}const f=i[i.length-1];f&&(o||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
170
- `});const h={type:"element",tagName:"li",properties:l,children:a};return e.patch(t,h),e.applyData(t,h)}function Lb(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=Ry(n[i])}return t}function Ry(e){const t=e.spread;return t??e.children.length>1}function Rb(e,t){const n={},i=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<i.length;){const a=i[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function Ob(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mb(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function jb(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Db(e,t){const n=e.all(t),i=n.shift(),o=[];if(i){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=nf(t.children[1]),f=dy(t.children[t.children.length-1]);c&&f&&(a.position={start:c,end:f}),o.push(a)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,l),e.applyData(t,l)}function Fb(e,t,n){const i=n?n.children:void 0,l=(i?i.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,c=a?a.length:t.children.length;let f=-1;const h=[];for(;++f<c;){const m=t.children[f],w={},v=a?a[f]:void 0;v&&(w.align=v);let k={type:"element",tagName:l,properties:w,children:[]};m&&(k.children=e.all(m),e.patch(m,k),k=e.applyData(m,k)),h.push(k)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function zb(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const bm=9,Im=32;function $b(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),o=0;const l=[];for(;i;)l.push(Nm(t.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=n.exec(t);return l.push(Nm(t.slice(o),o>0,!1)),l.join("")}function Nm(e,t,n){let i=0,o=e.length;if(t){let l=e.codePointAt(i);for(;l===bm||l===Im;)i++,l=e.codePointAt(i)}if(n){let l=e.codePointAt(o-1);for(;l===bm||l===Im;)o--,l=e.codePointAt(o-1)}return o>i?e.slice(i,o):""}function Bb(e,t){const n={type:"text",value:$b(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Ub(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Gb={blockquote:wb,break:vb,code:kb,delete:xb,emphasis:Sb,footnoteReference:Cb,heading:_b,html:Eb,imageReference:bb,image:Ib,inlineCode:Nb,linkReference:Ab,link:Tb,listItem:Pb,list:Rb,paragraph:Ob,root:Mb,strong:jb,table:Db,tableCell:zb,tableRow:Fb,text:Bb,thematicBreak:Ub,toml:tl,yaml:tl,definition:tl,footnoteDefinition:tl};function tl(){}const Oy=-1,Ml=0,ks=1,Cl=2,cf=3,ff=4,df=5,hf=6,My=7,jy=8,{defineProperty:Vb}=Object,Dy=typeof self=="object"?self:globalThis,Am=(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 Dy[e](t)},Wb=(e,t)=>{const n=(o,l)=>(e.set(l,o),o),i=o=>{if(e.has(o))return e.get(o);const[l,a]=t[o];switch(l){case Ml:case Oy:return n(a,o);case ks:{const c=n([],o);for(const f of a)c.push(i(f));return c}case Cl:{const c=n({},o);for(const[f,h]of a){const p=i(f),m=i(h);p==="__proto__"?Vb(c,p,{value:m,configurable:!0,enumerable:!0,writable:!0}):c[p]=m}return c}case cf:return n(new Date(a),o);case ff:{const{source:c,flags:f}=a;return n(new RegExp(c,f),o)}case df:{const c=n(new Map,o);for(const[f,h]of a)c.set(i(f),i(h));return c}case hf:{const c=n(new Set,o);for(const f of a)c.add(i(f));return c}case My:{const{name:c,message:f}=a;return n(typeof Dy[c]=="function"?Am(c,f):new Error(f),o)}case jy:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:c}=new Uint8Array(a);return n(new DataView(c),a)}case"-0":return-0}return n(Am(l,a),o)};return i},Tm=e=>Wb(new Map,e)(0),Ar="",{toString:Hb}={},{keys:qb,is:Kb}=Object,hs=e=>{const t=typeof e;if(t!=="object"||!e)return[Ml,t];const n=Hb.call(e).slice(8,-1);switch(n){case"Array":return[ks,Ar];case"Object":return[Cl,Ar];case"Date":return[cf,Ar];case"RegExp":return[ff,Ar];case"Map":return[df,Ar];case"Set":return[hf,Ar];case"DataView":return[ks,n]}return n.includes("Array")?[ks,n]:e instanceof Error?[My,e.name||"Error"]:[Cl,n]},nl=([e,t])=>e===Ml&&(t==="function"||t==="symbol"),Qb=(e,t,n,i)=>{const o=(a,c)=>{const f=i.push(a)-1;return n.set(c,f),f},l=a=>{if(n.has(a))return n.get(a);let[c,f]=hs(a);switch(c){case Ml:{let p=a;switch(f){case"bigint":c=jy,p=a.toString();break;case"number":if(!a&&Kb(a,-0))return i.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);p=null;break;case"undefined":return o([Oy],a)}return o([c,p],a)}case ks:{if(f){let w=a;return f==="DataView"?w=new Uint8Array(a.buffer):f==="ArrayBuffer"&&(w=new Uint8Array(a)),o([f,[...w]],a)}const p=[],m=o([c,p],a);for(const w of a)p.push(l(w));return m}case Cl:{if(f)switch(f){case"BigInt":return o([f,a.toString()],a);case"Boolean":case"Number":case"String":return o([f,a.valueOf()],a)}if(t&&"toJSON"in a)return l(a.toJSON());const p=[],m=o([c,p],a);for(const w of qb(a))(e||!nl(hs(a[w])))&&p.push([l(w),l(a[w])]);return m}case cf:return o([c,isNaN(a.getTime())?Ar:a.toISOString()],a);case ff:{const{source:p,flags:m}=a;return o([c,{source:p,flags:m}],a)}case df:{const p=[],m=o([c,p],a);for(const[w,v]of a)(e||!(nl(hs(w))||nl(hs(v))))&&p.push([l(w),l(v)]);return m}case hf:{const p=[],m=o([c,p],a);for(const w of a)(e||!nl(hs(w)))&&p.push(l(w));return m}}const{message:h}=a;return o([c,{name:f,message:h}],a)};return l},Pm=(e,{json:t,lossy:n}={})=>{const i=[];return Qb(!(t||n),!!t,new Map,i)(e),i},_l=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Tm(Pm(e,t)):structuredClone(e):(e,t)=>Tm(Pm(e,t));function Xb(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Yb(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Jb(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Xb,i=e.options.footnoteBackLabel||Yb,o=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const p=e.all(h),m=String(h.identifier).toUpperCase(),w=_i(m.toLowerCase());let v=0;const k=[],_=e.footnoteCounts.get(m);for(;_!==void 0&&++v<=_;){k.length>0&&k.push({type:"text",value:" "});let b=typeof n=="string"?n:n(f,v);typeof b=="string"&&(b={type:"text",value:b}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+w+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,v),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const b=A.children[A.children.length-1];b&&b.type==="text"?b.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...k)}else p.push(...k);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+w},children:e.wrap(p,!0)};e.patch(h,S),c.push(S)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{..._l(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
171
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
172
- `}]}}const jl=(function(e){if(e==null)return nI;if(typeof e=="function")return Dl(e);if(typeof e=="object")return Array.isArray(e)?Zb(e):eI(e);if(typeof e=="string")return tI(e);throw new Error("Expected function, string, or object as test")});function Zb(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=jl(e[n]);return Dl(i);function i(...o){let l=-1;for(;++l<t.length;)if(t[l].apply(this,o))return!0;return!1}}function eI(e){const t=e;return Dl(n);function n(i){const o=i;let l;for(l in e)if(o[l]!==t[l])return!1;return!0}}function tI(e){return Dl(t);function t(n){return n&&n.type===e}}function Dl(e){return t;function t(n,i,o){return!!(rI(n)&&e.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function nI(){return!0}function rI(e){return e!==null&&typeof e=="object"&&"type"in e}const Fy=[],iI=!0,Oc=!1,sI="skip";function zy(e,t,n,i){let o;typeof t=="function"&&typeof n!="function"?(i=n,n=t):o=t;const l=jl(o),a=i?-1:1;c(e,void 0,[])();function c(f,h,p){const m=f&&typeof f=="object"?f:{};if(typeof m.type=="string"){const v=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(w,"name",{value:"node ("+(f.type+(v?"<"+v+">":""))+")"})}return w;function w(){let v=Fy,k,_,A;if((!t||l(f,h,p[p.length-1]||void 0))&&(v=oI(n(f,p)),v[0]===Oc))return v;if("children"in f&&f.children){const S=f;if(S.children&&v[0]!==sI)for(_=(i?S.children.length:-1)+a,A=p.concat(S);_>-1&&_<S.children.length;){const b=S.children[_];if(k=c(b,_,A)(),k[0]===Oc)return k;_=typeof k[1]=="number"?k[1]:_+a}}return v}}}function oI(e){return Array.isArray(e)?e:typeof e=="number"?[iI,e]:e==null?Fy:[e]}function pf(e,t,n,i){let o,l,a;typeof t=="function"&&typeof n!="function"?(l=void 0,a=t,o=n):(l=t,a=n,o=i),zy(e,l,c,o);function c(f,h){const p=h[h.length-1],m=p?p.children.indexOf(f):void 0;return a(f,m,p)}}const Mc={}.hasOwnProperty,lI={};function aI(e,t){const n=t||lI,i=new Map,o=new Map,l=new Map,a={...Gb,...n.handlers},c={all:h,applyData:cI,definitionById:i,footnoteById:o,footnoteCounts:l,footnoteOrder:[],handlers:a,one:f,options:n,patch:uI,wrap:dI};return pf(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?i:o,w=String(p.identifier).toUpperCase();m.has(w)||m.set(w,p)}}),c;function f(p,m){const w=p.type,v=c.handlers[w];if(Mc.call(c.handlers,w)&&v)return v(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(w)){if("children"in p){const{children:_,...A}=p,S=_l(A);return S.children=c.all(p),S}return _l(p)}return(c.options.unknownHandler||fI)(c,p,m)}function h(p){const m=[];if("children"in p){const w=p.children;let v=-1;for(;++v<w.length;){const k=c.one(w[v],p);if(k){if(v&&w[v-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=Lm(k.value)),!Array.isArray(k)&&k.type==="element")){const _=k.children[0];_&&_.type==="text"&&(_.value=Lm(_.value))}Array.isArray(k)?m.push(...k):m.push(k)}}}return m}}function uI(e,t){e.position&&(t.position=QC(e))}function cI(e,t){let n=t;if(e&&e.data){const i=e.data.hName,o=e.data.hChildren,l=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const a="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:a}}n.type==="element"&&l&&Object.assign(n.properties,_l(l)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function fI(e,t){const n=t.data||{},i="value"in t&&!(Mc.call(n,"hProperties")||Mc.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function dI(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
173
- `});++i<e.length;)i&&n.push({type:"text",value:`
174
- `}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
175
- `}),n}function Lm(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Rm(e,t){const n=aI(e,t),i=n.one(e,void 0),o=Jb(n),l=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&l.children.push({type:"text",value:`
176
- `},o),l}function hI(e,t){return e&&"run"in e?async function(n,i){const o=Rm(n,{file:i,...t});await e.run(o,i)}:function(n,i){return Rm(n,{file:i,...e||t})}}function Om(e){if(e)throw e}var Ju,Mm;function pI(){if(Mm)return Ju;Mm=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},l=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!m)return!1;var w;for(w in h);return typeof w>"u"||e.call(h,w)},a=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},c=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(i)return i(h,p).value}else return;return h[p]};return Ju=function f(){var h,p,m,w,v,k,_=arguments[0],A=1,S=arguments.length,b=!1;for(typeof _=="boolean"&&(b=_,_=arguments[1]||{},A=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});A<S;++A)if(h=arguments[A],h!=null)for(p in h)m=c(_,p),w=c(h,p),_!==w&&(b&&w&&(l(w)||(v=o(w)))?(v?(v=!1,k=m&&o(m)?m:[]):k=m&&l(m)?m:{},a(_,{name:p,newValue:f(b,k,w)})):typeof w<"u"&&a(_,{name:p,newValue:w}));return _},Ju}var mI=pI();const Zu=zc(mI);function jc(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 gI(){const e=[],t={run:n,use:i};return t;function n(...o){let l=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);c(null,...o);function c(f,...h){const p=e[++l];let m=-1;if(f){a(f);return}for(;++m<o.length;)(h[m]===null||h[m]===void 0)&&(h[m]=o[m]);o=h,p?yI(p,c)(...h):a(null,...h)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function yI(e,t){let n;return i;function i(...a){const c=e.length>a.length;let f;c&&a.push(o);try{f=e.apply(this,a)}catch(h){const p=h;if(c&&n)throw p;return o(p)}c||(f&&f.then&&typeof f.then=="function"?f.then(l,o):f instanceof Error?o(f):l(f))}function o(a,...c){n||(n=!0,t(a,...c))}function l(a){o(null,a)}}const _n={basename:wI,dirname:vI,extname:kI,join:xI,sep:"/"};function wI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Rs(e);let n=0,i=-1,o=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(l){n=o+1;break}}else i<0&&(l=!0,i=o+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let a=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(l){n=o+1;break}}else a<0&&(l=!0,a=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(i=o):(c=-1,i=a));return n===i?i=a:i<0&&(i=e.length),e.slice(n,i)}function vI(e){if(Rs(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function kI(e){Rs(e);let t=e.length,n=-1,i=0,o=-1,l=0,a;for(;t--;){const c=e.codePointAt(t);if(c===47){if(a){i=t+1;break}continue}n<0&&(a=!0,n=t+1),c===46?o<0?o=t:l!==1&&(l=1):o>-1&&(l=-1)}return o<0||n<0||l===0||l===1&&o===n-1&&o===i+1?"":e.slice(o,n)}function xI(...e){let t=-1,n;for(;++t<e.length;)Rs(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":SI(n)}function SI(e){Rs(e);const t=e.codePointAt(0)===47;let n=CI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function CI(e,t){let n="",i=0,o=-1,l=0,a=-1,c,f;for(;++a<=e.length;){if(a<e.length)c=e.codePointAt(a);else{if(c===47)break;c=47}if(c===47){if(!(o===a-1||l===1))if(o!==a-1&&l===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",i=0):(n=n.slice(0,f),i=n.length-1-n.lastIndexOf("/")),o=a,l=0;continue}}else if(n.length>0){n="",i=0,o=a,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),i=a-o-1;o=a,l=0}else c===46&&l>-1?l++:l=-1}return n}function Rs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _I={cwd:EI};function EI(){return"/"}function Dc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function bI(e){if(typeof e=="string")e=new URL(e);else if(!Dc(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 II(e)}function II(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===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 ec=["history","path","basename","stem","extname","dirname"];class $y{constructor(t){let n;t?Dc(t)?n={path:t}:typeof t=="string"||NI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":_I.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<ec.length;){const l=ec[i];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let o;for(o in n)ec.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?_n.basename(this.path):void 0}set basename(t){nc(t,"basename"),tc(t,"basename"),this.path=_n.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?_n.dirname(this.path):void 0}set dirname(t){jm(this.basename,"dirname"),this.path=_n.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?_n.extname(this.path):void 0}set extname(t){if(tc(t,"extname"),jm(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=_n.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Dc(t)&&(t=bI(t)),nc(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?_n.basename(this.path,this.extname):void 0}set stem(t){nc(t,"stem"),tc(t,"stem"),this.path=_n.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const o=this.message(t,n,i);throw o.fatal=!0,o}info(t,n,i){const o=this.message(t,n,i);return o.fatal=void 0,o}message(t,n,i){const o=new Nt(t,n,i);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 tc(e,t){if(e&&e.includes(_n.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+_n.sep+"`")}function nc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function jm(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function NI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const AI=(function(e){const i=this.constructor.prototype,o=i[e],l=function(){return o.apply(l,arguments)};return Object.setPrototypeOf(l,i),l}),TI={}.hasOwnProperty;class mf extends AI{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=gI()}copy(){const t=new mf;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Zu(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(sc("data",this.frozen),this.namespace[t]=n,this):TI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sc("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[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=n.call(t,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=rl(t),i=this.parser||this.Parser;return rc("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),rc("process",this.parser||this.Parser),ic("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(l,a){const c=rl(t),f=i.parse(c);i.run(f,c,function(p,m,w){if(p||!m||!w)return h(p);const v=m,k=i.stringify(v,w);RI(k)?w.value=k:w.result=k,h(p,w)});function h(p,m){p||!m?a(p):l?l(m):n(void 0,m)}}}processSync(t){let n=!1,i;return this.freeze(),rc("processSync",this.parser||this.Parser),ic("processSync",this.compiler||this.Compiler),this.process(t,o),Fm("processSync","process",n),i;function o(l,a){n=!0,Om(l),i=a}}run(t,n,i){Dm(t),this.freeze();const o=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?l(void 0,i):new Promise(l);function l(a,c){const f=rl(n);o.run(t,f,h);function h(p,m,w){const v=m||t;p?c(p):a?a(v):i(void 0,v,w)}}}runSync(t,n){let i=!1,o;return this.run(t,n,l),Fm("runSync","run",i),o;function l(a,c){Om(a),o=c,i=!0}}stringify(t,n){this.freeze();const i=rl(n),o=this.compiler||this.Compiler;return ic("stringify",o),Dm(t),o(t,i)}use(t,...n){const i=this.attachers,o=this.namespace;if(sc("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...m]=h;f(p,m)}else a(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function a(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");c(h.plugins),h.settings&&(o.settings=Zu(!0,o.settings,h.settings))}function c(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const m=h[p];l(m)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,p){let m=-1,w=-1;for(;++m<i.length;)if(i[m][0]===h){w=m;break}if(w===-1)i.push([h,...p]);else if(p.length>0){let[v,...k]=p;const _=i[w][1];jc(_)&&jc(v)&&(v=Zu(!0,_,v)),i[w]=[h,v,...k]}}}}const PI=new mf().freeze();function rc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ic(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sc(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 Dm(e){if(!jc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Fm(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function rl(e){return LI(e)?e:new $y(e)}function LI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function RI(e){return typeof e=="string"||OI(e)}function OI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const MI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",zm=[],$m={allowDangerousHtml:!0},jI=/^(https?|ircs?|mailto|xmpp)$/i,DI=[{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 FI(e){const t=zI(e),n=$I(e);return BI(t.runSync(t.parse(n),n),e)}function zI(e){const t=e.rehypePlugins||zm,n=e.remarkPlugins||zm,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...$m}:$m;return PI().use(yb).use(n).use(hI,i).use(t)}function $I(e){const t=e.children||"",n=new $y;return typeof t=="string"&&(n.value=t),n}function BI(e,t){const n=t.allowedElements,i=t.allowElement,o=t.components,l=t.disallowedElements,a=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||UI;for(const p of DI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+MI+p.id,void 0);return pf(e,h),e_(e,{Fragment:C.Fragment,components:o,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function h(p,m,w){if(p.type==="raw"&&w&&typeof m=="number")return a?w.children.splice(m,1):w.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let v;for(v in Qu)if(Object.hasOwn(Qu,v)&&Object.hasOwn(p.properties,v)){const k=p.properties[v],_=Qu[v];(_===null||_.includes(p.tagName))&&(p.properties[v]=f(String(k||""),v,p))}}if(p.type==="element"){let v=n?!n.includes(p.tagName):l?l.includes(p.tagName):!1;if(!v&&i&&typeof m=="number"&&(v=!i(p,m,w)),v&&w&&typeof m=="number")return c&&p.children?w.children.splice(m,1,...p.children):w.children.splice(m,1),m}}}function UI(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||i!==-1&&t>i||jI.test(e.slice(0,t))?e:""}function GI(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function VI(e,t,n){const o=jl((n||{}).ignore||[]),l=WI(t);let a=-1;for(;++a<l.length;)zy(e,"text",c);function c(h,p){let m=-1,w;for(;++m<p.length;){const v=p[m],k=w?w.children:void 0;if(o(v,k?k.indexOf(v):void 0,w))return;w=v}if(w)return f(h,p)}function f(h,p){const m=p[p.length-1],w=l[a][0],v=l[a][1];let k=0;const A=m.children.indexOf(h);let S=!1,b=[];w.lastIndex=0;let T=w.exec(h.value);for(;T;){const $=T.index,j={index:T.index,input:T.input,stack:[...p,h]};let P=v(...T,j);if(typeof P=="string"&&(P=P.length>0?{type:"text",value:P}:void 0),P===!1?w.lastIndex=$+1:(k!==$&&b.push({type:"text",value:h.value.slice(k,$)}),Array.isArray(P)?b.push(...P):P&&b.push(P),k=$+T[0].length,S=!0),!w.global)break;T=w.exec(h.value)}return S?(k<h.value.length&&b.push({type:"text",value:h.value.slice(k)}),m.children.splice(A,1,...b)):b=[h],A+b.length}}function WI(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const o=n[i];t.push([HI(o[0]),qI(o[1])])}return t}function HI(e){return typeof e=="string"?new RegExp(GI(e),"g"):e}function qI(e){return typeof e=="function"?e:function(){return e}}const oc="phrasing",lc=["autolink","link","image","label"];function KI(){return{transforms:[tN],enter:{literalAutolink:XI,literalAutolinkEmail:ac,literalAutolinkHttp:ac,literalAutolinkWww:ac},exit:{literalAutolink:eN,literalAutolinkEmail:ZI,literalAutolinkHttp:YI,literalAutolinkWww:JI}}}function QI(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:oc,notInConstruct:lc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:oc,notInConstruct:lc},{character:":",before:"[ps]",after:"\\/",inConstruct:oc,notInConstruct:lc}]}}function XI(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ac(e){this.config.enter.autolinkProtocol.call(this,e)}function YI(e){this.config.exit.autolinkProtocol.call(this,e)}function JI(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function ZI(e){this.config.exit.autolinkEmail.call(this,e)}function eN(e){this.exit(e)}function tN(e){VI(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,nN],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),rN]],{ignore:["link","linkReference"]})}function nN(e,t,n,i,o){let l="";if(!By(o)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!iN(n)))return!1;const a=sN(n+i);if(!a[0])return!1;const c={type:"link",title:null,url:l+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[c,{type:"text",value:a[1]}]:c}function rN(e,t,n,i){return!By(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function iN(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function sN(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const o=ml(e,"(");let l=ml(e,")");for(;i!==-1&&o>l;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),l++;return[e,n]}function By(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||jr(n)||Rl(n))&&(!t||n!==47)}Uy.peek=pN;function oN(){this.buffer()}function lN(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function aN(){this.buffer()}function uN(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function cN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fN(e){this.exit(e)}function dN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hN(e){this.exit(e)}function pN(){return"["}function Uy(e,t,n,i){const o=n.createTracker(i);let l=o.move("[^");const a=n.enter("footnoteReference"),c=n.enter("reference");return l+=o.move(n.safe(n.associationId(e),{after:"]",before:l})),c(),a(),l+=o.move("]"),l}function mN(){return{enter:{gfmFootnoteCallString:oN,gfmFootnoteCall:lN,gfmFootnoteDefinitionLabelString:aN,gfmFootnoteDefinition:uN},exit:{gfmFootnoteCallString:cN,gfmFootnoteCall:fN,gfmFootnoteDefinitionLabelString:dN,gfmFootnoteDefinition:hN}}}function gN(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Uy},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,o,l,a){const c=l.createTracker(a);let f=c.move("[^");const h=l.enter("footnoteDefinition"),p=l.enter("label");return f+=c.move(l.safe(l.associationId(i),{before:f,after:"]"})),p(),f+=c.move("]:"),i.children&&i.children.length>0&&(c.shift(4),f+=c.move((t?`
177
- `:" ")+l.indentLines(l.containerFlow(i,c.current()),t?Gy:yN))),h(),f}}function yN(e,t,n){return t===0?e:Gy(e,t,n)}function Gy(e,t,n){return(n?"":" ")+e}const wN=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Vy.peek=CN;function vN(){return{canContainEols:["delete"],enter:{strikethrough:xN},exit:{strikethrough:SN}}}function kN(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:wN}],handlers:{delete:Vy}}}function xN(e){this.enter({type:"delete",children:[]},e)}function SN(e){this.exit(e)}function Vy(e,t,n,i){const o=n.createTracker(i),l=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),l(),a}function CN(){return"~"}function _N(e){return e.length}function EN(e,t){const n=t||{},i=(n.align||[]).concat(),o=n.stringLength||_N,l=[],a=[],c=[],f=[];let h=0,p=-1;for(;++p<e.length;){const _=[],A=[];let S=-1;for(e[p].length>h&&(h=e[p].length);++S<e[p].length;){const b=bN(e[p][S]);if(n.alignDelimiters!==!1){const T=o(b);A[S]=T,(f[S]===void 0||T>f[S])&&(f[S]=T)}_.push(b)}a[p]=_,c[p]=A}let m=-1;if(typeof i=="object"&&"length"in i)for(;++m<h;)l[m]=Bm(i[m]);else{const _=Bm(i);for(;++m<h;)l[m]=_}m=-1;const w=[],v=[];for(;++m<h;){const _=l[m];let A="",S="";_===99?(A=":",S=":"):_===108?A=":":_===114&&(S=":");let b=n.alignDelimiters===!1?1:Math.max(1,f[m]-A.length-S.length);const T=A+"-".repeat(b)+S;n.alignDelimiters!==!1&&(b=A.length+b+S.length,b>f[m]&&(f[m]=b),v[m]=b),w[m]=T}a.splice(1,0,w),c.splice(1,0,v),p=-1;const k=[];for(;++p<a.length;){const _=a[p],A=c[p];m=-1;const S=[];for(;++m<h;){const b=_[m]||"";let T="",$="";if(n.alignDelimiters!==!1){const j=f[m]-(A[m]||0),P=l[m];P===114?T=" ".repeat(j):P===99?j%2?(T=" ".repeat(j/2+.5),$=" ".repeat(j/2-.5)):(T=" ".repeat(j/2),$=T):$=" ".repeat(j)}n.delimiterStart!==!1&&!m&&S.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||m)&&S.push(" "),n.alignDelimiters!==!1&&S.push(T),S.push(b),n.alignDelimiters!==!1&&S.push($),n.padding!==!1&&S.push(" "),(n.delimiterEnd!==!1||m!==h-1)&&S.push("|")}k.push(n.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return k.join(`
178
- `)}function bN(e){return e==null?"":String(e)}function Bm(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function IN(e,t,n,i){const o=n.enter("blockquote"),l=n.createTracker(i);l.move("> "),l.shift(2);const a=n.indentLines(n.containerFlow(e,l.current()),NN);return o(),a}function NN(e,t,n){return">"+(n?"":" ")+e}function AN(e,t){return Um(e,t.inConstruct,!0)&&!Um(e,t.notInConstruct,!1)}function Um(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function Gm(e,t,n,i){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
179
- `&&AN(n.stack,n.unsafe[o]))return/[ \t]/.test(i.before)?"":" ";return`\\
180
- `}function TN(e,t){const n=String(e);let i=n.indexOf(t),o=i,l=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===o?++l>a&&(a=l):l=1,o=i+t.length,i=n.indexOf(t,o);return a}function PN(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function LN(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function RN(e,t,n,i){const o=LN(n),l=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if(PN(e,n)){const m=n.enter("codeIndented"),w=n.indentLines(l,ON);return m(),w}const c=n.createTracker(i),f=o.repeat(Math.max(TN(l,o)+1,3)),h=n.enter("codeFenced");let p=c.move(f);if(e.lang){const m=n.enter(`codeFencedLang${a}`);p+=c.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...c.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${a}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,{before:p,after:`
181
- `,encode:["`"],...c.current()})),m()}return p+=c.move(`
182
- `),l&&(p+=c.move(l+`
183
- `)),p+=c.move(f),h(),p}function ON(e,t,n){return(n?"":" ")+e}function gf(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function MN(e,t,n,i){const o=gf(n),l=o==='"'?"Quote":"Apostrophe",a=n.enter("definition");let c=n.enter("label");const f=n.createTracker(i);let h=f.move("[");return h+=f.move(n.safe(n.associationId(e),{before:h,after:"]",...f.current()})),h+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":`
184
- `,...f.current()}))),c(),e.title&&(c=n.enter(`title${l}`),h+=f.move(" "+o),h+=f.move(n.safe(e.title,{before:h,after:o,...f.current()})),h+=f.move(o),c()),a(),h}function jN(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Is(e){return"&#x"+e.toString(16).toUpperCase()+";"}function El(e,t,n){const i=vi(e),o=vi(t);return i===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Wy.peek=DN;function Wy(e,t,n,i){const o=jN(n),l=n.enter("emphasis"),a=n.createTracker(i),c=a.move(o);let f=a.move(n.containerPhrasing(e,{after:o,before:c,...a.current()}));const h=f.charCodeAt(0),p=El(i.before.charCodeAt(i.before.length-1),h,o);p.inside&&(f=Is(h)+f.slice(1));const m=f.charCodeAt(f.length-1),w=El(i.after.charCodeAt(0),m,o);w.inside&&(f=f.slice(0,-1)+Is(m));const v=a.move(o);return l(),n.attentionEncodeSurroundingInfo={after:w.outside,before:p.outside},c+f+v}function DN(e,t,n){return n.options.emphasis||"*"}function FN(e,t){let n=!1;return pf(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Oc}),!!((!e.depth||e.depth<3)&&lf(e)&&(t.options.setext||n))}function zN(e,t,n,i){const o=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(i);if(FN(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),w=n.containerPhrasing(e,{...l.current(),before:`
185
- `,after:`
186
- `});return m(),p(),w+`
187
- `+(o===1?"=":"-").repeat(w.length-(Math.max(w.lastIndexOf("\r"),w.lastIndexOf(`
188
- `))+1))}const a="#".repeat(o),c=n.enter("headingAtx"),f=n.enter("phrasing");l.move(a+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
189
- `,...l.current()});return/^[\t ]/.test(h)&&(h=Is(h.charCodeAt(0))+h.slice(1)),h=h?a+" "+h:a,n.options.closeAtx&&(h+=" "+a),f(),c(),h}Hy.peek=$N;function Hy(e){return e.value||""}function $N(){return"<"}qy.peek=BN;function qy(e,t,n,i){const o=gf(n),l=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let c=n.enter("label");const f=n.createTracker(i);let h=f.move("![");return h+=f.move(n.safe(e.alt,{before:h,after:"]",...f.current()})),h+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":")",...f.current()}))),c(),e.title&&(c=n.enter(`title${l}`),h+=f.move(" "+o),h+=f.move(n.safe(e.title,{before:h,after:o,...f.current()})),h+=f.move(o),c()),h+=f.move(")"),a(),h}function BN(){return"!"}Ky.peek=UN;function Ky(e,t,n,i){const o=e.referenceType,l=n.enter("imageReference");let a=n.enter("label");const c=n.createTracker(i);let f=c.move("![");const h=n.safe(e.alt,{before:f,after:"]",...c.current()});f+=c.move(h+"]["),a();const p=n.stack;n.stack=[],a=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return a(),n.stack=p,l(),o==="full"||!h||h!==m?f+=c.move(m+"]"):o==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function UN(){return"!"}Qy.peek=GN;function Qy(e,t,n){let i=e.value||"",o="`",l=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(i);)o+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++l<n.unsafe.length;){const a=n.unsafe[l],c=n.compilePattern(a);let f;if(a.atBreak)for(;f=c.exec(i);){let h=f.index;i.charCodeAt(h)===10&&i.charCodeAt(h-1)===13&&h--,i=i.slice(0,h)+" "+i.slice(f.index+1)}}return o+i+o}function GN(){return"`"}function Xy(e,t){const n=lf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Yy.peek=VN;function Yy(e,t,n,i){const o=gf(n),l=o==='"'?"Quote":"Apostrophe",a=n.createTracker(i);let c,f;if(Xy(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let m=a.move("<");return m+=a.move(n.containerPhrasing(e,{before:m,after:">",...a.current()})),m+=a.move(">"),c(),n.stack=p,m}c=n.enter("link"),f=n.enter("label");let h=a.move("[");return h+=a.move(n.containerPhrasing(e,{before:h,after:"](",...a.current()})),h+=a.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=a.move("<"),h+=a.move(n.safe(e.url,{before:h,after:">",...a.current()})),h+=a.move(">")):(f=n.enter("destinationRaw"),h+=a.move(n.safe(e.url,{before:h,after:e.title?" ":")",...a.current()}))),f(),e.title&&(f=n.enter(`title${l}`),h+=a.move(" "+o),h+=a.move(n.safe(e.title,{before:h,after:o,...a.current()})),h+=a.move(o),f()),h+=a.move(")"),c(),h}function VN(e,t,n){return Xy(e,n)?"<":"["}Jy.peek=WN;function Jy(e,t,n,i){const o=e.referenceType,l=n.enter("linkReference");let a=n.enter("label");const c=n.createTracker(i);let f=c.move("[");const h=n.containerPhrasing(e,{before:f,after:"]",...c.current()});f+=c.move(h+"]["),a();const p=n.stack;n.stack=[],a=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return a(),n.stack=p,l(),o==="full"||!h||h!==m?f+=c.move(m+"]"):o==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function WN(){return"["}function yf(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function HN(e){const t=yf(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function qN(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Zy(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function KN(e,t,n,i){const o=n.enter("list"),l=n.bulletCurrent;let a=e.ordered?qN(n):yf(n);const c=e.ordered?a==="."?")":".":HN(n);let f=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),Zy(n)===a&&p){let m=-1;for(;++m<e.children.length;){const w=e.children[m];if(w&&w.type==="listItem"&&w.children&&w.children[0]&&w.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(a=c),n.bulletCurrent=a;const h=n.containerFlow(e,i);return n.bulletLastUsed=a,n.bulletCurrent=l,o(),h}function QN(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function XN(e,t,n,i){const o=QN(n);let l=n.bulletCurrent||yf(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let a=l.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const c=n.createTracker(i);c.move(l+" ".repeat(a-l.length)),c.shift(a);const f=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),p);return f(),h;function p(m,w,v){return w?(v?"":" ".repeat(a))+m:(v?l:l+" ".repeat(a-l.length))+m}}function YN(e,t,n,i){const o=n.enter("paragraph"),l=n.enter("phrasing"),a=n.containerPhrasing(e,i);return l(),o(),a}const JN=jl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ZN(e,t,n,i){return(e.children.some(function(a){return JN(a)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function eA(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ew.peek=tA;function ew(e,t,n,i){const o=eA(n),l=n.enter("strong"),a=n.createTracker(i),c=a.move(o+o);let f=a.move(n.containerPhrasing(e,{after:o,before:c,...a.current()}));const h=f.charCodeAt(0),p=El(i.before.charCodeAt(i.before.length-1),h,o);p.inside&&(f=Is(h)+f.slice(1));const m=f.charCodeAt(f.length-1),w=El(i.after.charCodeAt(0),m,o);w.inside&&(f=f.slice(0,-1)+Is(m));const v=a.move(o+o);return l(),n.attentionEncodeSurroundingInfo={after:w.outside,before:p.outside},c+f+v}function tA(e,t,n){return n.options.strong||"*"}function nA(e,t,n,i){return n.safe(e.value,i)}function rA(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function iA(e,t,n){const i=(Zy(n)+(n.options.ruleSpaces?" ":"")).repeat(rA(n));return n.options.ruleSpaces?i.slice(0,-1):i}const tw={blockquote:IN,break:Gm,code:RN,definition:MN,emphasis:Wy,hardBreak:Gm,heading:zN,html:Hy,image:qy,imageReference:Ky,inlineCode:Qy,link:Yy,linkReference:Jy,list:KN,listItem:XN,paragraph:YN,root:ZN,strong:ew,text:nA,thematicBreak:iA};function sA(){return{enter:{table:oA,tableData:Vm,tableHeader:Vm,tableRow:aA},exit:{codeText:uA,table:lA,tableData:uc,tableHeader:uc,tableRow:uc}}}function oA(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function lA(e){this.exit(e),this.data.inTable=void 0}function aA(e){this.enter({type:"tableRow",children:[]},e)}function uc(e){this.exit(e)}function Vm(e){this.enter({type:"tableCell",children:[]},e)}function uA(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,cA));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function cA(e,t){return t==="|"?t:e}function fA(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,o=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
190
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:w,table:a,tableCell:f,tableRow:c}};function a(v,k,_,A){return h(p(v,_,A),v.align)}function c(v,k,_,A){const S=m(v,_,A),b=h([S]);return b.slice(0,b.indexOf(`
191
- `))}function f(v,k,_,A){const S=_.enter("tableCell"),b=_.enter("phrasing"),T=_.containerPhrasing(v,{...A,before:l,after:l});return b(),S(),T}function h(v,k){return EN(v,{align:k,alignDelimiters:i,padding:n,stringLength:o})}function p(v,k,_){const A=v.children;let S=-1;const b=[],T=k.enter("table");for(;++S<A.length;)b[S]=m(A[S],k,_);return T(),b}function m(v,k,_){const A=v.children;let S=-1;const b=[],T=k.enter("tableRow");for(;++S<A.length;)b[S]=f(A[S],v,k,_);return T(),b}function w(v,k,_){let A=tw.inlineCode(v,k,_);return _.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function dA(){return{exit:{taskListCheckValueChecked:Wm,taskListCheckValueUnchecked:Wm,paragraph:pA}}}function hA(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:mA}}}function Wm(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function pA(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const o=t.children;let l=-1,a;for(;++l<o.length;){const c=o[l];if(c.type==="paragraph"){a=c;break}}a===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function mA(e,t,n,i){const o=e.children[0],l=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=n.createTracker(i);l&&c.move(a);let f=tw.listItem(e,t,n,{...i,...c.current()});return l&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(p){return p+a}}function gA(){return[KI(),mN(),vN(),sA(),dA()]}function yA(e){return{extensions:[QI(),gN(e),kN(),fA(e),hA()]}}const wA={tokenize:_A,partial:!0},nw={tokenize:EA,partial:!0},rw={tokenize:bA,partial:!0},iw={tokenize:IA,partial:!0},vA={tokenize:NA,partial:!0},sw={name:"wwwAutolink",tokenize:SA,previous:lw},ow={name:"protocolAutolink",tokenize:CA,previous:aw},zn={name:"emailAutolink",tokenize:xA,previous:uw},En={};function kA(){return{text:En}}let Ir=48;for(;Ir<123;)En[Ir]=zn,Ir++,Ir===58?Ir=65:Ir===91&&(Ir=97);En[43]=zn;En[45]=zn;En[46]=zn;En[95]=zn;En[72]=[zn,ow];En[104]=[zn,ow];En[87]=[zn,sw];En[119]=[zn,sw];function xA(e,t,n){const i=this;let o,l;return a;function a(m){return!Fc(m)||!uw.call(i,i.previous)||wf(i.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return Fc(m)?(e.consume(m),c):m===64?(e.consume(m),f):n(m)}function f(m){return m===46?e.check(vA,p,h)(m):m===45||m===95||It(m)?(l=!0,e.consume(m),f):p(m)}function h(m){return e.consume(m),o=!0,f}function p(m){return l&&o&&Lt(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function SA(e,t,n){const i=this;return o;function o(a){return a!==87&&a!==119||!lw.call(i,i.previous)||wf(i.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(wA,e.attempt(nw,e.attempt(rw,l),n),n)(a))}function l(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function CA(e,t,n){const i=this;let o="",l=!1;return a;function a(m){return(m===72||m===104)&&aw.call(i,i.previous)&&!wf(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(Lt(m)&&o.length<5)return o+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const w=o.toLowerCase();if(w==="http"||w==="https")return e.consume(m),f}return n(m)}function f(m){return m===47?(e.consume(m),l?h:(l=!0,f)):n(m)}function h(m){return m===null||Sl(m)||Ge(m)||jr(m)||Rl(m)?n(m):e.attempt(nw,e.attempt(rw,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function _A(e,t,n){let i=0;return o;function o(a){return(a===87||a===119)&&i<3?(i++,e.consume(a),o):a===46&&i===3?(e.consume(a),l):n(a)}function l(a){return a===null?n(a):t(a)}}function EA(e,t,n){let i,o,l;return a;function a(h){return h===46||h===95?e.check(iw,f,c)(h):h===null||Ge(h)||jr(h)||h!==45&&Rl(h)?f(h):(l=!0,e.consume(h),a)}function c(h){return h===95?i=!0:(o=i,i=void 0),e.consume(h),a}function f(h){return o||i||!l?n(h):t(h)}}function bA(e,t){let n=0,i=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&i<n?l(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(iw,t,l)(a):a===null||Ge(a)||jr(a)?t(a):(e.consume(a),o)}function l(a){return a===41&&i++,e.consume(a),o}}function IA(e,t,n){return i;function i(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),i):c===38?(e.consume(c),l):c===93?(e.consume(c),o):c===60||c===null||Ge(c)||jr(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||Ge(c)||jr(c)?t(c):i(c)}function l(c){return Lt(c)?a(c):n(c)}function a(c){return c===59?(e.consume(c),i):Lt(c)?(e.consume(c),a):n(c)}}function NA(e,t,n){return i;function i(l){return e.consume(l),o}function o(l){return It(l)?n(l):t(l)}}function lw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ge(e)}function aw(e){return!Lt(e)}function uw(e){return!(e===47||Fc(e))}function Fc(e){return e===43||e===45||e===46||e===95||It(e)}function wf(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const AA={tokenize:DA,partial:!0};function TA(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:OA,continuation:{tokenize:MA},exit:jA}},text:{91:{name:"gfmFootnoteCall",tokenize:RA},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:PA,resolveTo:LA}}}}function PA(e,t,n){const i=this;let o=i.events.length;const l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a;for(;o--;){const f=i.events[o][1];if(f.type==="labelImage"){a=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!a||!a._balanced)return n(f);const h=gn(i.sliceSerialize({start:a.end,end:i.now()}));return h.codePointAt(0)!==94||!l.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function LA(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},c=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...c),e}function RA(e,t,n){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l=0,a;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),f}function f(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(m){if(l>999||m===93&&!a||m===null||m===91||Ge(m))return n(m);if(m===93){e.exit("chunkString");const w=e.exit("gfmFootnoteCallString");return o.includes(gn(i.sliceSerialize(w)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Ge(m)||(a=!0),l++,e.consume(m),m===92?p:h}function p(m){return m===91||m===92||m===93?(e.consume(m),l++,h):h(m)}}function OA(e,t,n){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l,a=0,c;return f;function f(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(k)}function p(k){if(a>999||k===93&&!c||k===null||k===91||Ge(k))return n(k);if(k===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return l=gn(i.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),w}return Ge(k)||(c=!0),a++,e.consume(k),k===92?m:p}function m(k){return k===91||k===92||k===93?(e.consume(k),a++,p):p(k)}function w(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),o.includes(l)||o.push(l),Me(e,v,"gfmFootnoteDefinitionWhitespace")):n(k)}function v(k){return t(k)}}function MA(e,t,n){return e.check(Ls,t,e.attempt(AA,t,n))}function jA(e){e.exit("gfmFootnoteDefinition")}function DA(e,t,n){const i=this;return Me(e,o,"gfmFootnoteDefinitionIndent",5);function o(l){const a=i.events[i.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(l):n(l)}}function FA(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:l,resolveAll:o};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function o(a,c){let f=-1;for(;++f<a.length;)if(a[f][0]==="enter"&&a[f][1].type==="strikethroughSequenceTemporary"&&a[f][1]._close){let h=f;for(;h--;)if(a[h][0]==="exit"&&a[h][1].type==="strikethroughSequenceTemporary"&&a[h][1]._open&&a[f][1].end.offset-a[f][1].start.offset===a[h][1].end.offset-a[h][1].start.offset){a[f][1].type="strikethroughSequence",a[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},a[h][1].start),end:Object.assign({},a[f][1].end)},m={type:"strikethroughText",start:Object.assign({},a[h][1].end),end:Object.assign({},a[f][1].start)},w=[["enter",p,c],["enter",a[h][1],c],["exit",a[h][1],c],["enter",m,c]],v=c.parser.constructs.insideSpan.null;v&&qt(w,w.length,0,Ol(v,a.slice(h+1,f),c)),qt(w,w.length,0,[["exit",m,c],["enter",a[f][1],c],["exit",a[f][1],c],["exit",p,c]]),qt(a,h-1,f-h+3,w),f=h+w.length-2;break}}for(f=-1;++f<a.length;)a[f][1].type==="strikethroughSequenceTemporary"&&(a[f][1].type="data");return a}function l(a,c,f){const h=this.previous,p=this.events;let m=0;return w;function w(k){return h===126&&p[p.length-1][1].type!=="characterEscape"?f(k):(a.enter("strikethroughSequenceTemporary"),v(k))}function v(k){const _=vi(h);if(k===126)return m>1?f(k):(a.consume(k),m++,v);if(m<2&&!n)return f(k);const A=a.exit("strikethroughSequenceTemporary"),S=vi(k);return A._open=!S||S===2&&!!_,A._close=!_||_===2&&!!S,c(k)}}}class zA{constructor(){this.map=[]}add(t,n,i){$A(this,t,n,i)}consume(t){if(this.map.sort(function(l,a){return l[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let o=i.pop();for(;o;){for(const l of o)t.push(l);o=i.pop()}this.map.length=0}}function $A(e,t,n,i){let o=0;if(!(n===0&&i.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...i);return}o+=1}e.map.push([t,n,i])}}function BA(e,t){let n=!1;const i=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=i.length-1;i[l]=i[l]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function UA(){return{flow:{null:{name:"table",tokenize:GA,resolveAll:VA}}}}function GA(e,t,n){const i=this;let o=0,l=0,a;return c;function c(R){let X=i.events.length-1;for(;X>-1;){const te=i.events[X][1].type;if(te==="lineEnding"||te==="linePrefix")X--;else break}const ne=X>-1?i.events[X][1].type:null,de=ne==="tableHead"||ne==="tableRow"?P:f;return de===P&&i.parser.lazy[i.now().line]?n(R):de(R)}function f(R){return e.enter("tableHead"),e.enter("tableRow"),h(R)}function h(R){return R===124||(a=!0,l+=1),p(R)}function p(R){return R===null?n(R):xe(R)?l>1?(l=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),v):n(R):Re(R)?Me(e,p,"whitespace")(R):(l+=1,a&&(a=!1,o+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),a=!0,p):(e.enter("data"),m(R)))}function m(R){return R===null||R===124||Ge(R)?(e.exit("data"),p(R)):(e.consume(R),R===92?w:m)}function w(R){return R===92||R===124?(e.consume(R),m):m(R)}function v(R){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(R):(e.enter("tableDelimiterRow"),a=!1,Re(R)?Me(e,k,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):k(R))}function k(R){return R===45||R===58?A(R):R===124?(a=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),_):j(R)}function _(R){return Re(R)?Me(e,A,"whitespace")(R):A(R)}function A(R){return R===58?(l+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),S):R===45?(l+=1,S(R)):R===null||xe(R)?$(R):j(R)}function S(R){return R===45?(e.enter("tableDelimiterFiller"),b(R)):j(R)}function b(R){return R===45?(e.consume(R),b):R===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(R))}function T(R){return Re(R)?Me(e,$,"whitespace")(R):$(R)}function $(R){return R===124?k(R):R===null||xe(R)?!a||o!==l?j(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(R)):j(R)}function j(R){return n(R)}function P(R){return e.enter("tableRow"),H(R)}function H(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),H):R===null||xe(R)?(e.exit("tableRow"),t(R)):Re(R)?Me(e,H,"whitespace")(R):(e.enter("data"),ie(R))}function ie(R){return R===null||R===124||Ge(R)?(e.exit("data"),H(R)):(e.consume(R),R===92?ue:ie)}function ue(R){return R===92||R===124?(e.consume(R),ie):ie(R)}}function VA(e,t){let n=-1,i=!0,o=0,l=[0,0,0,0],a=[0,0,0,0],c=!1,f=0,h,p,m;const w=new zA;for(;++n<e.length;){const v=e[n],k=v[1];v[0]==="enter"?k.type==="tableHead"?(c=!1,f!==0&&(Hm(w,t,f,h,p),p=void 0,f=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},w.add(n,0,[["enter",h,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(i=!0,m=void 0,l=[0,0,0,0],a=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},w.add(n,0,[["enter",p,t]])),o=k.type==="tableDelimiterRow"?2:p?3:1):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(i=!1,a[2]===0&&(l[1]!==0&&(a[0]=a[1],m=il(w,t,l,o,void 0,m),l=[0,0,0,0]),a[2]=n)):k.type==="tableCellDivider"&&(i?i=!1:(l[1]!==0&&(a[0]=a[1],m=il(w,t,l,o,void 0,m)),l=a,a=[l[1],n,0,0])):k.type==="tableHead"?(c=!0,f=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(f=n,l[1]!==0?(a[0]=a[1],m=il(w,t,l,o,n,m)):a[1]!==0&&(m=il(w,t,a,o,n,m)),o=0):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(a[3]=n)}for(f!==0&&Hm(w,t,f,h,p),w.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=BA(t.events,n))}return e}function il(e,t,n,i,o,l){const a=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(l.end=Object.assign({},mi(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const f=mi(t.events,n[1]);if(l={type:a,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const h=mi(t.events,n[2]),p=mi(t.events,n[3]),m={type:c,start:Object.assign({},h),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),i!==2){const w=t.events[n[2]],v=t.events[n[3]];if(w[1].end=Object.assign({},v[1].end),w[1].type="chunkText",w[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,_=n[3]-n[2]-1;e.add(k,_,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return o!==void 0&&(l.end=Object.assign({},mi(t.events,o)),e.add(o,0,[["exit",l,t]]),l=void 0),l}function Hm(e,t,n,i,o){const l=[],a=mi(t.events,n);o&&(o.end=Object.assign({},a),l.push(["exit",o,t])),i.end=Object.assign({},a),l.push(["exit",i,t]),e.add(n+1,0,l)}function mi(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const WA={name:"tasklistCheck",tokenize:qA};function HA(){return{text:{91:WA}}}function qA(e,t,n){const i=this;return o;function o(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),l)}function l(f){return Ge(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),a):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),a):n(f)}function a(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return xe(f)?t(f):Re(f)?e.check({tokenize:KA},t,n)(f):n(f)}}function KA(e,t,n){return Me(e,i,"whitespace");function i(o){return o===null?n(o):t(o)}}function QA(e){return vy([kA(),TA(),FA(e),UA(),HA()])}const XA={};function YA(e){const t=this,n=e||XA,i=t.data(),o=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),a=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);o.push(QA(n)),l.push(gA()),a.push(yA(n))}function cw({text:e}){return C.jsx("div",{className:"md",children:C.jsx(FI,{remarkPlugins:[YA],children:e})})}function JA({comment:e,onUnlink:t}){const n=J(o=>o.jumpToComment),i=e.startLine===e.endLine?`${e.startLine}`:`${e.startLine}-${e.endLine}`;return C.jsxs("div",{className:`linked-comment status-${e.status}`,children:[C.jsxs("div",{className:"linked-head",children:[C.jsxs("span",{className:"mono",children:[e.filePath,":",i," (",e.side,")"]}),C.jsx("span",{className:`badge badge-${e.status}`,children:e.status}),C.jsx("span",{className:"muted mono small",title:e.targetKey,children:e.targetKey.length>28?e.targetKey.slice(0,28)+"…":e.targetKey}),C.jsx("span",{className:"spacer"}),e.status!=="orphaned"&&C.jsx("button",{className:"link",onClick:()=>{n(e)},children:"跳转"}),C.jsx("button",{className:"link danger",onClick:t,children:"解除关联"})]}),C.jsx("div",{className:"linked-body",children:e.body})]})}function ZA({issue:e,onBack:t}){const n=J(S=>S.allComments),i=J(S=>S.comments),o=J(S=>S.updateIssue),l=J(S=>S.deleteIssue),a=J(S=>S.exportIssue),c=J(S=>S.selectedCommentIds),f=J(S=>S.clearSelectedComments),[h,p]=se.useState(!1),[m,w]=se.useState(e.title),[v,k]=se.useState(e.body),_=se.useMemo(()=>{const S=new Map;for(const b of n)S.set(b.id,b);for(const b of i)S.set(b.id,b);return S},[n,i]),A=c.filter(S=>!e.commentIds.includes(S));return C.jsxs("div",{className:"issue-detail",children:[C.jsxs("div",{className:"issue-detail-head",children:[C.jsx("button",{className:"link",onClick:t,children:"← 返回列表"}),C.jsx("span",{className:"spacer"}),C.jsx("button",{className:"link",onClick:()=>{a(e.id)},children:"复制 Issue"}),C.jsx("button",{className:"link",onClick:()=>{o(e.id,{status:e.status==="open"?"closed":"open"})},children:e.status==="open"?"关闭":"重新打开"}),C.jsx("button",{className:"link danger",onClick:()=>{window.confirm(`删除 Issue「${e.title}」?`)&&(l(e.id),t())},children:"删除"})]}),h?C.jsxs("div",{className:"issue-form",children:[C.jsx("input",{value:m,onChange:S=>w(S.target.value),placeholder:"标题"}),C.jsx("textarea",{value:v,onChange:S=>k(S.target.value),rows:6,placeholder:"描述(Markdown)"}),C.jsxs("div",{className:"row-actions",children:[C.jsx("button",{className:"primary",disabled:!m.trim(),onClick:async()=>{await o(e.id,{title:m,body:v}),p(!1)},children:"保存"}),C.jsx("button",{onClick:()=>p(!1),children:"取消"})]})]}):C.jsxs(C.Fragment,{children:[C.jsxs("h3",{children:[C.jsx("span",{className:`badge badge-${e.status}`,children:e.status})," ",e.title,C.jsx("button",{className:"link",onClick:()=>p(!0),children:"编辑"})]}),e.body?C.jsx(cw,{text:e.body}):C.jsx("p",{className:"muted",children:"(无描述)"})]}),C.jsxs("div",{className:"issue-comments",children:[C.jsxs("div",{className:"section-title",children:["关联评论 (",e.commentIds.length,")",A.length>0&&C.jsxs("button",{className:"link",onClick:async()=>{await o(e.id,{commentIds:[...e.commentIds,...A]}),f()},children:["+ 添加选中的 ",A.length," 条评论"]})]}),e.commentIds.map(S=>{const b=_.get(S),T=()=>{o(e.id,{commentIds:e.commentIds.filter($=>$!==S)})};return b?C.jsx(JA,{comment:b,onUnlink:T},S):C.jsxs("div",{className:"linked-comment muted",children:["评论 ",S.slice(0,8)," 已不存在"," ",C.jsx("button",{className:"link",onClick:T,children:"移除"})]},S)})]})]})}function eT(){const e=J(b=>b.issues),t=J(b=>b.loadIssues),n=J(b=>b.createIssue),i=J(b=>b.selectedCommentIds),o=J(b=>b.clearSelectedComments),l=J(b=>b.setPanel),[a,c]=se.useState("open"),[f,h]=se.useState(null),[p,m]=se.useState(!1),[w,v]=se.useState(""),[k,_]=se.useState("");se.useEffect(()=>{t()},[t]),se.useEffect(()=>{i.length>0&&!f&&m(!0)},[i.length,f]);const A=e.filter(b=>a==="all"||b.status===a),S=f?e.find(b=>b.id===f):void 0;return C.jsxs("aside",{className:"issues-drawer",children:[C.jsxs("div",{className:"drawer-head",children:[C.jsx("strong",{children:"Issues"}),C.jsx("div",{className:"seg",children:["open","closed","all"].map(b=>C.jsx("button",{className:a===b?"active":"",onClick:()=>c(b),children:b},b))}),C.jsx("span",{className:"spacer"}),C.jsx("button",{onClick:()=>m(!0),children:"新建"}),C.jsx("button",{className:"icon",onClick:()=>l("diff"),title:"关闭 (Esc)",children:"✕"})]}),S?C.jsx(ZA,{issue:S,onBack:()=>h(null)}):C.jsxs(C.Fragment,{children:[p&&C.jsxs("div",{className:"issue-form",children:[C.jsx("input",{value:w,onChange:b=>v(b.target.value),placeholder:"标题",autoFocus:!0}),C.jsx("textarea",{value:k,onChange:b=>_(b.target.value),rows:4,placeholder:"描述(Markdown,可选)"}),i.length>0&&C.jsxs("div",{className:"muted",children:["将关联 ",i.length," 条选中的评论"]}),C.jsxs("div",{className:"row-actions",children:[C.jsx("button",{className:"primary",disabled:!w.trim(),onClick:async()=>{const b=await n({title:w,body:k,commentIds:i});b&&(v(""),_(""),m(!1),h(b.id))},children:"创建 Issue"}),C.jsx("button",{onClick:()=>{m(!1),o()},children:"取消"})]})]}),C.jsxs("div",{className:"issue-list",children:[A.length===0&&C.jsxs("div",{className:"muted empty",children:["没有 ",a==="all"?"":a," Issue"]}),A.map(b=>C.jsxs("div",{className:"issue-row",onClick:()=>h(b.id),children:[C.jsx("span",{className:`badge badge-${b.status}`,children:b.status}),C.jsx("span",{className:"title",children:b.title}),C.jsxs("span",{className:"muted",children:[b.commentIds.length," 评论"]})]},b.id))]})]})]})}function fw({title:e,initial:t="",submitLabel:n="保存评论",onSave:i,onCancel:o}){const[l,a]=se.useState(t),[c,f]=se.useState(!1),h=se.useRef(null);se.useEffect(()=>{h.current?.focus()},[]);const p=async()=>{if(!(!l.trim()||c)){f(!0);try{await i(l)}finally{f(!1)}}};return C.jsxs("div",{className:"comment-editor",onMouseDown:m=>m.stopPropagation(),children:[C.jsx("div",{className:"comment-editor-head",children:e}),C.jsx("textarea",{ref:h,value:l,onChange:m=>a(m.target.value),placeholder:"写评论,支持 Markdown。Ctrl+Enter 保存,Esc 取消。",rows:4,onKeyDown:m=>{(m.ctrlKey||m.metaKey)&&m.key==="Enter"?(m.preventDefault(),p()):m.key==="Escape"&&(m.preventDefault(),o()),m.stopPropagation()}}),C.jsxs("div",{className:"comment-editor-actions",children:[C.jsx("button",{className:"primary",onClick:()=>{p()},disabled:!l.trim()||c,children:n}),C.jsx("button",{onClick:o,children:"取消"})]})]})}function qm(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function tT(e){const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const n=new Date;return t.toDateString()===n.toDateString()?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):t.toLocaleDateString([],{month:"numeric",day:"numeric"})}function Km({comment:e,showSnippet:t=!1,showFile:n=!1}){const i=J(_=>_.updateComment),o=J(_=>_.deleteComment),l=J(_=>_.exportComments),a=J(_=>_.selectedCommentIds.includes(e.id)),c=J(_=>_.toggleSelectComment),f=J(_=>_.setReattaching),h=J(_=>_.reattaching===e.id),p=J(_=>_.focusedCommentId===e.id),m=J(_=>_.focusComment),[w,v]=se.useState(!1),k=e.startLine===e.endLine?`${e.startLine}`:`${e.startLine}-${e.endLine}`;return C.jsxs("div",{className:`comment-card status-${e.status} ${a?"selected":""} ${p?"focused":""}`,onClick:()=>{p||m(e.id)},children:[C.jsxs("div",{className:"comment-head",children:[n&&C.jsx("span",{className:"mono file",title:e.filePath,children:e.filePath.split("/").pop()}),C.jsx("label",{className:"check",title:"选中以创建 / 关联 Issue",onClick:_=>_.stopPropagation(),children:C.jsx("input",{type:"checkbox",checked:a,onChange:()=>c(e.id)})}),C.jsxs("span",{className:"mono",children:[e.side," ",k]}),C.jsx("span",{className:`badge badge-${e.status}`,children:e.status}),C.jsx("span",{className:"muted time",title:`created ${qm(e.createdAt)}${e.exportedAt?`
192
- exported ${qm(e.exportedAt)}`:""}`,children:tT(e.updatedAt)}),C.jsx("span",{className:"spacer"}),e.status==="orphaned"&&C.jsx("button",{className:`link ${h?"active":""}`,onClick:_=>{_.stopPropagation(),f(h?null:e.id)},children:h?"取消重附着":"重新附着到选区"}),C.jsx("button",{className:"link",onClick:_=>{_.stopPropagation(),l([e.id])},title:"复制此条评论",children:"复制"}),C.jsx("button",{className:"link",onClick:_=>{_.stopPropagation(),v(!0)},children:"编辑"}),C.jsx("button",{className:"link danger",onClick:_=>{_.stopPropagation(),window.confirm("删除这条评论?")&&o(e.id)},children:"删除"})]}),(t||e.status==="orphaned")&&e.codeSnippet.length>0&&C.jsx("pre",{className:"snippet",children:e.codeSnippet.map((_,A)=>C.jsxs("div",{children:[C.jsx("span",{className:"ln",children:e.startLine+A}),_]},A))}),w?C.jsx(fw,{title:"编辑评论",initial:e.body,onSave:async _=>{await i(e.id,{body:_}),v(!1)},onCancel:()=>v(!1)}):C.jsx(cw,{text:e.body})]})}function Qm(e){return[e.filePath,e.side==="old"?0:1,e.endLine]}function cc(e,t){const[n,i,o]=Qm(e),[l,a,c]=Qm(t);return n!==l?n<l?-1:1:o!==c?o-c:i-a}function nT(){const e=J(j=>j.comments),t=J(j=>j.activeFile),n=J(j=>j.railFilter),i=J(j=>j.setRailFilter),o=J(j=>j.editor),l=J(j=>j.setEditor),a=J(j=>j.createComment),c=J(j=>j.copyAllComments),f=J(j=>j.includeExported),h=J(j=>j.setIncludeExported),p=J(j=>j.selectedCommentIds),m=J(j=>j.setPanel),w=J(j=>j.reattaching),v=J(j=>j.setReattaching),k=se.useMemo(()=>({file:e.filter(j=>j.filePath===t).length,all:e.length,unexported:e.filter(j=>j.status==="active").length,orphaned:e.filter(j=>j.status==="orphaned").length}),[e,t]),_=se.useMemo(()=>{let j=e;n==="file"?j=j.filter(ie=>ie.filePath===t):n==="unexported"&&(j=j.filter(ie=>ie.status==="active"));const P=j.filter(ie=>ie.status==="orphaned").sort(cc),H=j.filter(ie=>ie.status!=="orphaned").sort(cc);return{orphaned:P,attached:H}},[e,n,t]),A=se.useMemo(()=>{if(!o||n==="file"&&o.filePath!==t)return-1;const j={filePath:o.filePath,side:o.side,endLine:o.endLine};let P=0;for(;P<_.attached.length&&cc(_.attached[P],j)<=0;)P++;return P},[o,_.attached,n,t]),S=k.unexported+(f?e.filter(j=>j.status==="exported").length:0),b=n!=="file",T=[["file","此文件",k.file],["all","全部",k.all],["unexported","未导出",k.unexported]],$=o&&C.jsx(fw,{title:`新评论 · ${o.filePath.split("/").pop()} ${o.side} ${o.startLine===o.endLine?o.startLine:`${o.startLine}-${o.endLine}`}`,onSave:async j=>{await a({filePath:o.filePath,side:o.side,startLine:o.startLine,endLine:o.endLine,body:j})},onCancel:()=>l(null)},`${o.filePath}:${o.side}:${o.startLine}:${o.endLine}`);return C.jsxs("aside",{className:"rail",children:[C.jsxs("div",{className:"rail-head",children:[C.jsxs("strong",{children:["评论 ",k.all]}),C.jsx("div",{className:"seg small",children:T.map(([j,P,H])=>C.jsxs("button",{className:n===j?"active":"",onClick:()=>i(j),children:[P," ",H]},j))}),C.jsx("span",{className:"spacer"}),k.orphaned>0&&C.jsxs("span",{className:"badge badge-orphaned",children:[k.orphaned," orphaned"]})]}),w&&C.jsxs("div",{className:"rail-notice",children:["在 diff 中点击或拖选行,把评论附着到该位置。",C.jsx("button",{className:"link",onClick:()=>v(null),children:"取消"})]}),C.jsxs("div",{className:"rail-list",children:[_.orphaned.map(j=>C.jsx(Km,{comment:j,showFile:b},j.id)),_.attached.map((j,P)=>C.jsxs("div",{className:"rail-slot",children:[A===P&&$,C.jsx(Km,{comment:j,showFile:b})]},j.id)),o&&A===_.attached.length&&$,o&&A===-1&&$,k.all===0&&!o&&C.jsxs("div",{className:"muted empty",children:["还没有评论。在 diff 行旁点击 ",C.jsx("span",{className:"add-btn static",children:"+"})," 或拖选多行开始。"]}),k.all>0&&_.orphaned.length+_.attached.length===0&&!o&&C.jsx("div",{className:"muted empty",children:"没有符合筛选的评论"})]}),C.jsxs("div",{className:"rail-foot",children:[C.jsxs("div",{className:"rail-foot-row",children:[C.jsxs("button",{className:"primary",onClick:()=>{c()},disabled:S===0,children:["复制评论",k.unexported>0?` (${k.unexported} 未导出)`:""]}),C.jsxs("label",{className:"check",children:[C.jsx("input",{type:"checkbox",checked:f,onChange:j=>h(j.target.checked)}),"含已导出"]})]}),p.length>0&&C.jsxs("button",{className:"accent",onClick:()=>m("issues"),children:["从 ",p.length," 条选中评论创建 Issue"]})]})]})}function rT(){const e=J(t=>t.toast);return e?C.jsx("div",{className:`toast toast-${e.kind}`,role:"status",children:e.message}):null}function iT(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return t==="INPUT"?e.type!=="checkbox":t==="TEXTAREA"||t==="SELECT"||e.isContentEditable}function sT(){const e=J(o=>o.init),t=J(o=>o.initError),n=J(o=>o.repo),i=J(o=>o.panel);return se.useEffect(()=>{e()},[e]),se.useEffect(()=>{const o=l=>{if(l.ctrlKey||l.metaKey||l.altKey||iT(l.target))return;const a=J.getState();if(l.key==="r")l.preventDefault(),a.refresh();else if(l.key==="j"||l.key==="k"){if(a.panel!=="diff"||a.files.length===0)return;l.preventDefault();const c=a.files.findIndex(p=>p.path===a.activeFile),f=l.key==="j"?Math.min(a.files.length-1,c+1):Math.max(0,c-1),h=a.files[f];h&&a.openFile(h.path)}else l.key==="Escape"&&(a.reattaching?a.setReattaching(null):a.editor?a.setEditor(null):a.focusedCommentId?a.focusComment(null):a.panel!=="diff"&&a.setPanel("diff"))};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[]),t?C.jsxs("div",{className:"fatal",children:[C.jsx("h1",{children:"warden"}),C.jsxs("p",{children:["无法连接服务端:",t]}),C.jsx("button",{onClick:()=>{e()},children:"重试"})]}):n?C.jsxs("div",{className:"app",children:[C.jsx(Sk,{}),C.jsxs("div",{className:"body",children:[C.jsx(Ek,{}),C.jsx("main",{className:"main",children:i==="commits"?C.jsx(zC,{}):C.jsx(DC,{})}),i==="issues"?C.jsx(eT,{}):i==="diff"?C.jsx(nT,{}):null]}),C.jsx(rT,{})]}):C.jsx("div",{className:"loading-screen",children:"加载中…"})}const dw=document.getElementById("root");if(!dw)throw new Error("#root missing");pk.createRoot(dw).render(C.jsx(ps.StrictMode,{children:C.jsx(sT,{})}));