difit 3.1.10 → 3.1.12

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,92 +0,0 @@
1
- function CS(e,r){for(var l=0;l<r.length;l++){const i=r[l];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(i,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function l(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(s){if(s.ep)return;s.ep=!0;const u=l(s);fetch(s.href,u)}})();function tu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jf={exports:{}},Aa={};var Tb;function NS(){if(Tb)return Aa;Tb=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function l(i,s,u){var c=null;if(u!==void 0&&(c=""+u),s.key!==void 0&&(c=""+s.key),"key"in s){u={};for(var f in s)f!=="key"&&(u[f]=s[f])}else u=s;return s=u.ref,{$$typeof:e,type:i,key:c,ref:s!==void 0?s:null,props:u}}return Aa.Fragment=r,Aa.jsx=l,Aa.jsxs=l,Aa}var jb;function AS(){return jb||(jb=1,jf.exports=NS()),jf.exports}var y=AS(),Rf={exports:{}},_e={};var Rb;function TS(){if(Rb)return _e;Rb=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),v=Symbol.iterator;function x(D){return D===null||typeof D!="object"?null:(D=v&&D[v]||D["@@iterator"],typeof D=="function"?D:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function E(D,U,A){this.props=D,this.context=U,this.refs=C,this.updater=A||w}E.prototype.isReactComponent={},E.prototype.setState=function(D,U){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,U,"setState")},E.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function N(){}N.prototype=E.prototype;function j(D,U,A){this.props=D,this.context=U,this.refs=C,this.updater=A||w}var B=j.prototype=new N;B.constructor=j,S(B,E.prototype),B.isPureReactComponent=!0;var P=Array.isArray;function L(){}var M={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function G(D,U,A){var ne=A.ref;return{$$typeof:e,type:D,key:U,ref:ne!==void 0?ne:null,props:A}}function z(D,U){return G(D.type,U,D.props)}function V(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function Y(D){var U={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(A){return U[A]})}var J=/\/+/g;function I(D,U){return typeof D=="object"&&D!==null&&D.key!=null?Y(""+D.key):U.toString(36)}function X(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(L,L):(D.status="pending",D.then(function(U){D.status==="pending"&&(D.status="fulfilled",D.value=U)},function(U){D.status==="pending"&&(D.status="rejected",D.reason=U)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function F(D,U,A,ne,re){var fe=typeof D;(fe==="undefined"||fe==="boolean")&&(D=null);var ge=!1;if(D===null)ge=!0;else switch(fe){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(D.$$typeof){case e:case r:ge=!0;break;case m:return ge=D._init,F(ge(D._payload),U,A,ne,re)}}if(ge)return re=re(D),ge=ne===""?"."+I(D,0):ne,P(re)?(A="",ge!=null&&(A=ge.replace(J,"$&/")+"/"),F(re,U,A,"",function(me){return me})):re!=null&&(V(re)&&(re=z(re,A+(re.key==null||D&&D.key===re.key?"":(""+re.key).replace(J,"$&/")+"/")+ge)),U.push(re)),1;ge=0;var ye=ne===""?".":ne+":";if(P(D))for(var pe=0;pe<D.length;pe++)ne=D[pe],fe=ye+I(ne,pe),ge+=F(ne,U,A,fe,re);else if(pe=x(D),typeof pe=="function")for(D=pe.call(D),pe=0;!(ne=D.next()).done;)ne=ne.value,fe=ye+I(ne,pe++),ge+=F(ne,U,A,fe,re);else if(fe==="object"){if(typeof D.then=="function")return F(X(D),U,A,ne,re);throw U=String(D),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return ge}function Z(D,U,A){if(D==null)return D;var ne=[],re=0;return F(D,ne,"","",function(fe){return U.call(A,fe,re++)}),ne}function O(D){if(D._status===-1){var U=D._result;U=U(),U.then(function(A){(D._status===0||D._status===-1)&&(D._status=1,D._result=A)},function(A){(D._status===0||D._status===-1)&&(D._status=2,D._result=A)}),D._status===-1&&(D._status=0,D._result=U)}if(D._status===1)return D._result.default;throw D._result}var $=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},R={map:Z,forEach:function(D,U,A){Z(D,function(){U.apply(this,arguments)},A)},count:function(D){var U=0;return Z(D,function(){U++}),U},toArray:function(D){return Z(D,function(U){return U})||[]},only:function(D){if(!V(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return _e.Activity=b,_e.Children=R,_e.Component=E,_e.Fragment=l,_e.Profiler=s,_e.PureComponent=j,_e.StrictMode=i,_e.Suspense=h,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,_e.__COMPILER_RUNTIME={__proto__:null,c:function(D){return M.H.useMemoCache(D)}},_e.cache=function(D){return function(){return D.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(D,U,A){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var ne=S({},D.props),re=D.key;if(U!=null)for(fe in U.key!==void 0&&(re=""+U.key),U)!H.call(U,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&U.ref===void 0||(ne[fe]=U[fe]);var fe=arguments.length-2;if(fe===1)ne.children=A;else if(1<fe){for(var ge=Array(fe),ye=0;ye<fe;ye++)ge[ye]=arguments[ye+2];ne.children=ge}return G(D.type,re,ne)},_e.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:u,_context:D},D},_e.createElement=function(D,U,A){var ne,re={},fe=null;if(U!=null)for(ne in U.key!==void 0&&(fe=""+U.key),U)H.call(U,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(re[ne]=U[ne]);var ge=arguments.length-2;if(ge===1)re.children=A;else if(1<ge){for(var ye=Array(ge),pe=0;pe<ge;pe++)ye[pe]=arguments[pe+2];re.children=ye}if(D&&D.defaultProps)for(ne in ge=D.defaultProps,ge)re[ne]===void 0&&(re[ne]=ge[ne]);return G(D,fe,re)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(D){return{$$typeof:f,render:D}},_e.isValidElement=V,_e.lazy=function(D){return{$$typeof:m,_payload:{_status:-1,_result:D},_init:O}},_e.memo=function(D,U){return{$$typeof:p,type:D,compare:U===void 0?null:U}},_e.startTransition=function(D){var U=M.T,A={};M.T=A;try{var ne=D(),re=M.S;re!==null&&re(A,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(L,$)}catch(fe){$(fe)}finally{U!==null&&A.types!==null&&(U.types=A.types),M.T=U}},_e.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},_e.use=function(D){return M.H.use(D)},_e.useActionState=function(D,U,A){return M.H.useActionState(D,U,A)},_e.useCallback=function(D,U){return M.H.useCallback(D,U)},_e.useContext=function(D){return M.H.useContext(D)},_e.useDebugValue=function(){},_e.useDeferredValue=function(D,U){return M.H.useDeferredValue(D,U)},_e.useEffect=function(D,U){return M.H.useEffect(D,U)},_e.useEffectEvent=function(D){return M.H.useEffectEvent(D)},_e.useId=function(){return M.H.useId()},_e.useImperativeHandle=function(D,U,A){return M.H.useImperativeHandle(D,U,A)},_e.useInsertionEffect=function(D,U){return M.H.useInsertionEffect(D,U)},_e.useLayoutEffect=function(D,U){return M.H.useLayoutEffect(D,U)},_e.useMemo=function(D,U){return M.H.useMemo(D,U)},_e.useOptimistic=function(D,U){return M.H.useOptimistic(D,U)},_e.useReducer=function(D,U,A){return M.H.useReducer(D,U,A)},_e.useRef=function(D){return M.H.useRef(D)},_e.useState=function(D){return M.H.useState(D)},_e.useSyncExternalStore=function(D,U,A){return M.H.useSyncExternalStore(D,U,A)},_e.useTransition=function(){return M.H.useTransition()},_e.version="19.2.4",_e}var _b;function lh(){return _b||(_b=1,Rf.exports=TS()),Rf.exports}var T=lh();const Jt=tu(T),Fx=CS({__proto__:null,default:Jt},[T]);var _f={exports:{}},Ta={},Lf={exports:{}},Df={};var Lb;function jS(){return Lb||(Lb=1,(function(e){function r(F,Z){var O=F.length;F.push(Z);e:for(;0<O;){var $=O-1>>>1,R=F[$];if(0<s(R,Z))F[$]=Z,F[O]=R,O=$;else break e}}function l(F){return F.length===0?null:F[0]}function i(F){if(F.length===0)return null;var Z=F[0],O=F.pop();if(O!==Z){F[0]=O;e:for(var $=0,R=F.length,D=R>>>1;$<D;){var U=2*($+1)-1,A=F[U],ne=U+1,re=F[ne];if(0>s(A,O))ne<R&&0>s(re,A)?(F[$]=re,F[ne]=O,$=ne):(F[$]=A,F[U]=O,$=U);else if(ne<R&&0>s(re,O))F[$]=re,F[ne]=O,$=ne;else break e}}return Z}function s(F,Z){var O=F.sortIndex-Z.sortIndex;return O!==0?O:F.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var h=[],p=[],m=1,b=null,v=3,x=!1,w=!1,S=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function B(F){for(var Z=l(p);Z!==null;){if(Z.callback===null)i(p);else if(Z.startTime<=F)i(p),Z.sortIndex=Z.expirationTime,r(h,Z);else break;Z=l(p)}}function P(F){if(S=!1,B(F),!w)if(l(h)!==null)w=!0,L||(L=!0,Y());else{var Z=l(p);Z!==null&&X(P,Z.startTime-F)}}var L=!1,M=-1,H=5,G=-1;function z(){return C?!0:!(e.unstable_now()-G<H)}function V(){if(C=!1,L){var F=e.unstable_now();G=F;var Z=!0;try{e:{w=!1,S&&(S=!1,N(M),M=-1),x=!0;var O=v;try{t:{for(B(F),b=l(h);b!==null&&!(b.expirationTime>F&&z());){var $=b.callback;if(typeof $=="function"){b.callback=null,v=b.priorityLevel;var R=$(b.expirationTime<=F);if(F=e.unstable_now(),typeof R=="function"){b.callback=R,B(F),Z=!0;break t}b===l(h)&&i(h),B(F)}else i(h);b=l(h)}if(b!==null)Z=!0;else{var D=l(p);D!==null&&X(P,D.startTime-F),Z=!1}}break e}finally{b=null,v=O,x=!1}Z=void 0}}finally{Z?Y():L=!1}}}var Y;if(typeof j=="function")Y=function(){j(V)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,I=J.port2;J.port1.onmessage=V,Y=function(){I.postMessage(null)}}else Y=function(){E(V,0)};function X(F,Z){M=E(function(){F(e.unstable_now())},Z)}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(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(F){switch(v){case 1:case 2:case 3:var Z=3;break;default:Z=v}var O=v;v=Z;try{return F()}finally{v=O}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(F,Z){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var O=v;v=F;try{return Z()}finally{v=O}},e.unstable_scheduleCallback=function(F,Z,O){var $=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?$+O:$):O=$,F){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=O+R,F={id:m++,callback:Z,priorityLevel:F,startTime:O,expirationTime:R,sortIndex:-1},O>$?(F.sortIndex=O,r(p,F),l(h)===null&&F===l(p)&&(S?(N(M),M=-1):S=!0,X(P,O-$))):(F.sortIndex=R,r(h,F),w||x||(w=!0,L||(L=!0,Y()))),F},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(F){var Z=v;return function(){var O=v;v=Z;try{return F.apply(this,arguments)}finally{v=O}}}})(Df)),Df}var Db;function RS(){return Db||(Db=1,Lf.exports=jS()),Lf.exports}var Of={exports:{}},Ht={};var Ob;function _S(){if(Ob)return Ht;Ob=1;var e=lh();function r(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)p+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var i={d:{f:l,r:function(){throw Error(r(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(h,p,m){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:b==null?null:""+b,children:h,containerInfo:p,implementation:m}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Ht.createPortal=function(h,p){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(r(299));return u(h,p,null,m)},Ht.flushSync=function(h){var p=c.T,m=i.p;try{if(c.T=null,i.p=2,h)return h()}finally{c.T=p,i.p=m,i.d.f()}},Ht.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,i.d.C(h,p))},Ht.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},Ht.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var m=p.as,b=f(m,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,x=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;m==="style"?i.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:b,integrity:v,fetchPriority:x}):m==="script"&&i.d.X(h,{crossOrigin:b,integrity:v,fetchPriority:x,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Ht.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var m=f(p.as,p.crossOrigin);i.d.M(h,{crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&i.d.M(h)},Ht.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var m=p.as,b=f(m,p.crossOrigin);i.d.L(h,m,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Ht.preloadModule=function(h,p){if(typeof h=="string")if(p){var m=f(p.as,p.crossOrigin);i.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else i.d.m(h)},Ht.requestFormReset=function(h){i.d.r(h)},Ht.unstable_batchedUpdates=function(h,p){return h(p)},Ht.useFormState=function(h,p,m){return c.H.useFormState(h,p,m)},Ht.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ht.version="19.2.4",Ht}var Mb;function Ix(){if(Mb)return Of.exports;Mb=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(r){console.error(r)}}return e(),Of.exports=_S(),Of.exports}var zb;function LS(){if(zb)return Ta;zb=1;var e=RS(),r=lh(),l=Ix();function i(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var n=t,a=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(a=n.return),t=n.return;while(t)}return n.tag===3?a:null}function c(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function f(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function h(t){if(u(t)!==t)throw Error(i(188))}function p(t){var n=t.alternate;if(!n){if(n=u(t),n===null)throw Error(i(188));return n!==t?null:t}for(var a=t,o=n;;){var d=a.return;if(d===null)break;var g=d.alternate;if(g===null){if(o=d.return,o!==null){a=o;continue}break}if(d.child===g.child){for(g=d.child;g;){if(g===a)return h(d),t;if(g===o)return h(d),n;g=g.sibling}throw Error(i(188))}if(a.return!==o.return)a=d,o=g;else{for(var k=!1,_=d.child;_;){if(_===a){k=!0,a=d,o=g;break}if(_===o){k=!0,o=d,a=g;break}_=_.sibling}if(!k){for(_=g.child;_;){if(_===a){k=!0,a=g,o=d;break}if(_===o){k=!0,o=g,a=d;break}_=_.sibling}if(!k)throw Error(i(189))}}if(a.alternate!==o)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?t:n}function m(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=m(t),n!==null)return n;t=t.sibling}return null}var b=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),j=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function Y(t){return t===null||typeof t!="object"?null:(t=V&&t[V]||t["@@iterator"],typeof t=="function"?t:null)}var J=Symbol.for("react.client.reference");function I(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===J?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case S:return"Fragment";case E:return"Profiler";case C:return"StrictMode";case P:return"Suspense";case L:return"SuspenseList";case G:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case w:return"Portal";case j:return t.displayName||"Context";case N:return(t._context.displayName||"Context")+".Consumer";case B:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case M:return n=t.displayName||null,n!==null?n:I(t.type)||"Memo";case H:n=t._payload,t=t._init;try{return I(t(n))}catch{}}return null}var X=Array.isArray,F=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O={pending:!1,data:null,method:null,action:null},$=[],R=-1;function D(t){return{current:t}}function U(t){0>R||(t.current=$[R],$[R]=null,R--)}function A(t,n){R++,$[R]=t.current,t.current=n}var ne=D(null),re=D(null),fe=D(null),ge=D(null);function ye(t,n){switch(A(fe,n),A(re,t),A(ne,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?Km(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=Km(n),t=Jm(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}U(ne),A(ne,t)}function pe(){U(ne),U(re),U(fe)}function me(t){t.memoizedState!==null&&A(ge,t);var n=ne.current,a=Jm(n,t.type);n!==a&&(A(re,t),A(ne,a))}function xe(t){re.current===t&&(U(ne),U(re)),ge.current===t&&(U(ge),ka._currentValue=O)}var de,ve;function ke(t){if(de===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);de=n&&n[1]||"",ve=-1<a.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+de+t+ve}var $e=!1;function Qe(t,n){if(!t||$e)return"";$e=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(le){var te=le}Reflect.construct(t,[],ce)}else{try{ce.call()}catch(le){te=le}t.call(ce.prototype)}}else{try{throw Error()}catch(le){te=le}(ce=t())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(le){if(le&&te&&typeof le.stack=="string")return[le.stack,te.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=o.DetermineComponentFrameRoot(),k=g[0],_=g[1];if(k&&_){var q=k.split(`
4
- `),ee=_.split(`
5
- `);for(d=o=0;o<q.length&&!q[o].includes("DetermineComponentFrameRoot");)o++;for(;d<ee.length&&!ee[d].includes("DetermineComponentFrameRoot");)d++;if(o===q.length||d===ee.length)for(o=q.length-1,d=ee.length-1;1<=o&&0<=d&&q[o]!==ee[d];)d--;for(;1<=o&&0<=d;o--,d--)if(q[o]!==ee[d]){if(o!==1||d!==1)do if(o--,d--,0>d||q[o]!==ee[d]){var ie=`
6
- `+q[o].replace(" at new "," at ");return t.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",t.displayName)),ie}while(1<=o&&0<=d);break}}}finally{$e=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?ke(a):""}function ze(t,n){switch(t.tag){case 26:case 27:case 5:return ke(t.type);case 16:return ke("Lazy");case 13:return t.child!==n&&n!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return Qe(t.type,!1);case 11:return Qe(t.type.render,!1);case 1:return Qe(t.type,!0);case 31:return ke("Activity");default:return""}}function Bt(t){try{var n="",a=null;do n+=ze(t,a),a=t,t=t.return;while(t);return n}catch(o){return`
7
- Error generating stack: `+o.message+`
8
- `+o.stack}}var pt=Object.prototype.hasOwnProperty,mt=e.unstable_scheduleCallback,Ft=e.unstable_cancelCallback,it=e.unstable_shouldYield,It=e.unstable_requestPaint,at=e.unstable_now,$n=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,be=e.unstable_UserBlockingPriority,je=e.unstable_NormalPriority,Me=e.unstable_LowPriority,Ge=e.unstable_IdlePriority,Yt=e.log,Fn=e.unstable_setDisableYieldValue,Lt=null,gt=null;function jt(t){if(typeof Yt=="function"&&Fn(t),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(Lt,t)}catch{}}var Ke=Math.clz32?Math.clz32:zi,En=Math.log,Xt=Math.LN2;function zi(t){return t>>>=0,t===0?32:31-(En(t)/Xt|0)|0}var zl=256,ul=262144,Ar=4194304;function tr(t){var n=t&42;if(n!==0)return n;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function cl(t,n,a){var o=t.pendingLanes;if(o===0)return 0;var d=0,g=t.suspendedLanes,k=t.pingedLanes;t=t.warmLanes;var _=o&134217727;return _!==0?(o=_&~g,o!==0?d=tr(o):(k&=_,k!==0?d=tr(k):a||(a=_&~t,a!==0&&(d=tr(a))))):(_=o&~g,_!==0?d=tr(_):k!==0?d=tr(k):a||(a=o&~t,a!==0&&(d=tr(a)))),d===0?0:n!==0&&n!==d&&(n&g)===0&&(g=d&-d,a=n&-n,g>=a||g===32&&(a&4194048)!==0)?n:d}function Tr(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function nr(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function to(){var t=Ar;return Ar<<=1,(Ar&62914560)===0&&(Ar=4194304),t}function Bl(t){for(var n=[],a=0;31>a;a++)n.push(t);return n}function Vn(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function vu(t,n,a,o,d,g){var k=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var _=t.entanglements,q=t.expirationTimes,ee=t.hiddenUpdates;for(a=k&~a;0<a;){var ie=31-Ke(a),ce=1<<ie;_[ie]=0,q[ie]=-1;var te=ee[ie];if(te!==null)for(ee[ie]=null,ie=0;ie<te.length;ie++){var le=te[ie];le!==null&&(le.lane&=-536870913)}a&=~ce}o!==0&&no(t,o,0),g!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=g&~(k&~n))}function no(t,n,a){t.pendingLanes|=n,t.suspendedLanes&=~n;var o=31-Ke(n);t.entangledLanes|=n,t.entanglements[o]=t.entanglements[o]|1073741824|a&261930}function ro(t,n){var a=t.entangledLanes|=n;for(t=t.entanglements;a;){var o=31-Ke(a),d=1<<o;d&n|t[o]&n&&(t[o]|=n),a&=~d}}function lo(t,n){var a=n&-n;return a=(a&42)!==0?1:rr(a),(a&(t.suspendedLanes|n))!==0?0:a}function rr(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Fl(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Bi(){var t=Z.p;return t!==0?t:(t=window.event,t===void 0?32:wb(t.type))}function io(t,n){var a=Z.p;try{return Z.p=t,n()}finally{Z.p=a}}var Cn=Math.random().toString(36).slice(2),At="__reactFiber$"+Cn,Ut="__reactProps$"+Cn,jr="__reactContainer$"+Cn,Fi="__reactEvents$"+Cn,ae="__reactListeners$"+Cn,we="__reactHandles$"+Cn,Re="__reactResources$"+Cn,Ce="__reactMarker$"+Cn;function Je(t){delete t[At],delete t[Ut],delete t[Fi],delete t[ae],delete t[we]}function fn(t){var n=t[At];if(n)return n;for(var a=t.parentNode;a;){if(n=a[jr]||a[At]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(t=ib(t);t!==null;){if(a=t[At])return a;t=ib(t)}return n}t=a,a=t.parentNode}return null}function In(t){if(t=t[At]||t[jr]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function Ii(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(i(33))}function Il(t){var n=t[Re];return n||(n=t[Re]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Rt(t){t[Ce]=!0}var Ih=new Set,Uh={};function fl(t,n){Ul(t,n),Ul(t+"Capture",n)}function Ul(t,n){for(Uh[t]=n,t=0;t<n.length;t++)Ih.add(n[t])}var mv=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Hh={},Ph={};function bv(t){return pt.call(Ph,t)?!0:pt.call(Hh,t)?!1:mv.test(t)?Ph[t]=!0:(Hh[t]=!0,!1)}function ao(t,n,a){if(bv(n))if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+a)}}function oo(t,n,a){if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+a)}}function lr(t,n,a,o){if(o===null)t.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(n,a,""+o)}}function Nn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function qh(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function yv(t,n,a){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var d=o.get,g=o.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return d.call(this)},set:function(k){a=""+k,g.call(this,k)}}),Object.defineProperty(t,n,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(k){a=""+k},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function wu(t){if(!t._valueTracker){var n=qh(t)?"checked":"value";t._valueTracker=yv(t,n,""+t[n])}}function $h(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var a=n.getValue(),o="";return t&&(o=qh(t)?t.checked?"true":"false":t.value),t=o,t!==a?(n.setValue(t),!0):!1}function so(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var xv=/[\n"\\]/g;function An(t){return t.replace(xv,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Su(t,n,a,o,d,g,k,_){t.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?t.type=k:t.removeAttribute("type"),n!=null?k==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Nn(n)):t.value!==""+Nn(n)&&(t.value=""+Nn(n)):k!=="submit"&&k!=="reset"||t.removeAttribute("value"),n!=null?ku(t,k,Nn(n)):a!=null?ku(t,k,Nn(a)):o!=null&&t.removeAttribute("value"),d==null&&g!=null&&(t.defaultChecked=!!g),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.name=""+Nn(_):t.removeAttribute("name")}function Vh(t,n,a,o,d,g,k,_){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),n!=null||a!=null){if(!(g!=="submit"&&g!=="reset"||n!=null)){wu(t);return}a=a!=null?""+Nn(a):"",n=n!=null?""+Nn(n):a,_||n===t.value||(t.value=n),t.defaultValue=n}o=o??d,o=typeof o!="function"&&typeof o!="symbol"&&!!o,t.checked=_?t.checked:!!o,t.defaultChecked=!!o,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(t.name=k),wu(t)}function ku(t,n,a){n==="number"&&so(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Hl(t,n,a,o){if(t=t.options,n){n={};for(var d=0;d<a.length;d++)n["$"+a[d]]=!0;for(a=0;a<t.length;a++)d=n.hasOwnProperty("$"+t[a].value),t[a].selected!==d&&(t[a].selected=d),d&&o&&(t[a].defaultSelected=!0)}else{for(a=""+Nn(a),n=null,d=0;d<t.length;d++){if(t[d].value===a){t[d].selected=!0,o&&(t[d].defaultSelected=!0);return}n!==null||t[d].disabled||(n=t[d])}n!==null&&(n.selected=!0)}}function Gh(t,n,a){if(n!=null&&(n=""+Nn(n),n!==t.value&&(t.value=n),a==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=a!=null?""+Nn(a):""}function Yh(t,n,a,o){if(n==null){if(o!=null){if(a!=null)throw Error(i(92));if(X(o)){if(1<o.length)throw Error(i(93));o=o[0]}a=o}a==null&&(a=""),n=a}a=Nn(n),t.defaultValue=a,o=t.textContent,o===a&&o!==""&&o!==null&&(t.value=o),wu(t)}function Pl(t,n){if(n){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=n;return}}t.textContent=n}var vv=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Xh(t,n,a){var o=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?o?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":o?t.setProperty(n,a):typeof a!="number"||a===0||vv.has(n)?n==="float"?t.cssFloat=a:t[n]=(""+a).trim():t[n]=a+"px"}function Zh(t,n,a){if(n!=null&&typeof n!="object")throw Error(i(62));if(t=t.style,a!=null){for(var o in a)!a.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?t.setProperty(o,""):o==="float"?t.cssFloat="":t[o]="");for(var d in n)o=n[d],n.hasOwnProperty(d)&&a[d]!==o&&Xh(t,d,o)}else for(var g in n)n.hasOwnProperty(g)&&Xh(t,g,n[g])}function Eu(t){if(t.indexOf("-")===-1)return!1;switch(t){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 wv=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Sv=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function uo(t){return Sv.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function ir(){}var Cu=null;function Nu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ql=null,$l=null;function Qh(t){var n=In(t);if(n&&(t=n.stateNode)){var a=t[Ut]||null;e:switch(t=n.stateNode,n.type){case"input":if(Su(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+An(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var o=a[n];if(o!==t&&o.form===t.form){var d=o[Ut]||null;if(!d)throw Error(i(90));Su(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<a.length;n++)o=a[n],o.form===t.form&&$h(o)}break e;case"textarea":Gh(t,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Hl(t,!!a.multiple,n,!1)}}}var Au=!1;function Kh(t,n,a){if(Au)return t(n,a);Au=!0;try{var o=t(n);return o}finally{if(Au=!1,(ql!==null||$l!==null)&&(Ko(),ql&&(n=ql,t=$l,$l=ql=null,Qh(n),t)))for(n=0;n<t.length;n++)Qh(t[n])}}function Ui(t,n){var a=t.stateNode;if(a===null)return null;var o=a[Ut]||null;if(o===null)return null;a=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(t=t.type,o=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!o;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(i(231,n,typeof a));return a}var ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tu=!1;if(ar)try{var Hi={};Object.defineProperty(Hi,"passive",{get:function(){Tu=!0}}),window.addEventListener("test",Hi,Hi),window.removeEventListener("test",Hi,Hi)}catch{Tu=!1}var Rr=null,ju=null,co=null;function Jh(){if(co)return co;var t,n=ju,a=n.length,o,d="value"in Rr?Rr.value:Rr.textContent,g=d.length;for(t=0;t<a&&n[t]===d[t];t++);var k=a-t;for(o=1;o<=k&&n[a-o]===d[g-o];o++);return co=d.slice(t,1<o?1-o:void 0)}function fo(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function ho(){return!0}function Wh(){return!1}function Wt(t){function n(a,o,d,g,k){this._reactName=a,this._targetInst=d,this.type=o,this.nativeEvent=g,this.target=k,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(a=t[_],this[_]=a?a(g):g[_]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?ho:Wh,this.isPropagationStopped=Wh,this}return b(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ho)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ho)},persist:function(){},isPersistent:ho}),n}var dl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},po=Wt(dl),Pi=b({},dl,{view:0,detail:0}),kv=Wt(Pi),Ru,_u,qi,go=b({},Pi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Du,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==qi&&(qi&&t.type==="mousemove"?(Ru=t.screenX-qi.screenX,_u=t.screenY-qi.screenY):_u=Ru=0,qi=t),Ru)},movementY:function(t){return"movementY"in t?t.movementY:_u}}),ep=Wt(go),Ev=b({},go,{dataTransfer:0}),Cv=Wt(Ev),Nv=b({},Pi,{relatedTarget:0}),Lu=Wt(Nv),Av=b({},dl,{animationName:0,elapsedTime:0,pseudoElement:0}),Tv=Wt(Av),jv=b({},dl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Rv=Wt(jv),_v=b({},dl,{data:0}),tp=Wt(_v),Lv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dv={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"},Ov={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mv(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=Ov[t])?!!n[t]:!1}function Du(){return Mv}var zv=b({},Pi,{key:function(t){if(t.key){var n=Lv[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=fo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Dv[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Du,charCode:function(t){return t.type==="keypress"?fo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?fo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Bv=Wt(zv),Fv=b({},go,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),np=Wt(Fv),Iv=b({},Pi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Du}),Uv=Wt(Iv),Hv=b({},dl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pv=Wt(Hv),qv=b({},go,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),$v=Wt(qv),Vv=b({},dl,{newState:0,oldState:0}),Gv=Wt(Vv),Yv=[9,13,27,32],Ou=ar&&"CompositionEvent"in window,$i=null;ar&&"documentMode"in document&&($i=document.documentMode);var Xv=ar&&"TextEvent"in window&&!$i,rp=ar&&(!Ou||$i&&8<$i&&11>=$i),lp=" ",ip=!1;function ap(t,n){switch(t){case"keyup":return Yv.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function op(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Vl=!1;function Zv(t,n){switch(t){case"compositionend":return op(n);case"keypress":return n.which!==32?null:(ip=!0,lp);case"textInput":return t=n.data,t===lp&&ip?null:t;default:return null}}function Qv(t,n){if(Vl)return t==="compositionend"||!Ou&&ap(t,n)?(t=Jh(),co=ju=Rr=null,Vl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return rp&&n.locale!=="ko"?null:n.data;default:return null}}var Kv={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 sp(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!Kv[t.type]:n==="textarea"}function up(t,n,a,o){ql?$l?$l.push(o):$l=[o]:ql=o,n=ls(n,"onChange"),0<n.length&&(a=new po("onChange","change",null,a,o),t.push({event:a,listeners:n}))}var Vi=null,Gi=null;function Jv(t){Vm(t,0)}function mo(t){var n=Ii(t);if($h(n))return t}function cp(t,n){if(t==="change")return n}var fp=!1;if(ar){var Mu;if(ar){var zu="oninput"in document;if(!zu){var dp=document.createElement("div");dp.setAttribute("oninput","return;"),zu=typeof dp.oninput=="function"}Mu=zu}else Mu=!1;fp=Mu&&(!document.documentMode||9<document.documentMode)}function hp(){Vi&&(Vi.detachEvent("onpropertychange",pp),Gi=Vi=null)}function pp(t){if(t.propertyName==="value"&&mo(Gi)){var n=[];up(n,Gi,t,Nu(t)),Kh(Jv,n)}}function Wv(t,n,a){t==="focusin"?(hp(),Vi=n,Gi=a,Vi.attachEvent("onpropertychange",pp)):t==="focusout"&&hp()}function ew(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return mo(Gi)}function tw(t,n){if(t==="click")return mo(n)}function nw(t,n){if(t==="input"||t==="change")return mo(n)}function rw(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var dn=typeof Object.is=="function"?Object.is:rw;function Yi(t,n){if(dn(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var a=Object.keys(t),o=Object.keys(n);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var d=a[o];if(!pt.call(n,d)||!dn(t[d],n[d]))return!1}return!0}function gp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function mp(t,n){var a=gp(t);t=0;for(var o;a;){if(a.nodeType===3){if(o=t+a.textContent.length,t<=n&&o>=n)return{node:a,offset:n-t};t=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=gp(a)}}function bp(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?bp(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function yp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=so(t.document);n instanceof t.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)t=n.contentWindow;else break;n=so(t.document)}return n}function Bu(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var lw=ar&&"documentMode"in document&&11>=document.documentMode,Gl=null,Fu=null,Xi=null,Iu=!1;function xp(t,n,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Iu||Gl==null||Gl!==so(o)||(o=Gl,"selectionStart"in o&&Bu(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Xi&&Yi(Xi,o)||(Xi=o,o=ls(Fu,"onSelect"),0<o.length&&(n=new po("onSelect","select",null,n,a),t.push({event:n,listeners:o}),n.target=Gl)))}function hl(t,n){var a={};return a[t.toLowerCase()]=n.toLowerCase(),a["Webkit"+t]="webkit"+n,a["Moz"+t]="moz"+n,a}var Yl={animationend:hl("Animation","AnimationEnd"),animationiteration:hl("Animation","AnimationIteration"),animationstart:hl("Animation","AnimationStart"),transitionrun:hl("Transition","TransitionRun"),transitionstart:hl("Transition","TransitionStart"),transitioncancel:hl("Transition","TransitionCancel"),transitionend:hl("Transition","TransitionEnd")},Uu={},vp={};ar&&(vp=document.createElement("div").style,"AnimationEvent"in window||(delete Yl.animationend.animation,delete Yl.animationiteration.animation,delete Yl.animationstart.animation),"TransitionEvent"in window||delete Yl.transitionend.transition);function pl(t){if(Uu[t])return Uu[t];if(!Yl[t])return t;var n=Yl[t],a;for(a in n)if(n.hasOwnProperty(a)&&a in vp)return Uu[t]=n[a];return t}var wp=pl("animationend"),Sp=pl("animationiteration"),kp=pl("animationstart"),iw=pl("transitionrun"),aw=pl("transitionstart"),ow=pl("transitioncancel"),Ep=pl("transitionend"),Cp=new Map,Hu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Hu.push("scrollEnd");function Un(t,n){Cp.set(t,n),fl(n,[t])}var bo=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Tn=[],Xl=0,Pu=0;function yo(){for(var t=Xl,n=Pu=Xl=0;n<t;){var a=Tn[n];Tn[n++]=null;var o=Tn[n];Tn[n++]=null;var d=Tn[n];Tn[n++]=null;var g=Tn[n];if(Tn[n++]=null,o!==null&&d!==null){var k=o.pending;k===null?d.next=d:(d.next=k.next,k.next=d),o.pending=d}g!==0&&Np(a,d,g)}}function xo(t,n,a,o){Tn[Xl++]=t,Tn[Xl++]=n,Tn[Xl++]=a,Tn[Xl++]=o,Pu|=o,t.lanes|=o,t=t.alternate,t!==null&&(t.lanes|=o)}function qu(t,n,a,o){return xo(t,n,a,o),vo(t)}function gl(t,n){return xo(t,null,null,n),vo(t)}function Np(t,n,a){t.lanes|=a;var o=t.alternate;o!==null&&(o.lanes|=a);for(var d=!1,g=t.return;g!==null;)g.childLanes|=a,o=g.alternate,o!==null&&(o.childLanes|=a),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(d=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,d&&n!==null&&(d=31-Ke(a),t=g.hiddenUpdates,o=t[d],o===null?t[d]=[n]:o.push(n),n.lane=a|536870912),g):null}function vo(t){if(50<ma)throw ma=0,Jc=null,Error(i(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var Zl={};function sw(t,n,a,o){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hn(t,n,a,o){return new sw(t,n,a,o)}function $u(t){return t=t.prototype,!(!t||!t.isReactComponent)}function or(t,n){var a=t.alternate;return a===null?(a=hn(t.tag,n,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=n,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,n=t.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Ap(t,n){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,n=a.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function wo(t,n,a,o,d,g){var k=0;if(o=t,typeof t=="function")$u(t)&&(k=1);else if(typeof t=="string")k=hS(t,a,ne.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case G:return t=hn(31,a,n,d),t.elementType=G,t.lanes=g,t;case S:return ml(a.children,d,g,n);case C:k=8,d|=24;break;case E:return t=hn(12,a,n,d|2),t.elementType=E,t.lanes=g,t;case P:return t=hn(13,a,n,d),t.elementType=P,t.lanes=g,t;case L:return t=hn(19,a,n,d),t.elementType=L,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case j:k=10;break e;case N:k=9;break e;case B:k=11;break e;case M:k=14;break e;case H:k=16,o=null;break e}k=29,a=Error(i(130,t===null?"null":typeof t,"")),o=null}return n=hn(k,a,n,d),n.elementType=t,n.type=o,n.lanes=g,n}function ml(t,n,a,o){return t=hn(7,t,o,n),t.lanes=a,t}function Vu(t,n,a){return t=hn(6,t,null,n),t.lanes=a,t}function Tp(t){var n=hn(18,null,null,0);return n.stateNode=t,n}function Gu(t,n,a){return n=hn(4,t.children!==null?t.children:[],t.key,n),n.lanes=a,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var jp=new WeakMap;function jn(t,n){if(typeof t=="object"&&t!==null){var a=jp.get(t);return a!==void 0?a:(n={value:t,source:n,stack:Bt(n)},jp.set(t,n),n)}return{value:t,source:n,stack:Bt(n)}}var Ql=[],Kl=0,So=null,Zi=0,Rn=[],_n=0,_r=null,Gn=1,Yn="";function sr(t,n){Ql[Kl++]=Zi,Ql[Kl++]=So,So=t,Zi=n}function Rp(t,n,a){Rn[_n++]=Gn,Rn[_n++]=Yn,Rn[_n++]=_r,_r=t;var o=Gn;t=Yn;var d=32-Ke(o)-1;o&=~(1<<d),a+=1;var g=32-Ke(n)+d;if(30<g){var k=d-d%5;g=(o&(1<<k)-1).toString(32),o>>=k,d-=k,Gn=1<<32-Ke(n)+d|a<<d|o,Yn=g+t}else Gn=1<<g|a<<d|o,Yn=t}function Yu(t){t.return!==null&&(sr(t,1),Rp(t,1,0))}function Xu(t){for(;t===So;)So=Ql[--Kl],Ql[Kl]=null,Zi=Ql[--Kl],Ql[Kl]=null;for(;t===_r;)_r=Rn[--_n],Rn[_n]=null,Yn=Rn[--_n],Rn[_n]=null,Gn=Rn[--_n],Rn[_n]=null}function _p(t,n){Rn[_n++]=Gn,Rn[_n++]=Yn,Rn[_n++]=_r,Gn=n.id,Yn=n.overflow,_r=t}var Dt=null,ft=null,Pe=!1,Lr=null,Ln=!1,Zu=Error(i(519));function Dr(t){var n=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qi(jn(n,t)),Zu}function Lp(t){var n=t.stateNode,a=t.type,o=t.memoizedProps;switch(n[At]=t,n[Ut]=o,a){case"dialog":Fe("cancel",n),Fe("close",n);break;case"iframe":case"object":case"embed":Fe("load",n);break;case"video":case"audio":for(a=0;a<ya.length;a++)Fe(ya[a],n);break;case"source":Fe("error",n);break;case"img":case"image":case"link":Fe("error",n),Fe("load",n);break;case"details":Fe("toggle",n);break;case"input":Fe("invalid",n),Vh(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Fe("invalid",n);break;case"textarea":Fe("invalid",n),Yh(n,o.value,o.defaultValue,o.children)}a=o.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||o.suppressHydrationWarning===!0||Zm(n.textContent,a)?(o.popover!=null&&(Fe("beforetoggle",n),Fe("toggle",n)),o.onScroll!=null&&Fe("scroll",n),o.onScrollEnd!=null&&Fe("scrollend",n),o.onClick!=null&&(n.onclick=ir),n=!0):n=!1,n||Dr(t,!0)}function Dp(t){for(Dt=t.return;Dt;)switch(Dt.tag){case 5:case 31:case 13:Ln=!1;return;case 27:case 3:Ln=!0;return;default:Dt=Dt.return}}function Jl(t){if(t!==Dt)return!1;if(!Pe)return Dp(t),Pe=!0,!1;var n=t.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||pf(t.type,t.memoizedProps)),a=!a),a&&ft&&Dr(t),Dp(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));ft=lb(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));ft=lb(t)}else n===27?(n=ft,Yr(t.type)?(t=xf,xf=null,ft=t):ft=n):ft=Dt?On(t.stateNode.nextSibling):null;return!0}function bl(){ft=Dt=null,Pe=!1}function Qu(){var t=Lr;return t!==null&&(rn===null?rn=t:rn.push.apply(rn,t),Lr=null),t}function Qi(t){Lr===null?Lr=[t]:Lr.push(t)}var Ku=D(null),yl=null,ur=null;function Or(t,n,a){A(Ku,n._currentValue),n._currentValue=a}function cr(t){t._currentValue=Ku.current,U(Ku)}function Ju(t,n,a){for(;t!==null;){var o=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),t===a)break;t=t.return}}function Wu(t,n,a,o){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var g=d.dependencies;if(g!==null){var k=d.child;g=g.firstContext;e:for(;g!==null;){var _=g;g=d;for(var q=0;q<n.length;q++)if(_.context===n[q]){g.lanes|=a,_=g.alternate,_!==null&&(_.lanes|=a),Ju(g.return,a,t),o||(k=null);break e}g=_.next}}else if(d.tag===18){if(k=d.return,k===null)throw Error(i(341));k.lanes|=a,g=k.alternate,g!==null&&(g.lanes|=a),Ju(k,a,t),k=null}else k=d.child;if(k!==null)k.return=d;else for(k=d;k!==null;){if(k===t){k=null;break}if(d=k.sibling,d!==null){d.return=k.return,k=d;break}k=k.return}d=k}}function Wl(t,n,a,o){t=null;for(var d=n,g=!1;d!==null;){if(!g){if((d.flags&524288)!==0)g=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var k=d.alternate;if(k===null)throw Error(i(387));if(k=k.memoizedProps,k!==null){var _=d.type;dn(d.pendingProps.value,k.value)||(t!==null?t.push(_):t=[_])}}else if(d===ge.current){if(k=d.alternate,k===null)throw Error(i(387));k.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(ka):t=[ka])}d=d.return}t!==null&&Wu(n,t,a,o),n.flags|=262144}function ko(t){for(t=t.firstContext;t!==null;){if(!dn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function xl(t){yl=t,ur=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Ot(t){return Op(yl,t)}function Eo(t,n){return yl===null&&xl(t),Op(t,n)}function Op(t,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},ur===null){if(t===null)throw Error(i(308));ur=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else ur=ur.next=n;return a}var uw=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(a,o){t.push(o)}};this.abort=function(){n.aborted=!0,t.forEach(function(a){return a()})}},cw=e.unstable_scheduleCallback,fw=e.unstable_NormalPriority,wt={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ec(){return{controller:new uw,data:new Map,refCount:0}}function Ki(t){t.refCount--,t.refCount===0&&cw(fw,function(){t.controller.abort()})}var Ji=null,tc=0,ei=0,ti=null;function dw(t,n){if(Ji===null){var a=Ji=[];tc=0,ei=lf(),ti={status:"pending",value:void 0,then:function(o){a.push(o)}}}return tc++,n.then(Mp,Mp),n}function Mp(){if(--tc===0&&Ji!==null){ti!==null&&(ti.status="fulfilled");var t=Ji;Ji=null,ei=0,ti=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function hw(t,n){var a=[],o={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return t.then(function(){o.status="fulfilled",o.value=n;for(var d=0;d<a.length;d++)(0,a[d])(n)},function(d){for(o.status="rejected",o.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),o}var zp=F.S;F.S=function(t,n){xm=at(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&dw(t,n),zp!==null&&zp(t,n)};var vl=D(null);function nc(){var t=vl.current;return t!==null?t:ot.pooledCache}function Co(t,n){n===null?A(vl,vl.current):A(vl,n.pool)}function Bp(){var t=nc();return t===null?null:{parent:wt._currentValue,pool:t}}var ni=Error(i(460)),rc=Error(i(474)),No=Error(i(542)),Ao={then:function(){}};function Fp(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Ip(t,n,a){switch(a=t[a],a===void 0?t.push(n):a!==n&&(n.then(ir,ir),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,Hp(t),t;default:if(typeof n.status=="string")n.then(ir,ir);else{if(t=ot,t!==null&&100<t.shellSuspendCounter)throw Error(i(482));t=n,t.status="pending",t.then(function(o){if(n.status==="pending"){var d=n;d.status="fulfilled",d.value=o}},function(o){if(n.status==="pending"){var d=n;d.status="rejected",d.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,Hp(t),t}throw Sl=n,ni}}function wl(t){try{var n=t._init;return n(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Sl=a,ni):a}}var Sl=null;function Up(){if(Sl===null)throw Error(i(459));var t=Sl;return Sl=null,t}function Hp(t){if(t===ni||t===No)throw Error(i(483))}var ri=null,Wi=0;function To(t){var n=Wi;return Wi+=1,ri===null&&(ri=[]),Ip(ri,t,n)}function ea(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function jo(t,n){throw n.$$typeof===v?Error(i(525)):(t=Object.prototype.toString.call(n),Error(i(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function Pp(t){function n(K,Q){if(t){var W=K.deletions;W===null?(K.deletions=[Q],K.flags|=16):W.push(Q)}}function a(K,Q){if(!t)return null;for(;Q!==null;)n(K,Q),Q=Q.sibling;return null}function o(K){for(var Q=new Map;K!==null;)K.key!==null?Q.set(K.key,K):Q.set(K.index,K),K=K.sibling;return Q}function d(K,Q){return K=or(K,Q),K.index=0,K.sibling=null,K}function g(K,Q,W){return K.index=W,t?(W=K.alternate,W!==null?(W=W.index,W<Q?(K.flags|=67108866,Q):W):(K.flags|=67108866,Q)):(K.flags|=1048576,Q)}function k(K){return t&&K.alternate===null&&(K.flags|=67108866),K}function _(K,Q,W,se){return Q===null||Q.tag!==6?(Q=Vu(W,K.mode,se),Q.return=K,Q):(Q=d(Q,W),Q.return=K,Q)}function q(K,Q,W,se){var Ne=W.type;return Ne===S?ie(K,Q,W.props.children,se,W.key):Q!==null&&(Q.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===H&&wl(Ne)===Q.type)?(Q=d(Q,W.props),ea(Q,W),Q.return=K,Q):(Q=wo(W.type,W.key,W.props,null,K.mode,se),ea(Q,W),Q.return=K,Q)}function ee(K,Q,W,se){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==W.containerInfo||Q.stateNode.implementation!==W.implementation?(Q=Gu(W,K.mode,se),Q.return=K,Q):(Q=d(Q,W.children||[]),Q.return=K,Q)}function ie(K,Q,W,se,Ne){return Q===null||Q.tag!==7?(Q=ml(W,K.mode,se,Ne),Q.return=K,Q):(Q=d(Q,W),Q.return=K,Q)}function ce(K,Q,W){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=Vu(""+Q,K.mode,W),Q.return=K,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:return W=wo(Q.type,Q.key,Q.props,null,K.mode,W),ea(W,Q),W.return=K,W;case w:return Q=Gu(Q,K.mode,W),Q.return=K,Q;case H:return Q=wl(Q),ce(K,Q,W)}if(X(Q)||Y(Q))return Q=ml(Q,K.mode,W,null),Q.return=K,Q;if(typeof Q.then=="function")return ce(K,To(Q),W);if(Q.$$typeof===j)return ce(K,Eo(K,Q),W);jo(K,Q)}return null}function te(K,Q,W,se){var Ne=Q!==null?Q.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Ne!==null?null:_(K,Q,""+W,se);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case x:return W.key===Ne?q(K,Q,W,se):null;case w:return W.key===Ne?ee(K,Q,W,se):null;case H:return W=wl(W),te(K,Q,W,se)}if(X(W)||Y(W))return Ne!==null?null:ie(K,Q,W,se,null);if(typeof W.then=="function")return te(K,Q,To(W),se);if(W.$$typeof===j)return te(K,Q,Eo(K,W),se);jo(K,W)}return null}function le(K,Q,W,se,Ne){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return K=K.get(W)||null,_(Q,K,""+se,Ne);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case x:return K=K.get(se.key===null?W:se.key)||null,q(Q,K,se,Ne);case w:return K=K.get(se.key===null?W:se.key)||null,ee(Q,K,se,Ne);case H:return se=wl(se),le(K,Q,W,se,Ne)}if(X(se)||Y(se))return K=K.get(W)||null,ie(Q,K,se,Ne,null);if(typeof se.then=="function")return le(K,Q,W,To(se),Ne);if(se.$$typeof===j)return le(K,Q,W,Eo(Q,se),Ne);jo(Q,se)}return null}function Se(K,Q,W,se){for(var Ne=null,Ye=null,Ee=Q,De=Q=0,He=null;Ee!==null&&De<W.length;De++){Ee.index>De?(He=Ee,Ee=null):He=Ee.sibling;var Xe=te(K,Ee,W[De],se);if(Xe===null){Ee===null&&(Ee=He);break}t&&Ee&&Xe.alternate===null&&n(K,Ee),Q=g(Xe,Q,De),Ye===null?Ne=Xe:Ye.sibling=Xe,Ye=Xe,Ee=He}if(De===W.length)return a(K,Ee),Pe&&sr(K,De),Ne;if(Ee===null){for(;De<W.length;De++)Ee=ce(K,W[De],se),Ee!==null&&(Q=g(Ee,Q,De),Ye===null?Ne=Ee:Ye.sibling=Ee,Ye=Ee);return Pe&&sr(K,De),Ne}for(Ee=o(Ee);De<W.length;De++)He=le(Ee,K,De,W[De],se),He!==null&&(t&&He.alternate!==null&&Ee.delete(He.key===null?De:He.key),Q=g(He,Q,De),Ye===null?Ne=He:Ye.sibling=He,Ye=He);return t&&Ee.forEach(function(Jr){return n(K,Jr)}),Pe&&sr(K,De),Ne}function Te(K,Q,W,se){if(W==null)throw Error(i(151));for(var Ne=null,Ye=null,Ee=Q,De=Q=0,He=null,Xe=W.next();Ee!==null&&!Xe.done;De++,Xe=W.next()){Ee.index>De?(He=Ee,Ee=null):He=Ee.sibling;var Jr=te(K,Ee,Xe.value,se);if(Jr===null){Ee===null&&(Ee=He);break}t&&Ee&&Jr.alternate===null&&n(K,Ee),Q=g(Jr,Q,De),Ye===null?Ne=Jr:Ye.sibling=Jr,Ye=Jr,Ee=He}if(Xe.done)return a(K,Ee),Pe&&sr(K,De),Ne;if(Ee===null){for(;!Xe.done;De++,Xe=W.next())Xe=ce(K,Xe.value,se),Xe!==null&&(Q=g(Xe,Q,De),Ye===null?Ne=Xe:Ye.sibling=Xe,Ye=Xe);return Pe&&sr(K,De),Ne}for(Ee=o(Ee);!Xe.done;De++,Xe=W.next())Xe=le(Ee,K,De,Xe.value,se),Xe!==null&&(t&&Xe.alternate!==null&&Ee.delete(Xe.key===null?De:Xe.key),Q=g(Xe,Q,De),Ye===null?Ne=Xe:Ye.sibling=Xe,Ye=Xe);return t&&Ee.forEach(function(ES){return n(K,ES)}),Pe&&sr(K,De),Ne}function rt(K,Q,W,se){if(typeof W=="object"&&W!==null&&W.type===S&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case x:e:{for(var Ne=W.key;Q!==null;){if(Q.key===Ne){if(Ne=W.type,Ne===S){if(Q.tag===7){a(K,Q.sibling),se=d(Q,W.props.children),se.return=K,K=se;break e}}else if(Q.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===H&&wl(Ne)===Q.type){a(K,Q.sibling),se=d(Q,W.props),ea(se,W),se.return=K,K=se;break e}a(K,Q);break}else n(K,Q);Q=Q.sibling}W.type===S?(se=ml(W.props.children,K.mode,se,W.key),se.return=K,K=se):(se=wo(W.type,W.key,W.props,null,K.mode,se),ea(se,W),se.return=K,K=se)}return k(K);case w:e:{for(Ne=W.key;Q!==null;){if(Q.key===Ne)if(Q.tag===4&&Q.stateNode.containerInfo===W.containerInfo&&Q.stateNode.implementation===W.implementation){a(K,Q.sibling),se=d(Q,W.children||[]),se.return=K,K=se;break e}else{a(K,Q);break}else n(K,Q);Q=Q.sibling}se=Gu(W,K.mode,se),se.return=K,K=se}return k(K);case H:return W=wl(W),rt(K,Q,W,se)}if(X(W))return Se(K,Q,W,se);if(Y(W)){if(Ne=Y(W),typeof Ne!="function")throw Error(i(150));return W=Ne.call(W),Te(K,Q,W,se)}if(typeof W.then=="function")return rt(K,Q,To(W),se);if(W.$$typeof===j)return rt(K,Q,Eo(K,W),se);jo(K,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,Q!==null&&Q.tag===6?(a(K,Q.sibling),se=d(Q,W),se.return=K,K=se):(a(K,Q),se=Vu(W,K.mode,se),se.return=K,K=se),k(K)):a(K,Q)}return function(K,Q,W,se){try{Wi=0;var Ne=rt(K,Q,W,se);return ri=null,Ne}catch(Ee){if(Ee===ni||Ee===No)throw Ee;var Ye=hn(29,Ee,null,K.mode);return Ye.lanes=se,Ye.return=K,Ye}}}var kl=Pp(!0),qp=Pp(!1),Mr=!1;function lc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ic(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function zr(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Br(t,n,a){var o=t.updateQueue;if(o===null)return null;if(o=o.shared,(Ze&2)!==0){var d=o.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),o.pending=n,n=vo(t),Np(t,null,a),n}return xo(t,o,n,a),vo(t)}function ta(t,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var o=n.lanes;o&=t.pendingLanes,a|=o,n.lanes=a,ro(t,a)}}function ac(t,n){var a=t.updateQueue,o=t.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var d=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var k={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};g===null?d=g=k:g=g.next=k,a=a.next}while(a!==null);g===null?d=g=n:g=g.next=n}else d=g=n;a={baseState:o.baseState,firstBaseUpdate:d,lastBaseUpdate:g,shared:o.shared,callbacks:o.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=n:t.next=n,a.lastBaseUpdate=n}var oc=!1;function na(){if(oc){var t=ti;if(t!==null)throw t}}function ra(t,n,a,o){oc=!1;var d=t.updateQueue;Mr=!1;var g=d.firstBaseUpdate,k=d.lastBaseUpdate,_=d.shared.pending;if(_!==null){d.shared.pending=null;var q=_,ee=q.next;q.next=null,k===null?g=ee:k.next=ee,k=q;var ie=t.alternate;ie!==null&&(ie=ie.updateQueue,_=ie.lastBaseUpdate,_!==k&&(_===null?ie.firstBaseUpdate=ee:_.next=ee,ie.lastBaseUpdate=q))}if(g!==null){var ce=d.baseState;k=0,ie=ee=q=null,_=g;do{var te=_.lane&-536870913,le=te!==_.lane;if(le?(Ue&te)===te:(o&te)===te){te!==0&&te===ei&&(oc=!0),ie!==null&&(ie=ie.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var Se=t,Te=_;te=n;var rt=a;switch(Te.tag){case 1:if(Se=Te.payload,typeof Se=="function"){ce=Se.call(rt,ce,te);break e}ce=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Te.payload,te=typeof Se=="function"?Se.call(rt,ce,te):Se,te==null)break e;ce=b({},ce,te);break e;case 2:Mr=!0}}te=_.callback,te!==null&&(t.flags|=64,le&&(t.flags|=8192),le=d.callbacks,le===null?d.callbacks=[te]:le.push(te))}else le={lane:te,tag:_.tag,payload:_.payload,callback:_.callback,next:null},ie===null?(ee=ie=le,q=ce):ie=ie.next=le,k|=te;if(_=_.next,_===null){if(_=d.shared.pending,_===null)break;le=_,_=le.next,le.next=null,d.lastBaseUpdate=le,d.shared.pending=null}}while(!0);ie===null&&(q=ce),d.baseState=q,d.firstBaseUpdate=ee,d.lastBaseUpdate=ie,g===null&&(d.shared.lanes=0),Pr|=k,t.lanes=k,t.memoizedState=ce}}function $p(t,n){if(typeof t!="function")throw Error(i(191,t));t.call(n)}function Vp(t,n){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)$p(a[t],n)}var li=D(null),Ro=D(0);function Gp(t,n){t=xr,A(Ro,t),A(li,n),xr=t|n.baseLanes}function sc(){A(Ro,xr),A(li,li.current)}function uc(){xr=Ro.current,U(li),U(Ro)}var pn=D(null),Dn=null;function Fr(t){var n=t.alternate;A(xt,xt.current&1),A(pn,t),Dn===null&&(n===null||li.current!==null||n.memoizedState!==null)&&(Dn=t)}function cc(t){A(xt,xt.current),A(pn,t),Dn===null&&(Dn=t)}function Yp(t){t.tag===22?(A(xt,xt.current),A(pn,t),Dn===null&&(Dn=t)):Ir()}function Ir(){A(xt,xt.current),A(pn,pn.current)}function gn(t){U(pn),Dn===t&&(Dn=null),U(xt)}var xt=D(0);function _o(t){for(var n=t;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||bf(a)||yf(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var fr=0,Le=null,tt=null,St=null,Lo=!1,ii=!1,El=!1,Do=0,la=0,ai=null,pw=0;function bt(){throw Error(i(321))}function fc(t,n){if(n===null)return!1;for(var a=0;a<n.length&&a<t.length;a++)if(!dn(t[a],n[a]))return!1;return!0}function dc(t,n,a,o,d,g){return fr=g,Le=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,F.H=t===null||t.memoizedState===null?Rg:Ac,El=!1,g=a(o,d),El=!1,ii&&(g=Zp(n,a,o,d)),Xp(t),g}function Xp(t){F.H=oa;var n=tt!==null&&tt.next!==null;if(fr=0,St=tt=Le=null,Lo=!1,la=0,ai=null,n)throw Error(i(300));t===null||kt||(t=t.dependencies,t!==null&&ko(t)&&(kt=!0))}function Zp(t,n,a,o){Le=t;var d=0;do{if(ii&&(ai=null),la=0,ii=!1,25<=d)throw Error(i(301));if(d+=1,St=tt=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}F.H=_g,g=n(a,o)}while(ii);return g}function gw(){var t=F.H,n=t.useState()[0];return n=typeof n.then=="function"?ia(n):n,t=t.useState()[0],(tt!==null?tt.memoizedState:null)!==t&&(Le.flags|=1024),n}function hc(){var t=Do!==0;return Do=0,t}function pc(t,n,a){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~a}function gc(t){if(Lo){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}Lo=!1}fr=0,St=tt=Le=null,ii=!1,la=Do=0,ai=null}function Zt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?Le.memoizedState=St=t:St=St.next=t,St}function vt(){if(tt===null){var t=Le.alternate;t=t!==null?t.memoizedState:null}else t=tt.next;var n=St===null?Le.memoizedState:St.next;if(n!==null)St=n,tt=t;else{if(t===null)throw Le.alternate===null?Error(i(467)):Error(i(310));tt=t,t={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},St===null?Le.memoizedState=St=t:St=St.next=t}return St}function Oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ia(t){var n=la;return la+=1,ai===null&&(ai=[]),t=Ip(ai,t,n),n=Le,(St===null?n.memoizedState:St.next)===null&&(n=n.alternate,F.H=n===null||n.memoizedState===null?Rg:Ac),t}function Mo(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ia(t);if(t.$$typeof===j)return Ot(t)}throw Error(i(438,String(t)))}function mc(t){var n=null,a=Le.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var o=Le.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=Oo(),Le.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(t),o=0;o<t;o++)a[o]=z;return n.index++,a}function dr(t,n){return typeof n=="function"?n(t):n}function zo(t){var n=vt();return bc(n,tt,t)}function bc(t,n,a){var o=t.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=a;var d=t.baseQueue,g=o.pending;if(g!==null){if(d!==null){var k=d.next;d.next=g.next,g.next=k}n.baseQueue=d=g,o.pending=null}if(g=t.baseState,d===null)t.memoizedState=g;else{n=d.next;var _=k=null,q=null,ee=n,ie=!1;do{var ce=ee.lane&-536870913;if(ce!==ee.lane?(Ue&ce)===ce:(fr&ce)===ce){var te=ee.revertLane;if(te===0)q!==null&&(q=q.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),ce===ei&&(ie=!0);else if((fr&te)===te){ee=ee.next,te===ei&&(ie=!0);continue}else ce={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},q===null?(_=q=ce,k=g):q=q.next=ce,Le.lanes|=te,Pr|=te;ce=ee.action,El&&a(g,ce),g=ee.hasEagerState?ee.eagerState:a(g,ce)}else te={lane:ce,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},q===null?(_=q=te,k=g):q=q.next=te,Le.lanes|=ce,Pr|=ce;ee=ee.next}while(ee!==null&&ee!==n);if(q===null?k=g:q.next=_,!dn(g,t.memoizedState)&&(kt=!0,ie&&(a=ti,a!==null)))throw a;t.memoizedState=g,t.baseState=k,t.baseQueue=q,o.lastRenderedState=g}return d===null&&(o.lanes=0),[t.memoizedState,o.dispatch]}function yc(t){var n=vt(),a=n.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=t;var o=a.dispatch,d=a.pending,g=n.memoizedState;if(d!==null){a.pending=null;var k=d=d.next;do g=t(g,k.action),k=k.next;while(k!==d);dn(g,n.memoizedState)||(kt=!0),n.memoizedState=g,n.baseQueue===null&&(n.baseState=g),a.lastRenderedState=g}return[g,o]}function Qp(t,n,a){var o=Le,d=vt(),g=Pe;if(g){if(a===void 0)throw Error(i(407));a=a()}else a=n();var k=!dn((tt||d).memoizedState,a);if(k&&(d.memoizedState=a,kt=!0),d=d.queue,wc(Wp.bind(null,o,d,t),[t]),d.getSnapshot!==n||k||St!==null&&St.memoizedState.tag&1){if(o.flags|=2048,oi(9,{destroy:void 0},Jp.bind(null,o,d,a,n),null),ot===null)throw Error(i(349));g||(fr&127)!==0||Kp(o,n,a)}return a}function Kp(t,n,a){t.flags|=16384,t={getSnapshot:n,value:a},n=Le.updateQueue,n===null?(n=Oo(),Le.updateQueue=n,n.stores=[t]):(a=n.stores,a===null?n.stores=[t]:a.push(t))}function Jp(t,n,a,o){n.value=a,n.getSnapshot=o,eg(n)&&tg(t)}function Wp(t,n,a){return a(function(){eg(n)&&tg(t)})}function eg(t){var n=t.getSnapshot;t=t.value;try{var a=n();return!dn(t,a)}catch{return!0}}function tg(t){var n=gl(t,2);n!==null&&ln(n,t,2)}function xc(t){var n=Zt();if(typeof t=="function"){var a=t;if(t=a(),El){jt(!0);try{a()}finally{jt(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dr,lastRenderedState:t},n}function ng(t,n,a,o){return t.baseState=a,bc(t,tt,typeof o=="function"?o:dr)}function mw(t,n,a,o,d){if(Io(t))throw Error(i(485));if(t=n.action,t!==null){var g={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){g.listeners.push(k)}};F.T!==null?a(!0):g.isTransition=!1,o(g),a=n.pending,a===null?(g.next=n.pending=g,rg(n,g)):(g.next=a.next,n.pending=a.next=g)}}function rg(t,n){var a=n.action,o=n.payload,d=t.state;if(n.isTransition){var g=F.T,k={};F.T=k;try{var _=a(d,o),q=F.S;q!==null&&q(k,_),lg(t,n,_)}catch(ee){vc(t,n,ee)}finally{g!==null&&k.types!==null&&(g.types=k.types),F.T=g}}else try{g=a(d,o),lg(t,n,g)}catch(ee){vc(t,n,ee)}}function lg(t,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(o){ig(t,n,o)},function(o){return vc(t,n,o)}):ig(t,n,a)}function ig(t,n,a){n.status="fulfilled",n.value=a,ag(n),t.state=a,n=t.pending,n!==null&&(a=n.next,a===n?t.pending=null:(a=a.next,n.next=a,rg(t,a)))}function vc(t,n,a){var o=t.pending;if(t.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=a,ag(n),n=n.next;while(n!==o)}t.action=null}function ag(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function og(t,n){return n}function sg(t,n){if(Pe){var a=ot.formState;if(a!==null){e:{var o=Le;if(Pe){if(ft){t:{for(var d=ft,g=Ln;d.nodeType!==8;){if(!g){d=null;break t}if(d=On(d.nextSibling),d===null){d=null;break t}}g=d.data,d=g==="F!"||g==="F"?d:null}if(d){ft=On(d.nextSibling),o=d.data==="F!";break e}}Dr(o)}o=!1}o&&(n=a[0])}}return a=Zt(),a.memoizedState=a.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:og,lastRenderedState:n},a.queue=o,a=Ag.bind(null,Le,o),o.dispatch=a,o=xc(!1),g=Nc.bind(null,Le,!1,o.queue),o=Zt(),d={state:n,dispatch:null,action:t,pending:null},o.queue=d,a=mw.bind(null,Le,d,g,a),d.dispatch=a,o.memoizedState=t,[n,a,!1]}function ug(t){var n=vt();return cg(n,tt,t)}function cg(t,n,a){if(n=bc(t,n,og)[0],t=zo(dr)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=ia(n)}catch(k){throw k===ni?No:k}else o=n;n=vt();var d=n.queue,g=d.dispatch;return a!==n.memoizedState&&(Le.flags|=2048,oi(9,{destroy:void 0},bw.bind(null,d,a),null)),[o,g,t]}function bw(t,n){t.action=n}function fg(t){var n=vt(),a=tt;if(a!==null)return cg(n,a,t);vt(),n=n.memoizedState,a=vt();var o=a.queue.dispatch;return a.memoizedState=t,[n,o,!1]}function oi(t,n,a,o){return t={tag:t,create:a,deps:o,inst:n,next:null},n=Le.updateQueue,n===null&&(n=Oo(),Le.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=t.next=t:(o=a.next,a.next=t,t.next=o,n.lastEffect=t),t}function dg(){return vt().memoizedState}function Bo(t,n,a,o){var d=Zt();Le.flags|=t,d.memoizedState=oi(1|n,{destroy:void 0},a,o===void 0?null:o)}function Fo(t,n,a,o){var d=vt();o=o===void 0?null:o;var g=d.memoizedState.inst;tt!==null&&o!==null&&fc(o,tt.memoizedState.deps)?d.memoizedState=oi(n,g,a,o):(Le.flags|=t,d.memoizedState=oi(1|n,g,a,o))}function hg(t,n){Bo(8390656,8,t,n)}function wc(t,n){Fo(2048,8,t,n)}function yw(t){Le.flags|=4;var n=Le.updateQueue;if(n===null)n=Oo(),Le.updateQueue=n,n.events=[t];else{var a=n.events;a===null?n.events=[t]:a.push(t)}}function pg(t){var n=vt().memoizedState;return yw({ref:n,nextImpl:t}),function(){if((Ze&2)!==0)throw Error(i(440));return n.impl.apply(void 0,arguments)}}function gg(t,n){return Fo(4,2,t,n)}function mg(t,n){return Fo(4,4,t,n)}function bg(t,n){if(typeof n=="function"){t=t();var a=n(t);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function yg(t,n,a){a=a!=null?a.concat([t]):null,Fo(4,4,bg.bind(null,n,t),a)}function Sc(){}function xg(t,n){var a=vt();n=n===void 0?null:n;var o=a.memoizedState;return n!==null&&fc(n,o[1])?o[0]:(a.memoizedState=[t,n],t)}function vg(t,n){var a=vt();n=n===void 0?null:n;var o=a.memoizedState;if(n!==null&&fc(n,o[1]))return o[0];if(o=t(),El){jt(!0);try{t()}finally{jt(!1)}}return a.memoizedState=[o,n],o}function kc(t,n,a){return a===void 0||(fr&1073741824)!==0&&(Ue&261930)===0?t.memoizedState=n:(t.memoizedState=a,t=wm(),Le.lanes|=t,Pr|=t,a)}function wg(t,n,a,o){return dn(a,n)?a:li.current!==null?(t=kc(t,a,o),dn(t,n)||(kt=!0),t):(fr&42)===0||(fr&1073741824)!==0&&(Ue&261930)===0?(kt=!0,t.memoizedState=a):(t=wm(),Le.lanes|=t,Pr|=t,n)}function Sg(t,n,a,o,d){var g=Z.p;Z.p=g!==0&&8>g?g:8;var k=F.T,_={};F.T=_,Nc(t,!1,n,a);try{var q=d(),ee=F.S;if(ee!==null&&ee(_,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){var ie=hw(q,o);aa(t,n,ie,yn(t))}else aa(t,n,o,yn(t))}catch(ce){aa(t,n,{then:function(){},status:"rejected",reason:ce},yn())}finally{Z.p=g,k!==null&&_.types!==null&&(k.types=_.types),F.T=k}}function xw(){}function Ec(t,n,a,o){if(t.tag!==5)throw Error(i(476));var d=kg(t).queue;Sg(t,d,n,O,a===null?xw:function(){return Eg(t),a(o)})}function kg(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:O,baseState:O,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:dr,lastRenderedState:O},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:dr,lastRenderedState:a},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Eg(t){var n=kg(t);n.next===null&&(n=t.alternate.memoizedState),aa(t,n.next.queue,{},yn())}function Cc(){return Ot(ka)}function Cg(){return vt().memoizedState}function Ng(){return vt().memoizedState}function vw(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var a=yn();t=zr(a);var o=Br(n,t,a);o!==null&&(ln(o,n,a),ta(o,n,a)),n={cache:ec()},t.payload=n;return}n=n.return}}function ww(t,n,a){var o=yn();a={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Io(t)?Tg(n,a):(a=qu(t,n,a,o),a!==null&&(ln(a,t,o),jg(a,n,o)))}function Ag(t,n,a){var o=yn();aa(t,n,a,o)}function aa(t,n,a,o){var d={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Io(t))Tg(n,d);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=n.lastRenderedReducer,g!==null))try{var k=n.lastRenderedState,_=g(k,a);if(d.hasEagerState=!0,d.eagerState=_,dn(_,k))return xo(t,n,d,0),ot===null&&yo(),!1}catch{}if(a=qu(t,n,d,o),a!==null)return ln(a,t,o),jg(a,n,o),!0}return!1}function Nc(t,n,a,o){if(o={lane:2,revertLane:lf(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Io(t)){if(n)throw Error(i(479))}else n=qu(t,a,o,2),n!==null&&ln(n,t,2)}function Io(t){var n=t.alternate;return t===Le||n!==null&&n===Le}function Tg(t,n){ii=Lo=!0;var a=t.pending;a===null?n.next=n:(n.next=a.next,a.next=n),t.pending=n}function jg(t,n,a){if((a&4194048)!==0){var o=n.lanes;o&=t.pendingLanes,a|=o,n.lanes=a,ro(t,a)}}var oa={readContext:Ot,use:Mo,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useLayoutEffect:bt,useInsertionEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useSyncExternalStore:bt,useId:bt,useHostTransitionStatus:bt,useFormState:bt,useActionState:bt,useOptimistic:bt,useMemoCache:bt,useCacheRefresh:bt};oa.useEffectEvent=bt;var Rg={readContext:Ot,use:Mo,useCallback:function(t,n){return Zt().memoizedState=[t,n===void 0?null:n],t},useContext:Ot,useEffect:hg,useImperativeHandle:function(t,n,a){a=a!=null?a.concat([t]):null,Bo(4194308,4,bg.bind(null,n,t),a)},useLayoutEffect:function(t,n){return Bo(4194308,4,t,n)},useInsertionEffect:function(t,n){Bo(4,2,t,n)},useMemo:function(t,n){var a=Zt();n=n===void 0?null:n;var o=t();if(El){jt(!0);try{t()}finally{jt(!1)}}return a.memoizedState=[o,n],o},useReducer:function(t,n,a){var o=Zt();if(a!==void 0){var d=a(n);if(El){jt(!0);try{a(n)}finally{jt(!1)}}}else d=n;return o.memoizedState=o.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},o.queue=t,t=t.dispatch=ww.bind(null,Le,t),[o.memoizedState,t]},useRef:function(t){var n=Zt();return t={current:t},n.memoizedState=t},useState:function(t){t=xc(t);var n=t.queue,a=Ag.bind(null,Le,n);return n.dispatch=a,[t.memoizedState,a]},useDebugValue:Sc,useDeferredValue:function(t,n){var a=Zt();return kc(a,t,n)},useTransition:function(){var t=xc(!1);return t=Sg.bind(null,Le,t.queue,!0,!1),Zt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,a){var o=Le,d=Zt();if(Pe){if(a===void 0)throw Error(i(407));a=a()}else{if(a=n(),ot===null)throw Error(i(349));(Ue&127)!==0||Kp(o,n,a)}d.memoizedState=a;var g={value:a,getSnapshot:n};return d.queue=g,hg(Wp.bind(null,o,g,t),[t]),o.flags|=2048,oi(9,{destroy:void 0},Jp.bind(null,o,g,a,n),null),a},useId:function(){var t=Zt(),n=ot.identifierPrefix;if(Pe){var a=Yn,o=Gn;a=(o&~(1<<32-Ke(o)-1)).toString(32)+a,n="_"+n+"R_"+a,a=Do++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=pw++,n="_"+n+"r_"+a.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:Cc,useFormState:sg,useActionState:sg,useOptimistic:function(t){var n=Zt();n.memoizedState=n.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=Nc.bind(null,Le,!0,a),a.dispatch=n,[t,n]},useMemoCache:mc,useCacheRefresh:function(){return Zt().memoizedState=vw.bind(null,Le)},useEffectEvent:function(t){var n=Zt(),a={impl:t};return n.memoizedState=a,function(){if((Ze&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Ac={readContext:Ot,use:Mo,useCallback:xg,useContext:Ot,useEffect:wc,useImperativeHandle:yg,useInsertionEffect:gg,useLayoutEffect:mg,useMemo:vg,useReducer:zo,useRef:dg,useState:function(){return zo(dr)},useDebugValue:Sc,useDeferredValue:function(t,n){var a=vt();return wg(a,tt.memoizedState,t,n)},useTransition:function(){var t=zo(dr)[0],n=vt().memoizedState;return[typeof t=="boolean"?t:ia(t),n]},useSyncExternalStore:Qp,useId:Cg,useHostTransitionStatus:Cc,useFormState:ug,useActionState:ug,useOptimistic:function(t,n){var a=vt();return ng(a,tt,t,n)},useMemoCache:mc,useCacheRefresh:Ng};Ac.useEffectEvent=pg;var _g={readContext:Ot,use:Mo,useCallback:xg,useContext:Ot,useEffect:wc,useImperativeHandle:yg,useInsertionEffect:gg,useLayoutEffect:mg,useMemo:vg,useReducer:yc,useRef:dg,useState:function(){return yc(dr)},useDebugValue:Sc,useDeferredValue:function(t,n){var a=vt();return tt===null?kc(a,t,n):wg(a,tt.memoizedState,t,n)},useTransition:function(){var t=yc(dr)[0],n=vt().memoizedState;return[typeof t=="boolean"?t:ia(t),n]},useSyncExternalStore:Qp,useId:Cg,useHostTransitionStatus:Cc,useFormState:fg,useActionState:fg,useOptimistic:function(t,n){var a=vt();return tt!==null?ng(a,tt,t,n):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:mc,useCacheRefresh:Ng};_g.useEffectEvent=pg;function Tc(t,n,a,o){n=t.memoizedState,a=a(o,n),a=a==null?n:b({},n,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var jc={enqueueSetState:function(t,n,a){t=t._reactInternals;var o=yn(),d=zr(o);d.payload=n,a!=null&&(d.callback=a),n=Br(t,d,o),n!==null&&(ln(n,t,o),ta(n,t,o))},enqueueReplaceState:function(t,n,a){t=t._reactInternals;var o=yn(),d=zr(o);d.tag=1,d.payload=n,a!=null&&(d.callback=a),n=Br(t,d,o),n!==null&&(ln(n,t,o),ta(n,t,o))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var a=yn(),o=zr(a);o.tag=2,n!=null&&(o.callback=n),n=Br(t,o,a),n!==null&&(ln(n,t,a),ta(n,t,a))}};function Lg(t,n,a,o,d,g,k){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(o,g,k):n.prototype&&n.prototype.isPureReactComponent?!Yi(a,o)||!Yi(d,g):!0}function Dg(t,n,a,o){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,o),n.state!==t&&jc.enqueueReplaceState(n,n.state,null)}function Cl(t,n){var a=n;if("ref"in n){a={};for(var o in n)o!=="ref"&&(a[o]=n[o])}if(t=t.defaultProps){a===n&&(a=b({},a));for(var d in t)a[d]===void 0&&(a[d]=t[d])}return a}function Og(t){bo(t)}function Mg(t){console.error(t)}function zg(t){bo(t)}function Uo(t,n){try{var a=t.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function Bg(t,n,a){try{var o=t.onCaughtError;o(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Rc(t,n,a){return a=zr(a),a.tag=3,a.payload={element:null},a.callback=function(){Uo(t,n)},a}function Fg(t){return t=zr(t),t.tag=3,t}function Ig(t,n,a,o){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var g=o.value;t.payload=function(){return d(g)},t.callback=function(){Bg(n,a,o)}}var k=a.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(t.callback=function(){Bg(n,a,o),typeof d!="function"&&(qr===null?qr=new Set([this]):qr.add(this));var _=o.stack;this.componentDidCatch(o.value,{componentStack:_!==null?_:""})})}function Sw(t,n,a,o,d){if(a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=a.alternate,n!==null&&Wl(n,a,d,!0),a=pn.current,a!==null){switch(a.tag){case 31:case 13:return Dn===null?Jo():a.alternate===null&&yt===0&&(yt=3),a.flags&=-257,a.flags|=65536,a.lanes=d,o===Ao?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([o]):n.add(o),tf(t,o,d)),!1;case 22:return a.flags|=65536,o===Ao?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([o]):a.add(o)),tf(t,o,d)),!1}throw Error(i(435,a.tag))}return tf(t,o,d),Jo(),!1}if(Pe)return n=pn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=d,o!==Zu&&(t=Error(i(422),{cause:o}),Qi(jn(t,a)))):(o!==Zu&&(n=Error(i(423),{cause:o}),Qi(jn(n,a))),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,o=jn(o,a),d=Rc(t.stateNode,o,d),ac(t,d),yt!==4&&(yt=2)),!1;var g=Error(i(520),{cause:o});if(g=jn(g,a),ga===null?ga=[g]:ga.push(g),yt!==4&&(yt=2),n===null)return!0;o=jn(o,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,t=d&-d,a.lanes|=t,t=Rc(a.stateNode,o,t),ac(a,t),!1;case 1:if(n=a.type,g=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(qr===null||!qr.has(g))))return a.flags|=65536,d&=-d,a.lanes|=d,d=Fg(d),Ig(d,t,a,o),ac(a,d),!1}a=a.return}while(a!==null);return!1}var _c=Error(i(461)),kt=!1;function Mt(t,n,a,o){n.child=t===null?qp(n,null,a,o):kl(n,t.child,a,o)}function Ug(t,n,a,o,d){a=a.render;var g=n.ref;if("ref"in o){var k={};for(var _ in o)_!=="ref"&&(k[_]=o[_])}else k=o;return xl(n),o=dc(t,n,a,k,g,d),_=hc(),t!==null&&!kt?(pc(t,n,d),hr(t,n,d)):(Pe&&_&&Yu(n),n.flags|=1,Mt(t,n,o,d),n.child)}function Hg(t,n,a,o,d){if(t===null){var g=a.type;return typeof g=="function"&&!$u(g)&&g.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=g,Pg(t,n,g,o,d)):(t=wo(a.type,null,o,n,n.mode,d),t.ref=n.ref,t.return=n,n.child=t)}if(g=t.child,!Ic(t,d)){var k=g.memoizedProps;if(a=a.compare,a=a!==null?a:Yi,a(k,o)&&t.ref===n.ref)return hr(t,n,d)}return n.flags|=1,t=or(g,o),t.ref=n.ref,t.return=n,n.child=t}function Pg(t,n,a,o,d){if(t!==null){var g=t.memoizedProps;if(Yi(g,o)&&t.ref===n.ref)if(kt=!1,n.pendingProps=o=g,Ic(t,d))(t.flags&131072)!==0&&(kt=!0);else return n.lanes=t.lanes,hr(t,n,d)}return Lc(t,n,a,o,d)}function qg(t,n,a,o){var d=o.children,g=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(g=g!==null?g.baseLanes|a:a,t!==null){for(o=n.child=t.child,d=0;o!==null;)d=d|o.lanes|o.childLanes,o=o.sibling;o=d&~g}else o=0,n.child=null;return $g(t,n,g,a,o)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Co(n,g!==null?g.cachePool:null),g!==null?Gp(n,g):sc(),Yp(n);else return o=n.lanes=536870912,$g(t,n,g!==null?g.baseLanes|a:a,a,o)}else g!==null?(Co(n,g.cachePool),Gp(n,g),Ir(),n.memoizedState=null):(t!==null&&Co(n,null),sc(),Ir());return Mt(t,n,d,a),n.child}function sa(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function $g(t,n,a,o,d){var g=nc();return g=g===null?null:{parent:wt._currentValue,pool:g},n.memoizedState={baseLanes:a,cachePool:g},t!==null&&Co(n,null),sc(),Yp(n),t!==null&&Wl(t,n,o,!0),n.childLanes=d,null}function Ho(t,n){return n=qo({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function Vg(t,n,a){return kl(n,t.child,null,a),t=Ho(n,n.pendingProps),t.flags|=2,gn(n),n.memoizedState=null,t}function kw(t,n,a){var o=n.pendingProps,d=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(Pe){if(o.mode==="hidden")return t=Ho(n,o),n.lanes=536870912,sa(null,t);if(cc(n),(t=ft)?(t=rb(t,Ln),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:_r!==null?{id:Gn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},a=Tp(t),a.return=n,n.child=a,Dt=n,ft=null)):t=null,t===null)throw Dr(n);return n.lanes=536870912,null}return Ho(n,o)}var g=t.memoizedState;if(g!==null){var k=g.dehydrated;if(cc(n),d)if(n.flags&256)n.flags&=-257,n=Vg(t,n,a);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(i(558));else if(kt||Wl(t,n,a,!1),d=(a&t.childLanes)!==0,kt||d){if(o=ot,o!==null&&(k=lo(o,a),k!==0&&k!==g.retryLane))throw g.retryLane=k,gl(t,k),ln(o,t,k),_c;Jo(),n=Vg(t,n,a)}else t=g.treeContext,ft=On(k.nextSibling),Dt=n,Pe=!0,Lr=null,Ln=!1,t!==null&&_p(n,t),n=Ho(n,o),n.flags|=4096;return n}return t=or(t.child,{mode:o.mode,children:o.children}),t.ref=n.ref,n.child=t,t.return=n,t}function Po(t,n){var a=n.ref;if(a===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(t===null||t.ref!==a)&&(n.flags|=4194816)}}function Lc(t,n,a,o,d){return xl(n),a=dc(t,n,a,o,void 0,d),o=hc(),t!==null&&!kt?(pc(t,n,d),hr(t,n,d)):(Pe&&o&&Yu(n),n.flags|=1,Mt(t,n,a,d),n.child)}function Gg(t,n,a,o,d,g){return xl(n),n.updateQueue=null,a=Zp(n,o,a,d),Xp(t),o=hc(),t!==null&&!kt?(pc(t,n,g),hr(t,n,g)):(Pe&&o&&Yu(n),n.flags|=1,Mt(t,n,a,g),n.child)}function Yg(t,n,a,o,d){if(xl(n),n.stateNode===null){var g=Zl,k=a.contextType;typeof k=="object"&&k!==null&&(g=Ot(k)),g=new a(o,g),n.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=jc,n.stateNode=g,g._reactInternals=n,g=n.stateNode,g.props=o,g.state=n.memoizedState,g.refs={},lc(n),k=a.contextType,g.context=typeof k=="object"&&k!==null?Ot(k):Zl,g.state=n.memoizedState,k=a.getDerivedStateFromProps,typeof k=="function"&&(Tc(n,a,k,o),g.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(k=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),k!==g.state&&jc.enqueueReplaceState(g,g.state,null),ra(n,o,g,d),na(),g.state=n.memoizedState),typeof g.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(t===null){g=n.stateNode;var _=n.memoizedProps,q=Cl(a,_);g.props=q;var ee=g.context,ie=a.contextType;k=Zl,typeof ie=="object"&&ie!==null&&(k=Ot(ie));var ce=a.getDerivedStateFromProps;ie=typeof ce=="function"||typeof g.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,ie||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(_||ee!==k)&&Dg(n,g,o,k),Mr=!1;var te=n.memoizedState;g.state=te,ra(n,o,g,d),na(),ee=n.memoizedState,_||te!==ee||Mr?(typeof ce=="function"&&(Tc(n,a,ce,o),ee=n.memoizedState),(q=Mr||Lg(n,a,q,o,te,ee,k))?(ie||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(n.flags|=4194308)):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=ee),g.props=o,g.state=ee,g.context=k,o=q):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{g=n.stateNode,ic(t,n),k=n.memoizedProps,ie=Cl(a,k),g.props=ie,ce=n.pendingProps,te=g.context,ee=a.contextType,q=Zl,typeof ee=="object"&&ee!==null&&(q=Ot(ee)),_=a.getDerivedStateFromProps,(ee=typeof _=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(k!==ce||te!==q)&&Dg(n,g,o,q),Mr=!1,te=n.memoizedState,g.state=te,ra(n,o,g,d),na();var le=n.memoizedState;k!==ce||te!==le||Mr||t!==null&&t.dependencies!==null&&ko(t.dependencies)?(typeof _=="function"&&(Tc(n,a,_,o),le=n.memoizedState),(ie=Mr||Lg(n,a,ie,o,te,le,q)||t!==null&&t.dependencies!==null&&ko(t.dependencies))?(ee||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(o,le,q),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(o,le,q)),typeof g.componentDidUpdate=="function"&&(n.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof g.componentDidUpdate!="function"||k===t.memoizedProps&&te===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&te===t.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=le),g.props=o,g.state=le,g.context=q,o=ie):(typeof g.componentDidUpdate!="function"||k===t.memoizedProps&&te===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&te===t.memoizedState||(n.flags|=1024),o=!1)}return g=o,Po(t,n),o=(n.flags&128)!==0,g||o?(g=n.stateNode,a=o&&typeof a.getDerivedStateFromError!="function"?null:g.render(),n.flags|=1,t!==null&&o?(n.child=kl(n,t.child,null,d),n.child=kl(n,null,a,d)):Mt(t,n,a,d),n.memoizedState=g.state,t=n.child):t=hr(t,n,d),t}function Xg(t,n,a,o){return bl(),n.flags|=256,Mt(t,n,a,o),n.child}var Dc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Oc(t){return{baseLanes:t,cachePool:Bp()}}function Mc(t,n,a){return t=t!==null?t.childLanes&~a:0,n&&(t|=bn),t}function Zg(t,n,a){var o=n.pendingProps,d=!1,g=(n.flags&128)!==0,k;if((k=g)||(k=t!==null&&t.memoizedState===null?!1:(xt.current&2)!==0),k&&(d=!0,n.flags&=-129),k=(n.flags&32)!==0,n.flags&=-33,t===null){if(Pe){if(d?Fr(n):Ir(),(t=ft)?(t=rb(t,Ln),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:_r!==null?{id:Gn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},a=Tp(t),a.return=n,n.child=a,Dt=n,ft=null)):t=null,t===null)throw Dr(n);return yf(t)?n.lanes=32:n.lanes=536870912,null}var _=o.children;return o=o.fallback,d?(Ir(),d=n.mode,_=qo({mode:"hidden",children:_},d),o=ml(o,d,a,null),_.return=n,o.return=n,_.sibling=o,n.child=_,o=n.child,o.memoizedState=Oc(a),o.childLanes=Mc(t,k,a),n.memoizedState=Dc,sa(null,o)):(Fr(n),zc(n,_))}var q=t.memoizedState;if(q!==null&&(_=q.dehydrated,_!==null)){if(g)n.flags&256?(Fr(n),n.flags&=-257,n=Bc(t,n,a)):n.memoizedState!==null?(Ir(),n.child=t.child,n.flags|=128,n=null):(Ir(),_=o.fallback,d=n.mode,o=qo({mode:"visible",children:o.children},d),_=ml(_,d,a,null),_.flags|=2,o.return=n,_.return=n,o.sibling=_,n.child=o,kl(n,t.child,null,a),o=n.child,o.memoizedState=Oc(a),o.childLanes=Mc(t,k,a),n.memoizedState=Dc,n=sa(null,o));else if(Fr(n),yf(_)){if(k=_.nextSibling&&_.nextSibling.dataset,k)var ee=k.dgst;k=ee,o=Error(i(419)),o.stack="",o.digest=k,Qi({value:o,source:null,stack:null}),n=Bc(t,n,a)}else if(kt||Wl(t,n,a,!1),k=(a&t.childLanes)!==0,kt||k){if(k=ot,k!==null&&(o=lo(k,a),o!==0&&o!==q.retryLane))throw q.retryLane=o,gl(t,o),ln(k,t,o),_c;bf(_)||Jo(),n=Bc(t,n,a)}else bf(_)?(n.flags|=192,n.child=t.child,n=null):(t=q.treeContext,ft=On(_.nextSibling),Dt=n,Pe=!0,Lr=null,Ln=!1,t!==null&&_p(n,t),n=zc(n,o.children),n.flags|=4096);return n}return d?(Ir(),_=o.fallback,d=n.mode,q=t.child,ee=q.sibling,o=or(q,{mode:"hidden",children:o.children}),o.subtreeFlags=q.subtreeFlags&65011712,ee!==null?_=or(ee,_):(_=ml(_,d,a,null),_.flags|=2),_.return=n,o.return=n,o.sibling=_,n.child=o,sa(null,o),o=n.child,_=t.child.memoizedState,_===null?_=Oc(a):(d=_.cachePool,d!==null?(q=wt._currentValue,d=d.parent!==q?{parent:q,pool:q}:d):d=Bp(),_={baseLanes:_.baseLanes|a,cachePool:d}),o.memoizedState=_,o.childLanes=Mc(t,k,a),n.memoizedState=Dc,sa(t.child,o)):(Fr(n),a=t.child,t=a.sibling,a=or(a,{mode:"visible",children:o.children}),a.return=n,a.sibling=null,t!==null&&(k=n.deletions,k===null?(n.deletions=[t],n.flags|=16):k.push(t)),n.child=a,n.memoizedState=null,a)}function zc(t,n){return n=qo({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function qo(t,n){return t=hn(22,t,null,n),t.lanes=0,t}function Bc(t,n,a){return kl(n,t.child,null,a),t=zc(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function Qg(t,n,a){t.lanes|=n;var o=t.alternate;o!==null&&(o.lanes|=n),Ju(t.return,n,a)}function Fc(t,n,a,o,d,g){var k=t.memoizedState;k===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:d,treeForkCount:g}:(k.isBackwards=n,k.rendering=null,k.renderingStartTime=0,k.last=o,k.tail=a,k.tailMode=d,k.treeForkCount=g)}function Kg(t,n,a){var o=n.pendingProps,d=o.revealOrder,g=o.tail;o=o.children;var k=xt.current,_=(k&2)!==0;if(_?(k=k&1|2,n.flags|=128):k&=1,A(xt,k),Mt(t,n,o,a),o=Pe?Zi:0,!_&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Qg(t,a,n);else if(t.tag===19)Qg(t,a,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(d){case"forwards":for(a=n.child,d=null;a!==null;)t=a.alternate,t!==null&&_o(t)===null&&(d=a),a=a.sibling;a=d,a===null?(d=n.child,n.child=null):(d=a.sibling,a.sibling=null),Fc(n,!1,d,a,g,o);break;case"backwards":case"unstable_legacy-backwards":for(a=null,d=n.child,n.child=null;d!==null;){if(t=d.alternate,t!==null&&_o(t)===null){n.child=d;break}t=d.sibling,d.sibling=a,a=d,d=t}Fc(n,!0,a,null,g,o);break;case"together":Fc(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function hr(t,n,a){if(t!==null&&(n.dependencies=t.dependencies),Pr|=n.lanes,(a&n.childLanes)===0)if(t!==null){if(Wl(t,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(i(153));if(n.child!==null){for(t=n.child,a=or(t,t.pendingProps),n.child=a,a.return=n;t.sibling!==null;)t=t.sibling,a=a.sibling=or(t,t.pendingProps),a.return=n;a.sibling=null}return n.child}function Ic(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&ko(t)))}function Ew(t,n,a){switch(n.tag){case 3:ye(n,n.stateNode.containerInfo),Or(n,wt,t.memoizedState.cache),bl();break;case 27:case 5:me(n);break;case 4:ye(n,n.stateNode.containerInfo);break;case 10:Or(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,cc(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(Fr(n),n.flags|=128,null):(a&n.child.childLanes)!==0?Zg(t,n,a):(Fr(n),t=hr(t,n,a),t!==null?t.sibling:null);Fr(n);break;case 19:var d=(t.flags&128)!==0;if(o=(a&n.childLanes)!==0,o||(Wl(t,n,a,!1),o=(a&n.childLanes)!==0),d){if(o)return Kg(t,n,a);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),A(xt,xt.current),o)break;return null;case 22:return n.lanes=0,qg(t,n,a,n.pendingProps);case 24:Or(n,wt,t.memoizedState.cache)}return hr(t,n,a)}function Jg(t,n,a){if(t!==null)if(t.memoizedProps!==n.pendingProps)kt=!0;else{if(!Ic(t,a)&&(n.flags&128)===0)return kt=!1,Ew(t,n,a);kt=(t.flags&131072)!==0}else kt=!1,Pe&&(n.flags&1048576)!==0&&Rp(n,Zi,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(t=wl(n.elementType),n.type=t,typeof t=="function")$u(t)?(o=Cl(t,o),n.tag=1,n=Yg(null,n,t,o,a)):(n.tag=0,n=Lc(null,n,t,o,a));else{if(t!=null){var d=t.$$typeof;if(d===B){n.tag=11,n=Ug(null,n,t,o,a);break e}else if(d===M){n.tag=14,n=Hg(null,n,t,o,a);break e}}throw n=I(t)||t,Error(i(306,n,""))}}return n;case 0:return Lc(t,n,n.type,n.pendingProps,a);case 1:return o=n.type,d=Cl(o,n.pendingProps),Yg(t,n,o,d,a);case 3:e:{if(ye(n,n.stateNode.containerInfo),t===null)throw Error(i(387));o=n.pendingProps;var g=n.memoizedState;d=g.element,ic(t,n),ra(n,o,null,a);var k=n.memoizedState;if(o=k.cache,Or(n,wt,o),o!==g.cache&&Wu(n,[wt],a,!0),na(),o=k.element,g.isDehydrated)if(g={element:o,isDehydrated:!1,cache:k.cache},n.updateQueue.baseState=g,n.memoizedState=g,n.flags&256){n=Xg(t,n,o,a);break e}else if(o!==d){d=jn(Error(i(424)),n),Qi(d),n=Xg(t,n,o,a);break e}else for(t=n.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,ft=On(t.firstChild),Dt=n,Pe=!0,Lr=null,Ln=!0,a=qp(n,null,o,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(bl(),o===d){n=hr(t,n,a);break e}Mt(t,n,o,a)}n=n.child}return n;case 26:return Po(t,n),t===null?(a=ub(n.type,null,n.pendingProps,null))?n.memoizedState=a:Pe||(a=n.type,t=n.pendingProps,o=is(fe.current).createElement(a),o[At]=n,o[Ut]=t,zt(o,a,t),Rt(o),n.stateNode=o):n.memoizedState=ub(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return me(n),t===null&&Pe&&(o=n.stateNode=ab(n.type,n.pendingProps,fe.current),Dt=n,Ln=!0,d=ft,Yr(n.type)?(xf=d,ft=On(o.firstChild)):ft=d),Mt(t,n,n.pendingProps.children,a),Po(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&Pe&&((d=o=ft)&&(o=eS(o,n.type,n.pendingProps,Ln),o!==null?(n.stateNode=o,Dt=n,ft=On(o.firstChild),Ln=!1,d=!0):d=!1),d||Dr(n)),me(n),d=n.type,g=n.pendingProps,k=t!==null?t.memoizedProps:null,o=g.children,pf(d,g)?o=null:k!==null&&pf(d,k)&&(n.flags|=32),n.memoizedState!==null&&(d=dc(t,n,gw,null,null,a),ka._currentValue=d),Po(t,n),Mt(t,n,o,a),n.child;case 6:return t===null&&Pe&&((t=a=ft)&&(a=tS(a,n.pendingProps,Ln),a!==null?(n.stateNode=a,Dt=n,ft=null,t=!0):t=!1),t||Dr(n)),null;case 13:return Zg(t,n,a);case 4:return ye(n,n.stateNode.containerInfo),o=n.pendingProps,t===null?n.child=kl(n,null,o,a):Mt(t,n,o,a),n.child;case 11:return Ug(t,n,n.type,n.pendingProps,a);case 7:return Mt(t,n,n.pendingProps,a),n.child;case 8:return Mt(t,n,n.pendingProps.children,a),n.child;case 12:return Mt(t,n,n.pendingProps.children,a),n.child;case 10:return o=n.pendingProps,Or(n,n.type,o.value),Mt(t,n,o.children,a),n.child;case 9:return d=n.type._context,o=n.pendingProps.children,xl(n),d=Ot(d),o=o(d),n.flags|=1,Mt(t,n,o,a),n.child;case 14:return Hg(t,n,n.type,n.pendingProps,a);case 15:return Pg(t,n,n.type,n.pendingProps,a);case 19:return Kg(t,n,a);case 31:return kw(t,n,a);case 22:return qg(t,n,a,n.pendingProps);case 24:return xl(n),o=Ot(wt),t===null?(d=nc(),d===null&&(d=ot,g=ec(),d.pooledCache=g,g.refCount++,g!==null&&(d.pooledCacheLanes|=a),d=g),n.memoizedState={parent:o,cache:d},lc(n),Or(n,wt,d)):((t.lanes&a)!==0&&(ic(t,n),ra(n,null,null,a),na()),d=t.memoizedState,g=n.memoizedState,d.parent!==o?(d={parent:o,cache:o},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),Or(n,wt,o)):(o=g.cache,Or(n,wt,o),o!==d.cache&&Wu(n,[wt],a,!0))),Mt(t,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(i(156,n.tag))}function pr(t){t.flags|=4}function Uc(t,n,a,o,d){if((n=(t.mode&32)!==0)&&(n=!1),n){if(t.flags|=16777216,(d&335544128)===d)if(t.stateNode.complete)t.flags|=8192;else if(Cm())t.flags|=8192;else throw Sl=Ao,rc}else t.flags&=-16777217}function Wg(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!pb(n))if(Cm())t.flags|=8192;else throw Sl=Ao,rc}function $o(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?to():536870912,t.lanes|=n,fi|=n)}function ua(t,n){if(!Pe)switch(t.tailMode){case"hidden":n=t.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:o.sibling=null}}function dt(t){var n=t.alternate!==null&&t.alternate.child===t.child,a=0,o=0;if(n)for(var d=t.child;d!==null;)a|=d.lanes|d.childLanes,o|=d.subtreeFlags&65011712,o|=d.flags&65011712,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)a|=d.lanes|d.childLanes,o|=d.subtreeFlags,o|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=o,t.childLanes=a,n}function Cw(t,n,a){var o=n.pendingProps;switch(Xu(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(n),null;case 1:return dt(n),null;case 3:return a=n.stateNode,o=null,t!==null&&(o=t.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),cr(wt),pe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Jl(n)?pr(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Qu())),dt(n),null;case 26:var d=n.type,g=n.memoizedState;return t===null?(pr(n),g!==null?(dt(n),Wg(n,g)):(dt(n),Uc(n,d,null,o,a))):g?g!==t.memoizedState?(pr(n),dt(n),Wg(n,g)):(dt(n),n.flags&=-16777217):(t=t.memoizedProps,t!==o&&pr(n),dt(n),Uc(n,d,t,o,a)),null;case 27:if(xe(n),a=fe.current,d=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==o&&pr(n);else{if(!o){if(n.stateNode===null)throw Error(i(166));return dt(n),null}t=ne.current,Jl(n)?Lp(n):(t=ab(d,o,a),n.stateNode=t,pr(n))}return dt(n),null;case 5:if(xe(n),d=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==o&&pr(n);else{if(!o){if(n.stateNode===null)throw Error(i(166));return dt(n),null}if(g=ne.current,Jl(n))Lp(n);else{var k=is(fe.current);switch(g){case 1:g=k.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:g=k.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":g=k.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":g=k.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":g=k.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof o.is=="string"?k.createElement("select",{is:o.is}):k.createElement("select"),o.multiple?g.multiple=!0:o.size&&(g.size=o.size);break;default:g=typeof o.is=="string"?k.createElement(d,{is:o.is}):k.createElement(d)}}g[At]=n,g[Ut]=o;e:for(k=n.child;k!==null;){if(k.tag===5||k.tag===6)g.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===n)break e;for(;k.sibling===null;){if(k.return===null||k.return===n)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}n.stateNode=g;e:switch(zt(g,d,o),d){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&pr(n)}}return dt(n),Uc(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,a),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==o&&pr(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(i(166));if(t=fe.current,Jl(n)){if(t=n.stateNode,a=n.memoizedProps,o=null,d=Dt,d!==null)switch(d.tag){case 27:case 5:o=d.memoizedProps}t[At]=n,t=!!(t.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||Zm(t.nodeValue,a)),t||Dr(n,!0)}else t=is(t).createTextNode(o),t[At]=n,n.stateNode=t}return dt(n),null;case 31:if(a=n.memoizedState,t===null||t.memoizedState!==null){if(o=Jl(n),a!==null){if(t===null){if(!o)throw Error(i(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(557));t[At]=n}else bl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),t=!1}else a=Qu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return n.flags&256?(gn(n),n):(gn(n),null);if((n.flags&128)!==0)throw Error(i(558))}return dt(n),null;case 13:if(o=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=Jl(n),o!==null&&o.dehydrated!==null){if(t===null){if(!d)throw Error(i(318));if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(i(317));d[At]=n}else bl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),d=!1}else d=Qu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(gn(n),n):(gn(n),null)}return gn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=o!==null,t=t!==null&&t.memoizedState!==null,a&&(o=n.child,d=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(d=o.alternate.memoizedState.cachePool.pool),g=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(g=o.memoizedState.cachePool.pool),g!==d&&(o.flags|=2048)),a!==t&&a&&(n.child.flags|=8192),$o(n,n.updateQueue),dt(n),null);case 4:return pe(),t===null&&uf(n.stateNode.containerInfo),dt(n),null;case 10:return cr(n.type),dt(n),null;case 19:if(U(xt),o=n.memoizedState,o===null)return dt(n),null;if(d=(n.flags&128)!==0,g=o.rendering,g===null)if(d)ua(o,!1);else{if(yt!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(g=_o(t),g!==null){for(n.flags|=128,ua(o,!1),t=g.updateQueue,n.updateQueue=t,$o(n,t),n.subtreeFlags=0,t=a,a=n.child;a!==null;)Ap(a,t),a=a.sibling;return A(xt,xt.current&1|2),Pe&&sr(n,o.treeForkCount),n.child}t=t.sibling}o.tail!==null&&at()>Zo&&(n.flags|=128,d=!0,ua(o,!1),n.lanes=4194304)}else{if(!d)if(t=_o(g),t!==null){if(n.flags|=128,d=!0,t=t.updateQueue,n.updateQueue=t,$o(n,t),ua(o,!0),o.tail===null&&o.tailMode==="hidden"&&!g.alternate&&!Pe)return dt(n),null}else 2*at()-o.renderingStartTime>Zo&&a!==536870912&&(n.flags|=128,d=!0,ua(o,!1),n.lanes=4194304);o.isBackwards?(g.sibling=n.child,n.child=g):(t=o.last,t!==null?t.sibling=g:n.child=g,o.last=g)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=at(),t.sibling=null,a=xt.current,A(xt,d?a&1|2:a&1),Pe&&sr(n,o.treeForkCount),t):(dt(n),null);case 22:case 23:return gn(n),uc(),o=n.memoizedState!==null,t!==null?t.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(a&536870912)!==0&&(n.flags&128)===0&&(dt(n),n.subtreeFlags&6&&(n.flags|=8192)):dt(n),a=n.updateQueue,a!==null&&$o(n,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==a&&(n.flags|=2048),t!==null&&U(vl),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),cr(wt),dt(n),null;case 25:return null;case 30:return null}throw Error(i(156,n.tag))}function Nw(t,n){switch(Xu(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return cr(wt),pe(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return xe(n),null;case 31:if(n.memoizedState!==null){if(gn(n),n.alternate===null)throw Error(i(340));bl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(gn(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(i(340));bl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return U(xt),null;case 4:return pe(),null;case 10:return cr(n.type),null;case 22:case 23:return gn(n),uc(),t!==null&&U(vl),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return cr(wt),null;case 25:return null;default:return null}}function em(t,n){switch(Xu(n),n.tag){case 3:cr(wt),pe();break;case 26:case 27:case 5:xe(n);break;case 4:pe();break;case 31:n.memoizedState!==null&&gn(n);break;case 13:gn(n);break;case 19:U(xt);break;case 10:cr(n.type);break;case 22:case 23:gn(n),uc(),t!==null&&U(vl);break;case 24:cr(wt)}}function ca(t,n){try{var a=n.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var d=o.next;a=d;do{if((a.tag&t)===t){o=void 0;var g=a.create,k=a.inst;o=g(),k.destroy=o}a=a.next}while(a!==d)}}catch(_){et(n,n.return,_)}}function Ur(t,n,a){try{var o=n.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var g=d.next;o=g;do{if((o.tag&t)===t){var k=o.inst,_=k.destroy;if(_!==void 0){k.destroy=void 0,d=n;var q=a,ee=_;try{ee()}catch(ie){et(d,q,ie)}}}o=o.next}while(o!==g)}}catch(ie){et(n,n.return,ie)}}function tm(t){var n=t.updateQueue;if(n!==null){var a=t.stateNode;try{Vp(n,a)}catch(o){et(t,t.return,o)}}}function nm(t,n,a){a.props=Cl(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(o){et(t,n,o)}}function fa(t,n){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var o=t.stateNode;break;case 30:o=t.stateNode;break;default:o=t.stateNode}typeof a=="function"?t.refCleanup=a(o):a.current=o}}catch(d){et(t,n,d)}}function Xn(t,n){var a=t.ref,o=t.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(d){et(t,n,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(d){et(t,n,d)}else a.current=null}function rm(t){var n=t.type,a=t.memoizedProps,o=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&o.focus();break e;case"img":a.src?o.src=a.src:a.srcSet&&(o.srcset=a.srcSet)}}catch(d){et(t,t.return,d)}}function Hc(t,n,a){try{var o=t.stateNode;Xw(o,t.type,a,n),o[Ut]=n}catch(d){et(t,t.return,d)}}function lm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Yr(t.type)||t.tag===4}function Pc(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||lm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Yr(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function qc(t,n,a){var o=t.tag;if(o===5||o===6)t=t.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(t),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=ir));else if(o!==4&&(o===27&&Yr(t.type)&&(a=t.stateNode,n=null),t=t.child,t!==null))for(qc(t,n,a),t=t.sibling;t!==null;)qc(t,n,a),t=t.sibling}function Vo(t,n,a){var o=t.tag;if(o===5||o===6)t=t.stateNode,n?a.insertBefore(t,n):a.appendChild(t);else if(o!==4&&(o===27&&Yr(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Vo(t,n,a),t=t.sibling;t!==null;)Vo(t,n,a),t=t.sibling}function im(t){var n=t.stateNode,a=t.memoizedProps;try{for(var o=t.type,d=n.attributes;d.length;)n.removeAttributeNode(d[0]);zt(n,o,a),n[At]=t,n[Ut]=a}catch(g){et(t,t.return,g)}}var gr=!1,Et=!1,$c=!1,am=typeof WeakSet=="function"?WeakSet:Set,_t=null;function Aw(t,n){if(t=t.containerInfo,df=ds,t=yp(t),Bu(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var d=o.anchorOffset,g=o.focusNode;o=o.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var k=0,_=-1,q=-1,ee=0,ie=0,ce=t,te=null;t:for(;;){for(var le;ce!==a||d!==0&&ce.nodeType!==3||(_=k+d),ce!==g||o!==0&&ce.nodeType!==3||(q=k+o),ce.nodeType===3&&(k+=ce.nodeValue.length),(le=ce.firstChild)!==null;)te=ce,ce=le;for(;;){if(ce===t)break t;if(te===a&&++ee===d&&(_=k),te===g&&++ie===o&&(q=k),(le=ce.nextSibling)!==null)break;ce=te,te=ce.parentNode}ce=le}a=_===-1||q===-1?null:{start:_,end:q}}else a=null}a=a||{start:0,end:0}}else a=null;for(hf={focusedElem:t,selectionRange:a},ds=!1,_t=n;_t!==null;)if(n=_t,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,_t=t;else for(;_t!==null;){switch(n=_t,g=n.alternate,t=n.flags,n.tag){case 0:if((t&4)!==0&&(t=n.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)d=t[a],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,a=n,d=g.memoizedProps,g=g.memoizedState,o=a.stateNode;try{var Se=Cl(a.type,d);t=o.getSnapshotBeforeUpdate(Se,g),o.__reactInternalSnapshotBeforeUpdate=t}catch(Te){et(a,a.return,Te)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,a=t.nodeType,a===9)mf(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":mf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(i(163))}if(t=n.sibling,t!==null){t.return=n.return,_t=t;break}_t=n.return}}function om(t,n,a){var o=a.flags;switch(a.tag){case 0:case 11:case 15:br(t,a),o&4&&ca(5,a);break;case 1:if(br(t,a),o&4)if(t=a.stateNode,n===null)try{t.componentDidMount()}catch(k){et(a,a.return,k)}else{var d=Cl(a.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(d,n,t.__reactInternalSnapshotBeforeUpdate)}catch(k){et(a,a.return,k)}}o&64&&tm(a),o&512&&fa(a,a.return);break;case 3:if(br(t,a),o&64&&(t=a.updateQueue,t!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{Vp(t,n)}catch(k){et(a,a.return,k)}}break;case 27:n===null&&o&4&&im(a);case 26:case 5:br(t,a),n===null&&o&4&&rm(a),o&512&&fa(a,a.return);break;case 12:br(t,a);break;case 31:br(t,a),o&4&&cm(t,a);break;case 13:br(t,a),o&4&&fm(t,a),o&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=zw.bind(null,a),nS(t,a))));break;case 22:if(o=a.memoizedState!==null||gr,!o){n=n!==null&&n.memoizedState!==null||Et,d=gr;var g=Et;gr=o,(Et=n)&&!g?yr(t,a,(a.subtreeFlags&8772)!==0):br(t,a),gr=d,Et=g}break;case 30:break;default:br(t,a)}}function sm(t){var n=t.alternate;n!==null&&(t.alternate=null,sm(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Je(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ht=null,en=!1;function mr(t,n,a){for(a=a.child;a!==null;)um(t,n,a),a=a.sibling}function um(t,n,a){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Lt,a)}catch{}switch(a.tag){case 26:Et||Xn(a,n),mr(t,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Et||Xn(a,n);var o=ht,d=en;Yr(a.type)&&(ht=a.stateNode,en=!1),mr(t,n,a),va(a.stateNode),ht=o,en=d;break;case 5:Et||Xn(a,n);case 6:if(o=ht,d=en,ht=null,mr(t,n,a),ht=o,en=d,ht!==null)if(en)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(a.stateNode)}catch(g){et(a,n,g)}else try{ht.removeChild(a.stateNode)}catch(g){et(a,n,g)}break;case 18:ht!==null&&(en?(t=ht,tb(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),xi(t)):tb(ht,a.stateNode));break;case 4:o=ht,d=en,ht=a.stateNode.containerInfo,en=!0,mr(t,n,a),ht=o,en=d;break;case 0:case 11:case 14:case 15:Ur(2,a,n),Et||Ur(4,a,n),mr(t,n,a);break;case 1:Et||(Xn(a,n),o=a.stateNode,typeof o.componentWillUnmount=="function"&&nm(a,n,o)),mr(t,n,a);break;case 21:mr(t,n,a);break;case 22:Et=(o=Et)||a.memoizedState!==null,mr(t,n,a),Et=o;break;default:mr(t,n,a)}}function cm(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{xi(t)}catch(a){et(n,n.return,a)}}}function fm(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{xi(t)}catch(a){et(n,n.return,a)}}function Tw(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new am),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new am),n;default:throw Error(i(435,t.tag))}}function Go(t,n){var a=Tw(t);n.forEach(function(o){if(!a.has(o)){a.add(o);var d=Bw.bind(null,t,o);o.then(d,d)}})}function tn(t,n){var a=n.deletions;if(a!==null)for(var o=0;o<a.length;o++){var d=a[o],g=t,k=n,_=k;e:for(;_!==null;){switch(_.tag){case 27:if(Yr(_.type)){ht=_.stateNode,en=!1;break e}break;case 5:ht=_.stateNode,en=!1;break e;case 3:case 4:ht=_.stateNode.containerInfo,en=!0;break e}_=_.return}if(ht===null)throw Error(i(160));um(g,k,d),ht=null,en=!1,g=d.alternate,g!==null&&(g.return=null),d.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)dm(n,t),n=n.sibling}var Hn=null;function dm(t,n){var a=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:tn(n,t),nn(t),o&4&&(Ur(3,t,t.return),ca(3,t),Ur(5,t,t.return));break;case 1:tn(n,t),nn(t),o&512&&(Et||a===null||Xn(a,a.return)),o&64&&gr&&(t=t.updateQueue,t!==null&&(o=t.callbacks,o!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?o:a.concat(o))));break;case 26:var d=Hn;if(tn(n,t),nn(t),o&512&&(Et||a===null||Xn(a,a.return)),o&4){var g=a!==null?a.memoizedState:null;if(o=t.memoizedState,a===null)if(o===null)if(t.stateNode===null){e:{o=t.type,a=t.memoizedProps,d=d.ownerDocument||d;t:switch(o){case"title":g=d.getElementsByTagName("title")[0],(!g||g[Ce]||g[At]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=d.createElement(o),d.head.insertBefore(g,d.querySelector("head > title"))),zt(g,o,a),g[At]=t,Rt(g),o=g;break e;case"link":var k=db("link","href",d).get(o+(a.href||""));if(k){for(var _=0;_<k.length;_++)if(g=k[_],g.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&g.getAttribute("rel")===(a.rel==null?null:a.rel)&&g.getAttribute("title")===(a.title==null?null:a.title)&&g.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){k.splice(_,1);break t}}g=d.createElement(o),zt(g,o,a),d.head.appendChild(g);break;case"meta":if(k=db("meta","content",d).get(o+(a.content||""))){for(_=0;_<k.length;_++)if(g=k[_],g.getAttribute("content")===(a.content==null?null:""+a.content)&&g.getAttribute("name")===(a.name==null?null:a.name)&&g.getAttribute("property")===(a.property==null?null:a.property)&&g.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&g.getAttribute("charset")===(a.charSet==null?null:a.charSet)){k.splice(_,1);break t}}g=d.createElement(o),zt(g,o,a),d.head.appendChild(g);break;default:throw Error(i(468,o))}g[At]=t,Rt(g),o=g}t.stateNode=o}else hb(d,t.type,t.stateNode);else t.stateNode=fb(d,o,t.memoizedProps);else g!==o?(g===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):g.count--,o===null?hb(d,t.type,t.stateNode):fb(d,o,t.memoizedProps)):o===null&&t.stateNode!==null&&Hc(t,t.memoizedProps,a.memoizedProps)}break;case 27:tn(n,t),nn(t),o&512&&(Et||a===null||Xn(a,a.return)),a!==null&&o&4&&Hc(t,t.memoizedProps,a.memoizedProps);break;case 5:if(tn(n,t),nn(t),o&512&&(Et||a===null||Xn(a,a.return)),t.flags&32){d=t.stateNode;try{Pl(d,"")}catch(Se){et(t,t.return,Se)}}o&4&&t.stateNode!=null&&(d=t.memoizedProps,Hc(t,d,a!==null?a.memoizedProps:d)),o&1024&&($c=!0);break;case 6:if(tn(n,t),nn(t),o&4){if(t.stateNode===null)throw Error(i(162));o=t.memoizedProps,a=t.stateNode;try{a.nodeValue=o}catch(Se){et(t,t.return,Se)}}break;case 3:if(ss=null,d=Hn,Hn=as(n.containerInfo),tn(n,t),Hn=d,nn(t),o&4&&a!==null&&a.memoizedState.isDehydrated)try{xi(n.containerInfo)}catch(Se){et(t,t.return,Se)}$c&&($c=!1,hm(t));break;case 4:o=Hn,Hn=as(t.stateNode.containerInfo),tn(n,t),nn(t),Hn=o;break;case 12:tn(n,t),nn(t);break;case 31:tn(n,t),nn(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Go(t,o)));break;case 13:tn(n,t),nn(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Xo=at()),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Go(t,o)));break;case 22:d=t.memoizedState!==null;var q=a!==null&&a.memoizedState!==null,ee=gr,ie=Et;if(gr=ee||d,Et=ie||q,tn(n,t),Et=ie,gr=ee,nn(t),o&8192)e:for(n=t.stateNode,n._visibility=d?n._visibility&-2:n._visibility|1,d&&(a===null||q||gr||Et||Nl(t)),a=null,n=t;;){if(n.tag===5||n.tag===26){if(a===null){q=a=n;try{if(g=q.stateNode,d)k=g.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{_=q.stateNode;var ce=q.memoizedProps.style,te=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;_.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(Se){et(q,q.return,Se)}}}else if(n.tag===6){if(a===null){q=n;try{q.stateNode.nodeValue=d?"":q.memoizedProps}catch(Se){et(q,q.return,Se)}}}else if(n.tag===18){if(a===null){q=n;try{var le=q.stateNode;d?nb(le,!0):nb(q.stateNode,!1)}catch(Se){et(q,q.return,Se)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break e;for(;n.sibling===null;){if(n.return===null||n.return===t)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=t.updateQueue,o!==null&&(a=o.retryQueue,a!==null&&(o.retryQueue=null,Go(t,a))));break;case 19:tn(n,t),nn(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Go(t,o)));break;case 30:break;case 21:break;default:tn(n,t),nn(t)}}function nn(t){var n=t.flags;if(n&2){try{for(var a,o=t.return;o!==null;){if(lm(o)){a=o;break}o=o.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var d=a.stateNode,g=Pc(t);Vo(t,g,d);break;case 5:var k=a.stateNode;a.flags&32&&(Pl(k,""),a.flags&=-33);var _=Pc(t);Vo(t,_,k);break;case 3:case 4:var q=a.stateNode.containerInfo,ee=Pc(t);qc(t,ee,q);break;default:throw Error(i(161))}}catch(ie){et(t,t.return,ie)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function hm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;hm(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function br(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)om(t,n.alternate,n),n=n.sibling}function Nl(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:Ur(4,n,n.return),Nl(n);break;case 1:Xn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&nm(n,n.return,a),Nl(n);break;case 27:va(n.stateNode);case 26:case 5:Xn(n,n.return),Nl(n);break;case 22:n.memoizedState===null&&Nl(n);break;case 30:Nl(n);break;default:Nl(n)}t=t.sibling}}function yr(t,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,d=t,g=n,k=g.flags;switch(g.tag){case 0:case 11:case 15:yr(d,g,a),ca(4,g);break;case 1:if(yr(d,g,a),o=g,d=o.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(ee){et(o,o.return,ee)}if(o=g,d=o.updateQueue,d!==null){var _=o.stateNode;try{var q=d.shared.hiddenCallbacks;if(q!==null)for(d.shared.hiddenCallbacks=null,d=0;d<q.length;d++)$p(q[d],_)}catch(ee){et(o,o.return,ee)}}a&&k&64&&tm(g),fa(g,g.return);break;case 27:im(g);case 26:case 5:yr(d,g,a),a&&o===null&&k&4&&rm(g),fa(g,g.return);break;case 12:yr(d,g,a);break;case 31:yr(d,g,a),a&&k&4&&cm(d,g);break;case 13:yr(d,g,a),a&&k&4&&fm(d,g);break;case 22:g.memoizedState===null&&yr(d,g,a),fa(g,g.return);break;case 30:break;default:yr(d,g,a)}n=n.sibling}}function Vc(t,n){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&Ki(a))}function Gc(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Ki(t))}function Pn(t,n,a,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)pm(t,n,a,o),n=n.sibling}function pm(t,n,a,o){var d=n.flags;switch(n.tag){case 0:case 11:case 15:Pn(t,n,a,o),d&2048&&ca(9,n);break;case 1:Pn(t,n,a,o);break;case 3:Pn(t,n,a,o),d&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Ki(t)));break;case 12:if(d&2048){Pn(t,n,a,o),t=n.stateNode;try{var g=n.memoizedProps,k=g.id,_=g.onPostCommit;typeof _=="function"&&_(k,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(q){et(n,n.return,q)}}else Pn(t,n,a,o);break;case 31:Pn(t,n,a,o);break;case 13:Pn(t,n,a,o);break;case 23:break;case 22:g=n.stateNode,k=n.alternate,n.memoizedState!==null?g._visibility&2?Pn(t,n,a,o):da(t,n):g._visibility&2?Pn(t,n,a,o):(g._visibility|=2,si(t,n,a,o,(n.subtreeFlags&10256)!==0||!1)),d&2048&&Vc(k,n);break;case 24:Pn(t,n,a,o),d&2048&&Gc(n.alternate,n);break;default:Pn(t,n,a,o)}}function si(t,n,a,o,d){for(d=d&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var g=t,k=n,_=a,q=o,ee=k.flags;switch(k.tag){case 0:case 11:case 15:si(g,k,_,q,d),ca(8,k);break;case 23:break;case 22:var ie=k.stateNode;k.memoizedState!==null?ie._visibility&2?si(g,k,_,q,d):da(g,k):(ie._visibility|=2,si(g,k,_,q,d)),d&&ee&2048&&Vc(k.alternate,k);break;case 24:si(g,k,_,q,d),d&&ee&2048&&Gc(k.alternate,k);break;default:si(g,k,_,q,d)}n=n.sibling}}function da(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=t,o=n,d=o.flags;switch(o.tag){case 22:da(a,o),d&2048&&Vc(o.alternate,o);break;case 24:da(a,o),d&2048&&Gc(o.alternate,o);break;default:da(a,o)}n=n.sibling}}var ha=8192;function ui(t,n,a){if(t.subtreeFlags&ha)for(t=t.child;t!==null;)gm(t,n,a),t=t.sibling}function gm(t,n,a){switch(t.tag){case 26:ui(t,n,a),t.flags&ha&&t.memoizedState!==null&&pS(a,Hn,t.memoizedState,t.memoizedProps);break;case 5:ui(t,n,a);break;case 3:case 4:var o=Hn;Hn=as(t.stateNode.containerInfo),ui(t,n,a),Hn=o;break;case 22:t.memoizedState===null&&(o=t.alternate,o!==null&&o.memoizedState!==null?(o=ha,ha=16777216,ui(t,n,a),ha=o):ui(t,n,a));break;default:ui(t,n,a)}}function mm(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function pa(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];_t=o,ym(o,t)}mm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bm(t),t=t.sibling}function bm(t){switch(t.tag){case 0:case 11:case 15:pa(t),t.flags&2048&&Ur(9,t,t.return);break;case 3:pa(t);break;case 12:pa(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Yo(t)):pa(t);break;default:pa(t)}}function Yo(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];_t=o,ym(o,t)}mm(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:Ur(8,n,n.return),Yo(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,Yo(n));break;default:Yo(n)}t=t.sibling}}function ym(t,n){for(;_t!==null;){var a=_t;switch(a.tag){case 0:case 11:case 15:Ur(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var o=a.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Ki(a.memoizedState.cache)}if(o=a.child,o!==null)o.return=a,_t=o;else e:for(a=t;_t!==null;){o=_t;var d=o.sibling,g=o.return;if(sm(o),o===a){_t=null;break e}if(d!==null){d.return=g,_t=d;break e}_t=g}}}var jw={getCacheForType:function(t){var n=Ot(wt),a=n.data.get(t);return a===void 0&&(a=t(),n.data.set(t,a)),a},cacheSignal:function(){return Ot(wt).controller.signal}},Rw=typeof WeakMap=="function"?WeakMap:Map,Ze=0,ot=null,Be=null,Ue=0,We=0,mn=null,Hr=!1,ci=!1,Yc=!1,xr=0,yt=0,Pr=0,Al=0,Xc=0,bn=0,fi=0,ga=null,rn=null,Zc=!1,Xo=0,xm=0,Zo=1/0,Qo=null,qr=null,Tt=0,$r=null,di=null,vr=0,Qc=0,Kc=null,vm=null,ma=0,Jc=null;function yn(){return(Ze&2)!==0&&Ue!==0?Ue&-Ue:F.T!==null?lf():Bi()}function wm(){if(bn===0)if((Ue&536870912)===0||Pe){var t=ul;ul<<=1,(ul&3932160)===0&&(ul=262144),bn=t}else bn=536870912;return t=pn.current,t!==null&&(t.flags|=32),bn}function ln(t,n,a){(t===ot&&(We===2||We===9)||t.cancelPendingCommit!==null)&&(hi(t,0),Vr(t,Ue,bn,!1)),Vn(t,a),((Ze&2)===0||t!==ot)&&(t===ot&&((Ze&2)===0&&(Al|=a),yt===4&&Vr(t,Ue,bn,!1)),Zn(t))}function Sm(t,n,a){if((Ze&6)!==0)throw Error(i(327));var o=!a&&(n&127)===0&&(n&t.expiredLanes)===0||Tr(t,n),d=o?Dw(t,n):ef(t,n,!0),g=o;do{if(d===0){ci&&!o&&Vr(t,n,0,!1);break}else{if(a=t.current.alternate,g&&!_w(a)){d=ef(t,n,!1),g=!1;continue}if(d===2){if(g=n,t.errorRecoveryDisabledLanes&g)var k=0;else k=t.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){n=k;e:{var _=t;d=ga;var q=_.current.memoizedState.isDehydrated;if(q&&(hi(_,k).flags|=256),k=ef(_,k,!1),k!==2){if(Yc&&!q){_.errorRecoveryDisabledLanes|=g,Al|=g,d=4;break e}g=rn,rn=d,g!==null&&(rn===null?rn=g:rn.push.apply(rn,g))}d=k}if(g=!1,d!==2)continue}}if(d===1){hi(t,0),Vr(t,n,0,!0);break}e:{switch(o=t,g=d,g){case 0:case 1:throw Error(i(345));case 4:if((n&4194048)!==n)break;case 6:Vr(o,n,bn,!Hr);break e;case 2:rn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((n&62914560)===n&&(d=Xo+300-at(),10<d)){if(Vr(o,n,bn,!Hr),cl(o,0,!0)!==0)break e;vr=n,o.timeoutHandle=Wm(km.bind(null,o,a,rn,Qo,Zc,n,bn,Al,fi,Hr,g,"Throttled",-0,0),d);break e}km(o,a,rn,Qo,Zc,n,bn,Al,fi,Hr,g,null,-0,0)}}break}while(!0);Zn(t)}function km(t,n,a,o,d,g,k,_,q,ee,ie,ce,te,le){if(t.timeoutHandle=-1,ce=n.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ir},gm(n,g,ce);var Se=(g&62914560)===g?Xo-at():(g&4194048)===g?xm-at():0;if(Se=gS(ce,Se),Se!==null){vr=g,t.cancelPendingCommit=Se(_m.bind(null,t,n,g,a,o,d,k,_,q,ie,ce,null,te,le)),Vr(t,g,k,!ee);return}}_m(t,n,g,a,o,d,k,_,q)}function _w(t){for(var n=t;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var o=0;o<a.length;o++){var d=a[o],g=d.getSnapshot;d=d.value;try{if(!dn(g(),d))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Vr(t,n,a,o){n&=~Xc,n&=~Al,t.suspendedLanes|=n,t.pingedLanes&=~n,o&&(t.warmLanes|=n),o=t.expirationTimes;for(var d=n;0<d;){var g=31-Ke(d),k=1<<g;o[g]=-1,d&=~k}a!==0&&no(t,a,n)}function Ko(){return(Ze&6)===0?(ba(0),!1):!0}function Wc(){if(Be!==null){if(We===0)var t=Be.return;else t=Be,ur=yl=null,gc(t),ri=null,Wi=0,t=Be;for(;t!==null;)em(t.alternate,t),t=t.return;Be=null}}function hi(t,n){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,Kw(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),vr=0,Wc(),ot=t,Be=a=or(t.current,null),Ue=n,We=0,mn=null,Hr=!1,ci=Tr(t,n),Yc=!1,fi=bn=Xc=Al=Pr=yt=0,rn=ga=null,Zc=!1,(n&8)!==0&&(n|=n&32);var o=t.entangledLanes;if(o!==0)for(t=t.entanglements,o&=n;0<o;){var d=31-Ke(o),g=1<<d;n|=t[d],o&=~g}return xr=n,yo(),a}function Em(t,n){Le=null,F.H=oa,n===ni||n===No?(n=Up(),We=3):n===rc?(n=Up(),We=4):We=n===_c?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,mn=n,Be===null&&(yt=1,Uo(t,jn(n,t.current)))}function Cm(){var t=pn.current;return t===null?!0:(Ue&4194048)===Ue?Dn===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?t===Dn:!1}function Nm(){var t=F.H;return F.H=oa,t===null?oa:t}function Am(){var t=F.A;return F.A=jw,t}function Jo(){yt=4,Hr||(Ue&4194048)!==Ue&&pn.current!==null||(ci=!0),(Pr&134217727)===0&&(Al&134217727)===0||ot===null||Vr(ot,Ue,bn,!1)}function ef(t,n,a){var o=Ze;Ze|=2;var d=Nm(),g=Am();(ot!==t||Ue!==n)&&(Qo=null,hi(t,n)),n=!1;var k=yt;e:do try{if(We!==0&&Be!==null){var _=Be,q=mn;switch(We){case 8:Wc(),k=6;break e;case 3:case 2:case 9:case 6:pn.current===null&&(n=!0);var ee=We;if(We=0,mn=null,pi(t,_,q,ee),a&&ci){k=0;break e}break;default:ee=We,We=0,mn=null,pi(t,_,q,ee)}}Lw(),k=yt;break}catch(ie){Em(t,ie)}while(!0);return n&&t.shellSuspendCounter++,ur=yl=null,Ze=o,F.H=d,F.A=g,Be===null&&(ot=null,Ue=0,yo()),k}function Lw(){for(;Be!==null;)Tm(Be)}function Dw(t,n){var a=Ze;Ze|=2;var o=Nm(),d=Am();ot!==t||Ue!==n?(Qo=null,Zo=at()+500,hi(t,n)):ci=Tr(t,n);e:do try{if(We!==0&&Be!==null){n=Be;var g=mn;t:switch(We){case 1:We=0,mn=null,pi(t,n,g,1);break;case 2:case 9:if(Fp(g)){We=0,mn=null,jm(n);break}n=function(){We!==2&&We!==9||ot!==t||(We=7),Zn(t)},g.then(n,n);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:Fp(g)?(We=0,mn=null,jm(n)):(We=0,mn=null,pi(t,n,g,7));break;case 5:var k=null;switch(Be.tag){case 26:k=Be.memoizedState;case 5:case 27:var _=Be;if(k?pb(k):_.stateNode.complete){We=0,mn=null;var q=_.sibling;if(q!==null)Be=q;else{var ee=_.return;ee!==null?(Be=ee,Wo(ee)):Be=null}break t}}We=0,mn=null,pi(t,n,g,5);break;case 6:We=0,mn=null,pi(t,n,g,6);break;case 8:Wc(),yt=6;break e;default:throw Error(i(462))}}Ow();break}catch(ie){Em(t,ie)}while(!0);return ur=yl=null,F.H=o,F.A=d,Ze=a,Be!==null?0:(ot=null,Ue=0,yo(),yt)}function Ow(){for(;Be!==null&&!it();)Tm(Be)}function Tm(t){var n=Jg(t.alternate,t,xr);t.memoizedProps=t.pendingProps,n===null?Wo(t):Be=n}function jm(t){var n=t,a=n.alternate;switch(n.tag){case 15:case 0:n=Gg(a,n,n.pendingProps,n.type,void 0,Ue);break;case 11:n=Gg(a,n,n.pendingProps,n.type.render,n.ref,Ue);break;case 5:gc(n);default:em(a,n),n=Be=Ap(n,xr),n=Jg(a,n,xr)}t.memoizedProps=t.pendingProps,n===null?Wo(t):Be=n}function pi(t,n,a,o){ur=yl=null,gc(n),ri=null,Wi=0;var d=n.return;try{if(Sw(t,d,n,a,Ue)){yt=1,Uo(t,jn(a,t.current)),Be=null;return}}catch(g){if(d!==null)throw Be=d,g;yt=1,Uo(t,jn(a,t.current)),Be=null;return}n.flags&32768?(Pe||o===1?t=!0:ci||(Ue&536870912)!==0?t=!1:(Hr=t=!0,(o===2||o===9||o===3||o===6)&&(o=pn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Rm(n,t)):Wo(n)}function Wo(t){var n=t;do{if((n.flags&32768)!==0){Rm(n,Hr);return}t=n.return;var a=Cw(n.alternate,n,xr);if(a!==null){Be=a;return}if(n=n.sibling,n!==null){Be=n;return}Be=n=t}while(n!==null);yt===0&&(yt=5)}function Rm(t,n){do{var a=Nw(t.alternate,t);if(a!==null){a.flags&=32767,Be=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(t=t.sibling,t!==null)){Be=t;return}Be=t=a}while(t!==null);yt=6,Be=null}function _m(t,n,a,o,d,g,k,_,q){t.cancelPendingCommit=null;do es();while(Tt!==0);if((Ze&6)!==0)throw Error(i(327));if(n!==null){if(n===t.current)throw Error(i(177));if(g=n.lanes|n.childLanes,g|=Pu,vu(t,a,g,k,_,q),t===ot&&(Be=ot=null,Ue=0),di=n,$r=t,vr=a,Qc=g,Kc=d,vm=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Fw(je,function(){return zm(),null})):(t.callbackNode=null,t.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=F.T,F.T=null,d=Z.p,Z.p=2,k=Ze,Ze|=4;try{Aw(t,n,a)}finally{Ze=k,Z.p=d,F.T=o}}Tt=1,Lm(),Dm(),Om()}}function Lm(){if(Tt===1){Tt=0;var t=$r,n=di,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=F.T,F.T=null;var o=Z.p;Z.p=2;var d=Ze;Ze|=4;try{dm(n,t);var g=hf,k=yp(t.containerInfo),_=g.focusedElem,q=g.selectionRange;if(k!==_&&_&&_.ownerDocument&&bp(_.ownerDocument.documentElement,_)){if(q!==null&&Bu(_)){var ee=q.start,ie=q.end;if(ie===void 0&&(ie=ee),"selectionStart"in _)_.selectionStart=ee,_.selectionEnd=Math.min(ie,_.value.length);else{var ce=_.ownerDocument||document,te=ce&&ce.defaultView||window;if(te.getSelection){var le=te.getSelection(),Se=_.textContent.length,Te=Math.min(q.start,Se),rt=q.end===void 0?Te:Math.min(q.end,Se);!le.extend&&Te>rt&&(k=rt,rt=Te,Te=k);var K=mp(_,Te),Q=mp(_,rt);if(K&&Q&&(le.rangeCount!==1||le.anchorNode!==K.node||le.anchorOffset!==K.offset||le.focusNode!==Q.node||le.focusOffset!==Q.offset)){var W=ce.createRange();W.setStart(K.node,K.offset),le.removeAllRanges(),Te>rt?(le.addRange(W),le.extend(Q.node,Q.offset)):(W.setEnd(Q.node,Q.offset),le.addRange(W))}}}}for(ce=[],le=_;le=le.parentNode;)le.nodeType===1&&ce.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<ce.length;_++){var se=ce[_];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}ds=!!df,hf=df=null}finally{Ze=d,Z.p=o,F.T=a}}t.current=n,Tt=2}}function Dm(){if(Tt===2){Tt=0;var t=$r,n=di,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=F.T,F.T=null;var o=Z.p;Z.p=2;var d=Ze;Ze|=4;try{om(t,n.alternate,n)}finally{Ze=d,Z.p=o,F.T=a}}Tt=3}}function Om(){if(Tt===4||Tt===3){Tt=0,It();var t=$r,n=di,a=vr,o=vm;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Tt=5:(Tt=0,di=$r=null,Mm(t,t.pendingLanes));var d=t.pendingLanes;if(d===0&&(qr=null),Fl(a),n=n.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Lt,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=F.T,d=Z.p,Z.p=2,F.T=null;try{for(var g=t.onRecoverableError,k=0;k<o.length;k++){var _=o[k];g(_.value,{componentStack:_.stack})}}finally{F.T=n,Z.p=d}}(vr&3)!==0&&es(),Zn(t),d=t.pendingLanes,(a&261930)!==0&&(d&42)!==0?t===Jc?ma++:(ma=0,Jc=t):ma=0,ba(0)}}function Mm(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,Ki(n)))}function es(){return Lm(),Dm(),Om(),zm()}function zm(){if(Tt!==5)return!1;var t=$r,n=Qc;Qc=0;var a=Fl(vr),o=F.T,d=Z.p;try{Z.p=32>a?32:a,F.T=null,a=Kc,Kc=null;var g=$r,k=vr;if(Tt=0,di=$r=null,vr=0,(Ze&6)!==0)throw Error(i(331));var _=Ze;if(Ze|=4,bm(g.current),pm(g,g.current,k,a),Ze=_,ba(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Lt,g)}catch{}return!0}finally{Z.p=d,F.T=o,Mm(t,n)}}function Bm(t,n,a){n=jn(a,n),n=Rc(t.stateNode,n,2),t=Br(t,n,2),t!==null&&(Vn(t,2),Zn(t))}function et(t,n,a){if(t.tag===3)Bm(t,t,a);else for(;n!==null;){if(n.tag===3){Bm(n,t,a);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(qr===null||!qr.has(o))){t=jn(a,t),a=Fg(2),o=Br(n,a,2),o!==null&&(Ig(a,o,n,t),Vn(o,2),Zn(o));break}}n=n.return}}function tf(t,n,a){var o=t.pingCache;if(o===null){o=t.pingCache=new Rw;var d=new Set;o.set(n,d)}else d=o.get(n),d===void 0&&(d=new Set,o.set(n,d));d.has(a)||(Yc=!0,d.add(a),t=Mw.bind(null,t,n,a),n.then(t,t))}function Mw(t,n,a){var o=t.pingCache;o!==null&&o.delete(n),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,ot===t&&(Ue&a)===a&&(yt===4||yt===3&&(Ue&62914560)===Ue&&300>at()-Xo?(Ze&2)===0&&hi(t,0):Xc|=a,fi===Ue&&(fi=0)),Zn(t)}function Fm(t,n){n===0&&(n=to()),t=gl(t,n),t!==null&&(Vn(t,n),Zn(t))}function zw(t){var n=t.memoizedState,a=0;n!==null&&(a=n.retryLane),Fm(t,a)}function Bw(t,n){var a=0;switch(t.tag){case 31:case 13:var o=t.stateNode,d=t.memoizedState;d!==null&&(a=d.retryLane);break;case 19:o=t.stateNode;break;case 22:o=t.stateNode._retryCache;break;default:throw Error(i(314))}o!==null&&o.delete(n),Fm(t,a)}function Fw(t,n){return mt(t,n)}var ts=null,gi=null,nf=!1,ns=!1,rf=!1,Gr=0;function Zn(t){t!==gi&&t.next===null&&(gi===null?ts=gi=t:gi=gi.next=t),ns=!0,nf||(nf=!0,Uw())}function ba(t,n){if(!rf&&ns){rf=!0;do for(var a=!1,o=ts;o!==null;){if(t!==0){var d=o.pendingLanes;if(d===0)var g=0;else{var k=o.suspendedLanes,_=o.pingedLanes;g=(1<<31-Ke(42|t)+1)-1,g&=d&~(k&~_),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(a=!0,Pm(o,g))}else g=Ue,g=cl(o,o===ot?g:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(g&3)===0||Tr(o,g)||(a=!0,Pm(o,g));o=o.next}while(a);rf=!1}}function Iw(){Im()}function Im(){ns=nf=!1;var t=0;Gr!==0&&Qw()&&(t=Gr);for(var n=at(),a=null,o=ts;o!==null;){var d=o.next,g=Um(o,n);g===0?(o.next=null,a===null?ts=d:a.next=d,d===null&&(gi=a)):(a=o,(t!==0||(g&3)!==0)&&(ns=!0)),o=d}Tt!==0&&Tt!==5||ba(t),Gr!==0&&(Gr=0)}function Um(t,n){for(var a=t.suspendedLanes,o=t.pingedLanes,d=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var k=31-Ke(g),_=1<<k,q=d[k];q===-1?((_&a)===0||(_&o)!==0)&&(d[k]=nr(_,n)):q<=n&&(t.expiredLanes|=_),g&=~_}if(n=ot,a=Ue,a=cl(t,t===n?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o=t.callbackNode,a===0||t===n&&(We===2||We===9)||t.cancelPendingCommit!==null)return o!==null&&o!==null&&Ft(o),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||Tr(t,a)){if(n=a&-a,n===t.callbackPriority)return n;switch(o!==null&&Ft(o),Fl(a)){case 2:case 8:a=be;break;case 32:a=je;break;case 268435456:a=Ge;break;default:a=je}return o=Hm.bind(null,t),a=mt(a,o),t.callbackPriority=n,t.callbackNode=a,n}return o!==null&&o!==null&&Ft(o),t.callbackPriority=2,t.callbackNode=null,2}function Hm(t,n){if(Tt!==0&&Tt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(es()&&t.callbackNode!==a)return null;var o=Ue;return o=cl(t,t===ot?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o===0?null:(Sm(t,o,n),Um(t,at()),t.callbackNode!=null&&t.callbackNode===a?Hm.bind(null,t):null)}function Pm(t,n){if(es())return null;Sm(t,n,!0)}function Uw(){Jw(function(){(Ze&6)!==0?mt(oe,Iw):Im()})}function lf(){if(Gr===0){var t=ei;t===0&&(t=zl,zl<<=1,(zl&261888)===0&&(zl=256)),Gr=t}return Gr}function qm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:uo(""+t)}function $m(t,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,t.id&&a.setAttribute("form",t.id),n.parentNode.insertBefore(a,n),t=new FormData(t),a.parentNode.removeChild(a),t}function Hw(t,n,a,o,d){if(n==="submit"&&a&&a.stateNode===d){var g=qm((d[Ut]||null).action),k=o.submitter;k&&(n=(n=k[Ut]||null)?qm(n.formAction):k.getAttribute("formAction"),n!==null&&(g=n,k=null));var _=new po("action","action",null,o,d);t.push({event:_,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Gr!==0){var q=k?$m(d,k):new FormData(d);Ec(a,{pending:!0,data:q,method:d.method,action:g},null,q)}}else typeof g=="function"&&(_.preventDefault(),q=k?$m(d,k):new FormData(d),Ec(a,{pending:!0,data:q,method:d.method,action:g},g,q))},currentTarget:d}]})}}for(var af=0;af<Hu.length;af++){var of=Hu[af],Pw=of.toLowerCase(),qw=of[0].toUpperCase()+of.slice(1);Un(Pw,"on"+qw)}Un(wp,"onAnimationEnd"),Un(Sp,"onAnimationIteration"),Un(kp,"onAnimationStart"),Un("dblclick","onDoubleClick"),Un("focusin","onFocus"),Un("focusout","onBlur"),Un(iw,"onTransitionRun"),Un(aw,"onTransitionStart"),Un(ow,"onTransitionCancel"),Un(Ep,"onTransitionEnd"),Ul("onMouseEnter",["mouseout","mouseover"]),Ul("onMouseLeave",["mouseout","mouseover"]),Ul("onPointerEnter",["pointerout","pointerover"]),Ul("onPointerLeave",["pointerout","pointerover"]),fl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fl("onBeforeInput",["compositionend","keypress","textInput","paste"]),fl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ya="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(" "),$w=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ya));function Vm(t,n){n=(n&4)!==0;for(var a=0;a<t.length;a++){var o=t[a],d=o.event;o=o.listeners;e:{var g=void 0;if(n)for(var k=o.length-1;0<=k;k--){var _=o[k],q=_.instance,ee=_.currentTarget;if(_=_.listener,q!==g&&d.isPropagationStopped())break e;g=_,d.currentTarget=ee;try{g(d)}catch(ie){bo(ie)}d.currentTarget=null,g=q}else for(k=0;k<o.length;k++){if(_=o[k],q=_.instance,ee=_.currentTarget,_=_.listener,q!==g&&d.isPropagationStopped())break e;g=_,d.currentTarget=ee;try{g(d)}catch(ie){bo(ie)}d.currentTarget=null,g=q}}}}function Fe(t,n){var a=n[Fi];a===void 0&&(a=n[Fi]=new Set);var o=t+"__bubble";a.has(o)||(Gm(n,t,2,!1),a.add(o))}function sf(t,n,a){var o=0;n&&(o|=4),Gm(a,t,o,n)}var rs="_reactListening"+Math.random().toString(36).slice(2);function uf(t){if(!t[rs]){t[rs]=!0,Ih.forEach(function(a){a!=="selectionchange"&&($w.has(a)||sf(a,!1,t),sf(a,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[rs]||(n[rs]=!0,sf("selectionchange",!1,n))}}function Gm(t,n,a,o){switch(wb(n)){case 2:var d=yS;break;case 8:d=xS;break;default:d=Ef}a=d.bind(null,n,a,t),d=void 0,!Tu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),o?d!==void 0?t.addEventListener(n,a,{capture:!0,passive:d}):t.addEventListener(n,a,!0):d!==void 0?t.addEventListener(n,a,{passive:d}):t.addEventListener(n,a,!1)}function cf(t,n,a,o,d){var g=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var k=o.tag;if(k===3||k===4){var _=o.stateNode.containerInfo;if(_===d)break;if(k===4)for(k=o.return;k!==null;){var q=k.tag;if((q===3||q===4)&&k.stateNode.containerInfo===d)return;k=k.return}for(;_!==null;){if(k=fn(_),k===null)return;if(q=k.tag,q===5||q===6||q===26||q===27){o=g=k;continue e}_=_.parentNode}}o=o.return}Kh(function(){var ee=g,ie=Nu(a),ce=[];e:{var te=Cp.get(t);if(te!==void 0){var le=po,Se=t;switch(t){case"keypress":if(fo(a)===0)break e;case"keydown":case"keyup":le=Bv;break;case"focusin":Se="focus",le=Lu;break;case"focusout":Se="blur",le=Lu;break;case"beforeblur":case"afterblur":le=Lu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":le=ep;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=Cv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=Uv;break;case wp:case Sp:case kp:le=Tv;break;case Ep:le=Pv;break;case"scroll":case"scrollend":le=kv;break;case"wheel":le=$v;break;case"copy":case"cut":case"paste":le=Rv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=np;break;case"toggle":case"beforetoggle":le=Gv}var Te=(n&4)!==0,rt=!Te&&(t==="scroll"||t==="scrollend"),K=Te?te!==null?te+"Capture":null:te;Te=[];for(var Q=ee,W;Q!==null;){var se=Q;if(W=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||W===null||K===null||(se=Ui(Q,K),se!=null&&Te.push(xa(Q,se,W))),rt)break;Q=Q.return}0<Te.length&&(te=new le(te,Se,null,a,ie),ce.push({event:te,listeners:Te}))}}if((n&7)===0){e:{if(te=t==="mouseover"||t==="pointerover",le=t==="mouseout"||t==="pointerout",te&&a!==Cu&&(Se=a.relatedTarget||a.fromElement)&&(fn(Se)||Se[jr]))break e;if((le||te)&&(te=ie.window===ie?ie:(te=ie.ownerDocument)?te.defaultView||te.parentWindow:window,le?(Se=a.relatedTarget||a.toElement,le=ee,Se=Se?fn(Se):null,Se!==null&&(rt=u(Se),Te=Se.tag,Se!==rt||Te!==5&&Te!==27&&Te!==6)&&(Se=null)):(le=null,Se=ee),le!==Se)){if(Te=ep,se="onMouseLeave",K="onMouseEnter",Q="mouse",(t==="pointerout"||t==="pointerover")&&(Te=np,se="onPointerLeave",K="onPointerEnter",Q="pointer"),rt=le==null?te:Ii(le),W=Se==null?te:Ii(Se),te=new Te(se,Q+"leave",le,a,ie),te.target=rt,te.relatedTarget=W,se=null,fn(ie)===ee&&(Te=new Te(K,Q+"enter",Se,a,ie),Te.target=W,Te.relatedTarget=rt,se=Te),rt=se,le&&Se)t:{for(Te=Vw,K=le,Q=Se,W=0,se=K;se;se=Te(se))W++;se=0;for(var Ne=Q;Ne;Ne=Te(Ne))se++;for(;0<W-se;)K=Te(K),W--;for(;0<se-W;)Q=Te(Q),se--;for(;W--;){if(K===Q||Q!==null&&K===Q.alternate){Te=K;break t}K=Te(K),Q=Te(Q)}Te=null}else Te=null;le!==null&&Ym(ce,te,le,Te,!1),Se!==null&&rt!==null&&Ym(ce,rt,Se,Te,!0)}}e:{if(te=ee?Ii(ee):window,le=te.nodeName&&te.nodeName.toLowerCase(),le==="select"||le==="input"&&te.type==="file")var Ye=cp;else if(sp(te))if(fp)Ye=nw;else{Ye=ew;var Ee=Wv}else le=te.nodeName,!le||le.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?ee&&Eu(ee.elementType)&&(Ye=cp):Ye=tw;if(Ye&&(Ye=Ye(t,ee))){up(ce,Ye,a,ie);break e}Ee&&Ee(t,te,ee),t==="focusout"&&ee&&te.type==="number"&&ee.memoizedProps.value!=null&&ku(te,"number",te.value)}switch(Ee=ee?Ii(ee):window,t){case"focusin":(sp(Ee)||Ee.contentEditable==="true")&&(Gl=Ee,Fu=ee,Xi=null);break;case"focusout":Xi=Fu=Gl=null;break;case"mousedown":Iu=!0;break;case"contextmenu":case"mouseup":case"dragend":Iu=!1,xp(ce,a,ie);break;case"selectionchange":if(lw)break;case"keydown":case"keyup":xp(ce,a,ie)}var De;if(Ou)e:{switch(t){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else Vl?ap(t,a)&&(He="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(He="onCompositionStart");He&&(rp&&a.locale!=="ko"&&(Vl||He!=="onCompositionStart"?He==="onCompositionEnd"&&Vl&&(De=Jh()):(Rr=ie,ju="value"in Rr?Rr.value:Rr.textContent,Vl=!0)),Ee=ls(ee,He),0<Ee.length&&(He=new tp(He,t,null,a,ie),ce.push({event:He,listeners:Ee}),De?He.data=De:(De=op(a),De!==null&&(He.data=De)))),(De=Xv?Zv(t,a):Qv(t,a))&&(He=ls(ee,"onBeforeInput"),0<He.length&&(Ee=new tp("onBeforeInput","beforeinput",null,a,ie),ce.push({event:Ee,listeners:He}),Ee.data=De)),Hw(ce,t,ee,a,ie)}Vm(ce,n)})}function xa(t,n,a){return{instance:t,listener:n,currentTarget:a}}function ls(t,n){for(var a=n+"Capture",o=[];t!==null;){var d=t,g=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||g===null||(d=Ui(t,a),d!=null&&o.unshift(xa(t,d,g)),d=Ui(t,n),d!=null&&o.push(xa(t,d,g))),t.tag===3)return o;t=t.return}return[]}function Vw(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Ym(t,n,a,o,d){for(var g=n._reactName,k=[];a!==null&&a!==o;){var _=a,q=_.alternate,ee=_.stateNode;if(_=_.tag,q!==null&&q===o)break;_!==5&&_!==26&&_!==27||ee===null||(q=ee,d?(ee=Ui(a,g),ee!=null&&k.unshift(xa(a,ee,q))):d||(ee=Ui(a,g),ee!=null&&k.push(xa(a,ee,q)))),a=a.return}k.length!==0&&t.push({event:n,listeners:k})}var Gw=/\r\n?/g,Yw=/\u0000|\uFFFD/g;function Xm(t){return(typeof t=="string"?t:""+t).replace(Gw,`
9
- `).replace(Yw,"")}function Zm(t,n){return n=Xm(n),Xm(t)===n}function nt(t,n,a,o,d,g){switch(a){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||Pl(t,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&Pl(t,""+o);break;case"className":oo(t,"class",o);break;case"tabIndex":oo(t,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":oo(t,a,o);break;case"style":Zh(t,o,g);break;case"data":if(n!=="object"){oo(t,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||a!=="href")){t.removeAttribute(a);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(a);break}o=uo(""+o),t.setAttribute(a,o);break;case"action":case"formAction":if(typeof o=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(a==="formAction"?(n!=="input"&&nt(t,n,"name",d.name,d,null),nt(t,n,"formEncType",d.formEncType,d,null),nt(t,n,"formMethod",d.formMethod,d,null),nt(t,n,"formTarget",d.formTarget,d,null)):(nt(t,n,"encType",d.encType,d,null),nt(t,n,"method",d.method,d,null),nt(t,n,"target",d.target,d,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(a);break}o=uo(""+o),t.setAttribute(a,o);break;case"onClick":o!=null&&(t.onclick=ir);break;case"onScroll":o!=null&&Fe("scroll",t);break;case"onScrollEnd":o!=null&&Fe("scrollend",t);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(d.children!=null)throw Error(i(60));t.innerHTML=a}}break;case"multiple":t.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":t.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){t.removeAttribute("xlink:href");break}a=uo(""+o),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(a,""+o):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":o===!0?t.setAttribute(a,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(a,o):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?t.setAttribute(a,o):t.removeAttribute(a);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?t.removeAttribute(a):t.setAttribute(a,o);break;case"popover":Fe("beforetoggle",t),Fe("toggle",t),ao(t,"popover",o);break;case"xlinkActuate":lr(t,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":lr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":lr(t,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":lr(t,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":lr(t,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":lr(t,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":lr(t,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":lr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":lr(t,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":ao(t,"is",o);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=wv.get(a)||a,ao(t,a,o))}}function ff(t,n,a,o,d,g){switch(a){case"style":Zh(t,o,g);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(d.children!=null)throw Error(i(60));t.innerHTML=a}}break;case"children":typeof o=="string"?Pl(t,o):(typeof o=="number"||typeof o=="bigint")&&Pl(t,""+o);break;case"onScroll":o!=null&&Fe("scroll",t);break;case"onScrollEnd":o!=null&&Fe("scrollend",t);break;case"onClick":o!=null&&(t.onclick=ir);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Uh.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(d=a.endsWith("Capture"),n=a.slice(2,d?a.length-7:void 0),g=t[Ut]||null,g=g!=null?g[a]:null,typeof g=="function"&&t.removeEventListener(n,g,d),typeof o=="function")){typeof g!="function"&&g!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(n,o,d);break e}a in t?t[a]=o:o===!0?t.setAttribute(a,""):ao(t,a,o)}}}function zt(t,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Fe("error",t),Fe("load",t);var o=!1,d=!1,g;for(g in a)if(a.hasOwnProperty(g)){var k=a[g];if(k!=null)switch(g){case"src":o=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:nt(t,n,g,k,a,null)}}d&&nt(t,n,"srcSet",a.srcSet,a,null),o&&nt(t,n,"src",a.src,a,null);return;case"input":Fe("invalid",t);var _=g=k=d=null,q=null,ee=null;for(o in a)if(a.hasOwnProperty(o)){var ie=a[o];if(ie!=null)switch(o){case"name":d=ie;break;case"type":k=ie;break;case"checked":q=ie;break;case"defaultChecked":ee=ie;break;case"value":g=ie;break;case"defaultValue":_=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(i(137,n));break;default:nt(t,n,o,ie,a,null)}}Vh(t,g,_,q,ee,k,d,!1);return;case"select":Fe("invalid",t),o=k=g=null;for(d in a)if(a.hasOwnProperty(d)&&(_=a[d],_!=null))switch(d){case"value":g=_;break;case"defaultValue":k=_;break;case"multiple":o=_;default:nt(t,n,d,_,a,null)}n=g,a=k,t.multiple=!!o,n!=null?Hl(t,!!o,n,!1):a!=null&&Hl(t,!!o,a,!0);return;case"textarea":Fe("invalid",t),g=d=o=null;for(k in a)if(a.hasOwnProperty(k)&&(_=a[k],_!=null))switch(k){case"value":o=_;break;case"defaultValue":d=_;break;case"children":g=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(i(91));break;default:nt(t,n,k,_,a,null)}Yh(t,o,d,g);return;case"option":for(q in a)a.hasOwnProperty(q)&&(o=a[q],o!=null)&&(q==="selected"?t.selected=o&&typeof o!="function"&&typeof o!="symbol":nt(t,n,q,o,a,null));return;case"dialog":Fe("beforetoggle",t),Fe("toggle",t),Fe("cancel",t),Fe("close",t);break;case"iframe":case"object":Fe("load",t);break;case"video":case"audio":for(o=0;o<ya.length;o++)Fe(ya[o],t);break;case"image":Fe("error",t),Fe("load",t);break;case"details":Fe("toggle",t);break;case"embed":case"source":case"link":Fe("error",t),Fe("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ee in a)if(a.hasOwnProperty(ee)&&(o=a[ee],o!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:nt(t,n,ee,o,a,null)}return;default:if(Eu(n)){for(ie in a)a.hasOwnProperty(ie)&&(o=a[ie],o!==void 0&&ff(t,n,ie,o,a,void 0));return}}for(_ in a)a.hasOwnProperty(_)&&(o=a[_],o!=null&&nt(t,n,_,o,a,null))}function Xw(t,n,a,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,g=null,k=null,_=null,q=null,ee=null,ie=null;for(le in a){var ce=a[le];if(a.hasOwnProperty(le)&&ce!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":q=ce;default:o.hasOwnProperty(le)||nt(t,n,le,null,o,ce)}}for(var te in o){var le=o[te];if(ce=a[te],o.hasOwnProperty(te)&&(le!=null||ce!=null))switch(te){case"type":g=le;break;case"name":d=le;break;case"checked":ee=le;break;case"defaultChecked":ie=le;break;case"value":k=le;break;case"defaultValue":_=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(i(137,n));break;default:le!==ce&&nt(t,n,te,le,o,ce)}}Su(t,k,_,q,ee,ie,g,d);return;case"select":le=k=_=te=null;for(g in a)if(q=a[g],a.hasOwnProperty(g)&&q!=null)switch(g){case"value":break;case"multiple":le=q;default:o.hasOwnProperty(g)||nt(t,n,g,null,o,q)}for(d in o)if(g=o[d],q=a[d],o.hasOwnProperty(d)&&(g!=null||q!=null))switch(d){case"value":te=g;break;case"defaultValue":_=g;break;case"multiple":k=g;default:g!==q&&nt(t,n,d,g,o,q)}n=_,a=k,o=le,te!=null?Hl(t,!!a,te,!1):!!o!=!!a&&(n!=null?Hl(t,!!a,n,!0):Hl(t,!!a,a?[]:"",!1));return;case"textarea":le=te=null;for(_ in a)if(d=a[_],a.hasOwnProperty(_)&&d!=null&&!o.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:nt(t,n,_,null,o,d)}for(k in o)if(d=o[k],g=a[k],o.hasOwnProperty(k)&&(d!=null||g!=null))switch(k){case"value":te=d;break;case"defaultValue":le=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(i(91));break;default:d!==g&&nt(t,n,k,d,o,g)}Gh(t,te,le);return;case"option":for(var Se in a)te=a[Se],a.hasOwnProperty(Se)&&te!=null&&!o.hasOwnProperty(Se)&&(Se==="selected"?t.selected=!1:nt(t,n,Se,null,o,te));for(q in o)te=o[q],le=a[q],o.hasOwnProperty(q)&&te!==le&&(te!=null||le!=null)&&(q==="selected"?t.selected=te&&typeof te!="function"&&typeof te!="symbol":nt(t,n,q,te,o,le));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Te in a)te=a[Te],a.hasOwnProperty(Te)&&te!=null&&!o.hasOwnProperty(Te)&&nt(t,n,Te,null,o,te);for(ee in o)if(te=o[ee],le=a[ee],o.hasOwnProperty(ee)&&te!==le&&(te!=null||le!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(i(137,n));break;default:nt(t,n,ee,te,o,le)}return;default:if(Eu(n)){for(var rt in a)te=a[rt],a.hasOwnProperty(rt)&&te!==void 0&&!o.hasOwnProperty(rt)&&ff(t,n,rt,void 0,o,te);for(ie in o)te=o[ie],le=a[ie],!o.hasOwnProperty(ie)||te===le||te===void 0&&le===void 0||ff(t,n,ie,te,o,le);return}}for(var K in a)te=a[K],a.hasOwnProperty(K)&&te!=null&&!o.hasOwnProperty(K)&&nt(t,n,K,null,o,te);for(ce in o)te=o[ce],le=a[ce],!o.hasOwnProperty(ce)||te===le||te==null&&le==null||nt(t,n,ce,te,o,le)}function Qm(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Zw(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,a=performance.getEntriesByType("resource"),o=0;o<a.length;o++){var d=a[o],g=d.transferSize,k=d.initiatorType,_=d.duration;if(g&&_&&Qm(k)){for(k=0,_=d.responseEnd,o+=1;o<a.length;o++){var q=a[o],ee=q.startTime;if(ee>_)break;var ie=q.transferSize,ce=q.initiatorType;ie&&Qm(ce)&&(q=q.responseEnd,k+=ie*(q<_?1:(_-ee)/(q-ee)))}if(--o,n+=8*(g+k)/(d.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var df=null,hf=null;function is(t){return t.nodeType===9?t:t.ownerDocument}function Km(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Jm(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function pf(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var gf=null;function Qw(){var t=window.event;return t&&t.type==="popstate"?t===gf?!1:(gf=t,!0):(gf=null,!1)}var Wm=typeof setTimeout=="function"?setTimeout:void 0,Kw=typeof clearTimeout=="function"?clearTimeout:void 0,eb=typeof Promise=="function"?Promise:void 0,Jw=typeof queueMicrotask=="function"?queueMicrotask:typeof eb<"u"?function(t){return eb.resolve(null).then(t).catch(Ww)}:Wm;function Ww(t){setTimeout(function(){throw t})}function Yr(t){return t==="head"}function tb(t,n){var a=n,o=0;do{var d=a.nextSibling;if(t.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"||a==="/&"){if(o===0){t.removeChild(d),xi(n);return}o--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")o++;else if(a==="html")va(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,va(a);for(var g=a.firstChild;g;){var k=g.nextSibling,_=g.nodeName;g[Ce]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&g.rel.toLowerCase()==="stylesheet"||a.removeChild(g),g=k}}else a==="body"&&va(t.ownerDocument.body);a=d}while(a);xi(n)}function nb(t,n){var a=t;t=0;do{var o=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=o}while(a)}function mf(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":mf(a),Je(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function eS(t,n,a,o){for(;t.nodeType===1;){var d=a;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(o){if(!t[Ce])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var g=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=On(t.nextSibling),t===null)break}return null}function tS(t,n,a){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=On(t.nextSibling),t===null))return null;return t}function rb(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=On(t.nextSibling),t===null))return null;return t}function bf(t){return t.data==="$?"||t.data==="$~"}function yf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function nS(t,n){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||a.readyState!=="loading")n();else{var o=function(){n(),a.removeEventListener("DOMContentLoaded",o)};a.addEventListener("DOMContentLoaded",o),t._reactRetry=o}}function On(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return t}var xf=null;function lb(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(n===0)return On(t.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}t=t.nextSibling}return null}function ib(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return t;n--}else a!=="/$"&&a!=="/&"||n++}t=t.previousSibling}return null}function ab(t,n,a){switch(n=is(a),t){case"html":if(t=n.documentElement,!t)throw Error(i(452));return t;case"head":if(t=n.head,!t)throw Error(i(453));return t;case"body":if(t=n.body,!t)throw Error(i(454));return t;default:throw Error(i(451))}}function va(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Je(t)}var Mn=new Map,ob=new Set;function as(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var wr=Z.d;Z.d={f:rS,r:lS,D:iS,C:aS,L:oS,m:sS,X:cS,S:uS,M:fS};function rS(){var t=wr.f(),n=Ko();return t||n}function lS(t){var n=In(t);n!==null&&n.tag===5&&n.type==="form"?Eg(n):wr.r(t)}var mi=typeof document>"u"?null:document;function sb(t,n,a){var o=mi;if(o&&typeof n=="string"&&n){var d=An(n);d='link[rel="'+t+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),ob.has(d)||(ob.add(d),t={rel:t,crossOrigin:a,href:n},o.querySelector(d)===null&&(n=o.createElement("link"),zt(n,"link",t),Rt(n),o.head.appendChild(n)))}}function iS(t){wr.D(t),sb("dns-prefetch",t,null)}function aS(t,n){wr.C(t,n),sb("preconnect",t,n)}function oS(t,n,a){wr.L(t,n,a);var o=mi;if(o&&t&&n){var d='link[rel="preload"][as="'+An(n)+'"]';n==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+An(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+An(a.imageSizes)+'"]')):d+='[href="'+An(t)+'"]';var g=d;switch(n){case"style":g=bi(t);break;case"script":g=yi(t)}Mn.has(g)||(t=b({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:t,as:n},a),Mn.set(g,t),o.querySelector(d)!==null||n==="style"&&o.querySelector(wa(g))||n==="script"&&o.querySelector(Sa(g))||(n=o.createElement("link"),zt(n,"link",t),Rt(n),o.head.appendChild(n)))}}function sS(t,n){wr.m(t,n);var a=mi;if(a&&t){var o=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+An(o)+'"][href="'+An(t)+'"]',g=d;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=yi(t)}if(!Mn.has(g)&&(t=b({rel:"modulepreload",href:t},n),Mn.set(g,t),a.querySelector(d)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Sa(g)))return}o=a.createElement("link"),zt(o,"link",t),Rt(o),a.head.appendChild(o)}}}function uS(t,n,a){wr.S(t,n,a);var o=mi;if(o&&t){var d=Il(o).hoistableStyles,g=bi(t);n=n||"default";var k=d.get(g);if(!k){var _={loading:0,preload:null};if(k=o.querySelector(wa(g)))_.loading=5;else{t=b({rel:"stylesheet",href:t,"data-precedence":n},a),(a=Mn.get(g))&&vf(t,a);var q=k=o.createElement("link");Rt(q),zt(q,"link",t),q._p=new Promise(function(ee,ie){q.onload=ee,q.onerror=ie}),q.addEventListener("load",function(){_.loading|=1}),q.addEventListener("error",function(){_.loading|=2}),_.loading|=4,os(k,n,o)}k={type:"stylesheet",instance:k,count:1,state:_},d.set(g,k)}}}function cS(t,n){wr.X(t,n);var a=mi;if(a&&t){var o=Il(a).hoistableScripts,d=yi(t),g=o.get(d);g||(g=a.querySelector(Sa(d)),g||(t=b({src:t,async:!0},n),(n=Mn.get(d))&&wf(t,n),g=a.createElement("script"),Rt(g),zt(g,"link",t),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},o.set(d,g))}}function fS(t,n){wr.M(t,n);var a=mi;if(a&&t){var o=Il(a).hoistableScripts,d=yi(t),g=o.get(d);g||(g=a.querySelector(Sa(d)),g||(t=b({src:t,async:!0,type:"module"},n),(n=Mn.get(d))&&wf(t,n),g=a.createElement("script"),Rt(g),zt(g,"link",t),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},o.set(d,g))}}function ub(t,n,a,o){var d=(d=fe.current)?as(d):null;if(!d)throw Error(i(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=bi(a.href),a=Il(d).hoistableStyles,o=a.get(n),o||(o={type:"style",instance:null,count:0,state:null},a.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=bi(a.href);var g=Il(d).hoistableStyles,k=g.get(t);if(k||(d=d.ownerDocument||d,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,k),(g=d.querySelector(wa(t)))&&!g._p&&(k.instance=g,k.state.loading=5),Mn.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Mn.set(t,a),g||dS(d,t,a,k.state))),n&&o===null)throw Error(i(528,""));return k}if(n&&o!==null)throw Error(i(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=yi(a),a=Il(d).hoistableScripts,o=a.get(n),o||(o={type:"script",instance:null,count:0,state:null},a.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,t))}}function bi(t){return'href="'+An(t)+'"'}function wa(t){return'link[rel="stylesheet"]['+t+"]"}function cb(t){return b({},t,{"data-precedence":t.precedence,precedence:null})}function dS(t,n,a,o){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=t.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),zt(n,"link",a),Rt(n),t.head.appendChild(n))}function yi(t){return'[src="'+An(t)+'"]'}function Sa(t){return"script[async]"+t}function fb(t,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var o=t.querySelector('style[data-href~="'+An(a.href)+'"]');if(o)return n.instance=o,Rt(o),o;var d=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),Rt(o),zt(o,"style",d),os(o,a.precedence,t),n.instance=o;case"stylesheet":d=bi(a.href);var g=t.querySelector(wa(d));if(g)return n.state.loading|=4,n.instance=g,Rt(g),g;o=cb(a),(d=Mn.get(d))&&vf(o,d),g=(t.ownerDocument||t).createElement("link"),Rt(g);var k=g;return k._p=new Promise(function(_,q){k.onload=_,k.onerror=q}),zt(g,"link",o),n.state.loading|=4,os(g,a.precedence,t),n.instance=g;case"script":return g=yi(a.src),(d=t.querySelector(Sa(g)))?(n.instance=d,Rt(d),d):(o=a,(d=Mn.get(g))&&(o=b({},a),wf(o,d)),t=t.ownerDocument||t,d=t.createElement("script"),Rt(d),zt(d,"link",o),t.head.appendChild(d),n.instance=d);case"void":return null;default:throw Error(i(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,os(o,a.precedence,t));return n.instance}function os(t,n,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=o.length?o[o.length-1]:null,g=d,k=0;k<o.length;k++){var _=o[k];if(_.dataset.precedence===n)g=_;else if(g!==d)break}g?g.parentNode.insertBefore(t,g.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(t,n.firstChild))}function vf(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function wf(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var ss=null;function db(t,n,a){if(ss===null){var o=new Map,d=ss=new Map;d.set(a,o)}else d=ss,o=d.get(a),o||(o=new Map,d.set(a,o));if(o.has(t))return o;for(o.set(t,null),a=a.getElementsByTagName(t),d=0;d<a.length;d++){var g=a[d];if(!(g[Ce]||g[At]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var k=g.getAttribute(n)||"";k=t+k;var _=o.get(k);_?_.push(g):o.set(k,[g])}}return o}function hb(t,n,a){t=t.ownerDocument||t,t.head.insertBefore(a,n==="title"?t.querySelector("head > title"):null)}function hS(t,n,a){if(a===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(t=n.disabled,typeof n.precedence=="string"&&t==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function pb(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function pS(t,n,a,o){if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var d=bi(o.href),g=n.querySelector(wa(d));if(g){n=g._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=us.bind(t),n.then(t,t)),a.state.loading|=4,a.instance=g,Rt(g);return}g=n.ownerDocument||n,o=cb(o),(d=Mn.get(d))&&vf(o,d),g=g.createElement("link"),Rt(g);var k=g;k._p=new Promise(function(_,q){k.onload=_,k.onerror=q}),zt(g,"link",o),a.instance=g}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=us.bind(t),n.addEventListener("load",a),n.addEventListener("error",a))}}var Sf=0;function gS(t,n){return t.stylesheets&&t.count===0&&fs(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var o=setTimeout(function(){if(t.stylesheets&&fs(t,t.stylesheets),t.unsuspend){var g=t.unsuspend;t.unsuspend=null,g()}},6e4+n);0<t.imgBytes&&Sf===0&&(Sf=62500*Zw());var d=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&fs(t,t.stylesheets),t.unsuspend)){var g=t.unsuspend;t.unsuspend=null,g()}},(t.imgBytes>Sf?50:800)+n);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(d)}}:null}function us(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fs(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var cs=null;function fs(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,cs=new Map,n.forEach(mS,t),cs=null,us.call(t))}function mS(t,n){if(!(n.state.loading&4)){var a=cs.get(t);if(a)var o=a.get(null);else{a=new Map,cs.set(t,a);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<d.length;g++){var k=d[g];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(a.set(k.dataset.precedence,k),o=k)}o&&a.set(null,o)}d=n.instance,k=d.getAttribute("data-precedence"),g=a.get(k)||o,g===o&&a.set(null,d),a.set(k,d),this.count++,o=us.bind(this),d.addEventListener("load",o),d.addEventListener("error",o),g?g.parentNode.insertBefore(d,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),n.state.loading|=4}}var ka={$$typeof:j,Provider:null,Consumer:null,_currentValue:O,_currentValue2:O,_threadCount:0};function bS(t,n,a,o,d,g,k,_,q){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Bl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bl(0),this.hiddenUpdates=Bl(null),this.identifierPrefix=o,this.onUncaughtError=d,this.onCaughtError=g,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}function gb(t,n,a,o,d,g,k,_,q,ee,ie,ce){return t=new bS(t,n,a,k,q,ee,ie,ce,_),n=1,g===!0&&(n|=24),g=hn(3,null,null,n),t.current=g,g.stateNode=t,n=ec(),n.refCount++,t.pooledCache=n,n.refCount++,g.memoizedState={element:o,isDehydrated:a,cache:n},lc(g),t}function mb(t){return t?(t=Zl,t):Zl}function bb(t,n,a,o,d,g){d=mb(d),o.context===null?o.context=d:o.pendingContext=d,o=zr(n),o.payload={element:a},g=g===void 0?null:g,g!==null&&(o.callback=g),a=Br(t,o,n),a!==null&&(ln(a,t,n),ta(a,t,n))}function yb(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<n?a:n}}function kf(t,n){yb(t,n),(t=t.alternate)&&yb(t,n)}function xb(t){if(t.tag===13||t.tag===31){var n=gl(t,67108864);n!==null&&ln(n,t,67108864),kf(t,67108864)}}function vb(t){if(t.tag===13||t.tag===31){var n=yn();n=rr(n);var a=gl(t,n);a!==null&&ln(a,t,n),kf(t,n)}}var ds=!0;function yS(t,n,a,o){var d=F.T;F.T=null;var g=Z.p;try{Z.p=2,Ef(t,n,a,o)}finally{Z.p=g,F.T=d}}function xS(t,n,a,o){var d=F.T;F.T=null;var g=Z.p;try{Z.p=8,Ef(t,n,a,o)}finally{Z.p=g,F.T=d}}function Ef(t,n,a,o){if(ds){var d=Cf(o);if(d===null)cf(t,n,o,hs,a),Sb(t,o);else if(wS(d,t,n,a,o))o.stopPropagation();else if(Sb(t,o),n&4&&-1<vS.indexOf(t)){for(;d!==null;){var g=In(d);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var k=tr(g.pendingLanes);if(k!==0){var _=g;for(_.pendingLanes|=2,_.entangledLanes|=2;k;){var q=1<<31-Ke(k);_.entanglements[1]|=q,k&=~q}Zn(g),(Ze&6)===0&&(Zo=at()+500,ba(0))}}break;case 31:case 13:_=gl(g,2),_!==null&&ln(_,g,2),Ko(),kf(g,2)}if(g=Cf(o),g===null&&cf(t,n,o,hs,a),g===d)break;d=g}d!==null&&o.stopPropagation()}else cf(t,n,o,null,a)}}function Cf(t){return t=Nu(t),Nf(t)}var hs=null;function Nf(t){if(hs=null,t=fn(t),t!==null){var n=u(t);if(n===null)t=null;else{var a=n.tag;if(a===13){if(t=c(n),t!==null)return t;t=null}else if(a===31){if(t=f(n),t!==null)return t;t=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return hs=t,null}function wb(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch($n()){case oe:return 2;case be:return 8;case je:case Me:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Af=!1,Xr=null,Zr=null,Qr=null,Ea=new Map,Ca=new Map,Kr=[],vS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Sb(t,n){switch(t){case"focusin":case"focusout":Xr=null;break;case"dragenter":case"dragleave":Zr=null;break;case"mouseover":case"mouseout":Qr=null;break;case"pointerover":case"pointerout":Ea.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ca.delete(n.pointerId)}}function Na(t,n,a,o,d,g){return t===null||t.nativeEvent!==g?(t={blockedOn:n,domEventName:a,eventSystemFlags:o,nativeEvent:g,targetContainers:[d]},n!==null&&(n=In(n),n!==null&&xb(n)),t):(t.eventSystemFlags|=o,n=t.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),t)}function wS(t,n,a,o,d){switch(n){case"focusin":return Xr=Na(Xr,t,n,a,o,d),!0;case"dragenter":return Zr=Na(Zr,t,n,a,o,d),!0;case"mouseover":return Qr=Na(Qr,t,n,a,o,d),!0;case"pointerover":var g=d.pointerId;return Ea.set(g,Na(Ea.get(g)||null,t,n,a,o,d)),!0;case"gotpointercapture":return g=d.pointerId,Ca.set(g,Na(Ca.get(g)||null,t,n,a,o,d)),!0}return!1}function kb(t){var n=fn(t.target);if(n!==null){var a=u(n);if(a!==null){if(n=a.tag,n===13){if(n=c(a),n!==null){t.blockedOn=n,io(t.priority,function(){vb(a)});return}}else if(n===31){if(n=f(a),n!==null){t.blockedOn=n,io(t.priority,function(){vb(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ps(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var a=Cf(t.nativeEvent);if(a===null){a=t.nativeEvent;var o=new a.constructor(a.type,a);Cu=o,a.target.dispatchEvent(o),Cu=null}else return n=In(a),n!==null&&xb(n),t.blockedOn=a,!1;n.shift()}return!0}function Eb(t,n,a){ps(t)&&a.delete(n)}function SS(){Af=!1,Xr!==null&&ps(Xr)&&(Xr=null),Zr!==null&&ps(Zr)&&(Zr=null),Qr!==null&&ps(Qr)&&(Qr=null),Ea.forEach(Eb),Ca.forEach(Eb)}function gs(t,n){t.blockedOn===n&&(t.blockedOn=null,Af||(Af=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,SS)))}var ms=null;function Cb(t){ms!==t&&(ms=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ms===t&&(ms=null);for(var n=0;n<t.length;n+=3){var a=t[n],o=t[n+1],d=t[n+2];if(typeof o!="function"){if(Nf(o||a)===null)continue;break}var g=In(a);g!==null&&(t.splice(n,3),n-=3,Ec(g,{pending:!0,data:d,method:a.method,action:o},o,d))}}))}function xi(t){function n(q){return gs(q,t)}Xr!==null&&gs(Xr,t),Zr!==null&&gs(Zr,t),Qr!==null&&gs(Qr,t),Ea.forEach(n),Ca.forEach(n);for(var a=0;a<Kr.length;a++){var o=Kr[a];o.blockedOn===t&&(o.blockedOn=null)}for(;0<Kr.length&&(a=Kr[0],a.blockedOn===null);)kb(a),a.blockedOn===null&&Kr.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(o=0;o<a.length;o+=3){var d=a[o],g=a[o+1],k=d[Ut]||null;if(typeof g=="function")k||Cb(a);else if(k){var _=null;if(g&&g.hasAttribute("formAction")){if(d=g,k=g[Ut]||null)_=k.formAction;else if(Nf(d)!==null)continue}else _=k.action;typeof _=="function"?a[o+1]=_:(a.splice(o,3),o-=3),Cb(a)}}}function Nb(){function t(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(k){return d=k})},focusReset:"manual",scroll:"manual"})}function n(){d!==null&&(d(),d=null),o||setTimeout(a,20)}function a(){if(!o&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,d=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){o=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),d!==null&&(d(),d=null)}}}function Tf(t){this._internalRoot=t}bs.prototype.render=Tf.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(i(409));var a=n.current,o=yn();bb(a,o,t,n,null,null)},bs.prototype.unmount=Tf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;bb(t.current,2,null,t,null,null),Ko(),n[jr]=null}};function bs(t){this._internalRoot=t}bs.prototype.unstable_scheduleHydration=function(t){if(t){var n=Bi();t={blockedOn:null,target:t,priority:n};for(var a=0;a<Kr.length&&n!==0&&n<Kr[a].priority;a++);Kr.splice(a,0,t),a===0&&kb(t)}};var Ab=r.version;if(Ab!=="19.2.4")throw Error(i(527,Ab,"19.2.4"));Z.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(i(188)):(t=Object.keys(t).join(","),Error(i(268,t)));return t=p(n),t=t!==null?m(t):null,t=t===null?null:t.stateNode,t};var kS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ys=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ys.isDisabled&&ys.supportsFiber)try{Lt=ys.inject(kS),gt=ys}catch{}}return Ta.createRoot=function(t,n){if(!s(t))throw Error(i(299));var a=!1,o="",d=Og,g=Mg,k=zg;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(g=n.onCaughtError),n.onRecoverableError!==void 0&&(k=n.onRecoverableError)),n=gb(t,1,!1,null,null,a,o,null,d,g,k,Nb),t[jr]=n.current,uf(t),new Tf(n)},Ta.hydrateRoot=function(t,n,a){if(!s(t))throw Error(i(299));var o=!1,d="",g=Og,k=Mg,_=zg,q=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(g=a.onUncaughtError),a.onCaughtError!==void 0&&(k=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.formState!==void 0&&(q=a.formState)),n=gb(t,1,!0,n,a??null,o,d,q,g,k,_,Nb),n.context=mb(null),a=n.current,o=yn(),o=rr(o),d=zr(o),d.callback=null,Br(a,d,o),a=o,n.current.lanes=a,Vn(n,a),Zn(n),t[jr]=n.current,uf(t),new bs(n)},Ta.version="19.2.4",Ta}var Bb;function DS(){if(Bb)return _f.exports;Bb=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(r){console.error(r)}}return e(),_f.exports=LS(),_f.exports}var OS=DS();const MS=tu(OS),Ux=["shift","alt","meta","mod","ctrl","control"],zS={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function il(e){return(zS[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function Hx(e){return Ux.includes(e)}function Mf(e,r=","){return e.toLowerCase().split(r)}function zf(e,r="+",l=">",i=!1,s,u){let c=[],f=!1;e=e.trim(),e.includes(l)?(f=!0,c=e.toLocaleLowerCase().split(l).map(m=>il(m))):c=e.toLocaleLowerCase().split(r).map(m=>il(m));const h={alt:c.includes("alt"),ctrl:c.includes("ctrl")||c.includes("control"),shift:c.includes("shift"),meta:c.includes("meta"),mod:c.includes("mod"),useKey:i},p=c.filter(m=>!Ux.includes(m));return{...h,keys:p,description:s,isSequence:f,hotkey:e,metadata:u}}typeof document<"u"&&(document.addEventListener("keydown",e=>{e.code!==void 0&&Px([il(e.code)])}),document.addEventListener("keyup",e=>{e.code!==void 0&&qx([il(e.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{kr.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{kr.clear()},0)}));const kr=new Set;function ih(e){return Array.isArray(e)}function BS(e,r=","){return(ih(e)?e:e.split(r)).every(l=>kr.has(l.trim().toLowerCase()))}function Px(e){const r=Array.isArray(e)?e:[e];kr.has("meta")&&kr.forEach(l=>{Hx(l)||kr.delete(l.toLowerCase())}),r.forEach(l=>{kr.add(l.toLowerCase())})}function qx(e){const r=Array.isArray(e)?e:[e];e==="meta"?kr.clear():r.forEach(l=>{kr.delete(l.toLowerCase())})}function FS(e,r,l){(typeof l=="function"&&l(e,r)||l===!0)&&e.preventDefault()}function IS(e,r,l){return typeof l=="function"?l(e,r):l===!0||l===void 0}const US=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function HS(e){return $x(e,US)}function $x(e,r=!1){const{target:l,composed:i}=e;let s,u;return PS(l)&&i?(s=e.composedPath()[0]&&e.composedPath()[0].tagName,u=e.composedPath()[0]&&e.composedPath()[0].role):(s=l&&l.tagName,u=l&&l.role),ih(r)?!!(s&&r&&r.some(c=>c.toLowerCase()===s.toLowerCase()||c===u)):!!(s&&r&&r)}function PS(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function qS(e,r){return e.length===0&&r?!1:r?e.some(l=>r.includes(l))||e.includes("*"):!0}const $S=(e,r,l=!1)=>{const{alt:i,meta:s,mod:u,shift:c,ctrl:f,keys:h,useKey:p}=r,{code:m,key:b,ctrlKey:v,metaKey:x,shiftKey:w,altKey:S}=e,C=il(m);if(p&&h?.length===1&&h.includes(b.toLowerCase()))return!0;if(!h?.includes(C)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(C))return!1;if(!l){if(i!==S&&C!=="alt"||c!==w&&C!=="shift")return!1;if(u){if(!x&&!v)return!1}else if(s!==x&&C!=="meta"&&C!=="os"||f!==v&&C!=="ctrl"&&C!=="control")return!1}return h&&h.length===1&&h.includes(C)?!0:h&&h.length>0?h.includes(C)?BS(h):!1:!h||h.length===0},Vx=T.createContext(void 0),VS=()=>T.useContext(Vx);function GS({addHotkey:e,removeHotkey:r,children:l}){return y.jsx(Vx.Provider,{value:{addHotkey:e,removeHotkey:r},children:l})}function ah(e,r){return e&&r&&typeof e=="object"&&typeof r=="object"?Object.keys(e).length===Object.keys(r).length&&Object.keys(e).reduce((l,i)=>l&&ah(e[i],r[i]),!0):e===r}const Gx=T.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Ya=()=>T.useContext(Gx),YS=({initiallyActiveScopes:e=["*"],children:r})=>{const[l,i]=T.useState(e),[s,u]=T.useState([]),c=T.useCallback(b=>{i(v=>v.includes("*")?[b]:Array.from(new Set([...v,b])))},[]),f=T.useCallback(b=>{i(v=>v.filter(x=>x!==b))},[]),h=T.useCallback(b=>{i(v=>v.includes(b)?v.filter(x=>x!==b):v.includes("*")?[b]:Array.from(new Set([...v,b])))},[]),p=T.useCallback(b=>{u(v=>[...v,b])},[]),m=T.useCallback(b=>{u(v=>v.filter(x=>!ah(x,b)))},[]);return y.jsx(Gx.Provider,{value:{activeScopes:l,hotkeys:s,enableScope:c,disableScope:f,toggleScope:h},children:y.jsx(GS,{addHotkey:p,removeHotkey:m,children:r})})};function XS(e){const r=T.useRef(void 0);return ah(r.current,e)||(r.current=e),r.current}const Fb=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},ZS=typeof window<"u"?T.useLayoutEffect:T.useEffect;function lt(e,r,l,i){const s=T.useRef(null),u=T.useRef(!1),c=Array.isArray(l)?Array.isArray(i)?void 0:i:l,f=ih(e)?e.join(c?.delimiter):e,h=Array.isArray(l)?l:Array.isArray(i)?i:void 0,p=T.useCallback(r,h??[]),m=T.useRef(p);h?m.current=p:m.current=r;const b=XS(c),{activeScopes:v}=Ya(),x=VS();return ZS(()=>{if(b?.enabled===!1||!qS(v,b?.scopes))return;let w=[],S;const C=(B,P=!1)=>{if(!(HS(B)&&!$x(B,b?.enableOnFormTags))){if(s.current!==null){const L=s.current.getRootNode();if((L instanceof Document||L instanceof ShadowRoot)&&L.activeElement!==s.current&&!s.current.contains(L.activeElement)){Fb(B);return}}B.target?.isContentEditable&&!b?.enableOnContentEditable||Mf(f,b?.delimiter).forEach(L=>{if(L.includes(b?.splitKey??"+")&&L.includes(b?.sequenceSplitKey??">")){console.warn(`Hotkey ${L} contains both ${b?.splitKey??"+"} and ${b?.sequenceSplitKey??">"} which is not supported.`);return}const M=zf(L,b?.splitKey,b?.sequenceSplitKey,b?.useKey,b?.description,b?.metadata);if(M.isSequence){S=setTimeout(()=>{w=[]},b?.sequenceTimeoutMs??1e3);const H=M.useKey?B.key:il(B.code);if(Hx(H.toLowerCase()))return;w.push(H);const G=M.keys?.[w.length-1];if(H!==G){w=[],S&&clearTimeout(S);return}w.length===M.keys?.length&&(m.current(B,M),S&&clearTimeout(S),w=[])}else if($S(B,M,b?.ignoreModifiers)||M.keys?.includes("*")){if(b?.ignoreEventWhen?.(B)||P&&u.current)return;if(FS(B,M,b?.preventDefault),!IS(B,M,b?.enabled)){Fb(B);return}m.current(B,M),P||(u.current=!0)}})}},E=B=>{B.code!==void 0&&(Px(il(B.code)),(b?.keydown===void 0&&b?.keyup!==!0||b?.keydown)&&C(B))},N=B=>{B.code!==void 0&&(qx(il(B.code)),u.current=!1,b?.keyup&&C(B,!0))},j=s.current||c?.document||document;return j.addEventListener("keyup",N,c?.eventListenerOptions),j.addEventListener("keydown",E,c?.eventListenerOptions),x&&Mf(f,b?.delimiter).forEach(B=>{x.addHotkey(zf(B,b?.splitKey,b?.sequenceSplitKey,b?.useKey,b?.description,b?.metadata))}),()=>{j.removeEventListener("keyup",N,c?.eventListenerOptions),j.removeEventListener("keydown",E,c?.eventListenerOptions),x&&Mf(f,b?.delimiter).forEach(B=>{x.removeHotkey(zf(B,b?.splitKey,b?.sequenceSplitKey,b?.useKey,b?.description,b?.metadata))}),w=[],S&&clearTimeout(S)}},[f,b,v]),s}const Yx=(...e)=>e.filter((r,l,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===l).join(" ").trim();const QS=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const KS=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,l,i)=>i?i.toUpperCase():l.toLowerCase());const Ib=e=>{const r=KS(e);return r.charAt(0).toUpperCase()+r.slice(1)};var JS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const WS=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};const e2=T.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:s="",children:u,iconNode:c,...f},h)=>T.createElement("svg",{ref:h,...JS,width:r,height:r,stroke:e,strokeWidth:i?Number(l)*24/Number(r):l,className:Yx("lucide",s),...!u&&!WS(f)&&{"aria-hidden":"true"},...f},[...c.map(([p,m])=>T.createElement(p,m)),...Array.isArray(u)?u:[u]]));const qe=(e,r)=>{const l=T.forwardRef(({className:i,...s},u)=>T.createElement(e2,{ref:u,iconNode:r,className:Yx(`lucide-${QS(Ib(e))}`,`lucide-${e}`,i),...s}));return l.displayName=Ib(e),l};const t2=[["path",{d:"M19 3H5",key:"1236rx"}],["path",{d:"M12 21V7",key:"gj6g52"}],["path",{d:"m6 15 6 6 6-6",key:"h15q88"}]],n2=qe("arrow-down-from-line",t2);const r2=[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]],l2=qe("arrow-up-from-line",r2);const i2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Pa=qe("check",i2);const a2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ri=qe("chevron-down",a2);const o2=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],s2=qe("chevron-left",o2);const u2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Xx=qe("chevron-right",u2);const c2=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],f2=qe("chevrons-down-up",c2);const d2=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],h2=qe("chevrons-up-down",d2);const p2=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],g2=qe("code",p2);const m2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],b2=qe("columns-2",m2);const y2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Zx=qe("copy",y2);const x2=[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]],v2=qe("eraser",x2);const w2=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],S2=qe("external-link",w2);const k2=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ls=qe("eye",k2);const E2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],nu=qe("file-diff",E2);const C2=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],Qx=qe("file-pen",C2);const N2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],Kx=qe("file-plus",N2);const A2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]],Jx=qe("file-x",A2);const T2=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],j2=qe("folder-open",T2);const R2=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],_2=qe("folder",R2);const L2=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],D2=qe("git-branch",L2);const O2=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],M2=qe("keyboard",O2);const z2=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],B2=qe("list",z2);const F2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],I2=qe("loader-circle",F2);const U2=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Wx=qe("message-square",U2);const H2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],P2=qe("panel-left-close",H2);const q2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],$2=qe("panel-left",q2);const V2=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],G2=qe("pen",V2);const Y2=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],X2=qe("refresh-cw",Y2);const Z2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Q2=qe("search",Z2);const K2=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],e1=qe("settings",K2);const J2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],W2=qe("square",J2);const ek=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],tk=qe("text-align-start",ek);const nk=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]],rk=qe("unfold-vertical",nk);const lk=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ru=qe("x",lk),Xa="split";function ik(e){switch(e){case"split":case"side-by-side":return"split";case"unified":case"inline":return"unified";default:return Xa}}function t1({checked:e,onChange:r,label:l,className:i="",title:s}){const u=f=>{f.stopPropagation(),r(!e)},c=f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),f.stopPropagation(),r(!e))};return y.jsxs("div",{className:`flex items-center gap-2 text-xs text-github-text-primary cursor-pointer ${i}`,title:s,onClick:u,onKeyDown:c,role:"checkbox","aria-checked":e,tabIndex:0,children:[y.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center transition-all duration-200 cursor-pointer ${e?"bg-github-accent border-github-accent":"bg-github-bg-tertiary border-github-text-muted hover:border-github-accent/50"}`,children:e&&y.jsx(Pa,{size:10,className:"text-white"})}),l&&y.jsx("span",{className:"select-none",children:l})]})}function Ub({commentsCount:e,isCopiedAll:r,onCopyAll:l,onDeleteAll:i,onViewAll:s,direction:u="down",compact:c=!1}){const[f,h]=T.useState(!1),p=T.useRef(null),m=c,b=u==="up";T.useEffect(()=>{const C=E=>{p.current&&!p.current.contains(E.target)&&h(!1)};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[]);const v=()=>{l(),h(!1)},x=()=>{i(),h(!1)},w=()=>{s?.(),h(!1)},S=m?r?"Copied":`Copy All (${e})`:r?"Copied All!":`Copy All Prompt (${e})`;return y.jsxs("div",{className:"relative",ref:p,children:[y.jsxs("div",{className:"flex",children:[y.jsxs("button",{onClick:v,className:`text-xs px-3 py-1.5 pr-2 rounded-l transition-all flex items-center gap-1.5 ${m?"whitespace-normal":"whitespace-nowrap"}`,style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)",borderRight:"none"},onMouseEnter:C=>{C.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",C.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:C=>{C.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",C.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:`Copy all ${e} comments to AI coding agent`,children:[r?y.jsx(Pa,{size:12}):y.jsx(Zx,{size:12}),S]}),y.jsx("button",{onClick:()=>h(!f),className:"text-xs px-2 py-1.5 rounded-r transition-all flex items-center border-l",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",borderTop:"1px solid var(--color-yellow-btn-border)",borderRight:"1px solid var(--color-yellow-btn-border)",borderBottom:"1px solid var(--color-yellow-btn-border)",borderLeft:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:C=>{C.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",C.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:C=>{C.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",C.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:"More options",children:y.jsx(Ri,{size:12,className:`transition-transform duration-200 ${f?"rotate-180":""}`})})]}),f&&y.jsxs("div",{className:`absolute left-0 right-0 bg-github-bg-primary border border-github-border z-50 pb-px ${b?"bottom-full rounded-t":"top-full rounded-b"}`,style:{borderTop:b?void 0:"none",borderBottom:b?"none":void 0},children:[s&&y.jsxs("button",{onClick:w,className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 text-github-text-primary hover:bg-github-bg-tertiary transition-colors",disabled:e===0,children:[y.jsx(B2,{size:12}),"View All Comments"]}),y.jsxs("button",{onClick:x,className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 text-github-text-primary hover:bg-github-bg-tertiary transition-colors",children:[y.jsx(v2,{size:12}),"Cleanup All Prompt"]})]})]})}function n1(e){return/```suggestion\n([\s\S]*?)```/.test(e)}function r1(e){const r=[],l=/```suggestion\n([\s\S]*?)```/g;let i;for(;(i=l.exec(e))!==null;)r.push({suggestedCode:i[1].replace(/\n$/,""),startIndex:i.index,endIndex:i.index+i[0].length});return r}function ak(e){return`\`\`\`suggestion
10
- ${e.endsWith(`
11
- `)?e:e+`
12
- `}\`\`\``}const ok=2,sk=100;function uk(e){return!(e.length<ok||e.length>sk)}function Hb(e){return e.toLowerCase()}function Pb(e){const r=e.trim();return r?r.match(/^\w+$/)!==null&&uk(r):!1}const ck=200,l1=T.createContext(void 0);function fk({children:e}){const[r,l]=T.useState(null),i=T.useRef(null),s=T.useCallback(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]),u=T.useCallback(p=>{const m=p.target;if(!m.classList.contains("word-token"))return;s();const b=m.getAttribute("data-word");b&&(i.current=setTimeout(()=>{l(b)},ck))},[s]),c=T.useCallback(()=>{s(),l(null)},[s]),f=T.useCallback(p=>r?Hb(p)===Hb(r):!1,[r]);T.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]);const h=T.useMemo(()=>({highlightedWord:r,handleMouseOver:u,handleMouseOut:c,isWordHighlighted:f}),[r,u,c,f]);return y.jsx(l1.Provider,{value:h,children:e})}function dk(){const e=T.useContext(l1);if(!e)throw new Error("useWordHighlight must be used within a WordHighlightProvider");return e}function i1(e){var r,l,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(r=0;r<s;r++)e[r]&&(l=i1(e[r]))&&(i&&(i+=" "),i+=l)}else for(l in e)e[l]&&(i&&(i+=" "),i+=l);return i}function a1(){for(var e,r,l=0,i="",s=arguments.length;l<s;l++)(e=arguments[l])&&(r=i1(e))&&(i&&(i+=" "),i+=r);return i}var hk=Object.create,lu=Object.defineProperty,pk=Object.defineProperties,gk=Object.getOwnPropertyDescriptor,mk=Object.getOwnPropertyDescriptors,o1=Object.getOwnPropertyNames,Ds=Object.getOwnPropertySymbols,bk=Object.getPrototypeOf,oh=Object.prototype.hasOwnProperty,s1=Object.prototype.propertyIsEnumerable,qb=(e,r,l)=>r in e?lu(e,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[r]=l,Kn=(e,r)=>{for(var l in r||(r={}))oh.call(r,l)&&qb(e,l,r[l]);if(Ds)for(var l of Ds(r))s1.call(r,l)&&qb(e,l,r[l]);return e},iu=(e,r)=>pk(e,mk(r)),u1=(e,r)=>{var l={};for(var i in e)oh.call(e,i)&&r.indexOf(i)<0&&(l[i]=e[i]);if(e!=null&&Ds)for(var i of Ds(e))r.indexOf(i)<0&&s1.call(e,i)&&(l[i]=e[i]);return l},yk=(e,r)=>function(){return r||(0,e[o1(e)[0]])((r={exports:{}}).exports,r),r.exports},xk=(e,r)=>{for(var l in r)lu(e,l,{get:r[l],enumerable:!0})},vk=(e,r,l,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of o1(r))!oh.call(e,s)&&s!==l&&lu(e,s,{get:()=>r[s],enumerable:!(i=gk(r,s))||i.enumerable});return e},wk=(e,r,l)=>(l=e!=null?hk(bk(e)):{},vk(!e||!e.__esModule?lu(l,"default",{value:e,enumerable:!0}):l,e)),Sk=yk({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,r){var l=(function(){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,u={},c={util:{encode:function w(S){return S instanceof f?new f(S.type,w(S.content),S.alias):Array.isArray(S)?S.map(w):S.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(w){return Object.prototype.toString.call(w).slice(8,-1)},objId:function(w){return w.__id||Object.defineProperty(w,"__id",{value:++s}),w.__id},clone:function w(S,C){C=C||{};var E,N;switch(c.util.type(S)){case"Object":if(N=c.util.objId(S),C[N])return C[N];E={},C[N]=E;for(var j in S)S.hasOwnProperty(j)&&(E[j]=w(S[j],C));return E;case"Array":return N=c.util.objId(S),C[N]?C[N]:(E=[],C[N]=E,S.forEach(function(B,P){E[P]=w(B,C)}),E);default:return S}},getLanguage:function(w){for(;w;){var S=i.exec(w.className);if(S)return S[1].toLowerCase();w=w.parentElement}return"none"},setLanguage:function(w,S){w.className=w.className.replace(RegExp(i,"gi"),""),w.classList.add("language-"+S)},isActive:function(w,S,C){for(var E="no-"+S;w;){var N=w.classList;if(N.contains(S))return!0;if(N.contains(E))return!1;w=w.parentElement}return!!C}},languages:{plain:u,plaintext:u,text:u,txt:u,extend:function(w,S){var C=c.util.clone(c.languages[w]);for(var E in S)C[E]=S[E];return C},insertBefore:function(w,S,C,E){E=E||c.languages;var N=E[w],j={};for(var B in N)if(N.hasOwnProperty(B)){if(B==S)for(var P in C)C.hasOwnProperty(P)&&(j[P]=C[P]);C.hasOwnProperty(B)||(j[B]=N[B])}var L=E[w];return E[w]=j,c.languages.DFS(c.languages,function(M,H){H===L&&M!=w&&(this[M]=j)}),j},DFS:function w(S,C,E,N){N=N||{};var j=c.util.objId;for(var B in S)if(S.hasOwnProperty(B)){C.call(S,B,S[B],E||B);var P=S[B],L=c.util.type(P);L==="Object"&&!N[j(P)]?(N[j(P)]=!0,w(P,C,null,N)):L==="Array"&&!N[j(P)]&&(N[j(P)]=!0,w(P,C,B,N))}}},plugins:{},highlight:function(w,S,C){var E={code:w,grammar:S,language:C};if(c.hooks.run("before-tokenize",E),!E.grammar)throw new Error('The language "'+E.language+'" has no grammar.');return E.tokens=c.tokenize(E.code,E.grammar),c.hooks.run("after-tokenize",E),f.stringify(c.util.encode(E.tokens),E.language)},tokenize:function(w,S){var C=S.rest;if(C){for(var E in C)S[E]=C[E];delete S.rest}var N=new m;return b(N,N.head,w),p(w,N,S,N.head,0),x(N)},hooks:{all:{},add:function(w,S){var C=c.hooks.all;C[w]=C[w]||[],C[w].push(S)},run:function(w,S){var C=c.hooks.all[w];if(!(!C||!C.length))for(var E=0,N;N=C[E++];)N(S)}},Token:f};function f(w,S,C,E){this.type=w,this.content=S,this.alias=C,this.length=(E||"").length|0}f.stringify=function w(S,C){if(typeof S=="string")return S;if(Array.isArray(S)){var E="";return S.forEach(function(L){E+=w(L,C)}),E}var N={type:S.type,content:w(S.content,C),tag:"span",classes:["token",S.type],attributes:{},language:C},j=S.alias;j&&(Array.isArray(j)?Array.prototype.push.apply(N.classes,j):N.classes.push(j)),c.hooks.run("wrap",N);var B="";for(var P in N.attributes)B+=" "+P+'="'+(N.attributes[P]||"").replace(/"/g,"&quot;")+'"';return"<"+N.tag+' class="'+N.classes.join(" ")+'"'+B+">"+N.content+"</"+N.tag+">"};function h(w,S,C,E){w.lastIndex=S;var N=w.exec(C);if(N&&E&&N[1]){var j=N[1].length;N.index+=j,N[0]=N[0].slice(j)}return N}function p(w,S,C,E,N,j){for(var B in C)if(!(!C.hasOwnProperty(B)||!C[B])){var P=C[B];P=Array.isArray(P)?P:[P];for(var L=0;L<P.length;++L){if(j&&j.cause==B+","+L)return;var M=P[L],H=M.inside,G=!!M.lookbehind,z=!!M.greedy,V=M.alias;if(z&&!M.pattern.global){var Y=M.pattern.toString().match(/[imsuy]*$/)[0];M.pattern=RegExp(M.pattern.source,Y+"g")}for(var J=M.pattern||M,I=E.next,X=N;I!==S.tail&&!(j&&X>=j.reach);X+=I.value.length,I=I.next){var F=I.value;if(S.length>w.length)return;if(!(F instanceof f)){var Z=1,O;if(z){if(O=h(J,X,w,G),!O||O.index>=w.length)break;var U=O.index,$=O.index+O[0].length,R=X;for(R+=I.value.length;U>=R;)I=I.next,R+=I.value.length;if(R-=I.value.length,X=R,I.value instanceof f)continue;for(var D=I;D!==S.tail&&(R<$||typeof D.value=="string");D=D.next)Z++,R+=D.value.length;Z--,F=w.slice(X,R),O.index-=X}else if(O=h(J,0,F,G),!O)continue;var U=O.index,A=O[0],ne=F.slice(0,U),re=F.slice(U+A.length),fe=X+F.length;j&&fe>j.reach&&(j.reach=fe);var ge=I.prev;ne&&(ge=b(S,ge,ne),X+=ne.length),v(S,ge,Z);var ye=new f(B,H?c.tokenize(A,H):A,V,A);if(I=b(S,ge,ye),re&&b(S,I,re),Z>1){var pe={cause:B+","+L,reach:fe};p(w,S,C,I.prev,X,pe),j&&pe.reach>j.reach&&(j.reach=pe.reach)}}}}}}function m(){var w={value:null,prev:null,next:null},S={value:null,prev:w,next:null};w.next=S,this.head=w,this.tail=S,this.length=0}function b(w,S,C){var E=S.next,N={value:C,prev:S,next:E};return S.next=N,E.prev=N,w.length++,N}function v(w,S,C){for(var E=S.next,N=0;N<C&&E!==w.tail;N++)E=E.next;S.next=E,E.prev=S,w.length-=N}function x(w){for(var S=[],C=w.head.next;C!==w.tail;)S.push(C.value),C=C.next;return S}return c})();r.exports=l,l.default=l}}),ue=wk(Sk());ue.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},ue.languages.markup.tag.inside["attr-value"].inside.entity=ue.languages.markup.entity,ue.languages.markup.doctype.inside["internal-subset"].inside=ue.languages.markup,ue.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(ue.languages.markup.tag,"addInlined",{value:function(e,i){var l={},l=(l["language-"+i]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:ue.languages[i]},l.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:l}}),i=(l["language-"+i]={pattern:/[\s\S]+/,inside:ue.languages[i]},{});i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:l},ue.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(ue.languages.markup.tag,"addAttribute",{value:function(e,r){ue.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:ue.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),ue.languages.html=ue.languages.markup,ue.languages.mathml=ue.languages.markup,ue.languages.svg=ue.languages.markup,ue.languages.xml=ue.languages.extend("markup",{}),ue.languages.ssml=ue.languages.xml,ue.languages.atom=ue.languages.xml,ue.languages.rss=ue.languages.xml,(function(e){var r={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},l=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,i="(?:[^\\\\-]|"+l.source+")",i=RegExp(i+"-"+i),s={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:l,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":r,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:l}},"special-escape":r,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":s}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:l,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":s}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(ue),ue.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},ue.languages.javascript=ue.languages.extend("clike",{"class-name":[ue.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),ue.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,ue.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:ue.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:ue.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:ue.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:ue.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:ue.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),ue.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:ue.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),ue.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),ue.languages.markup&&(ue.languages.markup.tag.addInlined("script","javascript"),ue.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),ue.languages.js=ue.languages.javascript,ue.languages.actionscript=ue.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),ue.languages.actionscript["class-name"].alias="function",delete ue.languages.actionscript.parameter,delete ue.languages.actionscript["literal-property"],ue.languages.markup&&ue.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:ue.languages.markup}}),(function(e){var r=/#(?!\{).+/,l={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:r,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:l}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:r,interpolation:l}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:l}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript})(ue),(function(e){var r=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(r,"addSupport",{value:function(l,i){(l=typeof l=="string"?[l]:l).forEach(function(s){var u=function(b){b.inside||(b.inside={}),b.inside.rest=i},c="doc-comment";if(f=e.languages[s]){var f,h=f[c];if((h=h||(f=e.languages.insertBefore(s,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[c])instanceof RegExp&&(h=f[c]={pattern:h}),Array.isArray(h))for(var p=0,m=h.length;p<m;p++)h[p]instanceof RegExp&&(h[p]={pattern:h[p]}),u(h[p]);else u(h)}})}}),r.addSupport(["java","javascript","php"],r)})(ue),(function(e){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,r=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+r.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(ue),(function(e){var r=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,r=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:r={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+r.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[r,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=r,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),l={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:l,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:l})})(ue),(function(e){var r=/[*&][^\s[\]{},]+/,l=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,i="(?:"+l.source+"(?:[ ]+"+r.source+")?|"+r.source+"(?:[ ]+"+l.source+")?)",s=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),u=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function c(f,h){h=(h||"").replace(/m/g,"")+"m";var p=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<value>>/g,function(){return f});return RegExp(p,h)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return i})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<key>>/g,function(){return"(?:"+s+"|"+u+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:c(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:c(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:c(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:c(u),lookbehind:!0,greedy:!0},number:{pattern:c(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:l,important:r,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(ue),(function(e){var r=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function l(p){return p=p.replace(/<inner>/g,function(){return r}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+p+")")}var i=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,s=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return i}),u=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,c=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+s+u+"(?:"+s+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+s+u+")(?:"+s+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(i),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+s+")"+u+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+s+"$"),inside:{"table-header":{pattern:RegExp(i),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:l(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:l(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:l(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:l(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(p){["url","bold","italic","strike","code-snippet"].forEach(function(m){p!==m&&(e.languages.markdown[p].inside.content.inside[m]=e.languages.markdown[m])})}),e.hooks.add("after-tokenize",function(p){p.language!=="markdown"&&p.language!=="md"||(function m(b){if(b&&typeof b!="string")for(var v=0,x=b.length;v<x;v++){var w,S=b[v];S.type!=="code"?m(S.content):(w=S.content[1],S=S.content[3],w&&S&&w.type==="code-language"&&S.type==="code-block"&&typeof w.content=="string"&&(w=w.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),w="language-"+(w=(/[a-z][\w-]*/i.exec(w)||[""])[0].toLowerCase()),S.alias?typeof S.alias=="string"?S.alias=[S.alias,w]:S.alias.push(w):S.alias=[w]))}})(p.tokens)}),e.hooks.add("wrap",function(p){if(p.type==="code-block"){for(var m="",b=0,v=p.classes.length;b<v;b++){var x=p.classes[b],x=/language-(.+)/.exec(x);if(x){m=x[1];break}}var w,S=e.languages[m];S?p.content=e.highlight((function(C){return C=C.replace(c,""),C=C.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(E,N){var j;return(N=N.toLowerCase())[0]==="#"?(j=N[1]==="x"?parseInt(N.slice(2),16):Number(N.slice(1)),h(j)):f[N]||E})})(p.content),S,m):m&&m!=="none"&&e.plugins.autoloader&&(w="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),p.attributes.id=w,e.plugins.autoloader.loadLanguages(m,function(){var C=document.getElementById(w);C&&(C.innerHTML=e.highlight(C.textContent,e.languages[m],m))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),f={amp:"&",lt:"<",gt:">",quot:'"'},h=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown})(ue),ue.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:ue.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},ue.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var r=e.tokens.filter(function(w){return typeof w!="string"&&w.type!=="comment"&&w.type!=="scalar"}),l=0;l<r.length;){var i=r[l++];if(i.type==="keyword"&&i.content==="mutation"){var s=[];if(b(["definition-mutation","punctuation"])&&m(1).content==="("){l+=2;var u=v(/^\($/,/^\)$/);if(u===-1)continue;for(;l<u;l++){var c=m(0);c.type==="variable"&&(x(c,"variable-input"),s.push(c.content))}l=u+1}if(b(["punctuation","property-query"])&&m(0).content==="{"&&(l++,x(m(0),"property-mutation"),0<s.length)){var f=v(/^\{$/,/^\}$/);if(f!==-1)for(var h=l;h<f;h++){var p=r[h];p.type==="variable"&&0<=s.indexOf(p.content)&&x(p,"variable-input")}}}}function m(w){return r[l+w]}function b(w,S){S=S||0;for(var C=0;C<w.length;C++){var E=m(C+S);if(!E||E.type!==w[C])return}return 1}function v(w,S){for(var C=1,E=l;E<r.length;E++){var N=r[E],j=N.content;if(N.type==="punctuation"&&typeof j=="string"){if(w.test(j))C++;else if(S.test(j)&&--C===0)return E}}return-1}function x(w,S){var C=w.alias;C?Array.isArray(C)||(w.alias=C=[C]):w.alias=C=[],C.push(S)}}),ue.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},(function(e){var r=e.languages.javascript["template-string"],l=r.pattern.source,i=r.inside.interpolation,s=i.inside["interpolation-punctuation"],u=i.pattern.source;function c(b,v){if(e.languages[b])return{pattern:RegExp("((?:"+v+")\\s*)"+l),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:b}}}}function f(b,v,x){return b={code:b,grammar:v,language:x},e.hooks.run("before-tokenize",b),b.tokens=e.tokenize(b.code,b.grammar),e.hooks.run("after-tokenize",b),b.tokens}function h(b,v,x){var C=e.tokenize(b,{interpolation:{pattern:RegExp(u),lookbehind:!0}}),w=0,S={},C=f(C.map(function(N){if(typeof N=="string")return N;for(var j,B,N=N.content;b.indexOf((B=w++,j="___"+x.toUpperCase()+"_"+B+"___"))!==-1;);return S[j]=N,j}).join(""),v,x),E=Object.keys(S);return w=0,(function N(j){for(var B=0;B<j.length;B++){if(w>=E.length)return;var P,L,M,H,G,z,V,Y=j[B];typeof Y=="string"||typeof Y.content=="string"?(P=E[w],(V=(z=typeof Y=="string"?Y:Y.content).indexOf(P))!==-1&&(++w,L=z.substring(0,V),G=S[P],M=void 0,(H={})["interpolation-punctuation"]=s,(H=e.tokenize(G,H)).length===3&&((M=[1,1]).push.apply(M,f(H[1],e.languages.javascript,"javascript")),H.splice.apply(H,M)),M=new e.Token("interpolation",H,i.alias,G),H=z.substring(V+P.length),G=[],L&&G.push(L),G.push(M),H&&(N(z=[H]),G.push.apply(G,z)),typeof Y=="string"?(j.splice.apply(j,[B,1].concat(G)),B+=G.length-1):Y.content=G)):(V=Y.content,Array.isArray(V)?N(V):N([V]))}})(C),new e.Token(x,C,"language-"+x,b)}e.languages.javascript["template-string"]=[c("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),c("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),c("svg",/\bsvg/.source),c("markdown",/\b(?:markdown|md)/.source),c("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),c("sql",/\bsql/.source),r].filter(Boolean);var p={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function m(b){return typeof b=="string"?b:Array.isArray(b)?b.map(m).join(""):m(b.content)}e.hooks.add("after-tokenize",function(b){b.language in p&&(function v(x){for(var w=0,S=x.length;w<S;w++){var C,E,N,j=x[w];typeof j!="string"&&(C=j.content,Array.isArray(C)?j.type==="template-string"?(j=C[1],C.length===3&&typeof j!="string"&&j.type==="embedded-code"&&(E=m(j),j=j.alias,j=Array.isArray(j)?j[0]:j,N=e.languages[j])&&(C[1]=h(E,N,j))):v(C):typeof C!="string"&&v([C]))}})(b.tokens)})})(ue),(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var r=e.languages.extend("typescript",{});delete r["class-name"],e.languages.typescript["class-name"].inside=r,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:r}}}}),e.languages.ts=e.languages.typescript})(ue),(function(e){var r=e.languages.javascript,l=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,i="(@(?:arg|argument|param|property)\\s+(?:"+l+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(i+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(i+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:r,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return l})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+l),lookbehind:!0,inside:{string:r.string,number:r.number,boolean:r.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:r,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)})(ue),(function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})})(ue),ue.languages.n4js=ue.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),ue.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),ue.languages.n4jsd=ue.languages.n4js,(function(e){function r(c,f){return RegExp(c.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),f)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:r(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:r(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:r(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var l=["function","function-variable","method","method-variable","property-access"],i=0;i<l.length;i++){var u=l[i],s=e.languages.javascript[u],u=(s=e.util.type(s)==="RegExp"?e.languages.javascript[u]={pattern:s}:s).inside||{};(s.inside=u)["maybe-class-name"]=/^[A-Z][\s\S]*/}})(ue),(function(e){var r=e.util.clone(e.languages.javascript),l=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,i=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,s=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function u(h,p){return h=h.replace(/<S>/g,function(){return l}).replace(/<BRACES>/g,function(){return i}).replace(/<SPREAD>/g,function(){return s}),RegExp(h,p)}s=u(s).source,e.languages.jsx=e.languages.extend("markup",r),e.languages.jsx.tag.pattern=u(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=r.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:u(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:u(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function c(h){for(var p=[],m=0;m<h.length;m++){var b=h[m],v=!1;typeof b!="string"&&(b.type==="tag"&&b.content[0]&&b.content[0].type==="tag"?b.content[0].content[0].content==="</"?0<p.length&&p[p.length-1].tagName===f(b.content[0].content[1])&&p.pop():b.content[b.content.length-1].content!=="/>"&&p.push({tagName:f(b.content[0].content[1]),openedBraces:0}):0<p.length&&b.type==="punctuation"&&b.content==="{"?p[p.length-1].openedBraces++:0<p.length&&0<p[p.length-1].openedBraces&&b.type==="punctuation"&&b.content==="}"?p[p.length-1].openedBraces--:v=!0),(v||typeof b=="string")&&0<p.length&&p[p.length-1].openedBraces===0&&(v=f(b),m<h.length-1&&(typeof h[m+1]=="string"||h[m+1].type==="plain-text")&&(v+=f(h[m+1]),h.splice(m+1,1)),0<m&&(typeof h[m-1]=="string"||h[m-1].type==="plain-text")&&(v=f(h[m-1])+v,h.splice(m-1,1),m--),h[m]=new e.Token("plain-text",v,null,v)),b.content&&typeof b.content!="string"&&c(b.content)}}var f=function(h){return h?typeof h=="string"?h:typeof h.content=="string"?h.content:h.content.map(f).join(""):""};e.hooks.add("after-tokenize",function(h){h.language!=="jsx"&&h.language!=="tsx"||c(h.tokens)})})(ue),(function(e){var r=e.util.clone(e.languages.typescript),r=(e.languages.tsx=e.languages.extend("jsx",r),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(ue),ue.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},ue.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=ue.languages.swift}),(function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var r={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:r},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:r},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin})(ue),ue.languages.c=ue.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),ue.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),ue.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},ue.languages.c.string],char:ue.languages.c.char,comment:ue.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:ue.languages.c}}}}),ue.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete ue.languages.c.boolean,ue.languages.objectivec=ue.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete ue.languages.objectivec["class-name"],ue.languages.objc=ue.languages.objectivec,ue.languages.reason=ue.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),ue.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete ue.languages.reason.function,(function(e){for(var r=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,l=0;l<2;l++)r=r.replace(/<self>/g,function(){return r});r=r.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+r),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(ue),ue.languages.go=ue.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),ue.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete ue.languages.go["class-name"],(function(e){var r=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,l=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return r.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return r.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:r,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return l})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(ue),ue.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},ue.languages.python["string-interpolation"].inside.interpolation.inside.rest=ue.languages.python,ue.languages.py=ue.languages.python,ue.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},ue.languages.webmanifest=ue.languages.json;var vn={};xk(vn,{dracula:()=>Ek,duotoneDark:()=>Nk,duotoneLight:()=>Tk,github:()=>Rk,gruvboxMaterialDark:()=>iE,gruvboxMaterialLight:()=>oE,jettwaveDark:()=>Kk,jettwaveLight:()=>Wk,nightOwl:()=>Lk,nightOwlLight:()=>Ok,oceanicNext:()=>zk,okaidia:()=>Fk,oneDark:()=>tE,oneLight:()=>rE,palenight:()=>Uk,shadesOfPurple:()=>Pk,synthwave84:()=>$k,ultramin:()=>Gk,vsDark:()=>c1,vsLight:()=>Zk});var kk={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},Ek=kk,Ck={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},Nk=Ck,Ak={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},Tk=Ak,jk={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},Rk=jk,_k={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},Lk=_k,Dk={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},Ok=Dk,xn={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},Mk={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:xn.keyword}},{types:["attr-value"],style:{color:xn.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:xn.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:xn.primitive}},{types:["boolean"],style:{color:xn.boolean}},{types:["tag"],style:{color:xn.tag}},{types:["string"],style:{color:xn.string}},{types:["punctuation"],style:{color:xn.string}},{types:["selector","char","builtin","inserted"],style:{color:xn.char}},{types:["function"],style:{color:xn.function}},{types:["operator","entity","url","variable"],style:{color:xn.variable}},{types:["keyword"],style:{color:xn.keyword}},{types:["atrule","class-name"],style:{color:xn.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},zk=Mk,Bk={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},Fk=Bk,Ik={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},Uk=Ik,Hk={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},Pk=Hk,qk={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},$k=qk,Vk={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},Gk=Vk,Yk={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},c1=Yk,Xk={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},Zk=Xk,Qk={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},Kk=Qk,Jk={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},Wk=Jk,eE={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},tE=eE,nE={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},rE=nE,lE={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},iE=lE,aE={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},oE=aE,sE=e=>T.useCallback(r=>{var l=r,{className:i,style:s,line:u}=l,c=u1(l,["className","style","line"]);const f=iu(Kn({},c),{className:a1("token-line",i)});return typeof e=="object"&&"plain"in e&&(f.style=e.plain),typeof s=="object"&&(f.style=Kn(Kn({},f.style||{}),s)),f},[e]),uE=e=>{const r=T.useCallback(({types:l,empty:i})=>{if(e!=null){{if(l.length===1&&l[0]==="plain")return i!=null?{display:"inline-block"}:void 0;if(l.length===1&&i!=null)return e[l[0]]}return Object.assign(i!=null?{display:"inline-block"}:{},...l.map(s=>e[s]))}},[e]);return T.useCallback(l=>{var i=l,{token:s,className:u,style:c}=i,f=u1(i,["token","className","style"]);const h=iu(Kn({},f),{className:a1("token",...s.types,u),children:s.content,style:r(s)});return c!=null&&(h.style=Kn(Kn({},h.style||{}),c)),h},[r])},cE=/\r\n|\r|\n/,$b=e=>{e.length===0?e.push({types:["plain"],content:`
13
- `,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
14
- `,e[0].empty=!0)},Vb=(e,r)=>{const l=e.length;return l>0&&e[l-1]===r?e:e.concat(r)},fE=e=>{const r=[[]],l=[e],i=[0],s=[e.length];let u=0,c=0,f=[];const h=[f];for(;c>-1;){for(;(u=i[c]++)<s[c];){let p,m=r[c];const v=l[c][u];if(typeof v=="string"?(m=c>0?m:["plain"],p=v):(m=Vb(m,v.type),v.alias&&(m=Vb(m,v.alias)),p=v.content),typeof p!="string"){c++,r.push(m),l.push(p),i.push(0),s.push(p.length);continue}const x=p.split(cE),w=x.length;f.push({types:m,content:x[0]});for(let S=1;S<w;S++)$b(f),h.push(f=[]),f.push({types:m,content:x[S]})}c--,r.pop(),l.pop(),i.pop(),s.pop()}return $b(f),h},Gb=fE,dE=({prism:e,code:r,grammar:l,language:i})=>T.useMemo(()=>{if(l==null)return Gb([r]);const s={code:r,grammar:l,language:i,tokens:[]};return e.hooks.run("before-tokenize",s),s.tokens=e.tokenize(r,l),e.hooks.run("after-tokenize",s),Gb(s.tokens)},[r,l,i,e]),hE=(e,r)=>{const{plain:l}=e,i=e.styles.reduce((s,u)=>{const{languages:c,style:f}=u;return c&&!c.includes(r)||u.types.forEach(h=>{const p=Kn(Kn({},s[h]),f);s[h]=p}),s},{});return i.root=l,i.plain=iu(Kn({},l),{backgroundColor:void 0}),i},pE=hE,gE=({children:e,language:r,code:l,theme:i,prism:s})=>{const u=r.toLowerCase(),c=pE(i,u),f=sE(c),h=uE(c),p=s.languages[u],m=dE({prism:s,language:u,code:l,grammar:p});return e({tokens:m,className:`prism-code language-${u}`,style:c!=null?c.root:{},getLineProps:f,getTokenProps:h})},mE=e=>T.createElement(gE,iu(Kn({},e),{prism:e.prism||ue,theme:e.theme||c1,code:e.code,language:e.language}));const bE="modulepreload",yE=function(e){return"/"+e},Yb={},Pt=function(r,l,i){let s=Promise.resolve();if(l&&l.length>0){let h=function(p){return Promise.all(p.map(m=>Promise.resolve(m).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");s=h(l.map(p=>{if(p=yE(p),p in Yb)return;Yb[p]=!0;const m=p.endsWith(".css"),b=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${b}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":bE,m||(v.as="script"),v.crossOrigin="",v.href=p,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((x,w)=>{v.addEventListener("load",x),v.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${p}`)))})}))}function u(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return s.then(c=>{for(const f of c||[])f.status==="rejected"&&u(f.reason);return r().catch(u)})},xs={};function f1(e){if(!xs[e]){const l={bash:()=>Pt(()=>import("./prism-bash-DTkDXsAh.js"),[]),sh:()=>Pt(()=>import("./prism-bash-DTkDXsAh.js"),[]),shell:()=>Pt(()=>import("./prism-bash-DTkDXsAh.js"),[]),php:async()=>(await Pt(()=>import("./prism-markup-templating-Ct1xsyfA.js"),[]),Pt(()=>import("./prism-php-BbsdsICU.js").then(i=>i.p),[])),sql:()=>Pt(()=>import("./prism-sql-AgAyy5H_.js"),[]),ruby:()=>Pt(()=>import("./prism-ruby-CSLiFfIy.js").then(i=>i.p),[]),java:()=>Pt(()=>import("./prism-java-BjHLe7qM.js").then(i=>i.p),[]),scala:async()=>(await f1("java"),Pt(()=>import("./prism-scala-BjNo2HkN.js"),[])),solidity:()=>Pt(()=>import("./prism-solidity-C3yStBME.js").then(i=>i.p),[]),vim:()=>Pt(()=>import("./prism-vim-uciLQ2PQ.js"),[]),dart:()=>Pt(()=>import("./prism-dart-MjriiaMt.js"),[]),csharp:()=>Pt(()=>import("./prism-csharp-omuTcU4j.js").then(i=>i.p),[]),protobuf:()=>Pt(()=>import("./prism-protobuf-DiQ_z8B5.js"),[]),hcl:()=>Pt(()=>import("./prism-hcl-BVGrHlPv.js").then(i=>i.p),[]),perl:()=>Pt(()=>import("./prism-perl-Cl4F-f2r.js").then(i=>i.p),[])}[e];if(!l)return console.warn(`No loader available for language: ${e}`),Promise.reject(new Error(`Unsupported language: ${e}`));xs[e]=l().then(()=>{}).catch(i=>{throw delete xs[e],console.warn(`Failed to load language: ${e}`,i),i})}return xs[e]}typeof global<"u"?global.Prism=ue:typeof window<"u"&&(window.Prism=ue);const Xb=["markup","html","xml","svg","javascript","js","typescript","ts","jsx","tsx","css","c","cpp","swift","kotlin","objectivec","reason","rust","go","graphql","yaml","yml","json","markdown","md","python","py"];function xE(e,r){const[l,i]=T.useState(()=>Xb.includes(r)||!!ue.languages[r]);return T.useEffect(()=>{if(!l){if(Xb.includes(r)){i(!0);return}f1(r).then(()=>{i(!0)}).catch(()=>{i(!1)})}},[r,l]),{ready:l,actualLang:l?r:"text"}}function Za(e){return e&&e.split(".").pop()?.toLowerCase()||null}function vE(e){return e&&e.split("/").pop()||""}const wE={js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",tsx:"typescript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",cpp:"cpp",c:"c",cs:"csharp",php:"php",swift:"swift",kt:"kotlin",scala:"scala",r:"r",sql:"sql",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",yml:"yaml",yaml:"yaml",json:"json",xml:"xml",html:"html",css:"css",scss:"scss",sass:"sass",less:"less",md:"markdown",markdown:"markdown",tex:"latex",vim:"vim"},SE={ts:"typescript",tsx:"tsx",mts:"typescript",cts:"typescript",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",json:"json",css:"css",scss:"css",html:"html",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",yml:"yaml",yaml:"yaml",md:"markdown",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",cpp:"cpp",c:"c",php:"php",sql:"sql",xml:"xml",swift:"swift",kt:"kotlin",scala:"scala",svelte:"svelte",r:"r",lua:"lua",perl:"perl",pl:"perl",pm:"perl",dockerfile:"docker",makefile:"makefile",gitignore:"git",env:"bash",conf:"nginx",ini:"ini",toml:"toml",sol:"solidity",vim:"vim",dart:"dart",cs:"csharp",proto:"protobuf",tf:"hcl",tfvars:"hcl",hcl:"hcl"},kE={dockerfile:"docker",makefile:"makefile",".gitignore":"git",".env":"bash",".bashrc":"bash",".zshrc":"bash",".bash_profile":"bash",".profile":"bash"};function d1(e,r){if(e)return r[e.toLowerCase()]}function EE(e){return d1(Za(e),wE)}function CE(e){const r=vE(e).toLowerCase(),l=kE[r];return l||d1(Za(e),SE)||"text"}function NE(e){return{...e,styles:e.styles.map(r=>({...r,style:{...r.style,background:void 0,backgroundColor:void 0}}))}}function AE(e){let r;switch(e){case"github":r=vn.github;break;case"vsLight":r=vn.vsLight;break;case"oneLight":r=vn.oneLight;break;case"gruvboxMaterialLight":r=vn.gruvboxMaterialLight;break;case"nightOwlLight":r=vn.nightOwlLight;break;case"vsDark":r=vn.vsDark;break;case"oneDark":r=vn.oneDark;break;case"gruvboxMaterialDark":r=vn.gruvboxMaterialDark;break;case"nightOwl":r=vn.nightOwl;break;case"dracula":r=vn.dracula;break;case"okaidia":r=vn.okaidia;break;default:r=vn.vsDark}return NE(r)}const sh=Jt.memo(function({code:r,language:l,className:i,syntaxTheme:s="vsDark",filename:u="",renderToken:c,onMouseOver:f,onMouseOut:h}){const p=l||(u?CE(u):"text"),{actualLang:m}=xE(r,p),b=AE(s),v=T.useCallback(({style:x,tokens:w,getLineProps:S,getTokenProps:C})=>y.jsx("span",{className:i,style:{...x,background:"transparent",backgroundColor:"transparent"},onMouseOver:f,onMouseOut:h,children:w.map((E,N)=>y.jsx("span",{...S({line:E}),children:E.map((j,B)=>c?c(j,B,C):y.jsx("span",{...C({token:j})},B))},N))}),[i,f,h,c]);return y.jsx(mE,{code:r,language:m,theme:b,prism:ue,children:v})}),qa=Jt.memo(function(r){const{handleMouseOver:l,handleMouseOut:i,isWordHighlighted:s}=dk(),u=T.useCallback((c,f,h)=>{const p=h({token:c}),m=c.content.split(/( +)/);if(m.length===1&&m[0]&&!Pb(m[0]))return y.jsx("span",{...p},f);const b=m.map((v,x)=>{if(!v)return null;if(Pb(v)){const w=v.trim(),S=s(w);return y.jsx("span",{className:`word-token ${S?"word-highlight":""}`,"data-word":w,children:v},`${f}-${x}`)}return y.jsx("span",{children:v},`${f}-${x}`)});return y.jsx("span",{...p,children:b},f)},[s]);return y.jsx(sh,{...r,renderToken:u,onMouseOver:l,onMouseOut:i})}),vd=Jt.memo(function({segments:r,className:l=""}){const i=T.useMemo(()=>r.map((s,u)=>{const c=s.type==="added"?"word-diff-added":s.type==="removed"?"word-diff-removed":"";return y.jsx("span",{className:c,children:s.value},u)}),[r]);return y.jsx("span",{className:l,children:i})}),TE=e=>{switch(e){case"add":return"+";case"delete":return"-";default:return" "}},jE=e=>{switch(e){case"add":return"text-github-accent bg-diff-addition-bg";case"delete":return"text-github-danger bg-diff-deletion-bg";default:return"text-github-text-muted bg-github-bg-secondary"}};function h1({line:e,syntaxTheme:r,filename:l,diffSegments:i,showPrefixBorder:s=!0}){return y.jsxs("div",{className:"flex items-center relative min-h-[16px]",children:[y.jsx("span",{className:`w-5 text-center flex-shrink-0 ${s?"border-r border-github-border":""} ${jE(e.type)}`,children:TE(e.type)}),i?y.jsx(vd,{segments:i,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(qa,{code:e.content,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit",syntaxTheme:r,filename:l})]})}const RE=e=>e==="add"?"bg-diff-addition-bg":"bg-diff-deletion-bg",_E=(e,r)=>({type:e,content:r});function Zb({code:e,type:r,filename:l,keyPrefix:i,syntaxTheme:s}){return y.jsx(y.Fragment,{children:e.split(`
15
- `).map((u,c)=>y.jsx("div",{className:RE(r),children:y.jsx(h1,{line:_E(r,u),filename:l,syntaxTheme:s,showPrefixBorder:!1})},`${i}-${c}`))})}function p1(e){return n1(e)}function wd({body:e,originalCode:r,filename:l,syntaxTheme:i}){const s=T.useMemo(()=>{const u=r1(e);if(u.length===0)return[{type:"text",content:e}];const c=[];let f=0;for(const h of u)h.startIndex>f&&c.push({type:"text",content:e.slice(f,h.startIndex)}),c.push({type:"suggestion",code:h.suggestedCode,original:r||""}),f=h.endIndex;return f<e.length&&c.push({type:"text",content:e.slice(f)}),c},[e,r]);return y.jsx("div",{className:"text-github-text-primary text-sm leading-6",children:s.map((u,c)=>u.type==="text"?y.jsx("span",{className:"whitespace-pre-wrap",children:u.content},c):y.jsx("div",{className:"my-2 border border-github-border rounded-md overflow-hidden",children:y.jsxs("div",{className:"font-mono text-sm",children:[u.original&&y.jsx(Zb,{code:u.original,type:"delete",filename:l,keyPrefix:`orig-${c}`,syntaxTheme:i}),y.jsx(Zb,{code:u.code,type:"add",filename:l,keyPrefix:`sugg-${c}`,syntaxTheme:i})]})},c))})}const LE="text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all flex items-center gap-1";function g1({selectedCode:e,value:r,onChange:l,textareaRef:i,className:s=LE}){if(!e)return null;const u=()=>{const c=ak(e),f=i?.current;if(!f){l(`${r}${r?`
16
-
17
- `:""}${c}
18
-
19
- `);return}const h=f.selectionStart,p=f.selectionEnd,m=r.slice(0,h),b=r.slice(p),x=`${m?`
20
-
21
- `:""}${c}
22
-
23
- `,w=m+x+b;l(w);const S=m.length+x.length;requestAnimationFrame(()=>{f.focus(),f.setSelectionRange(S,S)})};return y.jsxs("button",{type:"button",onClick:u,className:s,title:"Add code suggestion",children:[y.jsx(g2,{size:12}),"Add suggestion"]})}function uh({comment:e,onGeneratePrompt:r,onRemoveComment:l,onUpdateComment:i,onClick:s,syntaxTheme:u}){const[c,f]=T.useState(!1),[h,p]=T.useState(!1),[m,b]=T.useState(e.body),[v,x]=T.useState("edit"),w=T.useRef(null),S=p1(m),C=S?v:"edit",E=async M=>{M.stopPropagation();try{const H=r(e);await navigator.clipboard.writeText(H),f(!0),setTimeout(()=>f(!1),2e3)}catch(H){console.error("Failed to copy prompt:",H)}},N=M=>{M.stopPropagation(),p(!0),x("edit"),b(e.body)},j=()=>{p(!1),x("edit"),b(e.body)},B=M=>{M?.stopPropagation(),m.trim()!==e.body&&i(e.id,m.trim()),p(!1),x("edit")},P=M=>{M.stopPropagation(),l(e.id)},L=M=>{M.key==="Enter"&&(M.metaKey||M.ctrlKey)?(M.preventDefault(),B()):M.key==="Escape"&&(M.preventDefault(),j())};return lt("escape",()=>{h&&j()},{enableOnFormTags:["textarea"],enabled:h},[h]),lt("mod+enter",()=>{h&&B()},{enableOnFormTags:["textarea"],enabled:h},[h,m,e.body]),y.jsxs("div",{id:`comment-${e.id}`,className:`p-3 bg-github-bg-tertiary border border-yellow-600/50 rounded-md border-l-4 border-l-yellow-400 shadow-sm transition-all ${s?"hover:shadow-md cursor-pointer":""}`,onClick:s,children:[y.jsxs("div",{className:"flex items-center justify-between mb-2 gap-3",children:[y.jsx("div",{className:"flex items-center gap-2 text-xs text-github-text-secondary flex-1 min-w-0",children:y.jsxs("span",{className:"font-mono px-1 py-0.5 rounded overflow-hidden text-ellipsis whitespace-nowrap",style:{backgroundColor:"var(--color-yellow-path-bg)",color:"var(--color-yellow-path-text)"},children:[e.file,":",Array.isArray(e.line)?`${e.line[0]}-${e.line[1]}`:e.line]})}),y.jsx("div",{className:"flex items-center gap-2",children:h?S?y.jsxs("div",{className:"flex items-center bg-github-bg-tertiary border border-github-border rounded p-0.5",onClick:M=>M.stopPropagation(),children:[y.jsx("button",{type:"button",onClick:()=>x("edit"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${C==="edit"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:"Edit"}),y.jsx("button",{type:"button",onClick:()=>x("preview"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${C==="preview"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:"Preview"})]}):y.jsx("div",{onClick:M=>M.stopPropagation(),children:y.jsx(g1,{selectedCode:e.codeContent,value:m,onChange:b,textareaRef:w})}):y.jsxs(y.Fragment,{children:[y.jsx("button",{onClick:E,className:"text-xs px-2 py-1 rounded transition-all whitespace-nowrap",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:M=>{M.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",M.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:M=>{M.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",M.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:"Copy prompt for AI coding agent",children:c?"Copied!":"Copy Prompt"}),y.jsx("button",{onClick:N,className:"text-xs p-1.5 bg-github-bg-tertiary text-github-text-secondary border border-github-border rounded hover:text-github-text-primary hover:bg-github-bg-primary transition-all",title:"Edit",children:y.jsx(G2,{size:12})}),y.jsx("button",{onClick:P,className:"text-xs p-1.5 bg-github-bg-tertiary text-green-600 border border-github-border rounded hover:bg-green-500/10 hover:border-green-600 transition-all",title:"Resolve",children:y.jsx(Pa,{size:12})})]})})]}),h?y.jsxs("div",{children:[S&&C==="preview"?y.jsx(wd,{body:m,originalCode:e.codeContent,filename:e.file,syntaxTheme:u}):y.jsx(y.Fragment,{children:y.jsx("textarea",{ref:w,value:m,onChange:M=>b(M.target.value),className:"w-full text-github-text-primary text-sm leading-6 bg-github-bg-secondary border border-github-border rounded px-2 py-1 resize-none focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600/30",rows:Math.max(2,m.split(`
24
- `).length),placeholder:"Edit your comment...",autoFocus:!0,onClick:M=>M.stopPropagation(),onKeyDown:M=>{M.stopPropagation(),L(M)}})}),y.jsxs("div",{className:"flex gap-2 justify-end mt-2",children:[y.jsx("button",{type:"button",onClick:j,className:"text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all",children:"Cancel"}),y.jsx("button",{type:"button",onClick:B,className:"text-xs px-3 py-1.5 rounded transition-all disabled:opacity-50",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:M=>{M.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",M.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:M=>{M.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",M.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},disabled:!m.trim(),children:"Submit"})]})]}):y.jsx(wd,{body:e.body,originalCode:e.codeContent,filename:e.file,syntaxTheme:u})]})}function DE({isOpen:e,onClose:r,onNavigate:l,comments:i,onRemoveComment:s,onGeneratePrompt:u,onUpdateComment:c,syntaxTheme:f}){const[h,p]=T.useState(0),m=T.useRef([]),{enableScope:b,disableScope:v}=Ya(),x=[...i].sort((E,N)=>{const j=E.file.localeCompare(N.file);if(j!==0)return j;const B=Array.isArray(E.line)?E.line[0]:E.line,P=Array.isArray(N.line)?N.line[0]:N.line;return B-P}),w=T.useCallback(E=>{l(E),r()},[l,r]),S=T.useCallback(E=>{confirm(`Delete this comment?
25
-
26
- "${E.body}"`)&&(s(E.id),h>=x.length-1&&h>0&&p(h-1))},[s,h,x.length]);T.useEffect(()=>(e?(b("comments-list"),v("navigation")):(b("navigation"),v("comments-list"),p(0)),()=>{b("navigation"),v("comments-list")}),[e,b,v]);const C={scopes:"comments-list",enableOnFormTags:!1};return lt("escape",()=>r(),C,[r]),lt("j, down",()=>p(E=>Math.min(E+1,x.length-1)),C,[x.length]),lt("k, up",()=>p(E=>Math.max(E-1,0)),C,[]),lt("enter",()=>{x[h]&&w(x[h])},C,[h,x,w]),lt("d",()=>{x[h]&&S(x[h])},C,[h,x,S]),T.useEffect(()=>{m.current[h]&&m.current[h]?.scrollIntoView({behavior:"smooth",block:"nearest"})},[h]),e?y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:r}),y.jsxs("div",{className:"relative bg-github-bg-primary border border-github-border rounded-lg shadow-lg max-w-4xl w-full max-h-[80vh] overflow-hidden",children:[y.jsxs("div",{className:"sticky top-0 bg-github-bg-primary border-b border-github-border px-6 py-4",children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"All Comments"}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary transition-colors","aria-label":"Close comments list",children:y.jsx(ru,{size:20})})]}),y.jsxs("div",{className:"text-xs text-github-text-secondary",children:[y.jsx("span",{className:"font-mono",children:"j/k"})," or ",y.jsx("span",{className:"font-mono",children:"↑/↓"})," to navigate • ",y.jsx("span",{className:"font-mono",children:"Enter"})," to jump •"," ",y.jsx("span",{className:"font-mono",children:"d"})," to delete • ",y.jsx("span",{className:"font-mono",children:"Esc"})," ","to close"]})]}),y.jsx("div",{className:"overflow-y-auto max-h-[calc(80vh-120px)]",children:y.jsx("div",{className:"p-6",children:x.length===0?y.jsx("p",{className:"text-github-text-secondary text-center",children:"No comments yet"}):y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"space-y-2",children:x.map((E,N)=>y.jsx("div",{ref:j=>{m.current[N]=j},className:`${h===N?"ring-2 ring-blue-500 rounded":""}`,children:y.jsx(uh,{comment:E,onGeneratePrompt:u,onRemoveComment:s,onUpdateComment:c,syntaxTheme:f,onClick:j=>{j.stopPropagation(),p(N),w(E)}})},E.id))}),x.length>0&&y.jsxs("div",{className:"mt-4 pt-4 border-t border-github-border text-xs text-github-text-secondary text-center",children:[h+1," of ",x.length," comments"]})]})})})]})]}):null}function au(){return typeof window<"u"}function ol(e){return ch(e)?(e.nodeName||"").toLowerCase():"#document"}function un(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function Wn(e){var r;return(r=(ch(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function ch(e){return au()?e instanceof Node||e instanceof un(e).Node:!1}function ct(e){return au()?e instanceof Element||e instanceof un(e).Element:!1}function Nt(e){return au()?e instanceof HTMLElement||e instanceof un(e).HTMLElement:!1}function Os(e){return!au()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof un(e).ShadowRoot}const OE=new Set(["inline","contents"]);function Qa(e){const{overflow:r,overflowX:l,overflowY:i,display:s}=Bn(e);return/auto|scroll|overlay|hidden|clip/.test(r+i+l)&&!OE.has(s)}const ME=new Set(["table","td","th"]);function zE(e){return ME.has(ol(e))}const BE=[":popover-open",":modal"];function ou(e){return BE.some(r=>{try{return e.matches(r)}catch{return!1}})}const FE=["transform","translate","scale","rotate","perspective"],IE=["transform","translate","scale","rotate","perspective","filter"],UE=["paint","layout","strict","content"];function fh(e){const r=su(),l=ct(e)?Bn(e):e;return FE.some(i=>l[i]?l[i]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!r&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!r&&(l.filter?l.filter!=="none":!1)||IE.some(i=>(l.willChange||"").includes(i))||UE.some(i=>(l.contain||"").includes(i))}function HE(e){let r=Cr(e);for(;Nt(r)&&!Er(r);){if(fh(r))return r;if(ou(r))return null;r=Cr(r)}return null}function su(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const PE=new Set(["html","body","#document"]);function Er(e){return PE.has(ol(e))}function Bn(e){return un(e).getComputedStyle(e)}function uu(e){return ct(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Cr(e){if(ol(e)==="html")return e;const r=e.assignedSlot||e.parentNode||Os(e)&&e.host||Wn(e);return Os(r)?r.host:r}function m1(e){const r=Cr(e);return Er(r)?e.ownerDocument?e.ownerDocument.body:e.body:Nt(r)&&Qa(r)?r:m1(r)}function al(e,r,l){var i;r===void 0&&(r=[]),l===void 0&&(l=!0);const s=m1(e),u=s===((i=e.ownerDocument)==null?void 0:i.body),c=un(s);if(u){const f=Sd(c);return r.concat(c,c.visualViewport||[],Qa(s)?s:[],f&&l?al(f):[])}return r.concat(s,al(s,[],l))}function Sd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ms=Math.min,Rl=Math.max,zs=Math.round,vs=Math.floor,Jn=e=>({x:e,y:e}),qE={left:"right",right:"left",bottom:"top",top:"bottom"},$E={start:"end",end:"start"};function Qb(e,r,l){return Rl(e,Ms(r,l))}function cu(e,r){return typeof e=="function"?e(r):e}function _l(e){return e.split("-")[0]}function fu(e){return e.split("-")[1]}function b1(e){return e==="x"?"y":"x"}function y1(e){return e==="y"?"height":"width"}const VE=new Set(["top","bottom"]);function rl(e){return VE.has(_l(e))?"y":"x"}function x1(e){return b1(rl(e))}function GE(e,r,l){l===void 0&&(l=!1);const i=fu(e),s=x1(e),u=y1(s);let c=s==="x"?i===(l?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[u]>r.floating[u]&&(c=Bs(c)),[c,Bs(c)]}function YE(e){const r=Bs(e);return[kd(e),r,kd(r)]}function kd(e){return e.replace(/start|end/g,r=>$E[r])}const Kb=["left","right"],Jb=["right","left"],XE=["top","bottom"],ZE=["bottom","top"];function QE(e,r,l){switch(e){case"top":case"bottom":return l?r?Jb:Kb:r?Kb:Jb;case"left":case"right":return r?XE:ZE;default:return[]}}function KE(e,r,l,i){const s=fu(e);let u=QE(_l(e),l==="start",i);return s&&(u=u.map(c=>c+"-"+s),r&&(u=u.concat(u.map(kd)))),u}function Bs(e){return e.replace(/left|right|bottom|top/g,r=>qE[r])}function JE(e){return{top:0,right:0,bottom:0,left:0,...e}}function WE(e){return typeof e!="number"?JE(e):{top:e,right:e,bottom:e,left:e}}function Fs(e){const{x:r,y:l,width:i,height:s}=e;return{width:i,height:s,top:l,left:r,right:r+i,bottom:l+s,x:r,y:l}}var eC=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Is=eC.join(","),v1=typeof Element>"u",_i=v1?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Us=!v1&&Element.prototype.getRootNode?function(e){var r;return e==null||(r=e.getRootNode)===null||r===void 0?void 0:r.call(e)}:function(e){return e?.ownerDocument},Hs=function(r,l){var i;l===void 0&&(l=!0);var s=r==null||(i=r.getAttribute)===null||i===void 0?void 0:i.call(r,"inert"),u=s===""||s==="true",c=u||l&&r&&(typeof r.closest=="function"?r.closest("[inert]"):Hs(r.parentNode));return c},tC=function(r){var l,i=r==null||(l=r.getAttribute)===null||l===void 0?void 0:l.call(r,"contenteditable");return i===""||i==="true"},w1=function(r,l,i){if(Hs(r))return[];var s=Array.prototype.slice.apply(r.querySelectorAll(Is));return l&&_i.call(r,Is)&&s.unshift(r),s=s.filter(i),s},Ps=function(r,l,i){for(var s=[],u=Array.from(r);u.length;){var c=u.shift();if(!Hs(c,!1))if(c.tagName==="SLOT"){var f=c.assignedElements(),h=f.length?f:c.children,p=Ps(h,!0,i);i.flatten?s.push.apply(s,p):s.push({scopeParent:c,candidates:p})}else{var m=_i.call(c,Is);m&&i.filter(c)&&(l||!r.includes(c))&&s.push(c);var b=c.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(c),v=!Hs(b,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(c));if(b&&v){var x=Ps(b===!0?c.children:b.children,!0,i);i.flatten?s.push.apply(s,x):s.push({scopeParent:c,candidates:x})}else u.unshift.apply(u,c.children)}}return s},S1=function(r){return!isNaN(parseInt(r.getAttribute("tabindex"),10))},k1=function(r){if(!r)throw new Error("No node provided");return r.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(r.tagName)||tC(r))&&!S1(r)?0:r.tabIndex},nC=function(r,l){var i=k1(r);return i<0&&l&&!S1(r)?0:i},rC=function(r,l){return r.tabIndex===l.tabIndex?r.documentOrder-l.documentOrder:r.tabIndex-l.tabIndex},E1=function(r){return r.tagName==="INPUT"},lC=function(r){return E1(r)&&r.type==="hidden"},iC=function(r){var l=r.tagName==="DETAILS"&&Array.prototype.slice.apply(r.children).some(function(i){return i.tagName==="SUMMARY"});return l},aC=function(r,l){for(var i=0;i<r.length;i++)if(r[i].checked&&r[i].form===l)return r[i]},oC=function(r){if(!r.name)return!0;var l=r.form||Us(r),i=function(f){return l.querySelectorAll('input[type="radio"][name="'+f+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=i(window.CSS.escape(r.name));else try{s=i(r.name)}catch(c){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",c.message),!1}var u=aC(s,r.form);return!u||u===r},sC=function(r){return E1(r)&&r.type==="radio"},uC=function(r){return sC(r)&&!oC(r)},cC=function(r){var l,i=r&&Us(r),s=(l=i)===null||l===void 0?void 0:l.host,u=!1;if(i&&i!==r){var c,f,h;for(u=!!((c=s)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(s)||r!=null&&(h=r.ownerDocument)!==null&&h!==void 0&&h.contains(r));!u&&s;){var p,m,b;i=Us(s),s=(p=i)===null||p===void 0?void 0:p.host,u=!!((m=s)!==null&&m!==void 0&&(b=m.ownerDocument)!==null&&b!==void 0&&b.contains(s))}}return u},Wb=function(r){var l=r.getBoundingClientRect(),i=l.width,s=l.height;return i===0&&s===0},fC=function(r,l){var i=l.displayCheck,s=l.getShadowRoot;if(i==="full-native"&&"checkVisibility"in r){var u=r.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!u}if(getComputedStyle(r).visibility==="hidden")return!0;var c=_i.call(r,"details>summary:first-of-type"),f=c?r.parentElement:r;if(_i.call(f,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="full-native"||i==="legacy-full"){if(typeof s=="function"){for(var h=r;r;){var p=r.parentElement,m=Us(r);if(p&&!p.shadowRoot&&s(p)===!0)return Wb(r);r.assignedSlot?r=r.assignedSlot:!p&&m!==r.ownerDocument?r=m.host:r=p}r=h}if(cC(r))return!r.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return Wb(r);return!1},dC=function(r){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(r.tagName))for(var l=r.parentElement;l;){if(l.tagName==="FIELDSET"&&l.disabled){for(var i=0;i<l.children.length;i++){var s=l.children.item(i);if(s.tagName==="LEGEND")return _i.call(l,"fieldset[disabled] *")?!0:!s.contains(r)}return!0}l=l.parentElement}return!1},Ed=function(r,l){return!(l.disabled||lC(l)||fC(l,r)||iC(l)||dC(l))},Cd=function(r,l){return!(uC(l)||k1(l)<0||!Ed(r,l))},hC=function(r){var l=parseInt(r.getAttribute("tabindex"),10);return!!(isNaN(l)||l>=0)},C1=function(r){var l=[],i=[];return r.forEach(function(s,u){var c=!!s.scopeParent,f=c?s.scopeParent:s,h=nC(f,c),p=c?C1(s.candidates):f;h===0?c?l.push.apply(l,p):l.push(f):i.push({documentOrder:u,tabIndex:h,item:s,isScope:c,content:p})}),i.sort(rC).reduce(function(s,u){return u.isScope?s.push.apply(s,u.content):s.push(u.content),s},[]).concat(l)},du=function(r,l){l=l||{};var i;return l.getShadowRoot?i=Ps([r],l.includeContainer,{filter:Cd.bind(null,l),flatten:!1,getShadowRoot:l.getShadowRoot,shadowRootFilter:hC}):i=w1(r,l.includeContainer,Cd.bind(null,l)),C1(i)},pC=function(r,l){l=l||{};var i;return l.getShadowRoot?i=Ps([r],l.includeContainer,{filter:Ed.bind(null,l),flatten:!0,getShadowRoot:l.getShadowRoot}):i=w1(r,l.includeContainer,Ed.bind(null,l)),i},N1=function(r,l){if(l=l||{},!r)throw new Error("No node provided");return _i.call(r,Is)===!1?!1:Cd(l,r)};function A1(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function T1(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(r=>{let{brand:l,version:i}=r;return l+"/"+i}).join(" "):navigator.userAgent}function j1(){return/apple/i.test(navigator.vendor)}function Nd(){const e=/android/i;return e.test(A1())||e.test(T1())}function gC(){return A1().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function R1(){return T1().includes("jsdom/")}const ey="data-floating-ui-focusable",mC="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function nl(e){let r=e.activeElement;for(;((l=r)==null||(l=l.shadowRoot)==null?void 0:l.activeElement)!=null;){var l;r=r.shadowRoot.activeElement}return r}function qt(e,r){if(!e||!r)return!1;const l=r.getRootNode==null?void 0:r.getRootNode();if(e.contains(r))return!0;if(l&&Os(l)){let i=r;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Sr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Bf(e,r){if(r==null)return!1;if("composedPath"in e)return e.composedPath().includes(r);const l=e;return l.target!=null&&r.contains(l.target)}function bC(e){return e.matches("html,body")}function $t(e){return e?.ownerDocument||document}function dh(e){return Nt(e)&&e.matches(mC)}function ty(e){return e?e.getAttribute("role")==="combobox"&&dh(e):!1}function yC(e){if(!e||R1())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ad(e){return e?e.hasAttribute(ey)?e:e.querySelector("["+ey+"]")||e:null}function Ni(e,r,l){return l===void 0&&(l=!0),e.filter(s=>{var u;return s.parentId===r&&(!l||((u=s.context)==null?void 0:u.open))}).flatMap(s=>[s,...Ni(e,s.id,l)])}function ny(e,r){var l;let i=[],s=(l=e.find(u=>u.id===r))==null?void 0:l.parentId;for(;s;){const u=e.find(c=>c.id===s);s=u?.parentId,u&&(i=i.concat(u))}return i}function Ff(e){e.preventDefault(),e.stopPropagation()}function xC(e){return"nativeEvent"in e}function vC(e){return e.mozInputSource===0&&e.isTrusted?!0:Nd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function wC(e){return R1()?!1:!Nd()&&e.width===0&&e.height===0||Nd()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function $a(e,r){const l=["mouse","pen"];return r||l.push("",void 0),l.includes(e)}var SC=typeof document<"u",kC=function(){},sn=SC?T.useLayoutEffect:kC;const EC={...Fx};function jl(e){const r=T.useRef(e);return sn(()=>{r.current=e}),r}const CC=EC.useInsertionEffect,NC=CC||(e=>e());function on(e){const r=T.useRef(()=>{});return NC(()=>{r.current=e}),T.useCallback(function(){for(var l=arguments.length,i=new Array(l),s=0;s<l;s++)i[s]=arguments[s];return r.current==null?void 0:r.current(...i)},[])}const Ka=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function _1(e,r){const l=du(e,Ka()),i=l.length;if(i===0)return;const s=nl($t(e)),u=l.indexOf(s),c=u===-1?r===1?0:i-1:u+r;return l[c]}function L1(e){return _1($t(e).body,1)||e}function D1(e){return _1($t(e).body,-1)||e}function za(e,r){const l=r||e.currentTarget,i=e.relatedTarget;return!i||!qt(l,i)}function AC(e){du(e,Ka()).forEach(l=>{l.dataset.tabindex=l.getAttribute("tabindex")||"",l.setAttribute("tabindex","-1")})}function ry(e){e.querySelectorAll("[data-tabindex]").forEach(l=>{const i=l.dataset.tabindex;delete l.dataset.tabindex,i?l.setAttribute("tabindex",i):l.removeAttribute("tabindex")})}var O1=Ix();function ly(e,r,l){let{reference:i,floating:s}=e;const u=rl(r),c=x1(r),f=y1(c),h=_l(r),p=u==="y",m=i.x+i.width/2-s.width/2,b=i.y+i.height/2-s.height/2,v=i[f]/2-s[f]/2;let x;switch(h){case"top":x={x:m,y:i.y-s.height};break;case"bottom":x={x:m,y:i.y+i.height};break;case"right":x={x:i.x+i.width,y:b};break;case"left":x={x:i.x-s.width,y:b};break;default:x={x:i.x,y:i.y}}switch(fu(r)){case"start":x[c]-=v*(l&&p?-1:1);break;case"end":x[c]+=v*(l&&p?-1:1);break}return x}async function TC(e,r){var l;r===void 0&&(r={});const{x:i,y:s,platform:u,rects:c,elements:f,strategy:h}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:b="floating",altBoundary:v=!1,padding:x=0}=cu(r,e),w=WE(x),C=f[v?b==="floating"?"reference":"floating":b],E=Fs(await u.getClippingRect({element:(l=await(u.isElement==null?void 0:u.isElement(C)))==null||l?C:C.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(f.floating)),boundary:p,rootBoundary:m,strategy:h})),N=b==="floating"?{x:i,y:s,width:c.floating.width,height:c.floating.height}:c.reference,j=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f.floating)),B=await(u.isElement==null?void 0:u.isElement(j))?await(u.getScale==null?void 0:u.getScale(j))||{x:1,y:1}:{x:1,y:1},P=Fs(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:N,offsetParent:j,strategy:h}):N);return{top:(E.top-P.top+w.top)/B.y,bottom:(P.bottom-E.bottom+w.bottom)/B.y,left:(E.left-P.left+w.left)/B.x,right:(P.right-E.right+w.right)/B.x}}const jC=async(e,r,l)=>{const{placement:i="bottom",strategy:s="absolute",middleware:u=[],platform:c}=l,f=u.filter(Boolean),h=await(c.isRTL==null?void 0:c.isRTL(r));let p=await c.getElementRects({reference:e,floating:r,strategy:s}),{x:m,y:b}=ly(p,i,h),v=i,x={},w=0;for(let C=0;C<f.length;C++){var S;const{name:E,fn:N}=f[C],{x:j,y:B,data:P,reset:L}=await N({x:m,y:b,initialPlacement:i,placement:v,strategy:s,middlewareData:x,rects:p,platform:{...c,detectOverflow:(S=c.detectOverflow)!=null?S:TC},elements:{reference:e,floating:r}});m=j??m,b=B??b,x={...x,[E]:{...x[E],...P}},L&&w<=50&&(w++,typeof L=="object"&&(L.placement&&(v=L.placement),L.rects&&(p=L.rects===!0?await c.getElementRects({reference:e,floating:r,strategy:s}):L.rects),{x:m,y:b}=ly(p,v,h)),C=-1)}return{x:m,y:b,placement:v,strategy:s,middlewareData:x}},RC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var l,i;const{placement:s,middlewareData:u,rects:c,initialPlacement:f,platform:h,elements:p}=r,{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:v,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...C}=cu(e,r);if((l=u.arrow)!=null&&l.alignmentOffset)return{};const E=_l(s),N=rl(f),j=_l(f)===f,B=await(h.isRTL==null?void 0:h.isRTL(p.floating)),P=v||(j||!S?[Bs(f)]:YE(f)),L=w!=="none";!v&&L&&P.push(...KE(f,S,w,B));const M=[f,...P],H=await h.detectOverflow(r,C),G=[];let z=((i=u.flip)==null?void 0:i.overflows)||[];if(m&&G.push(H[E]),b){const I=GE(s,c,B);G.push(H[I[0]],H[I[1]])}if(z=[...z,{placement:s,overflows:G}],!G.every(I=>I<=0)){var V,Y;const I=(((V=u.flip)==null?void 0:V.index)||0)+1,X=M[I];if(X&&(!(b==="alignment"?N!==rl(X):!1)||z.every(O=>rl(O.placement)===N?O.overflows[0]>0:!0)))return{data:{index:I,overflows:z},reset:{placement:X}};let F=(Y=z.filter(Z=>Z.overflows[0]<=0).sort((Z,O)=>Z.overflows[1]-O.overflows[1])[0])==null?void 0:Y.placement;if(!F)switch(x){case"bestFit":{var J;const Z=(J=z.filter(O=>{if(L){const $=rl(O.placement);return $===N||$==="y"}return!0}).map(O=>[O.placement,O.overflows.filter($=>$>0).reduce(($,R)=>$+R,0)]).sort((O,$)=>O[1]-$[1])[0])==null?void 0:J[0];Z&&(F=Z);break}case"initialPlacement":F=f;break}if(s!==F)return{reset:{placement:F}}}return{}}}},_C=new Set(["left","top"]);async function LC(e,r){const{placement:l,platform:i,elements:s}=e,u=await(i.isRTL==null?void 0:i.isRTL(s.floating)),c=_l(l),f=fu(l),h=rl(l)==="y",p=_C.has(c)?-1:1,m=u&&h?-1:1,b=cu(r,e);let{mainAxis:v,crossAxis:x,alignmentAxis:w}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return f&&typeof w=="number"&&(x=f==="end"?w*-1:w),h?{x:x*m,y:v*p}:{x:v*p,y:x*m}}const DC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var l,i;const{x:s,y:u,placement:c,middlewareData:f}=r,h=await LC(r,e);return c===((l=f.offset)==null?void 0:l.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:s+h.x,y:u+h.y,data:{...h,placement:c}}}}},OC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:l,y:i,placement:s,platform:u}=r,{mainAxis:c=!0,crossAxis:f=!1,limiter:h={fn:E=>{let{x:N,y:j}=E;return{x:N,y:j}}},...p}=cu(e,r),m={x:l,y:i},b=await u.detectOverflow(r,p),v=rl(_l(s)),x=b1(v);let w=m[x],S=m[v];if(c){const E=x==="y"?"top":"left",N=x==="y"?"bottom":"right",j=w+b[E],B=w-b[N];w=Qb(j,w,B)}if(f){const E=v==="y"?"top":"left",N=v==="y"?"bottom":"right",j=S+b[E],B=S-b[N];S=Qb(j,S,B)}const C=h.fn({...r,[x]:w,[v]:S});return{...C,data:{x:C.x-l,y:C.y-i,enabled:{[x]:c,[v]:f}}}}}};function M1(e){const r=Bn(e);let l=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const s=Nt(e),u=s?e.offsetWidth:l,c=s?e.offsetHeight:i,f=zs(l)!==u||zs(i)!==c;return f&&(l=u,i=c),{width:l,height:i,$:f}}function hh(e){return ct(e)?e:e.contextElement}function Ai(e){const r=hh(e);if(!Nt(r))return Jn(1);const l=r.getBoundingClientRect(),{width:i,height:s,$:u}=M1(r);let c=(u?zs(l.width):l.width)/i,f=(u?zs(l.height):l.height)/s;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const MC=Jn(0);function z1(e){const r=un(e);return!su()||!r.visualViewport?MC:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function zC(e,r,l){return r===void 0&&(r=!1),!l||r&&l!==un(e)?!1:r}function Ll(e,r,l,i){r===void 0&&(r=!1),l===void 0&&(l=!1);const s=e.getBoundingClientRect(),u=hh(e);let c=Jn(1);r&&(i?ct(i)&&(c=Ai(i)):c=Ai(e));const f=zC(u,l,i)?z1(u):Jn(0);let h=(s.left+f.x)/c.x,p=(s.top+f.y)/c.y,m=s.width/c.x,b=s.height/c.y;if(u){const v=un(u),x=i&&ct(i)?un(i):i;let w=v,S=Sd(w);for(;S&&i&&x!==w;){const C=Ai(S),E=S.getBoundingClientRect(),N=Bn(S),j=E.left+(S.clientLeft+parseFloat(N.paddingLeft))*C.x,B=E.top+(S.clientTop+parseFloat(N.paddingTop))*C.y;h*=C.x,p*=C.y,m*=C.x,b*=C.y,h+=j,p+=B,w=un(S),S=Sd(w)}}return Fs({width:m,height:b,x:h,y:p})}function hu(e,r){const l=uu(e).scrollLeft;return r?r.left+l:Ll(Wn(e)).left+l}function B1(e,r){const l=e.getBoundingClientRect(),i=l.left+r.scrollLeft-hu(e,l),s=l.top+r.scrollTop;return{x:i,y:s}}function BC(e){let{elements:r,rect:l,offsetParent:i,strategy:s}=e;const u=s==="fixed",c=Wn(i),f=r?ou(r.floating):!1;if(i===c||f&&u)return l;let h={scrollLeft:0,scrollTop:0},p=Jn(1);const m=Jn(0),b=Nt(i);if((b||!b&&!u)&&((ol(i)!=="body"||Qa(c))&&(h=uu(i)),Nt(i))){const x=Ll(i);p=Ai(i),m.x=x.x+i.clientLeft,m.y=x.y+i.clientTop}const v=c&&!b&&!u?B1(c,h):Jn(0);return{width:l.width*p.x,height:l.height*p.y,x:l.x*p.x-h.scrollLeft*p.x+m.x+v.x,y:l.y*p.y-h.scrollTop*p.y+m.y+v.y}}function FC(e){return Array.from(e.getClientRects())}function IC(e){const r=Wn(e),l=uu(e),i=e.ownerDocument.body,s=Rl(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),u=Rl(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight);let c=-l.scrollLeft+hu(e);const f=-l.scrollTop;return Bn(i).direction==="rtl"&&(c+=Rl(r.clientWidth,i.clientWidth)-s),{width:s,height:u,x:c,y:f}}const iy=25;function UC(e,r){const l=un(e),i=Wn(e),s=l.visualViewport;let u=i.clientWidth,c=i.clientHeight,f=0,h=0;if(s){u=s.width,c=s.height;const m=su();(!m||m&&r==="fixed")&&(f=s.offsetLeft,h=s.offsetTop)}const p=hu(i);if(p<=0){const m=i.ownerDocument,b=m.body,v=getComputedStyle(b),x=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,w=Math.abs(i.clientWidth-b.clientWidth-x);w<=iy&&(u-=w)}else p<=iy&&(u+=p);return{width:u,height:c,x:f,y:h}}const HC=new Set(["absolute","fixed"]);function PC(e,r){const l=Ll(e,!0,r==="fixed"),i=l.top+e.clientTop,s=l.left+e.clientLeft,u=Nt(e)?Ai(e):Jn(1),c=e.clientWidth*u.x,f=e.clientHeight*u.y,h=s*u.x,p=i*u.y;return{width:c,height:f,x:h,y:p}}function ay(e,r,l){let i;if(r==="viewport")i=UC(e,l);else if(r==="document")i=IC(Wn(e));else if(ct(r))i=PC(r,l);else{const s=z1(e);i={x:r.x-s.x,y:r.y-s.y,width:r.width,height:r.height}}return Fs(i)}function F1(e,r){const l=Cr(e);return l===r||!ct(l)||Er(l)?!1:Bn(l).position==="fixed"||F1(l,r)}function qC(e,r){const l=r.get(e);if(l)return l;let i=al(e,[],!1).filter(f=>ct(f)&&ol(f)!=="body"),s=null;const u=Bn(e).position==="fixed";let c=u?Cr(e):e;for(;ct(c)&&!Er(c);){const f=Bn(c),h=fh(c);!h&&f.position==="fixed"&&(s=null),(u?!h&&!s:!h&&f.position==="static"&&!!s&&HC.has(s.position)||Qa(c)&&!h&&F1(e,c))?i=i.filter(m=>m!==c):s=f,c=Cr(c)}return r.set(e,i),i}function $C(e){let{element:r,boundary:l,rootBoundary:i,strategy:s}=e;const c=[...l==="clippingAncestors"?ou(r)?[]:qC(r,this._c):[].concat(l),i],f=c[0],h=c.reduce((p,m)=>{const b=ay(r,m,s);return p.top=Rl(b.top,p.top),p.right=Ms(b.right,p.right),p.bottom=Ms(b.bottom,p.bottom),p.left=Rl(b.left,p.left),p},ay(r,f,s));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function VC(e){const{width:r,height:l}=M1(e);return{width:r,height:l}}function GC(e,r,l){const i=Nt(r),s=Wn(r),u=l==="fixed",c=Ll(e,!0,u,r);let f={scrollLeft:0,scrollTop:0};const h=Jn(0);function p(){h.x=hu(s)}if(i||!i&&!u)if((ol(r)!=="body"||Qa(s))&&(f=uu(r)),i){const x=Ll(r,!0,u,r);h.x=x.x+r.clientLeft,h.y=x.y+r.clientTop}else s&&p();u&&!i&&s&&p();const m=s&&!i&&!u?B1(s,f):Jn(0),b=c.left+f.scrollLeft-h.x-m.x,v=c.top+f.scrollTop-h.y-m.y;return{x:b,y:v,width:c.width,height:c.height}}function If(e){return Bn(e).position==="static"}function oy(e,r){if(!Nt(e)||Bn(e).position==="fixed")return null;if(r)return r(e);let l=e.offsetParent;return Wn(e)===l&&(l=l.ownerDocument.body),l}function I1(e,r){const l=un(e);if(ou(e))return l;if(!Nt(e)){let s=Cr(e);for(;s&&!Er(s);){if(ct(s)&&!If(s))return s;s=Cr(s)}return l}let i=oy(e,r);for(;i&&zE(i)&&If(i);)i=oy(i,r);return i&&Er(i)&&If(i)&&!fh(i)?l:i||HE(e)||l}const YC=async function(e){const r=this.getOffsetParent||I1,l=this.getDimensions,i=await l(e.floating);return{reference:GC(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function XC(e){return Bn(e).direction==="rtl"}const ZC={convertOffsetParentRelativeRectToViewportRelativeRect:BC,getDocumentElement:Wn,getClippingRect:$C,getOffsetParent:I1,getElementRects:YC,getClientRects:FC,getDimensions:VC,getScale:Ai,isElement:ct,isRTL:XC};function U1(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function QC(e,r){let l=null,i;const s=Wn(e);function u(){var f;clearTimeout(i),(f=l)==null||f.disconnect(),l=null}function c(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),u();const p=e.getBoundingClientRect(),{left:m,top:b,width:v,height:x}=p;if(f||r(),!v||!x)return;const w=vs(b),S=vs(s.clientWidth-(m+v)),C=vs(s.clientHeight-(b+x)),E=vs(m),j={rootMargin:-w+"px "+-S+"px "+-C+"px "+-E+"px",threshold:Rl(0,Ms(1,h))||1};let B=!0;function P(L){const M=L[0].intersectionRatio;if(M!==h){if(!B)return c();M?c(!1,M):i=setTimeout(()=>{c(!1,1e-7)},1e3)}M===1&&!U1(p,e.getBoundingClientRect())&&c(),B=!1}try{l=new IntersectionObserver(P,{...j,root:s.ownerDocument})}catch{l=new IntersectionObserver(P,j)}l.observe(e)}return c(!0),u}function Td(e,r,l,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,p=hh(e),m=s||u?[...p?al(p):[],...al(r)]:[];m.forEach(E=>{s&&E.addEventListener("scroll",l,{passive:!0}),u&&E.addEventListener("resize",l)});const b=p&&f?QC(p,l):null;let v=-1,x=null;c&&(x=new ResizeObserver(E=>{let[N]=E;N&&N.target===p&&x&&(x.unobserve(r),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var j;(j=x)==null||j.observe(r)})),l()}),p&&!h&&x.observe(p),x.observe(r));let w,S=h?Ll(e):null;h&&C();function C(){const E=Ll(e);S&&!U1(S,E)&&l(),S=E,w=requestAnimationFrame(C)}return l(),()=>{var E;m.forEach(N=>{s&&N.removeEventListener("scroll",l),u&&N.removeEventListener("resize",l)}),b?.(),(E=x)==null||E.disconnect(),x=null,h&&cancelAnimationFrame(w)}}const KC=DC,JC=OC,WC=RC,e3=(e,r,l)=>{const i=new Map,s={platform:ZC,...l},u={...s.platform,_c:i};return jC(e,r,{...s,platform:u})};var t3=typeof document<"u",n3=function(){},Rs=t3?T.useLayoutEffect:n3;function qs(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let l,i,s;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(l=e.length,l!==r.length)return!1;for(i=l;i--!==0;)if(!qs(e[i],r[i]))return!1;return!0}if(s=Object.keys(e),l=s.length,l!==Object.keys(r).length)return!1;for(i=l;i--!==0;)if(!{}.hasOwnProperty.call(r,s[i]))return!1;for(i=l;i--!==0;){const u=s[i];if(!(u==="_owner"&&e.$$typeof)&&!qs(e[u],r[u]))return!1}return!0}return e!==e&&r!==r}function H1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sy(e,r){const l=H1(e);return Math.round(r*l)/l}function Uf(e){const r=T.useRef(e);return Rs(()=>{r.current=e}),r}function r3(e){e===void 0&&(e={});const{placement:r="bottom",strategy:l="absolute",middleware:i=[],platform:s,elements:{reference:u,floating:c}={},transform:f=!0,whileElementsMounted:h,open:p}=e,[m,b]=T.useState({x:0,y:0,strategy:l,placement:r,middlewareData:{},isPositioned:!1}),[v,x]=T.useState(i);qs(v,i)||x(i);const[w,S]=T.useState(null),[C,E]=T.useState(null),N=T.useCallback(O=>{O!==L.current&&(L.current=O,S(O))},[]),j=T.useCallback(O=>{O!==M.current&&(M.current=O,E(O))},[]),B=u||w,P=c||C,L=T.useRef(null),M=T.useRef(null),H=T.useRef(m),G=h!=null,z=Uf(h),V=Uf(s),Y=Uf(p),J=T.useCallback(()=>{if(!L.current||!M.current)return;const O={placement:r,strategy:l,middleware:v};V.current&&(O.platform=V.current),e3(L.current,M.current,O).then($=>{const R={...$,isPositioned:Y.current!==!1};I.current&&!qs(H.current,R)&&(H.current=R,O1.flushSync(()=>{b(R)}))})},[v,r,l,V,Y]);Rs(()=>{p===!1&&H.current.isPositioned&&(H.current.isPositioned=!1,b(O=>({...O,isPositioned:!1})))},[p]);const I=T.useRef(!1);Rs(()=>(I.current=!0,()=>{I.current=!1}),[]),Rs(()=>{if(B&&(L.current=B),P&&(M.current=P),B&&P){if(z.current)return z.current(B,P,J);J()}},[B,P,J,z,G]);const X=T.useMemo(()=>({reference:L,floating:M,setReference:N,setFloating:j}),[N,j]),F=T.useMemo(()=>({reference:B,floating:P}),[B,P]),Z=T.useMemo(()=>{const O={position:l,left:0,top:0};if(!F.floating)return O;const $=sy(F.floating,m.x),R=sy(F.floating,m.y);return f?{...O,transform:"translate("+$+"px, "+R+"px)",...H1(F.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:$,top:R}},[l,f,F.floating,m.x,m.y]);return T.useMemo(()=>({...m,update:J,refs:X,elements:F,floatingStyles:Z}),[m,J,X,F,Z])}const jd=(e,r)=>({...KC(e),options:[e,r]}),Rd=(e,r)=>({...JC(e),options:[e,r]}),_d=(e,r)=>({...WC(e),options:[e,r]}),l3="data-floating-ui-focusable",uy="active",cy="selected",i3={...Fx};let fy=!1,a3=0;const dy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+a3++;function o3(){const[e,r]=T.useState(()=>fy?dy():void 0);return sn(()=>{e==null&&r(dy())},[]),T.useEffect(()=>{fy=!0},[]),e}const s3=i3.useId,ph=s3||o3;function u3(){const e=new Map;return{emit(r,l){var i;(i=e.get(r))==null||i.forEach(s=>s(l))},on(r,l){e.has(r)||e.set(r,new Set),e.get(r).add(l)},off(r,l){var i;(i=e.get(r))==null||i.delete(l)}}}const c3=T.createContext(null),f3=T.createContext(null),gh=()=>{var e;return((e=T.useContext(c3))==null?void 0:e.id)||null},pu=()=>T.useContext(f3);function Dl(e){return"data-floating-ui-"+e}function Qt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const hy=Dl("safe-polygon");function Hf(e,r,l){if(l&&!$a(l))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const i=e();return typeof i=="number"?i:i?.[r]}return e?.[r]}function Pf(e){return typeof e=="function"?e():e}function Ld(e,r){r===void 0&&(r={});const{open:l,onOpenChange:i,dataRef:s,events:u,elements:c}=e,{enabled:f=!0,delay:h=0,handleClose:p=null,mouseOnly:m=!1,restMs:b=0,move:v=!0}=r,x=pu(),w=gh(),S=jl(p),C=jl(h),E=jl(l),N=jl(b),j=T.useRef(),B=T.useRef(-1),P=T.useRef(),L=T.useRef(-1),M=T.useRef(!0),H=T.useRef(!1),G=T.useRef(()=>{}),z=T.useRef(!1),V=on(()=>{var Z;const O=(Z=s.current.openEvent)==null?void 0:Z.type;return O?.includes("mouse")&&O!=="mousedown"});T.useEffect(()=>{if(!f)return;function Z(O){let{open:$}=O;$||(Qt(B),Qt(L),M.current=!0,z.current=!1)}return u.on("openchange",Z),()=>{u.off("openchange",Z)}},[f,u]),T.useEffect(()=>{if(!f||!S.current||!l)return;function Z($){V()&&i(!1,$,"hover")}const O=$t(c.floating).documentElement;return O.addEventListener("mouseleave",Z),()=>{O.removeEventListener("mouseleave",Z)}},[c.floating,l,i,f,S,V]);const Y=T.useCallback(function(Z,O,$){O===void 0&&(O=!0),$===void 0&&($="hover");const R=Hf(C.current,"close",j.current);R&&!P.current?(Qt(B),B.current=window.setTimeout(()=>i(!1,Z,$),R)):O&&(Qt(B),i(!1,Z,$))},[C,i]),J=on(()=>{G.current(),P.current=void 0}),I=on(()=>{if(H.current){const Z=$t(c.floating).body;Z.style.pointerEvents="",Z.removeAttribute(hy),H.current=!1}}),X=on(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);T.useEffect(()=>{if(!f)return;function Z(U){if(Qt(B),M.current=!1,m&&!$a(j.current)||Pf(N.current)>0&&!Hf(C.current,"open"))return;const A=Hf(C.current,"open",j.current);A?B.current=window.setTimeout(()=>{E.current||i(!0,U,"hover")},A):l||i(!0,U,"hover")}function O(U){if(X()){I();return}G.current();const A=$t(c.floating);if(Qt(L),z.current=!1,S.current&&s.current.floatingContext){l||Qt(B),P.current=S.current({...s.current.floatingContext,tree:x,x:U.clientX,y:U.clientY,onClose(){I(),J(),X()||Y(U,!0,"safe-polygon")}});const re=P.current;A.addEventListener("mousemove",re),G.current=()=>{A.removeEventListener("mousemove",re)};return}(j.current!=="touch"||!qt(c.floating,U.relatedTarget))&&Y(U)}function $(U){X()||s.current.floatingContext&&(S.current==null||S.current({...s.current.floatingContext,tree:x,x:U.clientX,y:U.clientY,onClose(){I(),J(),X()||Y(U)}})(U))}function R(){Qt(B)}function D(U){X()||Y(U,!1)}if(ct(c.domReference)){const U=c.domReference,A=c.floating;return l&&U.addEventListener("mouseleave",$),v&&U.addEventListener("mousemove",Z,{once:!0}),U.addEventListener("mouseenter",Z),U.addEventListener("mouseleave",O),A&&(A.addEventListener("mouseleave",$),A.addEventListener("mouseenter",R),A.addEventListener("mouseleave",D)),()=>{l&&U.removeEventListener("mouseleave",$),v&&U.removeEventListener("mousemove",Z),U.removeEventListener("mouseenter",Z),U.removeEventListener("mouseleave",O),A&&(A.removeEventListener("mouseleave",$),A.removeEventListener("mouseenter",R),A.removeEventListener("mouseleave",D))}}},[c,f,e,m,v,Y,J,I,i,l,E,x,C,S,s,X,N]),sn(()=>{var Z;if(f&&l&&(Z=S.current)!=null&&(Z=Z.__options)!=null&&Z.blockPointerEvents&&V()){H.current=!0;const $=c.floating;if(ct(c.domReference)&&$){var O;const R=$t(c.floating).body;R.setAttribute(hy,"");const D=c.domReference,U=x==null||(O=x.nodesRef.current.find(A=>A.id===w))==null||(O=O.context)==null?void 0:O.elements.floating;return U&&(U.style.pointerEvents=""),R.style.pointerEvents="none",D.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{R.style.pointerEvents="",D.style.pointerEvents="",$.style.pointerEvents=""}}}},[f,l,w,c,x,S,V]),sn(()=>{l||(j.current=void 0,z.current=!1,J(),I())},[l,J,I]),T.useEffect(()=>()=>{J(),Qt(B),Qt(L),I()},[f,c.domReference,J,I]);const F=T.useMemo(()=>{function Z(O){j.current=O.pointerType}return{onPointerDown:Z,onPointerEnter:Z,onMouseMove(O){const{nativeEvent:$}=O;function R(){!M.current&&!E.current&&i(!0,$,"hover")}m&&!$a(j.current)||l||Pf(N.current)===0||z.current&&O.movementX**2+O.movementY**2<2||(Qt(L),j.current==="touch"?R():(z.current=!0,L.current=window.setTimeout(R,Pf(N.current))))}}},[m,i,l,E,N]);return T.useMemo(()=>f?{reference:F}:{},[f,F])}let py=0;function vi(e,r){r===void 0&&(r={});const{preventScroll:l=!1,cancelPrevious:i=!0,sync:s=!1}=r;i&&cancelAnimationFrame(py);const u=()=>e?.focus({preventScroll:l});s?u():py=requestAnimationFrame(u)}function qf(e,r){if(!e||!r)return!1;const l=r.getRootNode==null?void 0:r.getRootNode();if(e.contains(r))return!0;if(l&&Os(l)){let i=r;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function d3(e){return"composedPath"in e?e.composedPath()[0]:e.target}function h3(e){return e?.ownerDocument||document}const Ti={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function gy(e){return e==="inert"?Ti.inert:e==="aria-hidden"?Ti["aria-hidden"]:Ti.none}let ws=new WeakSet,Ss={},$f=0;const p3=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,P1=e=>e&&(e.host||P1(e.parentNode)),g3=(e,r)=>r.map(l=>{if(e.contains(l))return l;const i=P1(l);return e.contains(i)?i:null}).filter(l=>l!=null);function m3(e,r,l,i){const s="data-floating-ui-inert",u=i?"inert":l?"aria-hidden":null,c=g3(r,e),f=new Set,h=new Set(c),p=[];Ss[s]||(Ss[s]=new WeakMap);const m=Ss[s];c.forEach(b),v(r),f.clear();function b(x){!x||f.has(x)||(f.add(x),x.parentNode&&b(x.parentNode))}function v(x){!x||h.has(x)||[].forEach.call(x.children,w=>{if(ol(w)!=="script")if(f.has(w))v(w);else{const S=u?w.getAttribute(u):null,C=S!==null&&S!=="false",E=gy(u),N=(E.get(w)||0)+1,j=(m.get(w)||0)+1;E.set(w,N),m.set(w,j),p.push(w),N===1&&C&&ws.add(w),j===1&&w.setAttribute(s,""),!C&&u&&w.setAttribute(u,u==="inert"?"":"true")}})}return $f++,()=>{p.forEach(x=>{const w=gy(u),C=(w.get(x)||0)-1,E=(m.get(x)||0)-1;w.set(x,C),m.set(x,E),C||(!ws.has(x)&&u&&x.removeAttribute(u),ws.delete(x)),E||x.removeAttribute(s)}),$f--,$f||(Ti.inert=new WeakMap,Ti["aria-hidden"]=new WeakMap,Ti.none=new WeakMap,ws=new WeakSet,Ss={})}}function my(e,r,l){r===void 0&&(r=!1),l===void 0&&(l=!1);const i=h3(e[0]).body;return m3(e.concat(Array.from(i.querySelectorAll('[aria-live],[role="status"],output'))),i,r,l)}const mh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},$s=T.forwardRef(function(r,l){const[i,s]=T.useState();sn(()=>{j1()&&s("button")},[]);const u={ref:l,tabIndex:0,role:i,"aria-hidden":i?void 0:!0,[Dl("focus-guard")]:"",style:mh};return y.jsx("span",{...r,...u})}),b3={clipPath:"inset(50%)",position:"fixed",top:0,left:0},q1=T.createContext(null),by=Dl("portal");function y3(e){e===void 0&&(e={});const{id:r,root:l}=e,i=ph(),s=$1(),[u,c]=T.useState(null),f=T.useRef(null);return sn(()=>()=>{u?.remove(),queueMicrotask(()=>{f.current=null})},[u]),sn(()=>{if(!i||f.current)return;const h=r?document.getElementById(r):null;if(!h)return;const p=document.createElement("div");p.id=i,p.setAttribute(by,""),h.appendChild(p),f.current=p,c(p)},[r,i]),sn(()=>{if(l===null||!i||f.current)return;let h=l||s?.portalNode;h&&!ch(h)&&(h=h.current),h=h||document.body;let p=null;r&&(p=document.createElement("div"),p.id=r,h.appendChild(p));const m=document.createElement("div");m.id=i,m.setAttribute(by,""),h=p||h,h.appendChild(m),f.current=m,c(m)},[r,l,i,s]),u}function Dd(e){const{children:r,id:l,root:i,preserveTabOrder:s=!0}=e,u=y3({id:l,root:i}),[c,f]=T.useState(null),h=T.useRef(null),p=T.useRef(null),m=T.useRef(null),b=T.useRef(null),v=c?.modal,x=c?.open,w=!!c&&!c.modal&&c.open&&s&&!!(i||u);return T.useEffect(()=>{if(!u||!s||v)return;function S(C){u&&za(C)&&(C.type==="focusin"?ry:AC)(u)}return u.addEventListener("focusin",S,!0),u.addEventListener("focusout",S,!0),()=>{u.removeEventListener("focusin",S,!0),u.removeEventListener("focusout",S,!0)}},[u,s,v]),T.useEffect(()=>{u&&(x||ry(u))},[x,u]),y.jsxs(q1.Provider,{value:T.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:h,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:b,portalNode:u,setFocusManagerState:f}),[s,u]),children:[w&&u&&y.jsx($s,{"data-type":"outside",ref:h,onFocus:S=>{if(za(S,u)){var C;(C=m.current)==null||C.focus()}else{const E=c?c.domReference:null,N=D1(E);N?.focus()}}}),w&&u&&y.jsx("span",{"aria-owns":u.id,style:b3}),u&&O1.createPortal(r,u),w&&u&&y.jsx($s,{"data-type":"outside",ref:p,onFocus:S=>{if(za(S,u)){var C;(C=b.current)==null||C.focus()}else{const E=c?c.domReference:null,N=L1(E);N?.focus(),c?.closeOnFocusOut&&c?.onOpenChange(!1,S.nativeEvent,"focus-out")}}})]})}const $1=()=>T.useContext(q1);function yy(e){return T.useMemo(()=>r=>{e.forEach(l=>{l&&(l.current=r)})},e)}const x3=20;let ll=[];function bh(){ll=ll.filter(e=>e.isConnected)}function v3(e){bh(),e&&ol(e)!=="body"&&(ll.push(e),ll.length>x3&&(ll=ll.slice(-20)))}function xy(){return bh(),ll[ll.length-1]}function w3(e){const r=Ka();return N1(e,r)?e:du(e,r)[0]||e}function vy(e,r){var l;if(!r.current.includes("floating")&&!((l=e.getAttribute("role"))!=null&&l.includes("dialog")))return;const i=Ka(),u=pC(e,i).filter(f=>{const h=f.getAttribute("data-tabindex")||"";return N1(f,i)||f.hasAttribute("data-tabindex")&&!h.startsWith("-")}),c=e.getAttribute("tabindex");r.current.includes("floating")||u.length===0?c!=="0"&&e.setAttribute("tabindex","0"):(c!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const S3=T.forwardRef(function(r,l){return y.jsx("button",{...r,type:"button",ref:l,tabIndex:-1,style:mh})});function k3(e){const{context:r,children:l,disabled:i=!1,order:s=["content"],guards:u=!0,initialFocus:c=0,returnFocus:f=!0,restoreFocus:h=!1,modal:p=!0,visuallyHiddenDismiss:m=!1,closeOnFocusOut:b=!0,outsideElementsInert:v=!1,getInsideElements:x=()=>[]}=e,{open:w,onOpenChange:S,events:C,dataRef:E,elements:{domReference:N,floating:j}}=r,B=on(()=>{var de;return(de=E.current.floatingContext)==null?void 0:de.nodeId}),P=on(x),L=typeof c=="number"&&c<0,M=ty(N)&&L,H=p3(),G=H?u:!0,z=!G||H&&v,V=jl(s),Y=jl(c),J=jl(f),I=pu(),X=$1(),F=T.useRef(null),Z=T.useRef(null),O=T.useRef(!1),$=T.useRef(!1),R=T.useRef(-1),D=T.useRef(-1),U=X!=null,A=Ad(j),ne=on(function(de){return de===void 0&&(de=A),de?du(de,Ka()):[]}),re=on(de=>{const ve=ne(de);return V.current.map(ke=>N&&ke==="reference"?N:A&&ke==="floating"?A:ve).filter(Boolean).flat()});T.useEffect(()=>{if(i||!p)return;function de(ke){if(ke.key==="Tab"){qt(A,nl($t(A)))&&ne().length===0&&!M&&Ff(ke);const $e=re(),Qe=Sr(ke);V.current[0]==="reference"&&Qe===N&&(Ff(ke),ke.shiftKey?vi($e[$e.length-1]):vi($e[1])),V.current[1]==="floating"&&Qe===A&&ke.shiftKey&&(Ff(ke),vi($e[0]))}}const ve=$t(A);return ve.addEventListener("keydown",de),()=>{ve.removeEventListener("keydown",de)}},[i,N,A,p,V,M,ne,re]),T.useEffect(()=>{if(i||!j)return;function de(ve){const ke=Sr(ve),Qe=ne().indexOf(ke);Qe!==-1&&(R.current=Qe)}return j.addEventListener("focusin",de),()=>{j.removeEventListener("focusin",de)}},[i,j,ne]),T.useEffect(()=>{if(i||!b)return;function de(){$.current=!0,setTimeout(()=>{$.current=!1})}function ve(Qe){const ze=Qe.relatedTarget,Bt=Qe.currentTarget,pt=Sr(Qe);queueMicrotask(()=>{const mt=B(),Ft=!(qt(N,ze)||qt(j,ze)||qt(ze,j)||qt(X?.portalNode,ze)||ze!=null&&ze.hasAttribute(Dl("focus-guard"))||I&&(Ni(I.nodesRef.current,mt).find(it=>{var It,at;return qt((It=it.context)==null?void 0:It.elements.floating,ze)||qt((at=it.context)==null?void 0:at.elements.domReference,ze)})||ny(I.nodesRef.current,mt).find(it=>{var It,at,$n;return[(It=it.context)==null?void 0:It.elements.floating,Ad((at=it.context)==null?void 0:at.elements.floating)].includes(ze)||(($n=it.context)==null?void 0:$n.elements.domReference)===ze})));if(Bt===N&&A&&vy(A,V),h&&Bt!==N&&!(pt!=null&&pt.isConnected)&&nl($t(A))===$t(A).body){Nt(A)&&A.focus();const it=R.current,It=ne(),at=It[it]||It[It.length-1]||A;Nt(at)&&at.focus()}if(E.current.insideReactTree){E.current.insideReactTree=!1;return}(M||!p)&&ze&&Ft&&!$.current&&ze!==xy()&&(O.current=!0,S(!1,Qe,"focus-out"))})}const ke=!!(!I&&X);function $e(){Qt(D),E.current.insideReactTree=!0,D.current=window.setTimeout(()=>{E.current.insideReactTree=!1})}if(j&&Nt(N))return N.addEventListener("focusout",ve),N.addEventListener("pointerdown",de),j.addEventListener("focusout",ve),ke&&j.addEventListener("focusout",$e,!0),()=>{N.removeEventListener("focusout",ve),N.removeEventListener("pointerdown",de),j.removeEventListener("focusout",ve),ke&&j.removeEventListener("focusout",$e,!0)}},[i,N,j,A,p,I,X,S,b,h,ne,M,B,V,E]);const fe=T.useRef(null),ge=T.useRef(null),ye=yy([fe,X?.beforeInsideRef]),pe=yy([ge,X?.afterInsideRef]);T.useEffect(()=>{var de,ve;if(i||!j)return;const ke=Array.from((X==null||(de=X.portalNode)==null?void 0:de.querySelectorAll("["+Dl("portal")+"]"))||[]),Qe=(ve=(I?ny(I.nodesRef.current,B()):[]).find(pt=>{var mt;return ty(((mt=pt.context)==null?void 0:mt.elements.domReference)||null)}))==null||(ve=ve.context)==null?void 0:ve.elements.domReference,ze=[j,Qe,...ke,...P(),F.current,Z.current,fe.current,ge.current,X?.beforeOutsideRef.current,X?.afterOutsideRef.current,V.current.includes("reference")||M?N:null].filter(pt=>pt!=null),Bt=p||M?my(ze,!z,z):my(ze);return()=>{Bt()}},[i,N,j,p,V,X,M,G,z,I,B,P]),sn(()=>{if(i||!Nt(A))return;const de=$t(A),ve=nl(de);queueMicrotask(()=>{const ke=re(A),$e=Y.current,Qe=(typeof $e=="number"?ke[$e]:$e.current)||A,ze=qt(A,ve);!L&&!ze&&w&&vi(Qe,{preventScroll:Qe===A})})},[i,w,A,L,re,Y]),sn(()=>{if(i||!A)return;const de=$t(A),ve=nl(de);v3(ve);function ke(ze){let{reason:Bt,event:pt,nested:mt}=ze;if(["hover","safe-polygon"].includes(Bt)&&pt.type==="mouseleave"&&(O.current=!0),Bt==="outside-press")if(mt)O.current=!1;else if(vC(pt)||wC(pt))O.current=!1;else{let Ft=!1;document.createElement("div").focus({get preventScroll(){return Ft=!0,!1}}),Ft?O.current=!1:O.current=!0}}C.on("openchange",ke);const $e=de.createElement("span");$e.setAttribute("tabindex","-1"),$e.setAttribute("aria-hidden","true"),Object.assign($e.style,mh),U&&N&&N.insertAdjacentElement("afterend",$e);function Qe(){if(typeof J.current=="boolean"){const ze=N||xy();return ze&&ze.isConnected?ze:$e}return J.current.current||$e}return()=>{C.off("openchange",ke);const ze=nl(de),Bt=qt(j,ze)||I&&Ni(I.nodesRef.current,B(),!1).some(mt=>{var Ft;return qt((Ft=mt.context)==null?void 0:Ft.elements.floating,ze)}),pt=Qe();queueMicrotask(()=>{const mt=w3(pt);J.current&&!O.current&&Nt(mt)&&(!(mt!==ze&&ze!==de.body)||Bt)&&mt.focus({preventScroll:!0}),$e.remove()})}},[i,j,A,J,E,C,I,U,N,B]),T.useEffect(()=>(queueMicrotask(()=>{O.current=!1}),()=>{queueMicrotask(bh)}),[i]),sn(()=>{if(!i&&X)return X.setFocusManagerState({modal:p,closeOnFocusOut:b,open:w,onOpenChange:S,domReference:N}),()=>{X.setFocusManagerState(null)}},[i,X,p,w,S,b,N]),sn(()=>{i||A&&vy(A,V)},[i,A,V]);function me(de){return i||!m||!p?null:y.jsx(S3,{ref:de==="start"?F:Z,onClick:ve=>S(!1,ve.nativeEvent),children:typeof m=="string"?m:"Dismiss"})}const xe=!i&&G&&(p?!M:!0)&&(U||p);return y.jsxs(y.Fragment,{children:[xe&&y.jsx($s,{"data-type":"inside",ref:ye,onFocus:de=>{if(p){const ke=re();vi(s[0]==="reference"?ke[0]:ke[ke.length-1])}else if(X!=null&&X.preserveTabOrder&&X.portalNode)if(O.current=!1,za(de,X.portalNode)){const ke=L1(N);ke?.focus()}else{var ve;(ve=X.beforeOutsideRef.current)==null||ve.focus()}}}),!M&&me("start"),l,me("end"),xe&&y.jsx($s,{"data-type":"inside",ref:pe,onFocus:de=>{if(p)vi(re()[0]);else if(X!=null&&X.preserveTabOrder&&X.portalNode)if(b&&(O.current=!0),za(de,X.portalNode)){const ke=D1(N);ke?.focus()}else{var ve;(ve=X.afterOutsideRef.current)==null||ve.focus()}}})]})}function wy(e){return Nt(e.target)&&e.target.tagName==="BUTTON"}function E3(e){return Nt(e.target)&&e.target.tagName==="A"}function Sy(e){return dh(e)}function Od(e,r){r===void 0&&(r={});const{open:l,onOpenChange:i,dataRef:s,elements:{domReference:u}}=e,{enabled:c=!0,event:f="click",toggle:h=!0,ignoreMouse:p=!1,keyboardHandlers:m=!0,stickIfOpen:b=!0}=r,v=T.useRef(),x=T.useRef(!1),w=T.useMemo(()=>({onPointerDown(S){v.current=S.pointerType},onMouseDown(S){const C=v.current;S.button===0&&f!=="click"&&($a(C,!0)&&p||(l&&h&&(!(s.current.openEvent&&b)||s.current.openEvent.type==="mousedown")?i(!1,S.nativeEvent,"click"):(S.preventDefault(),i(!0,S.nativeEvent,"click"))))},onClick(S){const C=v.current;if(f==="mousedown"&&v.current){v.current=void 0;return}$a(C,!0)&&p||(l&&h&&(!(s.current.openEvent&&b)||s.current.openEvent.type==="click")?i(!1,S.nativeEvent,"click"):i(!0,S.nativeEvent,"click"))},onKeyDown(S){v.current=void 0,!(S.defaultPrevented||!m||wy(S))&&(S.key===" "&&!Sy(u)&&(S.preventDefault(),x.current=!0),!E3(S)&&S.key==="Enter"&&i(!(l&&h),S.nativeEvent,"click"))},onKeyUp(S){S.defaultPrevented||!m||wy(S)||Sy(u)||S.key===" "&&x.current&&(x.current=!1,i(!(l&&h),S.nativeEvent,"click"))}}),[s,u,f,p,m,i,l,b,h]);return T.useMemo(()=>c?{reference:w}:{},[c,w])}const C3={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},N3={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ky=e=>{var r,l;return{escapeKey:typeof e=="boolean"?e:(r=e?.escapeKey)!=null?r:!1,outsidePress:typeof e=="boolean"?e:(l=e?.outsidePress)!=null?l:!0}};function Md(e,r){r===void 0&&(r={});const{open:l,onOpenChange:i,elements:s,dataRef:u}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:h=!0,outsidePressEvent:p="pointerdown",referencePress:m=!1,referencePressEvent:b="pointerdown",ancestorScroll:v=!1,bubbles:x,capture:w}=r,S=pu(),C=on(typeof h=="function"?h:()=>!1),E=typeof h=="function"?C:h,N=T.useRef(!1),{escapeKey:j,outsidePress:B}=ky(x),{escapeKey:P,outsidePress:L}=ky(w),M=T.useRef(!1),H=on(I=>{var X;if(!l||!c||!f||I.key!=="Escape"||M.current)return;const F=(X=u.current.floatingContext)==null?void 0:X.nodeId,Z=S?Ni(S.nodesRef.current,F):[];if(!j&&(I.stopPropagation(),Z.length>0)){let O=!0;if(Z.forEach($=>{var R;if((R=$.context)!=null&&R.open&&!$.context.dataRef.current.__escapeKeyBubbles){O=!1;return}}),!O)return}i(!1,xC(I)?I.nativeEvent:I,"escape-key")}),G=on(I=>{var X;const F=()=>{var Z;H(I),(Z=Sr(I))==null||Z.removeEventListener("keydown",F)};(X=Sr(I))==null||X.addEventListener("keydown",F)}),z=on(I=>{var X;const F=u.current.insideReactTree;u.current.insideReactTree=!1;const Z=N.current;if(N.current=!1,p==="click"&&Z||F||typeof E=="function"&&!E(I))return;const O=Sr(I),$="["+Dl("inert")+"]",R=$t(s.floating).querySelectorAll($);let D=ct(O)?O:null;for(;D&&!Er(D);){const re=Cr(D);if(Er(re)||!ct(re))break;D=re}if(R.length&&ct(O)&&!bC(O)&&!qt(O,s.floating)&&Array.from(R).every(re=>!qt(D,re)))return;if(Nt(O)&&J){const re=Er(O),fe=Bn(O),ge=/auto|scroll/,ye=re||ge.test(fe.overflowX),pe=re||ge.test(fe.overflowY),me=ye&&O.clientWidth>0&&O.scrollWidth>O.clientWidth,xe=pe&&O.clientHeight>0&&O.scrollHeight>O.clientHeight,de=fe.direction==="rtl",ve=xe&&(de?I.offsetX<=O.offsetWidth-O.clientWidth:I.offsetX>O.clientWidth),ke=me&&I.offsetY>O.clientHeight;if(ve||ke)return}const U=(X=u.current.floatingContext)==null?void 0:X.nodeId,A=S&&Ni(S.nodesRef.current,U).some(re=>{var fe;return Bf(I,(fe=re.context)==null?void 0:fe.elements.floating)});if(Bf(I,s.floating)||Bf(I,s.domReference)||A)return;const ne=S?Ni(S.nodesRef.current,U):[];if(ne.length>0){let re=!0;if(ne.forEach(fe=>{var ge;if((ge=fe.context)!=null&&ge.open&&!fe.context.dataRef.current.__outsidePressBubbles){re=!1;return}}),!re)return}i(!1,I,"outside-press")}),V=on(I=>{var X;const F=()=>{var Z;z(I),(Z=Sr(I))==null||Z.removeEventListener(p,F)};(X=Sr(I))==null||X.addEventListener(p,F)});T.useEffect(()=>{if(!l||!c)return;u.current.__escapeKeyBubbles=j,u.current.__outsidePressBubbles=B;let I=-1;function X(R){i(!1,R,"ancestor-scroll")}function F(){window.clearTimeout(I),M.current=!0}function Z(){I=window.setTimeout(()=>{M.current=!1},su()?5:0)}const O=$t(s.floating);f&&(O.addEventListener("keydown",P?G:H,P),O.addEventListener("compositionstart",F),O.addEventListener("compositionend",Z)),E&&O.addEventListener(p,L?V:z,L);let $=[];return v&&(ct(s.domReference)&&($=al(s.domReference)),ct(s.floating)&&($=$.concat(al(s.floating))),!ct(s.reference)&&s.reference&&s.reference.contextElement&&($=$.concat(al(s.reference.contextElement)))),$=$.filter(R=>{var D;return R!==((D=O.defaultView)==null?void 0:D.visualViewport)}),$.forEach(R=>{R.addEventListener("scroll",X,{passive:!0})}),()=>{f&&(O.removeEventListener("keydown",P?G:H,P),O.removeEventListener("compositionstart",F),O.removeEventListener("compositionend",Z)),E&&O.removeEventListener(p,L?V:z,L),$.forEach(R=>{R.removeEventListener("scroll",X)}),window.clearTimeout(I)}},[u,s,f,E,p,l,i,v,c,j,B,H,P,G,z,L,V]),T.useEffect(()=>{u.current.insideReactTree=!1},[u,E,p]);const Y=T.useMemo(()=>({onKeyDown:H,...m&&{[C3[b]]:I=>{i(!1,I.nativeEvent,"reference-press")},...b!=="click"&&{onClick(I){i(!1,I.nativeEvent,"reference-press")}}}}),[H,i,m,b]),J=T.useMemo(()=>({onKeyDown:H,onMouseDown(){N.current=!0},onMouseUp(){N.current=!0},[N3[p]]:()=>{u.current.insideReactTree=!0}}),[H,p,u]);return T.useMemo(()=>c?{reference:Y,floating:J}:{},[c,Y,J])}function A3(e){const{open:r=!1,onOpenChange:l,elements:i}=e,s=ph(),u=T.useRef({}),[c]=T.useState(()=>u3()),f=gh()!=null,[h,p]=T.useState(i.reference),m=on((x,w,S)=>{u.current.openEvent=x?w:void 0,c.emit("openchange",{open:x,event:w,reason:S,nested:f}),l?.(x,w,S)}),b=T.useMemo(()=>({setPositionReference:p}),[]),v=T.useMemo(()=>({reference:h||i.reference||null,floating:i.floating||null,domReference:i.reference}),[h,i.reference,i.floating]);return T.useMemo(()=>({dataRef:u,open:r,onOpenChange:m,elements:v,events:c,floatingId:s,refs:b}),[r,m,v,c,s,b])}function zd(e){e===void 0&&(e={});const{nodeId:r}=e,l=A3({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||l,s=i.elements,[u,c]=T.useState(null),[f,h]=T.useState(null),m=s?.domReference||u,b=T.useRef(null),v=pu();sn(()=>{m&&(b.current=m)},[m]);const x=r3({...e,elements:{...s,...f&&{reference:f}}}),w=T.useCallback(j=>{const B=ct(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),getClientRects:()=>j.getClientRects(),contextElement:j}:j;h(B),x.refs.setReference(B)},[x.refs]),S=T.useCallback(j=>{(ct(j)||j===null)&&(b.current=j,c(j)),(ct(x.refs.reference.current)||x.refs.reference.current===null||j!==null&&!ct(j))&&x.refs.setReference(j)},[x.refs]),C=T.useMemo(()=>({...x.refs,setReference:S,setPositionReference:w,domReference:b}),[x.refs,S,w]),E=T.useMemo(()=>({...x.elements,domReference:m}),[x.elements,m]),N=T.useMemo(()=>({...x,...i,refs:C,elements:E,nodeId:r}),[x,C,E,r,i]);return sn(()=>{i.dataRef.current.floatingContext=N;const j=v?.nodesRef.current.find(B=>B.id===r);j&&(j.context=N)}),T.useMemo(()=>({...x,context:N,refs:C,elements:E}),[x,C,E,N])}function Vf(){return gC()&&j1()}function T3(e,r){r===void 0&&(r={});const{open:l,onOpenChange:i,events:s,dataRef:u,elements:c}=e,{enabled:f=!0,visibleOnly:h=!0}=r,p=T.useRef(!1),m=T.useRef(-1),b=T.useRef(!0);T.useEffect(()=>{if(!f)return;const x=un(c.domReference);function w(){!l&&Nt(c.domReference)&&c.domReference===nl($t(c.domReference))&&(p.current=!0)}function S(){b.current=!0}function C(){b.current=!1}return x.addEventListener("blur",w),Vf()&&(x.addEventListener("keydown",S,!0),x.addEventListener("pointerdown",C,!0)),()=>{x.removeEventListener("blur",w),Vf()&&(x.removeEventListener("keydown",S,!0),x.removeEventListener("pointerdown",C,!0))}},[c.domReference,l,f]),T.useEffect(()=>{if(!f)return;function x(w){let{reason:S}=w;(S==="reference-press"||S==="escape-key")&&(p.current=!0)}return s.on("openchange",x),()=>{s.off("openchange",x)}},[s,f]),T.useEffect(()=>()=>{Qt(m)},[]);const v=T.useMemo(()=>({onMouseLeave(){p.current=!1},onFocus(x){if(p.current)return;const w=Sr(x.nativeEvent);if(h&&ct(w)){if(Vf()&&!x.relatedTarget){if(!b.current&&!dh(w))return}else if(!yC(w))return}i(!0,x.nativeEvent,"focus")},onBlur(x){p.current=!1;const w=x.relatedTarget,S=x.nativeEvent,C=ct(w)&&w.hasAttribute(Dl("focus-guard"))&&w.getAttribute("data-type")==="outside";m.current=window.setTimeout(()=>{var E;const N=nl(c.domReference?c.domReference.ownerDocument:document);!w&&N===c.domReference||qt((E=u.current.floatingContext)==null?void 0:E.refs.floating.current,N)||qt(c.domReference,N)||C||i(!1,S,"focus")})}}),[u,c.domReference,i,h]);return T.useMemo(()=>f?{reference:v}:{},[f,v])}function Gf(e,r,l){const i=new Map,s=l==="item";let u=e;if(s&&e){const{[uy]:c,[cy]:f,...h}=e;u=h}return{...l==="floating"&&{tabIndex:-1,[l3]:""},...u,...r.map(c=>{const f=c?c[l]:null;return typeof f=="function"?e?f(e):null:f}).concat(e).reduce((c,f)=>(f&&Object.entries(f).forEach(h=>{let[p,m]=h;if(!(s&&[uy,cy].includes(p)))if(p.indexOf("on")===0){if(i.has(p)||i.set(p,[]),typeof m=="function"){var b;(b=i.get(p))==null||b.push(m),c[p]=function(){for(var v,x=arguments.length,w=new Array(x),S=0;S<x;S++)w[S]=arguments[S];return(v=i.get(p))==null?void 0:v.map(C=>C(...w)).find(C=>C!==void 0)}}}else c[p]=m}),c),{})}}function Bd(e){e===void 0&&(e=[]);const r=e.map(f=>f?.reference),l=e.map(f=>f?.floating),i=e.map(f=>f?.item),s=T.useCallback(f=>Gf(f,e,"reference"),r),u=T.useCallback(f=>Gf(f,e,"floating"),l),c=T.useCallback(f=>Gf(f,e,"item"),i);return T.useMemo(()=>({getReferenceProps:s,getFloatingProps:u,getItemProps:c}),[s,u,c])}const j3=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Fd(e,r){var l,i;r===void 0&&(r={});const{open:s,elements:u,floatingId:c}=e,{enabled:f=!0,role:h="dialog"}=r,p=ph(),m=((l=u.domReference)==null?void 0:l.id)||p,b=T.useMemo(()=>{var N;return((N=Ad(u.floating))==null?void 0:N.id)||c},[u.floating,c]),v=(i=j3.get(h))!=null?i:h,w=gh()!=null,S=T.useMemo(()=>v==="tooltip"||h==="label"?{["aria-"+(h==="label"?"labelledby":"describedby")]:s?b:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":v==="alertdialog"?"dialog":v,"aria-controls":s?b:void 0,...v==="listbox"&&{role:"combobox"},...v==="menu"&&{id:m},...v==="menu"&&w&&{role:"menuitem"},...h==="select"&&{"aria-autocomplete":"none"},...h==="combobox"&&{"aria-autocomplete":"list"}},[v,b,w,s,m,h]),C=T.useMemo(()=>{const N={id:b,...v&&{role:v}};return v==="tooltip"||h==="label"?N:{...N,...v==="menu"&&{"aria-labelledby":m}}},[v,b,m,h]),E=T.useCallback(N=>{let{active:j,selected:B}=N;const P={role:"option",...j&&{id:b+"-fui-option"}};switch(h){case"select":case"combobox":return{...P,"aria-selected":B}}return{}},[b,h]);return T.useMemo(()=>f?{reference:S,floating:C,item:E}:{},[f,S,C,E])}function V1(e,r,l){return l===void 0&&(l=!0),e.filter(s=>{var u;return s.parentId===r&&(!l||((u=s.context)==null?void 0:u.open))}).flatMap(s=>[s,...V1(e,s.id,l)])}function Ey(e,r){const[l,i]=e;let s=!1;const u=r.length;for(let c=0,f=u-1;c<u;f=c++){const[h,p]=r[c]||[0,0],[m,b]=r[f]||[0,0];p>=i!=b>=i&&l<=(m-h)*(i-p)/(b-p)+h&&(s=!s)}return s}function R3(e,r){return e[0]>=r.x&&e[0]<=r.x+r.width&&e[1]>=r.y&&e[1]<=r.y+r.height}function Id(e){e===void 0&&(e={});const{buffer:r=.5,blockPointerEvents:l=!1,requireIntent:i=!0}=e,s={current:-1};let u=!1,c=null,f=null,h=typeof performance<"u"?performance.now():0;function p(b,v){const x=performance.now(),w=x-h;if(c===null||f===null||w===0)return c=b,f=v,h=x,null;const S=b-c,C=v-f,N=Math.sqrt(S*S+C*C)/w;return c=b,f=v,h=x,N}const m=b=>{let{x:v,y:x,placement:w,elements:S,onClose:C,nodeId:E,tree:N}=b;return function(B){function P(){Qt(s),C()}if(Qt(s),!S.domReference||!S.floating||w==null||v==null||x==null)return;const{clientX:L,clientY:M}=B,H=[L,M],G=d3(B),z=B.type==="mouseleave",V=qf(S.floating,G),Y=qf(S.domReference,G),J=S.domReference.getBoundingClientRect(),I=S.floating.getBoundingClientRect(),X=w.split("-")[0],F=v>I.right-I.width/2,Z=x>I.bottom-I.height/2,O=R3(H,J),$=I.width>J.width,R=I.height>J.height,D=($?J:I).left,U=($?J:I).right,A=(R?J:I).top,ne=(R?J:I).bottom;if(V&&(u=!0,!z))return;if(Y&&(u=!1),Y&&!z){u=!0;return}if(z&&ct(B.relatedTarget)&&qf(S.floating,B.relatedTarget)||N&&V1(N.nodesRef.current,E).length)return;if(X==="top"&&x>=J.bottom-1||X==="bottom"&&x<=J.top+1||X==="left"&&v>=J.right-1||X==="right"&&v<=J.left+1)return P();let re=[];switch(X){case"top":re=[[D,J.top+1],[D,I.bottom-1],[U,I.bottom-1],[U,J.top+1]];break;case"bottom":re=[[D,I.top+1],[D,J.bottom-1],[U,J.bottom-1],[U,I.top+1]];break;case"left":re=[[I.right-1,ne],[I.right-1,A],[J.left+1,A],[J.left+1,ne]];break;case"right":re=[[J.right-1,ne],[J.right-1,A],[I.left+1,A],[I.left+1,ne]];break}function fe(ge){let[ye,pe]=ge;switch(X){case"top":{const me=[$?ye+r/2:F?ye+r*4:ye-r*4,pe+r+1],xe=[$?ye-r/2:F?ye+r*4:ye-r*4,pe+r+1],de=[[I.left,F||$?I.bottom-r:I.top],[I.right,F?$?I.bottom-r:I.top:I.bottom-r]];return[me,xe,...de]}case"bottom":{const me=[$?ye+r/2:F?ye+r*4:ye-r*4,pe-r],xe=[$?ye-r/2:F?ye+r*4:ye-r*4,pe-r],de=[[I.left,F||$?I.top+r:I.bottom],[I.right,F?$?I.top+r:I.bottom:I.top+r]];return[me,xe,...de]}case"left":{const me=[ye+r+1,R?pe+r/2:Z?pe+r*4:pe-r*4],xe=[ye+r+1,R?pe-r/2:Z?pe+r*4:pe-r*4];return[...[[Z||R?I.right-r:I.left,I.top],[Z?R?I.right-r:I.left:I.right-r,I.bottom]],me,xe]}case"right":{const me=[ye-r,R?pe+r/2:Z?pe+r*4:pe-r*4],xe=[ye-r,R?pe-r/2:Z?pe+r*4:pe-r*4],de=[[Z||R?I.left+r:I.right,I.top],[Z?R?I.left+r:I.right:I.left+r,I.bottom]];return[me,xe,...de]}}}if(!Ey([L,M],re)){if(u&&!O)return P();if(!z&&i){const ge=p(B.clientX,B.clientY);if(ge!==null&&ge<.1)return P()}Ey([L,M],fe([v,x]))?!u&&i&&(s.current=window.setTimeout(P,40)):P()}}};return m.__options={blockPointerEvents:l},m}const _3={".":"Uncommitted Changes",staged:"Staging Area",working:"Working Directory"},L3=new Set([".","staged","working"]),D3=e=>{const r=!e||L3.has(e)?"HEAD":`${e}^`;return{base:`${r}^`,target:r}},Cy=(e,r)=>!!r&&e===`${r}^`,ks=(e,r)=>e?e===r.shortHash||e===r.hash:!1,Ny=(e,r)=>r?`${e.shortHash}^`:e.shortHash,Ay=(e,r,l)=>{if(!r)return"Select...";const i=r.endsWith("^"),s=i?r.slice(0,-1):r;if(s.startsWith("HEAD"))return r;const u=_3[r];if(u)return u;const c=e.specialOptions.find(p=>p.value===r);if(c)return c.label;const f=e.branches.find(p=>p.name===s);if(f)return i?`${f.name}^`:f.name;const h=e.commits.find(p=>p.shortHash===s||p.hash===s);if(h)return Ny(h,i);if(l){const p=e.commits.find(m=>m.shortHash===l||m.hash===l);if(p)return Ny(p,!1)}return r};function O3({options:e,baseRevision:r,targetRevision:l,resolvedBaseRevision:i,resolvedTargetRevision:s,onSelectDiff:u,onOpenAdvanced:c,compact:f=!1}){const[h,p]=T.useState(!1),[m,b]=T.useState(!1),v=f,{refs:x,floatingStyles:w,context:S}=zd({open:h||m,onOpenChange:re=>{!re&&m||p(re)},placement:"bottom-end",middleware:[jd(6),_d(),Rd({padding:8})],whileElementsMounted:Td}),C=Ld(S,{handleClose:Id()}),E=Od(S),N=Md(S),j=Fd(S,{role:"menu"}),{getReferenceProps:B,getFloatingProps:P}=Bd([C,E,N,j]),{refs:L,floatingStyles:M,context:H}=zd({open:m,onOpenChange:re=>{re&&p(!0),b(re)},placement:"left-start",middleware:[jd(0),_d(),Rd({padding:8})],whileElementsMounted:Td}),G=Ld(H,{handleClose:Id()}),z=Od(H),V=Md(H),Y=Fd(H,{role:"menu"}),{getReferenceProps:J,getFloatingProps:I}=Bd([G,z,V,Y]);T.useEffect(()=>{h||b(!1)},[h]);const X=T.useMemo(()=>{const re=Cy(r,l),fe=e.commits.find(pe=>re?ks(l,pe)||ks(s,pe):!1);if(fe)return`${fe.shortHash} ${fe.message}`;const ge=Ay(e,r,i),ye=Ay(e,l,s);return`${ge}...${ye}`},[e,r,l,i,s]),F=T.useMemo(()=>e.branches.find(re=>re.name==="main")||e.branches.find(re=>re.name==="master"),[e.branches]),Z=!!F,O=T.useMemo(()=>({base:"HEAD^",target:"HEAD"}),[]),$=T.useMemo(()=>D3(l),[l]),R=(re,fe)=>{u(re,fe),b(!1),p(!1)},D=()=>{b(!1),p(!1),c()},U=(re,fe)=>["w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors",re?"hover:bg-diff-selected-bg focus:bg-diff-selected-bg":"hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary",re?"bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2":"",fe?"opacity-50 cursor-not-allowed":"cursor-pointer"].join(" "),A=(re,fe)=>r===re&&l===fe,ne=re=>Cy(r,l)?ks(l,re)||ks(s,re):!1;return y.jsxs("div",{className:"relative",children:[y.jsx("button",{ref:x.setReference,type:"button",className:"flex items-center gap-1.5 cursor-pointer group","aria-haspopup":"menu","aria-expanded":h,"aria-label":`Revision menu: ${X}`,title:X,...B(),children:v?y.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors",children:[y.jsx(D2,{size:14,className:"text-github-text-secondary"}),y.jsx(Ri,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]}):y.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors",children:[y.jsx("code",{className:"text-xs text-github-text-primary",children:X}),y.jsx(Ri,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]})}),h&&y.jsx(Dd,{children:y.jsxs("div",{ref:x.setFloating,style:w,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[260px] max-h-[360px] overflow-y-auto",...P(),children:[y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Quick Diffs"}),y.jsx("button",{onClick:()=>R("HEAD","."),className:U(A("HEAD","."),!1),children:"HEAD...Uncommitted"}),Z&&F&&y.jsx(y.Fragment,{children:y.jsxs("button",{onClick:()=>R(F.name,"."),className:U(A(F.name,"."),!1),children:[F.name,"...Uncommitted"]})}),y.jsx("button",{onClick:()=>R(O.base,O.target),className:U(A(O.base,O.target),!1),children:"HEAD"})]}),y.jsx("div",{className:"border-b border-github-border",children:y.jsx("button",{onClick:()=>R($.base,$.target),className:U(A($.base,$.target),!1),type:"button",children:"Previous commit"})}),y.jsx("div",{className:"border-b border-github-border",children:y.jsx("button",{ref:e.commits.length>0?L.setReference:void 0,className:U(!1,e.commits.length===0),...e.commits.length>0?J():{},disabled:e.commits.length===0,type:"button",children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(s2,{size:12,className:"text-github-text-secondary"}),y.jsx("span",{children:"Pick Commit..."})]})})}),y.jsx("div",{children:y.jsx("button",{onClick:D,className:U(!1,!1),type:"button",children:"Detailed..."})})]})}),m&&e.commits.length>0&&y.jsx(Dd,{children:y.jsxs("div",{ref:L.setFloating,style:M,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[360px] overflow-y-auto",...I(),children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Recent Commits"}),e.commits.map(re=>y.jsx("button",{onClick:()=>R(`${re.shortHash}^`,re.shortHash),className:U(ne(re),!1),type:"button",children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx("code",{className:"text-xs text-github-text-primary font-mono whitespace-nowrap",children:re.shortHash}),y.jsx("span",{className:"text-xs text-github-text-secondary flex-1 break-words",children:re.message})]})},re.hash))]})})]})}const M3=["jpg","jpeg","png","gif","bmp","svg","webp","ico","tiff","tif","avif","heic","heif"];function z3(e){if(!e)return!1;const r=Za(e);return r?M3.includes(r):!1}const B3=["md","markdown"];function F3(e){if(!e)return!1;const r=Za(e);return r?B3.includes(r):!1}const I3=["ipynb"];function U3(e){if(!e)return!1;const r=Za(e);return r?I3.includes(r):!1}function H3({file:e,diffMode:r,baseCommitish:l,targetCommitish:i}){const s=r??Xa,u=e.status==="deleted",c=e.status==="added",f=e.status==="modified"||e.status==="renamed",h=l||"HEAD~1",p=i||"HEAD",[m,b]=T.useState({}),[v,x]=T.useState({}),w=async(N,j)=>{try{const B=N.naturalWidth,P=N.naturalHeight,H=(await(await fetch(N.src)).blob()).size;j({width:B,height:P,size:H})}catch(B){console.error("Failed to get image info:",B)}},S=N=>N?N<1024?`${N} B`:N<1024*1024?`${(N/1024).toFixed(1)} KB`:`${(N/(1024*1024)).toFixed(1)} MB`:"",C=N=>!N.width||!N.height?"":`W: ${N.width}px | H: ${N.height}px`,E={backgroundImage:`
27
- linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%),
28
- linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%)
29
- `,backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px",backgroundColor:"white"};return u?y.jsx("div",{className:"bg-github-bg-primary p-4",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"mb-2",children:y.jsx("span",{className:"text-github-danger font-medium",children:"Deleted Image"})}),y.jsxs("div",{className:"inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${h}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:N=>w(N.currentTarget,b),onError:N=>{const j=N.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(m.width||m.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[C(m),C(m)&&S(m.size)&&" | ",S(m.size)]})]})]})}):c?y.jsx("div",{className:"bg-github-bg-primary p-4",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"mb-2",children:y.jsx("span",{className:"text-github-accent font-medium",children:"Added Image"})}),y.jsxs("div",{className:"inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"New file:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${p}`,alt:`New image ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:N=>w(N.currentTarget,x),onError:N=>{const j=N.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(v.width||v.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[C(v),C(v)&&S(v.size)&&" | ",S(v.size)]})]})]})}):f?s==="split"?y.jsxs("div",{className:"bg-github-bg-primary p-4",children:[y.jsx("div",{className:"text-center mb-4",children:y.jsx("span",{className:"text-github-text-primary font-medium",children:"Modified Image"})}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${h}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:N=>w(N.currentTarget,b),onError:N=>{const j=N.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(m.width||m.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[C(m),C(m)&&S(m.size)&&" | ",S(m.size)]})]})}),y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Current version:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${p}`,alt:`Current version of ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:N=>w(N.currentTarget,x),onError:N=>{const j=N.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(v.width||v.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[C(v),C(v)&&S(v.size)&&" | ",S(v.size)]})]})})]})]}):y.jsxs("div",{className:"bg-github-bg-primary p-4",children:[y.jsx("div",{className:"text-center mb-4",children:y.jsx("span",{className:"text-github-text-primary font-medium",children:"Modified Image"})}),y.jsxs("div",{className:"space-y-6",children:[y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${h}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:N=>w(N.currentTarget,b),onError:N=>{const j=N.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(m.width||m.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[C(m),C(m)&&S(m.size)&&" | ",S(m.size)]})]})}),y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Current version:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${p}`,alt:`Current version of ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:N=>w(N.currentTarget,x),onError:N=>{const j=N.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(v.width||v.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[C(v),C(v)&&S(v.size)&&" | ",S(v.size)]})]})})]})]}):null}function P3(e,r){const l={};return(e[e.length-1]===""?[...e,""]:e).join((l.padRight?" ":"")+","+(l.padLeft===!1?"":" ")).trim()}const q3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,V3={};function Ty(e,r){return(V3.jsx?$3:q3).test(e)}const G3=/[ \t\n\f\r]/g;function Y3(e){return typeof e=="object"?e.type==="text"?jy(e.value):!1:jy(e)}function jy(e){return e.replace(G3,"")===""}class Ja{constructor(r,l,i){this.normal=l,this.property=r,i&&(this.space=i)}}Ja.prototype.normal={};Ja.prototype.property={};Ja.prototype.space=void 0;function G1(e,r){const l={},i={};for(const s of e)Object.assign(l,s.property),Object.assign(i,s.normal);return new Ja(l,i,r)}function Ud(e){return e.toLowerCase()}class cn{constructor(r,l){this.attribute=l,this.property=r}}cn.prototype.attribute="";cn.prototype.booleanish=!1;cn.prototype.boolean=!1;cn.prototype.commaOrSpaceSeparated=!1;cn.prototype.commaSeparated=!1;cn.prototype.defined=!1;cn.prototype.mustUseProperty=!1;cn.prototype.number=!1;cn.prototype.overloadedBoolean=!1;cn.prototype.property="";cn.prototype.spaceSeparated=!1;cn.prototype.space=void 0;let X3=0;const Oe=Ml(),Ct=Ml(),Hd=Ml(),he=Ml(),ut=Ml(),ji=Ml(),wn=Ml();function Ml(){return 2**++X3}const Pd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Oe,booleanish:Ct,commaOrSpaceSeparated:wn,commaSeparated:ji,number:he,overloadedBoolean:Hd,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),Yf=Object.keys(Pd);class yh extends cn{constructor(r,l,i,s){let u=-1;if(super(r,l),Ry(this,"space",s),typeof i=="number")for(;++u<Yf.length;){const c=Yf[u];Ry(this,Yf[u],(i&Pd[c])===Pd[c])}}}yh.prototype.defined=!0;function Ry(e,r,l){l&&(e[r]=l)}function Oi(e){const r={},l={};for(const[i,s]of Object.entries(e.properties)){const u=new yh(i,e.transform(e.attributes||{},i),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(u.mustUseProperty=!0),r[i]=u,l[Ud(i)]=i,l[Ud(u.attribute)]=i}return new Ja(r,l,e.space)}const Y1=Oi({properties:{ariaActiveDescendant:null,ariaAtomic:Ct,ariaAutoComplete:null,ariaBusy:Ct,ariaChecked:Ct,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:ut,ariaCurrent:null,ariaDescribedBy:ut,ariaDetails:null,ariaDisabled:Ct,ariaDropEffect:ut,ariaErrorMessage:null,ariaExpanded:Ct,ariaFlowTo:ut,ariaGrabbed:Ct,ariaHasPopup:null,ariaHidden:Ct,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ut,ariaLevel:he,ariaLive:null,ariaModal:Ct,ariaMultiLine:Ct,ariaMultiSelectable:Ct,ariaOrientation:null,ariaOwns:ut,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Ct,ariaReadOnly:Ct,ariaRelevant:null,ariaRequired:Ct,ariaRoleDescription:ut,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Ct,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function X1(e,r){return r in e?e[r]:r}function Z1(e,r){return X1(e,r.toLowerCase())}const Z3=Oi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ji,acceptCharset:ut,accessKey:ut,action:null,allow:null,allowFullScreen:Oe,allowPaymentRequest:Oe,allowUserMedia:Oe,alt:null,as:null,async:Oe,autoCapitalize:null,autoComplete:ut,autoFocus:Oe,autoPlay:Oe,blocking:ut,capture:null,charSet:null,checked:Oe,cite:null,className:ut,cols:he,colSpan:null,content:null,contentEditable:Ct,controls:Oe,controlsList:ut,coords:he|ji,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Oe,defer:Oe,dir:null,dirName:null,disabled:Oe,download:Hd,draggable:Ct,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Oe,formTarget:null,headers:ut,height:he,hidden:Hd,high:he,href:null,hrefLang:null,htmlFor:ut,httpEquiv:ut,id:null,imageSizes:null,imageSrcSet:null,inert:Oe,inputMode:null,integrity:null,is:null,isMap:Oe,itemId:null,itemProp:ut,itemRef:ut,itemScope:Oe,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Oe,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:Oe,muted:Oe,name:null,nonce:null,noModule:Oe,noValidate:Oe,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:Oe,optimum:he,pattern:null,ping:ut,placeholder:null,playsInline:Oe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Oe,referrerPolicy:null,rel:ut,required:Oe,reversed:Oe,rows:he,rowSpan:he,sandbox:ut,scope:null,scoped:Oe,seamless:Oe,selected:Oe,shadowRootClonable:Oe,shadowRootDelegatesFocus:Oe,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:Ct,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:Oe,useMap:null,value:Ct,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ut,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Oe,declare:Oe,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:Oe,noHref:Oe,noShade:Oe,noWrap:Oe,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:Ct,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Oe,disableRemotePlayback:Oe,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:Z1}),Q3=Oi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:wn,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:ut,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:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:Oe,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,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:ji,g2:ji,glyphName:ji,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:wn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:he,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:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wn,rev:wn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wn,requiredFeatures:wn,requiredFonts:wn,requiredFormats:wn,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:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:wn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wn,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:wn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:X1}),Q1=Oi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,r){return"xlink:"+r.slice(5).toLowerCase()}}),K1=Oi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Z1}),J1=Oi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,r){return"xml:"+r.slice(3).toLowerCase()}}),K3={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"},J3=/[A-Z]/g,_y=/-[a-z]/g,W3=/^data[-\w.:]+$/i;function e4(e,r){const l=Ud(r);let i=r,s=cn;if(l in e.normal)return e.property[e.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&W3.test(r)){if(r.charAt(4)==="-"){const u=r.slice(5).replace(_y,n4);i="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=r.slice(4);if(!_y.test(u)){let c=u.replace(J3,t4);c.charAt(0)!=="-"&&(c="-"+c),r="data"+c}}s=yh}return new s(i,r)}function t4(e){return"-"+e.toLowerCase()}function n4(e){return e.charAt(1).toUpperCase()}const r4=G1([Y1,Z3,Q1,K1,J1],"html"),xh=G1([Y1,Q3,Q1,K1,J1],"svg");function l4(e){return e.join(" ").trim()}var wi={},Xf,Ly;function i4(){if(Ly)return Xf;Ly=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,l=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
30
- `,p="/",m="*",b="",v="comment",x="declaration";function w(C,E){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];E=E||{};var N=1,j=1;function B(I){var X=I.match(r);X&&(N+=X.length);var F=I.lastIndexOf(h);j=~F?I.length-F:j+I.length}function P(){var I={line:N,column:j};return function(X){return X.position=new L(I),G(),X}}function L(I){this.start=I,this.end={line:N,column:j},this.source=E.source}L.prototype.content=C;function M(I){var X=new Error(E.source+":"+N+":"+j+": "+I);if(X.reason=I,X.filename=E.source,X.line=N,X.column=j,X.source=C,!E.silent)throw X}function H(I){var X=I.exec(C);if(X){var F=X[0];return B(F),C=C.slice(F.length),X}}function G(){H(l)}function z(I){var X;for(I=I||[];X=V();)X!==!1&&I.push(X);return I}function V(){var I=P();if(!(p!=C.charAt(0)||m!=C.charAt(1))){for(var X=2;b!=C.charAt(X)&&(m!=C.charAt(X)||p!=C.charAt(X+1));)++X;if(X+=2,b===C.charAt(X-1))return M("End of comment missing");var F=C.slice(2,X-2);return j+=2,B(F),C=C.slice(X),j+=2,I({type:v,comment:F})}}function Y(){var I=P(),X=H(i);if(X){if(V(),!H(s))return M("property missing ':'");var F=H(u),Z=I({type:x,property:S(X[0].replace(e,b)),value:F?S(F[0].replace(e,b)):b});return H(c),Z}}function J(){var I=[];z(I);for(var X;X=Y();)X!==!1&&(I.push(X),z(I));return I}return G(),J()}function S(C){return C?C.replace(f,b):b}return Xf=w,Xf}var Dy;function a4(){if(Dy)return wi;Dy=1;var e=wi&&wi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(wi,"__esModule",{value:!0}),wi.default=l;const r=e(i4());function l(i,s){let u=null;if(!i||typeof i!="string")return u;const c=(0,r.default)(i),f=typeof s=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:p,value:m}=h;f?s(p,m,h):m&&(u=u||{},u[p]=m)}),u}return wi}var ja={},Oy;function o4(){if(Oy)return ja;Oy=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,l=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,u=function(p){return!p||l.test(p)||e.test(p)},c=function(p,m){return m.toUpperCase()},f=function(p,m){return"".concat(m,"-")},h=function(p,m){return m===void 0&&(m={}),u(p)?p:(p=p.toLowerCase(),m.reactCompat?p=p.replace(s,f):p=p.replace(i,f),p.replace(r,c))};return ja.camelCase=h,ja}var Ra,My;function s4(){if(My)return Ra;My=1;var e=Ra&&Ra.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},r=e(a4()),l=o4();function i(s,u){var c={};return!s||typeof s!="string"||(0,r.default)(s,function(f,h){f&&h&&(c[(0,l.camelCase)(f,u)]=h)}),c}return i.default=i,Ra=i,Ra}var u4=s4();const c4=tu(u4),W1=e0("end"),vh=e0("start");function e0(e){return r;function r(l){const i=l&&l.position&&l.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 f4(e){const r=vh(e),l=W1(e);if(r&&l)return{start:r,end:l}}function Ba(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?zy(e.position):"start"in e||"end"in e?zy(e):"line"in e||"column"in e?qd(e):""}function qd(e){return By(e&&e.line)+":"+By(e&&e.column)}function zy(e){return qd(e&&e.start)+"-"+qd(e&&e.end)}function By(e){return e&&typeof e=="number"?e:1}class Gt extends Error{constructor(r,l,i){super(),typeof l=="string"&&(i=l,l=void 0);let s="",u={},c=!1;if(l&&("line"in l&&"column"in l?u={place:l}:"start"in l&&"end"in l?u={place:l}:"type"in l?u={ancestors:[l],place:l.position}:u={...l}),typeof r=="string"?s=r:!u.cause&&r&&(c=!0,s=r.message,u.cause=r),!u.ruleId&&!u.source&&typeof i=="string"){const h=i.indexOf(":");h===-1?u.ruleId=i:(u.source=i.slice(0,h),u.ruleId=i.slice(h+1))}if(!u.place&&u.ancestors&&u.ancestors){const h=u.ancestors[u.ancestors.length-1];h&&(u.place=h.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.line:void 0,this.name=Ba(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Gt.prototype.file="";Gt.prototype.name="";Gt.prototype.reason="";Gt.prototype.message="";Gt.prototype.stack="";Gt.prototype.column=void 0;Gt.prototype.line=void 0;Gt.prototype.ancestors=void 0;Gt.prototype.cause=void 0;Gt.prototype.fatal=void 0;Gt.prototype.place=void 0;Gt.prototype.ruleId=void 0;Gt.prototype.source=void 0;const wh={}.hasOwnProperty,d4=new Map,h4=/[A-Z]/g,p4=new Set(["table","tbody","thead","tfoot","tr"]),g4=new Set(["td","th"]),t0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function m4(e,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const l=r.filePath||void 0;let i;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=E4(l,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=k4(l,r.jsx,r.jsxs)}const s={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:i,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:l,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?xh:r4,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},u=n0(s,e,void 0);return u&&typeof u!="string"?u:s.create(e,s.Fragment,{children:u||void 0},void 0)}function n0(e,r,l){if(r.type==="element")return b4(e,r,l);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return y4(e,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return v4(e,r,l);if(r.type==="mdxjsEsm")return x4(e,r);if(r.type==="root")return w4(e,r,l);if(r.type==="text")return S4(e,r)}function b4(e,r,l){const i=e.schema;let s=i;r.tagName.toLowerCase()==="svg"&&i.space==="html"&&(s=xh,e.schema=s),e.ancestors.push(r);const u=l0(e,r.tagName,!1),c=C4(e,r);let f=kh(e,r);return p4.has(r.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!Y3(h):!0})),r0(e,c,u,r),Sh(c,f),e.ancestors.pop(),e.schema=i,e.create(r,u,c,l)}function y4(e,r){if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Va(e,r.position)}function x4(e,r){if(r.data&&r.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(r.data.estree);Va(e,r.position)}function v4(e,r,l){const i=e.schema;let s=i;r.name==="svg"&&i.space==="html"&&(s=xh,e.schema=s),e.ancestors.push(r);const u=r.name===null?e.Fragment:l0(e,r.name,!0),c=N4(e,r),f=kh(e,r);return r0(e,c,u,r),Sh(c,f),e.ancestors.pop(),e.schema=i,e.create(r,u,c,l)}function w4(e,r,l){const i={};return Sh(i,kh(e,r)),e.create(r,e.Fragment,i,l)}function S4(e,r){return r.value}function r0(e,r,l,i){typeof l!="string"&&l!==e.Fragment&&e.passNode&&(r.node=i)}function Sh(e,r){if(r.length>0){const l=r.length>1?r:r[0];l&&(e.children=l)}}function k4(e,r,l){return i;function i(s,u,c,f){const p=Array.isArray(c.children)?l:r;return f?p(u,c,f):p(u,c)}}function E4(e,r){return l;function l(i,s,u,c){const f=Array.isArray(u.children),h=vh(i);return r(s,u,c,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function C4(e,r){const l={};let i,s;for(s in r.properties)if(s!=="children"&&wh.call(r.properties,s)){const u=A4(e,s,r.properties[s]);if(u){const[c,f]=u;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&g4.has(r.tagName)?i=f:l[c]=f}}if(i){const u=l.style||(l.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return l}function N4(e,r){const l={};for(const i of r.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const u=i.data.estree.body[0];u.type;const c=u.expression;c.type;const f=c.properties[0];f.type,Object.assign(l,e.evaluater.evaluateExpression(f.argument))}else Va(e,r.position);else{const s=i.name;let u;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const f=i.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else Va(e,r.position);else u=i.value===null?!0:i.value;l[s]=u}return l}function kh(e,r){const l=[];let i=-1;const s=e.passKeys?new Map:d4;for(;++i<r.children.length;){const u=r.children[i];let c;if(e.passKeys){const h=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(h){const p=s.get(h)||0;c=h+"-"+p,s.set(h,p+1)}}const f=n0(e,u,c);f!==void 0&&l.push(f)}return l}function A4(e,r,l){const i=e4(e.schema,r);if(!(l==null||typeof l=="number"&&Number.isNaN(l))){if(Array.isArray(l)&&(l=i.commaSeparated?P3(l):l4(l)),i.property==="style"){let s=typeof l=="object"?l:T4(e,String(l));return e.stylePropertyNameCase==="css"&&(s=j4(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&i.space?K3[i.property]||i.property:i.attribute,l]}}function T4(e,r){try{return c4(r,{reactCompat:!0})}catch(l){if(e.ignoreInvalidStyle)return{};const i=l,s=new Gt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=t0+"#cannot-parse-style-attribute",s}}function l0(e,r,l){let i;if(!l)i={type:"Literal",value:r};else if(r.includes(".")){const s=r.split(".");let u=-1,c;for(;++u<s.length;){const f=Ty(s[u])?{type:"Identifier",name:s[u]}:{type:"Literal",value:s[u]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}i=c}else i=Ty(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(i.type==="Literal"){const s=i.value;return wh.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(i);Va(e)}function Va(e,r){const l=new Gt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:r,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=t0+"#cannot-handle-mdx-estrees-without-createevaluater",l}function j4(e){const r={};let l;for(l in e)wh.call(e,l)&&(r[R4(l)]=e[l]);return r}function R4(e){let r=e.replace(h4,_4);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function _4(e){return"-"+e.toLowerCase()}const Zf={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"]},L4={};function Eh(e,r){const l=L4,i=typeof l.includeImageAlt=="boolean"?l.includeImageAlt:!0,s=typeof l.includeHtml=="boolean"?l.includeHtml:!0;return i0(e,i,s)}function i0(e,r,l){if(D4(e)){if("value"in e)return e.type==="html"&&!l?"":e.value;if(r&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Fy(e.children,r,l)}return Array.isArray(e)?Fy(e,r,l):""}function Fy(e,r,l){const i=[];let s=-1;for(;++s<e.length;)i[s]=i0(e[s],r,l);return i.join("")}function D4(e){return!!(e&&typeof e=="object")}const Iy=document.createElement("i");function Ch(e){const r="&"+e+";";Iy.innerHTML=r;const l=Iy.textContent;return l.charCodeAt(l.length-1)===59&&e!=="semi"||l===r?!1:l}function kn(e,r,l,i){const s=e.length;let u=0,c;if(r<0?r=-r>s?0:s+r:r=r>s?s:r,l=l>0?l:0,i.length<1e4)c=Array.from(i),c.unshift(r,l),e.splice(...c);else for(l&&e.splice(r,l);u<i.length;)c=i.slice(u,u+1e4),c.unshift(r,0),e.splice(...c),u+=1e4,r+=1e4}function zn(e,r){return e.length>0?(kn(e,e.length,0,r),e):r}const Uy={}.hasOwnProperty;function a0(e){const r={};let l=-1;for(;++l<e.length;)O4(r,e[l]);return r}function O4(e,r){let l;for(l in r){const s=(Uy.call(e,l)?e[l]:void 0)||(e[l]={}),u=r[l];let c;if(u)for(c in u){Uy.call(s,c)||(s[c]=[]);const f=u[c];M4(s[c],Array.isArray(f)?f:f?[f]:[])}}}function M4(e,r){let l=-1;const i=[];for(;++l<r.length;)(r[l].add==="after"?e:i).push(r[l]);kn(e,0,0,i)}function o0(e,r){const l=Number.parseInt(e,r);return l<9||l===11||l>13&&l<32||l>126&&l<160||l>55295&&l<57344||l>64975&&l<65008||(l&65535)===65535||(l&65535)===65534||l>1114111?"�":String.fromCodePoint(l)}function qn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Kt=sl(/[A-Za-z]/),Vt=sl(/[\dA-Za-z]/),z4=sl(/[#-'*+\--9=?A-Z^-~]/);function Vs(e){return e!==null&&(e<32||e===127)}const $d=sl(/\d/),B4=sl(/[\dA-Fa-f]/),F4=sl(/[!-/:-@[-`{-~]/);function Ae(e){return e!==null&&e<-2}function st(e){return e!==null&&(e<0||e===32)}function Ie(e){return e===-2||e===-1||e===32}const gu=sl(new RegExp("\\p{P}|\\p{S}","u")),Ol=sl(/\s/);function sl(e){return r;function r(l){return l!==null&&l>-1&&e.test(String.fromCharCode(l))}}function Mi(e){const r=[];let l=-1,i=0,s=0;for(;++l<e.length;){const u=e.charCodeAt(l);let c="";if(u===37&&Vt(e.charCodeAt(l+1))&&Vt(e.charCodeAt(l+2)))s=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(l+1);u<56320&&f>56319&&f<57344?(c=String.fromCharCode(u,f),s=1):c="�"}else c=String.fromCharCode(u);c&&(r.push(e.slice(i,l),encodeURIComponent(c)),i=l+s+1,c=""),s&&(l+=s,s=0)}return r.join("")+e.slice(i)}function Ve(e,r,l,i){const s=i?i-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(h){return Ie(h)?(e.enter(l),f(h)):r(h)}function f(h){return Ie(h)&&u++<s?(e.consume(h),f):(e.exit(l),r(h))}}const I4={tokenize:U4};function U4(e){const r=e.attempt(this.parser.constructs.contentInitial,i,s);let l;return r;function i(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ve(e,r,"linePrefix")}function s(f){return e.enter("paragraph"),u(f)}function u(f){const h=e.enter("chunkText",{contentType:"text",previous:l});return l&&(l.next=h),l=h,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Ae(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),c)}}const H4={tokenize:P4},Hy={tokenize:q4};function P4(e){const r=this,l=[];let i=0,s,u,c;return f;function f(j){if(i<l.length){const B=l[i];return r.containerState=B[1],e.attempt(B[0].continuation,h,p)(j)}return p(j)}function h(j){if(i++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,s&&N();const B=r.events.length;let P=B,L;for(;P--;)if(r.events[P][0]==="exit"&&r.events[P][1].type==="chunkFlow"){L=r.events[P][1].end;break}E(i);let M=B;for(;M<r.events.length;)r.events[M][1].end={...L},M++;return kn(r.events,P+1,0,r.events.slice(B)),r.events.length=M,p(j)}return f(j)}function p(j){if(i===l.length){if(!s)return v(j);if(s.currentConstruct&&s.currentConstruct.concrete)return w(j);r.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return r.containerState={},e.check(Hy,m,b)(j)}function m(j){return s&&N(),E(i),v(j)}function b(j){return r.parser.lazy[r.now().line]=i!==l.length,c=r.now().offset,w(j)}function v(j){return r.containerState={},e.attempt(Hy,x,w)(j)}function x(j){return i++,l.push([r.currentConstruct,r.containerState]),v(j)}function w(j){if(j===null){s&&N(),E(0),e.consume(j);return}return s=s||r.parser.flow(r.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:u}),S(j)}function S(j){if(j===null){C(e.exit("chunkFlow"),!0),E(0),e.consume(j);return}return Ae(j)?(e.consume(j),C(e.exit("chunkFlow")),i=0,r.interrupt=void 0,f):(e.consume(j),S)}function C(j,B){const P=r.sliceStream(j);if(B&&P.push(null),j.previous=u,u&&(u.next=j),u=j,s.defineSkip(j.start),s.write(P),r.parser.lazy[j.start.line]){let L=s.events.length;for(;L--;)if(s.events[L][1].start.offset<c&&(!s.events[L][1].end||s.events[L][1].end.offset>c))return;const M=r.events.length;let H=M,G,z;for(;H--;)if(r.events[H][0]==="exit"&&r.events[H][1].type==="chunkFlow"){if(G){z=r.events[H][1].end;break}G=!0}for(E(i),L=M;L<r.events.length;)r.events[L][1].end={...z},L++;kn(r.events,H+1,0,r.events.slice(M)),r.events.length=L}}function E(j){let B=l.length;for(;B-- >j;){const P=l[B];r.containerState=P[1],P[0].exit.call(r,e)}l.length=j}function N(){s.write([null]),u=void 0,s=void 0,r.containerState._closeFlow=void 0}}function q4(e,r,l){return Ve(e,e.attempt(this.parser.constructs.document,r,l),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Li(e){if(e===null||st(e)||Ol(e))return 1;if(gu(e))return 2}function mu(e,r,l){const i=[];let s=-1;for(;++s<e.length;){const u=e[s].resolveAll;u&&!i.includes(u)&&(r=u(r,l),i.push(u))}return r}const Vd={name:"attention",resolveAll:$4,tokenize:V4};function $4(e,r){let l=-1,i,s,u,c,f,h,p,m;for(;++l<e.length;)if(e[l][0]==="enter"&&e[l][1].type==="attentionSequence"&&e[l][1]._close){for(i=l;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&r.sliceSerialize(e[i][1]).charCodeAt(0)===r.sliceSerialize(e[l][1]).charCodeAt(0)){if((e[i][1]._close||e[l][1]._open)&&(e[l][1].end.offset-e[l][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[l][1].end.offset-e[l][1].start.offset)%3))continue;h=e[i][1].end.offset-e[i][1].start.offset>1&&e[l][1].end.offset-e[l][1].start.offset>1?2:1;const b={...e[i][1].end},v={...e[l][1].start};Py(b,-h),Py(v,h),c={type:h>1?"strongSequence":"emphasisSequence",start:b,end:{...e[i][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[l][1].start},end:v},u={type:h>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[l][1].start}},s={type:h>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[i][1].end={...c.start},e[l][1].start={...f.end},p=[],e[i][1].end.offset-e[i][1].start.offset&&(p=zn(p,[["enter",e[i][1],r],["exit",e[i][1],r]])),p=zn(p,[["enter",s,r],["enter",c,r],["exit",c,r],["enter",u,r]]),p=zn(p,mu(r.parser.constructs.insideSpan.null,e.slice(i+1,l),r)),p=zn(p,[["exit",u,r],["enter",f,r],["exit",f,r],["exit",s,r]]),e[l][1].end.offset-e[l][1].start.offset?(m=2,p=zn(p,[["enter",e[l][1],r],["exit",e[l][1],r]])):m=0,kn(e,i-1,l-i+3,p),l=i+p.length-m-2;break}}for(l=-1;++l<e.length;)e[l][1].type==="attentionSequence"&&(e[l][1].type="data");return e}function V4(e,r){const l=this.parser.constructs.attentionMarkers.null,i=this.previous,s=Li(i);let u;return c;function c(h){return u=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===u)return e.consume(h),f;const p=e.exit("attentionSequence"),m=Li(h),b=!m||m===2&&s||l.includes(h),v=!s||s===2&&m||l.includes(i);return p._open=!!(u===42?b:b&&(s||!v)),p._close=!!(u===42?v:v&&(m||!b)),r(h)}}function Py(e,r){e.column+=r,e.offset+=r,e._bufferIndex+=r}const G4={name:"autolink",tokenize:Y4};function Y4(e,r,l){let i=0;return s;function s(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(x){return Kt(x)?(e.consume(x),c):x===64?l(x):p(x)}function c(x){return x===43||x===45||x===46||Vt(x)?(i=1,f(x)):p(x)}function f(x){return x===58?(e.consume(x),i=0,h):(x===43||x===45||x===46||Vt(x))&&i++<32?(e.consume(x),f):(i=0,p(x))}function h(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),r):x===null||x===32||x===60||Vs(x)?l(x):(e.consume(x),h)}function p(x){return x===64?(e.consume(x),m):z4(x)?(e.consume(x),p):l(x)}function m(x){return Vt(x)?b(x):l(x)}function b(x){return x===46?(e.consume(x),i=0,m):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),r):v(x)}function v(x){if((x===45||Vt(x))&&i++<63){const w=x===45?v:b;return e.consume(x),w}return l(x)}}const Wa={partial:!0,tokenize:X4};function X4(e,r,l){return i;function i(u){return Ie(u)?Ve(e,s,"linePrefix")(u):s(u)}function s(u){return u===null||Ae(u)?r(u):l(u)}}const s0={continuation:{tokenize:Q4},exit:K4,name:"blockQuote",tokenize:Z4};function Z4(e,r,l){const i=this;return s;function s(c){if(c===62){const f=i.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),u}return l(c)}function u(c){return Ie(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),r):(e.exit("blockQuotePrefix"),r(c))}}function Q4(e,r,l){const i=this;return s;function s(c){return Ie(c)?Ve(e,u,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt(s0,r,l)(c)}}function K4(e){e.exit("blockQuote")}const u0={name:"characterEscape",tokenize:J4};function J4(e,r,l){return i;function i(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),s}function s(u){return F4(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),r):l(u)}}const c0={name:"characterReference",tokenize:W4};function W4(e,r,l){const i=this;let s=0,u,c;return f;function f(b){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),h}function h(b){return b===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(b),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),u=31,c=Vt,m(b))}function p(b){return b===88||b===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(b),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,c=B4,m):(e.enter("characterReferenceValue"),u=7,c=$d,m(b))}function m(b){if(b===59&&s){const v=e.exit("characterReferenceValue");return c===Vt&&!Ch(i.sliceSerialize(v))?l(b):(e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),e.exit("characterReference"),r)}return c(b)&&s++<u?(e.consume(b),m):l(b)}}const qy={partial:!0,tokenize:tN},$y={concrete:!0,name:"codeFenced",tokenize:eN};function eN(e,r,l){const i=this,s={partial:!0,tokenize:P};let u=0,c=0,f;return h;function h(L){return p(L)}function p(L){const M=i.events[i.events.length-1];return u=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,f=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(L)}function m(L){return L===f?(c++,e.consume(L),m):c<3?l(L):(e.exit("codeFencedFenceSequence"),Ie(L)?Ve(e,b,"whitespace")(L):b(L))}function b(L){return L===null||Ae(L)?(e.exit("codeFencedFence"),i.interrupt?r(L):e.check(qy,S,B)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(L))}function v(L){return L===null||Ae(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),b(L)):Ie(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ve(e,x,"whitespace")(L)):L===96&&L===f?l(L):(e.consume(L),v)}function x(L){return L===null||Ae(L)?b(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(L))}function w(L){return L===null||Ae(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),b(L)):L===96&&L===f?l(L):(e.consume(L),w)}function S(L){return e.attempt(s,B,C)(L)}function C(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),E}function E(L){return u>0&&Ie(L)?Ve(e,N,"linePrefix",u+1)(L):N(L)}function N(L){return L===null||Ae(L)?e.check(qy,S,B)(L):(e.enter("codeFlowValue"),j(L))}function j(L){return L===null||Ae(L)?(e.exit("codeFlowValue"),N(L)):(e.consume(L),j)}function B(L){return e.exit("codeFenced"),r(L)}function P(L,M,H){let G=0;return z;function z(X){return L.enter("lineEnding"),L.consume(X),L.exit("lineEnding"),V}function V(X){return L.enter("codeFencedFence"),Ie(X)?Ve(L,Y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):Y(X)}function Y(X){return X===f?(L.enter("codeFencedFenceSequence"),J(X)):H(X)}function J(X){return X===f?(G++,L.consume(X),J):G>=c?(L.exit("codeFencedFenceSequence"),Ie(X)?Ve(L,I,"whitespace")(X):I(X)):H(X)}function I(X){return X===null||Ae(X)?(L.exit("codeFencedFence"),M(X)):H(X)}}}function tN(e,r,l){const i=this;return s;function s(c){return c===null?l(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return i.parser.lazy[i.now().line]?l(c):r(c)}}const Qf={name:"codeIndented",tokenize:rN},nN={partial:!0,tokenize:lN};function rN(e,r,l){const i=this;return s;function s(p){return e.enter("codeIndented"),Ve(e,u,"linePrefix",5)(p)}function u(p){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?c(p):l(p)}function c(p){return p===null?h(p):Ae(p)?e.attempt(nN,c,h)(p):(e.enter("codeFlowValue"),f(p))}function f(p){return p===null||Ae(p)?(e.exit("codeFlowValue"),c(p)):(e.consume(p),f)}function h(p){return e.exit("codeIndented"),r(p)}}function lN(e,r,l){const i=this;return s;function s(c){return i.parser.lazy[i.now().line]?l(c):Ae(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):Ve(e,u,"linePrefix",5)(c)}function u(c){const f=i.events[i.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?r(c):Ae(c)?s(c):l(c)}}const iN={name:"codeText",previous:oN,resolve:aN,tokenize:sN};function aN(e){let r=e.length-4,l=3,i,s;if((e[l][1].type==="lineEnding"||e[l][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(i=l;++i<r;)if(e[i][1].type==="codeTextData"){e[l][1].type="codeTextPadding",e[r][1].type="codeTextPadding",l+=2,r-=2;break}}for(i=l-1,r++;++i<=r;)s===void 0?i!==r&&e[i][1].type!=="lineEnding"&&(s=i):(i===r||e[i][1].type==="lineEnding")&&(e[s][1].type="codeTextData",i!==s+2&&(e[s][1].end=e[i-1][1].end,e.splice(s+2,i-s-2),r-=i-s-2,i=s+2),s=void 0);return e}function oN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sN(e,r,l){let i=0,s,u;return c;function c(b){return e.enter("codeText"),e.enter("codeTextSequence"),f(b)}function f(b){return b===96?(e.consume(b),i++,f):(e.exit("codeTextSequence"),h(b))}function h(b){return b===null?l(b):b===32?(e.enter("space"),e.consume(b),e.exit("space"),h):b===96?(u=e.enter("codeTextSequence"),s=0,m(b)):Ae(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),h):(e.enter("codeTextData"),p(b))}function p(b){return b===null||b===32||b===96||Ae(b)?(e.exit("codeTextData"),h(b)):(e.consume(b),p)}function m(b){return b===96?(e.consume(b),s++,m):s===i?(e.exit("codeTextSequence"),e.exit("codeText"),r(b)):(u.type="codeTextData",p(b))}}class uN{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,l){const i=l??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(r,i):r>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(r,l,i){const s=l||0;this.setCursor(Math.trunc(r));const u=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&_a(this.left,i),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),_a(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),_a(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const l=this.left.splice(r,Number.POSITIVE_INFINITY);_a(this.right,l.reverse())}else{const l=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);_a(this.left,l.reverse())}}}function _a(e,r){let l=0;if(r.length<1e4)e.push(...r);else for(;l<r.length;)e.push(...r.slice(l,l+1e4)),l+=1e4}function f0(e){const r={};let l=-1,i,s,u,c,f,h,p;const m=new uN(e);for(;++l<m.length;){for(;l in r;)l=r[l];if(i=m.get(l),l&&i[1].type==="chunkFlow"&&m.get(l-1)[1].type==="listItemPrefix"&&(h=i[1]._tokenizer.events,u=0,u<h.length&&h[u][1].type==="lineEndingBlank"&&(u+=2),u<h.length&&h[u][1].type==="content"))for(;++u<h.length&&h[u][1].type!=="content";)h[u][1].type==="chunkText"&&(h[u][1]._isInFirstContentOfListItem=!0,u++);if(i[0]==="enter")i[1].contentType&&(Object.assign(r,cN(m,l)),l=r[l],p=!0);else if(i[1]._container){for(u=l,s=void 0;u--;)if(c=m.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(m.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(i[1].end={...m.get(s)[1].start},f=m.slice(s,l),f.unshift(i),m.splice(s,l-s+1,f))}}return kn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!p}function cN(e,r){const l=e.get(r)[1],i=e.get(r)[2];let s=r-1;const u=[];let c=l._tokenizer;c||(c=i.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,h=[],p={};let m,b,v=-1,x=l,w=0,S=0;const C=[S];for(;x;){for(;e.get(++s)[1]!==x;);u.push(s),x._tokenizer||(m=i.sliceStream(x),x.next||m.push(null),b&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(m),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),b=x,x=x.next}for(x=l;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(S=v+1,C.push(S),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):C.pop(),v=C.length;v--;){const E=f.slice(C[v],C[v+1]),N=u.pop();h.push([N,N+E.length-1]),e.splice(N,2,E)}for(h.reverse(),v=-1;++v<h.length;)p[w+h[v][0]]=w+h[v][1],w+=h[v][1]-h[v][0]-1;return p}const fN={resolve:hN,tokenize:pN},dN={partial:!0,tokenize:gN};function hN(e){return f0(e),e}function pN(e,r){let l;return i;function i(f){return e.enter("content"),l=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?u(f):Ae(f)?e.check(dN,c,u)(f):(e.consume(f),s)}function u(f){return e.exit("chunkContent"),e.exit("content"),r(f)}function c(f){return e.consume(f),e.exit("chunkContent"),l.next=e.enter("chunkContent",{contentType:"content",previous:l}),l=l.next,s}}function gN(e,r,l){const i=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ve(e,u,"linePrefix")}function u(c){if(c===null||Ae(c))return l(c);const f=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?r(c):e.interrupt(i.parser.constructs.flow,l,r)(c)}}function d0(e,r,l,i,s,u,c,f,h){const p=h||Number.POSITIVE_INFINITY;let m=0;return b;function b(E){return E===60?(e.enter(i),e.enter(s),e.enter(u),e.consume(E),e.exit(u),v):E===null||E===32||E===41||Vs(E)?l(E):(e.enter(i),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),S(E))}function v(E){return E===62?(e.enter(u),e.consume(E),e.exit(u),e.exit(s),e.exit(i),r):(e.enter(f),e.enter("chunkString",{contentType:"string"}),x(E))}function x(E){return E===62?(e.exit("chunkString"),e.exit(f),v(E)):E===null||E===60||Ae(E)?l(E):(e.consume(E),E===92?w:x)}function w(E){return E===60||E===62||E===92?(e.consume(E),x):x(E)}function S(E){return!m&&(E===null||E===41||st(E))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(i),r(E)):m<p&&E===40?(e.consume(E),m++,S):E===41?(e.consume(E),m--,S):E===null||E===32||E===40||Vs(E)?l(E):(e.consume(E),E===92?C:S)}function C(E){return E===40||E===41||E===92?(e.consume(E),S):S(E)}}function h0(e,r,l,i,s,u){const c=this;let f=0,h;return p;function p(x){return e.enter(i),e.enter(s),e.consume(x),e.exit(s),e.enter(u),m}function m(x){return f>999||x===null||x===91||x===93&&!h||x===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?l(x):x===93?(e.exit(u),e.enter(s),e.consume(x),e.exit(s),e.exit(i),r):Ae(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),b(x))}function b(x){return x===null||x===91||x===93||Ae(x)||f++>999?(e.exit("chunkString"),m(x)):(e.consume(x),h||(h=!Ie(x)),x===92?v:b)}function v(x){return x===91||x===92||x===93?(e.consume(x),f++,b):b(x)}}function p0(e,r,l,i,s,u){let c;return f;function f(v){return v===34||v===39||v===40?(e.enter(i),e.enter(s),e.consume(v),e.exit(s),c=v===40?41:v,h):l(v)}function h(v){return v===c?(e.enter(s),e.consume(v),e.exit(s),e.exit(i),r):(e.enter(u),p(v))}function p(v){return v===c?(e.exit(u),h(c)):v===null?l(v):Ae(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Ve(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===c||v===null||Ae(v)?(e.exit("chunkString"),p(v)):(e.consume(v),v===92?b:m)}function b(v){return v===c||v===92?(e.consume(v),m):m(v)}}function Fa(e,r){let l;return i;function i(s){return Ae(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),l=!0,i):Ie(s)?Ve(e,i,l?"linePrefix":"lineSuffix")(s):r(s)}}const mN={name:"definition",tokenize:yN},bN={partial:!0,tokenize:xN};function yN(e,r,l){const i=this;let s;return u;function u(x){return e.enter("definition"),c(x)}function c(x){return h0.call(i,e,f,l,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function f(x){return s=qn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),h):l(x)}function h(x){return st(x)?Fa(e,p)(x):p(x)}function p(x){return d0(e,m,l,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function m(x){return e.attempt(bN,b,b)(x)}function b(x){return Ie(x)?Ve(e,v,"whitespace")(x):v(x)}function v(x){return x===null||Ae(x)?(e.exit("definition"),i.parser.defined.push(s),r(x)):l(x)}}function xN(e,r,l){return i;function i(f){return st(f)?Fa(e,s)(f):l(f)}function s(f){return p0(e,u,l,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return Ie(f)?Ve(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Ae(f)?r(f):l(f)}}const vN={name:"hardBreakEscape",tokenize:wN};function wN(e,r,l){return i;function i(u){return e.enter("hardBreakEscape"),e.consume(u),s}function s(u){return Ae(u)?(e.exit("hardBreakEscape"),r(u)):l(u)}}const SN={name:"headingAtx",resolve:kN,tokenize:EN};function kN(e,r){let l=e.length-2,i=3,s,u;return e[i][1].type==="whitespace"&&(i+=2),l-2>i&&e[l][1].type==="whitespace"&&(l-=2),e[l][1].type==="atxHeadingSequence"&&(i===l-1||l-4>i&&e[l-2][1].type==="whitespace")&&(l-=i+1===l?2:4),l>i&&(s={type:"atxHeadingText",start:e[i][1].start,end:e[l][1].end},u={type:"chunkText",start:e[i][1].start,end:e[l][1].end,contentType:"text"},kn(e,i,l-i+1,[["enter",s,r],["enter",u,r],["exit",u,r],["exit",s,r]])),e}function EN(e,r,l){let i=0;return s;function s(m){return e.enter("atxHeading"),u(m)}function u(m){return e.enter("atxHeadingSequence"),c(m)}function c(m){return m===35&&i++<6?(e.consume(m),c):m===null||st(m)?(e.exit("atxHeadingSequence"),f(m)):l(m)}function f(m){return m===35?(e.enter("atxHeadingSequence"),h(m)):m===null||Ae(m)?(e.exit("atxHeading"),r(m)):Ie(m)?Ve(e,f,"whitespace")(m):(e.enter("atxHeadingText"),p(m))}function h(m){return m===35?(e.consume(m),h):(e.exit("atxHeadingSequence"),f(m))}function p(m){return m===null||m===35||st(m)?(e.exit("atxHeadingText"),f(m)):(e.consume(m),p)}}const CN=["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"],Vy=["pre","script","style","textarea"],NN={concrete:!0,name:"htmlFlow",resolveTo:jN,tokenize:RN},AN={partial:!0,tokenize:LN},TN={partial:!0,tokenize:_N};function jN(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function RN(e,r,l){const i=this;let s,u,c,f,h;return p;function p(A){return m(A)}function m(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),b}function b(A){return A===33?(e.consume(A),v):A===47?(e.consume(A),u=!0,S):A===63?(e.consume(A),s=3,i.interrupt?r:R):Kt(A)?(e.consume(A),c=String.fromCharCode(A),C):l(A)}function v(A){return A===45?(e.consume(A),s=2,x):A===91?(e.consume(A),s=5,f=0,w):Kt(A)?(e.consume(A),s=4,i.interrupt?r:R):l(A)}function x(A){return A===45?(e.consume(A),i.interrupt?r:R):l(A)}function w(A){const ne="CDATA[";return A===ne.charCodeAt(f++)?(e.consume(A),f===ne.length?i.interrupt?r:Y:w):l(A)}function S(A){return Kt(A)?(e.consume(A),c=String.fromCharCode(A),C):l(A)}function C(A){if(A===null||A===47||A===62||st(A)){const ne=A===47,re=c.toLowerCase();return!ne&&!u&&Vy.includes(re)?(s=1,i.interrupt?r(A):Y(A)):CN.includes(c.toLowerCase())?(s=6,ne?(e.consume(A),E):i.interrupt?r(A):Y(A)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?l(A):u?N(A):j(A))}return A===45||Vt(A)?(e.consume(A),c+=String.fromCharCode(A),C):l(A)}function E(A){return A===62?(e.consume(A),i.interrupt?r:Y):l(A)}function N(A){return Ie(A)?(e.consume(A),N):z(A)}function j(A){return A===47?(e.consume(A),z):A===58||A===95||Kt(A)?(e.consume(A),B):Ie(A)?(e.consume(A),j):z(A)}function B(A){return A===45||A===46||A===58||A===95||Vt(A)?(e.consume(A),B):P(A)}function P(A){return A===61?(e.consume(A),L):Ie(A)?(e.consume(A),P):j(A)}function L(A){return A===null||A===60||A===61||A===62||A===96?l(A):A===34||A===39?(e.consume(A),h=A,M):Ie(A)?(e.consume(A),L):H(A)}function M(A){return A===h?(e.consume(A),h=null,G):A===null||Ae(A)?l(A):(e.consume(A),M)}function H(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||st(A)?P(A):(e.consume(A),H)}function G(A){return A===47||A===62||Ie(A)?j(A):l(A)}function z(A){return A===62?(e.consume(A),V):l(A)}function V(A){return A===null||Ae(A)?Y(A):Ie(A)?(e.consume(A),V):l(A)}function Y(A){return A===45&&s===2?(e.consume(A),F):A===60&&s===1?(e.consume(A),Z):A===62&&s===4?(e.consume(A),D):A===63&&s===3?(e.consume(A),R):A===93&&s===5?(e.consume(A),$):Ae(A)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(AN,U,J)(A)):A===null||Ae(A)?(e.exit("htmlFlowData"),J(A)):(e.consume(A),Y)}function J(A){return e.check(TN,I,U)(A)}function I(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),X}function X(A){return A===null||Ae(A)?J(A):(e.enter("htmlFlowData"),Y(A))}function F(A){return A===45?(e.consume(A),R):Y(A)}function Z(A){return A===47?(e.consume(A),c="",O):Y(A)}function O(A){if(A===62){const ne=c.toLowerCase();return Vy.includes(ne)?(e.consume(A),D):Y(A)}return Kt(A)&&c.length<8?(e.consume(A),c+=String.fromCharCode(A),O):Y(A)}function $(A){return A===93?(e.consume(A),R):Y(A)}function R(A){return A===62?(e.consume(A),D):A===45&&s===2?(e.consume(A),R):Y(A)}function D(A){return A===null||Ae(A)?(e.exit("htmlFlowData"),U(A)):(e.consume(A),D)}function U(A){return e.exit("htmlFlow"),r(A)}}function _N(e,r,l){const i=this;return s;function s(c){return Ae(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):l(c)}function u(c){return i.parser.lazy[i.now().line]?l(c):r(c)}}function LN(e,r,l){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Wa,r,l)}}const DN={name:"htmlText",tokenize:ON};function ON(e,r,l){const i=this;let s,u,c;return f;function f(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),h}function h(R){return R===33?(e.consume(R),p):R===47?(e.consume(R),P):R===63?(e.consume(R),j):Kt(R)?(e.consume(R),H):l(R)}function p(R){return R===45?(e.consume(R),m):R===91?(e.consume(R),u=0,w):Kt(R)?(e.consume(R),N):l(R)}function m(R){return R===45?(e.consume(R),x):l(R)}function b(R){return R===null?l(R):R===45?(e.consume(R),v):Ae(R)?(c=b,Z(R)):(e.consume(R),b)}function v(R){return R===45?(e.consume(R),x):b(R)}function x(R){return R===62?F(R):R===45?v(R):b(R)}function w(R){const D="CDATA[";return R===D.charCodeAt(u++)?(e.consume(R),u===D.length?S:w):l(R)}function S(R){return R===null?l(R):R===93?(e.consume(R),C):Ae(R)?(c=S,Z(R)):(e.consume(R),S)}function C(R){return R===93?(e.consume(R),E):S(R)}function E(R){return R===62?F(R):R===93?(e.consume(R),E):S(R)}function N(R){return R===null||R===62?F(R):Ae(R)?(c=N,Z(R)):(e.consume(R),N)}function j(R){return R===null?l(R):R===63?(e.consume(R),B):Ae(R)?(c=j,Z(R)):(e.consume(R),j)}function B(R){return R===62?F(R):j(R)}function P(R){return Kt(R)?(e.consume(R),L):l(R)}function L(R){return R===45||Vt(R)?(e.consume(R),L):M(R)}function M(R){return Ae(R)?(c=M,Z(R)):Ie(R)?(e.consume(R),M):F(R)}function H(R){return R===45||Vt(R)?(e.consume(R),H):R===47||R===62||st(R)?G(R):l(R)}function G(R){return R===47?(e.consume(R),F):R===58||R===95||Kt(R)?(e.consume(R),z):Ae(R)?(c=G,Z(R)):Ie(R)?(e.consume(R),G):F(R)}function z(R){return R===45||R===46||R===58||R===95||Vt(R)?(e.consume(R),z):V(R)}function V(R){return R===61?(e.consume(R),Y):Ae(R)?(c=V,Z(R)):Ie(R)?(e.consume(R),V):G(R)}function Y(R){return R===null||R===60||R===61||R===62||R===96?l(R):R===34||R===39?(e.consume(R),s=R,J):Ae(R)?(c=Y,Z(R)):Ie(R)?(e.consume(R),Y):(e.consume(R),I)}function J(R){return R===s?(e.consume(R),s=void 0,X):R===null?l(R):Ae(R)?(c=J,Z(R)):(e.consume(R),J)}function I(R){return R===null||R===34||R===39||R===60||R===61||R===96?l(R):R===47||R===62||st(R)?G(R):(e.consume(R),I)}function X(R){return R===47||R===62||st(R)?G(R):l(R)}function F(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),r):l(R)}function Z(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),O}function O(R){return Ie(R)?Ve(e,$,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):$(R)}function $(R){return e.enter("htmlTextData"),c(R)}}const Nh={name:"labelEnd",resolveAll:FN,resolveTo:IN,tokenize:UN},MN={tokenize:HN},zN={tokenize:PN},BN={tokenize:qN};function FN(e){let r=-1;const l=[];for(;++r<e.length;){const i=e[r][1];if(l.push(e[r]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const s=i.type==="labelImage"?4:2;i.type="data",r+=s}}return e.length!==l.length&&kn(e,0,e.length,l),e}function IN(e,r){let l=e.length,i=0,s,u,c,f;for(;l--;)if(s=e[l][1],u){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[l][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[l][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(u=l,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(c=l);const h={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[u][1].start},end:{...e[c][1].end}},m={type:"labelText",start:{...e[u+i+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",h,r],["enter",p,r]],f=zn(f,e.slice(u+1,u+i+3)),f=zn(f,[["enter",m,r]]),f=zn(f,mu(r.parser.constructs.insideSpan.null,e.slice(u+i+4,c-3),r)),f=zn(f,[["exit",m,r],e[c-2],e[c-1],["exit",p,r]]),f=zn(f,e.slice(c+1)),f=zn(f,[["exit",h,r]]),kn(e,u,e.length,f),e}function UN(e,r,l){const i=this;let s=i.events.length,u,c;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){u=i.events[s][1];break}return f;function f(v){return u?u._inactive?b(v):(c=i.parser.defined.includes(qn(i.sliceSerialize({start:u.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),h):l(v)}function h(v){return v===40?e.attempt(MN,m,c?m:b)(v):v===91?e.attempt(zN,m,c?p:b)(v):c?m(v):b(v)}function p(v){return e.attempt(BN,m,b)(v)}function m(v){return r(v)}function b(v){return u._balanced=!0,l(v)}}function HN(e,r,l){return i;function i(b){return e.enter("resource"),e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),s}function s(b){return st(b)?Fa(e,u)(b):u(b)}function u(b){return b===41?m(b):d0(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function c(b){return st(b)?Fa(e,h)(b):m(b)}function f(b){return l(b)}function h(b){return b===34||b===39||b===40?p0(e,p,l,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):m(b)}function p(b){return st(b)?Fa(e,m)(b):m(b)}function m(b){return b===41?(e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),e.exit("resource"),r):l(b)}}function PN(e,r,l){const i=this;return s;function s(f){return h0.call(i,e,u,c,"reference","referenceMarker","referenceString")(f)}function u(f){return i.parser.defined.includes(qn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?r(f):l(f)}function c(f){return l(f)}}function qN(e,r,l){return i;function i(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),s}function s(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),r):l(u)}}const $N={name:"labelStartImage",resolveAll:Nh.resolveAll,tokenize:VN};function VN(e,r,l){const i=this;return s;function s(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):l(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in i.parser.constructs?l(f):r(f)}}const GN={name:"labelStartLink",resolveAll:Nh.resolveAll,tokenize:YN};function YN(e,r,l){const i=this;return s;function s(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?l(c):r(c)}}const Kf={name:"lineEnding",tokenize:XN};function XN(e,r){return l;function l(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ve(e,r,"linePrefix")}}const _s={name:"thematicBreak",tokenize:ZN};function ZN(e,r,l){let i=0,s;return u;function u(p){return e.enter("thematicBreak"),c(p)}function c(p){return s=p,f(p)}function f(p){return p===s?(e.enter("thematicBreakSequence"),h(p)):i>=3&&(p===null||Ae(p))?(e.exit("thematicBreak"),r(p)):l(p)}function h(p){return p===s?(e.consume(p),i++,h):(e.exit("thematicBreakSequence"),Ie(p)?Ve(e,f,"whitespace")(p):f(p))}}const an={continuation:{tokenize:WN},exit:tA,name:"list",tokenize:JN},QN={partial:!0,tokenize:nA},KN={partial:!0,tokenize:eA};function JN(e,r,l){const i=this,s=i.events[i.events.length-1];let u=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return f;function f(x){const w=i.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!i.containerState.marker||x===i.containerState.marker:$d(x)){if(i.containerState.type||(i.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(_s,l,p)(x):p(x);if(!i.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(x)}return l(x)}function h(x){return $d(x)&&++c<10?(e.consume(x),h):(!i.interrupt||c<2)&&(i.containerState.marker?x===i.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),p(x)):l(x)}function p(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||x,e.check(Wa,i.interrupt?l:m,e.attempt(QN,v,b))}function m(x){return i.containerState.initialBlankLine=!0,u++,v(x)}function b(x){return Ie(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),v):l(x)}function v(x){return i.containerState.size=u+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(x)}}function WN(e,r,l){const i=this;return i.containerState._closeFlow=void 0,e.check(Wa,s,u);function s(f){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ve(e,r,"listItemIndent",i.containerState.size+1)(f)}function u(f){return i.containerState.furtherBlankLines||!Ie(f)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(f)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(KN,r,c)(f))}function c(f){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ve(e,e.attempt(an,r,l),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function eA(e,r,l){const i=this;return Ve(e,s,"listItemIndent",i.containerState.size+1);function s(u){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?r(u):l(u)}}function tA(e){e.exit(this.containerState.type)}function nA(e,r,l){const i=this;return Ve(e,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(u){const c=i.events[i.events.length-1];return!Ie(u)&&c&&c[1].type==="listItemPrefixWhitespace"?r(u):l(u)}}const Gy={name:"setextUnderline",resolveTo:rA,tokenize:lA};function rA(e,r){let l=e.length,i,s,u;for(;l--;)if(e[l][0]==="enter"){if(e[l][1].type==="content"){i=l;break}e[l][1].type==="paragraph"&&(s=l)}else e[l][1].type==="content"&&e.splice(l,1),!u&&e[l][1].type==="definition"&&(u=l);const c={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",u?(e.splice(s,0,["enter",c,r]),e.splice(u+1,0,["exit",e[i][1],r]),e[i][1].end={...e[u][1].end}):e[i][1]=c,e.push(["exit",c,r]),e}function lA(e,r,l){const i=this;let s;return u;function u(p){let m=i.events.length,b;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){b=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||b)?(e.enter("setextHeadingLine"),s=p,c(p)):l(p)}function c(p){return e.enter("setextHeadingLineSequence"),f(p)}function f(p){return p===s?(e.consume(p),f):(e.exit("setextHeadingLineSequence"),Ie(p)?Ve(e,h,"lineSuffix")(p):h(p))}function h(p){return p===null||Ae(p)?(e.exit("setextHeadingLine"),r(p)):l(p)}}const iA={tokenize:aA};function aA(e){const r=this,l=e.attempt(Wa,i,e.attempt(this.parser.constructs.flowInitial,s,Ve(e,e.attempt(this.parser.constructs.flow,s,e.attempt(fN,s)),"linePrefix")));return l;function i(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),r.currentConstruct=void 0,l}function s(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),r.currentConstruct=void 0,l}}const oA={resolveAll:m0()},sA=g0("string"),uA=g0("text");function g0(e){return{resolveAll:m0(e==="text"?cA:void 0),tokenize:r};function r(l){const i=this,s=this.parser.constructs[e],u=l.attempt(s,c,f);return c;function c(m){return p(m)?u(m):f(m)}function f(m){if(m===null){l.consume(m);return}return l.enter("data"),l.consume(m),h}function h(m){return p(m)?(l.exit("data"),u(m)):(l.consume(m),h)}function p(m){if(m===null)return!0;const b=s[m];let v=-1;if(b)for(;++v<b.length;){const x=b[v];if(!x.previous||x.previous.call(i,i.previous))return!0}return!1}}}function m0(e){return r;function r(l,i){let s=-1,u;for(;++s<=l.length;)u===void 0?l[s]&&l[s][1].type==="data"&&(u=s,s++):(!l[s]||l[s][1].type!=="data")&&(s!==u+2&&(l[u][1].end=l[s-1][1].end,l.splice(u+2,s-u-2),s=u+2),u=void 0);return e?e(l,i):l}}function cA(e,r){let l=0;for(;++l<=e.length;)if((l===e.length||e[l][1].type==="lineEnding")&&e[l-1][1].type==="data"){const i=e[l-1][1],s=r.sliceStream(i);let u=s.length,c=-1,f=0,h;for(;u--;){const p=s[u];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(p===-2)h=!0,f++;else if(p!==-1){u++;break}}if(r._contentTypeTextTrailing&&l===e.length&&(f=0),f){const p={type:l===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:i.start._bufferIndex+c,_index:i.start._index+u,line:i.end.line,column:i.end.column-f,offset:i.end.offset-f},end:{...i.end}};i.end={...p.start},i.start.offset===i.end.offset?Object.assign(i,p):(e.splice(l,0,["enter",p,r],["exit",p,r]),l+=2)}l++}return e}const fA={42:an,43:an,45:an,48:an,49:an,50:an,51:an,52:an,53:an,54:an,55:an,56:an,57:an,62:s0},dA={91:mN},hA={[-2]:Qf,[-1]:Qf,32:Qf},pA={35:SN,42:_s,45:[Gy,_s],60:NN,61:Gy,95:_s,96:$y,126:$y},gA={38:c0,92:u0},mA={[-5]:Kf,[-4]:Kf,[-3]:Kf,33:$N,38:c0,42:Vd,60:[G4,DN],91:GN,92:[vN,u0],93:Nh,95:Vd,96:iN},bA={null:[Vd,oA]},yA={null:[42,95]},xA={null:[]},vA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:yA,contentInitial:dA,disable:xA,document:fA,flow:pA,flowInitial:hA,insideSpan:bA,string:gA,text:mA},Symbol.toStringTag,{value:"Module"}));function wA(e,r,l){let i={_bufferIndex:-1,_index:0,line:l&&l.line||1,column:l&&l.column||1,offset:l&&l.offset||0};const s={},u=[];let c=[],f=[];const h={attempt:M(P),check:M(L),consume:N,enter:j,exit:B,interrupt:M(L,{interrupt:!0})},p={code:null,containerState:{},defineSkip:S,events:[],now:w,parser:e,previous:null,sliceSerialize:v,sliceStream:x,write:b};let m=r.tokenize.call(p,h);return r.resolveAll&&u.push(r),p;function b(V){return c=zn(c,V),C(),c[c.length-1]!==null?[]:(H(r,0),p.events=mu(u,p.events,p),p.events)}function v(V,Y){return kA(x(V),Y)}function x(V){return SA(c,V)}function w(){const{_bufferIndex:V,_index:Y,line:J,column:I,offset:X}=i;return{_bufferIndex:V,_index:Y,line:J,column:I,offset:X}}function S(V){s[V.line]=V.column,z()}function C(){let V;for(;i._index<c.length;){const Y=c[i._index];if(typeof Y=="string")for(V=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===V&&i._bufferIndex<Y.length;)E(Y.charCodeAt(i._bufferIndex));else E(Y)}}function E(V){m=m(V)}function N(V){Ae(V)?(i.line++,i.column=1,i.offset+=V===-3?2:1,z()):V!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),p.previous=V}function j(V,Y){const J=Y||{};return J.type=V,J.start=w(),p.events.push(["enter",J,p]),f.push(J),J}function B(V){const Y=f.pop();return Y.end=w(),p.events.push(["exit",Y,p]),Y}function P(V,Y){H(V,Y.from)}function L(V,Y){Y.restore()}function M(V,Y){return J;function J(I,X,F){let Z,O,$,R;return Array.isArray(I)?U(I):"tokenize"in I?U([I]):D(I);function D(fe){return ge;function ge(ye){const pe=ye!==null&&fe[ye],me=ye!==null&&fe.null,xe=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(me)?me:me?[me]:[]];return U(xe)(ye)}}function U(fe){return Z=fe,O=0,fe.length===0?F:A(fe[O])}function A(fe){return ge;function ge(ye){return R=G(),$=fe,fe.partial||(p.currentConstruct=fe),fe.name&&p.parser.constructs.disable.null.includes(fe.name)?re():fe.tokenize.call(Y?Object.assign(Object.create(p),Y):p,h,ne,re)(ye)}}function ne(fe){return V($,R),X}function re(fe){return R.restore(),++O<Z.length?A(Z[O]):F}}}function H(V,Y){V.resolveAll&&!u.includes(V)&&u.push(V),V.resolve&&kn(p.events,Y,p.events.length-Y,V.resolve(p.events.slice(Y),p)),V.resolveTo&&(p.events=V.resolveTo(p.events,p))}function G(){const V=w(),Y=p.previous,J=p.currentConstruct,I=p.events.length,X=Array.from(f);return{from:I,restore:F};function F(){i=V,p.previous=Y,p.currentConstruct=J,p.events.length=I,f=X,z()}}function z(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function SA(e,r){const l=r.start._index,i=r.start._bufferIndex,s=r.end._index,u=r.end._bufferIndex;let c;if(l===s)c=[e[l].slice(i,u)];else{if(c=e.slice(l,s),i>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(i):c.shift()}u>0&&c.push(e[s].slice(0,u))}return c}function kA(e,r){let l=-1;const i=[];let s;for(;++l<e.length;){const u=e[l];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
31
- `;break}case-3:{c=`\r
32
- `;break}case-2:{c=r?" ":" ";break}case-1:{if(!r&&s)continue;c=" ";break}default:c=String.fromCharCode(u)}s=u===-2,i.push(c)}return i.join("")}function EA(e){const i={constructs:a0([vA,...(e||{}).extensions||[]]),content:s(I4),defined:[],document:s(H4),flow:s(iA),lazy:{},string:s(sA),text:s(uA)};return i;function s(u){return c;function c(f){return wA(i,u,f)}}}function CA(e){for(;!f0(e););return e}const Yy=/[\0\t\n\r]/g;function NA(){let e=1,r="",l=!0,i;return s;function s(u,c,f){const h=[];let p,m,b,v,x;for(u=r+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),b=0,r="",l&&(u.charCodeAt(0)===65279&&b++,l=void 0);b<u.length;){if(Yy.lastIndex=b,p=Yy.exec(u),v=p&&p.index!==void 0?p.index:u.length,x=u.charCodeAt(v),!p){r=u.slice(b);break}if(x===10&&b===v&&i)h.push(-3),i=void 0;else switch(i&&(h.push(-5),i=void 0),b<v&&(h.push(u.slice(b,v)),e+=v-b),x){case 0:{h.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,h.push(-2);e++<m;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:i=!0,e=1}b=v+1}return f&&(i&&h.push(-5),r&&h.push(r),h.push(null)),h}}const AA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function TA(e){return e.replace(AA,jA)}function jA(e,r,l){if(r)return r;if(l.charCodeAt(0)===35){const s=l.charCodeAt(1),u=s===120||s===88;return o0(l.slice(u?2:1),u?16:10)}return Ch(l)||e}const b0={}.hasOwnProperty;function RA(e,r,l){return typeof r!="string"&&(l=r,r=void 0),_A(l)(CA(EA(l).document().write(NA()(e,r,!0))))}function _A(e){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(pt),autolinkProtocol:G,autolinkEmail:G,atxHeading:u($e),blockQuote:u(me),characterEscape:G,characterReference:G,codeFenced:u(xe),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(xe,c),codeText:u(de,c),codeTextData:G,data:G,codeFlowValue:G,definition:u(ve),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(ke),hardBreakEscape:u(Qe),hardBreakTrailing:u(Qe),htmlFlow:u(ze,c),htmlFlowData:G,htmlText:u(ze,c),htmlTextData:G,image:u(Bt),label:c,link:u(pt),listItem:u(Ft),listItemValue:v,listOrdered:u(mt,b),listUnordered:u(mt),paragraph:u(it),reference:A,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u($e),strong:u(It),thematicBreak:u($n)},exit:{atxHeading:h(),atxHeadingSequence:P,autolink:h(),autolinkEmail:pe,autolinkProtocol:ye,blockQuote:h(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:fe,characterReference:ge,codeFenced:h(C),codeFencedFence:S,codeFencedFenceInfo:x,codeFencedFenceMeta:w,codeFlowValue:z,codeIndented:h(E),codeText:h(X),codeTextData:z,data:z,definition:h(),definitionDestinationString:B,definitionLabelString:N,definitionTitleString:j,emphasis:h(),hardBreakEscape:h(Y),hardBreakTrailing:h(Y),htmlFlow:h(J),htmlFlowData:z,htmlText:h(I),htmlTextData:z,image:h(Z),label:$,labelText:O,lineEnding:V,link:h(F),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ne,resourceDestinationString:R,resourceTitleString:D,resource:U,setextHeading:h(H),setextHeadingLineSequence:M,setextHeadingText:L,strong:h(),thematicBreak:h()}};y0(r,(e||{}).mdastExtensions||[]);const l={};return i;function i(oe){let be={type:"root",children:[]};const je={stack:[be],tokenStack:[],config:r,enter:f,exit:p,buffer:c,resume:m,data:l},Me=[];let Ge=-1;for(;++Ge<oe.length;)if(oe[Ge][1].type==="listOrdered"||oe[Ge][1].type==="listUnordered")if(oe[Ge][0]==="enter")Me.push(Ge);else{const Yt=Me.pop();Ge=s(oe,Yt,Ge)}for(Ge=-1;++Ge<oe.length;){const Yt=r[oe[Ge][0]];b0.call(Yt,oe[Ge][1].type)&&Yt[oe[Ge][1].type].call(Object.assign({sliceSerialize:oe[Ge][2].sliceSerialize},je),oe[Ge][1])}if(je.tokenStack.length>0){const Yt=je.tokenStack[je.tokenStack.length-1];(Yt[1]||Xy).call(je,void 0,Yt[0])}for(be.position={start:Wr(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:Wr(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},Ge=-1;++Ge<r.transforms.length;)be=r.transforms[Ge](be)||be;return be}function s(oe,be,je){let Me=be-1,Ge=-1,Yt=!1,Fn,Lt,gt,jt;for(;++Me<=je;){const Ke=oe[Me];switch(Ke[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ke[0]==="enter"?Ge++:Ge--,jt=void 0;break}case"lineEndingBlank":{Ke[0]==="enter"&&(Fn&&!jt&&!Ge&&!gt&&(gt=Me),jt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:jt=void 0}if(!Ge&&Ke[0]==="enter"&&Ke[1].type==="listItemPrefix"||Ge===-1&&Ke[0]==="exit"&&(Ke[1].type==="listUnordered"||Ke[1].type==="listOrdered")){if(Fn){let En=Me;for(Lt=void 0;En--;){const Xt=oe[En];if(Xt[1].type==="lineEnding"||Xt[1].type==="lineEndingBlank"){if(Xt[0]==="exit")continue;Lt&&(oe[Lt][1].type="lineEndingBlank",Yt=!0),Xt[1].type="lineEnding",Lt=En}else if(!(Xt[1].type==="linePrefix"||Xt[1].type==="blockQuotePrefix"||Xt[1].type==="blockQuotePrefixWhitespace"||Xt[1].type==="blockQuoteMarker"||Xt[1].type==="listItemIndent"))break}gt&&(!Lt||gt<Lt)&&(Fn._spread=!0),Fn.end=Object.assign({},Lt?oe[Lt][1].start:Ke[1].end),oe.splice(Lt||Me,0,["exit",Fn,Ke[2]]),Me++,je++}if(Ke[1].type==="listItemPrefix"){const En={type:"listItem",_spread:!1,start:Object.assign({},Ke[1].start),end:void 0};Fn=En,oe.splice(Me,0,["enter",En,Ke[2]]),Me++,je++,gt=void 0,jt=!0}}}return oe[be][1]._spread=Yt,je}function u(oe,be){return je;function je(Me){f.call(this,oe(Me),Me),be&&be.call(this,Me)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(oe,be,je){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([be,je||void 0]),oe.position={start:Wr(be.start),end:void 0}}function h(oe){return be;function be(je){oe&&oe.call(this,je),p.call(this,je)}}function p(oe,be){const je=this.stack.pop(),Me=this.tokenStack.pop();if(Me)Me[0].type!==oe.type&&(be?be.call(this,oe,Me[0]):(Me[1]||Xy).call(this,oe,Me[0]));else throw new Error("Cannot close `"+oe.type+"` ("+Ba({start:oe.start,end:oe.end})+"): it’s not open");je.position.end=Wr(oe.end)}function m(){return Eh(this.stack.pop())}function b(){this.data.expectingFirstListItemValue=!0}function v(oe){if(this.data.expectingFirstListItemValue){const be=this.stack[this.stack.length-2];be.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function x(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.lang=oe}function w(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.meta=oe}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.value=oe.replace(/(\r?\n|\r)$/g,"")}function N(oe){const be=this.resume(),je=this.stack[this.stack.length-1];je.label=be,je.identifier=qn(this.sliceSerialize(oe)).toLowerCase()}function j(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.title=oe}function B(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.url=oe}function P(oe){const be=this.stack[this.stack.length-1];if(!be.depth){const je=this.sliceSerialize(oe).length;be.depth=je}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function M(oe){const be=this.stack[this.stack.length-1];be.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function G(oe){const je=this.stack[this.stack.length-1].children;let Me=je[je.length-1];(!Me||Me.type!=="text")&&(Me=at(),Me.position={start:Wr(oe.start),end:void 0},je.push(Me)),this.stack.push(Me)}function z(oe){const be=this.stack.pop();be.value+=this.sliceSerialize(oe),be.position.end=Wr(oe.end)}function V(oe){const be=this.stack[this.stack.length-1];if(this.data.atHardBreak){const je=be.children[be.children.length-1];je.position.end=Wr(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(be.type)&&(G.call(this,oe),z.call(this,oe))}function Y(){this.data.atHardBreak=!0}function J(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.value=oe}function I(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.value=oe}function X(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.value=oe}function F(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=be,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function Z(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=be,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function O(oe){const be=this.sliceSerialize(oe),je=this.stack[this.stack.length-2];je.label=TA(be),je.identifier=qn(be).toLowerCase()}function $(){const oe=this.stack[this.stack.length-1],be=this.resume(),je=this.stack[this.stack.length-1];if(this.data.inReference=!0,je.type==="link"){const Me=oe.children;je.children=Me}else je.alt=be}function R(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.url=oe}function D(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.title=oe}function U(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function ne(oe){const be=this.resume(),je=this.stack[this.stack.length-1];je.label=be,je.identifier=qn(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function re(oe){this.data.characterReferenceType=oe.type}function fe(oe){const be=this.sliceSerialize(oe),je=this.data.characterReferenceType;let Me;je?(Me=o0(be,je==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Me=Ch(be);const Ge=this.stack[this.stack.length-1];Ge.value+=Me}function ge(oe){const be=this.stack.pop();be.position.end=Wr(oe.end)}function ye(oe){z.call(this,oe);const be=this.stack[this.stack.length-1];be.url=this.sliceSerialize(oe)}function pe(oe){z.call(this,oe);const be=this.stack[this.stack.length-1];be.url="mailto:"+this.sliceSerialize(oe)}function me(){return{type:"blockquote",children:[]}}function xe(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function ve(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ke(){return{type:"emphasis",children:[]}}function $e(){return{type:"heading",depth:0,children:[]}}function Qe(){return{type:"break"}}function ze(){return{type:"html",value:""}}function Bt(){return{type:"image",title:null,url:"",alt:null}}function pt(){return{type:"link",title:null,url:"",children:[]}}function mt(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function Ft(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function it(){return{type:"paragraph",children:[]}}function It(){return{type:"strong",children:[]}}function at(){return{type:"text",value:""}}function $n(){return{type:"thematicBreak"}}}function Wr(e){return{line:e.line,column:e.column,offset:e.offset}}function y0(e,r){let l=-1;for(;++l<r.length;){const i=r[l];Array.isArray(i)?y0(e,i):LA(e,i)}}function LA(e,r){let l;for(l in r)if(b0.call(r,l))switch(l){case"canContainEols":{const i=r[l];i&&e[l].push(...i);break}case"transforms":{const i=r[l];i&&e[l].push(...i);break}case"enter":case"exit":{const i=r[l];i&&Object.assign(e[l],i);break}}}function Xy(e,r){throw e?new Error("Cannot close `"+e.type+"` ("+Ba({start:e.start,end:e.end})+"): a different token (`"+r.type+"`, "+Ba({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+Ba({start:r.start,end:r.end})+") is still open")}function DA(e){const r=this;r.parser=l;function l(i){return RA(i,{...r.data("settings"),...e,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function OA(e,r){const l={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(r),!0)};return e.patch(r,l),e.applyData(r,l)}function MA(e,r){const l={type:"element",tagName:"br",properties:{},children:[]};return e.patch(r,l),[e.applyData(r,l),{type:"text",value:`
33
- `}]}function zA(e,r){const l=r.value?r.value+`
34
- `:"",i={},s=r.lang?r.lang.split(/\s+/):[];s.length>0&&(i.className=["language-"+s[0]]);let u={type:"element",tagName:"code",properties:i,children:[{type:"text",value:l}]};return r.meta&&(u.data={meta:r.meta}),e.patch(r,u),u=e.applyData(r,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(r,u),u}function BA(e,r){const l={type:"element",tagName:"del",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function FA(e,r){const l={type:"element",tagName:"em",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function IA(e,r){const l=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(r.identifier).toUpperCase(),s=Mi(i.toLowerCase()),u=e.footnoteOrder.indexOf(i);let c,f=e.footnoteCounts.get(i);f===void 0?(f=0,e.footnoteOrder.push(i),c=e.footnoteOrder.length):c=u+1,f+=1,e.footnoteCounts.set(i,f);const h={type:"element",tagName:"a",properties:{href:"#"+l+"fn-"+s,id:l+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(r,h);const p={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(r,p),e.applyData(r,p)}function UA(e,r){const l={type:"element",tagName:"h"+r.depth,properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function HA(e,r){if(e.options.allowDangerousHtml){const l={type:"raw",value:r.value};return e.patch(r,l),e.applyData(r,l)}}function x0(e,r){const l=r.referenceType;let i="]";if(l==="collapsed"?i+="[]":l==="full"&&(i+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+i}];const s=e.all(r),u=s[0];u&&u.type==="text"?u.value="["+u.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=i:s.push({type:"text",value:i}),s}function PA(e,r){const l=String(r.identifier).toUpperCase(),i=e.definitionById.get(l);if(!i)return x0(e,r);const s={src:Mi(i.url||""),alt:r.alt};i.title!==null&&i.title!==void 0&&(s.title=i.title);const u={type:"element",tagName:"img",properties:s,children:[]};return e.patch(r,u),e.applyData(r,u)}function qA(e,r){const l={src:Mi(r.url)};r.alt!==null&&r.alt!==void 0&&(l.alt=r.alt),r.title!==null&&r.title!==void 0&&(l.title=r.title);const i={type:"element",tagName:"img",properties:l,children:[]};return e.patch(r,i),e.applyData(r,i)}function $A(e,r){const l={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};e.patch(r,l);const i={type:"element",tagName:"code",properties:{},children:[l]};return e.patch(r,i),e.applyData(r,i)}function VA(e,r){const l=String(r.identifier).toUpperCase(),i=e.definitionById.get(l);if(!i)return x0(e,r);const s={href:Mi(i.url||"")};i.title!==null&&i.title!==void 0&&(s.title=i.title);const u={type:"element",tagName:"a",properties:s,children:e.all(r)};return e.patch(r,u),e.applyData(r,u)}function GA(e,r){const l={href:Mi(r.url)};r.title!==null&&r.title!==void 0&&(l.title=r.title);const i={type:"element",tagName:"a",properties:l,children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function YA(e,r,l){const i=e.all(r),s=l?XA(l):v0(r),u={},c=[];if(typeof r.checked=="boolean"){const m=i[0];let b;m&&m.type==="element"&&m.tagName==="p"?b=m:(b={type:"element",tagName:"p",properties:{},children:[]},i.unshift(b)),b.children.length>0&&b.children.unshift({type:"text",value:" "}),b.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<i.length;){const m=i[f];(s||f!==0||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
35
- `}),m.type==="element"&&m.tagName==="p"&&!s?c.push(...m.children):c.push(m)}const h=i[i.length-1];h&&(s||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
36
- `});const p={type:"element",tagName:"li",properties:u,children:c};return e.patch(r,p),e.applyData(r,p)}function XA(e){let r=!1;if(e.type==="list"){r=e.spread||!1;const l=e.children;let i=-1;for(;!r&&++i<l.length;)r=v0(l[i])}return r}function v0(e){const r=e.spread;return r??e.children.length>1}function ZA(e,r){const l={},i=e.all(r);let s=-1;for(typeof r.start=="number"&&r.start!==1&&(l.start=r.start);++s<i.length;){const c=i[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){l.className=["contains-task-list"];break}}const u={type:"element",tagName:r.ordered?"ol":"ul",properties:l,children:e.wrap(i,!0)};return e.patch(r,u),e.applyData(r,u)}function QA(e,r){const l={type:"element",tagName:"p",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function KA(e,r){const l={type:"root",children:e.wrap(e.all(r))};return e.patch(r,l),e.applyData(r,l)}function JA(e,r){const l={type:"element",tagName:"strong",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function WA(e,r){const l=e.all(r),i=l.shift(),s=[];if(i){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(r.children[0],c),s.push(c)}if(l.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(l,!0)},f=vh(r.children[1]),h=W1(r.children[r.children.length-1]);f&&h&&(c.position={start:f,end:h}),s.push(c)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(r,u),e.applyData(r,u)}function e6(e,r,l){const i=l?l.children:void 0,u=(i?i.indexOf(r):1)===0?"th":"td",c=l&&l.type==="table"?l.align:void 0,f=c?c.length:r.children.length;let h=-1;const p=[];for(;++h<f;){const b=r.children[h],v={},x=c?c[h]:void 0;x&&(v.align=x);let w={type:"element",tagName:u,properties:v,children:[]};b&&(w.children=e.all(b),e.patch(b,w),w=e.applyData(b,w)),p.push(w)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(r,m),e.applyData(r,m)}function t6(e,r){const l={type:"element",tagName:"td",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}const Zy=9,Qy=32;function n6(e){const r=String(e),l=/\r?\n|\r/g;let i=l.exec(r),s=0;const u=[];for(;i;)u.push(Ky(r.slice(s,i.index),s>0,!0),i[0]),s=i.index+i[0].length,i=l.exec(r);return u.push(Ky(r.slice(s),s>0,!1)),u.join("")}function Ky(e,r,l){let i=0,s=e.length;if(r){let u=e.codePointAt(i);for(;u===Zy||u===Qy;)i++,u=e.codePointAt(i)}if(l){let u=e.codePointAt(s-1);for(;u===Zy||u===Qy;)s--,u=e.codePointAt(s-1)}return s>i?e.slice(i,s):""}function r6(e,r){const l={type:"text",value:n6(String(r.value))};return e.patch(r,l),e.applyData(r,l)}function l6(e,r){const l={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(r,l),e.applyData(r,l)}const i6={blockquote:OA,break:MA,code:zA,delete:BA,emphasis:FA,footnoteReference:IA,heading:UA,html:HA,imageReference:PA,image:qA,inlineCode:$A,linkReference:VA,link:GA,listItem:YA,list:ZA,paragraph:QA,root:KA,strong:JA,table:WA,tableCell:t6,tableRow:e6,text:r6,thematicBreak:l6,toml:Es,yaml:Es,definition:Es,footnoteDefinition:Es};function Es(){}const w0=-1,bu=0,Ia=1,Gs=2,Ah=3,Th=4,jh=5,Rh=6,S0=7,k0=8,Jy=typeof self=="object"?self:globalThis,a6=(e,r)=>{const l=(s,u)=>(e.set(u,s),s),i=s=>{if(e.has(s))return e.get(s);const[u,c]=r[s];switch(u){case bu:case w0:return l(c,s);case Ia:{const f=l([],s);for(const h of c)f.push(i(h));return f}case Gs:{const f=l({},s);for(const[h,p]of c)f[i(h)]=i(p);return f}case Ah:return l(new Date(c),s);case Th:{const{source:f,flags:h}=c;return l(new RegExp(f,h),s)}case jh:{const f=l(new Map,s);for(const[h,p]of c)f.set(i(h),i(p));return f}case Rh:{const f=l(new Set,s);for(const h of c)f.add(i(h));return f}case S0:{const{name:f,message:h}=c;return l(new Jy[f](h),s)}case k0:return l(BigInt(c),s);case"BigInt":return l(Object(BigInt(c)),s);case"ArrayBuffer":return l(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return l(new DataView(f),c)}}return l(new Jy[u](c),s)};return i},Wy=e=>a6(new Map,e)(0),Si="",{toString:o6}={},{keys:s6}=Object,La=e=>{const r=typeof e;if(r!=="object"||!e)return[bu,r];const l=o6.call(e).slice(8,-1);switch(l){case"Array":return[Ia,Si];case"Object":return[Gs,Si];case"Date":return[Ah,Si];case"RegExp":return[Th,Si];case"Map":return[jh,Si];case"Set":return[Rh,Si];case"DataView":return[Ia,l]}return l.includes("Array")?[Ia,l]:l.includes("Error")?[S0,l]:[Gs,l]},Cs=([e,r])=>e===bu&&(r==="function"||r==="symbol"),u6=(e,r,l,i)=>{const s=(c,f)=>{const h=i.push(c)-1;return l.set(f,h),h},u=c=>{if(l.has(c))return l.get(c);let[f,h]=La(c);switch(f){case bu:{let m=c;switch(h){case"bigint":f=k0,m=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);m=null;break;case"undefined":return s([w0],c)}return s([f,m],c)}case Ia:{if(h){let v=c;return h==="DataView"?v=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(v=new Uint8Array(c)),s([h,[...v]],c)}const m=[],b=s([f,m],c);for(const v of c)m.push(u(v));return b}case Gs:{if(h)switch(h){case"BigInt":return s([h,c.toString()],c);case"Boolean":case"Number":case"String":return s([h,c.valueOf()],c)}if(r&&"toJSON"in c)return u(c.toJSON());const m=[],b=s([f,m],c);for(const v of s6(c))(e||!Cs(La(c[v])))&&m.push([u(v),u(c[v])]);return b}case Ah:return s([f,c.toISOString()],c);case Th:{const{source:m,flags:b}=c;return s([f,{source:m,flags:b}],c)}case jh:{const m=[],b=s([f,m],c);for(const[v,x]of c)(e||!(Cs(La(v))||Cs(La(x))))&&m.push([u(v),u(x)]);return b}case Rh:{const m=[],b=s([f,m],c);for(const v of c)(e||!Cs(La(v)))&&m.push(u(v));return b}}const{message:p}=c;return s([f,{name:h,message:p}],c)};return u},ex=(e,{json:r,lossy:l}={})=>{const i=[];return u6(!(r||l),!!r,new Map,i)(e),i},Ys=typeof structuredClone=="function"?(e,r)=>r&&("json"in r||"lossy"in r)?Wy(ex(e,r)):structuredClone(e):(e,r)=>Wy(ex(e,r));function c6(e,r){const l=[{type:"text",value:"↩"}];return r>1&&l.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),l}function f6(e,r){return"Back to reference "+(e+1)+(r>1?"-"+r:"")}function d6(e){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=e.options.footnoteBackContent||c6,i=e.options.footnoteBackLabel||f6,s=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[h]);if(!p)continue;const m=e.all(p),b=String(p.identifier).toUpperCase(),v=Mi(b.toLowerCase());let x=0;const w=[],S=e.footnoteCounts.get(b);for(;S!==void 0&&++x<=S;){w.length>0&&w.push({type:"text",value:" "});let N=typeof l=="string"?l:l(h,x);typeof N=="string"&&(N={type:"text",value:N}),w.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+v+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(h,x),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const C=m[m.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const N=C.children[C.children.length-1];N&&N.type==="text"?N.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...w)}else m.push(...w);const E={type:"element",tagName:"li",properties:{id:r+"fn-"+v},children:e.wrap(m,!0)};e.patch(p,E),f.push(E)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Ys(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
37
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
38
- `}]}}const yu=(function(e){if(e==null)return m6;if(typeof e=="function")return xu(e);if(typeof e=="object")return Array.isArray(e)?h6(e):p6(e);if(typeof e=="string")return g6(e);throw new Error("Expected function, string, or object as test")});function h6(e){const r=[];let l=-1;for(;++l<e.length;)r[l]=yu(e[l]);return xu(i);function i(...s){let u=-1;for(;++u<r.length;)if(r[u].apply(this,s))return!0;return!1}}function p6(e){const r=e;return xu(l);function l(i){const s=i;let u;for(u in e)if(s[u]!==r[u])return!1;return!0}}function g6(e){return xu(r);function r(l){return l&&l.type===e}}function xu(e){return r;function r(l,i,s){return!!(b6(l)&&e.call(this,l,typeof i=="number"?i:void 0,s||void 0))}}function m6(){return!0}function b6(e){return e!==null&&typeof e=="object"&&"type"in e}const E0=[],y6=!0,Gd=!1,x6="skip";function C0(e,r,l,i){let s;typeof r=="function"&&typeof l!="function"?(i=l,l=r):s=r;const u=yu(s),c=i?-1:1;f(e,void 0,[])();function f(h,p,m){const b=h&&typeof h=="object"?h:{};if(typeof b.type=="string"){const x=typeof b.tagName=="string"?b.tagName:typeof b.name=="string"?b.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(h.type+(x?"<"+x+">":""))+")"})}return v;function v(){let x=E0,w,S,C;if((!r||u(h,p,m[m.length-1]||void 0))&&(x=v6(l(h,m)),x[0]===Gd))return x;if("children"in h&&h.children){const E=h;if(E.children&&x[0]!==x6)for(S=(i?E.children.length:-1)+c,C=m.concat(E);S>-1&&S<E.children.length;){const N=E.children[S];if(w=f(N,S,C)(),w[0]===Gd)return w;S=typeof w[1]=="number"?w[1]:S+c}}return x}}}function v6(e){return Array.isArray(e)?e:typeof e=="number"?[y6,e]:e==null?E0:[e]}function _h(e,r,l,i){let s,u,c;typeof r=="function"&&typeof l!="function"?(u=void 0,c=r,s=l):(u=r,c=l,s=i),C0(e,u,f,s);function f(h,p){const m=p[p.length-1],b=m?m.children.indexOf(h):void 0;return c(h,b,m)}}const Yd={}.hasOwnProperty,w6={};function S6(e,r){const l=r||w6,i=new Map,s=new Map,u=new Map,c={...i6,...l.handlers},f={all:p,applyData:E6,definitionById:i,footnoteById:s,footnoteCounts:u,footnoteOrder:[],handlers:c,one:h,options:l,patch:k6,wrap:N6};return _h(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const b=m.type==="definition"?i:s,v=String(m.identifier).toUpperCase();b.has(v)||b.set(v,m)}}),f;function h(m,b){const v=m.type,x=f.handlers[v];if(Yd.call(f.handlers,v)&&x)return x(f,m,b);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in m){const{children:S,...C}=m,E=Ys(C);return E.children=f.all(m),E}return Ys(m)}return(f.options.unknownHandler||C6)(f,m,b)}function p(m){const b=[];if("children"in m){const v=m.children;let x=-1;for(;++x<v.length;){const w=f.one(v[x],m);if(w){if(x&&v[x-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=tx(w.value)),!Array.isArray(w)&&w.type==="element")){const S=w.children[0];S&&S.type==="text"&&(S.value=tx(S.value))}Array.isArray(w)?b.push(...w):b.push(w)}}}return b}}function k6(e,r){e.position&&(r.position=f4(e))}function E6(e,r){let l=r;if(e&&e.data){const i=e.data.hName,s=e.data.hChildren,u=e.data.hProperties;if(typeof i=="string")if(l.type==="element")l.tagName=i;else{const c="children"in l?l.children:[l];l={type:"element",tagName:i,properties:{},children:c}}l.type==="element"&&u&&Object.assign(l.properties,Ys(u)),"children"in l&&l.children&&s!==null&&s!==void 0&&(l.children=s)}return l}function C6(e,r){const l=r.data||{},i="value"in r&&!(Yd.call(l,"hProperties")||Yd.call(l,"hChildren"))?{type:"text",value:r.value}:{type:"element",tagName:"div",properties:{},children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function N6(e,r){const l=[];let i=-1;for(r&&l.push({type:"text",value:`
39
- `});++i<e.length;)i&&l.push({type:"text",value:`
40
- `}),l.push(e[i]);return r&&e.length>0&&l.push({type:"text",value:`
41
- `}),l}function tx(e){let r=0,l=e.charCodeAt(r);for(;l===9||l===32;)r++,l=e.charCodeAt(r);return e.slice(r)}function nx(e,r){const l=S6(e,r),i=l.one(e,void 0),s=d6(l),u=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return s&&u.children.push({type:"text",value:`
42
- `},s),u}function A6(e,r){return e&&"run"in e?async function(l,i){const s=nx(l,{file:i,...r});await e.run(s,i)}:function(l,i){return nx(l,{file:i,...e||r})}}function rx(e){if(e)throw e}var Jf,lx;function T6(){if(lx)return Jf;lx=1;var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,l=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(p){return typeof Array.isArray=="function"?Array.isArray(p):r.call(p)==="[object Array]"},u=function(p){if(!p||r.call(p)!=="[object Object]")return!1;var m=e.call(p,"constructor"),b=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!m&&!b)return!1;var v;for(v in p);return typeof v>"u"||e.call(p,v)},c=function(p,m){l&&m.name==="__proto__"?l(p,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):p[m.name]=m.newValue},f=function(p,m){if(m==="__proto__")if(e.call(p,m)){if(i)return i(p,m).value}else return;return p[m]};return Jf=function h(){var p,m,b,v,x,w,S=arguments[0],C=1,E=arguments.length,N=!1;for(typeof S=="boolean"&&(N=S,S=arguments[1]||{},C=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});C<E;++C)if(p=arguments[C],p!=null)for(m in p)b=f(S,m),v=f(p,m),S!==v&&(N&&v&&(u(v)||(x=s(v)))?(x?(x=!1,w=b&&s(b)?b:[]):w=b&&u(b)?b:{},c(S,{name:m,newValue:h(N,w,v)})):typeof v<"u"&&c(S,{name:m,newValue:v}));return S},Jf}var j6=T6();const Wf=tu(j6);function Xd(e){if(typeof e!="object"||e===null)return!1;const r=Object.getPrototypeOf(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function R6(){const e=[],r={run:l,use:i};return r;function l(...s){let u=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...s);function f(h,...p){const m=e[++u];let b=-1;if(h){c(h);return}for(;++b<s.length;)(p[b]===null||p[b]===void 0)&&(p[b]=s[b]);s=p,m?_6(m,f)(...p):c(null,...p)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),r}}function _6(e,r){let l;return i;function i(...c){const f=e.length>c.length;let h;f&&c.push(s);try{h=e.apply(this,c)}catch(p){const m=p;if(f&&l)throw m;return s(m)}f||(h&&h.then&&typeof h.then=="function"?h.then(u,s):h instanceof Error?s(h):u(h))}function s(c,...f){l||(l=!0,r(c,...f))}function u(c){s(null,c)}}const Qn={basename:L6,dirname:D6,extname:O6,join:M6,sep:"/"};function L6(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');eo(e);let l=0,i=-1,s=e.length,u;if(r===void 0||r.length===0||r.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(u){l=s+1;break}}else i<0&&(u=!0,i=s+1);return i<0?"":e.slice(l,i)}if(r===e)return"";let c=-1,f=r.length-1;for(;s--;)if(e.codePointAt(s)===47){if(u){l=s+1;break}}else c<0&&(u=!0,c=s+1),f>-1&&(e.codePointAt(s)===r.codePointAt(f--)?f<0&&(i=s):(f=-1,i=c));return l===i?i=c:i<0&&(i=e.length),e.slice(l,i)}function D6(e){if(eo(e),e.length===0)return".";let r=-1,l=e.length,i;for(;--l;)if(e.codePointAt(l)===47){if(i){r=l;break}}else i||(i=!0);return r<0?e.codePointAt(0)===47?"/":".":r===1&&e.codePointAt(0)===47?"//":e.slice(0,r)}function O6(e){eo(e);let r=e.length,l=-1,i=0,s=-1,u=0,c;for(;r--;){const f=e.codePointAt(r);if(f===47){if(c){i=r+1;break}continue}l<0&&(c=!0,l=r+1),f===46?s<0?s=r:u!==1&&(u=1):s>-1&&(u=-1)}return s<0||l<0||u===0||u===1&&s===l-1&&s===i+1?"":e.slice(s,l)}function M6(...e){let r=-1,l;for(;++r<e.length;)eo(e[r]),e[r]&&(l=l===void 0?e[r]:l+"/"+e[r]);return l===void 0?".":z6(l)}function z6(e){eo(e);const r=e.codePointAt(0)===47;let l=B6(e,!r);return l.length===0&&!r&&(l="."),l.length>0&&e.codePointAt(e.length-1)===47&&(l+="/"),r?"/"+l:l}function B6(e,r){let l="",i=0,s=-1,u=0,c=-1,f,h;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(s===c-1||u===1))if(s!==c-1&&u===2){if(l.length<2||i!==2||l.codePointAt(l.length-1)!==46||l.codePointAt(l.length-2)!==46){if(l.length>2){if(h=l.lastIndexOf("/"),h!==l.length-1){h<0?(l="",i=0):(l=l.slice(0,h),i=l.length-1-l.lastIndexOf("/")),s=c,u=0;continue}}else if(l.length>0){l="",i=0,s=c,u=0;continue}}r&&(l=l.length>0?l+"/..":"..",i=2)}else l.length>0?l+="/"+e.slice(s+1,c):l=e.slice(s+1,c),i=c-s-1;s=c,u=0}else f===46&&u>-1?u++:u=-1}return l}function eo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const F6={cwd:I6};function I6(){return"/"}function Zd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function U6(e){if(typeof e=="string")e=new URL(e);else if(!Zd(e)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(e.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return H6(e)}function H6(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 r=e.pathname;let l=-1;for(;++l<r.length;)if(r.codePointAt(l)===37&&r.codePointAt(l+1)===50){const i=r.codePointAt(l+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(r)}const ed=["history","path","basename","stem","extname","dirname"];class N0{constructor(r){let l;r?Zd(r)?l={path:r}:typeof r=="string"||P6(r)?l={value:r}:l=r:l={},this.cwd="cwd"in l?"":F6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<ed.length;){const u=ed[i];u in l&&l[u]!==void 0&&l[u]!==null&&(this[u]=u==="history"?[...l[u]]:l[u])}let s;for(s in l)ed.includes(s)||(this[s]=l[s])}get basename(){return typeof this.path=="string"?Qn.basename(this.path):void 0}set basename(r){nd(r,"basename"),td(r,"basename"),this.path=Qn.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?Qn.dirname(this.path):void 0}set dirname(r){ix(this.basename,"dirname"),this.path=Qn.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?Qn.extname(this.path):void 0}set extname(r){if(td(r,"extname"),ix(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Qn.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){Zd(r)&&(r=U6(r)),nd(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?Qn.basename(this.path,this.extname):void 0}set stem(r){nd(r,"stem"),td(r,"stem"),this.path=Qn.join(this.dirname||"",r+(this.extname||""))}fail(r,l,i){const s=this.message(r,l,i);throw s.fatal=!0,s}info(r,l,i){const s=this.message(r,l,i);return s.fatal=void 0,s}message(r,l,i){const s=new Gt(r,l,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function td(e,r){if(e&&e.includes(Qn.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+Qn.sep+"`")}function nd(e,r){if(!e)throw new Error("`"+r+"` cannot be empty")}function ix(e,r){if(!e)throw new Error("Setting `"+r+"` requires `path` to be set too")}function P6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const q6=(function(e){const i=this.constructor.prototype,s=i[e],u=function(){return s.apply(u,arguments)};return Object.setPrototypeOf(u,i),u}),$6={}.hasOwnProperty;class Lh extends q6{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=R6()}copy(){const r=new Lh;let l=-1;for(;++l<this.attachers.length;){const i=this.attachers[l];r.use(...i)}return r.data(Wf(!0,{},this.namespace)),r}data(r,l){return typeof r=="string"?arguments.length===2?(id("data",this.frozen),this.namespace[r]=l,this):$6.call(this.namespace,r)&&this.namespace[r]||void 0:r?(id("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;const r=this;for(;++this.freezeIndex<this.attachers.length;){const[l,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=l.call(r,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const l=Ns(r),i=this.parser||this.Parser;return rd("parse",i),i(String(l),l)}process(r,l){const i=this;return this.freeze(),rd("process",this.parser||this.Parser),ld("process",this.compiler||this.Compiler),l?s(void 0,l):new Promise(s);function s(u,c){const f=Ns(r),h=i.parse(f);i.run(h,f,function(m,b,v){if(m||!b||!v)return p(m);const x=b,w=i.stringify(x,v);Y6(w)?v.value=w:v.result=w,p(m,v)});function p(m,b){m||!b?c(m):u?u(b):l(void 0,b)}}}processSync(r){let l=!1,i;return this.freeze(),rd("processSync",this.parser||this.Parser),ld("processSync",this.compiler||this.Compiler),this.process(r,s),ox("processSync","process",l),i;function s(u,c){l=!0,rx(u),i=c}}run(r,l,i){ax(r),this.freeze();const s=this.transformers;return!i&&typeof l=="function"&&(i=l,l=void 0),i?u(void 0,i):new Promise(u);function u(c,f){const h=Ns(l);s.run(r,h,p);function p(m,b,v){const x=b||r;m?f(m):c?c(x):i(void 0,x,v)}}}runSync(r,l){let i=!1,s;return this.run(r,l,u),ox("runSync","run",i),s;function u(c,f){rx(c),s=f,i=!0}}stringify(r,l){this.freeze();const i=Ns(l),s=this.compiler||this.Compiler;return ld("stringify",s),ax(r),s(r,i)}use(r,...l){const i=this.attachers,s=this.namespace;if(id("use",this.frozen),r!=null)if(typeof r=="function")h(r,l);else if(typeof r=="object")Array.isArray(r)?f(r):c(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;function u(p){if(typeof p=="function")h(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[m,...b]=p;h(m,b)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(p.plugins),p.settings&&(s.settings=Wf(!0,s.settings,p.settings))}function f(p){let m=-1;if(p!=null)if(Array.isArray(p))for(;++m<p.length;){const b=p[m];u(b)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function h(p,m){let b=-1,v=-1;for(;++b<i.length;)if(i[b][0]===p){v=b;break}if(v===-1)i.push([p,...m]);else if(m.length>0){let[x,...w]=m;const S=i[v][1];Xd(S)&&Xd(x)&&(x=Wf(!0,S,x)),i[v]=[p,x,...w]}}}}const V6=new Lh().freeze();function rd(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ld(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function id(e,r){if(r)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ax(e){if(!Xd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ox(e,r,l){if(!l)throw new Error("`"+e+"` finished async. Use `"+r+"` instead")}function Ns(e){return G6(e)?e:new N0(e)}function G6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Y6(e){return typeof e=="string"||X6(e)}function X6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Z6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",sx=[],ux={allowDangerousHtml:!0},Q6=/^(https?|ircs?|mailto|xmpp)$/i,K6=[{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 Dh(e){const r=J6(e),l=W6(e);return eT(r.runSync(r.parse(l),l),e)}function J6(e){const r=e.rehypePlugins||sx,l=e.remarkPlugins||sx,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ux}:ux;return V6().use(DA).use(l).use(A6,i).use(r)}function W6(e){const r=e.children||"",l=new N0;return typeof r=="string"&&(l.value=r),l}function eT(e,r){const l=r.allowedElements,i=r.allowElement,s=r.components,u=r.disallowedElements,c=r.skipHtml,f=r.unwrapDisallowed,h=r.urlTransform||tT;for(const m of K6)Object.hasOwn(r,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+Z6+m.id,void 0);return _h(e,p),m4(e,{Fragment:y.Fragment,components:s,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function p(m,b,v){if(m.type==="raw"&&v&&typeof b=="number")return c?v.children.splice(b,1):v.children[b]={type:"text",value:m.value},b;if(m.type==="element"){let x;for(x in Zf)if(Object.hasOwn(Zf,x)&&Object.hasOwn(m.properties,x)){const w=m.properties[x],S=Zf[x];(S===null||S.includes(m.tagName))&&(m.properties[x]=h(String(w||""),x,m))}}if(m.type==="element"){let x=l?!l.includes(m.tagName):u?u.includes(m.tagName):!1;if(!x&&i&&typeof b=="number"&&(x=!i(m,b,v)),x&&v&&typeof b=="number")return f&&m.children?v.children.splice(b,1,...m.children):v.children.splice(b,1),b}}}function tT(e){const r=e.indexOf(":"),l=e.indexOf("?"),i=e.indexOf("#"),s=e.indexOf("/");return r===-1||s!==-1&&r>s||l!==-1&&r>l||i!==-1&&r>i||Q6.test(e.slice(0,r))?e:""}function cx(e,r){const l=String(e);if(typeof r!="string")throw new TypeError("Expected character");let i=0,s=l.indexOf(r);for(;s!==-1;)i++,s=l.indexOf(r,s+r.length);return i}function nT(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function rT(e,r,l){const s=yu((l||{}).ignore||[]),u=lT(r);let c=-1;for(;++c<u.length;)C0(e,"text",f);function f(p,m){let b=-1,v;for(;++b<m.length;){const x=m[b],w=v?v.children:void 0;if(s(x,w?w.indexOf(x):void 0,v))return;v=x}if(v)return h(p,m)}function h(p,m){const b=m[m.length-1],v=u[c][0],x=u[c][1];let w=0;const C=b.children.indexOf(p);let E=!1,N=[];v.lastIndex=0;let j=v.exec(p.value);for(;j;){const B=j.index,P={index:j.index,input:j.input,stack:[...m,p]};let L=x(...j,P);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?v.lastIndex=B+1:(w!==B&&N.push({type:"text",value:p.value.slice(w,B)}),Array.isArray(L)?N.push(...L):L&&N.push(L),w=B+j[0].length,E=!0),!v.global)break;j=v.exec(p.value)}return E?(w<p.value.length&&N.push({type:"text",value:p.value.slice(w)}),b.children.splice(C,1,...N)):N=[p],C+N.length}}function lT(e){const r=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const l=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<l.length;){const s=l[i];r.push([iT(s[0]),aT(s[1])])}return r}function iT(e){return typeof e=="string"?new RegExp(nT(e),"g"):e}function aT(e){return typeof e=="function"?e:function(){return e}}const ad="phrasing",od=["autolink","link","image","label"];function oT(){return{transforms:[pT],enter:{literalAutolink:uT,literalAutolinkEmail:sd,literalAutolinkHttp:sd,literalAutolinkWww:sd},exit:{literalAutolink:hT,literalAutolinkEmail:dT,literalAutolinkHttp:cT,literalAutolinkWww:fT}}}function sT(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ad,notInConstruct:od},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ad,notInConstruct:od},{character:":",before:"[ps]",after:"\\/",inConstruct:ad,notInConstruct:od}]}}function uT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function sd(e){this.config.enter.autolinkProtocol.call(this,e)}function cT(e){this.config.exit.autolinkProtocol.call(this,e)}function fT(e){this.config.exit.data.call(this,e);const r=this.stack[this.stack.length-1];r.type,r.url="http://"+this.sliceSerialize(e)}function dT(e){this.config.exit.autolinkEmail.call(this,e)}function hT(e){this.exit(e)}function pT(e){rT(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,gT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),mT]],{ignore:["link","linkReference"]})}function gT(e,r,l,i,s){let u="";if(!A0(s)||(/^w/i.test(r)&&(l=r+l,r="",u="http://"),!bT(l)))return!1;const c=yT(l+i);if(!c[0])return!1;const f={type:"link",title:null,url:u+r+c[0],children:[{type:"text",value:r+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function mT(e,r,l,i){return!A0(i,!0)||/[-\d_]$/.test(l)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+l,children:[{type:"text",value:r+"@"+l}]}}function bT(e){const r=e.split(".");return!(r.length<2||r[r.length-1]&&(/_/.test(r[r.length-1])||!/[a-zA-Z\d]/.test(r[r.length-1]))||r[r.length-2]&&(/_/.test(r[r.length-2])||!/[a-zA-Z\d]/.test(r[r.length-2])))}function yT(e){const r=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!r)return[e,void 0];e=e.slice(0,r.index);let l=r[0],i=l.indexOf(")");const s=cx(e,"(");let u=cx(e,")");for(;i!==-1&&s>u;)e+=l.slice(0,i+1),l=l.slice(i+1),i=l.indexOf(")"),u++;return[e,l]}function A0(e,r){const l=e.input.charCodeAt(e.index-1);return(e.index===0||Ol(l)||gu(l))&&(!r||l!==47)}T0.peek=AT;function xT(){this.buffer()}function vT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function wT(){this.buffer()}function ST(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function kT(e){const r=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=qn(this.sliceSerialize(e)).toLowerCase(),l.label=r}function ET(e){this.exit(e)}function CT(e){const r=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=qn(this.sliceSerialize(e)).toLowerCase(),l.label=r}function NT(e){this.exit(e)}function AT(){return"["}function T0(e,r,l,i){const s=l.createTracker(i);let u=s.move("[^");const c=l.enter("footnoteReference"),f=l.enter("reference");return u+=s.move(l.safe(l.associationId(e),{after:"]",before:u})),f(),c(),u+=s.move("]"),u}function TT(){return{enter:{gfmFootnoteCallString:xT,gfmFootnoteCall:vT,gfmFootnoteDefinitionLabelString:wT,gfmFootnoteDefinition:ST},exit:{gfmFootnoteCallString:kT,gfmFootnoteCall:ET,gfmFootnoteDefinitionLabelString:CT,gfmFootnoteDefinition:NT}}}function jT(e){let r=!1;return e&&e.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:l,footnoteReference:T0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function l(i,s,u,c){const f=u.createTracker(c);let h=f.move("[^");const p=u.enter("footnoteDefinition"),m=u.enter("label");return h+=f.move(u.safe(u.associationId(i),{before:h,after:"]"})),m(),h+=f.move("]:"),i.children&&i.children.length>0&&(f.shift(4),h+=f.move((r?`
43
- `:" ")+u.indentLines(u.containerFlow(i,f.current()),r?j0:RT))),p(),h}}function RT(e,r,l){return r===0?e:j0(e,r,l)}function j0(e,r,l){return(l?"":" ")+e}const _T=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];R0.peek=zT;function LT(){return{canContainEols:["delete"],enter:{strikethrough:OT},exit:{strikethrough:MT}}}function DT(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:_T}],handlers:{delete:R0}}}function OT(e){this.enter({type:"delete",children:[]},e)}function MT(e){this.exit(e)}function R0(e,r,l,i){const s=l.createTracker(i),u=l.enter("strikethrough");let c=s.move("~~");return c+=l.containerPhrasing(e,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),u(),c}function zT(){return"~"}function BT(e){return e.length}function FT(e,r){const l=r||{},i=(l.align||[]).concat(),s=l.stringLength||BT,u=[],c=[],f=[],h=[];let p=0,m=-1;for(;++m<e.length;){const S=[],C=[];let E=-1;for(e[m].length>p&&(p=e[m].length);++E<e[m].length;){const N=IT(e[m][E]);if(l.alignDelimiters!==!1){const j=s(N);C[E]=j,(h[E]===void 0||j>h[E])&&(h[E]=j)}S.push(N)}c[m]=S,f[m]=C}let b=-1;if(typeof i=="object"&&"length"in i)for(;++b<p;)u[b]=fx(i[b]);else{const S=fx(i);for(;++b<p;)u[b]=S}b=-1;const v=[],x=[];for(;++b<p;){const S=u[b];let C="",E="";S===99?(C=":",E=":"):S===108?C=":":S===114&&(E=":");let N=l.alignDelimiters===!1?1:Math.max(1,h[b]-C.length-E.length);const j=C+"-".repeat(N)+E;l.alignDelimiters!==!1&&(N=C.length+N+E.length,N>h[b]&&(h[b]=N),x[b]=N),v[b]=j}c.splice(1,0,v),f.splice(1,0,x),m=-1;const w=[];for(;++m<c.length;){const S=c[m],C=f[m];b=-1;const E=[];for(;++b<p;){const N=S[b]||"";let j="",B="";if(l.alignDelimiters!==!1){const P=h[b]-(C[b]||0),L=u[b];L===114?j=" ".repeat(P):L===99?P%2?(j=" ".repeat(P/2+.5),B=" ".repeat(P/2-.5)):(j=" ".repeat(P/2),B=j):B=" ".repeat(P)}l.delimiterStart!==!1&&!b&&E.push("|"),l.padding!==!1&&!(l.alignDelimiters===!1&&N==="")&&(l.delimiterStart!==!1||b)&&E.push(" "),l.alignDelimiters!==!1&&E.push(j),E.push(N),l.alignDelimiters!==!1&&E.push(B),l.padding!==!1&&E.push(" "),(l.delimiterEnd!==!1||b!==p-1)&&E.push("|")}w.push(l.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return w.join(`
44
- `)}function IT(e){return e==null?"":String(e)}function fx(e){const r=typeof e=="string"?e.codePointAt(0):0;return r===67||r===99?99:r===76||r===108?108:r===82||r===114?114:0}function UT(e,r,l,i){const s=l.enter("blockquote"),u=l.createTracker(i);u.move("> "),u.shift(2);const c=l.indentLines(l.containerFlow(e,u.current()),HT);return s(),c}function HT(e,r,l){return">"+(l?"":" ")+e}function PT(e,r){return dx(e,r.inConstruct,!0)&&!dx(e,r.notInConstruct,!1)}function dx(e,r,l){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return l;let i=-1;for(;++i<r.length;)if(e.includes(r[i]))return!0;return!1}function hx(e,r,l,i){let s=-1;for(;++s<l.unsafe.length;)if(l.unsafe[s].character===`
45
- `&&PT(l.stack,l.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\
46
- `}function qT(e,r){const l=String(e);let i=l.indexOf(r),s=i,u=0,c=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===s?++u>c&&(c=u):u=1,s=i+r.length,i=l.indexOf(r,s);return c}function $T(e,r){return!!(r.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function VT(e){const r=e.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function GT(e,r,l,i){const s=VT(l),u=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if($T(e,l)){const b=l.enter("codeIndented"),v=l.indentLines(u,YT);return b(),v}const f=l.createTracker(i),h=s.repeat(Math.max(qT(u,s)+1,3)),p=l.enter("codeFenced");let m=f.move(h);if(e.lang){const b=l.enter(`codeFencedLang${c}`);m+=f.move(l.safe(e.lang,{before:m,after:" ",encode:["`"],...f.current()})),b()}if(e.lang&&e.meta){const b=l.enter(`codeFencedMeta${c}`);m+=f.move(" "),m+=f.move(l.safe(e.meta,{before:m,after:`
47
- `,encode:["`"],...f.current()})),b()}return m+=f.move(`
48
- `),u&&(m+=f.move(u+`
49
- `)),m+=f.move(h),p(),m}function YT(e,r,l){return(l?"":" ")+e}function Oh(e){const r=e.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function XT(e,r,l,i){const s=Oh(l),u=s==='"'?"Quote":"Apostrophe",c=l.enter("definition");let f=l.enter("label");const h=l.createTracker(i);let p=h.move("[");return p+=h.move(l.safe(l.associationId(e),{before:p,after:"]",...h.current()})),p+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=l.enter("destinationLiteral"),p+=h.move("<"),p+=h.move(l.safe(e.url,{before:p,after:">",...h.current()})),p+=h.move(">")):(f=l.enter("destinationRaw"),p+=h.move(l.safe(e.url,{before:p,after:e.title?" ":`
50
- `,...h.current()}))),f(),e.title&&(f=l.enter(`title${u}`),p+=h.move(" "+s),p+=h.move(l.safe(e.title,{before:p,after:s,...h.current()})),p+=h.move(s),f()),c(),p}function ZT(e){const r=e.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function Ga(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Xs(e,r,l){const i=Li(e),s=Li(r);return i===void 0?s===void 0?l==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}_0.peek=QT;function _0(e,r,l,i){const s=ZT(l),u=l.enter("emphasis"),c=l.createTracker(i),f=c.move(s);let h=c.move(l.containerPhrasing(e,{after:s,before:f,...c.current()}));const p=h.charCodeAt(0),m=Xs(i.before.charCodeAt(i.before.length-1),p,s);m.inside&&(h=Ga(p)+h.slice(1));const b=h.charCodeAt(h.length-1),v=Xs(i.after.charCodeAt(0),b,s);v.inside&&(h=h.slice(0,-1)+Ga(b));const x=c.move(s);return u(),l.attentionEncodeSurroundingInfo={after:v.outside,before:m.outside},f+h+x}function QT(e,r,l){return l.options.emphasis||"*"}function KT(e,r){let l=!1;return _h(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return l=!0,Gd}),!!((!e.depth||e.depth<3)&&Eh(e)&&(r.options.setext||l))}function JT(e,r,l,i){const s=Math.max(Math.min(6,e.depth||1),1),u=l.createTracker(i);if(KT(e,l)){const m=l.enter("headingSetext"),b=l.enter("phrasing"),v=l.containerPhrasing(e,{...u.current(),before:`
51
- `,after:`
52
- `});return b(),m(),v+`
53
- `+(s===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
54
- `))+1))}const c="#".repeat(s),f=l.enter("headingAtx"),h=l.enter("phrasing");u.move(c+" ");let p=l.containerPhrasing(e,{before:"# ",after:`
55
- `,...u.current()});return/^[\t ]/.test(p)&&(p=Ga(p.charCodeAt(0))+p.slice(1)),p=p?c+" "+p:c,l.options.closeAtx&&(p+=" "+c),h(),f(),p}L0.peek=WT;function L0(e){return e.value||""}function WT(){return"<"}D0.peek=e5;function D0(e,r,l,i){const s=Oh(l),u=s==='"'?"Quote":"Apostrophe",c=l.enter("image");let f=l.enter("label");const h=l.createTracker(i);let p=h.move("![");return p+=h.move(l.safe(e.alt,{before:p,after:"]",...h.current()})),p+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=l.enter("destinationLiteral"),p+=h.move("<"),p+=h.move(l.safe(e.url,{before:p,after:">",...h.current()})),p+=h.move(">")):(f=l.enter("destinationRaw"),p+=h.move(l.safe(e.url,{before:p,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=l.enter(`title${u}`),p+=h.move(" "+s),p+=h.move(l.safe(e.title,{before:p,after:s,...h.current()})),p+=h.move(s),f()),p+=h.move(")"),c(),p}function e5(){return"!"}O0.peek=t5;function O0(e,r,l,i){const s=e.referenceType,u=l.enter("imageReference");let c=l.enter("label");const f=l.createTracker(i);let h=f.move("![");const p=l.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(p+"]["),c();const m=l.stack;l.stack=[],c=l.enter("reference");const b=l.safe(l.associationId(e),{before:h,after:"]",...f.current()});return c(),l.stack=m,u(),s==="full"||!p||p!==b?h+=f.move(b+"]"):s==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function t5(){return"!"}M0.peek=n5;function M0(e,r,l){let i=e.value||"",s="`",u=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(i);)s+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++u<l.unsafe.length;){const c=l.unsafe[u],f=l.compilePattern(c);let h;if(c.atBreak)for(;h=f.exec(i);){let p=h.index;i.charCodeAt(p)===10&&i.charCodeAt(p-1)===13&&p--,i=i.slice(0,p)+" "+i.slice(h.index+1)}}return s+i+s}function n5(){return"`"}function z0(e,r){const l=Eh(e);return!!(!r.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(l===e.url||"mailto:"+l===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}B0.peek=r5;function B0(e,r,l,i){const s=Oh(l),u=s==='"'?"Quote":"Apostrophe",c=l.createTracker(i);let f,h;if(z0(e,l)){const m=l.stack;l.stack=[],f=l.enter("autolink");let b=c.move("<");return b+=c.move(l.containerPhrasing(e,{before:b,after:">",...c.current()})),b+=c.move(">"),f(),l.stack=m,b}f=l.enter("link"),h=l.enter("label");let p=c.move("[");return p+=c.move(l.containerPhrasing(e,{before:p,after:"](",...c.current()})),p+=c.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=l.enter("destinationLiteral"),p+=c.move("<"),p+=c.move(l.safe(e.url,{before:p,after:">",...c.current()})),p+=c.move(">")):(h=l.enter("destinationRaw"),p+=c.move(l.safe(e.url,{before:p,after:e.title?" ":")",...c.current()}))),h(),e.title&&(h=l.enter(`title${u}`),p+=c.move(" "+s),p+=c.move(l.safe(e.title,{before:p,after:s,...c.current()})),p+=c.move(s),h()),p+=c.move(")"),f(),p}function r5(e,r,l){return z0(e,l)?"<":"["}F0.peek=l5;function F0(e,r,l,i){const s=e.referenceType,u=l.enter("linkReference");let c=l.enter("label");const f=l.createTracker(i);let h=f.move("[");const p=l.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(p+"]["),c();const m=l.stack;l.stack=[],c=l.enter("reference");const b=l.safe(l.associationId(e),{before:h,after:"]",...f.current()});return c(),l.stack=m,u(),s==="full"||!p||p!==b?h+=f.move(b+"]"):s==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function l5(){return"["}function Mh(e){const r=e.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function i5(e){const r=Mh(e),l=e.options.bulletOther;if(!l)return r==="*"?"-":"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(l===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+l+"`) to be different");return l}function a5(e){const r=e.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function I0(e){const r=e.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function o5(e,r,l,i){const s=l.enter("list"),u=l.bulletCurrent;let c=e.ordered?a5(l):Mh(l);const f=e.ordered?c==="."?")":".":i5(l);let h=r&&l.bulletLastUsed?c===l.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&m&&(!m.children||!m.children[0])&&l.stack[l.stack.length-1]==="list"&&l.stack[l.stack.length-2]==="listItem"&&l.stack[l.stack.length-3]==="list"&&l.stack[l.stack.length-4]==="listItem"&&l.indexStack[l.indexStack.length-1]===0&&l.indexStack[l.indexStack.length-2]===0&&l.indexStack[l.indexStack.length-3]===0&&(h=!0),I0(l)===c&&m){let b=-1;for(;++b<e.children.length;){const v=e.children[b];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(c=f),l.bulletCurrent=c;const p=l.containerFlow(e,i);return l.bulletLastUsed=c,l.bulletCurrent=u,s(),p}function s5(e){const r=e.options.listItemIndent||"one";if(r!=="tab"&&r!=="one"&&r!=="mixed")throw new Error("Cannot serialize items with `"+r+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return r}function u5(e,r,l,i){const s=s5(l);let u=l.bulletCurrent||Mh(l);r&&r.type==="list"&&r.ordered&&(u=(typeof r.start=="number"&&r.start>-1?r.start:1)+(l.options.incrementListMarker===!1?0:r.children.indexOf(e))+u);let c=u.length+1;(s==="tab"||s==="mixed"&&(r&&r.type==="list"&&r.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=l.createTracker(i);f.move(u+" ".repeat(c-u.length)),f.shift(c);const h=l.enter("listItem"),p=l.indentLines(l.containerFlow(e,f.current()),m);return h(),p;function m(b,v,x){return v?(x?"":" ".repeat(c))+b:(x?u:u+" ".repeat(c-u.length))+b}}function c5(e,r,l,i){const s=l.enter("paragraph"),u=l.enter("phrasing"),c=l.containerPhrasing(e,i);return u(),s(),c}const f5=yu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function d5(e,r,l,i){return(e.children.some(function(c){return f5(c)})?l.containerPhrasing:l.containerFlow).call(l,e,i)}function h5(e){const r=e.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}U0.peek=p5;function U0(e,r,l,i){const s=h5(l),u=l.enter("strong"),c=l.createTracker(i),f=c.move(s+s);let h=c.move(l.containerPhrasing(e,{after:s,before:f,...c.current()}));const p=h.charCodeAt(0),m=Xs(i.before.charCodeAt(i.before.length-1),p,s);m.inside&&(h=Ga(p)+h.slice(1));const b=h.charCodeAt(h.length-1),v=Xs(i.after.charCodeAt(0),b,s);v.inside&&(h=h.slice(0,-1)+Ga(b));const x=c.move(s+s);return u(),l.attentionEncodeSurroundingInfo={after:v.outside,before:m.outside},f+h+x}function p5(e,r,l){return l.options.strong||"*"}function g5(e,r,l,i){return l.safe(e.value,i)}function m5(e){const r=e.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function b5(e,r,l){const i=(I0(l)+(l.options.ruleSpaces?" ":"")).repeat(m5(l));return l.options.ruleSpaces?i.slice(0,-1):i}const H0={blockquote:UT,break:hx,code:GT,definition:XT,emphasis:_0,hardBreak:hx,heading:JT,html:L0,image:D0,imageReference:O0,inlineCode:M0,link:B0,linkReference:F0,list:o5,listItem:u5,paragraph:c5,root:d5,strong:U0,text:g5,thematicBreak:b5};function y5(){return{enter:{table:x5,tableData:px,tableHeader:px,tableRow:w5},exit:{codeText:S5,table:v5,tableData:ud,tableHeader:ud,tableRow:ud}}}function x5(e){const r=e._align;this.enter({type:"table",align:r.map(function(l){return l==="none"?null:l}),children:[]},e),this.data.inTable=!0}function v5(e){this.exit(e),this.data.inTable=void 0}function w5(e){this.enter({type:"tableRow",children:[]},e)}function ud(e){this.exit(e)}function px(e){this.enter({type:"tableCell",children:[]},e)}function S5(e){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,k5));const l=this.stack[this.stack.length-1];l.type,l.value=r,this.exit(e)}function k5(e,r){return r==="|"?r:e}function E5(e){const r=e||{},l=r.tableCellPadding,i=r.tablePipeAlign,s=r.stringLength,u=l?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
56
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:c,tableCell:h,tableRow:f}};function c(x,w,S,C){return p(m(x,S,C),x.align)}function f(x,w,S,C){const E=b(x,S,C),N=p([E]);return N.slice(0,N.indexOf(`
57
- `))}function h(x,w,S,C){const E=S.enter("tableCell"),N=S.enter("phrasing"),j=S.containerPhrasing(x,{...C,before:u,after:u});return N(),E(),j}function p(x,w){return FT(x,{align:w,alignDelimiters:i,padding:l,stringLength:s})}function m(x,w,S){const C=x.children;let E=-1;const N=[],j=w.enter("table");for(;++E<C.length;)N[E]=b(C[E],w,S);return j(),N}function b(x,w,S){const C=x.children;let E=-1;const N=[],j=w.enter("tableRow");for(;++E<C.length;)N[E]=h(C[E],x,w,S);return j(),N}function v(x,w,S){let C=H0.inlineCode(x,w,S);return S.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function C5(){return{exit:{taskListCheckValueChecked:gx,taskListCheckValueUnchecked:gx,paragraph:A5}}}function N5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:T5}}}function gx(e){const r=this.stack[this.stack.length-2];r.type,r.checked=e.type==="taskListCheckValueChecked"}function A5(e){const r=this.stack[this.stack.length-2];if(r&&r.type==="listItem"&&typeof r.checked=="boolean"){const l=this.stack[this.stack.length-1];l.type;const i=l.children[0];if(i&&i.type==="text"){const s=r.children;let u=-1,c;for(;++u<s.length;){const f=s[u];if(f.type==="paragraph"){c=f;break}}c===l&&(i.value=i.value.slice(1),i.value.length===0?l.children.shift():l.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,l.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function T5(e,r,l,i){const s=e.children[0],u=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=l.createTracker(i);u&&f.move(c);let h=H0.listItem(e,r,l,{...i,...f.current()});return u&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),h;function p(m){return m+c}}function j5(){return[oT(),TT(),LT(),y5(),C5()]}function R5(e){return{extensions:[sT(),jT(e),DT(),E5(e),N5()]}}const _5={tokenize:B5,partial:!0},P0={tokenize:F5,partial:!0},q0={tokenize:I5,partial:!0},$0={tokenize:U5,partial:!0},L5={tokenize:H5,partial:!0},V0={name:"wwwAutolink",tokenize:M5,previous:Y0},G0={name:"protocolAutolink",tokenize:z5,previous:X0},Nr={name:"emailAutolink",tokenize:O5,previous:Z0},er={};function D5(){return{text:er}}let Tl=48;for(;Tl<123;)er[Tl]=Nr,Tl++,Tl===58?Tl=65:Tl===91&&(Tl=97);er[43]=Nr;er[45]=Nr;er[46]=Nr;er[95]=Nr;er[72]=[Nr,G0];er[104]=[Nr,G0];er[87]=[Nr,V0];er[119]=[Nr,V0];function O5(e,r,l){const i=this;let s,u;return c;function c(b){return!Qd(b)||!Z0.call(i,i.previous)||zh(i.events)?l(b):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(b))}function f(b){return Qd(b)?(e.consume(b),f):b===64?(e.consume(b),h):l(b)}function h(b){return b===46?e.check(L5,m,p)(b):b===45||b===95||Vt(b)?(u=!0,e.consume(b),h):m(b)}function p(b){return e.consume(b),s=!0,h}function m(b){return u&&s&&Kt(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),r(b)):l(b)}}function M5(e,r,l){const i=this;return s;function s(c){return c!==87&&c!==119||!Y0.call(i,i.previous)||zh(i.events)?l(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(_5,e.attempt(P0,e.attempt(q0,u),l),l)(c))}function u(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),r(c)}}function z5(e,r,l){const i=this;let s="",u=!1;return c;function c(b){return(b===72||b===104)&&X0.call(i,i.previous)&&!zh(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(b),e.consume(b),f):l(b)}function f(b){if(Kt(b)&&s.length<5)return s+=String.fromCodePoint(b),e.consume(b),f;if(b===58){const v=s.toLowerCase();if(v==="http"||v==="https")return e.consume(b),h}return l(b)}function h(b){return b===47?(e.consume(b),u?p:(u=!0,h)):l(b)}function p(b){return b===null||Vs(b)||st(b)||Ol(b)||gu(b)?l(b):e.attempt(P0,e.attempt(q0,m),l)(b)}function m(b){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),r(b)}}function B5(e,r,l){let i=0;return s;function s(c){return(c===87||c===119)&&i<3?(i++,e.consume(c),s):c===46&&i===3?(e.consume(c),u):l(c)}function u(c){return c===null?l(c):r(c)}}function F5(e,r,l){let i,s,u;return c;function c(p){return p===46||p===95?e.check($0,h,f)(p):p===null||st(p)||Ol(p)||p!==45&&gu(p)?h(p):(u=!0,e.consume(p),c)}function f(p){return p===95?i=!0:(s=i,i=void 0),e.consume(p),c}function h(p){return s||i||!u?l(p):r(p)}}function I5(e,r){let l=0,i=0;return s;function s(c){return c===40?(l++,e.consume(c),s):c===41&&i<l?u(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check($0,r,u)(c):c===null||st(c)||Ol(c)?r(c):(e.consume(c),s)}function u(c){return c===41&&i++,e.consume(c),s}}function U5(e,r,l){return i;function i(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),i):f===38?(e.consume(f),u):f===93?(e.consume(f),s):f===60||f===null||st(f)||Ol(f)?r(f):l(f)}function s(f){return f===null||f===40||f===91||st(f)||Ol(f)?r(f):i(f)}function u(f){return Kt(f)?c(f):l(f)}function c(f){return f===59?(e.consume(f),i):Kt(f)?(e.consume(f),c):l(f)}}function H5(e,r,l){return i;function i(u){return e.consume(u),s}function s(u){return Vt(u)?l(u):r(u)}}function Y0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||st(e)}function X0(e){return!Kt(e)}function Z0(e){return!(e===47||Qd(e))}function Qd(e){return e===43||e===45||e===46||e===95||Vt(e)}function zh(e){let r=e.length,l=!1;for(;r--;){const i=e[r][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){l=!0;break}if(i._gfmAutolinkLiteralWalkedInto){l=!1;break}}return e.length>0&&!l&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),l}const P5={tokenize:Q5,partial:!0};function q5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Y5,continuation:{tokenize:X5},exit:Z5}},text:{91:{name:"gfmFootnoteCall",tokenize:G5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$5,resolveTo:V5}}}}function $5(e,r,l){const i=this;let s=i.events.length;const u=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c;for(;s--;){const h=i.events[s][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!c||!c._balanced)return l(h);const p=qn(i.sliceSerialize({start:c.end,end:i.now()}));return p.codePointAt(0)!==94||!u.includes(p.slice(1))?l(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),r(h))}}function V5(e,r){let l=e.length;for(;l--;)if(e[l][1].type==="labelImage"&&e[l][0]==="enter"){e[l][1];break}e[l+1][1].type="data",e[l+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[l+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[l+3][1].end),end:Object.assign({},e[l+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[l+1],e[l+2],["enter",i,r],e[l+3],e[l+4],["enter",s,r],["exit",s,r],["enter",u,r],["enter",c,r],["exit",c,r],["exit",u,r],e[e.length-2],e[e.length-1],["exit",i,r]];return e.splice(l,e.length-l+1,...f),e}function G5(e,r,l){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u=0,c;return f;function f(b){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),h}function h(b){return b!==94?l(b):(e.enter("gfmFootnoteCallMarker"),e.consume(b),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(b){if(u>999||b===93&&!c||b===null||b===91||st(b))return l(b);if(b===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return s.includes(qn(i.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),r):l(b)}return st(b)||(c=!0),u++,e.consume(b),b===92?m:p}function m(b){return b===91||b===92||b===93?(e.consume(b),u++,p):p(b)}}function Y5(e,r,l){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u,c=0,f;return h;function h(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):l(w)}function m(w){if(c>999||w===93&&!f||w===null||w===91||st(w))return l(w);if(w===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return u=qn(i.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return st(w)||(f=!0),c++,e.consume(w),w===92?b:m}function b(w){return w===91||w===92||w===93?(e.consume(w),c++,m):m(w)}function v(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),s.includes(u)||s.push(u),Ve(e,x,"gfmFootnoteDefinitionWhitespace")):l(w)}function x(w){return r(w)}}function X5(e,r,l){return e.check(Wa,r,e.attempt(P5,r,l))}function Z5(e){e.exit("gfmFootnoteDefinition")}function Q5(e,r,l){const i=this;return Ve(e,s,"gfmFootnoteDefinitionIndent",5);function s(u){const c=i.events[i.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?r(u):l(u)}}function K5(e){let l=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:u,resolveAll:s};return l==null&&(l=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function s(c,f){let h=-1;for(;++h<c.length;)if(c[h][0]==="enter"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._close){let p=h;for(;p--;)if(c[p][0]==="exit"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._open&&c[h][1].end.offset-c[h][1].start.offset===c[p][1].end.offset-c[p][1].start.offset){c[h][1].type="strikethroughSequence",c[p][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},c[p][1].start),end:Object.assign({},c[h][1].end)},b={type:"strikethroughText",start:Object.assign({},c[p][1].end),end:Object.assign({},c[h][1].start)},v=[["enter",m,f],["enter",c[p][1],f],["exit",c[p][1],f],["enter",b,f]],x=f.parser.constructs.insideSpan.null;x&&kn(v,v.length,0,mu(x,c.slice(p+1,h),f)),kn(v,v.length,0,[["exit",b,f],["enter",c[h][1],f],["exit",c[h][1],f],["exit",m,f]]),kn(c,p-1,h-p+3,v),h=p+v.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function u(c,f,h){const p=this.previous,m=this.events;let b=0;return v;function v(w){return p===126&&m[m.length-1][1].type!=="characterEscape"?h(w):(c.enter("strikethroughSequenceTemporary"),x(w))}function x(w){const S=Li(p);if(w===126)return b>1?h(w):(c.consume(w),b++,x);if(b<2&&!l)return h(w);const C=c.exit("strikethroughSequenceTemporary"),E=Li(w);return C._open=!E||E===2&&!!S,C._close=!S||S===2&&!!E,f(w)}}}class J5{constructor(){this.map=[]}add(r,l,i){W5(this,r,l,i)}consume(r){if(this.map.sort(function(u,c){return u[0]-c[0]}),this.map.length===0)return;let l=this.map.length;const i=[];for(;l>0;)l-=1,i.push(r.slice(this.map[l][0]+this.map[l][1]),this.map[l][2]),r.length=this.map[l][0];i.push(r.slice()),r.length=0;let s=i.pop();for(;s;){for(const u of s)r.push(u);s=i.pop()}this.map.length=0}}function W5(e,r,l,i){let s=0;if(!(l===0&&i.length===0)){for(;s<e.map.length;){if(e.map[s][0]===r){e.map[s][1]+=l,e.map[s][2].push(...i);return}s+=1}e.map.push([r,l,i])}}function e8(e,r){let l=!1;const i=[];for(;r<e.length;){const s=e[r];if(l){if(s[0]==="enter")s[1].type==="tableContent"&&i.push(e[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[r-1][1].type==="tableDelimiterMarker"){const u=i.length-1;i[u]=i[u]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(l=!0);r+=1}return i}function t8(){return{flow:{null:{name:"table",tokenize:n8,resolveAll:r8}}}}function n8(e,r,l){const i=this;let s=0,u=0,c;return f;function f(z){let V=i.events.length-1;for(;V>-1;){const I=i.events[V][1].type;if(I==="lineEnding"||I==="linePrefix")V--;else break}const Y=V>-1?i.events[V][1].type:null,J=Y==="tableHead"||Y==="tableRow"?L:h;return J===L&&i.parser.lazy[i.now().line]?l(z):J(z)}function h(z){return e.enter("tableHead"),e.enter("tableRow"),p(z)}function p(z){return z===124||(c=!0,u+=1),m(z)}function m(z){return z===null?l(z):Ae(z)?u>1?(u=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),x):l(z):Ie(z)?Ve(e,m,"whitespace")(z):(u+=1,c&&(c=!1,s+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),c=!0,m):(e.enter("data"),b(z)))}function b(z){return z===null||z===124||st(z)?(e.exit("data"),m(z)):(e.consume(z),z===92?v:b)}function v(z){return z===92||z===124?(e.consume(z),b):b(z)}function x(z){return i.interrupt=!1,i.parser.lazy[i.now().line]?l(z):(e.enter("tableDelimiterRow"),c=!1,Ie(z)?Ve(e,w,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):w(z))}function w(z){return z===45||z===58?C(z):z===124?(c=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),S):P(z)}function S(z){return Ie(z)?Ve(e,C,"whitespace")(z):C(z)}function C(z){return z===58?(u+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),E):z===45?(u+=1,E(z)):z===null||Ae(z)?B(z):P(z)}function E(z){return z===45?(e.enter("tableDelimiterFiller"),N(z)):P(z)}function N(z){return z===45?(e.consume(z),N):z===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),j):(e.exit("tableDelimiterFiller"),j(z))}function j(z){return Ie(z)?Ve(e,B,"whitespace")(z):B(z)}function B(z){return z===124?w(z):z===null||Ae(z)?!c||s!==u?P(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),r(z)):P(z)}function P(z){return l(z)}function L(z){return e.enter("tableRow"),M(z)}function M(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),M):z===null||Ae(z)?(e.exit("tableRow"),r(z)):Ie(z)?Ve(e,M,"whitespace")(z):(e.enter("data"),H(z))}function H(z){return z===null||z===124||st(z)?(e.exit("data"),M(z)):(e.consume(z),z===92?G:H)}function G(z){return z===92||z===124?(e.consume(z),H):H(z)}}function r8(e,r){let l=-1,i=!0,s=0,u=[0,0,0,0],c=[0,0,0,0],f=!1,h=0,p,m,b;const v=new J5;for(;++l<e.length;){const x=e[l],w=x[1];x[0]==="enter"?w.type==="tableHead"?(f=!1,h!==0&&(mx(v,r,h,p,m),m=void 0,h=0),p={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},v.add(l,0,[["enter",p,r]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(i=!0,b=void 0,u=[0,0,0,0],c=[0,l+1,0,0],f&&(f=!1,m={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},v.add(l,0,[["enter",m,r]])),s=w.type==="tableDelimiterRow"?2:m?3:1):s&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(i=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],b=As(v,r,u,s,void 0,b),u=[0,0,0,0]),c[2]=l)):w.type==="tableCellDivider"&&(i?i=!1:(u[1]!==0&&(c[0]=c[1],b=As(v,r,u,s,void 0,b)),u=c,c=[u[1],l,0,0])):w.type==="tableHead"?(f=!0,h=l):w.type==="tableRow"||w.type==="tableDelimiterRow"?(h=l,u[1]!==0?(c[0]=c[1],b=As(v,r,u,s,l,b)):c[1]!==0&&(b=As(v,r,c,s,l,b)),s=0):s&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(c[3]=l)}for(h!==0&&mx(v,r,h,p,m),v.consume(r.events),l=-1;++l<r.events.length;){const x=r.events[l];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=e8(r.events,l))}return e}function As(e,r,l,i,s,u){const c=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",f="tableContent";l[0]!==0&&(u.end=Object.assign({},Ci(r.events,l[0])),e.add(l[0],0,[["exit",u,r]]));const h=Ci(r.events,l[1]);if(u={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(l[1],0,[["enter",u,r]]),l[2]!==0){const p=Ci(r.events,l[2]),m=Ci(r.events,l[3]),b={type:f,start:Object.assign({},p),end:Object.assign({},m)};if(e.add(l[2],0,[["enter",b,r]]),i!==2){const v=r.events[l[2]],x=r.events[l[3]];if(v[1].end=Object.assign({},x[1].end),v[1].type="chunkText",v[1].contentType="text",l[3]>l[2]+1){const w=l[2]+1,S=l[3]-l[2]-1;e.add(w,S,[])}}e.add(l[3]+1,0,[["exit",b,r]])}return s!==void 0&&(u.end=Object.assign({},Ci(r.events,s)),e.add(s,0,[["exit",u,r]]),u=void 0),u}function mx(e,r,l,i,s){const u=[],c=Ci(r.events,l);s&&(s.end=Object.assign({},c),u.push(["exit",s,r])),i.end=Object.assign({},c),u.push(["exit",i,r]),e.add(l+1,0,u)}function Ci(e,r){const l=e[r],i=l[0]==="enter"?"start":"end";return l[1][i]}const l8={name:"tasklistCheck",tokenize:a8};function i8(){return{text:{91:l8}}}function a8(e,r,l){const i=this;return s;function s(h){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?l(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),u)}function u(h){return st(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):l(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):l(h)}function f(h){return Ae(h)?r(h):Ie(h)?e.check({tokenize:o8},r,l)(h):l(h)}}function o8(e,r,l){return Ve(e,i,"whitespace");function i(s){return s===null?l(s):r(s)}}function s8(e){return a0([D5(),q5(),K5(e),t8(),i8()])}const u8={};function Bh(e){const r=this,l=e||u8,i=r.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),u=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),c=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(s8(l)),u.push(j5()),c.push(R5(l))}class Fh{diff(r,l,i={}){let s;typeof i=="function"?(s=i,i={}):"callback"in i&&(s=i.callback);const u=this.castInput(r,i),c=this.castInput(l,i),f=this.removeEmpty(this.tokenize(u,i)),h=this.removeEmpty(this.tokenize(c,i));return this.diffWithOptionsObj(f,h,i,s)}diffWithOptionsObj(r,l,i,s){var u;const c=N=>{if(N=this.postProcess(N,i),s){setTimeout(function(){s(N)},0);return}else return N},f=l.length,h=r.length;let p=1,m=f+h;i.maxEditLength!=null&&(m=Math.min(m,i.maxEditLength));const b=(u=i.timeout)!==null&&u!==void 0?u:1/0,v=Date.now()+b,x=[{oldPos:-1,lastComponent:void 0}];let w=this.extractCommon(x[0],l,r,0,i);if(x[0].oldPos+1>=h&&w+1>=f)return c(this.buildValues(x[0].lastComponent,l,r));let S=-1/0,C=1/0;const E=()=>{for(let N=Math.max(S,-p);N<=Math.min(C,p);N+=2){let j;const B=x[N-1],P=x[N+1];B&&(x[N-1]=void 0);let L=!1;if(P){const H=P.oldPos-N;L=P&&0<=H&&H<f}const M=B&&B.oldPos+1<h;if(!L&&!M){x[N]=void 0;continue}if(!M||L&&B.oldPos<P.oldPos?j=this.addToPath(P,!0,!1,0,i):j=this.addToPath(B,!1,!0,1,i),w=this.extractCommon(j,l,r,N,i),j.oldPos+1>=h&&w+1>=f)return c(this.buildValues(j.lastComponent,l,r))||!0;x[N]=j,j.oldPos+1>=h&&(C=Math.min(C,N-1)),w+1>=f&&(S=Math.max(S,N+1))}p++};if(s)(function N(){setTimeout(function(){if(p>m||Date.now()>v)return s(void 0);E()||N()},0)})();else for(;p<=m&&Date.now()<=v;){const N=E();if(N)return N}}addToPath(r,l,i,s,u){const c=r.lastComponent;return c&&!u.oneChangePerToken&&c.added===l&&c.removed===i?{oldPos:r.oldPos+s,lastComponent:{count:c.count+1,added:l,removed:i,previousComponent:c.previousComponent}}:{oldPos:r.oldPos+s,lastComponent:{count:1,added:l,removed:i,previousComponent:c}}}extractCommon(r,l,i,s,u){const c=l.length,f=i.length;let h=r.oldPos,p=h-s,m=0;for(;p+1<c&&h+1<f&&this.equals(i[h+1],l[p+1],u);)p++,h++,m++,u.oneChangePerToken&&(r.lastComponent={count:1,previousComponent:r.lastComponent,added:!1,removed:!1});return m&&!u.oneChangePerToken&&(r.lastComponent={count:m,previousComponent:r.lastComponent,added:!1,removed:!1}),r.oldPos=h,p}equals(r,l,i){return i.comparator?i.comparator(r,l):r===l||!!i.ignoreCase&&r.toLowerCase()===l.toLowerCase()}removeEmpty(r){const l=[];for(let i=0;i<r.length;i++)r[i]&&l.push(r[i]);return l}castInput(r,l){return r}tokenize(r,l){return Array.from(r)}join(r){return r.join("")}postProcess(r,l){return r}get useLongestToken(){return!1}buildValues(r,l,i){const s=[];let u;for(;r;)s.push(r),u=r.previousComponent,delete r.previousComponent,r=u;s.reverse();const c=s.length;let f=0,h=0,p=0;for(;f<c;f++){const m=s[f];if(m.removed)m.value=this.join(i.slice(p,p+m.count)),p+=m.count;else{if(!m.added&&this.useLongestToken){let b=l.slice(h,h+m.count);b=b.map(function(v,x){const w=i[p+x];return w.length>v.length?w:v}),m.value=this.join(b)}else m.value=this.join(l.slice(h,h+m.count));h+=m.count,m.added||(p+=m.count)}}return s}}function bx(e,r){let l;for(l=0;l<e.length&&l<r.length;l++)if(e[l]!=r[l])return e.slice(0,l);return e.slice(0,l)}function yx(e,r){let l;if(!e||!r||e[e.length-1]!=r[r.length-1])return"";for(l=0;l<e.length&&l<r.length;l++)if(e[e.length-(l+1)]!=r[r.length-(l+1)])return e.slice(-l);return e.slice(-l)}function Kd(e,r,l){if(e.slice(0,r.length)!=r)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(r)}; this is a bug`);return l+e.slice(r.length)}function Jd(e,r,l){if(!r)return e+l;if(e.slice(-r.length)!=r)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(r)}; this is a bug`);return e.slice(0,-r.length)+l}function Da(e,r){return Kd(e,r,"")}function Ts(e,r){return Jd(e,r,"")}function xx(e,r){return r.slice(0,c8(e,r))}function c8(e,r){let l=0;e.length>r.length&&(l=e.length-r.length);let i=r.length;e.length<r.length&&(i=e.length);const s=Array(i);let u=0;s[0]=0;for(let c=1;c<i;c++){for(r[c]==r[u]?s[c]=s[u]:s[c]=u;u>0&&r[c]!=r[u];)u=s[u];r[c]==r[u]&&u++}u=0;for(let c=l;c<e.length;c++){for(;u>0&&e[c]!=r[u];)u=s[u];e[c]==r[u]&&u++}return u}function Oa(e){let r;for(r=e.length-1;r>=0&&e[r].match(/\s/);r--);return e.substring(r+1)}function el(e){const r=e.match(/^\s*/);return r?r[0]:""}const Zs="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",f8=new RegExp(`[${Zs}]+|\\s+|[^${Zs}]`,"ug");class d8 extends Fh{equals(r,l,i){return i.ignoreCase&&(r=r.toLowerCase(),l=l.toLowerCase()),r.trim()===l.trim()}tokenize(r,l={}){let i;if(l.intlSegmenter){const c=l.intlSegmenter;if(c.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');i=[];for(const f of Array.from(c.segment(r))){const h=f.segment;i.length&&/\s/.test(i[i.length-1])&&/\s/.test(h)?i[i.length-1]+=h:i.push(h)}}else i=r.match(f8)||[];const s=[];let u=null;return i.forEach(c=>{/\s/.test(c)?u==null?s.push(c):s.push(s.pop()+c):u!=null&&/\s/.test(u)?s[s.length-1]==u?s.push(s.pop()+c):s.push(u+c):s.push(c),u=c}),s}join(r){return r.map((l,i)=>i==0?l:l.replace(/^\s+/,"")).join("")}postProcess(r,l){if(!r||l.oneChangePerToken)return r;let i=null,s=null,u=null;return r.forEach(c=>{c.added?s=c:c.removed?u=c:((s||u)&&vx(i,u,s,c),i=c,s=null,u=null)}),(s||u)&&vx(i,u,s,null),r}}const h8=new d8;function p8(e,r,l){return h8.diff(e,r,l)}function vx(e,r,l,i){if(r&&l){const s=el(r.value),u=Oa(r.value),c=el(l.value),f=Oa(l.value);if(e){const h=bx(s,c);e.value=Jd(e.value,c,h),r.value=Da(r.value,h),l.value=Da(l.value,h)}if(i){const h=yx(u,f);i.value=Kd(i.value,f,h),r.value=Ts(r.value,h),l.value=Ts(l.value,h)}}else if(l){if(e){const s=el(l.value);l.value=l.value.substring(s.length)}if(i){const s=el(i.value);i.value=i.value.substring(s.length)}}else if(e&&i){const s=el(i.value),u=el(r.value),c=Oa(r.value),f=bx(s,u);r.value=Da(r.value,f);const h=yx(Da(s,f),c);r.value=Ts(r.value,h),i.value=Kd(i.value,s,h),e.value=Jd(e.value,s,s.slice(0,s.length-h.length))}else if(i){const s=el(i.value),u=Oa(r.value),c=xx(u,s);r.value=Ts(r.value,c)}else if(e){const s=Oa(e.value),u=el(r.value),c=xx(s,u);r.value=Da(r.value,c)}}class g8 extends Fh{tokenize(r){const l=new RegExp(`(\\r?\\n)|[${Zs}]+|[^\\S\\n\\r]+|[^${Zs}]`,"ug");return r.match(l)||[]}}const m8=new g8;function b8(e,r,l){return m8.diff(e,r,l)}class y8 extends Fh{constructor(){super(...arguments),this.tokenize=w8}equals(r,l,i){return i.ignoreWhitespace?((!i.newlineIsToken||!r.includes(`
58
- `))&&(r=r.trim()),(!i.newlineIsToken||!l.includes(`
59
- `))&&(l=l.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(r.endsWith(`
60
- `)&&(r=r.slice(0,-1)),l.endsWith(`
61
- `)&&(l=l.slice(0,-1))),super.equals(r,l,i)}}const x8=new y8;function v8(e,r,l){return x8.diff(e,r,l)}function w8(e,r){r.stripTrailingCr&&(e=e.replace(/\r\n/g,`
62
- `));const l=[],i=e.split(/(\n|\r\n)/);i[i.length-1]||i.pop();for(let s=0;s<i.length;s++){const u=i[s];s%2&&!r.newlineIsToken?l[l.length-1]+=u:l.push(u)}return l}function Q0(e,r){const l=b8(e,r),i=[],s=[];for(const u of l)u.added?s.push({value:u.value,type:"added"}):u.removed?i.push({value:u.value,type:"removed"}):(i.push({value:u.value,type:"unchanged"}),s.push({value:u.value,type:"unchanged"}));return{oldSegments:i,newSegments:s}}function K0(e,r){if(!e.trim()||!r.trim()||e===r)return!1;const l=p8(e,r);let i=0,s=0;for(const c of l)s+=c.value.length,!c.added&&!c.removed&&(i+=c.value.length);return i/s>=.2}function J0({onSubmit:e,onCancel:r,selectedCode:l,syntaxTheme:i,filename:s}){const[u,c]=T.useState(""),[f,h]=T.useState(!1),[p,m]=T.useState("edit"),b=T.useRef(null),v=p1(u),x=v?p:"edit",w=async C=>{if(C.preventDefault(),!!u.trim()){h(!0);try{await e(u.trim()),c(""),m("edit")}catch(E){console.error("Failed to submit comment:",E)}finally{h(!1)}}},S=C=>{C.key==="Enter"&&(C.metaKey||C.ctrlKey)?w(C):C.key==="Escape"&&r()};return y.jsxs("form",{className:"m-2 mx-3 p-3 bg-github-bg-tertiary border border-yellow-600/50 rounded-md border-l-4 border-l-yellow-400",onSubmit:w,"data-empty":!u.trim(),children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsx("span",{className:"text-sm font-medium",style:{color:"var(--color-yellow-path-text)"},children:"Add a comment"}),v?y.jsxs("div",{className:"flex items-center border border-github-border rounded-md overflow-hidden",children:[y.jsx("button",{type:"button",onClick:()=>m("edit"),className:`text-xs px-2.5 py-1.5 ${x==="edit"?"bg-github-bg-tertiary text-github-text-primary":"bg-github-bg-secondary text-github-text-secondary"} transition-colors`,children:"Edit"}),y.jsx("button",{type:"button",onClick:()=>m("preview"),className:`text-xs px-2.5 py-1.5 border-l border-github-border ${x==="preview"?"bg-github-bg-tertiary text-github-text-primary":"bg-github-bg-secondary text-github-text-secondary"} transition-colors`,children:"Preview"})]}):y.jsx(g1,{selectedCode:l,value:u,onChange:c,textareaRef:b})]}),v&&x==="preview"?y.jsx("div",{className:"min-h-[60px] mb-2 bg-github-bg-secondary border border-github-border rounded px-3 py-2",children:y.jsx(wd,{body:u,originalCode:l,filename:s,syntaxTheme:i})}):y.jsx("textarea",{ref:b,className:"w-full min-h-[60px] mb-2 resize-y bg-github-bg-secondary border border-github-border rounded px-3 py-2 text-github-text-primary text-sm leading-6 focus:outline-none focus:border-blue-600 focus:ring-2 focus:ring-blue-600/30 focus:min-h-[80px] disabled:opacity-50",value:u,onChange:C=>c(C.target.value),onKeyDown:S,placeholder:"Leave a comment...",rows:Math.max(3,u.split(`
63
- `).length),autoFocus:!0,disabled:f}),y.jsxs("div",{className:"flex gap-2 justify-end",children:[y.jsx("button",{type:"button",onClick:r,className:"text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all disabled:opacity-50",disabled:f,children:"Cancel"}),y.jsx("button",{type:"submit",className:"text-xs px-3 py-1.5 rounded transition-all disabled:opacity-50",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:C=>{C.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",C.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:C=>{C.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",C.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},disabled:!u.trim()||f,children:f?"Submitting...":"Submit"})]})]})}const Qs=Jt.memo(({onMouseDown:e,onMouseUp:r,title:l="Add a comment"})=>y.jsx("button",{className:"absolute -right-2 top-1/2 -translate-y-1/2 w-7 h-7 flex items-center justify-center rounded transition-all duration-150 hover:scale-110 z-10","data-comment-button":"true",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:i=>{i.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",i.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:i=>{i.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",i.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},onMouseDown:e,onMouseUp:r,title:l,children:y.jsx(Wx,{className:"w-4 h-4"})}));Qs.displayName="CommentButton";const Ks=Jt.memo(({onClick:e,title:r="Open in editor",className:l})=>y.jsx("button",{className:`absolute -right-10 top-1/2 -translate-y-1/2 w-7 h-7 flex items-center justify-center rounded transition-all duration-150 hover:scale-110 z-10 ${l||""}`,"data-open-in-editor-button":"true",style:{backgroundColor:"var(--color-editor-btn-bg)",color:"var(--color-editor-btn-text)",border:"1px solid var(--color-editor-btn-border)"},onMouseEnter:i=>{i.currentTarget.style.backgroundColor="var(--color-editor-btn-hover-bg)",i.currentTarget.style.borderColor="var(--color-editor-btn-hover-border)"},onMouseLeave:i=>{i.currentTarget.style.backgroundColor="var(--color-editor-btn-bg)",i.currentTarget.style.borderColor="var(--color-editor-btn-border)"},onMouseDown:i=>{i.stopPropagation()},onClick:i=>{i.stopPropagation(),e(i)},title:r,children:y.jsx(S2,{className:"w-4 h-4 opacity-80"})}));Ks.displayName="OpenInEditorButton";const S8=e=>{if("isExpanded"in e&&e.isExpanded)return"bg-github-bg-tertiary/80";switch(e.type){case"add":return"bg-diff-addition-bg";case"delete":return"bg-diff-deletion-bg";default:return"bg-transparent"}},W0=Jt.memo(({line:e,index:r,lineId:l,isCurrentLine:i=!1,hoveredLineIndex:s,selectedLineStyle:u,onMouseEnter:c,onMouseLeave:f,onMouseMove:h,onCommentButtonMouseDown:p,onCommentButtonMouseUp:m,onOpenInEditor:b,syntaxTheme:v,onClick:x,filename:w,diffSegments:S})=>{const C=e.newLineNumber||e.oldLineNumber,E=s===r&&C,N=i?"keyboard-cursor":"";return y.jsxs("tr",{id:l,className:`group ${S8(e)} relative ${u} ${N} cursor-pointer`,onMouseEnter:c,onMouseLeave:f,onMouseMove:h,onClick:x,children:[y.jsx("td",{className:"w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative",children:e.oldLineNumber||""}),y.jsxs("td",{className:"w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible",children:[y.jsx("span",{children:e.newLineNumber||""}),E&&y.jsxs(y.Fragment,{children:[b&&y.jsx(Ks,{onClick:b}),y.jsx(Qs,{onMouseDown:p,onMouseUp:m})]})]}),y.jsx("td",{className:"p-0 w-full relative align-top",children:y.jsx(h1,{line:e,syntaxTheme:v,filename:w,diffSegments:S})})]})});W0.displayName="DiffLineRow";const wx=e=>e!==void 0&&"isExpanded"in e&&e.isExpanded===!0,Sx=(e,r)=>r?"bg-github-bg-tertiary/80":e?.type==="delete"?"bg-diff-deletion-bg":e?.type==="add"?"bg-diff-addition-bg":e?.type==="normal"?"bg-transparent":"bg-github-bg-secondary";function k8({chunk:e,chunkIndex:r,comments:l,onAddComment:i,onGeneratePrompt:s,onRemoveComment:u,onUpdateComment:c,syntaxTheme:f,cursor:h=null,fileIndex:p=0,onLineClick:m,commentTrigger:b,onCommentTriggerHandled:v,filename:x,onOpenInEditor:w}){const[S,C]=T.useState(null),[E,N]=T.useState(null),[j,B]=T.useState(!1),[P,L]=T.useState(null),[M,H]=T.useState(null);T.useEffect(()=>{if(b?.lineIndex!==void 0){const O=e.lines[b.lineIndex];if(O&&O.type!=="delete"){const $=O.newLineNumber;$&&(L({side:"new",lineNumber:$}),v?.())}}},[b,e.lines,v]),T.useEffect(()=>{if(j){const O=()=>{B(!1),C(null),N(null)};return document.addEventListener("mouseup",O),()=>{document.removeEventListener("mouseup",O)}}},[j]);const G=T.useCallback((O,$)=>{P?.side===O&&P?.lineNumber===$?L(null):L({side:O,lineNumber:$})},[P]),z=T.useCallback(()=>{L(null)},[]),V=T.useCallback(()=>{if(!P)return"";const{side:O,lineNumber:$}=P,R=e.lines;if(typeof $=="number")return R.find(U=>O==="old"?U.oldLineNumber===$:U.newLineNumber===$)?.content?.replace(/^[+-]/,"")||"";{const[D,U]=$;return R.filter(ne=>{const re=O==="old"?ne.oldLineNumber:ne.newLineNumber;return re!==void 0&&re>=D&&re<=U}).map(ne=>ne.content?.replace(/^[+-]/,"")||"").join(`
64
- `)}},[P,e.lines]),Y=T.useCallback(async O=>{if(P!==null){const $=V();await i(P.lineNumber,O,$||void 0,P.side),L(null)}},[P,i,V]),J=(O,$)=>l.filter(R=>{const D=Array.isArray(R.line)?R.line[1]===O:R.line===O,U=!R.side||R.side===$;return D&&U}),I=O=>O.oldLine?.type==="delete"&&O.newLine?.type==="add"?O.newLineNumber?"right":"left":O.oldLine?.type==="delete"?"left":O.newLine?.type==="add"?"right":"full",X=(O,$)=>{const R=O==="old"?$.oldLineNumber:$.newLineNumber;if(!R)return"";if(j&&S&&E&&S.side===O&&E.side===O){const D=Math.min(S.lineNumber,E.lineNumber),U=Math.max(S.lineNumber,E.lineNumber);if(R>=D&&R<=U){let A="after:bg-blue-100 after:absolute after:inset-0 after:opacity-30 after:border-l-4 after:border-blue-500 after:pointer-events-none";return R===D&&(A+=" after:border-t-2"),R===U&&(A+=" after:border-b-2"),A}}if(P&&P.side===O){const D=Array.isArray(P.lineNumber)?P.lineNumber:[P.lineNumber,P.lineNumber],U=D[0],A=D[1];if(U!==void 0&&A!==void 0&&R>=U&&R<=A)return"after:bg-diff-selected-bg after:absolute after:inset-0 after:border-l-5 after:border-l-diff-selected-border after:pointer-events-none"}return""},F=T.useCallback(O=>{const $=[];let R=e.oldStart,D=e.newStart,U=0;for(;U<O.length;){const A=O[U];if(!A){U++;continue}if(A.type==="normal")$.push({oldLine:A,newLine:{...A},oldLineNumber:A.oldLineNumber??R,newLineNumber:A.newLineNumber??D,oldLineOriginalIndex:U,newLineOriginalIndex:U}),R++,D++,U++;else if(A.type==="delete"){let ne=U+1;for(;ne<O.length&&O[ne]?.type==="delete";)ne++;const re=O.slice(U,ne),fe=U,ge=[],ye=ne;for(;ne<O.length&&O[ne]?.type==="add";){const me=O[ne];me&&ge.push(me),ne++}const pe=Math.max(re.length,ge.length);for(let me=0;me<pe;me++){const xe=re[me],de=ge[me];let ve;xe&&de&&K0(xe.content,de.content)&&(ve=Q0(xe.content,de.content)),$.push({oldLine:xe,newLine:de,oldLineNumber:xe?xe.oldLineNumber??R+me:void 0,newLineNumber:de?de.newLineNumber??D+me:void 0,oldLineOriginalIndex:xe?fe+me:void 0,newLineOriginalIndex:de?ye+me:void 0,wordLevelDiff:ve})}R+=re.length,D+=ge.length,U=ne}else A.type==="add"&&($.push({newLine:A,newLineNumber:A.newLineNumber??D,newLineOriginalIndex:U}),D++,U++)}return $},[e.oldStart,e.newStart]),Z=T.useMemo(()=>F(e.lines),[e.lines,F]);return y.jsx("div",{className:"bg-github-bg-primary overflow-hidden",children:y.jsx("table",{className:"w-full table-fixed border-collapse font-mono text-sm leading-5",children:y.jsx("tbody",{children:Z.map((O,$)=>{const R=O.oldLineNumber?J(O.oldLineNumber,"old"):[],D=O.newLineNumber?J(O.newLineNumber,"new"):[],U=[...R,...D],A=O.oldLineOriginalIndex??-1,ne=O.newLineOriginalIndex??-1,re=h?h.side==="left"&&A>=0?h.chunkIndex===r&&h.lineIndex===A:h.side==="right"&&ne>=0?h.chunkIndex===r&&h.lineIndex===ne:!1:!1,fe=A>=0?`file-${p}-chunk-${r}-line-${A}-left`:void 0,ge=ne>=0?`file-${p}-chunk-${r}-line-${ne}-right`:void 0,ye=re&&h?.side==="left",pe=re&&h?.side==="right",me="keyboard-cursor";return y.jsxs(Jt.Fragment,{children:[y.jsxs("tr",{className:"group cursor-pointer",onClick:xe=>{if(!j){const de=xe.target;if(!(de instanceof HTMLElement))return;const ve=de.closest("td:nth-child(1)")||de.closest("td:nth-child(2)"),ke=de.closest("td:nth-child(3)")||de.closest("td:nth-child(4)");ve&&A>=0?m?.(p,r,A,"left"):ke&&ne>=0&&m?.(p,r,ne,"right")}},onMouseEnter:xe=>{const de=xe.target;if(!(de instanceof HTMLElement))return;const ve=de.closest("td:nth-child(1)")||de.closest("td:nth-child(2)"),ke=de.closest("td:nth-child(3)")||de.closest("td:nth-child(4)");ve&&O.oldLineNumber?H({side:"old",lineNumber:O.oldLineNumber}):ke&&O.newLineNumber&&H({side:"new",lineNumber:O.newLineNumber})},onMouseMove:xe=>{const de=xe.target;if(!(de instanceof HTMLElement))return;const ve=de.closest("td:nth-child(1)")||de.closest("td:nth-child(2)"),ke=de.closest("td:nth-child(3)")||de.closest("td:nth-child(4)");ve&&O.oldLineNumber?(M?.side!=="old"||M?.lineNumber!==O.oldLineNumber)&&H({side:"old",lineNumber:O.oldLineNumber}):ke&&O.newLineNumber&&(M?.side!=="new"||M?.lineNumber!==O.newLineNumber)&&H({side:"new",lineNumber:O.newLineNumber}),j&&S&&(S.side==="old"&&O.oldLineNumber?N({side:"old",lineNumber:O.oldLineNumber}):S.side==="new"&&O.newLineNumber&&N({side:"new",lineNumber:O.newLineNumber}))},onMouseLeave:()=>H(null),children:[y.jsxs("td",{id:fe,className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible ${ye?me:""}`,children:[y.jsx("span",{children:O.oldLineNumber||""}),M?.side==="old"&&M?.lineNumber===O.oldLineNumber&&y.jsxs(y.Fragment,{children:[w&&O.oldLine?.type!=="delete"&&O.newLineNumber!==void 0&&y.jsx(Ks,{onClick:()=>{const xe=O.newLineNumber;!x||xe===void 0||w(x,xe)}}),y.jsx(Qs,{onMouseDown:xe=>{xe.stopPropagation(),O.oldLineNumber&&(C({side:"old",lineNumber:O.oldLineNumber}),N({side:"old",lineNumber:O.oldLineNumber}),B(!0))},onMouseUp:xe=>{if(xe.stopPropagation(),!O.oldLineNumber||!S){B(!1),C(null),N(null);return}const de=E&&E.side==="old"?E.lineNumber:O.oldLineNumber;if(S.side!=="old"||S.lineNumber===de)G("old",O.oldLineNumber);else{const ve=Math.min(S.lineNumber,de),ke=Math.max(S.lineNumber,de);G("old",[ve,ke])}B(!1),C(null),N(null)}})]})]}),y.jsx("td",{className:`w-1/2 p-0 align-top border-r border-github-border relative ${Sx(O.oldLine,wx(O.oldLine))} ${X("old",O)} ${ye?me:""}`,children:O.oldLine&&y.jsx("div",{className:"flex items-center relative min-h-[20px] px-3",children:O.wordLevelDiff?y.jsx(vd,{segments:O.wordLevelDiff.oldSegments,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(qa,{code:O.oldLine.content,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit",syntaxTheme:f,filename:x})})}),y.jsxs("td",{id:ge,className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible ${pe?me:""}`,children:[y.jsx("span",{children:O.newLineNumber||""}),M?.side==="new"&&M?.lineNumber===O.newLineNumber&&y.jsxs(y.Fragment,{children:[w&&y.jsx(Ks,{onClick:()=>{const xe=O.newLineNumber;!x||xe===void 0||w(x,xe)}}),y.jsx(Qs,{onMouseDown:xe=>{xe.stopPropagation(),O.newLineNumber&&(C({side:"new",lineNumber:O.newLineNumber}),N({side:"new",lineNumber:O.newLineNumber}),B(!0))},onMouseUp:xe=>{if(xe.stopPropagation(),!O.newLineNumber||!S){B(!1),C(null),N(null);return}const de=E&&E.side==="new"?E.lineNumber:O.newLineNumber;if(S.side!=="new"||S.lineNumber===de)G("new",O.newLineNumber);else{const ve=Math.min(S.lineNumber,de),ke=Math.max(S.lineNumber,de);G("new",[ve,ke])}B(!1),C(null),N(null)}})]})]}),y.jsx("td",{className:`w-1/2 p-0 align-top relative ${Sx(O.newLine,wx(O.newLine))} ${X("new",O)} ${pe?me:""}`,children:O.newLine&&y.jsx("div",{className:"flex items-center relative min-h-[20px] px-3",children:O.wordLevelDiff?y.jsx(vd,{segments:O.wordLevelDiff.newSegments,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(qa,{code:O.newLine.content,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit",syntaxTheme:f,filename:x})})})]}),U.length>0&&y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:4,className:"p-0 border-t border-github-border",children:U.map(xe=>{const de=xe.side||"new";let ve;return de==="old"&&O.oldLineNumber?ve="left":de==="new"&&O.newLineNumber?ve="right":ve=I(O),y.jsx("div",{className:`flex ${ve==="left"?"justify-start":ve==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${ve==="full"?"w-full":"w-1/2"}`,children:y.jsx("div",{className:"m-2 mx-3",children:y.jsx(uh,{comment:xe,onGeneratePrompt:s,onRemoveComment:u,onUpdateComment:c,syntaxTheme:f})})})},xe.id)})})}),P&&(P.side==="old"&&P.lineNumber===O.oldLineNumber||P.side==="new"&&P.lineNumber===O.newLineNumber||Array.isArray(P.lineNumber)&&(P.side==="new"&&P.lineNumber[1]===O.newLineNumber||P.side==="old"&&P.lineNumber[1]===O.oldLineNumber))&&y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:4,className:"p-0",children:y.jsx("div",{className:`flex ${P.side==="old"?"justify-start":P.side==="new"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:"w-1/2",children:y.jsx(J0,{onSubmit:Y,onCancel:z,selectedCode:V(),syntaxTheme:f,filename:x})})})})})]},$)})})})})}const E8=T.memo(function({chunk:r,chunkIndex:l,comments:i,onAddComment:s,onGeneratePrompt:u,onRemoveComment:c,onUpdateComment:f,mode:h=Xa,syntaxTheme:p,cursor:m=null,fileIndex:b=0,onLineClick:v,commentTrigger:x,onCommentTriggerHandled:w,filename:S,onOpenInEditor:C}){const[E,N]=T.useState(null),[j,B]=T.useState(null),[P,L]=T.useState(!1),[M,H]=T.useState(null),[G,z]=T.useState(null);T.useEffect(()=>{if(x?.lineIndex!==void 0){const $=r.lines[x.lineIndex];if($){const R=$.newLineNumber||$.oldLineNumber,D=$.type==="delete"?"old":"new";R&&(H({side:D,lineNumber:R}),w?.())}}},[x,r.lines,w]),T.useEffect(()=>{if(P){const $=()=>{L(!1),N(null),B(null)};return document.addEventListener("mouseup",$),()=>{document.removeEventListener("mouseup",$)}}},[P]);const V=T.useCallback(($,R)=>{M?.side===$&&M?.lineNumber===R?H(null):H({side:$,lineNumber:R})},[M]),Y=T.useCallback(()=>{H(null)},[]),J=T.useCallback(()=>{if(!M)return"";const{side:$,lineNumber:R}=M,D=r.lines;if(typeof R=="number")return D.find(A=>$==="old"?A.oldLineNumber===R:A.newLineNumber===R)?.content?.replace(/^[+-]/,"")||"";{const[U,A]=R;return D.filter(re=>{const fe=$==="old"?re.oldLineNumber:re.newLineNumber;return fe!==void 0&&fe>=U&&fe<=A}).map(re=>re.content?.replace(/^[+-]/,"")||"").join(`
65
- `)}},[M,r.lines]),I=T.useCallback(async $=>{if(M!==null){const R=J();await s(M.lineNumber,$,R||void 0,M.side),H(null)}},[M,s,J]),X=($,R)=>i.filter(D=>{const U=Array.isArray(D.line)?D.line[1]===$:D.line===$,A=!D.side||D.side===R;return U&&A}),F=$=>{if(h==="unified")return"full";switch($.type){case"delete":return"left";case"add":return"right";default:return"full"}},Z=($,R)=>{if(!$)return"";if(P&&E&&j){const D=Math.min(E,j),U=Math.max(E,j);if($>=D&&$<=U){let A="after:bg-blue-100 after:absolute after:inset-0 after:opacity-30 after:border-l-4 after:border-blue-500 after:pointer-events-none";return $===D&&(A+=" after:border-t-2"),$===U&&(A+=" after:border-b-2"),A}}if(M&&M.side===R){const D=Array.isArray(M.lineNumber)?M.lineNumber[0]:M.lineNumber,U=Array.isArray(M.lineNumber)?M.lineNumber[1]:M.lineNumber;if($>=D&&$<=U)return"after:bg-diff-selected-bg after:absolute after:inset-0 after:border-l-5 after:border-l-diff-selected-border after:pointer-events-none"}return""},O=T.useMemo(()=>{const $=new Map,R=r.lines;let D=0;for(;D<R.length;){const U=R[D];if(!U){D++;continue}if(U.type==="delete"){let A=D+1;for(;A<R.length&&R[A]?.type==="delete";)A++;const ne=R.slice(D,A),re=D,fe=[];for(;A<R.length&&R[A]?.type==="add";){const ye=R[A];ye&&fe.push({line:ye,index:A}),A++}const ge=Math.max(ne.length,fe.length);for(let ye=0;ye<ge;ye++){const pe=ne[ye],me=fe[ye];if(pe&&me&&K0(pe.content,me.line.content)){const xe=Q0(pe.content,me.line.content);$.set(re+ye,xe.oldSegments),$.set(me.index,xe.newSegments)}}D=A}else D++}return $},[r.lines]);return h==="split"?y.jsx(k8,{chunk:r,chunkIndex:l,comments:i,onAddComment:s,onGeneratePrompt:u,onRemoveComment:c,onUpdateComment:f,onOpenInEditor:C,syntaxTheme:p,cursor:m,fileIndex:b,onLineClick:v,filename:S,commentTrigger:x,onCommentTriggerHandled:w}):y.jsx("div",{className:"bg-github-bg-primary",children:y.jsx("table",{className:"w-full table-fixed border-collapse font-mono text-sm leading-5",children:y.jsx("tbody",{children:r.lines.map(($,R)=>{const D=$.newLineNumber||$.oldLineNumber||0,U=$.type==="delete"?"old":"new",A=M?Array.isArray(M.lineNumber)?M.lineNumber[1]:M.lineNumber:null,ne=$.type==="delete"?$.oldLineNumber:$.newLineNumber,re=$.type==="delete"?"old":"new",fe=ne?X(ne,re):[],ge=`file-${b}-chunk-${l}-line-${R}`,ye=m&&m.chunkIndex===l&&m.lineIndex===R;return y.jsxs(Jt.Fragment,{children:[y.jsx(W0,{line:$,index:R,lineId:ge,isCurrentLine:ye||!1,hoveredLineIndex:G,selectedLineStyle:Z($.newLineNumber||$.oldLineNumber,$.type==="delete"?"old":"new"),onMouseEnter:()=>{z(R)},onMouseLeave:()=>z(null),onMouseMove:()=>{if(P&&E){const pe=$.newLineNumber||$.oldLineNumber;pe&&B(pe)}},onCommentButtonMouseDown:pe=>{pe.stopPropagation();const me=$.newLineNumber||$.oldLineNumber;me&&(N(me),B(me),L(!0))},onCommentButtonMouseUp:pe=>{pe.stopPropagation();const me=$.newLineNumber||$.oldLineNumber,xe=$.type==="delete"?"old":"new";if(!me||!E){L(!1),N(null),B(null);return}const de=j||me;if(E===de)V(xe,me);else{const ve=Math.min(E,de),ke=Math.max(E,de);V(xe,[ve,ke])}L(!1),N(null),B(null)},onOpenInEditor:C&&$.type!=="delete"&&($.newLineNumber||$.oldLineNumber)?()=>{const pe=$.newLineNumber||$.oldLineNumber;pe&&S&&C(S,pe)}:void 0,syntaxTheme:p,filename:S,diffSegments:O.get(R),onClick:()=>{const pe=$.type==="delete"?"left":"right";v?.(b,l,R,pe)}}),fe.map(pe=>{const me=F($);return y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:3,className:"p-0 border-t border-github-border",children:y.jsx("div",{className:`flex ${me==="left"?"justify-start":me==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${me==="full"?"w-full":"w-1/2"} m-2 mx-4`,children:y.jsx(uh,{comment:pe,onGeneratePrompt:u,onRemoveComment:c,onUpdateComment:f,syntaxTheme:p})})})})},pe.id)}),M&&M.side===U&&A===D&&y.jsx("tr",{className:"bg-[var(--bg-secondary)]",children:y.jsx("td",{colSpan:3,className:"p-0",children:y.jsx("div",{className:`flex ${F($)==="left"?"justify-start":F($)==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${F($)==="full"?"w-full":"w-1/2"}`,children:y.jsx(J0,{onSubmit:I,onCancel:Y,selectedCode:J(),syntaxTheme:p,filename:S})})})})})]},R)})})})})}),cd=20,fd=T.memo(function({direction:r,hiddenLines:l,onExpandUp:i,onExpandDown:s,onExpandAll:u,isLoading:c=!1}){if(l<=0)return null;const f=`${l} ${l===1?"line":"lines"}`,h=l<=cd,p="grid-cols-[var(--line-number-width)_1fr]",m="flex flex-1 w-full items-center justify-center py-1 text-github-text-primary hover:bg-github-bg-secondary hover:text-github-text-muted transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed",b=[];return h?b.push({key:"all",onClick:u,ariaLabel:`Expand all ${l} hidden lines`,icon:y.jsx(rk,{size:16,"aria-hidden":"true"})}):((r==="up"||r==="both")&&b.push({key:"up",onClick:i,ariaLabel:`Expand ${cd} hidden lines above`,icon:y.jsx(l2,{size:12,"aria-hidden":"true",className:"translate-y-0.5"})}),(r==="down"||r==="both")&&b.push({key:"down",onClick:s,ariaLabel:`Expand ${cd} hidden lines below`,icon:y.jsx(n2,{size:12,"aria-hidden":"true",className:"-translate-y-0.5"})})),y.jsxs("div",{className:`grid w-full border-l border-r border-github-border bg-github-bg-tertiary text-sm ${p}`,children:[y.jsx("div",{className:"flex flex-col items-stretch justify-center gap-0.5 border-r border-github-border",children:c?y.jsx(I2,{size:14,className:"animate-spin text-github-text-muted self-center","aria-hidden":"true"}):b.map(v=>y.jsx("button",{type:"button",onClick:v.onClick,disabled:c||!v.onClick,className:m,title:v.ariaLabel,"aria-label":v.ariaLabel,children:v.icon},v.key))}),y.jsx("div",{className:"flex items-center justify-start px-3 py-1.5 font-mono text-github-text-muted select-none",children:f})]})});function Js({file:e,comments:r,diffMode:l,syntaxTheme:i,cursor:s,fileIndex:u,mergedChunks:c,isExpandLoading:f,expandHiddenLines:h,expandAllBetweenChunks:p,onAddComment:m,onGeneratePrompt:b,onRemoveComment:v,onUpdateComment:x,onLineClick:w,onOpenInEditor:S,commentTrigger:C,onCommentTriggerHandled:E}){const N=(j,B,P,L)=>j==="top"&&B.hiddenLinesBefore>0?y.jsx(fd,{direction:"down",hiddenLines:B.hiddenLinesBefore,onExpandDown:()=>h(e,P,"up"),onExpandAll:()=>p(e,P,B.hiddenLinesBefore),isLoading:f}):j==="middle"&&B.hiddenLinesBefore>0?y.jsx(fd,{direction:"both",hiddenLines:B.hiddenLinesBefore,onExpandUp:()=>h(e,P-1,"down"),onExpandDown:()=>h(e,P,"up"),onExpandAll:()=>p(e,P,B.hiddenLinesBefore),isLoading:f}):j==="bottom"&&B.hiddenLinesAfter>0?y.jsx(fd,{direction:"up",hiddenLines:B.hiddenLinesAfter,onExpandUp:()=>h(e,L,"down"),onExpandAll:()=>h(e,L,"down",B.hiddenLinesAfter),isLoading:f}):null;return y.jsx(y.Fragment,{children:c.map((j,B)=>{const P=B===0,L=B===c.length-1,M=j.originalIndices[0]??0,H=j.originalIndices[j.originalIndices.length-1]??0;return y.jsxs(Jt.Fragment,{children:[P&&N("top",j,M,H),!P&&N("middle",j,M,H),y.jsx("div",{id:`chunk-${e.path.replace(/[^a-zA-Z0-9]/g,"-")}-${B}`,children:y.jsx(E8,{chunk:j,chunkIndex:B,comments:r,onAddComment:m,onGeneratePrompt:b,onRemoveComment:v,onUpdateComment:x,onOpenInEditor:S,mode:l,syntaxTheme:i,cursor:s&&s.chunkIndex===B?s:null,fileIndex:u,onLineClick:w,commentTrigger:C&&C.chunkIndex===B?C:null,onCommentTriggerHandled:E,filename:e.path})}),L&&N("bottom",j,M,H)]},B)})})}const C8=e=>!!(e&&e!=="stdin"),ki=["text-[26px] font-semibold","text-[22px] font-semibold","text-xl font-semibold","text-lg font-semibold","text-base font-semibold uppercase tracking-wide","text-base font-semibold"],N8=e=>e.type==="delete"||e.type==="remove",A8=e=>e.type==="normal"||e.type==="context",Ws=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),Wd=(e,r,l)=>{const i=e[e.length-1];if(i&&i.type===r){i.lines.push(l);return}e.push({type:r,lines:[l]})},dd=(e,r)=>{r.forEach(l=>Wd(e,"delete",l)),r.length=0},T8=e=>{const r=[],l=[];let i=!1;return e.forEach(s=>{s.lines.forEach(u=>{if(!(u.type==="header"||u.type==="hunk")){if(N8(u)){l.push(u.content);return}if(u.type==="add"){l.length>0&&(dd(r,l),i=!0),Wd(r,i?"change":"add",u.content);return}A8(u)&&(dd(r,l),i=!1,Wd(r,"context",u.content))}}),dd(r,l),i=!1}),r},j8=e=>Jt.isValidElement(e),R8=e=>Jt.isValidElement(e),eh=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(eh).join(""):j8(e)?eh(e.props.children):"",ev=e=>({h1:({children:r})=>y.jsx("h1",{className:`${ki[0]} mt-6 mb-2 first:mt-0`,children:r}),h2:({children:r})=>y.jsx("h2",{className:`${ki[1]} mt-6 mb-2 first:mt-0`,children:r}),h3:({children:r})=>y.jsx("h3",{className:`${ki[2]} mt-6 mb-2 first:mt-0`,children:r}),h4:({children:r})=>y.jsx("h4",{className:`${ki[3]} mt-6 mb-2 first:mt-0`,children:r}),h5:({children:r})=>y.jsx("h5",{className:`${ki[4]} mt-6 mb-2 first:mt-0`,children:r}),h6:({children:r})=>y.jsx("h6",{className:`${ki[5]} mt-6 mb-2 first:mt-0`,children:r}),p:({children:r})=>y.jsx("p",{className:"text-base leading-7",children:r}),ul:({children:r})=>y.jsx("ul",{className:"list-disc pl-6 text-base space-y-1",children:r}),ol:({children:r})=>y.jsx("ol",{className:"list-decimal pl-6 text-base space-y-1",children:r}),li:({children:r})=>y.jsx("li",{children:r}),blockquote:({children:r})=>y.jsx("blockquote",{className:"border-l-4 border-github-border pl-4 text-github-text-muted italic",children:r}),hr:()=>y.jsx("hr",{className:"border-github-border"}),a:({href:r,children:l})=>{const i=r??"";if(!i||!Ws(i))return y.jsx("span",{children:l});const s=i.startsWith("http");return y.jsx("a",{href:i,target:s?"_blank":void 0,rel:s?"noreferrer":void 0,className:"text-sky-400 hover:text-sky-300 underline underline-offset-4",children:l})},img:({src:r,alt:l})=>{const i=r??"";return!i||!Ws(i)?null:y.jsx("img",{src:i,alt:l??"",loading:"lazy",className:"max-w-full rounded border border-github-border"})},pre:({children:r})=>{const i=(Array.isArray(r)?r:[r]).find(R8),s=eh(i??r),c=/language-(\S+)/.exec(i?.props.className??"")?.[1];return s.trim()?y.jsx("pre",{className:"markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm",children:y.jsx(sh,{code:s.replace(/\n$/,""),language:c,syntaxTheme:e,className:"font-mono text-github-text-primary"})}):y.jsx("pre",{className:"markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm",children:r})},code:({className:r,children:l})=>r?y.jsx("code",{className:r,children:l}):y.jsx("code",{className:"px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-sm font-mono",children:l})}),_8=e=>{switch(e){case"add":return"border-l-4 border-diff-addition-border";case"delete":return"border-l-4 border-diff-deletion-border";case"change":return"border-l-4 border-diff-addition-border";default:return"border-l-4 border-transparent"}},L8=e=>/^\s*\[[^\]]+\]:\s+\S+/.test(e),D8=e=>/^\s*\[\^[^\]]+\]:\s+/.test(e),O8=e=>/^\s*<!--.*-->\s*$/.test(e),M8=e=>e.trim()===""||L8(e)||D8(e)||O8(e),z8=e=>e.every(M8),B8=({blocks:e,syntaxTheme:r})=>{const l=T.useMemo(()=>ev(r),[r]);return y.jsx("div",{className:"space-y-4",children:e.map((i,s)=>{const c=i.lines.join(`
66
- `).trim();if(!c)return null;const f=z8(i.lines);return y.jsx("div",{className:`px-4 ${_8(i.type)}`,children:f?y.jsx("pre",{className:"whitespace-pre-wrap text-sm text-github-text-primary font-mono",children:c}):y.jsx(Dh,{remarkPlugins:[Bh],urlTransform:h=>Ws(h)?h:"",components:l,children:c})},`preview-block-${s}`)})})},F8=({content:e,syntaxTheme:r})=>{const l=T.useMemo(()=>ev(r),[r]);return y.jsx("div",{className:"space-y-4",children:y.jsx(Dh,{remarkPlugins:[Bh],urlTransform:i=>Ws(i)?i:"",components:l,children:e})})};function I8(e){const{file:r,baseCommitish:l,targetCommitish:i,mergedChunks:s,syntaxTheme:u}=e,[c,f]=T.useState("diff"),[h,p]=T.useState(null),[m,b]=T.useState(!1),[v,x]=T.useState(null),[w,S]=T.useState(null),C=T.useMemo(()=>T8(s),[s]),E=T.useMemo(()=>!l&&!i?null:r.status==="added"?i?{path:r.path,ref:i}:null:r.status==="deleted"?l?{path:r.oldPath||r.path,ref:l}:null:i?{path:r.path,ref:i}:l?{path:r.oldPath||r.path,ref:l}:null,[l,i,r.path,r.oldPath,r.status]),N=T.useMemo(()=>E?`${E.ref}:${E.path}`:null,[E]);T.useEffect(()=>{if(!E||!N||!C8(E.ref)){p(null),S(null),x(null),b(!1);return}let B=!1;return(N!==w||h===null)&&(async()=>{N!==w&&p(null),b(!0),x(null);try{const L=encodeURIComponent(E.path),M=await fetch(`/api/blob/${L}?ref=${encodeURIComponent(E.ref)}`);if(!M.ok)throw new Error(`Failed to fetch preview: ${M.statusText}`);const H=await M.text();B||(p(H),S(N))}catch(L){B||(p(null),S(null),x(L instanceof Error?L.message:"Failed to load preview"))}finally{B||b(!1)}})(),()=>{B=!0}},[h,w,E,N]);const j=T.useMemo(()=>N===w&&h!==null,[h,w,N]);return T.useEffect(()=>{c==="full-preview"&&!j&&f("diff-preview")},[j,c]),y.jsxs("div",{className:"bg-github-bg-primary",children:[y.jsx("div",{className:"flex items-center justify-between border-b border-github-border px-4 py-2",children:y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("button",{onClick:()=>f("diff"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="diff"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Code Diff",children:[y.jsx(nu,{size:14}),"Diff"]}),y.jsxs("button",{onClick:()=>f("diff-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="diff-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Diff Preview",children:[y.jsx(Ls,{size:14}),"Diff Preview"]}),j&&y.jsxs("button",{onClick:()=>f("full-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="full-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Full Preview",children:[y.jsx(Ls,{size:14}),"Full Preview"]})]})}),c==="diff"&&y.jsx(Js,{...e}),c==="diff-preview"&&y.jsx("div",{className:"p-4",children:y.jsx(B8,{blocks:C,syntaxTheme:u})}),c==="full-preview"&&y.jsxs("div",{className:"p-4",children:[m&&y.jsx("div",{className:"text-sm text-github-text-muted mb-3",children:"Loading preview..."}),v&&y.jsx("div",{className:"text-sm text-github-danger mb-3",children:v}),!m&&!v&&h!==null&&y.jsx(F8,{content:h,syntaxTheme:u}),!m&&!v&&h===null&&y.jsx("div",{className:"text-sm text-github-text-muted",children:"Preview unavailable."})]})]})}const Ei=["text-2xl font-semibold","text-xl font-semibold","text-lg font-semibold","text-base font-semibold","text-sm font-semibold uppercase tracking-wide","text-sm font-semibold"],tv={markdown:"Markdown",code:"Code",raw:"Raw",unknown:"Cell"},U8=/"cell_type"\s*:\s*"([^"]+)"/,kx=/"source"\s*:/,H8=/"execution_count"\s*:\s*(null|[0-9]+)/,P8=/"id"\s*:\s*"([^"]+)"/,q8=e=>e.type==="delete"||e.type==="remove",$8=e=>e.type==="normal"||e.type==="context",nv=e=>e.type==="add"?"add":q8(e)?"delete":$8(e)?"context":null,rv=e=>e==="markdown"||e==="code"||e==="raw"?e:"unknown",V8=e=>{const r=e.trim();if(!r.startsWith('"'))return null;let l=r;l.endsWith(",")&&(l=l.slice(0,-1));try{const i=JSON.parse(l);return typeof i=="string"?i:null}catch{return l.replace(/^"/,"").replace(/"$/,"").replace(/\\n/g,`
67
- `).replace(/\\t/g," ").replace(/\\"/g,'"').replace(/\\\\/g,"\\")}},G8=e=>{const r=e.indexOf('"source"');if(r===-1)return null;const l=e.indexOf(":",r);if(l===-1)return null;let i=e.slice(l+1).trim();if(!i)return null;if(i.endsWith(",")&&(i=i.slice(0,-1).trim()),i.startsWith("[")){const s=i.lastIndexOf("]");if(s===-1)return null;const u=i.slice(0,s+1);try{const c=JSON.parse(u);if(Array.isArray(c))return c.filter(f=>typeof f=="string")}catch{return null}return[]}if(i.startsWith('"'))try{const s=JSON.parse(i);return typeof s=="string"?[s]:null}catch{return null}return null},Y8=e=>{const r=X8(e);if(r)return r;const l=[];let i=null,s=!1,u=!1,c=!1;const f=()=>{i&&(i.status=s&&u?"change":s?"add":u?"delete":"context",l.push(i),i=null,s=!1,u=!1,c=!1)},h=p=>{f(),i={cellType:p,sourceLines:[],status:"context"}};return e.forEach(p=>{p.lines.forEach(m=>{const b=nv(m);if(!b)return;const v=m.content.match(U8);if(v?h(rv(v[1]??"")):!i&&kx.test(m.content)&&h("unknown"),!i)return;if(b==="add"&&(s=!0),b==="delete"&&(u=!0),!i.id){const S=m.content.match(P8);S&&(i.id=S[1])}if(i.executionCount===void 0){const S=m.content.match(H8);S&&(i.executionCount=S[1]==="null"?null:S[1])}if(kx.test(m.content)){const S=G8(m.content);if(S){S.forEach(C=>{i?.sourceLines.push({type:b,content:C})}),c=!1;return}c=!0;return}if(!c)return;if(m.content.trim().startsWith("]")){c=!1;return}const w=V8(m.content);w!==null&&i.sourceLines.push({type:b,content:w})})}),f(),{cells:l}},X8=e=>{const r=Ex(e,["add","context"]),l=Ex(e,["delete","context"]),i=Ua(r),s=Ua(l);if(!i&&!s||i&&i.cells.length===0&&!s)return null;const u=i?.language??s?.language;return{cells:lv(s?.cells??[],i?.cells??[]),language:u}},Ex=(e,r)=>e.flatMap(l=>l.lines).map(l=>{const i=nv(l);return!i||!r.includes(i)?null:l.content}).filter(l=>l!==null).join(`
68
- `),Ua=e=>{if(!e.trim())return null;try{const r=JSON.parse(e);if(!r||typeof r!="object"||!("cells"in r))return null;const l=r.cells;if(!Array.isArray(l))return null;const i=r.metadata,s=Z8(i);return{cells:l.map(u=>Q8(u)),language:s}}catch{return null}},Z8=e=>{if(!e||typeof e!="object")return;const r=e,l=r.language_info;if(l&&typeof l=="object"){const s=l.name;if(typeof s=="string"&&s.trim())return s}const i=r.kernelspec;if(i&&typeof i=="object"){const s=i.language;if(typeof s=="string"&&s.trim())return s}},Q8=e=>{const r=typeof e=="object"&&e?e:{},l=typeof r.cell_type=="string"?r.cell_type:"",i=rv(l),s=typeof r.id=="string"?r.id:void 0,u=r.execution_count,c=u===null?null:typeof u=="number"?String(u):typeof u=="string"?u:void 0,f=K8(r.source);return{cellType:i,sourceText:f,id:s,executionCount:c}},K8=e=>typeof e=="string"?e:Array.isArray(e)?e.filter(r=>typeof r=="string").join(""):"",lv=(e,r)=>{const l=[];if(e.some(u=>!!u.id)||r.some(u=>!!u.id)){const u=new Map;e.forEach((f,h)=>{f.id&&u.set(f.id,{cell:f,index:h})});const c=new Set;return r.forEach(f=>{const h=f.id?u.get(f.id):void 0;h&&c.add(h.index),l.push(hd(h?.cell??null,f))}),e.forEach((f,h)=>{c.has(h)||l.push(hd(f,null))}),l}const s=Math.max(e.length,r.length);for(let u=0;u<s;u+=1){const c=e[u]??null,f=r[u]??null;l.push(hd(c,f))}return l},hd=(e,r)=>{if(!r&&e)return{cellType:e.cellType,sourceLines:Ma(e.sourceText,"delete"),status:"delete",id:e.id,executionCount:e.executionCount};if(r&&!e)return{cellType:r.cellType,sourceLines:Ma(r.sourceText,"add"),status:"add",id:r.id,executionCount:r.executionCount};const l=e?.sourceText??"",i=r?.sourceText??"",s=r?.cellType??e?.cellType??"unknown",u=r?.id??e?.id,c=r?.executionCount??e?.executionCount;return l===i&&(e?.cellType??"")===(r?.cellType??"")?{cellType:s,sourceLines:Ma(i,"context"),status:"context",id:u,executionCount:c}:{cellType:s,sourceLines:[...Ma(l,"delete"),...Ma(i,"add")],status:"change",id:u,executionCount:c}},Ma=(e,r)=>e?[{type:r,content:e}]:[],pd=e=>!!(e&&e!=="stdin"),gd=async(e,r)=>{const l=encodeURIComponent(e),i=await fetch(`/api/blob/${l}?ref=${encodeURIComponent(r)}`);return i.ok?i.text():null},Di=(e,r)=>e.filter(l=>r.includes(l.type)).map(l=>l.content).join(""),md=e=>{if(!e)return[];const r=e.split(`
69
- `);return r.length>0&&r[r.length-1]===""&&r.pop(),r},iv=(e,r)=>!e&&!r?[]:e?r?v8(e,r).flatMap(l=>{const i=l.added?"add":l.removed?"delete":"context";return md(l.value).map(s=>({type:i,content:s}))}):md(e).map(l=>({type:"delete",content:l})):md(r).map(l=>({type:"add",content:l})),J8=e=>Jt.isValidElement(e),W8=e=>Jt.isValidElement(e),th=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(th).join(""):J8(e)?th(e.props.children):"",ej=e=>{switch(e){case"add":return"border-l-4 border-diff-addition-border";case"delete":return"border-l-4 border-diff-deletion-border";case"change":return"border-l-4 border-diff-addition-border";default:return"border-l-4 border-transparent"}},Cx=e=>{switch(e){case"before":return"border-l-4 border-diff-deletion-border";case"after":return"border-l-4 border-diff-addition-border";default:return"border-l-4 border-transparent"}},tj=e=>{switch(e){case"add":return"bg-diff-addition-bg";case"delete":return"bg-diff-deletion-bg";default:return"bg-transparent"}},nj=e=>{switch(e){case"add":return"+";case"delete":return"-";default:return" "}},rj=e=>{switch(e){case"add":return"text-github-accent";case"delete":return"text-github-danger";default:return"text-github-text-muted"}},nh=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),lj=e=>({h1:({children:r})=>y.jsx("h1",{className:`${Ei[0]} mb-2`,children:r}),h2:({children:r})=>y.jsx("h2",{className:`${Ei[1]} mb-2`,children:r}),h3:({children:r})=>y.jsx("h3",{className:`${Ei[2]} mb-2`,children:r}),h4:({children:r})=>y.jsx("h4",{className:`${Ei[3]} mb-2`,children:r}),h5:({children:r})=>y.jsx("h5",{className:`${Ei[4]} mb-2`,children:r}),h6:({children:r})=>y.jsx("h6",{className:`${Ei[5]} mb-2`,children:r}),p:({children:r})=>y.jsx("p",{className:"text-sm leading-7",children:r}),ul:({children:r})=>y.jsx("ul",{className:"list-disc pl-6 text-sm space-y-1",children:r}),ol:({children:r})=>y.jsx("ol",{className:"list-decimal pl-6 text-sm space-y-1",children:r}),li:({children:r})=>y.jsx("li",{children:r}),blockquote:({children:r})=>y.jsx("blockquote",{className:"border-l-4 border-github-border pl-4 text-github-text-muted italic",children:r}),hr:()=>y.jsx("hr",{className:"border-github-border"}),a:({href:r,children:l})=>{const i=r??"";if(!i||!nh(i))return y.jsx("span",{children:l});const s=i.startsWith("http");return y.jsx("a",{href:i,target:s?"_blank":void 0,rel:s?"noreferrer":void 0,className:"text-sky-400 hover:text-sky-300 underline underline-offset-4",children:l})},img:({src:r,alt:l})=>{const i=r??"";return!i||!nh(i)?null:y.jsx("img",{src:i,alt:l??"",loading:"lazy",className:"max-w-full rounded border border-github-border"})},pre:({children:r})=>{const i=(Array.isArray(r)?r:[r]).find(W8),s=th(i??r),c=/language-(\S+)/.exec(i?.props.className??"")?.[1];return s.trim()?y.jsx("pre",{className:"border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs",children:y.jsx(sh,{code:s.replace(/\n$/,""),language:c,syntaxTheme:e,className:"font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre"})}):y.jsx("pre",{className:"border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs",children:r})},code:({className:r,children:l})=>r?y.jsx("code",{className:r,children:l}):y.jsx("code",{className:"px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-xs font-mono",children:l}),table:({children:r})=>y.jsx("div",{className:"overflow-x-auto",children:y.jsx("table",{className:"min-w-full border border-github-border",children:r})}),th:({children:r})=>y.jsx("th",{className:"border border-github-border px-2 py-1 bg-github-bg-tertiary text-sm",children:r}),td:({children:r})=>y.jsx("td",{className:"border border-github-border px-2 py-1 text-sm",children:r})}),ij=e=>{const r=Di(e.sourceLines,["context","delete"]),l=Di(e.sourceLines,["context","add"]),i=[];return e.status==="change"?(r.trim()&&i.push({label:"Before",content:r,tone:"before"}),l.trim()&&i.push({label:"After",content:l,tone:"after"}),i.length===0&&i.push({label:"After",content:l,tone:"after"}),i):e.status==="delete"?(i.push({label:"Before",content:r||l,tone:"before"}),i):(i.push({label:"After",content:l||r,tone:"after"}),i)},av=(e,r,l,i)=>{if(!r.trim())return y.jsx("span",{className:"text-xs text-github-text-muted",children:"Empty cell"});if(e==="markdown"){const s=lj(l);return y.jsx(Dh,{remarkPlugins:[Bh],urlTransform:u=>nh(u)?u:"",components:s,children:r})}return e==="raw"?y.jsx("pre",{className:"whitespace-pre-wrap break-words text-xs font-mono text-github-text-primary",children:r}):y.jsx("pre",{className:"overflow-x-auto text-xs",children:y.jsx(qa,{code:r.replace(/\n$/,""),language:i||"python",syntaxTheme:l,className:"font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre"})})},aj=({lines:e,syntaxTheme:r,language:l})=>e.length===0?y.jsx("span",{className:"text-xs text-github-text-muted",children:"Empty cell"}):y.jsx("div",{className:"overflow-x-auto",children:y.jsx("div",{className:"font-mono text-xs",children:e.map((i,s)=>y.jsxs("div",{className:`flex items-start min-h-[16px] ${tj(i.type)}`,children:[y.jsx("span",{className:`w-5 text-center flex-shrink-0 select-none ${rj(i.type)}`,children:nj(i.type)}),y.jsx(qa,{code:i.content||" ",language:l||"python",syntaxTheme:r,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit"})]},`notebook-code-line-${s}`))})}),oj=({cells:e,syntaxTheme:r,language:l})=>y.jsx("div",{className:"space-y-4",children:e.map((i,s)=>{const u=ij(i),c=i.cellType==="code"&&i.executionCount!==void 0?`In[${i.executionCount??" "}]`:null,f=i.cellType==="code",h=f?iv(Di(i.sourceLines,["context","delete"]),Di(i.sourceLines,["context","add"])).filter(p=>p.type!=="context"):[];return f&&h.length===0?null:y.jsxs("div",{className:`rounded border border-github-border bg-github-bg-secondary/40 p-4 ${ej(i.status)}`,children:[y.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2 mb-3",children:y.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[y.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-github-text-muted",children:tv[i.cellType]}),c&&y.jsx("span",{className:"text-xs font-mono text-github-text-secondary",children:c}),i.id&&y.jsx("span",{className:"text-xs font-mono text-github-text-muted",children:i.id})]})}),y.jsx("div",{className:"space-y-3",children:f?y.jsx("div",{className:`px-4 py-3 ${Cx(i.status==="delete"?"before":"after")}`,children:y.jsx(aj,{lines:h,syntaxTheme:r,language:l})}):u.map((p,m)=>y.jsx("div",{className:`px-4 py-3 ${Cx(p.tone)}`,children:y.jsx("div",{className:"text-sm text-github-text-primary",children:av(i.cellType,p.content,r,l)})},`notebook-cell-${s}-section-${m}`))})]},`notebook-cell-${s}`)})}),sj=({cells:e,syntaxTheme:r,language:l})=>y.jsx("div",{className:"space-y-4",children:e.map((i,s)=>{const u=i.cellType==="code"&&i.executionCount!==void 0?`In[${i.executionCount??" "}]`:null;return y.jsxs("div",{className:"rounded border border-github-border bg-github-bg-secondary/40 p-4",children:[y.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:[y.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-github-text-muted",children:tv[i.cellType]}),u&&y.jsx("span",{className:"text-xs font-mono text-github-text-secondary",children:u}),i.id&&y.jsx("span",{className:"text-xs font-mono text-github-text-muted",children:i.id})]}),y.jsx("div",{className:"text-sm text-github-text-primary",children:av(i.cellType,i.sourceText,r,l)})]},`notebook-full-cell-${s}`)})});function uj(e){const{file:r,baseCommitish:l,targetCommitish:i}=e,[s,u]=T.useState("diff"),c=T.useMemo(()=>Y8(e.mergedChunks),[e.mergedChunks]),[f,h]=T.useState({status:"idle",cells:c.cells,language:c.language}),p=T.useMemo(()=>f.cells.filter(L=>L.status==="context"?!1:L.cellType!=="code"?!0:iv(Di(L.sourceLines,["context","delete"]),Di(L.sourceLines,["context","add"])).filter(H=>H.type!=="context").length>0),[f.cells]),[m,b]=T.useState(null),[v,x]=T.useState(c.language),[w,S]=T.useState(!1),[C,E]=T.useState(null),[N,j]=T.useState(null),B=T.useMemo(()=>!l&&!i?null:r.status==="added"?i?{path:r.path,ref:i}:null:r.status==="deleted"?l?{path:r.oldPath||r.path,ref:l}:null:i?{path:r.path,ref:i}:l?{path:r.oldPath||r.path,ref:l}:null,[l,i,r.oldPath,r.path,r.status]),P=T.useMemo(()=>B?`${B.ref}:${B.path}`:null,[B]);return T.useEffect(()=>{let L=!1;return(async()=>{const H=l||"HEAD~1",G=i||"HEAD",z=r.oldPath||r.path,V=r.status!=="added"&&pd(H),Y=r.status!=="deleted"&&pd(G);if(!V&&!Y){h({status:"ready",cells:c.cells,language:c.language,source:"diff",message:"Notebook content could not be loaded, falling back to diff preview."});return}h(J=>({...J,status:"loading"}));try{const[J,I]=await Promise.all([V?gd(z,H):Promise.resolve(null),Y?gd(r.path,G):Promise.resolve(null)]),X=J?Ua(J):null,F=I?Ua(I):null;if(!X&&!F){L||h({status:"ready",cells:c.cells,language:c.language,source:"diff",message:"Notebook content could not be parsed, falling back to diff preview."});return}const Z=F?.language??X?.language??c.language,O=lv(X?.cells??[],F?.cells??[]);L||h({status:"ready",cells:O,source:"blob",language:Z})}catch(J){L||h({status:"error",cells:c.cells,language:c.language,source:"diff",message:J instanceof Error?J.message:"Failed to load notebook preview."})}})(),()=>{L=!0}},[l,r.oldPath,r.path,r.status,e.mergedChunks,i,c]),T.useEffect(()=>{if(s!=="full-preview")return;if(!B||!P||!pd(B.ref)){b(null),j(null),E(null),S(!1);return}let L=!1;return(P!==N||!m)&&(async()=>{P!==N&&b(null),S(!0),E(null);try{const H=await gd(B.path,B.ref);if(!H)throw new Error("Failed to load preview.");const G=Ua(H);if(!G)throw new Error("Notebook content could not be parsed.");L||(b(G.cells),x(G.language??c.language),j(P))}catch(H){L||(b(null),j(null),E(H instanceof Error?H.message:"Failed to load preview"))}finally{L||S(!1)}})(),()=>{L=!0}},[c.language,m,N,s,B,P]),y.jsxs("div",{className:"bg-github-bg-primary",children:[y.jsx("div",{className:"flex items-center justify-between border-b border-github-border px-4 py-2",children:y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("button",{onClick:()=>u("diff"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${s==="diff"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Code Diff",children:[y.jsx(nu,{size:14}),"Diff"]}),y.jsxs("button",{onClick:()=>u("diff-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${s==="diff-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Diff Preview",children:[y.jsx(Ls,{size:14}),"Diff Preview"]}),y.jsxs("button",{onClick:()=>u("full-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${s==="full-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Full Preview",children:[y.jsx(Ls,{size:14}),"Full Preview"]})]})}),s==="diff"&&y.jsx(Js,{...e}),s==="diff-preview"&&y.jsxs("div",{className:"p-4",children:[f.status==="loading"&&y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:"Loading notebook preview…"}),f.message&&y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:f.message}),p.length===0?y.jsxs("div",{children:[y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:"No changed notebook cells were found. Showing raw diff instead."}),y.jsx(Js,{...e})]}):y.jsx(oj,{cells:p,syntaxTheme:e.syntaxTheme,language:f.language})]}),s==="full-preview"&&y.jsxs("div",{className:"p-4",children:[w&&y.jsx("div",{className:"text-sm text-github-text-muted mb-3",children:"Loading preview..."}),C&&y.jsx("div",{className:"text-sm text-github-danger mb-3",children:C}),!w&&!C&&m&&y.jsx(sj,{cells:m,syntaxTheme:e.syntaxTheme,language:v??c.language}),!w&&!C&&!m&&y.jsx("div",{className:"text-sm text-github-text-muted",children:"Preview unavailable."})]})]})}const bd=[{id:"image",match:e=>z3(e.path),Component:H3,canExpandHiddenLines:()=>!1},{id:"markdown",match:e=>F3(e.path),Component:I8,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"},{id:"notebook",match:e=>U3(e.path),Component:uj,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"},{id:"default",match:()=>!0,Component:Js,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"}],cj=e=>{const r=bd[bd.length-1];if(!r)throw new Error("No diff viewers registered");return bd.find(l=>l.match(e))??r},fj=e=>{switch(e){case"added":return y.jsx(Kx,{size:16,className:"text-github-accent"});case"deleted":return y.jsx(Jx,{size:16,className:"text-github-danger"});case"renamed":return y.jsx(Qx,{size:16,className:"text-github-warning"});default:return y.jsx(nu,{size:16,className:"text-github-text-secondary"})}},dj=({file:e,isCollapsed:r,isReviewed:l,onToggleCollapsed:i,onToggleAllCollapsed:s,onToggleReviewed:u})=>{const[c,f]=T.useState(!1);return y.jsxs("div",{className:"bg-github-bg-secondary border-t-2 border-t-github-accent border-b border-github-border px-5 py-4 flex items-center justify-between flex-wrap gap-3 sticky top-0 z-10",children:[y.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[y.jsx("button",{onClick:h=>{h.altKey?s(!r):i(e.path)},className:"text-github-text-muted hover:text-github-text-primary transition-colors cursor-pointer",title:r?"Expand file (Alt+Click to expand all)":"Collapse file (Alt+Click to collapse all)",children:r?y.jsx(Xx,{size:16}):y.jsx(Ri,{size:16})}),fj(e.status),y.jsx("h2",{className:"text-sm font-mono text-github-text-primary m-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e.path}),y.jsx("button",{className:`bg-transparent border-none cursor-pointer px-1.5 py-1 rounded text-sm transition-all hover:bg-github-bg-tertiary ${c?"text-github-accent":"text-github-text-secondary hover:text-github-text-primary"}`,onClick:()=>{navigator.clipboard.writeText(e.path).then(()=>{console.log("File path copied to clipboard:",e.path),f(!0),setTimeout(()=>f(!1),2e3)}).catch(h=>{console.error("Failed to copy file path:",h)})},title:"Copy file path",children:c?y.jsx(Pa,{size:14}):y.jsx(Zx,{size:14})}),e.oldPath&&e.oldPath!==e.path&&y.jsxs("span",{className:"text-xs text-github-text-muted italic",children:["(renamed from ",e.oldPath,")"]})]}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[y.jsxs("span",{className:"font-medium px-1 py-0.5 rounded text-github-accent bg-green-100/10",children:["+",e.additions]}),y.jsxs("span",{className:"font-medium px-1 py-0.5 rounded text-github-danger bg-red-100/10",children:["-",e.deletions]})]}),y.jsxs("button",{onClick:()=>u(e.path),className:`flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-all duration-200 ${l?"bg-github-accent text-white":"dark:bg-slate-600 dark:text-white dark:border-slate-500 dark:hover:bg-slate-500 dark:hover:border-slate-400 bg-github-bg-secondary text-github-text-primary border border-github-border hover:bg-github-bg-tertiary hover:border-github-text-muted"}`,title:l?"Mark as not reviewed":"Mark as reviewed",children:[l?y.jsx(Pa,{size:14}):y.jsx(W2,{size:14}),"Viewed"]})]})]})},hj=e=>{const r={old:[],new:[]};return e.forEach(l=>{const i=l.side??"new",[s,u]=Array.isArray(l.line)?[l.line[0],l.line[1]]:[l.line,l.line];s<=0||u<=0||r[i].push({start:Math.min(s,u),end:Math.max(s,u)})}),r},pj=(e,r)=>e.chunks.map((l,i)=>{const s=r==="old"?l.oldStart:l.newStart,u=r==="old"?l.oldLines:l.newLines;return!s||u<=0?null:{start:s,end:s+u-1,index:i}}).filter(l=>!!l),gj=e=>{const r=[],l=e[0];if(!l)return r;l.start>1&&r.push({type:"before",start:1,end:l.start-1,nextChunkIndex:l.index});for(let s=1;s<e.length;s+=1){const u=e[s-1],c=e[s];!u||!c||c.start>u.end+1&&r.push({type:"between",start:u.end+1,end:c.start-1,prevChunkIndex:u.index,nextChunkIndex:c.index})}const i=e[e.length-1];return i&&r.push({type:"after",start:i.end+1,end:Number.POSITIVE_INFINITY,prevChunkIndex:i.index}),r},mj=e=>{const r=new Map;return e.forEach(l=>{const i=l.originalIndices[0];i!==void 0&&r.set(i,l)}),r},bj=e=>{const r=e[e.length-1];return r?.originalIndices[r.originalIndices.length-1]??null},yj=T.memo(function({file:r,comments:l,diffMode:i,reviewedFiles:s,onToggleReviewed:u,collapsedFiles:c,onToggleCollapsed:f,onToggleAllCollapsed:h,onAddComment:p,onGeneratePrompt:m,onRemoveComment:b,onUpdateComment:v,onOpenInEditor:x,syntaxTheme:w,baseCommitish:S,targetCommitish:C,cursor:E=null,fileIndex:N=0,onLineClick:j,commentTrigger:B,onCommentTriggerHandled:P,mergedChunks:L,expandLines:M,expandAllBetweenChunks:H,prefetchFileContent:G,isExpandLoading:z}){const V=c.has(r.path),Y=T.useRef(null),[J,I]=T.useState(!1),X=cj(r),F=X.canExpandHiddenLines?.(r)??!1;T.useEffect(()=>{if(!F)return;const D=Y.current;if(!D)return;const U=new IntersectionObserver(([A])=>{A?.isIntersecting&&I(!0)},{rootMargin:"200px"});return U.observe(D),()=>U.disconnect()},[F]),T.useEffect(()=>{J&&!V&&F&&G(r)},[J,V,F,r,G]);const Z=T.useCallback(async(D,U,A,ne)=>{try{await p(r.path,D,U,A,ne)}catch(re){console.error("Failed to add comment:",re)}},[r.path,p]);T.useEffect(()=>{if(V||z||!F||l.length===0||r.chunks.length===0||L.length===0)return;const D=hj(l),U=mj(L),A=bj(L),ne=L[L.length-1],re=new Set,fe=(ge,ye)=>{re.has(ge)||(re.add(ge),ye())};["old","new"].forEach(ge=>{const ye=D[ge];if(ye.length===0)return;const pe=pj(r,ge);gj(pe).forEach(xe=>{if(!ye.some($e=>$e.start<=xe.end&&$e.end>=xe.start))return;if(xe.type==="after"&&ne&&A!==null){ne.hiddenLinesAfter>0&&fe(`after-${A}`,()=>{M(r,A,"down",ne.hiddenLinesAfter)});return}const ve=xe.nextChunkIndex;if(ve===void 0)return;const ke=U.get(ve);!ke||ke.hiddenLinesBefore<=0||(xe.type==="before"?fe(`before-${ve}`,()=>{M(r,ve,"up",ke.hiddenLinesBefore)}):xe.type==="between"&&fe(`between-${ve}`,()=>{H(r,ve,ke.hiddenLinesBefore)}))})})},[l,H,M,r,V,z,L,F]);const O="4em",$=X.Component,R={file:r,comments:l,diffMode:i,syntaxTheme:w,baseCommitish:S,targetCommitish:C,cursor:E,fileIndex:N,mergedChunks:L,isExpandLoading:z,expandHiddenLines:M,expandAllBetweenChunks:H,onAddComment:Z,onGeneratePrompt:m,onRemoveComment:b,onUpdateComment:v,onOpenInEditor:x,onLineClick:j,commentTrigger:B,onCommentTriggerHandled:P};return y.jsxs("div",{ref:Y,className:"bg-github-bg-primary",style:{"--line-number-width":O},children:[y.jsx(dj,{file:r,isCollapsed:V,isReviewed:s.has(r.path),onToggleCollapsed:f,onToggleAllCollapsed:h,onToggleReviewed:u}),!V&&y.jsx("div",{className:"overflow-y-auto",children:y.jsx($,{...R})})]})});function xj(e){const r={name:"",path:"",isDirectory:!0,children:[]};e.forEach(i=>{const s=i.path.split("/");let u=r;for(let c=0;c<s.length;c++){const f=s[c];if(!f)continue;const h=c===s.length-1,p=s.slice(0,c+1).join("/");u.children||(u.children=[]);let m=u.children.find(b=>b.name===f);m||(m={name:f,path:p,isDirectory:!h,children:h?void 0:[],file:h?i:void 0},u.children.push(m)),u=m}});const l=i=>{if(!i.isDirectory||!i.children)return i;if(i.children=i.children.map(l),i.children.length===1&&i.children[0]?.isDirectory&&i.children[0]?.children){const s=i.children[0];if(s)return i.name?{...i,name:`${i.name}/${s.name}`,path:s.path,children:s.children}:i}return i};return l(r)}function vj({files:e,onScrollToFile:r,comments:l,reviewedFiles:i,onToggleReviewed:s,selectedFileIndex:u}){const c=xj(e),f=T.useRef(null),h=T.useRef(new Map),p={"--dir-row-height":"calc(var(--spacing, 0.25rem) * 9)"},m=H=>{if(!H.isDirectory||!H.children)return[];const G=[];return H.path&&G.push(H.path),H.children.forEach(z=>{G.push(...m(z))}),G},[b,v]=T.useState(()=>new Set(m(c))),[x,w]=T.useState(""),S=H=>l.filter(G=>G.file===H).length,C=T.useMemo(()=>{const H=G=>{if(!x.trim())return G;if(G.isDirectory&&G.children){const z=G.children.map(V=>H(V)).filter(V=>V!==null);return z.length>0?{...G,children:z}:null}else if(G.file)return G.file.path.toLowerCase().includes(x.toLowerCase())?G:null;return null};return H(c)||{...c,children:[]}},[c,x]),E=H=>{switch(H){case"added":return y.jsx(Kx,{size:16,className:"text-github-accent"});case"deleted":return y.jsx(Jx,{size:16,className:"text-github-danger"});case"renamed":return y.jsx(Qx,{size:16,className:"text-github-warning"});default:return y.jsx(nu,{size:16,className:"text-github-text-secondary"})}},N=H=>{v(G=>{const z=new Set(G);return z.has(H)?z.delete(H):z.add(H),z})},j=m(c),B=b.size===j.length&&j.length>0,P=()=>{v(B?new Set:new Set(j))},L=(H,G)=>{const z=f.current,V=H.currentTarget;if(!z){N(G);return}const Y=z.getBoundingClientRect(),J=V.getBoundingClientRect(),I=Number.parseFloat(getComputedStyle(V).top||"0");if(J.top-Y.top<=I+1){const O=h.current.get(G)?.querySelector('[data-tree-row="true"]:not([data-dir-header="true"])'),$=V.getBoundingClientRect().height||0,R=O??V,D=Number.parseInt(R.dataset.depth||V.dataset.depth||"0",10),U=$*D,A=Math.max(0,R.offsetTop-U);if(Math.abs(z.scrollTop-A)<=1){N(G);return}z.scrollTo({top:A,behavior:"smooth"});return}N(G)},M=(H,G=0)=>{if(H.isDirectory&&H.children){const z=b.has(H.path);return y.jsxs("div",{"data-dir-container":H.path||void 0,ref:V=>{H.path&&(V?h.current.set(H.path,V):h.current.delete(H.path))},children:[H.name&&y.jsxs("div",{className:"sticky flex h-9 items-center gap-2 bg-github-bg-secondary px-4 hover:bg-github-bg-tertiary cursor-pointer","data-dir-header":"true","data-tree-row":"true","data-depth":G,style:{paddingLeft:`${G*16+16}px`,top:`calc(${G} * var(--dir-row-height))`,zIndex:1e3-G},onClick:V=>L(V,H.path),children:[z?y.jsx(Ri,{size:16}):y.jsx(Xx,{size:16}),z?y.jsx(j2,{size:16,className:"text-github-text-secondary"}):y.jsx(_2,{size:16,className:"text-github-text-secondary"}),y.jsx("span",{className:"text-sm text-github-text-primary font-medium flex-1 overflow-hidden text-ellipsis whitespace-nowrap",title:H.name,children:H.name})]}),(z||!H.name)&&H.children.map(V=>M(V,H.name?G+1:G))]},H.path)}else if(H.file){const z=H.file,V=S(z.path),Y=i.has(z.path),J=e.findIndex(X=>X.path===z.path),I=u!==null&&u===J;return y.jsxs("div",{className:`flex items-center gap-2 px-4 py-2 hover:bg-github-bg-tertiary cursor-pointer transition-colors ${Y?"opacity-70":""} ${I?"bg-github-bg-tertiary":""}`,"data-file-row":"true","data-tree-row":"true","data-depth":G,style:{paddingLeft:`${G*16+16}px`},onClick:()=>r(z.path),children:[y.jsx(t1,{checked:Y,onChange:()=>{s(z.path)},title:Y?"Mark as not reviewed":"Mark as reviewed",className:"z-10"}),E(H.file.status),y.jsx("span",{className:`text-sm text-github-text-primary flex-1 overflow-hidden text-ellipsis whitespace-nowrap ${Y?"line-through text-github-text-muted":""}`,title:H.file.path,children:H.name}),V>0&&y.jsxs("span",{className:"text-github-warning text-sm font-medium ml-auto flex items-center gap-1",children:[y.jsx(Wx,{size:14}),V]})]},z.path)}return null};return y.jsxs("div",{className:"h-full flex flex-col",children:[y.jsxs("div",{className:"px-4 py-3 border-b border-github-border bg-github-bg-tertiary",children:[y.jsxs("div",{className:"flex items-center justify-between mb-3",children:[y.jsxs("h3",{className:"text-sm font-semibold text-github-text-primary m-0",children:["Files changed (",e.length,")"]}),y.jsx("button",{onClick:P,className:"p-1 hover:bg-github-bg-primary rounded transition-colors",title:B?"Collapse all":"Expand all",children:B?y.jsx(f2,{size:16,className:"text-github-text-secondary"}):y.jsx(h2,{size:16,className:"text-github-text-secondary"})})]}),y.jsxs("div",{className:"relative",children:[y.jsx(Q2,{size:16,className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-github-text-muted"}),y.jsx("input",{type:"text",placeholder:"Filter files...",value:x,onChange:H=>w(H.target.value),className:"w-full pl-9 pr-3 py-2 text-sm bg-github-bg-primary border border-github-border rounded-md focus:outline-none focus:border-github-accent text-github-text-primary placeholder-github-text-muted"})]})]}),y.jsx("div",{className:"flex-1 overflow-y-auto relative z-0",style:p,ref:f,children:C.children?.map(H=>M(H))})]})}function wj({style:e}){return y.jsx("svg",{width:"98",height:"96",viewBox:"0, 0, 98, 96",style:e,xmlns:"http://www.w3.org/2000/svg","aria-label":"GitHub",role:"img",children:y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z",fill:"currentColor"})})}function Sj({isOpen:e,onClose:r}){const{enableScope:l,disableScope:i}=Ya();return lt("escape",()=>r(),{enabled:e},[r,e]),T.useEffect(()=>(e?i("navigation"):l("navigation"),()=>{l("navigation")}),[e,l,i]),e?y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:r}),y.jsxs("div",{className:"relative bg-github-bg-primary border border-github-border rounded-lg shadow-lg max-w-4xl w-full mx-4 max-h-[80vh] overflow-y-auto",children:[y.jsxs("div",{className:"sticky top-0 bg-github-bg-primary border-b border-github-border px-6 py-4 flex items-center justify-between",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"Keyboard Shortcuts"}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary transition-colors","aria-label":"Close help modal",children:y.jsx(ru,{size:20})})]}),y.jsxs("div",{className:"px-6 py-4 grid grid-cols-1 lg:grid-cols-2 gap-6",children:[y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Line Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"j"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"↓"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Next line"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"k"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"↑"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous line"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"File Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"]"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"["}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"["})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Jump to first file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"]"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Jump to last file"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Chunk Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"n"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next change chunk (added/deleted lines)"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"p"}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous change chunk (added/deleted lines)"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Comment Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"N"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next comment"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"P"}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous comment"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Side Navigation (Side-by-side mode)"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"h"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"←"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Focus left side"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"l"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"→"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Focus right side"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Comment Management"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"L"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"View all comments list"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"C"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Copy all comments prompt"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"D"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Delete all comments"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Actions"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"v"}),y.jsx("span",{className:"text-github-text-secondary",children:"Toggle viewed state of current file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"R"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Refresh diff when changes detected"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"c"}),y.jsx("span",{className:"text-github-text-secondary",children:"Add comment at current line"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"."}),y.jsx("span",{className:"text-github-text-secondary",children:"Move cursor to center of viewport"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"?"}),y.jsx("span",{className:"text-github-text-secondary",children:"Show/hide this help"})]})]})]}),y.jsx("div",{className:"pt-4 border-t border-github-border lg:col-span-2",children:y.jsx("p",{className:"text-xs text-github-text-secondary",children:"Shortcuts are disabled when typing in input fields."})})]})]})]}):null}function kj({style:e}){return y.jsxs("svg",{style:e,viewBox:"0 0 720 190",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"difit",role:"img",children:[y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M440.487 5.90627C432.164 9.01695 427.318 16.2817 427.318 25.649C427.318 35.9474 433.206 43.6458 442.714 45.7819C451.336 47.7188 459.606 44.3893 464.84 36.8737C466.923 33.8843 467.35 32.4073 467.606 27.3105C467.773 23.9957 467.492 20.0154 466.983 18.4654C465.699 14.5629 460.869 9.13088 456.854 7.07513C452.57 4.88086 444.73 4.32102 440.487 5.90627ZM596.658 6.653C588.927 9.55794 584.572 15.4908 583.887 24.0465C583.17 33.0212 586.83 39.8868 594.382 43.7278C603.739 48.4877 615.574 44.5081 620.482 34.9515C625.35 25.4728 622.15 13.4916 613.37 8.32678C608.986 5.74808 601.154 4.96365 596.658 6.653ZM368.585 7.68006C367.464 8.80629 367.302 12.903 367.302 40.2286V71.4878L363.832 68.1329C353.432 58.0787 335.595 52.668 319.246 54.6082C310.542 55.641 299.81 59.1369 293.3 63.0607C278.56 71.9427 266.453 89.5576 263.139 106.945C261.765 114.155 261.602 129.431 262.825 136.365C265.723 152.796 274.795 168.36 286.716 177.355C298.275 186.077 310.237 190 325.274 190C340.687 190 353.943 185.273 362.869 176.594L367.302 172.284V178.215C367.302 186.902 366.946 186.724 384.303 186.709C392.243 186.702 399.29 186.347 399.964 185.919C401.04 185.236 401.189 174.47 401.189 97.1224C401.189 23.7236 401.003 8.87842 400.068 7.74809C398.433 5.77021 370.547 5.71037 368.585 7.68006ZM526.937 7.94153C519.783 10.0325 515.359 12.5834 510.029 17.6867C501.959 25.4129 498.766 34.4597 498.766 49.5975V58.8517H490.659C484.378 58.8517 482.263 59.1418 481.268 60.1394C480.214 61.1976 479.986 63.6558 479.986 73.91C479.986 82.5264 480.289 86.6977 480.966 87.3764C481.601 88.0141 484.903 88.36 490.356 88.36H498.766V136.692C498.766 183.638 498.811 185.048 500.345 185.873C502.433 186.994 529.394 186.994 531.482 185.873C533.016 185.048 533.061 183.638 533.061 136.692V88.36H549.334C563.038 88.36 565.809 88.1568 566.89 87.0723C568.782 85.1723 568.782 62.0394 566.89 60.1394C565.808 59.0541 563.029 58.8517 549.231 58.8517H532.856L533.216 51.9721C533.604 44.5499 534.721 41.9147 538.546 39.3958C540.377 38.1901 543.049 37.904 554.661 37.6737C562.626 37.5155 569.018 37.0343 569.602 36.5483C570.892 35.4761 571.046 10.3579 569.777 7.9776C568.978 6.47923 567.918 6.39562 550.384 6.45054C535.269 6.49808 530.93 6.77431 526.937 7.94153ZM654.931 26.4834C653.136 27.7662 653.094 28.1572 653.094 43.3245V58.8517H644.567C633.342 58.8517 633.497 58.6443 633.497 73.6059C633.497 88.5674 633.342 88.36 644.567 88.36H653.094V122.636C653.094 159.998 653.439 163.935 657.362 171.354C661.848 179.838 669.111 184.99 680.857 188.022C687.996 189.866 707.647 189.269 714.309 187.007C719.756 185.158 719.86 184.87 719.969 171.298C720.082 157.364 720.441 157.791 709.174 158.48C695.386 159.324 689.341 156.938 687.388 149.883C686.927 148.214 686.58 134.435 686.577 117.663L686.572 88.36H702.068H717.564L718.87 86.3592C719.946 84.7108 720.129 82.3461 719.91 72.9575C719.719 64.8279 719.321 61.1689 718.522 60.2041C717.553 59.0345 715.315 58.8517 701.987 58.8517H686.572L686.546 43.8926C686.526 31.8556 686.28 28.613 685.288 27.2941C684.156 25.7884 682.945 25.6351 670.412 25.4129C658.94 25.2088 656.476 25.3793 654.931 26.4834ZM431.459 60.1394C430.316 61.2877 430.178 68.0001 430.188 121.82C430.197 168.838 430.429 182.667 431.232 184.262L432.264 186.311L446.657 186.535C458.941 186.725 461.242 186.567 462.353 185.452C463.521 184.279 463.655 177.845 463.655 122.786C463.655 68.0985 463.515 61.2877 462.372 60.1394C460.469 58.2287 433.362 58.2287 431.459 60.1394ZM587.799 60.4369C587.238 61.4894 586.954 82.56 586.954 123.084C586.954 177.502 587.093 184.285 588.236 185.434C590.138 187.342 616.431 187.342 618.333 185.434C619.476 184.285 619.615 177.447 619.615 122.482C619.615 75.6149 619.38 60.5828 618.636 59.8353C617.947 59.1443 613.344 58.8517 603.15 58.8517C589.644 58.8517 588.586 58.9607 587.799 60.4369ZM347.956 87.3469C362.023 93.9543 369.138 107.306 367.775 124.535C366.623 139.097 359.678 149.866 347.83 155.463C337.073 160.544 325.541 160.523 315.049 155.403C293.381 144.83 288.765 112.315 306.417 94.5961C313.92 87.0641 322.021 84.1412 334.301 84.5354C341.49 84.7666 343.224 85.124 347.956 87.3469Z",fill:"currentColor"}),y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.42299 0.744751C4.61699 2.15275 2.03999 5.66375 0.956994 12.2768C-0.369006 20.3728 -0.294006 170.791 1.03899 176.572C2.29699 182.031 4.81699 185.308 9.65399 187.774C13.265 189.615 16.865 189.684 108.63 189.684C163.129 189.684 204.095 189.304 204.41 188.795C206 188.5 206 188.795 207.5 188C211.167 187.079 216.779 180.138 218.005 175.584C218.682 173.068 218.939 143.952 218.756 90.4718C218.487 11.7478 218.417 9.10275 216.535 6.62675C215.466 5.22075 213.441 3.19575 212.035 2.12675C209.546 0.23575 206.839 0.17975 110.978 0.0167504C55.373 -0.0782496 11.148 0.239751 9.42299 0.744751ZM203.778 14.8838C205.558 16.6638 205.509 172.577 203.728 175.005C202.577 176.574 198.865 176.688 156.978 176.446L111.478 176.184L111.226 138.684L110.974 101.184H84.059C69.255 101.184 56.808 101.52 56.397 101.931C55.986 102.343 60.674 107.82 66.814 114.104C72.954 120.388 77.978 126.202 77.978 127.026C77.978 129.577 74.769 134.267 71.896 135.916C69.609 137.229 68.75 137.278 66.704 136.217C63.533 134.572 28.705 99.1448 27.757 96.5998C27.36 95.5348 27.491 93.4308 28.049 91.9238C28.955 89.4768 68.498 49.6838 70.024 49.6838C70.366 49.6838 72.356 51.1627 74.447 52.9697C77.589 55.6867 78.118 56.6658 77.498 58.6198C77.086 59.9198 72.075 65.8308 66.363 71.7568C60.651 77.6818 55.978 83.0148 55.978 83.6068C55.978 84.3488 64.068 84.6838 81.952 84.6838H107.927H110.666C111.144 82.5 110.978 73.4537 110.978 46.2337V13.6838H156.778C191.067 13.6838 202.88 13.9858 203.778 14.8838ZM148.803 52.7217C146.51 54.0597 144.845 59.5997 145.74 62.9107C146.146 64.4107 150.657 69.9308 155.764 75.1788C161.411 80.9788 164.547 84.8988 163.764 85.1788C163.057 85.4318 151.549 85.7608 138.19 85.9108C117.896 86.1388 113.747 86.4308 112.956 87.6838C112.435 88.5088 112.002 91.7228 111.993 94.8268C111.982 99.0598 112.373 100.622 113.56 101.077C114.43 101.411 126.13 101.684 139.56 101.684C156.121 101.684 163.978 102.026 163.978 102.746C163.978 103.33 160.187 107.607 155.554 112.251C146.244 121.582 144.276 125.371 146.069 130.514C147.321 134.107 149.576 135.684 153.463 135.684C155.522 135.684 159.843 131.902 173.778 117.904C191.699 99.9008 194.978 96.0678 194.978 93.1208C194.978 91.1338 157.422 53.8238 154.163 52.5728C151.322 51.4818 150.908 51.4937 148.803 52.7217Z",fill:"currentColor"})]})}function Ej({shouldReload:e,isReloading:r,onReload:l,changeType:i,className:s="",compact:u=!1}){if(!e)return null;const c=()=>{switch(i){case"commit":return"New commits available";case"staging":return"Staging changes detected";case"file":return"File changes detected";default:return"Changes detected"}};return y.jsxs("button",{onClick:l,disabled:r,className:`
70
- flex items-center gap-1.5 text-xs rounded-md border ${s} ${u?"px-2 py-2":"px-3 py-1.5"}
71
- ${r?"bg-github-text-primary text-github-bg-primary border-github-text-primary cursor-not-allowed":"bg-github-text-primary text-github-bg-primary border-github-text-primary"}
72
- `,title:`${c()} - Click to refresh`,"aria-label":u?"Refresh":void 0,children:[y.jsx(X2,{size:12,className:`${r?"animate-spin":""}`}),u?y.jsx("span",{className:"sr-only",children:"Refresh"}):"Refresh"]})}function Nx({label:e,value:r,resolvedValue:l,onChange:i,options:s,disabledValues:u=[]}){const[c,f]=T.useState(!1),{refs:h,floatingStyles:p,context:m}=zd({open:c,onOpenChange:f,middleware:[jd(4),_d(),Rd({padding:8})],whileElementsMounted:Td}),b=Ld(m,{handleClose:Id()}),v=Od(m),x=T3(m),w=Md(m),S=Fd(m),{getReferenceProps:C,getFloatingProps:E}=Bd([b,v,x,w,S]),N=r==="working"&&u.includes("staged")||r==="staged"&&u.includes("working"),j=()=>{const G=s.specialOptions.find(Y=>Y.value===r);if(G)return G.label;const z=s.branches.find(Y=>Y.name===r);if(z)return`${z.name}${z.current?" (current)":""}`;const V=s.commits.find(Y=>Y.shortHash===r||Y.hash===r);return V?`${V.shortHash} - ${V.message}`:r||"Select..."},B=G=>{i(G),f(!1)},P=G=>u.includes(G),L=(G,z)=>["w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors",G?"hover:bg-diff-selected-bg focus:bg-diff-selected-bg":"hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary",G?"bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2":"",z?"opacity-50 cursor-not-allowed":"cursor-pointer"].join(" "),M=(G,z)=>G===r||z===r?!0:l?G===l||z===l:!1,H=()=>{let G=0;const z=s.specialOptions.findIndex(V=>V.value===r);if(z!==-1)return z;if(G+=s.specialOptions.length,!N){const V=s.commits.findIndex(J=>J.shortHash===r);if(V!==-1)return G+V;G+=s.commits.length;const Y=s.branches.findIndex(J=>J.name===r);if(Y!==-1)return G+Y}return 0};return y.jsxs(y.Fragment,{children:[y.jsxs("button",{ref:h.setReference,type:"button",className:"flex items-center gap-1.5 cursor-pointer group","aria-haspopup":"listbox","aria-expanded":c,...C(),children:[y.jsxs("span",{className:"text-xs text-github-text-secondary",children:[e,":"]}),y.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors",children:[y.jsx("code",{className:"text-xs text-github-text-primary max-w-[150px] truncate",children:j()}),y.jsx(Ri,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]})]}),c&&y.jsx(Dd,{children:y.jsx(k3,{context:m,modal:!1,initialFocus:H(),children:y.jsxs("div",{ref:h.setFloating,style:p,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[400px] overflow-y-auto",...E(),children:[s.specialOptions.length>0&&y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Special"}),s.specialOptions.map(G=>y.jsx("button",{onClick:()=>B(G.value),disabled:P(G.value),className:L(G.value===r,P(G.value)),children:G.label},G.value))]}),!N&&s.commits.length>0&&y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Recent Commits"}),s.commits.map(G=>y.jsx("button",{onClick:()=>B(G.shortHash),disabled:P(G.shortHash),className:L(M(G.shortHash,G.hash),P(G.shortHash)),children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx("code",{className:"text-xs text-github-text-primary font-mono whitespace-nowrap",children:G.shortHash}),y.jsx("span",{className:"text-xs text-github-text-secondary flex-1 break-words",children:G.message})]})},G.hash))]}),!N&&s.branches.length>0&&y.jsxs("div",{children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Branches"}),s.branches.map(G=>y.jsx("button",{onClick:()=>B(G.name),disabled:P(G.name),className:L(G.name===r,P(G.name)),children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-github-text-primary",children:G.name}),G.current&&y.jsx("span",{className:"text-xs text-github-text-muted",children:"(current)"})]})},G.name))]})]})})})]})}function Cj({isOpen:e,onClose:r,options:l,baseRevision:i,targetRevision:s,resolvedBaseRevision:u,resolvedTargetRevision:c,onApply:f}){const[h,p]=T.useState(i),[m,b]=T.useState(s),{enableScope:v,disableScope:x}=Ya();T.useEffect(()=>(e?x("navigation"):v("navigation"),()=>{v("navigation")}),[e,v,x]);const w=T.useMemo(()=>{const E=c||m,N=l.commits.findIndex(B=>B.shortHash===E||B.hash===E);if(N===-1)return m?[m]:[];const j=l.commits.slice(0,N+1).map(B=>B.shortHash);return m&&!j.includes(m)&&j.push(m),j.includes("working")||j.push("working"),j},[m,c,l.commits]),S=T.useMemo(()=>{const E=u||h,N=l.commits.findIndex(B=>B.shortHash===E||B.hash===E);if(N===-1)return h?[h]:[];const j=l.commits.slice(N).map(B=>B.shortHash);return h&&!j.includes(h)&&j.push(h),j},[h,u,l.commits]);if(!e)return null;const C=()=>{f(h,m),r()};return y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/40",onClick:r}),y.jsxs("div",{className:"relative bg-github-bg-secondary border border-github-border rounded-lg shadow-lg w-full max-w-lg mx-4",children:[y.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-github-border",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"Detailed Diff"}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary p-1","aria-label":"Close detailed diff",children:y.jsx(ru,{size:18})})]}),y.jsxs("div",{className:"p-4 space-y-4",children:[y.jsxs("div",{className:"flex items-center justify-center gap-3",children:[y.jsx(Nx,{label:"Base",value:h,resolvedValue:u,onChange:p,options:l,disabledValues:w}),y.jsx("span",{className:"text-github-text-muted",children:"..."}),y.jsx(Nx,{label:"Target",value:m,resolvedValue:c,onChange:b,options:l,disabledValues:S})]}),y.jsxs("div",{className:"flex justify-end gap-2",children:[y.jsx("button",{onClick:r,className:"px-3 py-1.5 text-xs font-medium rounded border border-github-border text-github-text-secondary hover:text-github-text-primary transition-colors",type:"button",children:"Cancel"}),y.jsx("button",{onClick:C,className:"px-3 py-1.5 text-xs font-medium rounded bg-github-accent text-white hover:bg-github-accent/90 transition-colors",type:"button",children:"Apply"})]})]})]})]})}const Nj=[{id:"vscode",label:"VS Code",protocol:"vscode",cliCommand:"code",cliArgs:[],aliases:["vscode","code"]},{id:"cursor",label:"Cursor",protocol:"cursor",cliCommand:"cursor",cliArgs:[],aliases:["cursor"]},{id:"none",label:"Hide “Open in editor” button",protocol:null,cliCommand:null,cliArgs:[],aliases:["none","disabled","off"]}],ov="vscode",Ax=[{id:"github",label:"GitHub Light"},{id:"vsLight",label:"VS Light"},{id:"oneLight",label:"One Light"},{id:"gruvboxMaterialLight",label:"Gruvbox Material Light"},{id:"nightOwlLight",label:"Night Owl Light"}],Tx=[{id:"vsDark",label:"VS Dark"},{id:"oneDark",label:"One Dark"},{id:"gruvboxMaterialDark",label:"Gruvbox Material Dark"},{id:"nightOwl",label:"Night Owl"},{id:"dracula",label:"Dracula"},{id:"okaidia",label:"Okaidia"}],Aj={fontSize:14,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif',theme:"dark",syntaxTheme:"vsDark",editor:ov},Tj=[{name:"System Font",value:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif'},{name:"Menlo",value:'Menlo, Monaco, "Courier New", monospace'},{name:"SF Mono",value:'SF Mono, Consolas, "Liberation Mono", monospace'},{name:"Fira Code",value:'"Fira Code", "Courier New", monospace'},{name:"JetBrains Mono",value:'"JetBrains Mono", "Courier New", monospace'}];function jj({isOpen:e,onClose:r,settings:l,onSettingsChange:i}){const[s,u]=T.useState(l),{enableScope:c,disableScope:f}=Ya();T.useEffect(()=>{u(l)},[l]),T.useEffect(()=>{i(s)},[s,i]),T.useEffect(()=>(e?f("navigation"):c("navigation"),()=>{c("navigation")}),[e,c,f]);const h=()=>s.theme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":s.theme,p=()=>h()==="light"?Ax:Tx,m=v=>{const x={...s,theme:v},S=(v==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":v)==="light"?Ax:Tx;if(!S.some(E=>E.id===s.syntaxTheme)&&S.length>0){const E=S[0];E&&(x.syntaxTheme=E.id)}u(x)},b=()=>{u(Aj)};return e?y.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50 pointer-events-none",children:y.jsxs("div",{className:"bg-github-bg-secondary border border-github-border rounded-lg w-full max-w-md mx-4 pointer-events-auto",children:[y.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-github-border",children:[y.jsxs("h2",{className:"text-lg font-semibold text-github-text-primary flex items-center gap-2",children:[y.jsx(e1,{size:20}),"Appearance Settings"]}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary p-1",children:y.jsx(ru,{size:18})})]}),y.jsxs("div",{className:"p-4 space-y-6",children:[y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Font Size"}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("input",{type:"range",min:"10",max:"20",step:"1",value:s.fontSize,onChange:v=>u({...s,fontSize:parseInt(v.target.value)}),className:"flex-1 accent-github-accent"}),y.jsxs("span",{className:"text-sm text-github-text-secondary w-8 text-right",children:[s.fontSize,"px"]})]})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Font Family"}),y.jsx("select",{value:s.fontFamily,onChange:v=>u({...s,fontFamily:v.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:Tj.map(v=>y.jsx("option",{value:v.value,children:v.name},v.value))})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Theme"}),y.jsx("div",{className:"flex gap-2",children:["light","dark","auto"].map(v=>y.jsx("button",{onClick:()=>m(v),className:`px-3 py-2 text-sm rounded border transition-colors ${s.theme===v?"bg-github-accent text-white border-github-accent":"bg-github-bg-tertiary text-github-text-secondary border-github-border hover:text-github-text-primary"}`,children:v.charAt(0).toUpperCase()+v.slice(1)},v))})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Syntax Highlighting Theme"}),y.jsx("select",{value:s.syntaxTheme,onChange:v=>u({...s,syntaxTheme:v.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:p().map(v=>y.jsx("option",{value:v.id,children:v.label},v.id))})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Open In Editor"}),y.jsx("select",{value:s.editor,onChange:v=>u({...s,editor:v.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:Nj.map(v=>y.jsx("option",{value:v.id,children:v.label},v.id))})]})]}),y.jsxs("div",{className:"flex items-center justify-between p-4 border-t border-github-border",children:[y.jsx("button",{onClick:b,className:"px-3 py-2 text-sm text-github-text-secondary hover:text-github-text-primary",children:"Reset to Default"}),y.jsx("button",{onClick:r,className:"px-4 py-2 text-sm bg-github-accent text-white rounded hover:bg-green-600",children:"Close"})]})]})}):null}const jx={position:"absolute",fontSize:"16px",pointerEvents:"none",zIndex:100,transform:"translateY(20px) scale(0.5)",opacity:0},Rj=({isActive:e})=>e?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"animate-sparkle-rise",style:{...jx,left:"-12px",animationDelay:"0s"},children:"✨"}),y.jsx("div",{className:"animate-sparkle-rise",style:{...jx,right:"-12px",animationDelay:"0.3s"},children:"✨"})]}):null,Rx={fontSize:14,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif',theme:"dark",syntaxTheme:"vsDark",editor:ov},_x="reviewit-appearance-settings";function _j(){const[e,r]=T.useState(()=>{try{const s=localStorage.getItem(_x);if(s)return{...Rx,...JSON.parse(s)}}catch(s){console.warn("Failed to load appearance settings from localStorage:",s)}return Rx}),l=T.useCallback(s=>{const u=document.documentElement;u.setAttribute("data-theme",s),s==="light"?(u.style.setProperty("--color-github-bg-primary","#ffffff"),u.style.setProperty("--color-github-bg-secondary","#f6f8fa"),u.style.setProperty("--color-github-bg-tertiary","#f1f3f4"),u.style.setProperty("--color-github-border","#d1d9e0"),u.style.setProperty("--color-github-text-primary","#24292f"),u.style.setProperty("--color-github-text-secondary","#656d76"),u.style.setProperty("--color-github-text-muted","#8c959f"),u.style.setProperty("--color-github-accent","#1f883d"),u.style.setProperty("--color-github-danger","#cf222e"),u.style.setProperty("--color-github-warning","#bf8700"),u.style.setProperty("--color-diff-addition-bg","#d1f4cd"),u.style.setProperty("--color-diff-addition-border","#1f883d"),u.style.setProperty("--color-diff-deletion-bg","#ffd8d3"),u.style.setProperty("--color-diff-deletion-border","#cf222e"),u.style.setProperty("--color-diff-neutral-bg","#f1f3f4"),u.style.setProperty("--color-comment-bg","#fff8e1"),u.style.setProperty("--color-comment-border","#ffd54f"),u.style.setProperty("--color-comment-text","#5d4037"),u.style.setProperty("--color-yellow-btn-bg","#fef3c7"),u.style.setProperty("--color-yellow-btn-border","#f59e0b"),u.style.setProperty("--color-yellow-btn-text","#92400e"),u.style.setProperty("--color-yellow-btn-hover-bg","#fde68a"),u.style.setProperty("--color-yellow-btn-hover-border","#d97706"),u.style.setProperty("--color-yellow-path-bg","#fde68a"),u.style.setProperty("--color-yellow-path-text","#92400e"),u.style.setProperty("--color-editor-btn-bg","rgba(248, 250, 252, 0.1)"),u.style.setProperty("--color-editor-btn-border","rgba(31, 41, 55, 0.35)"),u.style.setProperty("--color-editor-btn-text","#1f2937"),u.style.setProperty("--color-editor-btn-hover-bg","rgba(248, 250, 252, 0.2)"),u.style.setProperty("--color-editor-btn-hover-border","rgba(31, 41, 55, 0.5)")):(u.style.setProperty("--color-github-bg-primary","#0d1117"),u.style.setProperty("--color-github-bg-secondary","#161b22"),u.style.setProperty("--color-github-bg-tertiary","#21262d"),u.style.setProperty("--color-github-border","#30363d"),u.style.setProperty("--color-github-text-primary","#f0f6fc"),u.style.setProperty("--color-github-text-secondary","#8b949e"),u.style.setProperty("--color-github-text-muted","#6e7681"),u.style.setProperty("--color-github-accent","#238636"),u.style.setProperty("--color-github-danger","#da3633"),u.style.setProperty("--color-github-warning","#d29922"),u.style.setProperty("--color-diff-addition-bg","#0d4429"),u.style.setProperty("--color-diff-addition-border","#1b7c3d"),u.style.setProperty("--color-diff-deletion-bg","#67060c"),u.style.setProperty("--color-diff-deletion-border","#da3633"),u.style.setProperty("--color-diff-neutral-bg","#21262d"),u.style.setProperty("--color-comment-bg","#1c2128"),u.style.setProperty("--color-comment-border","#373e47"),u.style.setProperty("--color-comment-text","#e6edf3"),u.style.setProperty("--color-yellow-btn-bg","rgba(180, 83, 9, 0.2)"),u.style.setProperty("--color-yellow-btn-border","rgba(217, 119, 6, 0.5)"),u.style.setProperty("--color-yellow-btn-text","#fbbf24"),u.style.setProperty("--color-yellow-btn-hover-bg","rgba(180, 83, 9, 0.3)"),u.style.setProperty("--color-yellow-btn-hover-border","#d97706"),u.style.setProperty("--color-yellow-path-bg","rgba(180, 83, 9, 0.3)"),u.style.setProperty("--color-yellow-path-text","#fbbf24"),u.style.setProperty("--color-editor-btn-bg","rgba(248, 250, 252, 0.1)"),u.style.setProperty("--color-editor-btn-border","rgba(248, 250, 252, 0.3)"),u.style.setProperty("--color-editor-btn-text","#f0f6fc"),u.style.setProperty("--color-editor-btn-hover-bg","rgba(248, 250, 252, 0.2)"),u.style.setProperty("--color-editor-btn-hover-border","rgba(248, 250, 252, 0.45)")),document.body.style.backgroundColor="var(--color-github-bg-primary)",document.body.style.color="var(--color-github-text-primary)"},[]);return T.useEffect(()=>{const s=document.documentElement;if(s.style.setProperty("--app-font-size",`${e.fontSize}px`),s.style.setProperty("--app-font-family",e.fontFamily),e.theme==="auto"){const u=window.matchMedia("(prefers-color-scheme: dark)");l(u.matches?"dark":"light");const c=f=>{l(f.matches?"dark":"light")};return u.addEventListener("change",c),()=>u.removeEventListener("change",c)}else{l(e.theme);return}},[e,l]),{settings:e,updateSettings:s=>{r(s);try{localStorage.setItem(_x,JSON.stringify(s))}catch(u){console.warn("Failed to save appearance settings to localStorage:",u)}}}}function sv(e,r,l,i){const s=typeof r=="number"?`L${r}`:Array.isArray(r)?`L${r[0]}-L${r[1]}`:"",u=e||"<unknown file>";if(n1(l)){const c=r1(l);if(c.length>0){let f=`${u}:${s}`,h=0;for(const m of c){const b=l.slice(h,m.startIndex).trim();b&&(f+=`
73
- ${b}`),i&&(f+=`
74
- ORIGINAL:
75
- \`\`\`
76
- ${i}
77
- \`\`\``),f+=`
78
- SUGGESTED:
79
- \`\`\`
80
- ${m.suggestedCode}
81
- \`\`\``,h=m.endIndex}const p=l.slice(h).trim();return p&&(f+=`
82
- ${p}`),f}}return`${u}:${s}
83
- ${l}`}function Lj(e){return e.length===0?"":e.map(l=>sv(l.file,l.line,l.body,l.codeContent)).join(`
84
- =====
85
- `)}const js="difit-storage-v1";class Dj{generateStorageKey(r,l){const i=s=>s.replace(/[^a-zA-Z0-9-_]/g,u=>`_${u.charCodeAt(0).toString(16)}_`);return`${i(r)}-${i(l)}`}normalizeCommitish(r,l,i){if(r==="."||r==="working")return"WORKING";if(r==="staged")return"STAGED";if((r==="HEAD"||r==="@")&&l)return l;if(i?.has(r)){const s=i.get(r);if(s)return s}return(r.startsWith("@")||r.includes("^")||r.includes("~")||r.includes("HEAD"))&&console.warn(`[StorageService] Cannot normalize symbolic ref '${r}' - may cause key collision. currentCommitHash=${l}`),r}getStorageKey(r,l,i,s,u){let c,f;l==="."||l==="working"?(c=i||r,f="WORKING"):l==="staged"?(c=i||r,f="STAGED"):(c=this.normalizeCommitish(r,i,s),f=this.normalizeCommitish(l,i,s));const h=this.generateStorageKey(c,f);return u?`${js}/${u}/${h}`:`${js}/${h}`}getDiffContextData(r,l,i,s,u){try{const c=this.getStorageKey(r,l,i,s,u),f=localStorage.getItem(c);if(!f)return null;const h=JSON.parse(f);return h.version!==1?(console.warn(`Unknown storage version: ${h.version}`),null):h}catch(c){return console.error("Error reading diff context data:",c),null}}saveDiffContextData(r,l,i,s,u,c){try{const f=this.getStorageKey(r,l,s,u,c),h={...i,baseCommitish:r,targetCommitish:l,lastModifiedAt:new Date().toISOString()};localStorage.setItem(f,JSON.stringify(h))}catch(f){f instanceof DOMException&&f.name==="QuotaExceededError"?console.error("localStorage quota exceeded"):console.error("Error saving diff context data:",f)}}getComments(r,l,i,s,u){return this.getDiffContextData(r,l,i,s,u)?.comments||[]}saveComments(r,l,i,s,u,c){const h=this.getDiffContextData(r,l,s,u,c)||{version:1,baseCommitish:r,targetCommitish:l,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),comments:[],viewedFiles:[]};h.comments=i,this.saveDiffContextData(r,l,h,s,u,c)}getViewedFiles(r,l,i,s,u){return this.getDiffContextData(r,l,i,s,u)?.viewedFiles||[]}saveViewedFiles(r,l,i,s,u,c){const h=this.getDiffContextData(r,l,s,u,c)||{version:1,baseCommitish:r,targetCommitish:l,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),comments:[],viewedFiles:[]};h.viewedFiles=i,this.saveDiffContextData(r,l,h,s,u,c)}cleanupOldData(r){const l=new Date;l.setDate(l.getDate()-r);const i=l.getTime(),s=[];for(let u=0;u<localStorage.length;u++){const c=localStorage.key(u);if(c?.startsWith(js))try{const f=localStorage.getItem(c);if(!f)continue;const h=JSON.parse(f);new Date(h.lastModifiedAt).getTime()<i&&s.push(c)}catch{}}s.forEach(u=>localStorage.removeItem(u))}getStorageSize(){let r=0;for(let l=0;l<localStorage.length;l++){const i=localStorage.key(l);if(!i?.startsWith(js))continue;const s=localStorage.getItem(i);s&&(r+=(i.length+s.length)*2)}return r}}const Ha=new Dj;async function Lx(e){try{const l=new TextEncoder().encode(e),i=await crypto.subtle.digest("SHA-256",l);return Array.from(new Uint8Array(i)).map(u=>u.toString(16).padStart(2,"0")).join("")}catch{return console.warn("Crypto API not available, using fallback hash"),Oj(e)}}function Oj(e){let r=0;for(let l=0;l<e.length;l++){const i=e.charCodeAt(l);r=(r<<5)-r+i,r=r&r}return Math.abs(r).toString(16)}function Dx(e){const r=e.chunks.map(l=>{const i=l.lines.filter(s=>s.type!=="hunk"&&s.type!=="header").map(s=>`${s.type}:${s.content}`).join(`
86
- `);return`${l.header}
87
- ${i}`}).join(`
88
-
89
- `);return`${e.path}
90
- ${e.status}
91
- ${r}`}function Mj(e,r,l,i,s){const[u,c]=T.useState([]);T.useEffect(()=>{if(!e||!r)return;const w=Ha.getComments(e,r,l,i,s);c(w)},[e,r,l,i,s]);const f=T.useCallback(w=>{!e||!r||(Ha.saveComments(e,r,w,l,i,s),c(w))},[e,r,l,i,s]),h=T.useCallback(w=>{const S={id:crypto.randomUUID(),filePath:w.filePath,body:w.body,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),position:{side:w.side,line:w.line},codeSnapshot:w.codeSnapshot||{content:"",language:EE(w.filePath)}},C=[...u,S];return f(C),S},[u,f]),p=T.useCallback(w=>{const S=u.filter(C=>C.id!==w);f(S)},[u,f]),m=T.useCallback((w,S)=>{const C=u.map(E=>E.id===w?{...E,body:S,updatedAt:new Date().toISOString()}:E);f(C)},[u,f]),b=T.useCallback(()=>{f([])},[f]),v=T.useCallback(w=>{const S=u.find(E=>E.id===w);if(!S)return"";const C=typeof S.position.line=="number"?S.position.line:[S.position.line.start,S.position.line.end];return sv(S.filePath,C,S.body,S.codeSnapshot?.content)},[u]),x=T.useCallback(()=>{const w=u.map(S=>({id:S.id,file:S.filePath,line:typeof S.position.line=="number"?S.position.line:[S.position.line.start,S.position.line.end],body:S.body,timestamp:S.createdAt,codeContent:S.codeSnapshot?.content}));return Lj(w)},[u]);return{comments:u,addComment:h,removeComment:p,updateComment:m,clearAllComments:b,generatePrompt:v,generateAllCommentsPrompt:x}}const zj=20;async function Ox(e,r){const l=encodeURIComponent(e),i=await fetch(`/api/blob/${l}?ref=${encodeURIComponent(r)}`);if(!i.ok)throw new Error(`Failed to fetch file content: ${i.statusText}`);const u=(await i.text()).split(`
92
- `);return u.length>0&&u[u.length-1]===""&&u.pop(),{lines:u,totalLines:u.length}}async function Bj(e,r,l,i){const s=encodeURIComponent(e),u=new URLSearchParams;r&&u.set("oldRef",r),l&&u.set("newRef",l),i&&i!==e&&u.set("oldPath",i);const c=await fetch(`/api/line-count/${s}?${u}`);if(!c.ok)throw new Error(`Failed to fetch line count: ${c.statusText}`);return c.json()}function Fj({baseCommitish:e,targetCommitish:r}){const[l,i]=T.useState({}),[s,u]=T.useState(!1),[c,f]=T.useState(null),[h,p]=T.useState(0),m=T.useRef(new Map),b=T.useRef({});b.current=l;const v=T.useCallback(async L=>{const M=m.current.get(L.path);if(M)return M;const H=(async()=>{const G=b.current[L.path];if(G?.oldContent&&G?.newContent)return G;const z={...G,expandedRanges:G?.expandedRanges||[]};if(L.status!=="added"&&e){const V=L.oldPath||L.path;try{const{lines:Y,totalLines:J}=await Ox(V,e);z.oldContent=Y,z.oldTotalLines=J}catch(Y){console.error("Failed to fetch old file content:",Y),z.oldContent=[],z.oldTotalLines=0}}if(L.status!=="deleted"&&r)try{const{lines:V,totalLines:Y}=await Ox(L.path,r);z.newContent=V,z.newTotalLines=Y}catch(V){console.error("Failed to fetch new file content:",V),z.newContent=[],z.newTotalLines=0}return z})();m.current.set(L.path,H);try{return await H}finally{m.current.delete(L.path)}},[e,r]),x=T.useCallback(L=>{f(L),p(M=>M+1)},[]),w=T.useCallback(async(L,M,H,G=zj)=>{u(!0);try{const z=await v(L);i(V=>{const Y=V[L.path],J=Y?.expandedRanges||z.expandedRanges||[],I=J.findIndex(F=>F.chunkIndex===M&&F.direction===H),X=[...J];if(I>=0&&X[I]){const F=X[I];X[I]={chunkIndex:F.chunkIndex,direction:F.direction,count:F.count+G}}else X.push({chunkIndex:M,direction:H,count:G});return{...V,[L.path]:{oldContent:Y?.oldContent??z.oldContent,newContent:Y?.newContent??z.newContent,oldTotalLines:Y?.oldTotalLines??z.oldTotalLines,newTotalLines:Y?.newTotalLines??z.newTotalLines,expandedRanges:X}}}),x(L.path)}finally{u(!1)}},[v,x]),S=T.useCallback(async(L,M,H)=>{u(!0);try{const G=await v(L);i(z=>{const V=z[L.path],J=[...V?.expandedRanges||G.expandedRanges||[]],I=J.findIndex(D=>D.chunkIndex===M&&D.direction==="up"),X=J.findIndex(D=>D.chunkIndex===M-1&&D.direction==="down");let F=0,Z=0;I>=0&&J[I]&&(F=J[I].count),X>=0&&J[X]&&(Z=J[X].count);const O=F+Z+H,$=J.filter(D=>!(D.chunkIndex===M-1&&D.direction==="down")),R=$.findIndex(D=>D.chunkIndex===M&&D.direction==="up");return R>=0&&$[R]?$[R]={chunkIndex:M,direction:"up",count:O}:$.push({chunkIndex:M,direction:"up",count:O}),{...z,[L.path]:{oldContent:V?.oldContent??G.oldContent,newContent:V?.newContent??G.newContent,oldTotalLines:V?.oldTotalLines??G.oldTotalLines,newTotalLines:V?.newTotalLines??G.newTotalLines,expandedRanges:$}}}),x(L.path)}finally{u(!1)}},[v,x]),C=T.useCallback(async L=>{const M=b.current[L.path];if(M?.oldTotalLines!==void 0||M?.newTotalLines!==void 0)return;const H=L.status!=="added"?e:void 0,G=L.status!=="deleted"?r:void 0;if(!(!H&&!G))try{const{oldLineCount:z,newLineCount:V}=await Bj(L.path,H,G,L.oldPath);i(Y=>{const J=Y[L.path];return J?.oldTotalLines!==void 0||J?.newTotalLines!==void 0?Y:{...Y,[L.path]:{...J,expandedRanges:J?.expandedRanges||[],oldTotalLines:z,newTotalLines:V}}}),x(L.path)}catch(z){console.error("Failed to prefetch line count:",z)}},[e,r,x]),E=T.useCallback((L,M,H)=>{const G=l[L];return G&&G.expandedRanges.find(V=>V.chunkIndex===M&&V.direction===H)?.count||0},[l]),N=T.useCallback((L,M,H)=>{if(L.status==="added"||L.status==="deleted")return 0;const G=L.chunks[H-1];let z;if(!G)z=M.oldStart-1;else{const J=G.oldStart+G.oldLines;z=M.oldStart-J}const V=E(L.path,H,"up"),Y=H>0?E(L.path,H-1,"down"):0;return Math.max(0,z-V-Y)},[E]),j=T.useCallback((L,M,H)=>{if(L.status==="added"||L.status==="deleted")return 0;const G=l[L.path],z=G?.oldTotalLines||G?.newTotalLines;if(z===void 0)return L.chunks[H+1]?0:-1;if(L.chunks[H+1])return 0;const Y=M.oldStart+M.oldLines-1,J=z-Y,I=E(L.path,H,"down");return Math.max(0,J-I)},[l,E]),B=T.useCallback((L,M,H)=>{const G=l[L.path];if(!G)return M;const z=E(L.path,H,"up"),V=E(L.path,H,"down");if(z===0&&V===0)return M;const Y=G.oldContent||[],J=G.newContent||[],I=[];if(z>0){const Z=L.chunks[H-1];let O;Z?O=Z.oldStart+Z.oldLines-1:O=Math.max(0,M.oldStart-1-z);const $=M.oldStart-1,R=M.newStart-1,D=Math.min(z,$-O),U=$-D,A=R-D;for(let ne=0;ne<D;ne++){const re=U+ne+1,fe=A+ne+1,ge=Y[re-1]??J[fe-1]??"";I.push({type:"normal",content:ge,oldLineNumber:re,newLineNumber:fe,isExpanded:!0})}}if(I.push(...M.lines),V>0){const Z=M.oldStart+M.oldLines-1,O=M.newStart+M.newLines-1,$=L.chunks[H+1],R=$?$.oldStart-1:G.oldTotalLines||Z,D=Math.min(V,R-Z);for(let U=0;U<D;U++){const A=Z+U+1,ne=O+U+1,re=Y[A-1]??J[ne-1]??"";I.push({type:"normal",content:re,oldLineNumber:A,newLineNumber:ne,isExpanded:!0})}}const X=I[0],F=I[I.length-1];return{...M,lines:I,oldStart:X?.oldLineNumber??M.oldStart,newStart:X?.newLineNumber??M.newStart,oldLines:(F?.oldLineNumber??M.oldStart+M.oldLines-1)-(X?.oldLineNumber??M.oldStart)+1,newLines:(F?.newLineNumber??M.newStart+M.newLines-1)-(X?.newLineNumber??M.newStart)+1}},[l,E]),P=T.useCallback(L=>{const M=[];for(let H=0;H<L.chunks.length;H++){const G=L.chunks[H];if(!G)continue;const z=B(L,G,H),V=N(L,G,H),Y=j(L,G,H),J=M[M.length-1];if(J&&V===0){J.lines=[...J.lines,...z.lines],J.originalIndices.push(H),J.hiddenLinesAfter=Y;const I=J.lines[J.lines.length-1];J.oldLines=(I?.oldLineNumber??J.oldStart+J.oldLines-1)-J.oldStart+1,J.newLines=(I?.newLineNumber??J.newStart+J.newLines-1)-J.newStart+1}else M.push({...z,originalIndices:[H],hiddenLinesBefore:V,hiddenLinesAfter:Y})}return M},[B,N,j]);return{expandedState:l,isLoading:s,lastUpdatedFilePath:c,lastUpdatedAt:h,expandLines:w,expandAllBetweenChunks:S,prefetchFileContent:C,getMergedChunks:P,getHiddenLinesBefore:N,getHiddenLinesAfter:j}}var uv=(e=>(e.DEFAULT="default",e.WORKING="working",e.STAGED="staged",e.DOT="dot",e.SPECIFIC="specific",e))(uv||{});function Ij(e){const r=T.useRef(null),l=T.useRef(null),i=T.useRef(0),s=5,u=3e3,[c,f]=T.useState({isWatchEnabled:!1,diffMode:uv.DEFAULT,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null,connectionStatus:"disconnected"}),[h,p]=T.useState(null),m=T.useCallback(()=>{if(!r.current)try{const x=new EventSource("/api/watch");r.current=x,x.onopen=()=>{console.log("Connected to file watch service"),f(w=>({...w,connectionStatus:"connected"})),i.current=0,p(null)},x.onmessage=w=>{try{const S=JSON.parse(w.data);switch(S.type){case"connected":f(C=>({...C,isWatchEnabled:!0,diffMode:S.diffMode,connectionStatus:"connected"}));break;case"reload":console.log("File changes detected, showing reload button:",S.changeType),f(C=>({...C,shouldReload:!0,lastChangeTime:new Date,lastChangeType:S.changeType}));break;case"error":console.error("File watch error:",S.message),p(S.message||"File watch error occurred");break}}catch(S){console.error("Error parsing watch event:",S)}},x.onerror=()=>{console.log("File watch connection lost"),f(w=>({...w,connectionStatus:"disconnected"})),r.current&&(r.current.close(),r.current=null),i.current<s?(f(w=>({...w,connectionStatus:"reconnecting"})),i.current+=1,l.current=setTimeout(()=>{console.log(`Attempting to reconnect to file watch service (${i.current}/${s})...`),m()},u)):(console.error("Max reconnection attempts reached"),p("Lost connection to file watch service"))}}catch(x){console.error("Failed to connect to file watch service:",x),p("Failed to connect to file watch service")}},[s,u]),b=T.useCallback(async()=>{if(!c.isReloading){f(x=>({...x,isReloading:!0}));try{e&&await e(),f(x=>({...x,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null}))}catch(x){console.error("Reload failed:",x),p("Failed to reload diff data"),f(w=>({...w,isReloading:!1}))}}},[e,c.isReloading]),v=()=>{r.current&&(r.current.close(),r.current=null),l.current&&(clearTimeout(l.current),l.current=null)};return T.useEffect(()=>(m(),v),[m]),T.useEffect(()=>v,[]),{shouldReload:c.shouldReload,isConnected:c.connectionStatus==="connected",error:h,reload:b,watchState:c}}const rh={SCROLL_CONTAINER:"main.overflow-y-auto"};function tl(e,r){const l=`file-${e.fileIndex}-chunk-${e.chunkIndex}-line-${e.lineIndex}`;return r==="split"?`${l}-${e.side}`:l}function cv(e,r){return`${e}:${r}`}function Uj(e,r){const l=r[e.fileIndex]?.chunks[e.chunkIndex]?.lines[e.lineIndex];return l&&(l.type==="add"||l.type==="delete"||l.type==="normal")?l.type:null}function Sn(e,r){const l=Uj(e,r);return l?l==="normal"?!0:l==="delete"?e.side==="left":l==="add"?e.side==="right":!1:!1}function fv(e,r){return Sn(e,r)?e:{...e,side:e.side==="left"?"right":"left"}}const Mx={VIEWPORT_OFFSET_RATIO:1/3};function Hj(e,r,l,i){return{line:s=>{const u=e[s.fileIndex];return!u||i?.has(u.path)?!1:l==="unified"||Sn(s,e)},chunk:s=>{const u=e[s.fileIndex];if(!u||i?.has(u.path))return!1;const c=u.chunks[s.chunkIndex]?.lines[s.lineIndex];if(!c||c.type==="normal")return!1;if(s.lineIndex===0)return!0;const f=u.chunks[s.chunkIndex]?.lines[s.lineIndex-1];return!f||f.type==="normal"},comment:s=>{const u=e[s.fileIndex];if(!u||i?.has(u.path))return!1;const c=u.chunks[s.chunkIndex]?.lines[s.lineIndex];if(!c||c.type==="delete")return!1;const f=c.newLineNumber;if(!f)return!1;const h=cv(u.path,f);return r.has(h)},file:s=>s.chunkIndex===0&&s.lineIndex===0}}function Pj(){return e=>{const r=document.getElementById(e);if(!r)return;const l=document.querySelector(rh.SCROLL_CONTAINER);if(!l)throw new Error(`Scrollable container (${rh.SCROLL_CONTAINER}) not found`);const i=r.getBoundingClientRect(),s=l.getBoundingClientRect(),u=l.clientHeight,c=l.scrollTop,f=Math.max(s.top,0),h=Math.min(s.bottom,window.innerHeight);if(!(i.top>=f&&i.bottom<=h)){const S=qj(r,l)-u*Mx.VIEWPORT_OFFSET_RATIO;l.scrollTop=Math.max(0,S);return}const m=i.bottom>Math.min(s.bottom,window.innerHeight),v=r.offsetTop-l.offsetTop-u*Mx.VIEWPORT_OFFSET_RATIO,x=v>c;m&&x&&(l.scrollTop=Math.max(0,v))}}function qj(e,r){let l=e,i=0;for(;l&&l!==r&&l.offsetParent;)i+=l.offsetTop,l=l.offsetParent;return l&&l!==r&&(i+=l.offsetTop),i}function $j(e){return e||{fileIndex:0,chunkIndex:0,lineIndex:-1,side:"right"}}function Vj(e,r,l){return l&&e.fileIndex===r.fileIndex&&e.chunkIndex===r.chunkIndex&&e.lineIndex===r.lineIndex}function Gj(e,r,l){let{fileIndex:i,chunkIndex:s,lineIndex:u}=e;const c=l.length;let f=0;if(r==="next")for(u++;f<c;){if(l[i]?.chunks[s]?.lines[u])return{...e,fileIndex:i,chunkIndex:s,lineIndex:u};s++,u=0,l[i]?.chunks[s]||(i++,s=0,u=0,i>=c&&(i=0,f++))}else for(u--;f<c;){if(u<0)if(s--,s<0){i--,i<0&&(i=c-1,f++);const h=l[i];if(h&&h.chunks.length>0){s=h.chunks.length-1;const p=h.chunks[s];u=p&&p.lines.length>0?p.lines.length-1:-1}else s=-1,u=-1}else{const h=l[i]?.chunks[s];u=h&&h.lines.length>0?h.lines.length-1:-1}if(u>=0&&l[i]?.chunks[s]?.lines[u])return{...e,fileIndex:i,chunkIndex:s,lineIndex:u};u<0||u--}return null}function Yj(e,r,l,i,s){let u=e,c=!1;for(;u;){const f=Gj(u,r,i);if(!f||(u=f,Vj(u,e,c)))break;if(c=!0,l(u,i)){const h=fv(u,i);return{position:h,scrollTarget:tl(h,s)}}}return{position:null,scrollTarget:null}}function Xj({files:e,comments:r,viewMode:l=Xa,reviewedFiles:i,onToggleReviewed:s,onCreateComment:u,onCopyAllComments:c,onDeleteAllComments:f,onShowCommentsList:h,onRefresh:p}){const[m,b]=T.useState(null),[v,x]=T.useState(!1),w=T.useMemo(()=>Pj(),[]),S=T.useMemo(()=>{const V=new Map;return r.forEach(Y=>{const J=Array.isArray(Y.line)?Y.line[0]:Y.line,I=cv(Y.file,J);V.has(I)||V.set(I,[]),V.get(I)?.push(Y)}),V},[r]),C=T.useMemo(()=>Hj(e,S,l,i),[e,S,l,i]),E=T.useCallback((V,Y)=>{if(e.length===0)return{position:null,scrollTarget:null};const J=$j(m);return Yj(J,V,Y,e,l)},[m,e,l]),N=T.useCallback(V=>Y=>{const J=E(Y,V);J.position&&(b(J.position),J.scrollTarget&&w(J.scrollTarget))},[E,w]),j=T.useMemo(()=>N(C.line),[N,C.line]),B=T.useMemo(()=>N(C.chunk),[N,C.chunk]),P=T.useMemo(()=>N(C.file),[N,C.file]),L=T.useMemo(()=>N(C.comment),[N,C.comment]),M=T.useCallback(V=>{if(!m||l!=="split")return;let Y={...m,side:V};const J=e[m.fileIndex]?.chunks[m.chunkIndex]?.lines[m.lineIndex];if(J){if(V==="left"&&J.type==="add"&&m.lineIndex>0){if(e[m.fileIndex]?.chunks[m.chunkIndex]?.lines[m.lineIndex-1]?.type==="delete"){Y={...Y,lineIndex:m.lineIndex-1},b(Y),w(tl(Y,l));return}}else if(V==="right"&&J.type==="delete"&&e[m.fileIndex]?.chunks[m.chunkIndex]?.lines[m.lineIndex+1]?.type==="add"){Y={...Y,lineIndex:m.lineIndex+1},b(Y),w(tl(Y,l));return}}if(!Sn(Y,e)){const I=e[m.fileIndex];if(!I)return;const X=I.chunks[m.chunkIndex];if(X){for(let F=m.lineIndex+1;F<X.lines.length;F++){const Z={...Y,lineIndex:F};if(Sn(Z,e)){Y=Z;break}}if(!Sn(Y,e))for(let F=m.lineIndex-1;F>=0;F--){const Z={...Y,lineIndex:F};if(Sn(Z,e)){Y=Z;break}}}if(!Sn(Y,e)){for(let F=m.chunkIndex+1;F<I.chunks.length;F++){const Z=I.chunks[F];if(Z){for(let O=0;O<Z.lines.length;O++){const $={...Y,chunkIndex:F,lineIndex:O};if(Sn($,e)){Y=$;break}}if(Sn(Y,e))break}}if(!Sn(Y,e))for(let F=m.chunkIndex-1;F>=0;F--){const Z=I.chunks[F];if(Z){for(let O=Z.lines.length-1;O>=0;O--){const $={...Y,chunkIndex:F,lineIndex:O};if(Sn($,e)){Y=$;break}}if(Sn(Y,e))break}}}}b(Y),w(tl(Y,l))},[m,l,w,e]),H=T.useCallback(()=>{const V=document.querySelector(rh.SCROLL_CONTAINER);if(!V)return;const Y=V.getBoundingClientRect(),J=Y.top+Y.height/2;let I=1/0,X=null;e.forEach((F,Z)=>{F.chunks.forEach((O,$)=>{O.lines.forEach((R,D)=>{const U=l==="split"?["left","right"]:["right"];for(const A of U){const ne={fileIndex:Z,chunkIndex:$,lineIndex:D,side:A};if(l==="split"&&!Sn(ne,e))continue;const re=tl(ne,l),fe=document.getElementById(re);if(fe){const ge=fe.getBoundingClientRect(),ye=ge.top+ge.height/2,pe=Math.abs(ye-J);ge.top<Y.bottom&&ge.bottom>Y.top&&pe<I&&(I=pe,X=ne)}}})})}),X&&b(X)},[e,l,b]),G=T.useCallback(V=>{if(!V){b(null);return}const Y=fv(V,e);b(Y),w(tl(Y,l))},[e,l,w]),z={scopes:"navigation",enableOnFormTags:!1,preventDefault:!0};return lt("j, down",()=>j("next"),z,[j]),lt("k, up",()=>j("prev"),z,[j]),lt("n",()=>B("next"),z,[B]),lt("p",()=>B("prev"),z,[B]),lt("shift+n",()=>L("next"),z,[L]),lt("shift+p",()=>L("prev"),z,[L]),lt("]",()=>P("next"),{...z,useKey:!0},[P]),lt("[",()=>P("prev"),{...z,useKey:!0},[P]),lt("{",()=>{e.length>0&&(b({fileIndex:0,chunkIndex:0,lineIndex:0,side:l==="split"?"left":"right"}),w(tl({fileIndex:0,chunkIndex:0,lineIndex:0,side:l==="split"?"left":"right"},l)))},{...z,useKey:!0},[e,l,w]),lt("}",()=>{if(e.length>0){const V=e.length-1,Y=e[V];Y&&Y.chunks.length>0&&(b({fileIndex:V,chunkIndex:0,lineIndex:0,side:l==="split"?"left":"right"}),w(tl({fileIndex:V,chunkIndex:0,lineIndex:0,side:l==="split"?"left":"right"},l)))}},{...z,useKey:!0},[e,l,w]),lt("h, left",()=>M("left"),{...z,enabled:l==="split"},[M,l]),lt("l, right",()=>M("right"),{...z,enabled:l==="split"},[M,l]),lt("v",()=>{if(m){const V=e[m.fileIndex];V&&s(V.path)}},z,[m,e,s]),lt("shift+r",()=>{p&&p()},z,[p]),lt("c",()=>{if(m&&u){const V=e[m.fileIndex]?.chunks[m.chunkIndex]?.lines[m.lineIndex];V&&V.type!=="delete"&&u()}},z,[m,e,u]),lt("?",()=>x(!v),{...z,useKey:!0},[v]),lt(".",V=>{V.ctrlKey||V.altKey||V.shiftKey||V.metaKey||(H(),V.preventDefault())},{...z,useKey:!0,preventDefault:!1},[H]),lt("shift+c",()=>{c&&c()},{...z,scopes:["navigation","comments-list"]},[c]),lt("shift+d",()=>{f&&f()},{...z,scopes:["navigation","comments-list"]},[f]),lt("shift+l",()=>{h&&h()},z,[h]),{cursor:m,isHelpOpen:v,setIsHelpOpen:x,setCursorPosition:G}}function Zj(e,r,l,i,s,u){const[c,f]=T.useState([]),[h,p]=T.useState(new Map);T.useEffect(()=>{if(!e||!r)return;const E=Ha.getViewedFiles(e,r,l,i,u);(async()=>{if(s&&s.length>0){const j=[],B=new Set(E.map(P=>P.filePath));for(const P of s)if((P.isGenerated||P.status==="deleted")&&!B.has(P.path))try{const L=Dx(P),M=await Lx(L),H={filePath:P.path,viewedAt:new Date().toISOString(),diffContentHash:M};j.push(H)}catch(L){console.error("Failed to generate hash for auto-collapsed file:",L)}if(j.length>0){const P=[...E,...j];Ha.saveViewedFiles(e,r,P,l,i,u),f(P);return}}f(E)})()},[e,r,l,i,u]);const m=T.useCallback(E=>{!e||!r||(Ha.saveViewedFiles(e,r,E,l,i,u),f(E))},[e,r,l,i,u]),b=T.useMemo(()=>new Set(c.map(E=>E.filePath)),[c]),v=T.useCallback(E=>c.find(N=>N.filePath===E),[c]),x=T.useCallback(async E=>{const N=h.get(E.path);if(N)return N;const j=Dx(E),B=await Lx(j);return p(P=>new Map(P).set(E.path,B)),B},[h]),w=T.useCallback(async(E,N)=>{const j=v(E);if(!j)return!1;const B=await x(N);return j.diffContentHash!==B},[v,x]),S=T.useCallback(async(E,N)=>{if(v(E)){const B=c.filter(P=>P.filePath!==E);m(B)}else{const B=await x(N),P={filePath:E,viewedAt:new Date().toISOString(),diffContentHash:B},L=[...c,P];m(L)}},[c,v,x,m]),C=T.useCallback(()=>{m([]),p(new Map)},[m]);return{viewedFiles:b,toggleFileViewed:S,isFileContentChanged:w,getViewedFileRecord:v,clearViewedFiles:C}}const zx={mobileMax:767,desktopMin:1024},eu={mobile:`(max-width: ${zx.mobileMax}px)`,desktop:`(min-width: ${zx.desktopMin}px)`},Qj=()=>typeof window>"u"?{isMobile:!1,isDesktop:!0}:{isMobile:window.matchMedia(eu.mobile).matches,isDesktop:window.matchMedia(eu.desktop).matches};function Kj(){const[e,r]=T.useState(()=>Qj());return T.useEffect(()=>{if(typeof window>"u")return;const l=window.matchMedia(eu.mobile),i=window.matchMedia(eu.desktop),s=()=>{r({isMobile:l.matches,isDesktop:i.matches})};return s(),l.addEventListener("change",s),i.addEventListener("change",s),()=>{l.removeEventListener("change",s),i.removeEventListener("change",s)}},[]),e}const yd=new Map;let Jj=0;function Bx(e){return yd.has(e)||yd.set(e,`file-${++Jj}`),yd.get(e)??""}function Wj(e,r,l){for(let i=0;i<e.chunks.length;i++){const s=e.chunks[i];if(s)for(let u=0;u<s.lines.length;u++){const c=s.lines[u];if(!c)continue;if((c.newLineNumber||c.oldLineNumber)===l)return{fileIndex:r,chunkIndex:i,lineIndex:u,side:c.newLineNumber?"right":"left"}}}return null}function eR(e,r){const l=r.findIndex(u=>u.path===e.file);if(l===-1)return null;const i=r[l];if(!i)return null;const s=Array.isArray(e.line)?e.line[1]:e.line;return Wj(i,l,s)}const tR=[],nR=[],dv="difit.sidebarWidth",hv=200,pv=600,xd=280,rR=()=>{if(typeof window>"u")return xd;const e=window.localStorage.getItem(dv);if(!e)return xd;const r=Number.parseInt(e,10);return Number.isFinite(r)?Math.min(pv,Math.max(hv,r)):xd};function lR(){const[e,r]=T.useState(null),[l,i]=T.useState(Xa),s=T.useRef(!1),[u,c]=T.useState(!0),[f,h]=T.useState(!0),[p,m]=T.useState(null),[b,v]=T.useState(!1),[x,w]=T.useState(rR),[S,C]=T.useState(!1),[E,N]=T.useState(!0),[j,B]=T.useState(!1),[P,L]=T.useState(!1),[M,H]=T.useState(!1),[G,z]=T.useState(!1),[V,Y]=T.useState(!1),[J,I]=T.useState(new Set),X=T.useRef(!1),F=T.useRef(null),[Z,O]=T.useState(null),[$,R]=T.useState(""),[D,U]=T.useState(""),[A,ne]=T.useState(""),[re,fe]=T.useState(""),ge=T.useRef(!1),{settings:ye,updateSettings:pe}=_j(),{isMobile:me,isDesktop:xe}=Kj(),{comments:de,addComment:ve,removeComment:ke,updateComment:$e,clearAllComments:Qe,generatePrompt:ze,generateAllCommentsPrompt:Bt}=Mj(e?.baseCommitish,e?.targetCommitish,e?.commit,void 0,e?.repositoryId),pt=T.useMemo(()=>de.map(ae=>({id:ae.id,file:ae.filePath,line:typeof ae.position.line=="number"?ae.position.line:[ae.position.line.start,ae.position.line.end],body:ae.body,timestamp:ae.createdAt,codeContent:ae.codeSnapshot?.content,side:ae.position.side})),[de]),mt=T.useMemo(()=>{const ae=new Map;return pt.forEach(we=>{const Re=ae.get(we.file);Re?Re.push(we):ae.set(we.file,[we])}),ae},[pt]),Ft=me&&de.length>0,{viewedFiles:it,toggleFileViewed:It,clearViewedFiles:at}=Zj(e?.baseCommitish,e?.targetCommitish,e?.commit,void 0,e?.files,e?.repositoryId);T.useEffect(()=>{X.current=!1},[e?.repositoryId,e?.commit]),T.useEffect(()=>{X.current||(I(new Set(it)),X.current=!0)},[it]);const $n=T.useCallback(ae=>{const we=F.current,Re=document.getElementById(Bx(ae));if(!we||!Re)return;const Ce=we.getBoundingClientRect(),Je=Re.getBoundingClientRect(),fn=we.scrollTop+(Je.top-Ce.top);we.scrollTo({top:Math.max(0,fn),behavior:"smooth"})},[]),oe=T.useCallback(async ae=>{if(!e)return;const we=e.files.find(Ce=>Ce.path===ae);if(!we)return;const Re=it.has(ae);await It(ae,we),I(Ce=>{const Je=new Set(Ce);return Re?Je.delete(ae):Je.add(ae),Je}),Re||setTimeout(()=>{$n(ae)},100)},[e,$n,It,it]),be=T.useCallback(ae=>{I(we=>{const Re=new Set(we);return Re.has(ae)?Re.delete(ae):Re.add(ae),Re})},[]),je=T.useCallback(ae=>{e&&I(ae?new Set(e.files.map(we=>we.path)):new Set)},[e]),Me=T.useCallback(ae=>{s.current=!0,i(ae)},[]),{isLoading:Ge,expandLines:Yt,expandAllBetweenChunks:Fn,prefetchFileContent:Lt,getMergedChunks:gt,lastUpdatedFilePath:jt,lastUpdatedAt:Ke}=Fj({baseCommitish:e?.baseCommitish,targetCommitish:e?.targetCommitish}),En=T.useRef(gt);T.useEffect(()=>{En.current=gt},[gt]);const[Xt,zi]=T.useState(new Map);T.useEffect(()=>{if(!e){zi(new Map);return}const ae=new Map;e.files.forEach(we=>{ae.set(we.path,En.current(we))}),zi(ae)},[e]),T.useEffect(()=>{if(!e||!jt)return;const ae=e.files.find(we=>we.path===jt);ae&&zi(we=>{const Re=new Map(we);return Re.set(ae.path,En.current(ae)),Re})},[e,jt,Ke]);const zl=T.useMemo(()=>e?e.files.map(ae=>({...ae,chunks:Xt.get(ae.path)||ae.chunks})):[],[e,Xt]),[ul,Ar]=T.useState(null),{shouldReload:tr,reload:cl,watchState:Tr}=Ij(async()=>{await rr()}),{cursor:nr,isHelpOpen:to,setIsHelpOpen:Bl,setCursorPosition:Vn}=Xj({files:zl,comments:pt,viewMode:l,reviewedFiles:it,onToggleReviewed:oe,onCreateComment:()=>{nr&&Ar({fileIndex:nr.fileIndex,chunkIndex:nr.chunkIndex,lineIndex:nr.lineIndex})},onCopyAllComments:()=>{de.length>0&&Cn()},onDeleteAllComments:()=>{de.length>0&&confirm("Delete all comments?")&&Qe()},onShowCommentsList:()=>{z(!0)},onRefresh:()=>{cl()}}),vu=T.useCallback((ae,we,Re,Ce)=>{Vn({fileIndex:ae,chunkIndex:we,lineIndex:Re,side:Ce})},[Vn]),no=T.useCallback(()=>{Ar(null)},[Ar]),ro=T.useCallback(ae=>ze(ae.id),[ze]),lo=ae=>{ae.preventDefault(),B(!0);const we=ae.clientX,Re=x,Ce=fn=>{const In=Math.max(hv,Math.min(pv,Re+(fn.clientX-we)));w(In)},Je=()=>{B(!1),document.removeEventListener("mousemove",Ce),document.removeEventListener("mouseup",Je)};document.addEventListener("mousemove",Ce),document.addEventListener("mouseup",Je)},rr=T.useCallback(async(ae,we)=>{try{const Re=new URLSearchParams({ignoreWhitespace:String(u)});ae&&Re.set("base",ae),we&&Re.set("target",we);const Ce=await fetch(`/api/diff?${Re}`);if(!Ce.ok)throw new Error("Failed to fetch diff data");const Je=await Ce.json();if(r(Je),Je.baseCommitish&&ne(Je.baseCommitish),Je.targetCommitish&&fe(Je.targetCommitish),!ge.current){const fn=Je.requestedBaseCommitish??Je.baseCommitish,In=Je.requestedTargetCommitish??Je.targetCommitish;fn&&R(fn),In&&U(In)}Je.mode&&!s.current&&i(ik(Je.mode))}catch(Re){m(Re instanceof Error?Re.message:"Unknown error")}finally{h(!1)}},[u]);T.useEffect(()=>{rr()},[rr]),T.useEffect(()=>{me&&l!=="unified"&&i("unified")},[l,me]),T.useEffect(()=>{try{window.localStorage.setItem(dv,String(x))}catch{}},[x]),T.useEffect(()=>{fetch("/api/revisions").then(ae=>ae.ok?ae.json():null).then(ae=>{O(ae),ae?.resolvedBase&&ne(we=>we||ae.resolvedBase||""),ae?.resolvedTarget&&fe(we=>we||ae.resolvedTarget||"")}).catch(()=>O(null))},[]);const Fl=T.useCallback(async(ae,we)=>{ae===$&&we===D||(ge.current=!0,R(ae),U(we),h(!0),m(null),await rr(ae,we))},[$,D,rr]),Bi=T.useRef(!1);T.useEffect(()=>{e?.clearComments&&!Bi.current&&(Bi.current=!0,Qe(),at(),console.log("✅ All existing comments and viewed files cleared as requested via --clean flag"))},[e?.clearComments,Qe,at]),T.useEffect(()=>{e&&(it.size<e.files.length?H(!1):it.size===e.files.length&&!M&&(L(!0),H(!0),setTimeout(()=>{L(!1)},1e3)))},[it.size,e,M]),T.useEffect(()=>{if(de.length>0){const we=de.map(Ce=>({id:Ce.id,file:Ce.filePath,line:typeof Ce.position.line=="number"?Ce.position.line:[Ce.position.line.start,Ce.position.line.end],body:Ce.body,timestamp:Ce.createdAt,side:Ce.position.side})),Re=JSON.stringify({comments:we});fetch("/api/comments",{method:"POST",headers:{"Content-Type":"application/json"},body:Re}).catch(Ce=>{console.error("Failed to sync comments:",Ce)})}const ae=()=>{if(de.length>0){const we=de.map(Ce=>({id:Ce.id,file:Ce.filePath,line:typeof Ce.position.line=="number"?Ce.position.line:[Ce.position.line.start,Ce.position.line.end],body:Ce.body,timestamp:Ce.createdAt,side:Ce.position.side})),Re=JSON.stringify({comments:we});navigator.sendBeacon("/api/comments",Re)}};return window.addEventListener("beforeunload",ae),()=>{window.removeEventListener("beforeunload",ae)}},[de]),T.useEffect(()=>{const ae=new EventSource("/api/heartbeat");return ae.onopen=()=>{console.log("Connected to server heartbeat")},ae.onerror=()=>{console.log("Server connection lost"),ae.close()},()=>{ae.close()}},[]);const io=T.useCallback((ae,we,Re,Ce,Je)=>(ve({filePath:ae,body:Re,side:Je||"new",line:typeof we=="number"?we:{start:we[0],end:we[1]},codeSnapshot:Ce?{content:Ce,language:void 0}:void 0}),Promise.resolve()),[ve]),Cn=async()=>{try{const ae=Bt();await navigator.clipboard.writeText(ae),v(!0),setTimeout(()=>v(!1),2e3)}catch(ae){console.error("Failed to copy all comments prompt:",ae)}},At=ae=>{if(!e)return;const we=eR(ae,e.files);we&&Vn(we)},Ut=T.useCallback(async(ae,we)=>{try{const Re=await fetch("/api/open-in-editor",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:ae,line:we,editor:ye.editor})});if(!Re.ok){const Ce=await Re.json().catch(()=>null);let Je=Re.statusText;Ce&&typeof Ce=="object"&&"error"in Ce&&typeof Ce.error=="string"&&(Je=Ce.error),console.error("Failed to open file in editor:",Je)}}catch(Re){console.error("Failed to open file in editor:",Re)}},[ye.editor]),jr=ae=>{Vn(null);const we=ae.target,Re=we.closest('[data-comment-button="true"]'),Ce=we.closest('[data-open-in-editor-button="true"]');!Re&&!Ce&&Fi(ae)},Fi=ae=>{document.querySelectorAll('form[data-empty="true"]').forEach(Re=>{Re.contains(ae.target)||Re.querySelector('button[type="button"]')?.click()})};return f?y.jsx("div",{className:"flex items-center justify-center h-screen bg-github-bg-primary",children:y.jsx("div",{className:"text-github-text-secondary text-base",children:"Loading diff..."})}):p?y.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2",children:[y.jsx("h2",{className:"text-github-danger text-2xl mb-2",children:"Error"}),y.jsx("p",{className:"text-github-text-secondary text-base",children:p})]}):e?y.jsx(fk,{children:y.jsxs("div",{className:"h-screen flex flex-col",onClickCapture:jr,children:[y.jsxs("header",{className:`bg-github-bg-secondary border-b border-github-border flex ${me?"flex-col":"flex-row items-center"}`,children:[y.jsxs("div",{className:`flex items-center justify-between w-full ${me?"px-3 py-2 gap-3":"px-4 py-3 gap-4 w-auto"} ${j?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:me?"100%":E?`${x}px`:"auto",minWidth:me?"0px":E?"200px":"auto",maxWidth:me?"none":E?"600px":"none"},children:[y.jsx("h1",{children:y.jsx(kj,{style:{height:"18px",color:"var(--color-github-text-secondary)"}})}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("button",{onClick:()=>N(!E),className:"p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors",title:E?"Collapse file tree":"Expand file tree","aria-expanded":E,"aria-controls":"file-tree-panel","aria-label":"Toggle file tree panel",children:E?y.jsx(P2,{size:18}):y.jsx($2,{size:18})}),y.jsx("button",{onClick:()=>C(!0),className:"p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors",title:"Appearance Settings",children:y.jsx(e1,{size:18})})]})]}),!me&&y.jsx("div",{className:`border-r border-github-border ${j?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:E?"4px":"0px",height:"calc(100% - 16px)",margin:"8px 0",transform:"translateX(-2px)"}}),y.jsxs("div",{className:`flex-1 flex flex-wrap items-center justify-between ${me?"px-3 pb-2 gap-3":"px-4 py-3 gap-4"}`,children:[y.jsxs("div",{className:`flex flex-wrap items-center ${me?"gap-2":"gap-3"}`,children:[!me&&y.jsxs("div",{className:"flex bg-github-bg-tertiary border border-github-border rounded-md p-1",children:[y.jsxs("button",{onClick:()=>Me("split"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${l==="split"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:[y.jsx(b2,{size:14}),"Split"]}),y.jsxs("button",{onClick:()=>Me("unified"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${l==="unified"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:[y.jsx(tk,{size:14}),"Unified"]})]}),y.jsx(t1,{checked:u,onChange:c,label:"Ignore Whitespace",title:u?"Show whitespace changes":"Ignore whitespace changes"}),y.jsx(Ej,{shouldReload:tr,isReloading:Tr.isReloading,onReload:cl,changeType:Tr.lastChangeType,compact:me})]}),y.jsxs("div",{className:`flex flex-wrap items-center text-sm text-github-text-secondary ${me?"gap-3":"gap-4"}`,children:[!me&&de.length>0&&y.jsx(Ub,{commentsCount:de.length,isCopiedAll:b,onCopyAll:Cn,onDeleteAll:Qe,onViewAll:()=>z(!0)}),y.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[y.jsxs("div",{className:"text-xs relative",children:[it.size===e.files.length?"All diffs difit-ed!":`${it.size} / ${e.files.length} files viewed`,y.jsx(Rj,{isActive:P})]}),y.jsx("div",{className:"relative h-2 bg-github-bg-tertiary rounded-full overflow-hidden",style:{width:"90px",border:"1px solid var(--color-github-border)"},children:y.jsx("div",{className:"absolute top-0 right-0 h-full transition-all duration-300 ease-out",style:{width:`${(e.files.length-it.size)/e.files.length*100}%`,backgroundColor:(()=>{const ae=(e.files.length-it.size)/e.files.length*100;return ae>50?"var(--color-github-accent)":ae>20?"var(--color-github-warning)":"var(--color-github-danger)"})()}})})]}),Z?y.jsx(O3,{options:Z,baseRevision:$,targetRevision:D,resolvedBaseRevision:A,resolvedTargetRevision:re,onSelectDiff:(ae,we)=>{Fl(ae,we)},onOpenAdvanced:()=>Y(!0),compact:!xe}):y.jsxs("span",{className:"text-xs",children:["Reviewing:"," ",y.jsx("code",{className:"bg-github-bg-tertiary px-1.5 py-0.5 rounded text-xs text-github-text-primary",children:e.commit.includes("...")?y.jsxs(y.Fragment,{children:[y.jsxs("span",{className:"text-github-text-secondary font-medium",children:[e.commit.split("...")[0],"..."]}),y.jsx("span",{className:"font-medium",children:e.commit.split("...")[1]})]}):e.commit})]})]})]})]}),Z&&y.jsx(Cj,{isOpen:V,onClose:()=>Y(!1),options:Z,baseRevision:$,targetRevision:D,resolvedBaseRevision:A,resolvedTargetRevision:re,onApply:(ae,we)=>{Fl(ae,we)}},V?`${$}:${D}`:"closed"),me&&E&&y.jsx("button",{type:"button","aria-label":"Close file tree",className:"fixed inset-0 bg-black/40 z-30",onClick:()=>N(!1)}),y.jsxs("div",{className:"flex flex-1 overflow-hidden relative",children:[y.jsx("div",{className:`relative overflow-hidden ${j?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:me?"0px":E?`${x}px`:"0px"},children:y.jsxs("aside",{id:"file-tree-panel",className:`bg-github-bg-secondary border-r border-github-border overflow-y-auto flex flex-col ${me?"fixed inset-y-0 left-0 z-40 w-[min(85vw,360px)] transition-transform duration-300 ease-out":"relative"}`,style:{width:me?"min(85vw, 360px)":`${x}px`,minWidth:me?"0px":"200px",maxWidth:me?"none":"600px",height:"100%",transform:me?E?"translateX(0)":"translateX(-100%)":void 0},children:[y.jsx("div",{className:"flex-1 overflow-y-auto",children:y.jsx(vj,{files:e.files,onScrollToFile:$n,comments:de.map(ae=>({id:ae.id,file:ae.filePath,line:typeof ae.position.line=="number"?ae.position.line:[ae.position.line.start,ae.position.line.end],body:ae.body,timestamp:ae.createdAt,codeContent:ae.codeSnapshot?.content})),reviewedFiles:it,onToggleReviewed:oe,selectedFileIndex:nr?.fileIndex??null})}),!me&&y.jsxs("div",{className:"p-4 border-t border-github-border flex justify-between items-center",children:[y.jsxs("button",{onClick:()=>Bl(!0),className:"flex items-center gap-1.5 text-github-text-secondary hover:text-github-text-primary transition-colors",title:"Keyboard shortcuts (Shift+?)",children:[y.jsx(M2,{size:16}),y.jsx("span",{className:"text-sm",children:"Shortcuts"})]}),y.jsxs("a",{href:"https://github.com/yoshiko-pg/difit",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-github-text-secondary hover:text-github-text-primary transition-colors",title:"View on GitHub",children:[y.jsx("span",{className:"text-sm",children:"Star on GitHub"}),y.jsx(wj,{style:{height:"18px",width:"18px"}})]})]})]})}),!me&&y.jsx("div",{className:`bg-github-border hover:bg-github-text-muted cursor-col-resize ${j?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:E?"4px":"0px"},onMouseDown:lo,title:"Drag to resize file list"}),y.jsx("main",{ref:F,className:`flex-1 overflow-y-auto ${Ft?"pb-16":""}`,children:e.files.map((ae,we)=>{const Re=mt.get(ae.path)??tR,Ce=Xt.get(ae.path)??nR;return y.jsx("div",{id:Bx(ae.path),className:"mb-6",children:y.jsx(yj,{file:ae,comments:Re,diffMode:l,reviewedFiles:it,onToggleReviewed:oe,collapsedFiles:J,onToggleCollapsed:be,onToggleAllCollapsed:je,onAddComment:io,onGeneratePrompt:ro,onRemoveComment:ke,onUpdateComment:$e,onOpenInEditor:ye.editor==="none"?void 0:Ut,syntaxTheme:ye.syntaxTheme,baseCommitish:e.baseCommitish,targetCommitish:e.targetCommitish,cursor:nr?.fileIndex===we?nr:null,fileIndex:we,onLineClick:vu,commentTrigger:ul?.fileIndex===we?ul:null,onCommentTriggerHandled:no,mergedChunks:Ce,expandLines:Yt,expandAllBetweenChunks:Fn,prefetchFileContent:Lt,isExpandLoading:Ge})},ae.path)})})]}),Ft&&y.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-20 bg-github-bg-secondary border-t border-github-border px-4 py-2 flex justify-end",children:y.jsx(Ub,{commentsCount:de.length,isCopiedAll:b,onCopyAll:Cn,onDeleteAll:Qe,onViewAll:()=>z(!0),direction:"up",compact:!0})}),y.jsx(jj,{isOpen:S,onClose:()=>C(!1),settings:ye,onSettingsChange:pe}),y.jsx(Sj,{isOpen:to,onClose:()=>Bl(!1)}),y.jsx(DE,{isOpen:G,onClose:()=>z(!1),onNavigate:At,comments:de.map(ae=>({id:ae.id,file:ae.filePath,line:typeof ae.position.line=="number"?ae.position.line:[ae.position.line.start,ae.position.line.end],body:ae.body,timestamp:ae.createdAt,codeContent:ae.codeSnapshot?.content})),onRemoveComment:ke,onGeneratePrompt:ae=>ze(ae.id),onUpdateComment:$e,syntaxTheme:ye.syntaxTheme})]})}):y.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2",children:[y.jsx("h2",{className:"text-github-danger text-2xl mb-2",children:"No data"}),y.jsx("p",{className:"text-github-text-secondary text-base",children:"No diff data available"})]})}const gv=document.getElementById("root");if(!gv)throw new Error("Root element not found");MS.createRoot(gv).render(y.jsx(Jt.StrictMode,{children:y.jsx(YS,{initiallyActiveScopes:["navigation"],children:y.jsx(lR,{})})}));export{tu as g};