@electric-agent/studio 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/active-sessions.d.ts +28 -0
  2. package/dist/active-sessions.d.ts.map +1 -0
  3. package/dist/active-sessions.js +50 -0
  4. package/dist/active-sessions.js.map +1 -0
  5. package/dist/bridge/claude-code-docker.d.ts +59 -0
  6. package/dist/bridge/claude-code-docker.d.ts.map +1 -0
  7. package/dist/bridge/claude-code-docker.js +258 -0
  8. package/dist/bridge/claude-code-docker.js.map +1 -0
  9. package/dist/bridge/claude-code-sprites.d.ts +49 -0
  10. package/dist/bridge/claude-code-sprites.d.ts.map +1 -0
  11. package/dist/bridge/claude-code-sprites.js +231 -0
  12. package/dist/bridge/claude-code-sprites.js.map +1 -0
  13. package/dist/bridge/claude-md-generator.d.ts +24 -0
  14. package/dist/bridge/claude-md-generator.d.ts.map +1 -0
  15. package/dist/bridge/claude-md-generator.js +299 -0
  16. package/dist/bridge/claude-md-generator.js.map +1 -0
  17. package/dist/bridge/index.d.ts +3 -0
  18. package/dist/bridge/index.d.ts.map +1 -1
  19. package/dist/bridge/index.js +3 -0
  20. package/dist/bridge/index.js.map +1 -1
  21. package/dist/bridge/stream-json-parser.d.ts +30 -0
  22. package/dist/bridge/stream-json-parser.d.ts.map +1 -0
  23. package/dist/bridge/stream-json-parser.js +207 -0
  24. package/dist/bridge/stream-json-parser.js.map +1 -0
  25. package/dist/client/assets/index-BeZ6CTGd.css +1 -0
  26. package/dist/client/assets/index-DRLXdDNp.js +241 -0
  27. package/dist/client/index.html +2 -2
  28. package/dist/index.d.ts +5 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +4 -1
  31. package/dist/index.js.map +1 -1
  32. package/dist/project-utils.d.ts +2 -1
  33. package/dist/project-utils.d.ts.map +1 -1
  34. package/dist/project-utils.js +2 -6
  35. package/dist/project-utils.js.map +1 -1
  36. package/dist/registry.d.ts +52 -0
  37. package/dist/registry.d.ts.map +1 -0
  38. package/dist/registry.js +204 -0
  39. package/dist/registry.js.map +1 -0
  40. package/dist/room-registry.d.ts +40 -0
  41. package/dist/room-registry.d.ts.map +1 -0
  42. package/dist/room-registry.js +112 -0
  43. package/dist/room-registry.js.map +1 -0
  44. package/dist/sandbox/sprites-bootstrap.d.ts.map +1 -1
  45. package/dist/sandbox/sprites-bootstrap.js +7 -1
  46. package/dist/sandbox/sprites-bootstrap.js.map +1 -1
  47. package/dist/sandbox/sprites.d.ts +5 -0
  48. package/dist/sandbox/sprites.d.ts.map +1 -1
  49. package/dist/sandbox/sprites.js +22 -2
  50. package/dist/sandbox/sprites.js.map +1 -1
  51. package/dist/server.d.ts +9 -2
  52. package/dist/server.d.ts.map +1 -1
  53. package/dist/server.js +616 -58
  54. package/dist/server.js.map +1 -1
  55. package/dist/sessions.d.ts +2 -0
  56. package/dist/sessions.d.ts.map +1 -1
  57. package/dist/sessions.js.map +1 -1
  58. package/dist/shared-sessions.d.ts +16 -0
  59. package/dist/shared-sessions.d.ts.map +1 -0
  60. package/dist/shared-sessions.js +52 -0
  61. package/dist/shared-sessions.js.map +1 -0
  62. package/dist/streams.d.ts +8 -0
  63. package/dist/streams.d.ts.map +1 -1
  64. package/dist/streams.js +22 -0
  65. package/dist/streams.js.map +1 -1
  66. package/package.json +15 -2
  67. package/dist/client/assets/index-CK__1-6e.css +0 -1
  68. package/dist/client/assets/index-DKL-jl7t.js +0 -241
@@ -1,241 +0,0 @@
1
- function Ex(t,l){for(var i=0;i<l.length;i++){const r=l[i];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in t)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function i(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=i(o);fetch(o.href,s)}})();function id(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var lf={exports:{}},Tr={};var zg;function wx(){if(zg)return Tr;zg=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(r,o,s){var c=null;if(s!==void 0&&(c=""+s),o.key!==void 0&&(c=""+o.key),"key"in o){s={};for(var d in o)d!=="key"&&(s[d]=o[d])}else s=o;return o=s.ref,{$$typeof:t,type:r,key:c,ref:o!==void 0?o:null,props:s}}return Tr.Fragment=l,Tr.jsx=i,Tr.jsxs=i,Tr}var Rg;function kx(){return Rg||(Rg=1,lf.exports=wx()),lf.exports}var S=kx(),af={exports:{}},Me={};var Dg;function Cx(){if(Dg)return Me;Dg=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function x(M){return M===null||typeof M!="object"?null:(M=b&&M[b]||M["@@iterator"],typeof M=="function"?M:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,_={};function A(M,I,w){this.props=M,this.context=I,this.refs=_,this.updater=w||k}A.prototype.isReactComponent={},A.prototype.setState=function(M,I){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,I,"setState")},A.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function R(){}R.prototype=A.prototype;function O(M,I,w){this.props=M,this.context=I,this.refs=_,this.updater=w||k}var ee=O.prototype=new R;ee.constructor=O,T(ee,A.prototype),ee.isPureReactComponent=!0;var ie=Array.isArray;function Y(){}var D={H:null,A:null,T:null,S:null},re=Object.prototype.hasOwnProperty;function fe(M,I,w){var ae=w.ref;return{$$typeof:t,type:M,key:I,ref:ae!==void 0?ae:null,props:w}}function q(M,I){return fe(M.type,I,M.props)}function V(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function Z(M){var I={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(w){return I[w]})}var Q=/\/+/g;function ue(M,I){return typeof M=="object"&&M!==null&&M.key!=null?Z(""+M.key):I.toString(36)}function $(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(Y,Y):(M.status="pending",M.then(function(I){M.status==="pending"&&(M.status="fulfilled",M.value=I)},function(I){M.status==="pending"&&(M.status="rejected",M.reason=I)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function U(M,I,w,ae,me){var be=typeof M;(be==="undefined"||be==="boolean")&&(M=null);var Ne=!1;if(M===null)Ne=!0;else switch(be){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(M.$$typeof){case t:case l:Ne=!0;break;case y:return Ne=M._init,U(Ne(M._payload),I,w,ae,me)}}if(Ne)return me=me(M),Ne=ae===""?"."+ue(M,0):ae,ie(me)?(w="",Ne!=null&&(w=Ne.replace(Q,"$&/")+"/"),U(me,I,w,"",function(Dt){return Dt})):me!=null&&(V(me)&&(me=q(me,w+(me.key==null||M&&M.key===me.key?"":(""+me.key).replace(Q,"$&/")+"/")+Ne)),I.push(me)),1;Ne=0;var pe=ae===""?".":ae+":";if(ie(M))for(var Re=0;Re<M.length;Re++)ae=M[Re],be=pe+ue(ae,Re),Ne+=U(ae,I,w,be,me);else if(Re=x(M),typeof Re=="function")for(M=Re.call(M),Re=0;!(ae=M.next()).done;)ae=ae.value,be=pe+ue(ae,Re++),Ne+=U(ae,I,w,be,me);else if(be==="object"){if(typeof M.then=="function")return U($(M),I,w,ae,me);throw I=String(M),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function J(M,I,w){if(M==null)return M;var ae=[],me=0;return U(M,ae,"","",function(be){return I.call(w,be,me++)}),ae}function se(M){if(M._status===-1){var I=M._result;I=I(),I.then(function(w){(M._status===0||M._status===-1)&&(M._status=1,M._result=w)},function(w){(M._status===0||M._status===-1)&&(M._status=2,M._result=w)}),M._status===-1&&(M._status=0,M._result=I)}if(M._status===1)return M._result.default;throw M._result}var xe=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},z={map:J,forEach:function(M,I,w){J(M,function(){I.apply(this,arguments)},w)},count:function(M){var I=0;return J(M,function(){I++}),I},toArray:function(M){return J(M,function(I){return I})||[]},only:function(M){if(!V(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return Me.Activity=g,Me.Children=z,Me.Component=A,Me.Fragment=i,Me.Profiler=o,Me.PureComponent=O,Me.StrictMode=r,Me.Suspense=p,Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Me.__COMPILER_RUNTIME={__proto__:null,c:function(M){return D.H.useMemoCache(M)}},Me.cache=function(M){return function(){return M.apply(null,arguments)}},Me.cacheSignal=function(){return null},Me.cloneElement=function(M,I,w){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var ae=T({},M.props),me=M.key;if(I!=null)for(be in I.key!==void 0&&(me=""+I.key),I)!re.call(I,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&I.ref===void 0||(ae[be]=I[be]);var be=arguments.length-2;if(be===1)ae.children=w;else if(1<be){for(var Ne=Array(be),pe=0;pe<be;pe++)Ne[pe]=arguments[pe+2];ae.children=Ne}return fe(M.type,me,ae)},Me.createContext=function(M){return M={$$typeof:c,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:s,_context:M},M},Me.createElement=function(M,I,w){var ae,me={},be=null;if(I!=null)for(ae in I.key!==void 0&&(be=""+I.key),I)re.call(I,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(me[ae]=I[ae]);var Ne=arguments.length-2;if(Ne===1)me.children=w;else if(1<Ne){for(var pe=Array(Ne),Re=0;Re<Ne;Re++)pe[Re]=arguments[Re+2];me.children=pe}if(M&&M.defaultProps)for(ae in Ne=M.defaultProps,Ne)me[ae]===void 0&&(me[ae]=Ne[ae]);return fe(M,be,me)},Me.createRef=function(){return{current:null}},Me.forwardRef=function(M){return{$$typeof:d,render:M}},Me.isValidElement=V,Me.lazy=function(M){return{$$typeof:y,_payload:{_status:-1,_result:M},_init:se}},Me.memo=function(M,I){return{$$typeof:m,type:M,compare:I===void 0?null:I}},Me.startTransition=function(M){var I=D.T,w={};D.T=w;try{var ae=M(),me=D.S;me!==null&&me(w,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(Y,xe)}catch(be){xe(be)}finally{I!==null&&w.types!==null&&(I.types=w.types),D.T=I}},Me.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Me.use=function(M){return D.H.use(M)},Me.useActionState=function(M,I,w){return D.H.useActionState(M,I,w)},Me.useCallback=function(M,I){return D.H.useCallback(M,I)},Me.useContext=function(M){return D.H.useContext(M)},Me.useDebugValue=function(){},Me.useDeferredValue=function(M,I){return D.H.useDeferredValue(M,I)},Me.useEffect=function(M,I){return D.H.useEffect(M,I)},Me.useEffectEvent=function(M){return D.H.useEffectEvent(M)},Me.useId=function(){return D.H.useId()},Me.useImperativeHandle=function(M,I,w){return D.H.useImperativeHandle(M,I,w)},Me.useInsertionEffect=function(M,I){return D.H.useInsertionEffect(M,I)},Me.useLayoutEffect=function(M,I){return D.H.useLayoutEffect(M,I)},Me.useMemo=function(M,I){return D.H.useMemo(M,I)},Me.useOptimistic=function(M,I){return D.H.useOptimistic(M,I)},Me.useReducer=function(M,I,w){return D.H.useReducer(M,I,w)},Me.useRef=function(M){return D.H.useRef(M)},Me.useState=function(M){return D.H.useState(M)},Me.useSyncExternalStore=function(M,I,w){return D.H.useSyncExternalStore(M,I,w)},Me.useTransition=function(){return D.H.useTransition()},Me.version="19.2.4",Me}var jg;function rd(){return jg||(jg=1,af.exports=Cx()),af.exports}var C=rd();const Tx=id(C),Ax=Ex({__proto__:null,default:Tx},[C]);var rf={exports:{}},Ar={},uf={exports:{}},of={};var Ng;function _x(){return Ng||(Ng=1,(function(t){function l(U,J){var se=U.length;U.push(J);e:for(;0<se;){var xe=se-1>>>1,z=U[xe];if(0<o(z,J))U[xe]=J,U[se]=z,se=xe;else break e}}function i(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var J=U[0],se=U.pop();if(se!==J){U[0]=se;e:for(var xe=0,z=U.length,M=z>>>1;xe<M;){var I=2*(xe+1)-1,w=U[I],ae=I+1,me=U[ae];if(0>o(w,se))ae<z&&0>o(me,w)?(U[xe]=me,U[ae]=se,xe=ae):(U[xe]=w,U[I]=se,xe=I);else if(ae<z&&0>o(me,se))U[xe]=me,U[ae]=se,xe=ae;else break e}}return J}function o(U,J){var se=U.sortIndex-J.sortIndex;return se!==0?se:U.id-J.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var c=Date,d=c.now();t.unstable_now=function(){return c.now()-d}}var p=[],m=[],y=1,g=null,b=3,x=!1,k=!1,T=!1,_=!1,A=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function ee(U){for(var J=i(m);J!==null;){if(J.callback===null)r(m);else if(J.startTime<=U)r(m),J.sortIndex=J.expirationTime,l(p,J);else break;J=i(m)}}function ie(U){if(T=!1,ee(U),!k)if(i(p)!==null)k=!0,Y||(Y=!0,Z());else{var J=i(m);J!==null&&$(ie,J.startTime-U)}}var Y=!1,D=-1,re=5,fe=-1;function q(){return _?!0:!(t.unstable_now()-fe<re)}function V(){if(_=!1,Y){var U=t.unstable_now();fe=U;var J=!0;try{e:{k=!1,T&&(T=!1,R(D),D=-1),x=!0;var se=b;try{t:{for(ee(U),g=i(p);g!==null&&!(g.expirationTime>U&&q());){var xe=g.callback;if(typeof xe=="function"){g.callback=null,b=g.priorityLevel;var z=xe(g.expirationTime<=U);if(U=t.unstable_now(),typeof z=="function"){g.callback=z,ee(U),J=!0;break t}g===i(p)&&r(p),ee(U)}else r(p);g=i(p)}if(g!==null)J=!0;else{var M=i(m);M!==null&&$(ie,M.startTime-U),J=!1}}break e}finally{g=null,b=se,x=!1}J=void 0}}finally{J?Z():Y=!1}}}var Z;if(typeof O=="function")Z=function(){O(V)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,ue=Q.port2;Q.port1.onmessage=V,Z=function(){ue.postMessage(null)}}else Z=function(){A(V,0)};function $(U,J){D=A(function(){U(t.unstable_now())},J)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(U){U.callback=null},t.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):re=0<U?Math.floor(1e3/U):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(U){switch(b){case 1:case 2:case 3:var J=3;break;default:J=b}var se=b;b=J;try{return U()}finally{b=se}},t.unstable_requestPaint=function(){_=!0},t.unstable_runWithPriority=function(U,J){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var se=b;b=U;try{return J()}finally{b=se}},t.unstable_scheduleCallback=function(U,J,se){var xe=t.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?xe+se:xe):se=xe,U){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=se+z,U={id:y++,callback:J,priorityLevel:U,startTime:se,expirationTime:z,sortIndex:-1},se>xe?(U.sortIndex=se,l(m,U),i(p)===null&&U===i(m)&&(T?(R(D),D=-1):T=!0,$(ie,se-xe))):(U.sortIndex=z,l(p,U),k||x||(k=!0,Y||(Y=!0,Z()))),U},t.unstable_shouldYield=q,t.unstable_wrapCallback=function(U){var J=b;return function(){var se=b;b=J;try{return U.apply(this,arguments)}finally{b=se}}}})(of)),of}var Mg;function zx(){return Mg||(Mg=1,uf.exports=_x()),uf.exports}var sf={exports:{}},Ft={};var Og;function Rx(){if(Og)return Ft;Og=1;var t=rd();function l(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(p,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:p,containerInfo:m,implementation:y}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ft.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Ft.createPortal=function(p,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return s(p,m,null,y)},Ft.flushSync=function(p){var m=c.T,y=r.p;try{if(c.T=null,r.p=2,p)return p()}finally{c.T=m,r.p=y,r.d.f()}},Ft.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},Ft.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Ft.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var y=m.as,g=d(y,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,x=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:x}):y==="script"&&r.d.X(p,{crossOrigin:g,integrity:b,fetchPriority:x,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ft.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=d(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},Ft.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=d(y,m.crossOrigin);r.d.L(p,y,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Ft.preloadModule=function(p,m){if(typeof p=="string")if(m){var y=d(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},Ft.requestFormReset=function(p){r.d.r(p)},Ft.unstable_batchedUpdates=function(p,m){return p(m)},Ft.useFormState=function(p,m,y){return c.H.useFormState(p,m,y)},Ft.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ft.version="19.2.4",Ft}var Lg;function sv(){if(Lg)return sf.exports;Lg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(l){console.error(l)}}return t(),sf.exports=Rx(),sf.exports}var Ug;function Dx(){if(Ug)return Ar;Ug=1;var t=zx(),l=rd(),i=sv();function r(e){var n="https://react.dev/errors/"+e;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 #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function c(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function d(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(s(e)!==e)throw Error(r(188))}function m(e){var n=e.alternate;if(!n){if(n=s(e),n===null)throw Error(r(188));return n!==e?null:e}for(var a=e,u=n;;){var f=a.return;if(f===null)break;var h=f.alternate;if(h===null){if(u=f.return,u!==null){a=u;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===a)return p(f),e;if(h===u)return p(f),n;h=h.sibling}throw Error(r(188))}if(a.return!==u.return)a=f,u=h;else{for(var v=!1,E=f.child;E;){if(E===a){v=!0,a=f,u=h;break}if(E===u){v=!0,u=f,a=h;break}E=E.sibling}if(!v){for(E=h.child;E;){if(E===a){v=!0,a=h,u=f;break}if(E===u){v=!0,u=h,a=f;break}E=E.sibling}if(!v)throw Error(r(189))}}if(a.alternate!==u)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:n}function y(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=y(e),n!==null)return n;e=e.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),O=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),ie=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),re=Symbol.for("react.lazy"),fe=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function Z(e){return e===null||typeof e!="object"?null:(e=V&&e[V]||e["@@iterator"],typeof e=="function"?e:null)}var Q=Symbol.for("react.client.reference");function ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Q?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case A:return"Profiler";case _:return"StrictMode";case ie:return"Suspense";case Y:return"SuspenseList";case fe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case O:return e.displayName||"Context";case R:return(e._context.displayName||"Context")+".Consumer";case ee:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case D:return n=e.displayName||null,n!==null?n:ue(e.type)||"Memo";case re:n=e._payload,e=e._init;try{return ue(e(n))}catch{}}return null}var $=Array.isArray,U=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},xe=[],z=-1;function M(e){return{current:e}}function I(e){0>z||(e.current=xe[z],xe[z]=null,z--)}function w(e,n){z++,xe[z]=e.current,e.current=n}var ae=M(null),me=M(null),be=M(null),Ne=M(null);function pe(e,n){switch(w(be,n),w(me,e),w(ae,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Jp(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Jp(n),e=Wp(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I(ae),w(ae,e)}function Re(){I(ae),I(me),I(be)}function Dt(e){e.memoizedState!==null&&w(Ne,e);var n=ae.current,a=Wp(n,e.type);n!==a&&(w(me,e),w(ae,a))}function Ln(e){me.current===e&&(I(ae),I(me)),Ne.current===e&&(I(Ne),Er._currentValue=se)}var yt,Un;function xn(e){if(yt===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);yt=n&&n[1]||"",Un=-1<a.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+yt+e+Un}var Rl=!1;function $t(e,n){if(!e||Rl)return"";Rl=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(P){var X=P}Reflect.construct(e,[],le)}else{try{le.call()}catch(P){X=P}e.call(le.prototype)}}else{try{throw Error()}catch(P){X=P}(le=e())&&typeof le.catch=="function"&&le.catch(function(){})}}catch(P){if(P&&X&&typeof P.stack=="string")return[P.stack,X.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=u.DetermineComponentFrameRoot(),v=h[0],E=h[1];if(v&&E){var N=v.split(`
4
- `),G=E.split(`
5
- `);for(f=u=0;u<N.length&&!N[u].includes("DetermineComponentFrameRoot");)u++;for(;f<G.length&&!G[f].includes("DetermineComponentFrameRoot");)f++;if(u===N.length||f===G.length)for(u=N.length-1,f=G.length-1;1<=u&&0<=f&&N[u]!==G[f];)f--;for(;1<=u&&0<=f;u--,f--)if(N[u]!==G[f]){if(u!==1||f!==1)do if(u--,f--,0>f||N[u]!==G[f]){var W=`
6
- `+N[u].replace(" at new "," at ");return e.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",e.displayName)),W}while(1<=u&&0<=f);break}}}finally{Rl=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?xn(a):""}function Fa(e,n){switch(e.tag){case 26:case 27:case 5:return xn(e.type);case 16:return xn("Lazy");case 13:return e.child!==n&&n!==null?xn("Suspense Fallback"):xn("Suspense");case 19:return xn("SuspenseList");case 0:case 15:return $t(e.type,!1);case 11:return $t(e.type.render,!1);case 1:return $t(e.type,!0);case 31:return xn("Activity");default:return""}}function Ga(e){try{var n="",a=null;do n+=Fa(e,a),a=e,e=e.return;while(e);return n}catch(u){return`
7
- Error generating stack: `+u.message+`
8
- `+u.stack}}var ll=Object.prototype.hasOwnProperty,Dl=t.unstable_scheduleCallback,ha=t.unstable_cancelCallback,Li=t.unstable_shouldYield,Ui=t.unstable_requestPaint,pt=t.unstable_now,al=t.unstable_getCurrentPriorityLevel,te=t.unstable_ImmediatePriority,de=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,je=t.unstable_LowPriority,Pe=t.unstable_IdlePriority,It=t.log,un=t.unstable_setDisableYieldValue,Lt=null,nt=null;function Ut(e){if(typeof It=="function"&&un(e),nt&&typeof nt.setStrictMode=="function")try{nt.setStrictMode(Lt,e)}catch{}}var tt=Math.clz32?Math.clz32:nu,Bn=Math.log,on=Math.LN2;function nu(e){return e>>>=0,e===0?32:31-(Bn(e)/on|0)|0}var il=256,ma=262144,jl=4194304;function rl(e){var n=e&42;if(n!==0)return n;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function pa(e,n,a){var u=e.pendingLanes;if(u===0)return 0;var f=0,h=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var E=u&134217727;return E!==0?(u=E&~h,u!==0?f=rl(u):(v&=E,v!==0?f=rl(v):a||(a=E&~e,a!==0&&(f=rl(a))))):(E=u&~h,E!==0?f=rl(E):v!==0?f=rl(v):a||(a=u&~e,a!==0&&(f=rl(a)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,a=n&-n,h>=a||h===32&&(a&4194048)!==0)?n:f}function ga(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function lu(e,n){switch(e){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 ya(){var e=jl;return jl<<=1,(jl&62914560)===0&&(jl=4194304),e}function Nl(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Ml(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $o(e,n,a,u,f,h){var v=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var E=e.entanglements,N=e.expirationTimes,G=e.hiddenUpdates;for(a=v&~a;0<a;){var W=31-tt(a),le=1<<W;E[W]=0,N[W]=-1;var X=G[W];if(X!==null)for(G[W]=null,W=0;W<X.length;W++){var P=X[W];P!==null&&(P.lane&=-536870913)}a&=~le}u!==0&&au(e,u,0),h!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=h&~(v&~n))}function au(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var u=31-tt(n);e.entangledLanes|=n,e.entanglements[u]=e.entanglements[u]|1073741824|a&261930}function j(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var u=31-tt(a),f=1<<u;f&n|e[u]&n&&(e[u]|=n),a&=~f}}function H(e,n){var a=n&-n;return a=(a&42)!==0?1:K(a),(a&(e.suspendedLanes|n))!==0?0:a}function K(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function oe(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function he(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Eg(e.type))}function ke(e,n){var a=J.p;try{return J.p=e,n()}finally{J.p=a}}var ye=Math.random().toString(36).slice(2),ge="__reactFiber$"+ye,ve="__reactProps$"+ye,we="__reactContainer$"+ye,_e="__reactEvents$"+ye,Te="__reactListeners$"+ye,Ke="__reactHandles$"+ye,Ge="__reactResources$"+ye,gt="__reactMarker$"+ye;function vt(e){delete e[ge],delete e[ve],delete e[_e],delete e[Te],delete e[Ke]}function bt(e){var n=e[ge];if(n)return n;for(var a=e.parentNode;a;){if(n=a[we]||a[ge]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=rg(e);e!==null;){if(a=e[ge])return a;e=rg(e)}return n}e=a,a=e.parentNode}return null}function Qe(e){if(e=e[ge]||e[we]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Mt(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function Pt(e){var n=e[Ge];return n||(n=e[Ge]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function ht(e){e[gt]=!0}var Hn=new Set,sn={};function qn(e,n){Sn(e,n),Sn(e+"Capture",n)}function Sn(e,n){for(sn[e]=n,e=0;e<n.length;e++)Hn.add(n[e])}var ul=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]*$"),va={},ba={};function Xe(e){return ll.call(ba,e)?!0:ll.call(va,e)?!1:ul.test(e)?ba[e]=!0:(va[e]=!0,!1)}function Et(e,n,a){if(Xe(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function Yn(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function Bt(e,n,a,u){if(u===null)e.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+u)}}function Ie(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xa(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function iu(e,n,a){var u=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var f=u.get,h=u.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(v){a=""+v,h.call(this,v)}}),Object.defineProperty(e,n,{enumerable:u.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Bi(e){if(!e._valueTracker){var n=xa(e)?"checked":"value";e._valueTracker=iu(e,n,""+e[n])}}function Qd(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),u="";return e&&(u=xa(e)?e.checked?"true":"false":e.value),e=u,e!==a?(n.setValue(e),!0):!1}function ru(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var g0=/[\n"\\]/g;function En(e){return e.replace(g0,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Po(e,n,a,u,f,h,v,E){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),n!=null?v==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Ie(n)):e.value!==""+Ie(n)&&(e.value=""+Ie(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?Jo(e,v,Ie(n)):a!=null?Jo(e,v,Ie(a)):u!=null&&e.removeAttribute("value"),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+Ie(E):e.removeAttribute("name")}function Xd(e,n,a,u,f,h,v,E){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||a!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){Bi(e);return}a=a!=null?""+Ie(a):"",n=n!=null?""+Ie(n):a,E||n===e.value||(e.value=n),e.defaultValue=n}u=u??f,u=typeof u!="function"&&typeof u!="symbol"&&!!u,e.checked=E?e.checked:!!u,e.defaultChecked=!!u,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),Bi(e)}function Jo(e,n,a){n==="number"&&ru(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Qa(e,n,a,u){if(e=e.options,n){n={};for(var f=0;f<a.length;f++)n["$"+a[f]]=!0;for(a=0;a<e.length;a++)f=n.hasOwnProperty("$"+e[a].value),e[a].selected!==f&&(e[a].selected=f),f&&u&&(e[a].defaultSelected=!0)}else{for(a=""+Ie(a),n=null,f=0;f<e.length;f++){if(e[f].value===a){e[f].selected=!0,u&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function Id(e,n,a){if(n!=null&&(n=""+Ie(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+Ie(a):""}function Zd(e,n,a,u){if(n==null){if(u!=null){if(a!=null)throw Error(r(92));if($(u)){if(1<u.length)throw Error(r(93));u=u[0]}a=u}a==null&&(a=""),n=a}a=Ie(n),e.defaultValue=a,u=e.textContent,u===a&&u!==""&&u!==null&&(e.value=u),Bi(e)}function Xa(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var y0=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 Kd(e,n,a){var u=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?u?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":u?e.setProperty(n,a):typeof a!="number"||a===0||y0.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function $d(e,n,a){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,a!=null){for(var u in a)!a.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?e.setProperty(u,""):u==="float"?e.cssFloat="":e[u]="");for(var f in n)u=n[f],n.hasOwnProperty(f)&&a[f]!==u&&Kd(e,f,u)}else for(var h in n)n.hasOwnProperty(h)&&Kd(e,h,n[h])}function Wo(e){if(e.indexOf("-")===-1)return!1;switch(e){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 v0=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"]]),b0=/^[\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 uu(e){return b0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ol(){}var es=null;function ts(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ia=null,Za=null;function Pd(e){var n=Qe(e);if(n&&(e=n.stateNode)){var a=e[ve]||null;e:switch(e=n.stateNode,n.type){case"input":if(Po(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+En(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var u=a[n];if(u!==e&&u.form===e.form){var f=u[ve]||null;if(!f)throw Error(r(90));Po(u,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<a.length;n++)u=a[n],u.form===e.form&&Qd(u)}break e;case"textarea":Id(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Qa(e,!!a.multiple,n,!1)}}}var ns=!1;function Jd(e,n,a){if(ns)return e(n,a);ns=!0;try{var u=e(n);return u}finally{if(ns=!1,(Ia!==null||Za!==null)&&(Zu(),Ia&&(n=Ia,e=Za,Za=Ia=null,Pd(n),e)))for(n=0;n<e.length;n++)Pd(e[n])}}function Hi(e,n){var a=e.stateNode;if(a===null)return null;var u=a[ve]||null;if(u===null)return null;a=u[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":(u=!u.disabled)||(e=e.type,u=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!u;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,n,typeof a));return a}var sl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ls=!1;if(sl)try{var qi={};Object.defineProperty(qi,"passive",{get:function(){ls=!0}}),window.addEventListener("test",qi,qi),window.removeEventListener("test",qi,qi)}catch{ls=!1}var Ol=null,as=null,ou=null;function Wd(){if(ou)return ou;var e,n=as,a=n.length,u,f="value"in Ol?Ol.value:Ol.textContent,h=f.length;for(e=0;e<a&&n[e]===f[e];e++);var v=a-e;for(u=1;u<=v&&n[a-u]===f[h-u];u++);return ou=f.slice(e,1<u?1-u:void 0)}function su(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function cu(){return!0}function eh(){return!1}function Jt(e){function n(a,u,f,h,v){this._reactName=a,this._targetInst=f,this.type=u,this.nativeEvent=h,this.target=v,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(a=e[E],this[E]=a?a(h):h[E]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?cu:eh,this.isPropagationStopped=eh,this}return g(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=cu)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=cu)},persist:function(){},isPersistent:cu}),n}var Sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fu=Jt(Sa),Yi=g({},Sa,{view:0,detail:0}),x0=Jt(Yi),is,rs,Vi,du=g({},Yi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:os,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Vi&&(Vi&&e.type==="mousemove"?(is=e.screenX-Vi.screenX,rs=e.screenY-Vi.screenY):rs=is=0,Vi=e),is)},movementY:function(e){return"movementY"in e?e.movementY:rs}}),th=Jt(du),S0=g({},du,{dataTransfer:0}),E0=Jt(S0),w0=g({},Yi,{relatedTarget:0}),us=Jt(w0),k0=g({},Sa,{animationName:0,elapsedTime:0,pseudoElement:0}),C0=Jt(k0),T0=g({},Sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),A0=Jt(T0),_0=g({},Sa,{data:0}),nh=Jt(_0),z0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},R0={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"},D0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function j0(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=D0[e])?!!n[e]:!1}function os(){return j0}var N0=g({},Yi,{key:function(e){if(e.key){var n=z0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=su(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?R0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:os,charCode:function(e){return e.type==="keypress"?su(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?su(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),M0=Jt(N0),O0=g({},du,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lh=Jt(O0),L0=g({},Yi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:os}),U0=Jt(L0),B0=g({},Sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),H0=Jt(B0),q0=g({},du,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Y0=Jt(q0),V0=g({},Sa,{newState:0,oldState:0}),F0=Jt(V0),G0=[9,13,27,32],ss=sl&&"CompositionEvent"in window,Fi=null;sl&&"documentMode"in document&&(Fi=document.documentMode);var Q0=sl&&"TextEvent"in window&&!Fi,ah=sl&&(!ss||Fi&&8<Fi&&11>=Fi),ih=" ",rh=!1;function uh(e,n){switch(e){case"keyup":return G0.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ka=!1;function X0(e,n){switch(e){case"compositionend":return oh(n);case"keypress":return n.which!==32?null:(rh=!0,ih);case"textInput":return e=n.data,e===ih&&rh?null:e;default:return null}}function I0(e,n){if(Ka)return e==="compositionend"||!ss&&uh(e,n)?(e=Wd(),ou=as=Ol=null,Ka=!1,e):null;switch(e){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 ah&&n.locale!=="ko"?null:n.data;default:return null}}var Z0={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 sh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Z0[e.type]:n==="textarea"}function ch(e,n,a,u){Ia?Za?Za.push(u):Za=[u]:Ia=u,n=to(n,"onChange"),0<n.length&&(a=new fu("onChange","change",null,a,u),e.push({event:a,listeners:n}))}var Gi=null,Qi=null;function K0(e){Xp(e,0)}function hu(e){var n=Mt(e);if(Qd(n))return e}function fh(e,n){if(e==="change")return n}var dh=!1;if(sl){var cs;if(sl){var fs="oninput"in document;if(!fs){var hh=document.createElement("div");hh.setAttribute("oninput","return;"),fs=typeof hh.oninput=="function"}cs=fs}else cs=!1;dh=cs&&(!document.documentMode||9<document.documentMode)}function mh(){Gi&&(Gi.detachEvent("onpropertychange",ph),Qi=Gi=null)}function ph(e){if(e.propertyName==="value"&&hu(Qi)){var n=[];ch(n,Qi,e,ts(e)),Jd(K0,n)}}function $0(e,n,a){e==="focusin"?(mh(),Gi=n,Qi=a,Gi.attachEvent("onpropertychange",ph)):e==="focusout"&&mh()}function P0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hu(Qi)}function J0(e,n){if(e==="click")return hu(n)}function W0(e,n){if(e==="input"||e==="change")return hu(n)}function e1(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var cn=typeof Object.is=="function"?Object.is:e1;function Xi(e,n){if(cn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),u=Object.keys(n);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var f=a[u];if(!ll.call(n,f)||!cn(e[f],n[f]))return!1}return!0}function gh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yh(e,n){var a=gh(e);e=0;for(var u;a;){if(a.nodeType===3){if(u=e+a.textContent.length,e<=n&&u>=n)return{node:a,offset:n-e};e=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=gh(a)}}function vh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?vh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function bh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=ru(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=ru(e.document)}return n}function ds(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var t1=sl&&"documentMode"in document&&11>=document.documentMode,$a=null,hs=null,Ii=null,ms=!1;function xh(e,n,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ms||$a==null||$a!==ru(u)||(u=$a,"selectionStart"in u&&ds(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ii&&Xi(Ii,u)||(Ii=u,u=to(hs,"onSelect"),0<u.length&&(n=new fu("onSelect","select",null,n,a),e.push({event:n,listeners:u}),n.target=$a)))}function Ea(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var Pa={animationend:Ea("Animation","AnimationEnd"),animationiteration:Ea("Animation","AnimationIteration"),animationstart:Ea("Animation","AnimationStart"),transitionrun:Ea("Transition","TransitionRun"),transitionstart:Ea("Transition","TransitionStart"),transitioncancel:Ea("Transition","TransitionCancel"),transitionend:Ea("Transition","TransitionEnd")},ps={},Sh={};sl&&(Sh=document.createElement("div").style,"AnimationEvent"in window||(delete Pa.animationend.animation,delete Pa.animationiteration.animation,delete Pa.animationstart.animation),"TransitionEvent"in window||delete Pa.transitionend.transition);function wa(e){if(ps[e])return ps[e];if(!Pa[e])return e;var n=Pa[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in Sh)return ps[e]=n[a];return e}var Eh=wa("animationend"),wh=wa("animationiteration"),kh=wa("animationstart"),n1=wa("transitionrun"),l1=wa("transitionstart"),a1=wa("transitioncancel"),Ch=wa("transitionend"),Th=new Map,gs="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(" ");gs.push("scrollEnd");function Vn(e,n){Th.set(e,n),qn(n,[e])}var mu=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},wn=[],Ja=0,ys=0;function pu(){for(var e=Ja,n=ys=Ja=0;n<e;){var a=wn[n];wn[n++]=null;var u=wn[n];wn[n++]=null;var f=wn[n];wn[n++]=null;var h=wn[n];if(wn[n++]=null,u!==null&&f!==null){var v=u.pending;v===null?f.next=f:(f.next=v.next,v.next=f),u.pending=f}h!==0&&Ah(a,f,h)}}function gu(e,n,a,u){wn[Ja++]=e,wn[Ja++]=n,wn[Ja++]=a,wn[Ja++]=u,ys|=u,e.lanes|=u,e=e.alternate,e!==null&&(e.lanes|=u)}function vs(e,n,a,u){return gu(e,n,a,u),yu(e)}function ka(e,n){return gu(e,null,null,n),yu(e)}function Ah(e,n,a){e.lanes|=a;var u=e.alternate;u!==null&&(u.lanes|=a);for(var f=!1,h=e.return;h!==null;)h.childLanes|=a,u=h.alternate,u!==null&&(u.childLanes|=a),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(f=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,f&&n!==null&&(f=31-tt(a),e=h.hiddenUpdates,u=e[f],u===null?e[f]=[n]:u.push(n),n.lane=a|536870912),h):null}function yu(e){if(50<pr)throw pr=0,Ac=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Wa={};function i1(e,n,a,u){this.tag=e,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=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fn(e,n,a,u){return new i1(e,n,a,u)}function bs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function cl(e,n){var a=e.alternate;return a===null?(a=fn(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function _h(e,n){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function vu(e,n,a,u,f,h){var v=0;if(u=e,typeof e=="function")bs(e)&&(v=1);else if(typeof e=="string")v=cx(e,a,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case fe:return e=fn(31,a,n,f),e.elementType=fe,e.lanes=h,e;case T:return Ca(a.children,f,h,n);case _:v=8,f|=24;break;case A:return e=fn(12,a,n,f|2),e.elementType=A,e.lanes=h,e;case ie:return e=fn(13,a,n,f),e.elementType=ie,e.lanes=h,e;case Y:return e=fn(19,a,n,f),e.elementType=Y,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case O:v=10;break e;case R:v=9;break e;case ee:v=11;break e;case D:v=14;break e;case re:v=16,u=null;break e}v=29,a=Error(r(130,e===null?"null":typeof e,"")),u=null}return n=fn(v,a,n,f),n.elementType=e,n.type=u,n.lanes=h,n}function Ca(e,n,a,u){return e=fn(7,e,u,n),e.lanes=a,e}function xs(e,n,a){return e=fn(6,e,null,n),e.lanes=a,e}function zh(e){var n=fn(18,null,null,0);return n.stateNode=e,n}function Ss(e,n,a){return n=fn(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Rh=new WeakMap;function kn(e,n){if(typeof e=="object"&&e!==null){var a=Rh.get(e);return a!==void 0?a:(n={value:e,source:n,stack:Ga(n)},Rh.set(e,n),n)}return{value:e,source:n,stack:Ga(n)}}var ei=[],ti=0,bu=null,Zi=0,Cn=[],Tn=0,Ll=null,In=1,Zn="";function fl(e,n){ei[ti++]=Zi,ei[ti++]=bu,bu=e,Zi=n}function Dh(e,n,a){Cn[Tn++]=In,Cn[Tn++]=Zn,Cn[Tn++]=Ll,Ll=e;var u=In;e=Zn;var f=32-tt(u)-1;u&=~(1<<f),a+=1;var h=32-tt(n)+f;if(30<h){var v=f-f%5;h=(u&(1<<v)-1).toString(32),u>>=v,f-=v,In=1<<32-tt(n)+f|a<<f|u,Zn=h+e}else In=1<<h|a<<f|u,Zn=e}function Es(e){e.return!==null&&(fl(e,1),Dh(e,1,0))}function ws(e){for(;e===bu;)bu=ei[--ti],ei[ti]=null,Zi=ei[--ti],ei[ti]=null;for(;e===Ll;)Ll=Cn[--Tn],Cn[Tn]=null,Zn=Cn[--Tn],Cn[Tn]=null,In=Cn[--Tn],Cn[Tn]=null}function jh(e,n){Cn[Tn++]=In,Cn[Tn++]=Zn,Cn[Tn++]=Ll,In=n.id,Zn=n.overflow,Ll=e}var Ht=null,ft=null,Ze=!1,Ul=null,An=!1,ks=Error(r(519));function Bl(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ki(kn(n,e)),ks}function Nh(e){var n=e.stateNode,a=e.type,u=e.memoizedProps;switch(n[ge]=e,n[ve]=u,a){case"dialog":qe("cancel",n),qe("close",n);break;case"iframe":case"object":case"embed":qe("load",n);break;case"video":case"audio":for(a=0;a<yr.length;a++)qe(yr[a],n);break;case"source":qe("error",n);break;case"img":case"image":case"link":qe("error",n),qe("load",n);break;case"details":qe("toggle",n);break;case"input":qe("invalid",n),Xd(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":qe("invalid",n);break;case"textarea":qe("invalid",n),Zd(n,u.value,u.defaultValue,u.children)}a=u.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||u.suppressHydrationWarning===!0||$p(n.textContent,a)?(u.popover!=null&&(qe("beforetoggle",n),qe("toggle",n)),u.onScroll!=null&&qe("scroll",n),u.onScrollEnd!=null&&qe("scrollend",n),u.onClick!=null&&(n.onclick=ol),n=!0):n=!1,n||Bl(e,!0)}function Mh(e){for(Ht=e.return;Ht;)switch(Ht.tag){case 5:case 31:case 13:An=!1;return;case 27:case 3:An=!0;return;default:Ht=Ht.return}}function ni(e){if(e!==Ht)return!1;if(!Ze)return Mh(e),Ze=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Vc(e.type,e.memoizedProps)),a=!a),a&&ft&&Bl(e),Mh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ft=ig(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ft=ig(e)}else n===27?(n=ft,Jl(e.type)?(e=Ic,Ic=null,ft=e):ft=n):ft=Ht?zn(e.stateNode.nextSibling):null;return!0}function Ta(){ft=Ht=null,Ze=!1}function Cs(){var e=Ul;return e!==null&&(nn===null?nn=e:nn.push.apply(nn,e),Ul=null),e}function Ki(e){Ul===null?Ul=[e]:Ul.push(e)}var Ts=M(null),Aa=null,dl=null;function Hl(e,n,a){w(Ts,n._currentValue),n._currentValue=a}function hl(e){e._currentValue=Ts.current,I(Ts)}function As(e,n,a){for(;e!==null;){var u=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),e===a)break;e=e.return}}function _s(e,n,a,u){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var h=f.dependencies;if(h!==null){var v=f.child;h=h.firstContext;e:for(;h!==null;){var E=h;h=f;for(var N=0;N<n.length;N++)if(E.context===n[N]){h.lanes|=a,E=h.alternate,E!==null&&(E.lanes|=a),As(h.return,a,e),u||(v=null);break e}h=E.next}}else if(f.tag===18){if(v=f.return,v===null)throw Error(r(341));v.lanes|=a,h=v.alternate,h!==null&&(h.lanes|=a),As(v,a,e),v=null}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===e){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}}function li(e,n,a,u){e=null;for(var f=n,h=!1;f!==null;){if(!h){if((f.flags&524288)!==0)h=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var v=f.alternate;if(v===null)throw Error(r(387));if(v=v.memoizedProps,v!==null){var E=f.type;cn(f.pendingProps.value,v.value)||(e!==null?e.push(E):e=[E])}}else if(f===Ne.current){if(v=f.alternate,v===null)throw Error(r(387));v.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Er):e=[Er])}f=f.return}e!==null&&_s(n,e,a,u),n.flags|=262144}function xu(e){for(e=e.firstContext;e!==null;){if(!cn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function _a(e){Aa=e,dl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qt(e){return Oh(Aa,e)}function Su(e,n){return Aa===null&&_a(e),Oh(e,n)}function Oh(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},dl===null){if(e===null)throw Error(r(308));dl=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else dl=dl.next=n;return a}var r1=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,u){e.push(u)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},u1=t.unstable_scheduleCallback,o1=t.unstable_NormalPriority,Ct={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zs(){return{controller:new r1,data:new Map,refCount:0}}function $i(e){e.refCount--,e.refCount===0&&u1(o1,function(){e.controller.abort()})}var Pi=null,Rs=0,ai=0,ii=null;function s1(e,n){if(Pi===null){var a=Pi=[];Rs=0,ai=Nc(),ii={status:"pending",value:void 0,then:function(u){a.push(u)}}}return Rs++,n.then(Lh,Lh),n}function Lh(){if(--Rs===0&&Pi!==null){ii!==null&&(ii.status="fulfilled");var e=Pi;Pi=null,ai=0,ii=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function c1(e,n){var a=[],u={status:"pending",value:null,reason:null,then:function(f){a.push(f)}};return e.then(function(){u.status="fulfilled",u.value=n;for(var f=0;f<a.length;f++)(0,a[f])(n)},function(f){for(u.status="rejected",u.reason=f,f=0;f<a.length;f++)(0,a[f])(void 0)}),u}var Uh=U.S;U.S=function(e,n){xp=pt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&s1(e,n),Uh!==null&&Uh(e,n)};var za=M(null);function Ds(){var e=za.current;return e!==null?e:ot.pooledCache}function Eu(e,n){n===null?w(za,za.current):w(za,n.pool)}function Bh(){var e=Ds();return e===null?null:{parent:Ct._currentValue,pool:e}}var ri=Error(r(460)),js=Error(r(474)),wu=Error(r(542)),ku={then:function(){}};function Hh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function qh(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(ol,ol),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Vh(e),e;default:if(typeof n.status=="string")n.then(ol,ol);else{if(e=ot,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(u){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=u}},function(u){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Vh(e),e}throw Da=n,ri}}function Ra(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Da=a,ri):a}}var Da=null;function Yh(){if(Da===null)throw Error(r(459));var e=Da;return Da=null,e}function Vh(e){if(e===ri||e===wu)throw Error(r(483))}var ui=null,Ji=0;function Cu(e){var n=Ji;return Ji+=1,ui===null&&(ui=[]),qh(ui,e,n)}function Wi(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Tu(e,n){throw n.$$typeof===b?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Fh(e){function n(B,L){if(e){var F=B.deletions;F===null?(B.deletions=[L],B.flags|=16):F.push(L)}}function a(B,L){if(!e)return null;for(;L!==null;)n(B,L),L=L.sibling;return null}function u(B){for(var L=new Map;B!==null;)B.key!==null?L.set(B.key,B):L.set(B.index,B),B=B.sibling;return L}function f(B,L){return B=cl(B,L),B.index=0,B.sibling=null,B}function h(B,L,F){return B.index=F,e?(F=B.alternate,F!==null?(F=F.index,F<L?(B.flags|=67108866,L):F):(B.flags|=67108866,L)):(B.flags|=1048576,L)}function v(B){return e&&B.alternate===null&&(B.flags|=67108866),B}function E(B,L,F,ne){return L===null||L.tag!==6?(L=xs(F,B.mode,ne),L.return=B,L):(L=f(L,F),L.return=B,L)}function N(B,L,F,ne){var Ae=F.type;return Ae===T?W(B,L,F.props.children,ne,F.key):L!==null&&(L.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===re&&Ra(Ae)===L.type)?(L=f(L,F.props),Wi(L,F),L.return=B,L):(L=vu(F.type,F.key,F.props,null,B.mode,ne),Wi(L,F),L.return=B,L)}function G(B,L,F,ne){return L===null||L.tag!==4||L.stateNode.containerInfo!==F.containerInfo||L.stateNode.implementation!==F.implementation?(L=Ss(F,B.mode,ne),L.return=B,L):(L=f(L,F.children||[]),L.return=B,L)}function W(B,L,F,ne,Ae){return L===null||L.tag!==7?(L=Ca(F,B.mode,ne,Ae),L.return=B,L):(L=f(L,F),L.return=B,L)}function le(B,L,F){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=xs(""+L,B.mode,F),L.return=B,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case x:return F=vu(L.type,L.key,L.props,null,B.mode,F),Wi(F,L),F.return=B,F;case k:return L=Ss(L,B.mode,F),L.return=B,L;case re:return L=Ra(L),le(B,L,F)}if($(L)||Z(L))return L=Ca(L,B.mode,F,null),L.return=B,L;if(typeof L.then=="function")return le(B,Cu(L),F);if(L.$$typeof===O)return le(B,Su(B,L),F);Tu(B,L)}return null}function X(B,L,F,ne){var Ae=L!==null?L.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return Ae!==null?null:E(B,L,""+F,ne);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case x:return F.key===Ae?N(B,L,F,ne):null;case k:return F.key===Ae?G(B,L,F,ne):null;case re:return F=Ra(F),X(B,L,F,ne)}if($(F)||Z(F))return Ae!==null?null:W(B,L,F,ne,null);if(typeof F.then=="function")return X(B,L,Cu(F),ne);if(F.$$typeof===O)return X(B,L,Su(B,F),ne);Tu(B,F)}return null}function P(B,L,F,ne,Ae){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return B=B.get(F)||null,E(L,B,""+ne,Ae);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case x:return B=B.get(ne.key===null?F:ne.key)||null,N(L,B,ne,Ae);case k:return B=B.get(ne.key===null?F:ne.key)||null,G(L,B,ne,Ae);case re:return ne=Ra(ne),P(B,L,F,ne,Ae)}if($(ne)||Z(ne))return B=B.get(F)||null,W(L,B,ne,Ae,null);if(typeof ne.then=="function")return P(B,L,F,Cu(ne),Ae);if(ne.$$typeof===O)return P(B,L,F,Su(L,ne),Ae);Tu(L,ne)}return null}function Se(B,L,F,ne){for(var Ae=null,Je=null,Ee=L,Le=L=0,Fe=null;Ee!==null&&Le<F.length;Le++){Ee.index>Le?(Fe=Ee,Ee=null):Fe=Ee.sibling;var We=X(B,Ee,F[Le],ne);if(We===null){Ee===null&&(Ee=Fe);break}e&&Ee&&We.alternate===null&&n(B,Ee),L=h(We,L,Le),Je===null?Ae=We:Je.sibling=We,Je=We,Ee=Fe}if(Le===F.length)return a(B,Ee),Ze&&fl(B,Le),Ae;if(Ee===null){for(;Le<F.length;Le++)Ee=le(B,F[Le],ne),Ee!==null&&(L=h(Ee,L,Le),Je===null?Ae=Ee:Je.sibling=Ee,Je=Ee);return Ze&&fl(B,Le),Ae}for(Ee=u(Ee);Le<F.length;Le++)Fe=P(Ee,B,Le,F[Le],ne),Fe!==null&&(e&&Fe.alternate!==null&&Ee.delete(Fe.key===null?Le:Fe.key),L=h(Fe,L,Le),Je===null?Ae=Fe:Je.sibling=Fe,Je=Fe);return e&&Ee.forEach(function(la){return n(B,la)}),Ze&&fl(B,Le),Ae}function De(B,L,F,ne){if(F==null)throw Error(r(151));for(var Ae=null,Je=null,Ee=L,Le=L=0,Fe=null,We=F.next();Ee!==null&&!We.done;Le++,We=F.next()){Ee.index>Le?(Fe=Ee,Ee=null):Fe=Ee.sibling;var la=X(B,Ee,We.value,ne);if(la===null){Ee===null&&(Ee=Fe);break}e&&Ee&&la.alternate===null&&n(B,Ee),L=h(la,L,Le),Je===null?Ae=la:Je.sibling=la,Je=la,Ee=Fe}if(We.done)return a(B,Ee),Ze&&fl(B,Le),Ae;if(Ee===null){for(;!We.done;Le++,We=F.next())We=le(B,We.value,ne),We!==null&&(L=h(We,L,Le),Je===null?Ae=We:Je.sibling=We,Je=We);return Ze&&fl(B,Le),Ae}for(Ee=u(Ee);!We.done;Le++,We=F.next())We=P(Ee,B,Le,We.value,ne),We!==null&&(e&&We.alternate!==null&&Ee.delete(We.key===null?Le:We.key),L=h(We,L,Le),Je===null?Ae=We:Je.sibling=We,Je=We);return e&&Ee.forEach(function(Sx){return n(B,Sx)}),Ze&&fl(B,Le),Ae}function ut(B,L,F,ne){if(typeof F=="object"&&F!==null&&F.type===T&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case x:e:{for(var Ae=F.key;L!==null;){if(L.key===Ae){if(Ae=F.type,Ae===T){if(L.tag===7){a(B,L.sibling),ne=f(L,F.props.children),ne.return=B,B=ne;break e}}else if(L.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===re&&Ra(Ae)===L.type){a(B,L.sibling),ne=f(L,F.props),Wi(ne,F),ne.return=B,B=ne;break e}a(B,L);break}else n(B,L);L=L.sibling}F.type===T?(ne=Ca(F.props.children,B.mode,ne,F.key),ne.return=B,B=ne):(ne=vu(F.type,F.key,F.props,null,B.mode,ne),Wi(ne,F),ne.return=B,B=ne)}return v(B);case k:e:{for(Ae=F.key;L!==null;){if(L.key===Ae)if(L.tag===4&&L.stateNode.containerInfo===F.containerInfo&&L.stateNode.implementation===F.implementation){a(B,L.sibling),ne=f(L,F.children||[]),ne.return=B,B=ne;break e}else{a(B,L);break}else n(B,L);L=L.sibling}ne=Ss(F,B.mode,ne),ne.return=B,B=ne}return v(B);case re:return F=Ra(F),ut(B,L,F,ne)}if($(F))return Se(B,L,F,ne);if(Z(F)){if(Ae=Z(F),typeof Ae!="function")throw Error(r(150));return F=Ae.call(F),De(B,L,F,ne)}if(typeof F.then=="function")return ut(B,L,Cu(F),ne);if(F.$$typeof===O)return ut(B,L,Su(B,F),ne);Tu(B,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,L!==null&&L.tag===6?(a(B,L.sibling),ne=f(L,F),ne.return=B,B=ne):(a(B,L),ne=xs(F,B.mode,ne),ne.return=B,B=ne),v(B)):a(B,L)}return function(B,L,F,ne){try{Ji=0;var Ae=ut(B,L,F,ne);return ui=null,Ae}catch(Ee){if(Ee===ri||Ee===wu)throw Ee;var Je=fn(29,Ee,null,B.mode);return Je.lanes=ne,Je.return=B,Je}}}var ja=Fh(!0),Gh=Fh(!1),ql=!1;function Ns(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ms(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Yl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Vl(e,n,a){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,(et&2)!==0){var f=u.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),u.pending=n,n=yu(e),Ah(e,null,a),n}return gu(e,u,n,a),yu(e)}function er(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var u=n.lanes;u&=e.pendingLanes,a|=u,n.lanes=a,j(e,a)}}function Os(e,n){var a=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=v:h=h.next=v,a=a.next}while(a!==null);h===null?f=h=n:h=h.next=n}else f=h=n;a={baseState:u.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:u.shared,callbacks:u.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Ls=!1;function tr(){if(Ls){var e=ii;if(e!==null)throw e}}function nr(e,n,a,u){Ls=!1;var f=e.updateQueue;ql=!1;var h=f.firstBaseUpdate,v=f.lastBaseUpdate,E=f.shared.pending;if(E!==null){f.shared.pending=null;var N=E,G=N.next;N.next=null,v===null?h=G:v.next=G,v=N;var W=e.alternate;W!==null&&(W=W.updateQueue,E=W.lastBaseUpdate,E!==v&&(E===null?W.firstBaseUpdate=G:E.next=G,W.lastBaseUpdate=N))}if(h!==null){var le=f.baseState;v=0,W=G=N=null,E=h;do{var X=E.lane&-536870913,P=X!==E.lane;if(P?(Ve&X)===X:(u&X)===X){X!==0&&X===ai&&(Ls=!0),W!==null&&(W=W.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var Se=e,De=E;X=n;var ut=a;switch(De.tag){case 1:if(Se=De.payload,typeof Se=="function"){le=Se.call(ut,le,X);break e}le=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=De.payload,X=typeof Se=="function"?Se.call(ut,le,X):Se,X==null)break e;le=g({},le,X);break e;case 2:ql=!0}}X=E.callback,X!==null&&(e.flags|=64,P&&(e.flags|=8192),P=f.callbacks,P===null?f.callbacks=[X]:P.push(X))}else P={lane:X,tag:E.tag,payload:E.payload,callback:E.callback,next:null},W===null?(G=W=P,N=le):W=W.next=P,v|=X;if(E=E.next,E===null){if(E=f.shared.pending,E===null)break;P=E,E=P.next,P.next=null,f.lastBaseUpdate=P,f.shared.pending=null}}while(!0);W===null&&(N=le),f.baseState=N,f.firstBaseUpdate=G,f.lastBaseUpdate=W,h===null&&(f.shared.lanes=0),Il|=v,e.lanes=v,e.memoizedState=le}}function Qh(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Xh(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Qh(a[e],n)}var oi=M(null),Au=M(0);function Ih(e,n){e=El,w(Au,e),w(oi,n),El=e|n.baseLanes}function Us(){w(Au,El),w(oi,oi.current)}function Bs(){El=Au.current,I(oi),I(Au)}var dn=M(null),_n=null;function Fl(e){var n=e.alternate;w(wt,wt.current&1),w(dn,e),_n===null&&(n===null||oi.current!==null||n.memoizedState!==null)&&(_n=e)}function Hs(e){w(wt,wt.current),w(dn,e),_n===null&&(_n=e)}function Zh(e){e.tag===22?(w(wt,wt.current),w(dn,e),_n===null&&(_n=e)):Gl()}function Gl(){w(wt,wt.current),w(dn,dn.current)}function hn(e){I(dn),_n===e&&(_n=null),I(wt)}var wt=M(0);function _u(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Qc(a)||Xc(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===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var ml=0,Oe=null,it=null,Tt=null,zu=!1,si=!1,Na=!1,Ru=0,lr=0,ci=null,f1=0;function xt(){throw Error(r(321))}function qs(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!cn(e[a],n[a]))return!1;return!0}function Ys(e,n,a,u,f,h){return ml=h,Oe=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,U.H=e===null||e.memoizedState===null?Dm:nc,Na=!1,h=a(u,f),Na=!1,si&&(h=$h(n,a,u,f)),Kh(e),h}function Kh(e){U.H=rr;var n=it!==null&&it.next!==null;if(ml=0,Tt=it=Oe=null,zu=!1,lr=0,ci=null,n)throw Error(r(300));e===null||At||(e=e.dependencies,e!==null&&xu(e)&&(At=!0))}function $h(e,n,a,u){Oe=e;var f=0;do{if(si&&(ci=null),lr=0,si=!1,25<=f)throw Error(r(301));if(f+=1,Tt=it=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}U.H=jm,h=n(a,u)}while(si);return h}function d1(){var e=U.H,n=e.useState()[0];return n=typeof n.then=="function"?ar(n):n,e=e.useState()[0],(it!==null?it.memoizedState:null)!==e&&(Oe.flags|=1024),n}function Vs(){var e=Ru!==0;return Ru=0,e}function Fs(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function Gs(e){if(zu){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}zu=!1}ml=0,Tt=it=Oe=null,si=!1,lr=Ru=0,ci=null}function Zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?Oe.memoizedState=Tt=e:Tt=Tt.next=e,Tt}function kt(){if(it===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var n=Tt===null?Oe.memoizedState:Tt.next;if(n!==null)Tt=n,it=e;else{if(e===null)throw Oe.alternate===null?Error(r(467)):Error(r(310));it=e,e={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},Tt===null?Oe.memoizedState=Tt=e:Tt=Tt.next=e}return Tt}function Du(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ar(e){var n=lr;return lr+=1,ci===null&&(ci=[]),e=qh(ci,e,n),n=Oe,(Tt===null?n.memoizedState:Tt.next)===null&&(n=n.alternate,U.H=n===null||n.memoizedState===null?Dm:nc),e}function ju(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ar(e);if(e.$$typeof===O)return qt(e)}throw Error(r(438,String(e)))}function Qs(e){var n=null,a=Oe.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var u=Oe.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=Du(),Oe.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),u=0;u<e;u++)a[u]=q;return n.index++,a}function pl(e,n){return typeof n=="function"?n(e):n}function Nu(e){var n=kt();return Xs(n,it,e)}function Xs(e,n,a){var u=e.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var f=e.baseQueue,h=u.pending;if(h!==null){if(f!==null){var v=f.next;f.next=h.next,h.next=v}n.baseQueue=f=h,u.pending=null}if(h=e.baseState,f===null)e.memoizedState=h;else{n=f.next;var E=v=null,N=null,G=n,W=!1;do{var le=G.lane&-536870913;if(le!==G.lane?(Ve&le)===le:(ml&le)===le){var X=G.revertLane;if(X===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),le===ai&&(W=!0);else if((ml&X)===X){G=G.next,X===ai&&(W=!0);continue}else le={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},N===null?(E=N=le,v=h):N=N.next=le,Oe.lanes|=X,Il|=X;le=G.action,Na&&a(h,le),h=G.hasEagerState?G.eagerState:a(h,le)}else X={lane:le,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},N===null?(E=N=X,v=h):N=N.next=X,Oe.lanes|=le,Il|=le;G=G.next}while(G!==null&&G!==n);if(N===null?v=h:N.next=E,!cn(h,e.memoizedState)&&(At=!0,W&&(a=ii,a!==null)))throw a;e.memoizedState=h,e.baseState=v,e.baseQueue=N,u.lastRenderedState=h}return f===null&&(u.lanes=0),[e.memoizedState,u.dispatch]}function Is(e){var n=kt(),a=n.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var u=a.dispatch,f=a.pending,h=n.memoizedState;if(f!==null){a.pending=null;var v=f=f.next;do h=e(h,v.action),v=v.next;while(v!==f);cn(h,n.memoizedState)||(At=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),a.lastRenderedState=h}return[h,u]}function Ph(e,n,a){var u=Oe,f=kt(),h=Ze;if(h){if(a===void 0)throw Error(r(407));a=a()}else a=n();var v=!cn((it||f).memoizedState,a);if(v&&(f.memoizedState=a,At=!0),f=f.queue,$s(em.bind(null,u,f,e),[e]),f.getSnapshot!==n||v||Tt!==null&&Tt.memoizedState.tag&1){if(u.flags|=2048,fi(9,{destroy:void 0},Wh.bind(null,u,f,a,n),null),ot===null)throw Error(r(349));h||(ml&127)!==0||Jh(u,n,a)}return a}function Jh(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=Oe.updateQueue,n===null?(n=Du(),Oe.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function Wh(e,n,a,u){n.value=a,n.getSnapshot=u,tm(n)&&nm(e)}function em(e,n,a){return a(function(){tm(n)&&nm(e)})}function tm(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!cn(e,a)}catch{return!0}}function nm(e){var n=ka(e,2);n!==null&&ln(n,e,2)}function Zs(e){var n=Zt();if(typeof e=="function"){var a=e;if(e=a(),Na){Ut(!0);try{a()}finally{Ut(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:e},n}function lm(e,n,a,u){return e.baseState=a,Xs(e,it,typeof u=="function"?u:pl)}function h1(e,n,a,u,f){if(Lu(e))throw Error(r(485));if(e=n.action,e!==null){var h={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){h.listeners.push(v)}};U.T!==null?a(!0):h.isTransition=!1,u(h),a=n.pending,a===null?(h.next=n.pending=h,am(n,h)):(h.next=a.next,n.pending=a.next=h)}}function am(e,n){var a=n.action,u=n.payload,f=e.state;if(n.isTransition){var h=U.T,v={};U.T=v;try{var E=a(f,u),N=U.S;N!==null&&N(v,E),im(e,n,E)}catch(G){Ks(e,n,G)}finally{h!==null&&v.types!==null&&(h.types=v.types),U.T=h}}else try{h=a(f,u),im(e,n,h)}catch(G){Ks(e,n,G)}}function im(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(u){rm(e,n,u)},function(u){return Ks(e,n,u)}):rm(e,n,a)}function rm(e,n,a){n.status="fulfilled",n.value=a,um(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,am(e,a)))}function Ks(e,n,a){var u=e.pending;if(e.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=a,um(n),n=n.next;while(n!==u)}e.action=null}function um(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function om(e,n){return n}function sm(e,n){if(Ze){var a=ot.formState;if(a!==null){e:{var u=Oe;if(Ze){if(ft){t:{for(var f=ft,h=An;f.nodeType!==8;){if(!h){f=null;break t}if(f=zn(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){ft=zn(f.nextSibling),u=f.data==="F!";break e}}Bl(u)}u=!1}u&&(n=a[0])}}return a=Zt(),a.memoizedState=a.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:om,lastRenderedState:n},a.queue=u,a=_m.bind(null,Oe,u),u.dispatch=a,u=Zs(!1),h=tc.bind(null,Oe,!1,u.queue),u=Zt(),f={state:n,dispatch:null,action:e,pending:null},u.queue=f,a=h1.bind(null,Oe,f,h,a),f.dispatch=a,u.memoizedState=e,[n,a,!1]}function cm(e){var n=kt();return fm(n,it,e)}function fm(e,n,a){if(n=Xs(e,n,om)[0],e=Nu(pl)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=ar(n)}catch(v){throw v===ri?wu:v}else u=n;n=kt();var f=n.queue,h=f.dispatch;return a!==n.memoizedState&&(Oe.flags|=2048,fi(9,{destroy:void 0},m1.bind(null,f,a),null)),[u,h,e]}function m1(e,n){e.action=n}function dm(e){var n=kt(),a=it;if(a!==null)return fm(n,a,e);kt(),n=n.memoizedState,a=kt();var u=a.queue.dispatch;return a.memoizedState=e,[n,u,!1]}function fi(e,n,a,u){return e={tag:e,create:a,deps:u,inst:n,next:null},n=Oe.updateQueue,n===null&&(n=Du(),Oe.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(u=a.next,a.next=e,e.next=u,n.lastEffect=e),e}function hm(){return kt().memoizedState}function Mu(e,n,a,u){var f=Zt();Oe.flags|=e,f.memoizedState=fi(1|n,{destroy:void 0},a,u===void 0?null:u)}function Ou(e,n,a,u){var f=kt();u=u===void 0?null:u;var h=f.memoizedState.inst;it!==null&&u!==null&&qs(u,it.memoizedState.deps)?f.memoizedState=fi(n,h,a,u):(Oe.flags|=e,f.memoizedState=fi(1|n,h,a,u))}function mm(e,n){Mu(8390656,8,e,n)}function $s(e,n){Ou(2048,8,e,n)}function p1(e){Oe.flags|=4;var n=Oe.updateQueue;if(n===null)n=Du(),Oe.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function pm(e){var n=kt().memoizedState;return p1({ref:n,nextImpl:e}),function(){if((et&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function gm(e,n){return Ou(4,2,e,n)}function ym(e,n){return Ou(4,4,e,n)}function vm(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function bm(e,n,a){a=a!=null?a.concat([e]):null,Ou(4,4,vm.bind(null,n,e),a)}function Ps(){}function xm(e,n){var a=kt();n=n===void 0?null:n;var u=a.memoizedState;return n!==null&&qs(n,u[1])?u[0]:(a.memoizedState=[e,n],e)}function Sm(e,n){var a=kt();n=n===void 0?null:n;var u=a.memoizedState;if(n!==null&&qs(n,u[1]))return u[0];if(u=e(),Na){Ut(!0);try{e()}finally{Ut(!1)}}return a.memoizedState=[u,n],u}function Js(e,n,a){return a===void 0||(ml&1073741824)!==0&&(Ve&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=Ep(),Oe.lanes|=e,Il|=e,a)}function Em(e,n,a,u){return cn(a,n)?a:oi.current!==null?(e=Js(e,a,u),cn(e,n)||(At=!0),e):(ml&42)===0||(ml&1073741824)!==0&&(Ve&261930)===0?(At=!0,e.memoizedState=a):(e=Ep(),Oe.lanes|=e,Il|=e,n)}function wm(e,n,a,u,f){var h=J.p;J.p=h!==0&&8>h?h:8;var v=U.T,E={};U.T=E,tc(e,!1,n,a);try{var N=f(),G=U.S;if(G!==null&&G(E,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var W=c1(N,u);ir(e,n,W,gn(e))}else ir(e,n,u,gn(e))}catch(le){ir(e,n,{then:function(){},status:"rejected",reason:le},gn())}finally{J.p=h,v!==null&&E.types!==null&&(v.types=E.types),U.T=v}}function g1(){}function Ws(e,n,a,u){if(e.tag!==5)throw Error(r(476));var f=km(e).queue;wm(e,f,n,se,a===null?g1:function(){return Cm(e),a(u)})}function km(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:se},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Cm(e){var n=km(e);n.next===null&&(n=e.alternate.memoizedState),ir(e,n.next.queue,{},gn())}function ec(){return qt(Er)}function Tm(){return kt().memoizedState}function Am(){return kt().memoizedState}function y1(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=gn();e=Yl(a);var u=Vl(n,e,a);u!==null&&(ln(u,n,a),er(u,n,a)),n={cache:zs()},e.payload=n;return}n=n.return}}function v1(e,n,a){var u=gn();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Lu(e)?zm(n,a):(a=vs(e,n,a,u),a!==null&&(ln(a,e,u),Rm(a,n,u)))}function _m(e,n,a){var u=gn();ir(e,n,a,u)}function ir(e,n,a,u){var f={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Lu(e))zm(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var v=n.lastRenderedState,E=h(v,a);if(f.hasEagerState=!0,f.eagerState=E,cn(E,v))return gu(e,n,f,0),ot===null&&pu(),!1}catch{}if(a=vs(e,n,f,u),a!==null)return ln(a,e,u),Rm(a,n,u),!0}return!1}function tc(e,n,a,u){if(u={lane:2,revertLane:Nc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Lu(e)){if(n)throw Error(r(479))}else n=vs(e,a,u,2),n!==null&&ln(n,e,2)}function Lu(e){var n=e.alternate;return e===Oe||n!==null&&n===Oe}function zm(e,n){si=zu=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function Rm(e,n,a){if((a&4194048)!==0){var u=n.lanes;u&=e.pendingLanes,a|=u,n.lanes=a,j(e,a)}}var rr={readContext:qt,use:ju,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useLayoutEffect:xt,useInsertionEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useSyncExternalStore:xt,useId:xt,useHostTransitionStatus:xt,useFormState:xt,useActionState:xt,useOptimistic:xt,useMemoCache:xt,useCacheRefresh:xt};rr.useEffectEvent=xt;var Dm={readContext:qt,use:ju,useCallback:function(e,n){return Zt().memoizedState=[e,n===void 0?null:n],e},useContext:qt,useEffect:mm,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,Mu(4194308,4,vm.bind(null,n,e),a)},useLayoutEffect:function(e,n){return Mu(4194308,4,e,n)},useInsertionEffect:function(e,n){Mu(4,2,e,n)},useMemo:function(e,n){var a=Zt();n=n===void 0?null:n;var u=e();if(Na){Ut(!0);try{e()}finally{Ut(!1)}}return a.memoizedState=[u,n],u},useReducer:function(e,n,a){var u=Zt();if(a!==void 0){var f=a(n);if(Na){Ut(!0);try{a(n)}finally{Ut(!1)}}}else f=n;return u.memoizedState=u.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},u.queue=e,e=e.dispatch=v1.bind(null,Oe,e),[u.memoizedState,e]},useRef:function(e){var n=Zt();return e={current:e},n.memoizedState=e},useState:function(e){e=Zs(e);var n=e.queue,a=_m.bind(null,Oe,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:Ps,useDeferredValue:function(e,n){var a=Zt();return Js(a,e,n)},useTransition:function(){var e=Zs(!1);return e=wm.bind(null,Oe,e.queue,!0,!1),Zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var u=Oe,f=Zt();if(Ze){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),ot===null)throw Error(r(349));(Ve&127)!==0||Jh(u,n,a)}f.memoizedState=a;var h={value:a,getSnapshot:n};return f.queue=h,mm(em.bind(null,u,h,e),[e]),u.flags|=2048,fi(9,{destroy:void 0},Wh.bind(null,u,h,a,n),null),a},useId:function(){var e=Zt(),n=ot.identifierPrefix;if(Ze){var a=Zn,u=In;a=(u&~(1<<32-tt(u)-1)).toString(32)+a,n="_"+n+"R_"+a,a=Ru++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=f1++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:ec,useFormState:sm,useActionState:sm,useOptimistic:function(e){var n=Zt();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=tc.bind(null,Oe,!0,a),a.dispatch=n,[e,n]},useMemoCache:Qs,useCacheRefresh:function(){return Zt().memoizedState=y1.bind(null,Oe)},useEffectEvent:function(e){var n=Zt(),a={impl:e};return n.memoizedState=a,function(){if((et&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},nc={readContext:qt,use:ju,useCallback:xm,useContext:qt,useEffect:$s,useImperativeHandle:bm,useInsertionEffect:gm,useLayoutEffect:ym,useMemo:Sm,useReducer:Nu,useRef:hm,useState:function(){return Nu(pl)},useDebugValue:Ps,useDeferredValue:function(e,n){var a=kt();return Em(a,it.memoizedState,e,n)},useTransition:function(){var e=Nu(pl)[0],n=kt().memoizedState;return[typeof e=="boolean"?e:ar(e),n]},useSyncExternalStore:Ph,useId:Tm,useHostTransitionStatus:ec,useFormState:cm,useActionState:cm,useOptimistic:function(e,n){var a=kt();return lm(a,it,e,n)},useMemoCache:Qs,useCacheRefresh:Am};nc.useEffectEvent=pm;var jm={readContext:qt,use:ju,useCallback:xm,useContext:qt,useEffect:$s,useImperativeHandle:bm,useInsertionEffect:gm,useLayoutEffect:ym,useMemo:Sm,useReducer:Is,useRef:hm,useState:function(){return Is(pl)},useDebugValue:Ps,useDeferredValue:function(e,n){var a=kt();return it===null?Js(a,e,n):Em(a,it.memoizedState,e,n)},useTransition:function(){var e=Is(pl)[0],n=kt().memoizedState;return[typeof e=="boolean"?e:ar(e),n]},useSyncExternalStore:Ph,useId:Tm,useHostTransitionStatus:ec,useFormState:dm,useActionState:dm,useOptimistic:function(e,n){var a=kt();return it!==null?lm(a,it,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Qs,useCacheRefresh:Am};jm.useEffectEvent=pm;function lc(e,n,a,u){n=e.memoizedState,a=a(u,n),a=a==null?n:g({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var ac={enqueueSetState:function(e,n,a){e=e._reactInternals;var u=gn(),f=Yl(u);f.payload=n,a!=null&&(f.callback=a),n=Vl(e,f,u),n!==null&&(ln(n,e,u),er(n,e,u))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var u=gn(),f=Yl(u);f.tag=1,f.payload=n,a!=null&&(f.callback=a),n=Vl(e,f,u),n!==null&&(ln(n,e,u),er(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=gn(),u=Yl(a);u.tag=2,n!=null&&(u.callback=n),n=Vl(e,u,a),n!==null&&(ln(n,e,a),er(n,e,a))}};function Nm(e,n,a,u,f,h,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(u,h,v):n.prototype&&n.prototype.isPureReactComponent?!Xi(a,u)||!Xi(f,h):!0}function Mm(e,n,a,u){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,u),n.state!==e&&ac.enqueueReplaceState(n,n.state,null)}function Ma(e,n){var a=n;if("ref"in n){a={};for(var u in n)u!=="ref"&&(a[u]=n[u])}if(e=e.defaultProps){a===n&&(a=g({},a));for(var f in e)a[f]===void 0&&(a[f]=e[f])}return a}function Om(e){mu(e)}function Lm(e){console.error(e)}function Um(e){mu(e)}function Uu(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function Bm(e,n,a){try{var u=e.onCaughtError;u(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function ic(e,n,a){return a=Yl(a),a.tag=3,a.payload={element:null},a.callback=function(){Uu(e,n)},a}function Hm(e){return e=Yl(e),e.tag=3,e}function qm(e,n,a,u){var f=a.type.getDerivedStateFromError;if(typeof f=="function"){var h=u.value;e.payload=function(){return f(h)},e.callback=function(){Bm(n,a,u)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){Bm(n,a,u),typeof f!="function"&&(Zl===null?Zl=new Set([this]):Zl.add(this));var E=u.stack;this.componentDidCatch(u.value,{componentStack:E!==null?E:""})})}function b1(e,n,a,u,f){if(a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=a.alternate,n!==null&&li(n,a,f,!0),a=dn.current,a!==null){switch(a.tag){case 31:case 13:return _n===null?Ku():a.alternate===null&&St===0&&(St=3),a.flags&=-257,a.flags|=65536,a.lanes=f,u===ku?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([u]):n.add(u),Rc(e,u,f)),!1;case 22:return a.flags|=65536,u===ku?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([u]):a.add(u)),Rc(e,u,f)),!1}throw Error(r(435,a.tag))}return Rc(e,u,f),Ku(),!1}if(Ze)return n=dn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,u!==ks&&(e=Error(r(422),{cause:u}),Ki(kn(e,a)))):(u!==ks&&(n=Error(r(423),{cause:u}),Ki(kn(n,a))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,u=kn(u,a),f=ic(e.stateNode,u,f),Os(e,f),St!==4&&(St=2)),!1;var h=Error(r(520),{cause:u});if(h=kn(h,a),mr===null?mr=[h]:mr.push(h),St!==4&&(St=2),n===null)return!0;u=kn(u,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=f&-f,a.lanes|=e,e=ic(a.stateNode,u,e),Os(a,e),!1;case 1:if(n=a.type,h=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Zl===null||!Zl.has(h))))return a.flags|=65536,f&=-f,a.lanes|=f,f=Hm(f),qm(f,e,a,u),Os(a,f),!1}a=a.return}while(a!==null);return!1}var rc=Error(r(461)),At=!1;function Yt(e,n,a,u){n.child=e===null?Gh(n,null,a,u):ja(n,e.child,a,u)}function Ym(e,n,a,u,f){a=a.render;var h=n.ref;if("ref"in u){var v={};for(var E in u)E!=="ref"&&(v[E]=u[E])}else v=u;return _a(n),u=Ys(e,n,a,v,h,f),E=Vs(),e!==null&&!At?(Fs(e,n,f),gl(e,n,f)):(Ze&&E&&Es(n),n.flags|=1,Yt(e,n,u,f),n.child)}function Vm(e,n,a,u,f){if(e===null){var h=a.type;return typeof h=="function"&&!bs(h)&&h.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=h,Fm(e,n,h,u,f)):(e=vu(a.type,null,u,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(h=e.child,!mc(e,f)){var v=h.memoizedProps;if(a=a.compare,a=a!==null?a:Xi,a(v,u)&&e.ref===n.ref)return gl(e,n,f)}return n.flags|=1,e=cl(h,u),e.ref=n.ref,e.return=n,n.child=e}function Fm(e,n,a,u,f){if(e!==null){var h=e.memoizedProps;if(Xi(h,u)&&e.ref===n.ref)if(At=!1,n.pendingProps=u=h,mc(e,f))(e.flags&131072)!==0&&(At=!0);else return n.lanes=e.lanes,gl(e,n,f)}return uc(e,n,a,u,f)}function Gm(e,n,a,u){var f=u.children,h=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((n.flags&128)!==0){if(h=h!==null?h.baseLanes|a:a,e!==null){for(u=n.child=e.child,f=0;u!==null;)f=f|u.lanes|u.childLanes,u=u.sibling;u=f&~h}else u=0,n.child=null;return Qm(e,n,h,a,u)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Eu(n,h!==null?h.cachePool:null),h!==null?Ih(n,h):Us(),Zh(n);else return u=n.lanes=536870912,Qm(e,n,h!==null?h.baseLanes|a:a,a,u)}else h!==null?(Eu(n,h.cachePool),Ih(n,h),Gl(),n.memoizedState=null):(e!==null&&Eu(n,null),Us(),Gl());return Yt(e,n,f,a),n.child}function ur(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Qm(e,n,a,u,f){var h=Ds();return h=h===null?null:{parent:Ct._currentValue,pool:h},n.memoizedState={baseLanes:a,cachePool:h},e!==null&&Eu(n,null),Us(),Zh(n),e!==null&&li(e,n,u,!0),n.childLanes=f,null}function Bu(e,n){return n=qu({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Xm(e,n,a){return ja(n,e.child,null,a),e=Bu(n,n.pendingProps),e.flags|=2,hn(n),n.memoizedState=null,e}function x1(e,n,a){var u=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Ze){if(u.mode==="hidden")return e=Bu(n,u),n.lanes=536870912,ur(null,e);if(Hs(n),(e=ft)?(e=ag(e,An),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ll!==null?{id:In,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},a=zh(e),a.return=n,n.child=a,Ht=n,ft=null)):e=null,e===null)throw Bl(n);return n.lanes=536870912,null}return Bu(n,u)}var h=e.memoizedState;if(h!==null){var v=h.dehydrated;if(Hs(n),f)if(n.flags&256)n.flags&=-257,n=Xm(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(At||li(e,n,a,!1),f=(a&e.childLanes)!==0,At||f){if(u=ot,u!==null&&(v=H(u,a),v!==0&&v!==h.retryLane))throw h.retryLane=v,ka(e,v),ln(u,e,v),rc;Ku(),n=Xm(e,n,a)}else e=h.treeContext,ft=zn(v.nextSibling),Ht=n,Ze=!0,Ul=null,An=!1,e!==null&&jh(n,e),n=Bu(n,u),n.flags|=4096;return n}return e=cl(e.child,{mode:u.mode,children:u.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Hu(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function uc(e,n,a,u,f){return _a(n),a=Ys(e,n,a,u,void 0,f),u=Vs(),e!==null&&!At?(Fs(e,n,f),gl(e,n,f)):(Ze&&u&&Es(n),n.flags|=1,Yt(e,n,a,f),n.child)}function Im(e,n,a,u,f,h){return _a(n),n.updateQueue=null,a=$h(n,u,a,f),Kh(e),u=Vs(),e!==null&&!At?(Fs(e,n,h),gl(e,n,h)):(Ze&&u&&Es(n),n.flags|=1,Yt(e,n,a,h),n.child)}function Zm(e,n,a,u,f){if(_a(n),n.stateNode===null){var h=Wa,v=a.contextType;typeof v=="object"&&v!==null&&(h=qt(v)),h=new a(u,h),n.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=ac,n.stateNode=h,h._reactInternals=n,h=n.stateNode,h.props=u,h.state=n.memoizedState,h.refs={},Ns(n),v=a.contextType,h.context=typeof v=="object"&&v!==null?qt(v):Wa,h.state=n.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(lc(n,a,v,u),h.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(v=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),v!==h.state&&ac.enqueueReplaceState(h,h.state,null),nr(n,u,h,f),tr(),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(e===null){h=n.stateNode;var E=n.memoizedProps,N=Ma(a,E);h.props=N;var G=h.context,W=a.contextType;v=Wa,typeof W=="object"&&W!==null&&(v=qt(W));var le=a.getDerivedStateFromProps;W=typeof le=="function"||typeof h.getSnapshotBeforeUpdate=="function",E=n.pendingProps!==E,W||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(E||G!==v)&&Mm(n,h,u,v),ql=!1;var X=n.memoizedState;h.state=X,nr(n,u,h,f),tr(),G=n.memoizedState,E||X!==G||ql?(typeof le=="function"&&(lc(n,a,le,u),G=n.memoizedState),(N=ql||Nm(n,a,N,u,X,G,v))?(W||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(n.flags|=4194308)):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=G),h.props=u,h.state=G,h.context=v,u=N):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{h=n.stateNode,Ms(e,n),v=n.memoizedProps,W=Ma(a,v),h.props=W,le=n.pendingProps,X=h.context,G=a.contextType,N=Wa,typeof G=="object"&&G!==null&&(N=qt(G)),E=a.getDerivedStateFromProps,(G=typeof E=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(v!==le||X!==N)&&Mm(n,h,u,N),ql=!1,X=n.memoizedState,h.state=X,nr(n,u,h,f),tr();var P=n.memoizedState;v!==le||X!==P||ql||e!==null&&e.dependencies!==null&&xu(e.dependencies)?(typeof E=="function"&&(lc(n,a,E,u),P=n.memoizedState),(W=ql||Nm(n,a,W,u,X,P,N)||e!==null&&e.dependencies!==null&&xu(e.dependencies))?(G||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(u,P,N),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(u,P,N)),typeof h.componentDidUpdate=="function"&&(n.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof h.componentDidUpdate!="function"||v===e.memoizedProps&&X===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&X===e.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=P),h.props=u,h.state=P,h.context=N,u=W):(typeof h.componentDidUpdate!="function"||v===e.memoizedProps&&X===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&X===e.memoizedState||(n.flags|=1024),u=!1)}return h=u,Hu(e,n),u=(n.flags&128)!==0,h||u?(h=n.stateNode,a=u&&typeof a.getDerivedStateFromError!="function"?null:h.render(),n.flags|=1,e!==null&&u?(n.child=ja(n,e.child,null,f),n.child=ja(n,null,a,f)):Yt(e,n,a,f),n.memoizedState=h.state,e=n.child):e=gl(e,n,f),e}function Km(e,n,a,u){return Ta(),n.flags|=256,Yt(e,n,a,u),n.child}var oc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sc(e){return{baseLanes:e,cachePool:Bh()}}function cc(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=pn),e}function $m(e,n,a){var u=n.pendingProps,f=!1,h=(n.flags&128)!==0,v;if((v=h)||(v=e!==null&&e.memoizedState===null?!1:(wt.current&2)!==0),v&&(f=!0,n.flags&=-129),v=(n.flags&32)!==0,n.flags&=-33,e===null){if(Ze){if(f?Fl(n):Gl(),(e=ft)?(e=ag(e,An),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ll!==null?{id:In,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},a=zh(e),a.return=n,n.child=a,Ht=n,ft=null)):e=null,e===null)throw Bl(n);return Xc(e)?n.lanes=32:n.lanes=536870912,null}var E=u.children;return u=u.fallback,f?(Gl(),f=n.mode,E=qu({mode:"hidden",children:E},f),u=Ca(u,f,a,null),E.return=n,u.return=n,E.sibling=u,n.child=E,u=n.child,u.memoizedState=sc(a),u.childLanes=cc(e,v,a),n.memoizedState=oc,ur(null,u)):(Fl(n),fc(n,E))}var N=e.memoizedState;if(N!==null&&(E=N.dehydrated,E!==null)){if(h)n.flags&256?(Fl(n),n.flags&=-257,n=dc(e,n,a)):n.memoizedState!==null?(Gl(),n.child=e.child,n.flags|=128,n=null):(Gl(),E=u.fallback,f=n.mode,u=qu({mode:"visible",children:u.children},f),E=Ca(E,f,a,null),E.flags|=2,u.return=n,E.return=n,u.sibling=E,n.child=u,ja(n,e.child,null,a),u=n.child,u.memoizedState=sc(a),u.childLanes=cc(e,v,a),n.memoizedState=oc,n=ur(null,u));else if(Fl(n),Xc(E)){if(v=E.nextSibling&&E.nextSibling.dataset,v)var G=v.dgst;v=G,u=Error(r(419)),u.stack="",u.digest=v,Ki({value:u,source:null,stack:null}),n=dc(e,n,a)}else if(At||li(e,n,a,!1),v=(a&e.childLanes)!==0,At||v){if(v=ot,v!==null&&(u=H(v,a),u!==0&&u!==N.retryLane))throw N.retryLane=u,ka(e,u),ln(v,e,u),rc;Qc(E)||Ku(),n=dc(e,n,a)}else Qc(E)?(n.flags|=192,n.child=e.child,n=null):(e=N.treeContext,ft=zn(E.nextSibling),Ht=n,Ze=!0,Ul=null,An=!1,e!==null&&jh(n,e),n=fc(n,u.children),n.flags|=4096);return n}return f?(Gl(),E=u.fallback,f=n.mode,N=e.child,G=N.sibling,u=cl(N,{mode:"hidden",children:u.children}),u.subtreeFlags=N.subtreeFlags&65011712,G!==null?E=cl(G,E):(E=Ca(E,f,a,null),E.flags|=2),E.return=n,u.return=n,u.sibling=E,n.child=u,ur(null,u),u=n.child,E=e.child.memoizedState,E===null?E=sc(a):(f=E.cachePool,f!==null?(N=Ct._currentValue,f=f.parent!==N?{parent:N,pool:N}:f):f=Bh(),E={baseLanes:E.baseLanes|a,cachePool:f}),u.memoizedState=E,u.childLanes=cc(e,v,a),n.memoizedState=oc,ur(e.child,u)):(Fl(n),a=e.child,e=a.sibling,a=cl(a,{mode:"visible",children:u.children}),a.return=n,a.sibling=null,e!==null&&(v=n.deletions,v===null?(n.deletions=[e],n.flags|=16):v.push(e)),n.child=a,n.memoizedState=null,a)}function fc(e,n){return n=qu({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function qu(e,n){return e=fn(22,e,null,n),e.lanes=0,e}function dc(e,n,a){return ja(n,e.child,null,a),e=fc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Pm(e,n,a){e.lanes|=n;var u=e.alternate;u!==null&&(u.lanes|=n),As(e.return,n,a)}function hc(e,n,a,u,f,h){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:f,treeForkCount:h}:(v.isBackwards=n,v.rendering=null,v.renderingStartTime=0,v.last=u,v.tail=a,v.tailMode=f,v.treeForkCount=h)}function Jm(e,n,a){var u=n.pendingProps,f=u.revealOrder,h=u.tail;u=u.children;var v=wt.current,E=(v&2)!==0;if(E?(v=v&1|2,n.flags|=128):v&=1,w(wt,v),Yt(e,n,u,a),u=Ze?Zi:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Pm(e,a,n);else if(e.tag===19)Pm(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(a=n.child,f=null;a!==null;)e=a.alternate,e!==null&&_u(e)===null&&(f=a),a=a.sibling;a=f,a===null?(f=n.child,n.child=null):(f=a.sibling,a.sibling=null),hc(n,!1,f,a,h,u);break;case"backwards":case"unstable_legacy-backwards":for(a=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&_u(e)===null){n.child=f;break}e=f.sibling,f.sibling=a,a=f,f=e}hc(n,!0,a,null,h,u);break;case"together":hc(n,!1,null,null,void 0,u);break;default:n.memoizedState=null}return n.child}function gl(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),Il|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(li(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,a=cl(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=cl(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function mc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&xu(e)))}function S1(e,n,a){switch(n.tag){case 3:pe(n,n.stateNode.containerInfo),Hl(n,Ct,e.memoizedState.cache),Ta();break;case 27:case 5:Dt(n);break;case 4:pe(n,n.stateNode.containerInfo);break;case 10:Hl(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Hs(n),null;break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(Fl(n),n.flags|=128,null):(a&n.child.childLanes)!==0?$m(e,n,a):(Fl(n),e=gl(e,n,a),e!==null?e.sibling:null);Fl(n);break;case 19:var f=(e.flags&128)!==0;if(u=(a&n.childLanes)!==0,u||(li(e,n,a,!1),u=(a&n.childLanes)!==0),f){if(u)return Jm(e,n,a);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),w(wt,wt.current),u)break;return null;case 22:return n.lanes=0,Gm(e,n,a,n.pendingProps);case 24:Hl(n,Ct,e.memoizedState.cache)}return gl(e,n,a)}function Wm(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)At=!0;else{if(!mc(e,a)&&(n.flags&128)===0)return At=!1,S1(e,n,a);At=(e.flags&131072)!==0}else At=!1,Ze&&(n.flags&1048576)!==0&&Dh(n,Zi,n.index);switch(n.lanes=0,n.tag){case 16:e:{var u=n.pendingProps;if(e=Ra(n.elementType),n.type=e,typeof e=="function")bs(e)?(u=Ma(e,u),n.tag=1,n=Zm(null,n,e,u,a)):(n.tag=0,n=uc(null,n,e,u,a));else{if(e!=null){var f=e.$$typeof;if(f===ee){n.tag=11,n=Ym(null,n,e,u,a);break e}else if(f===D){n.tag=14,n=Vm(null,n,e,u,a);break e}}throw n=ue(e)||e,Error(r(306,n,""))}}return n;case 0:return uc(e,n,n.type,n.pendingProps,a);case 1:return u=n.type,f=Ma(u,n.pendingProps),Zm(e,n,u,f,a);case 3:e:{if(pe(n,n.stateNode.containerInfo),e===null)throw Error(r(387));u=n.pendingProps;var h=n.memoizedState;f=h.element,Ms(e,n),nr(n,u,null,a);var v=n.memoizedState;if(u=v.cache,Hl(n,Ct,u),u!==h.cache&&_s(n,[Ct],a,!0),tr(),u=v.element,h.isDehydrated)if(h={element:u,isDehydrated:!1,cache:v.cache},n.updateQueue.baseState=h,n.memoizedState=h,n.flags&256){n=Km(e,n,u,a);break e}else if(u!==f){f=kn(Error(r(424)),n),Ki(f),n=Km(e,n,u,a);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ft=zn(e.firstChild),Ht=n,Ze=!0,Ul=null,An=!0,a=Gh(n,null,u,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Ta(),u===f){n=gl(e,n,a);break e}Yt(e,n,u,a)}n=n.child}return n;case 26:return Hu(e,n),e===null?(a=cg(n.type,null,n.pendingProps,null))?n.memoizedState=a:Ze||(a=n.type,e=n.pendingProps,u=no(be.current).createElement(a),u[ge]=n,u[ve]=e,Vt(u,a,e),ht(u),n.stateNode=u):n.memoizedState=cg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Dt(n),e===null&&Ze&&(u=n.stateNode=ug(n.type,n.pendingProps,be.current),Ht=n,An=!0,f=ft,Jl(n.type)?(Ic=f,ft=zn(u.firstChild)):ft=f),Yt(e,n,n.pendingProps.children,a),Hu(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Ze&&((f=u=ft)&&(u=P1(u,n.type,n.pendingProps,An),u!==null?(n.stateNode=u,Ht=n,ft=zn(u.firstChild),An=!1,f=!0):f=!1),f||Bl(n)),Dt(n),f=n.type,h=n.pendingProps,v=e!==null?e.memoizedProps:null,u=h.children,Vc(f,h)?u=null:v!==null&&Vc(f,v)&&(n.flags|=32),n.memoizedState!==null&&(f=Ys(e,n,d1,null,null,a),Er._currentValue=f),Hu(e,n),Yt(e,n,u,a),n.child;case 6:return e===null&&Ze&&((e=a=ft)&&(a=J1(a,n.pendingProps,An),a!==null?(n.stateNode=a,Ht=n,ft=null,e=!0):e=!1),e||Bl(n)),null;case 13:return $m(e,n,a);case 4:return pe(n,n.stateNode.containerInfo),u=n.pendingProps,e===null?n.child=ja(n,null,u,a):Yt(e,n,u,a),n.child;case 11:return Ym(e,n,n.type,n.pendingProps,a);case 7:return Yt(e,n,n.pendingProps,a),n.child;case 8:return Yt(e,n,n.pendingProps.children,a),n.child;case 12:return Yt(e,n,n.pendingProps.children,a),n.child;case 10:return u=n.pendingProps,Hl(n,n.type,u.value),Yt(e,n,u.children,a),n.child;case 9:return f=n.type._context,u=n.pendingProps.children,_a(n),f=qt(f),u=u(f),n.flags|=1,Yt(e,n,u,a),n.child;case 14:return Vm(e,n,n.type,n.pendingProps,a);case 15:return Fm(e,n,n.type,n.pendingProps,a);case 19:return Jm(e,n,a);case 31:return x1(e,n,a);case 22:return Gm(e,n,a,n.pendingProps);case 24:return _a(n),u=qt(Ct),e===null?(f=Ds(),f===null&&(f=ot,h=zs(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=a),f=h),n.memoizedState={parent:u,cache:f},Ns(n),Hl(n,Ct,f)):((e.lanes&a)!==0&&(Ms(e,n),nr(n,null,null,a),tr()),f=e.memoizedState,h=n.memoizedState,f.parent!==u?(f={parent:u,cache:u},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),Hl(n,Ct,u)):(u=h.cache,Hl(n,Ct,u),u!==f.cache&&_s(n,[Ct],a,!0))),Yt(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function yl(e){e.flags|=4}function pc(e,n,a,u,f){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Tp())e.flags|=8192;else throw Da=ku,js}else e.flags&=-16777217}function ep(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!pg(n))if(Tp())e.flags|=8192;else throw Da=ku,js}function Yu(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?ya():536870912,e.lanes|=n,pi|=n)}function or(e,n){if(!Ze)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:u.sibling=null}}function dt(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,u=0;if(n)for(var f=e.child;f!==null;)a|=f.lanes|f.childLanes,u|=f.subtreeFlags&65011712,u|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)a|=f.lanes|f.childLanes,u|=f.subtreeFlags,u|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=u,e.childLanes=a,n}function E1(e,n,a){var u=n.pendingProps;switch(ws(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,u=null,e!==null&&(u=e.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),hl(Ct),Re(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(ni(n)?yl(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Cs())),dt(n),null;case 26:var f=n.type,h=n.memoizedState;return e===null?(yl(n),h!==null?(dt(n),ep(n,h)):(dt(n),pc(n,f,null,u,a))):h?h!==e.memoizedState?(yl(n),dt(n),ep(n,h)):(dt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==u&&yl(n),dt(n),pc(n,f,e,u,a)),null;case 27:if(Ln(n),a=be.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&yl(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return dt(n),null}e=ae.current,ni(n)?Nh(n):(e=ug(f,u,a),n.stateNode=e,yl(n))}return dt(n),null;case 5:if(Ln(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&yl(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return dt(n),null}if(h=ae.current,ni(n))Nh(n);else{var v=no(be.current);switch(h){case 1:h=v.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=v.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=v.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof u.is=="string"?v.createElement("select",{is:u.is}):v.createElement("select"),u.multiple?h.multiple=!0:u.size&&(h.size=u.size);break;default:h=typeof u.is=="string"?v.createElement(f,{is:u.is}):v.createElement(f)}}h[ge]=n,h[ve]=u;e:for(v=n.child;v!==null;){if(v.tag===5||v.tag===6)h.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===n)break e;for(;v.sibling===null;){if(v.return===null||v.return===n)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}n.stateNode=h;e:switch(Vt(h,f,u),f){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&yl(n)}}return dt(n),pc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==u&&yl(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(r(166));if(e=be.current,ni(n)){if(e=n.stateNode,a=n.memoizedProps,u=null,f=Ht,f!==null)switch(f.tag){case 27:case 5:u=f.memoizedProps}e[ge]=n,e=!!(e.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||$p(e.nodeValue,a)),e||Bl(n,!0)}else e=no(e).createTextNode(u),e[ge]=n,n.stateNode=e}return dt(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(u=ni(n),a!==null){if(e===null){if(!u)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[ge]=n}else Ta(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),e=!1}else a=Cs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(hn(n),n):(hn(n),null);if((n.flags&128)!==0)throw Error(r(558))}return dt(n),null;case 13:if(u=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=ni(n),u!==null&&u.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[ge]=n}else Ta(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),f=!1}else f=Cs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(hn(n),n):(hn(n),null)}return hn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=u!==null,e=e!==null&&e.memoizedState!==null,a&&(u=n.child,f=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(f=u.alternate.memoizedState.cachePool.pool),h=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(h=u.memoizedState.cachePool.pool),h!==f&&(u.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),Yu(n,n.updateQueue),dt(n),null);case 4:return Re(),e===null&&Uc(n.stateNode.containerInfo),dt(n),null;case 10:return hl(n.type),dt(n),null;case 19:if(I(wt),u=n.memoizedState,u===null)return dt(n),null;if(f=(n.flags&128)!==0,h=u.rendering,h===null)if(f)or(u,!1);else{if(St!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=_u(e),h!==null){for(n.flags|=128,or(u,!1),e=h.updateQueue,n.updateQueue=e,Yu(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)_h(a,e),a=a.sibling;return w(wt,wt.current&1|2),Ze&&fl(n,u.treeForkCount),n.child}e=e.sibling}u.tail!==null&&pt()>Xu&&(n.flags|=128,f=!0,or(u,!1),n.lanes=4194304)}else{if(!f)if(e=_u(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,Yu(n,e),or(u,!0),u.tail===null&&u.tailMode==="hidden"&&!h.alternate&&!Ze)return dt(n),null}else 2*pt()-u.renderingStartTime>Xu&&a!==536870912&&(n.flags|=128,f=!0,or(u,!1),n.lanes=4194304);u.isBackwards?(h.sibling=n.child,n.child=h):(e=u.last,e!==null?e.sibling=h:n.child=h,u.last=h)}return u.tail!==null?(e=u.tail,u.rendering=e,u.tail=e.sibling,u.renderingStartTime=pt(),e.sibling=null,a=wt.current,w(wt,f?a&1|2:a&1),Ze&&fl(n,u.treeForkCount),e):(dt(n),null);case 22:case 23:return hn(n),Bs(),u=n.memoizedState!==null,e!==null?e.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(a&536870912)!==0&&(n.flags&128)===0&&(dt(n),n.subtreeFlags&6&&(n.flags|=8192)):dt(n),a=n.updateQueue,a!==null&&Yu(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==a&&(n.flags|=2048),e!==null&&I(za),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),hl(Ct),dt(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function w1(e,n){switch(ws(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return hl(Ct),Re(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ln(n),null;case 31:if(n.memoizedState!==null){if(hn(n),n.alternate===null)throw Error(r(340));Ta()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(hn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Ta()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return I(wt),null;case 4:return Re(),null;case 10:return hl(n.type),null;case 22:case 23:return hn(n),Bs(),e!==null&&I(za),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return hl(Ct),null;case 25:return null;default:return null}}function tp(e,n){switch(ws(n),n.tag){case 3:hl(Ct),Re();break;case 26:case 27:case 5:Ln(n);break;case 4:Re();break;case 31:n.memoizedState!==null&&hn(n);break;case 13:hn(n);break;case 19:I(wt);break;case 10:hl(n.type);break;case 22:case 23:hn(n),Bs(),e!==null&&I(za);break;case 24:hl(Ct)}}function sr(e,n){try{var a=n.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var f=u.next;a=f;do{if((a.tag&e)===e){u=void 0;var h=a.create,v=a.inst;u=h(),v.destroy=u}a=a.next}while(a!==f)}}catch(E){at(n,n.return,E)}}function Ql(e,n,a){try{var u=n.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var h=f.next;u=h;do{if((u.tag&e)===e){var v=u.inst,E=v.destroy;if(E!==void 0){v.destroy=void 0,f=n;var N=a,G=E;try{G()}catch(W){at(f,N,W)}}}u=u.next}while(u!==h)}}catch(W){at(n,n.return,W)}}function np(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Xh(n,a)}catch(u){at(e,e.return,u)}}}function lp(e,n,a){a.props=Ma(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(u){at(e,n,u)}}function cr(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var u=e.stateNode;break;case 30:u=e.stateNode;break;default:u=e.stateNode}typeof a=="function"?e.refCleanup=a(u):a.current=u}}catch(f){at(e,n,f)}}function Kn(e,n){var a=e.ref,u=e.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(f){at(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(f){at(e,n,f)}else a.current=null}function ap(e){var n=e.type,a=e.memoizedProps,u=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break e;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(f){at(e,e.return,f)}}function gc(e,n,a){try{var u=e.stateNode;Q1(u,e.type,a,n),u[ve]=n}catch(f){at(e,e.return,f)}}function ip(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Jl(e.type)||e.tag===4}function yc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ip(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Jl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function vc(e,n,a){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=ol));else if(u!==4&&(u===27&&Jl(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(vc(e,n,a),e=e.sibling;e!==null;)vc(e,n,a),e=e.sibling}function Vu(e,n,a){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(u!==4&&(u===27&&Jl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Vu(e,n,a),e=e.sibling;e!==null;)Vu(e,n,a),e=e.sibling}function rp(e){var n=e.stateNode,a=e.memoizedProps;try{for(var u=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Vt(n,u,a),n[ge]=e,n[ve]=a}catch(h){at(e,e.return,h)}}var vl=!1,_t=!1,bc=!1,up=typeof WeakSet=="function"?WeakSet:Set,Ot=null;function k1(e,n){if(e=e.containerInfo,qc=so,e=bh(e),ds(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var f=u.anchorOffset,h=u.focusNode;u=u.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break e}var v=0,E=-1,N=-1,G=0,W=0,le=e,X=null;t:for(;;){for(var P;le!==a||f!==0&&le.nodeType!==3||(E=v+f),le!==h||u!==0&&le.nodeType!==3||(N=v+u),le.nodeType===3&&(v+=le.nodeValue.length),(P=le.firstChild)!==null;)X=le,le=P;for(;;){if(le===e)break t;if(X===a&&++G===f&&(E=v),X===h&&++W===u&&(N=v),(P=le.nextSibling)!==null)break;le=X,X=le.parentNode}le=P}a=E===-1||N===-1?null:{start:E,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(Yc={focusedElem:e,selectionRange:a},so=!1,Ot=n;Ot!==null;)if(n=Ot,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Ot=e;else for(;Ot!==null;){switch(n=Ot,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)f=e[a],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,a=n,f=h.memoizedProps,h=h.memoizedState,u=a.stateNode;try{var Se=Ma(a.type,f);e=u.getSnapshotBeforeUpdate(Se,h),u.__reactInternalSnapshotBeforeUpdate=e}catch(De){at(a,a.return,De)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)Gc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Gc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=n.sibling,e!==null){e.return=n.return,Ot=e;break}Ot=n.return}}function op(e,n,a){var u=a.flags;switch(a.tag){case 0:case 11:case 15:xl(e,a),u&4&&sr(5,a);break;case 1:if(xl(e,a),u&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(v){at(a,a.return,v)}else{var f=Ma(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(v){at(a,a.return,v)}}u&64&&np(a),u&512&&cr(a,a.return);break;case 3:if(xl(e,a),u&64&&(e=a.updateQueue,e!==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{Xh(e,n)}catch(v){at(a,a.return,v)}}break;case 27:n===null&&u&4&&rp(a);case 26:case 5:xl(e,a),n===null&&u&4&&ap(a),u&512&&cr(a,a.return);break;case 12:xl(e,a);break;case 31:xl(e,a),u&4&&fp(e,a);break;case 13:xl(e,a),u&4&&dp(e,a),u&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=N1.bind(null,a),W1(e,a))));break;case 22:if(u=a.memoizedState!==null||vl,!u){n=n!==null&&n.memoizedState!==null||_t,f=vl;var h=_t;vl=u,(_t=n)&&!h?Sl(e,a,(a.subtreeFlags&8772)!==0):xl(e,a),vl=f,_t=h}break;case 30:break;default:xl(e,a)}}function sp(e){var n=e.alternate;n!==null&&(e.alternate=null,sp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&vt(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var mt=null,Wt=!1;function bl(e,n,a){for(a=a.child;a!==null;)cp(e,n,a),a=a.sibling}function cp(e,n,a){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Lt,a)}catch{}switch(a.tag){case 26:_t||Kn(a,n),bl(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:_t||Kn(a,n);var u=mt,f=Wt;Jl(a.type)&&(mt=a.stateNode,Wt=!1),bl(e,n,a),br(a.stateNode),mt=u,Wt=f;break;case 5:_t||Kn(a,n);case 6:if(u=mt,f=Wt,mt=null,bl(e,n,a),mt=u,Wt=f,mt!==null)if(Wt)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(a.stateNode)}catch(h){at(a,n,h)}else try{mt.removeChild(a.stateNode)}catch(h){at(a,n,h)}break;case 18:mt!==null&&(Wt?(e=mt,ng(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),wi(e)):ng(mt,a.stateNode));break;case 4:u=mt,f=Wt,mt=a.stateNode.containerInfo,Wt=!0,bl(e,n,a),mt=u,Wt=f;break;case 0:case 11:case 14:case 15:Ql(2,a,n),_t||Ql(4,a,n),bl(e,n,a);break;case 1:_t||(Kn(a,n),u=a.stateNode,typeof u.componentWillUnmount=="function"&&lp(a,n,u)),bl(e,n,a);break;case 21:bl(e,n,a);break;case 22:_t=(u=_t)||a.memoizedState!==null,bl(e,n,a),_t=u;break;default:bl(e,n,a)}}function fp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wi(e)}catch(a){at(n,n.return,a)}}}function dp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wi(e)}catch(a){at(n,n.return,a)}}function C1(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new up),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new up),n;default:throw Error(r(435,e.tag))}}function Fu(e,n){var a=C1(e);n.forEach(function(u){if(!a.has(u)){a.add(u);var f=M1.bind(null,e,u);u.then(f,f)}})}function en(e,n){var a=n.deletions;if(a!==null)for(var u=0;u<a.length;u++){var f=a[u],h=e,v=n,E=v;e:for(;E!==null;){switch(E.tag){case 27:if(Jl(E.type)){mt=E.stateNode,Wt=!1;break e}break;case 5:mt=E.stateNode,Wt=!1;break e;case 3:case 4:mt=E.stateNode.containerInfo,Wt=!0;break e}E=E.return}if(mt===null)throw Error(r(160));cp(h,v,f),mt=null,Wt=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)hp(n,e),n=n.sibling}var Fn=null;function hp(e,n){var a=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:en(n,e),tn(e),u&4&&(Ql(3,e,e.return),sr(3,e),Ql(5,e,e.return));break;case 1:en(n,e),tn(e),u&512&&(_t||a===null||Kn(a,a.return)),u&64&&vl&&(e=e.updateQueue,e!==null&&(u=e.callbacks,u!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?u:a.concat(u))));break;case 26:var f=Fn;if(en(n,e),tn(e),u&512&&(_t||a===null||Kn(a,a.return)),u&4){var h=a!==null?a.memoizedState:null;if(u=e.memoizedState,a===null)if(u===null)if(e.stateNode===null){e:{u=e.type,a=e.memoizedProps,f=f.ownerDocument||f;t:switch(u){case"title":h=f.getElementsByTagName("title")[0],(!h||h[gt]||h[ge]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(u),f.head.insertBefore(h,f.querySelector("head > title"))),Vt(h,u,a),h[ge]=e,ht(h),u=h;break e;case"link":var v=hg("link","href",f).get(u+(a.href||""));if(v){for(var E=0;E<v.length;E++)if(h=v[E],h.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&h.getAttribute("rel")===(a.rel==null?null:a.rel)&&h.getAttribute("title")===(a.title==null?null:a.title)&&h.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(E,1);break t}}h=f.createElement(u),Vt(h,u,a),f.head.appendChild(h);break;case"meta":if(v=hg("meta","content",f).get(u+(a.content||""))){for(E=0;E<v.length;E++)if(h=v[E],h.getAttribute("content")===(a.content==null?null:""+a.content)&&h.getAttribute("name")===(a.name==null?null:a.name)&&h.getAttribute("property")===(a.property==null?null:a.property)&&h.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&h.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(E,1);break t}}h=f.createElement(u),Vt(h,u,a),f.head.appendChild(h);break;default:throw Error(r(468,u))}h[ge]=e,ht(h),u=h}e.stateNode=u}else mg(f,e.type,e.stateNode);else e.stateNode=dg(f,u,e.memoizedProps);else h!==u?(h===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):h.count--,u===null?mg(f,e.type,e.stateNode):dg(f,u,e.memoizedProps)):u===null&&e.stateNode!==null&&gc(e,e.memoizedProps,a.memoizedProps)}break;case 27:en(n,e),tn(e),u&512&&(_t||a===null||Kn(a,a.return)),a!==null&&u&4&&gc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(en(n,e),tn(e),u&512&&(_t||a===null||Kn(a,a.return)),e.flags&32){f=e.stateNode;try{Xa(f,"")}catch(Se){at(e,e.return,Se)}}u&4&&e.stateNode!=null&&(f=e.memoizedProps,gc(e,f,a!==null?a.memoizedProps:f)),u&1024&&(bc=!0);break;case 6:if(en(n,e),tn(e),u&4){if(e.stateNode===null)throw Error(r(162));u=e.memoizedProps,a=e.stateNode;try{a.nodeValue=u}catch(Se){at(e,e.return,Se)}}break;case 3:if(io=null,f=Fn,Fn=lo(n.containerInfo),en(n,e),Fn=f,tn(e),u&4&&a!==null&&a.memoizedState.isDehydrated)try{wi(n.containerInfo)}catch(Se){at(e,e.return,Se)}bc&&(bc=!1,mp(e));break;case 4:u=Fn,Fn=lo(e.stateNode.containerInfo),en(n,e),tn(e),Fn=u;break;case 12:en(n,e),tn(e);break;case 31:en(n,e),tn(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Fu(e,u)));break;case 13:en(n,e),tn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Qu=pt()),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Fu(e,u)));break;case 22:f=e.memoizedState!==null;var N=a!==null&&a.memoizedState!==null,G=vl,W=_t;if(vl=G||f,_t=W||N,en(n,e),_t=W,vl=G,tn(e),u&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(a===null||N||vl||_t||Oa(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){N=a=n;try{if(h=N.stateNode,f)v=h.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{E=N.stateNode;var le=N.memoizedProps.style,X=le!=null&&le.hasOwnProperty("display")?le.display:null;E.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(Se){at(N,N.return,Se)}}}else if(n.tag===6){if(a===null){N=n;try{N.stateNode.nodeValue=f?"":N.memoizedProps}catch(Se){at(N,N.return,Se)}}}else if(n.tag===18){if(a===null){N=n;try{var P=N.stateNode;f?lg(P,!0):lg(N.stateNode,!1)}catch(Se){at(N,N.return,Se)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=e.updateQueue,u!==null&&(a=u.retryQueue,a!==null&&(u.retryQueue=null,Fu(e,a))));break;case 19:en(n,e),tn(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Fu(e,u)));break;case 30:break;case 21:break;default:en(n,e),tn(e)}}function tn(e){var n=e.flags;if(n&2){try{for(var a,u=e.return;u!==null;){if(ip(u)){a=u;break}u=u.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var f=a.stateNode,h=yc(e);Vu(e,h,f);break;case 5:var v=a.stateNode;a.flags&32&&(Xa(v,""),a.flags&=-33);var E=yc(e);Vu(e,E,v);break;case 3:case 4:var N=a.stateNode.containerInfo,G=yc(e);vc(e,G,N);break;default:throw Error(r(161))}}catch(W){at(e,e.return,W)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function mp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;mp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function xl(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)op(e,n.alternate,n),n=n.sibling}function Oa(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Ql(4,n,n.return),Oa(n);break;case 1:Kn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&lp(n,n.return,a),Oa(n);break;case 27:br(n.stateNode);case 26:case 5:Kn(n,n.return),Oa(n);break;case 22:n.memoizedState===null&&Oa(n);break;case 30:Oa(n);break;default:Oa(n)}e=e.sibling}}function Sl(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,f=e,h=n,v=h.flags;switch(h.tag){case 0:case 11:case 15:Sl(f,h,a),sr(4,h);break;case 1:if(Sl(f,h,a),u=h,f=u.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(G){at(u,u.return,G)}if(u=h,f=u.updateQueue,f!==null){var E=u.stateNode;try{var N=f.shared.hiddenCallbacks;if(N!==null)for(f.shared.hiddenCallbacks=null,f=0;f<N.length;f++)Qh(N[f],E)}catch(G){at(u,u.return,G)}}a&&v&64&&np(h),cr(h,h.return);break;case 27:rp(h);case 26:case 5:Sl(f,h,a),a&&u===null&&v&4&&ap(h),cr(h,h.return);break;case 12:Sl(f,h,a);break;case 31:Sl(f,h,a),a&&v&4&&fp(f,h);break;case 13:Sl(f,h,a),a&&v&4&&dp(f,h);break;case 22:h.memoizedState===null&&Sl(f,h,a),cr(h,h.return);break;case 30:break;default:Sl(f,h,a)}n=n.sibling}}function xc(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&$i(a))}function Sc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&$i(e))}function Gn(e,n,a,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)pp(e,n,a,u),n=n.sibling}function pp(e,n,a,u){var f=n.flags;switch(n.tag){case 0:case 11:case 15:Gn(e,n,a,u),f&2048&&sr(9,n);break;case 1:Gn(e,n,a,u);break;case 3:Gn(e,n,a,u),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&$i(e)));break;case 12:if(f&2048){Gn(e,n,a,u),e=n.stateNode;try{var h=n.memoizedProps,v=h.id,E=h.onPostCommit;typeof E=="function"&&E(v,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){at(n,n.return,N)}}else Gn(e,n,a,u);break;case 31:Gn(e,n,a,u);break;case 13:Gn(e,n,a,u);break;case 23:break;case 22:h=n.stateNode,v=n.alternate,n.memoizedState!==null?h._visibility&2?Gn(e,n,a,u):fr(e,n):h._visibility&2?Gn(e,n,a,u):(h._visibility|=2,di(e,n,a,u,(n.subtreeFlags&10256)!==0||!1)),f&2048&&xc(v,n);break;case 24:Gn(e,n,a,u),f&2048&&Sc(n.alternate,n);break;default:Gn(e,n,a,u)}}function di(e,n,a,u,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var h=e,v=n,E=a,N=u,G=v.flags;switch(v.tag){case 0:case 11:case 15:di(h,v,E,N,f),sr(8,v);break;case 23:break;case 22:var W=v.stateNode;v.memoizedState!==null?W._visibility&2?di(h,v,E,N,f):fr(h,v):(W._visibility|=2,di(h,v,E,N,f)),f&&G&2048&&xc(v.alternate,v);break;case 24:di(h,v,E,N,f),f&&G&2048&&Sc(v.alternate,v);break;default:di(h,v,E,N,f)}n=n.sibling}}function fr(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,u=n,f=u.flags;switch(u.tag){case 22:fr(a,u),f&2048&&xc(u.alternate,u);break;case 24:fr(a,u),f&2048&&Sc(u.alternate,u);break;default:fr(a,u)}n=n.sibling}}var dr=8192;function hi(e,n,a){if(e.subtreeFlags&dr)for(e=e.child;e!==null;)gp(e,n,a),e=e.sibling}function gp(e,n,a){switch(e.tag){case 26:hi(e,n,a),e.flags&dr&&e.memoizedState!==null&&fx(a,Fn,e.memoizedState,e.memoizedProps);break;case 5:hi(e,n,a);break;case 3:case 4:var u=Fn;Fn=lo(e.stateNode.containerInfo),hi(e,n,a),Fn=u;break;case 22:e.memoizedState===null&&(u=e.alternate,u!==null&&u.memoizedState!==null?(u=dr,dr=16777216,hi(e,n,a),dr=u):hi(e,n,a));break;default:hi(e,n,a)}}function yp(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function hr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var u=n[a];Ot=u,bp(u,e)}yp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)vp(e),e=e.sibling}function vp(e){switch(e.tag){case 0:case 11:case 15:hr(e),e.flags&2048&&Ql(9,e,e.return);break;case 3:hr(e);break;case 12:hr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Gu(e)):hr(e);break;default:hr(e)}}function Gu(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var u=n[a];Ot=u,bp(u,e)}yp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Ql(8,n,n.return),Gu(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,Gu(n));break;default:Gu(n)}e=e.sibling}}function bp(e,n){for(;Ot!==null;){var a=Ot;switch(a.tag){case 0:case 11:case 15:Ql(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var u=a.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:$i(a.memoizedState.cache)}if(u=a.child,u!==null)u.return=a,Ot=u;else e:for(a=e;Ot!==null;){u=Ot;var f=u.sibling,h=u.return;if(sp(u),u===a){Ot=null;break e}if(f!==null){f.return=h,Ot=f;break e}Ot=h}}}var T1={getCacheForType:function(e){var n=qt(Ct),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return qt(Ct).controller.signal}},A1=typeof WeakMap=="function"?WeakMap:Map,et=0,ot=null,He=null,Ve=0,lt=0,mn=null,Xl=!1,mi=!1,Ec=!1,El=0,St=0,Il=0,La=0,wc=0,pn=0,pi=0,mr=null,nn=null,kc=!1,Qu=0,xp=0,Xu=1/0,Iu=null,Zl=null,jt=0,Kl=null,gi=null,wl=0,Cc=0,Tc=null,Sp=null,pr=0,Ac=null;function gn(){return(et&2)!==0&&Ve!==0?Ve&-Ve:U.T!==null?Nc():he()}function Ep(){if(pn===0)if((Ve&536870912)===0||Ze){var e=ma;ma<<=1,(ma&3932160)===0&&(ma=262144),pn=e}else pn=536870912;return e=dn.current,e!==null&&(e.flags|=32),pn}function ln(e,n,a){(e===ot&&(lt===2||lt===9)||e.cancelPendingCommit!==null)&&(yi(e,0),$l(e,Ve,pn,!1)),Ml(e,a),((et&2)===0||e!==ot)&&(e===ot&&((et&2)===0&&(La|=a),St===4&&$l(e,Ve,pn,!1)),$n(e))}function wp(e,n,a){if((et&6)!==0)throw Error(r(327));var u=!a&&(n&127)===0&&(n&e.expiredLanes)===0||ga(e,n),f=u?R1(e,n):zc(e,n,!0),h=u;do{if(f===0){mi&&!u&&$l(e,n,0,!1);break}else{if(a=e.current.alternate,h&&!_1(a)){f=zc(e,n,!1),h=!1;continue}if(f===2){if(h=n,e.errorRecoveryDisabledLanes&h)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){n=v;e:{var E=e;f=mr;var N=E.current.memoizedState.isDehydrated;if(N&&(yi(E,v).flags|=256),v=zc(E,v,!1),v!==2){if(Ec&&!N){E.errorRecoveryDisabledLanes|=h,La|=h,f=4;break e}h=nn,nn=f,h!==null&&(nn===null?nn=h:nn.push.apply(nn,h))}f=v}if(h=!1,f!==2)continue}}if(f===1){yi(e,0),$l(e,n,0,!0);break}e:{switch(u=e,h=f,h){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:$l(u,n,pn,!Xl);break e;case 2:nn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(f=Qu+300-pt(),10<f)){if($l(u,n,pn,!Xl),pa(u,0,!0)!==0)break e;wl=n,u.timeoutHandle=eg(kp.bind(null,u,a,nn,Iu,kc,n,pn,La,pi,Xl,h,"Throttled",-0,0),f);break e}kp(u,a,nn,Iu,kc,n,pn,La,pi,Xl,h,null,-0,0)}}break}while(!0);$n(e)}function kp(e,n,a,u,f,h,v,E,N,G,W,le,X,P){if(e.timeoutHandle=-1,le=n.subtreeFlags,le&8192||(le&16785408)===16785408){le={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ol},gp(n,h,le);var Se=(h&62914560)===h?Qu-pt():(h&4194048)===h?xp-pt():0;if(Se=dx(le,Se),Se!==null){wl=h,e.cancelPendingCommit=Se(jp.bind(null,e,n,h,a,u,f,v,E,N,W,le,null,X,P)),$l(e,h,v,!G);return}}jp(e,n,h,a,u,f,v,E,N)}function _1(e){for(var n=e;;){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 u=0;u<a.length;u++){var f=a[u],h=f.getSnapshot;f=f.value;try{if(!cn(h(),f))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function $l(e,n,a,u){n&=~wc,n&=~La,e.suspendedLanes|=n,e.pingedLanes&=~n,u&&(e.warmLanes|=n),u=e.expirationTimes;for(var f=n;0<f;){var h=31-tt(f),v=1<<h;u[h]=-1,f&=~v}a!==0&&au(e,a,n)}function Zu(){return(et&6)===0?(gr(0),!1):!0}function _c(){if(He!==null){if(lt===0)var e=He.return;else e=He,dl=Aa=null,Gs(e),ui=null,Ji=0,e=He;for(;e!==null;)tp(e.alternate,e),e=e.return;He=null}}function yi(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Z1(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),wl=0,_c(),ot=e,He=a=cl(e.current,null),Ve=n,lt=0,mn=null,Xl=!1,mi=ga(e,n),Ec=!1,pi=pn=wc=La=Il=St=0,nn=mr=null,kc=!1,(n&8)!==0&&(n|=n&32);var u=e.entangledLanes;if(u!==0)for(e=e.entanglements,u&=n;0<u;){var f=31-tt(u),h=1<<f;n|=e[f],u&=~h}return El=n,pu(),a}function Cp(e,n){Oe=null,U.H=rr,n===ri||n===wu?(n=Yh(),lt=3):n===js?(n=Yh(),lt=4):lt=n===rc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,mn=n,He===null&&(St=1,Uu(e,kn(n,e.current)))}function Tp(){var e=dn.current;return e===null?!0:(Ve&4194048)===Ve?_n===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?e===_n:!1}function Ap(){var e=U.H;return U.H=rr,e===null?rr:e}function _p(){var e=U.A;return U.A=T1,e}function Ku(){St=4,Xl||(Ve&4194048)!==Ve&&dn.current!==null||(mi=!0),(Il&134217727)===0&&(La&134217727)===0||ot===null||$l(ot,Ve,pn,!1)}function zc(e,n,a){var u=et;et|=2;var f=Ap(),h=_p();(ot!==e||Ve!==n)&&(Iu=null,yi(e,n)),n=!1;var v=St;e:do try{if(lt!==0&&He!==null){var E=He,N=mn;switch(lt){case 8:_c(),v=6;break e;case 3:case 2:case 9:case 6:dn.current===null&&(n=!0);var G=lt;if(lt=0,mn=null,vi(e,E,N,G),a&&mi){v=0;break e}break;default:G=lt,lt=0,mn=null,vi(e,E,N,G)}}z1(),v=St;break}catch(W){Cp(e,W)}while(!0);return n&&e.shellSuspendCounter++,dl=Aa=null,et=u,U.H=f,U.A=h,He===null&&(ot=null,Ve=0,pu()),v}function z1(){for(;He!==null;)zp(He)}function R1(e,n){var a=et;et|=2;var u=Ap(),f=_p();ot!==e||Ve!==n?(Iu=null,Xu=pt()+500,yi(e,n)):mi=ga(e,n);e:do try{if(lt!==0&&He!==null){n=He;var h=mn;t:switch(lt){case 1:lt=0,mn=null,vi(e,n,h,1);break;case 2:case 9:if(Hh(h)){lt=0,mn=null,Rp(n);break}n=function(){lt!==2&&lt!==9||ot!==e||(lt=7),$n(e)},h.then(n,n);break e;case 3:lt=7;break e;case 4:lt=5;break e;case 7:Hh(h)?(lt=0,mn=null,Rp(n)):(lt=0,mn=null,vi(e,n,h,7));break;case 5:var v=null;switch(He.tag){case 26:v=He.memoizedState;case 5:case 27:var E=He;if(v?pg(v):E.stateNode.complete){lt=0,mn=null;var N=E.sibling;if(N!==null)He=N;else{var G=E.return;G!==null?(He=G,$u(G)):He=null}break t}}lt=0,mn=null,vi(e,n,h,5);break;case 6:lt=0,mn=null,vi(e,n,h,6);break;case 8:_c(),St=6;break e;default:throw Error(r(462))}}D1();break}catch(W){Cp(e,W)}while(!0);return dl=Aa=null,U.H=u,U.A=f,et=a,He!==null?0:(ot=null,Ve=0,pu(),St)}function D1(){for(;He!==null&&!Li();)zp(He)}function zp(e){var n=Wm(e.alternate,e,El);e.memoizedProps=e.pendingProps,n===null?$u(e):He=n}function Rp(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=Im(a,n,n.pendingProps,n.type,void 0,Ve);break;case 11:n=Im(a,n,n.pendingProps,n.type.render,n.ref,Ve);break;case 5:Gs(n);default:tp(a,n),n=He=_h(n,El),n=Wm(a,n,El)}e.memoizedProps=e.pendingProps,n===null?$u(e):He=n}function vi(e,n,a,u){dl=Aa=null,Gs(n),ui=null,Ji=0;var f=n.return;try{if(b1(e,f,n,a,Ve)){St=1,Uu(e,kn(a,e.current)),He=null;return}}catch(h){if(f!==null)throw He=f,h;St=1,Uu(e,kn(a,e.current)),He=null;return}n.flags&32768?(Ze||u===1?e=!0:mi||(Ve&536870912)!==0?e=!1:(Xl=e=!0,(u===2||u===9||u===3||u===6)&&(u=dn.current,u!==null&&u.tag===13&&(u.flags|=16384))),Dp(n,e)):$u(n)}function $u(e){var n=e;do{if((n.flags&32768)!==0){Dp(n,Xl);return}e=n.return;var a=E1(n.alternate,n,El);if(a!==null){He=a;return}if(n=n.sibling,n!==null){He=n;return}He=n=e}while(n!==null);St===0&&(St=5)}function Dp(e,n){do{var a=w1(e.alternate,e);if(a!==null){a.flags&=32767,He=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){He=e;return}He=e=a}while(e!==null);St=6,He=null}function jp(e,n,a,u,f,h,v,E,N){e.cancelPendingCommit=null;do Pu();while(jt!==0);if((et&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(h=n.lanes|n.childLanes,h|=ys,$o(e,a,h,v,E,N),e===ot&&(He=ot=null,Ve=0),gi=n,Kl=e,wl=a,Cc=h,Tc=f,Sp=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,O1(Ce,function(){return Up(),null})):(e.callbackNode=null,e.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=U.T,U.T=null,f=J.p,J.p=2,v=et,et|=4;try{k1(e,n,a)}finally{et=v,J.p=f,U.T=u}}jt=1,Np(),Mp(),Op()}}function Np(){if(jt===1){jt=0;var e=Kl,n=gi,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var u=J.p;J.p=2;var f=et;et|=4;try{hp(n,e);var h=Yc,v=bh(e.containerInfo),E=h.focusedElem,N=h.selectionRange;if(v!==E&&E&&E.ownerDocument&&vh(E.ownerDocument.documentElement,E)){if(N!==null&&ds(E)){var G=N.start,W=N.end;if(W===void 0&&(W=G),"selectionStart"in E)E.selectionStart=G,E.selectionEnd=Math.min(W,E.value.length);else{var le=E.ownerDocument||document,X=le&&le.defaultView||window;if(X.getSelection){var P=X.getSelection(),Se=E.textContent.length,De=Math.min(N.start,Se),ut=N.end===void 0?De:Math.min(N.end,Se);!P.extend&&De>ut&&(v=ut,ut=De,De=v);var B=yh(E,De),L=yh(E,ut);if(B&&L&&(P.rangeCount!==1||P.anchorNode!==B.node||P.anchorOffset!==B.offset||P.focusNode!==L.node||P.focusOffset!==L.offset)){var F=le.createRange();F.setStart(B.node,B.offset),P.removeAllRanges(),De>ut?(P.addRange(F),P.extend(L.node,L.offset)):(F.setEnd(L.node,L.offset),P.addRange(F))}}}}for(le=[],P=E;P=P.parentNode;)P.nodeType===1&&le.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<le.length;E++){var ne=le[E];ne.element.scrollLeft=ne.left,ne.element.scrollTop=ne.top}}so=!!qc,Yc=qc=null}finally{et=f,J.p=u,U.T=a}}e.current=n,jt=2}}function Mp(){if(jt===2){jt=0;var e=Kl,n=gi,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var u=J.p;J.p=2;var f=et;et|=4;try{op(e,n.alternate,n)}finally{et=f,J.p=u,U.T=a}}jt=3}}function Op(){if(jt===4||jt===3){jt=0,Ui();var e=Kl,n=gi,a=wl,u=Sp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?jt=5:(jt=0,gi=Kl=null,Lp(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Zl=null),oe(a),n=n.stateNode,nt&&typeof nt.onCommitFiberRoot=="function")try{nt.onCommitFiberRoot(Lt,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=U.T,f=J.p,J.p=2,U.T=null;try{for(var h=e.onRecoverableError,v=0;v<u.length;v++){var E=u[v];h(E.value,{componentStack:E.stack})}}finally{U.T=n,J.p=f}}(wl&3)!==0&&Pu(),$n(e),f=e.pendingLanes,(a&261930)!==0&&(f&42)!==0?e===Ac?pr++:(pr=0,Ac=e):pr=0,gr(0)}}function Lp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,$i(n)))}function Pu(){return Np(),Mp(),Op(),Up()}function Up(){if(jt!==5)return!1;var e=Kl,n=Cc;Cc=0;var a=oe(wl),u=U.T,f=J.p;try{J.p=32>a?32:a,U.T=null,a=Tc,Tc=null;var h=Kl,v=wl;if(jt=0,gi=Kl=null,wl=0,(et&6)!==0)throw Error(r(331));var E=et;if(et|=4,vp(h.current),pp(h,h.current,v,a),et=E,gr(0,!1),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(Lt,h)}catch{}return!0}finally{J.p=f,U.T=u,Lp(e,n)}}function Bp(e,n,a){n=kn(a,n),n=ic(e.stateNode,n,2),e=Vl(e,n,2),e!==null&&(Ml(e,2),$n(e))}function at(e,n,a){if(e.tag===3)Bp(e,e,a);else for(;n!==null;){if(n.tag===3){Bp(n,e,a);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Zl===null||!Zl.has(u))){e=kn(a,e),a=Hm(2),u=Vl(n,a,2),u!==null&&(qm(a,u,n,e),Ml(u,2),$n(u));break}}n=n.return}}function Rc(e,n,a){var u=e.pingCache;if(u===null){u=e.pingCache=new A1;var f=new Set;u.set(n,f)}else f=u.get(n),f===void 0&&(f=new Set,u.set(n,f));f.has(a)||(Ec=!0,f.add(a),e=j1.bind(null,e,n,a),n.then(e,e))}function j1(e,n,a){var u=e.pingCache;u!==null&&u.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ot===e&&(Ve&a)===a&&(St===4||St===3&&(Ve&62914560)===Ve&&300>pt()-Qu?(et&2)===0&&yi(e,0):wc|=a,pi===Ve&&(pi=0)),$n(e)}function Hp(e,n){n===0&&(n=ya()),e=ka(e,n),e!==null&&(Ml(e,n),$n(e))}function N1(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Hp(e,a)}function M1(e,n){var a=0;switch(e.tag){case 31:case 13:var u=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:u=e.stateNode;break;case 22:u=e.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(n),Hp(e,a)}function O1(e,n){return Dl(e,n)}var Ju=null,bi=null,Dc=!1,Wu=!1,jc=!1,Pl=0;function $n(e){e!==bi&&e.next===null&&(bi===null?Ju=bi=e:bi=bi.next=e),Wu=!0,Dc||(Dc=!0,U1())}function gr(e,n){if(!jc&&Wu){jc=!0;do for(var a=!1,u=Ju;u!==null;){if(e!==0){var f=u.pendingLanes;if(f===0)var h=0;else{var v=u.suspendedLanes,E=u.pingedLanes;h=(1<<31-tt(42|e)+1)-1,h&=f&~(v&~E),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,Fp(u,h))}else h=Ve,h=pa(u,u===ot?h:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(h&3)===0||ga(u,h)||(a=!0,Fp(u,h));u=u.next}while(a);jc=!1}}function L1(){qp()}function qp(){Wu=Dc=!1;var e=0;Pl!==0&&I1()&&(e=Pl);for(var n=pt(),a=null,u=Ju;u!==null;){var f=u.next,h=Yp(u,n);h===0?(u.next=null,a===null?Ju=f:a.next=f,f===null&&(bi=a)):(a=u,(e!==0||(h&3)!==0)&&(Wu=!0)),u=f}jt!==0&&jt!==5||gr(e),Pl!==0&&(Pl=0)}function Yp(e,n){for(var a=e.suspendedLanes,u=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var v=31-tt(h),E=1<<v,N=f[v];N===-1?((E&a)===0||(E&u)!==0)&&(f[v]=lu(E,n)):N<=n&&(e.expiredLanes|=E),h&=~E}if(n=ot,a=Ve,a=pa(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u=e.callbackNode,a===0||e===n&&(lt===2||lt===9)||e.cancelPendingCommit!==null)return u!==null&&u!==null&&ha(u),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ga(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(u!==null&&ha(u),oe(a)){case 2:case 8:a=de;break;case 32:a=Ce;break;case 268435456:a=Pe;break;default:a=Ce}return u=Vp.bind(null,e),a=Dl(a,u),e.callbackPriority=n,e.callbackNode=a,n}return u!==null&&u!==null&&ha(u),e.callbackPriority=2,e.callbackNode=null,2}function Vp(e,n){if(jt!==0&&jt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Pu()&&e.callbackNode!==a)return null;var u=Ve;return u=pa(e,e===ot?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u===0?null:(wp(e,u,n),Yp(e,pt()),e.callbackNode!=null&&e.callbackNode===a?Vp.bind(null,e):null)}function Fp(e,n){if(Pu())return null;wp(e,n,!0)}function U1(){K1(function(){(et&6)!==0?Dl(te,L1):qp()})}function Nc(){if(Pl===0){var e=ai;e===0&&(e=il,il<<=1,(il&261888)===0&&(il=256)),Pl=e}return Pl}function Gp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:uu(""+e)}function Qp(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function B1(e,n,a,u,f){if(n==="submit"&&a&&a.stateNode===f){var h=Gp((f[ve]||null).action),v=u.submitter;v&&(n=(n=v[ve]||null)?Gp(n.formAction):v.getAttribute("formAction"),n!==null&&(h=n,v=null));var E=new fu("action","action",null,u,f);e.push({event:E,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Pl!==0){var N=v?Qp(f,v):new FormData(f);Ws(a,{pending:!0,data:N,method:f.method,action:h},null,N)}}else typeof h=="function"&&(E.preventDefault(),N=v?Qp(f,v):new FormData(f),Ws(a,{pending:!0,data:N,method:f.method,action:h},h,N))},currentTarget:f}]})}}for(var Mc=0;Mc<gs.length;Mc++){var Oc=gs[Mc],H1=Oc.toLowerCase(),q1=Oc[0].toUpperCase()+Oc.slice(1);Vn(H1,"on"+q1)}Vn(Eh,"onAnimationEnd"),Vn(wh,"onAnimationIteration"),Vn(kh,"onAnimationStart"),Vn("dblclick","onDoubleClick"),Vn("focusin","onFocus"),Vn("focusout","onBlur"),Vn(n1,"onTransitionRun"),Vn(l1,"onTransitionStart"),Vn(a1,"onTransitionCancel"),Vn(Ch,"onTransitionEnd"),Sn("onMouseEnter",["mouseout","mouseover"]),Sn("onMouseLeave",["mouseout","mouseover"]),Sn("onPointerEnter",["pointerout","pointerover"]),Sn("onPointerLeave",["pointerout","pointerover"]),qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qn("onBeforeInput",["compositionend","keypress","textInput","paste"]),qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yr="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(" "),Y1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(yr));function Xp(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var u=e[a],f=u.event;u=u.listeners;e:{var h=void 0;if(n)for(var v=u.length-1;0<=v;v--){var E=u[v],N=E.instance,G=E.currentTarget;if(E=E.listener,N!==h&&f.isPropagationStopped())break e;h=E,f.currentTarget=G;try{h(f)}catch(W){mu(W)}f.currentTarget=null,h=N}else for(v=0;v<u.length;v++){if(E=u[v],N=E.instance,G=E.currentTarget,E=E.listener,N!==h&&f.isPropagationStopped())break e;h=E,f.currentTarget=G;try{h(f)}catch(W){mu(W)}f.currentTarget=null,h=N}}}}function qe(e,n){var a=n[_e];a===void 0&&(a=n[_e]=new Set);var u=e+"__bubble";a.has(u)||(Ip(n,e,2,!1),a.add(u))}function Lc(e,n,a){var u=0;n&&(u|=4),Ip(a,e,u,n)}var eo="_reactListening"+Math.random().toString(36).slice(2);function Uc(e){if(!e[eo]){e[eo]=!0,Hn.forEach(function(a){a!=="selectionchange"&&(Y1.has(a)||Lc(a,!1,e),Lc(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[eo]||(n[eo]=!0,Lc("selectionchange",!1,n))}}function Ip(e,n,a,u){switch(Eg(n)){case 2:var f=px;break;case 8:f=gx;break;default:f=Jc}a=f.bind(null,n,a,e),f=void 0,!ls||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),u?f!==void 0?e.addEventListener(n,a,{capture:!0,passive:f}):e.addEventListener(n,a,!0):f!==void 0?e.addEventListener(n,a,{passive:f}):e.addEventListener(n,a,!1)}function Bc(e,n,a,u,f){var h=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var v=u.tag;if(v===3||v===4){var E=u.stateNode.containerInfo;if(E===f)break;if(v===4)for(v=u.return;v!==null;){var N=v.tag;if((N===3||N===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;E!==null;){if(v=bt(E),v===null)return;if(N=v.tag,N===5||N===6||N===26||N===27){u=h=v;continue e}E=E.parentNode}}u=u.return}Jd(function(){var G=h,W=ts(a),le=[];e:{var X=Th.get(e);if(X!==void 0){var P=fu,Se=e;switch(e){case"keypress":if(su(a)===0)break e;case"keydown":case"keyup":P=M0;break;case"focusin":Se="focus",P=us;break;case"focusout":Se="blur",P=us;break;case"beforeblur":case"afterblur":P=us;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":P=th;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=E0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=U0;break;case Eh:case wh:case kh:P=C0;break;case Ch:P=H0;break;case"scroll":case"scrollend":P=x0;break;case"wheel":P=Y0;break;case"copy":case"cut":case"paste":P=A0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=lh;break;case"toggle":case"beforetoggle":P=F0}var De=(n&4)!==0,ut=!De&&(e==="scroll"||e==="scrollend"),B=De?X!==null?X+"Capture":null:X;De=[];for(var L=G,F;L!==null;){var ne=L;if(F=ne.stateNode,ne=ne.tag,ne!==5&&ne!==26&&ne!==27||F===null||B===null||(ne=Hi(L,B),ne!=null&&De.push(vr(L,ne,F))),ut)break;L=L.return}0<De.length&&(X=new P(X,Se,null,a,W),le.push({event:X,listeners:De}))}}if((n&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",X&&a!==es&&(Se=a.relatedTarget||a.fromElement)&&(bt(Se)||Se[we]))break e;if((P||X)&&(X=W.window===W?W:(X=W.ownerDocument)?X.defaultView||X.parentWindow:window,P?(Se=a.relatedTarget||a.toElement,P=G,Se=Se?bt(Se):null,Se!==null&&(ut=s(Se),De=Se.tag,Se!==ut||De!==5&&De!==27&&De!==6)&&(Se=null)):(P=null,Se=G),P!==Se)){if(De=th,ne="onMouseLeave",B="onMouseEnter",L="mouse",(e==="pointerout"||e==="pointerover")&&(De=lh,ne="onPointerLeave",B="onPointerEnter",L="pointer"),ut=P==null?X:Mt(P),F=Se==null?X:Mt(Se),X=new De(ne,L+"leave",P,a,W),X.target=ut,X.relatedTarget=F,ne=null,bt(W)===G&&(De=new De(B,L+"enter",Se,a,W),De.target=F,De.relatedTarget=ut,ne=De),ut=ne,P&&Se)t:{for(De=V1,B=P,L=Se,F=0,ne=B;ne;ne=De(ne))F++;ne=0;for(var Ae=L;Ae;Ae=De(Ae))ne++;for(;0<F-ne;)B=De(B),F--;for(;0<ne-F;)L=De(L),ne--;for(;F--;){if(B===L||L!==null&&B===L.alternate){De=B;break t}B=De(B),L=De(L)}De=null}else De=null;P!==null&&Zp(le,X,P,De,!1),Se!==null&&ut!==null&&Zp(le,ut,Se,De,!0)}}e:{if(X=G?Mt(G):window,P=X.nodeName&&X.nodeName.toLowerCase(),P==="select"||P==="input"&&X.type==="file")var Je=fh;else if(sh(X))if(dh)Je=W0;else{Je=P0;var Ee=$0}else P=X.nodeName,!P||P.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?G&&Wo(G.elementType)&&(Je=fh):Je=J0;if(Je&&(Je=Je(e,G))){ch(le,Je,a,W);break e}Ee&&Ee(e,X,G),e==="focusout"&&G&&X.type==="number"&&G.memoizedProps.value!=null&&Jo(X,"number",X.value)}switch(Ee=G?Mt(G):window,e){case"focusin":(sh(Ee)||Ee.contentEditable==="true")&&($a=Ee,hs=G,Ii=null);break;case"focusout":Ii=hs=$a=null;break;case"mousedown":ms=!0;break;case"contextmenu":case"mouseup":case"dragend":ms=!1,xh(le,a,W);break;case"selectionchange":if(t1)break;case"keydown":case"keyup":xh(le,a,W)}var Le;if(ss)e:{switch(e){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else Ka?uh(e,a)&&(Fe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Fe="onCompositionStart");Fe&&(ah&&a.locale!=="ko"&&(Ka||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&Ka&&(Le=Wd()):(Ol=W,as="value"in Ol?Ol.value:Ol.textContent,Ka=!0)),Ee=to(G,Fe),0<Ee.length&&(Fe=new nh(Fe,e,null,a,W),le.push({event:Fe,listeners:Ee}),Le?Fe.data=Le:(Le=oh(a),Le!==null&&(Fe.data=Le)))),(Le=Q0?X0(e,a):I0(e,a))&&(Fe=to(G,"onBeforeInput"),0<Fe.length&&(Ee=new nh("onBeforeInput","beforeinput",null,a,W),le.push({event:Ee,listeners:Fe}),Ee.data=Le)),B1(le,e,G,a,W)}Xp(le,n)})}function vr(e,n,a){return{instance:e,listener:n,currentTarget:a}}function to(e,n){for(var a=n+"Capture",u=[];e!==null;){var f=e,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=Hi(e,a),f!=null&&u.unshift(vr(e,f,h)),f=Hi(e,n),f!=null&&u.push(vr(e,f,h))),e.tag===3)return u;e=e.return}return[]}function V1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Zp(e,n,a,u,f){for(var h=n._reactName,v=[];a!==null&&a!==u;){var E=a,N=E.alternate,G=E.stateNode;if(E=E.tag,N!==null&&N===u)break;E!==5&&E!==26&&E!==27||G===null||(N=G,f?(G=Hi(a,h),G!=null&&v.unshift(vr(a,G,N))):f||(G=Hi(a,h),G!=null&&v.push(vr(a,G,N)))),a=a.return}v.length!==0&&e.push({event:n,listeners:v})}var F1=/\r\n?/g,G1=/\u0000|\uFFFD/g;function Kp(e){return(typeof e=="string"?e:""+e).replace(F1,`
9
- `).replace(G1,"")}function $p(e,n){return n=Kp(n),Kp(e)===n}function rt(e,n,a,u,f,h){switch(a){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||Xa(e,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&Xa(e,""+u);break;case"className":Yn(e,"class",u);break;case"tabIndex":Yn(e,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Yn(e,a,u);break;case"style":$d(e,u,h);break;case"data":if(n!=="object"){Yn(e,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(a);break}u=uu(""+u),e.setAttribute(a,u);break;case"action":case"formAction":if(typeof u=="function"){e.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 h=="function"&&(a==="formAction"?(n!=="input"&&rt(e,n,"name",f.name,f,null),rt(e,n,"formEncType",f.formEncType,f,null),rt(e,n,"formMethod",f.formMethod,f,null),rt(e,n,"formTarget",f.formTarget,f,null)):(rt(e,n,"encType",f.encType,f,null),rt(e,n,"method",f.method,f,null),rt(e,n,"target",f.target,f,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(a);break}u=uu(""+u),e.setAttribute(a,u);break;case"onClick":u!=null&&(e.onclick=ol);break;case"onScroll":u!=null&&qe("scroll",e);break;case"onScrollEnd":u!=null&&qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(a=u.__html,a!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":e.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){e.removeAttribute("xlink:href");break}a=uu(""+u),e.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":u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,""+u):e.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":u&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":u===!0?e.setAttribute(a,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,u):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?e.setAttribute(a,u):e.removeAttribute(a);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?e.removeAttribute(a):e.setAttribute(a,u);break;case"popover":qe("beforetoggle",e),qe("toggle",e),Et(e,"popover",u);break;case"xlinkActuate":Bt(e,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Bt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Bt(e,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Bt(e,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Bt(e,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Bt(e,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Et(e,"is",u);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=v0.get(a)||a,Et(e,a,u))}}function Hc(e,n,a,u,f,h){switch(a){case"style":$d(e,u,h);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(a=u.__html,a!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof u=="string"?Xa(e,u):(typeof u=="number"||typeof u=="bigint")&&Xa(e,""+u);break;case"onScroll":u!=null&&qe("scroll",e);break;case"onScrollEnd":u!=null&&qe("scrollend",e);break;case"onClick":u!=null&&(e.onclick=ol);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!sn.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(f=a.endsWith("Capture"),n=a.slice(2,f?a.length-7:void 0),h=e[ve]||null,h=h!=null?h[a]:null,typeof h=="function"&&e.removeEventListener(n,h,f),typeof u=="function")){typeof h!="function"&&h!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,u,f);break e}a in e?e[a]=u:u===!0?e.setAttribute(a,""):Et(e,a,u)}}}function Vt(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",e),qe("load",e);var u=!1,f=!1,h;for(h in a)if(a.hasOwnProperty(h)){var v=a[h];if(v!=null)switch(h){case"src":u=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:rt(e,n,h,v,a,null)}}f&&rt(e,n,"srcSet",a.srcSet,a,null),u&&rt(e,n,"src",a.src,a,null);return;case"input":qe("invalid",e);var E=h=v=f=null,N=null,G=null;for(u in a)if(a.hasOwnProperty(u)){var W=a[u];if(W!=null)switch(u){case"name":f=W;break;case"type":v=W;break;case"checked":N=W;break;case"defaultChecked":G=W;break;case"value":h=W;break;case"defaultValue":E=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(r(137,n));break;default:rt(e,n,u,W,a,null)}}Xd(e,h,E,N,G,v,f,!1);return;case"select":qe("invalid",e),u=v=h=null;for(f in a)if(a.hasOwnProperty(f)&&(E=a[f],E!=null))switch(f){case"value":h=E;break;case"defaultValue":v=E;break;case"multiple":u=E;default:rt(e,n,f,E,a,null)}n=h,a=v,e.multiple=!!u,n!=null?Qa(e,!!u,n,!1):a!=null&&Qa(e,!!u,a,!0);return;case"textarea":qe("invalid",e),h=f=u=null;for(v in a)if(a.hasOwnProperty(v)&&(E=a[v],E!=null))switch(v){case"value":u=E;break;case"defaultValue":f=E;break;case"children":h=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(r(91));break;default:rt(e,n,v,E,a,null)}Zd(e,u,f,h);return;case"option":for(N in a)a.hasOwnProperty(N)&&(u=a[N],u!=null)&&(N==="selected"?e.selected=u&&typeof u!="function"&&typeof u!="symbol":rt(e,n,N,u,a,null));return;case"dialog":qe("beforetoggle",e),qe("toggle",e),qe("cancel",e),qe("close",e);break;case"iframe":case"object":qe("load",e);break;case"video":case"audio":for(u=0;u<yr.length;u++)qe(yr[u],e);break;case"image":qe("error",e),qe("load",e);break;case"details":qe("toggle",e);break;case"embed":case"source":case"link":qe("error",e),qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(G in a)if(a.hasOwnProperty(G)&&(u=a[G],u!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:rt(e,n,G,u,a,null)}return;default:if(Wo(n)){for(W in a)a.hasOwnProperty(W)&&(u=a[W],u!==void 0&&Hc(e,n,W,u,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(u=a[E],u!=null&&rt(e,n,E,u,a,null))}function Q1(e,n,a,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,h=null,v=null,E=null,N=null,G=null,W=null;for(P in a){var le=a[P];if(a.hasOwnProperty(P)&&le!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":N=le;default:u.hasOwnProperty(P)||rt(e,n,P,null,u,le)}}for(var X in u){var P=u[X];if(le=a[X],u.hasOwnProperty(X)&&(P!=null||le!=null))switch(X){case"type":h=P;break;case"name":f=P;break;case"checked":G=P;break;case"defaultChecked":W=P;break;case"value":v=P;break;case"defaultValue":E=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(137,n));break;default:P!==le&&rt(e,n,X,P,u,le)}}Po(e,v,E,N,G,W,h,f);return;case"select":P=v=E=X=null;for(h in a)if(N=a[h],a.hasOwnProperty(h)&&N!=null)switch(h){case"value":break;case"multiple":P=N;default:u.hasOwnProperty(h)||rt(e,n,h,null,u,N)}for(f in u)if(h=u[f],N=a[f],u.hasOwnProperty(f)&&(h!=null||N!=null))switch(f){case"value":X=h;break;case"defaultValue":E=h;break;case"multiple":v=h;default:h!==N&&rt(e,n,f,h,u,N)}n=E,a=v,u=P,X!=null?Qa(e,!!a,X,!1):!!u!=!!a&&(n!=null?Qa(e,!!a,n,!0):Qa(e,!!a,a?[]:"",!1));return;case"textarea":P=X=null;for(E in a)if(f=a[E],a.hasOwnProperty(E)&&f!=null&&!u.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:rt(e,n,E,null,u,f)}for(v in u)if(f=u[v],h=a[v],u.hasOwnProperty(v)&&(f!=null||h!=null))switch(v){case"value":X=f;break;case"defaultValue":P=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==h&&rt(e,n,v,f,u,h)}Id(e,X,P);return;case"option":for(var Se in a)X=a[Se],a.hasOwnProperty(Se)&&X!=null&&!u.hasOwnProperty(Se)&&(Se==="selected"?e.selected=!1:rt(e,n,Se,null,u,X));for(N in u)X=u[N],P=a[N],u.hasOwnProperty(N)&&X!==P&&(X!=null||P!=null)&&(N==="selected"?e.selected=X&&typeof X!="function"&&typeof X!="symbol":rt(e,n,N,X,u,P));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 De in a)X=a[De],a.hasOwnProperty(De)&&X!=null&&!u.hasOwnProperty(De)&&rt(e,n,De,null,u,X);for(G in u)if(X=u[G],P=a[G],u.hasOwnProperty(G)&&X!==P&&(X!=null||P!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(r(137,n));break;default:rt(e,n,G,X,u,P)}return;default:if(Wo(n)){for(var ut in a)X=a[ut],a.hasOwnProperty(ut)&&X!==void 0&&!u.hasOwnProperty(ut)&&Hc(e,n,ut,void 0,u,X);for(W in u)X=u[W],P=a[W],!u.hasOwnProperty(W)||X===P||X===void 0&&P===void 0||Hc(e,n,W,X,u,P);return}}for(var B in a)X=a[B],a.hasOwnProperty(B)&&X!=null&&!u.hasOwnProperty(B)&&rt(e,n,B,null,u,X);for(le in u)X=u[le],P=a[le],!u.hasOwnProperty(le)||X===P||X==null&&P==null||rt(e,n,le,X,u,P)}function Pp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function X1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),u=0;u<a.length;u++){var f=a[u],h=f.transferSize,v=f.initiatorType,E=f.duration;if(h&&E&&Pp(v)){for(v=0,E=f.responseEnd,u+=1;u<a.length;u++){var N=a[u],G=N.startTime;if(G>E)break;var W=N.transferSize,le=N.initiatorType;W&&Pp(le)&&(N=N.responseEnd,v+=W*(N<E?1:(E-G)/(N-G)))}if(--u,n+=8*(h+v)/(f.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var qc=null,Yc=null;function no(e){return e.nodeType===9?e:e.ownerDocument}function Jp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Wp(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Vc(e,n){return e==="textarea"||e==="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 Fc=null;function I1(){var e=window.event;return e&&e.type==="popstate"?e===Fc?!1:(Fc=e,!0):(Fc=null,!1)}var eg=typeof setTimeout=="function"?setTimeout:void 0,Z1=typeof clearTimeout=="function"?clearTimeout:void 0,tg=typeof Promise=="function"?Promise:void 0,K1=typeof queueMicrotask=="function"?queueMicrotask:typeof tg<"u"?function(e){return tg.resolve(null).then(e).catch($1)}:eg;function $1(e){setTimeout(function(){throw e})}function Jl(e){return e==="head"}function ng(e,n){var a=n,u=0;do{var f=a.nextSibling;if(e.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"||a==="/&"){if(u===0){e.removeChild(f),wi(n);return}u--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")u++;else if(a==="html")br(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,br(a);for(var h=a.firstChild;h;){var v=h.nextSibling,E=h.nodeName;h[gt]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&h.rel.toLowerCase()==="stylesheet"||a.removeChild(h),h=v}}else a==="body"&&br(e.ownerDocument.body);a=f}while(a);wi(n)}function lg(e,n){var a=e;e=0;do{var u=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||""),u&&u.nodeType===8)if(a=u.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=u}while(a)}function Gc(e){var n=e.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":Gc(a),vt(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function P1(e,n,a,u){for(;e.nodeType===1;){var f=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(u){if(!e[gt])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var h=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=zn(e.nextSibling),e===null)break}return null}function J1(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=zn(e.nextSibling),e===null))return null;return e}function ag(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=zn(e.nextSibling),e===null))return null;return e}function Qc(e){return e.data==="$?"||e.data==="$~"}function Xc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function W1(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var u=function(){n(),a.removeEventListener("DOMContentLoaded",u)};a.addEventListener("DOMContentLoaded",u),e._reactRetry=u}}function zn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Ic=null;function ig(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return zn(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function rg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function ug(e,n,a){switch(n=no(a),e){case"html":if(e=n.documentElement,!e)throw Error(r(452));return e;case"head":if(e=n.head,!e)throw Error(r(453));return e;case"body":if(e=n.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function br(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);vt(e)}var Rn=new Map,og=new Set;function lo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kl=J.d;J.d={f:ex,r:tx,D:nx,C:lx,L:ax,m:ix,X:ux,S:rx,M:ox};function ex(){var e=kl.f(),n=Zu();return e||n}function tx(e){var n=Qe(e);n!==null&&n.tag===5&&n.type==="form"?Cm(n):kl.r(e)}var xi=typeof document>"u"?null:document;function sg(e,n,a){var u=xi;if(u&&typeof n=="string"&&n){var f=En(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),og.has(f)||(og.add(f),e={rel:e,crossOrigin:a,href:n},u.querySelector(f)===null&&(n=u.createElement("link"),Vt(n,"link",e),ht(n),u.head.appendChild(n)))}}function nx(e){kl.D(e),sg("dns-prefetch",e,null)}function lx(e,n){kl.C(e,n),sg("preconnect",e,n)}function ax(e,n,a){kl.L(e,n,a);var u=xi;if(u&&e&&n){var f='link[rel="preload"][as="'+En(n)+'"]';n==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+En(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+En(a.imageSizes)+'"]')):f+='[href="'+En(e)+'"]';var h=f;switch(n){case"style":h=Si(e);break;case"script":h=Ei(e)}Rn.has(h)||(e=g({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),Rn.set(h,e),u.querySelector(f)!==null||n==="style"&&u.querySelector(xr(h))||n==="script"&&u.querySelector(Sr(h))||(n=u.createElement("link"),Vt(n,"link",e),ht(n),u.head.appendChild(n)))}}function ix(e,n){kl.m(e,n);var a=xi;if(a&&e){var u=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+En(u)+'"][href="'+En(e)+'"]',h=f;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Ei(e)}if(!Rn.has(h)&&(e=g({rel:"modulepreload",href:e},n),Rn.set(h,e),a.querySelector(f)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Sr(h)))return}u=a.createElement("link"),Vt(u,"link",e),ht(u),a.head.appendChild(u)}}}function rx(e,n,a){kl.S(e,n,a);var u=xi;if(u&&e){var f=Pt(u).hoistableStyles,h=Si(e);n=n||"default";var v=f.get(h);if(!v){var E={loading:0,preload:null};if(v=u.querySelector(xr(h)))E.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":n},a),(a=Rn.get(h))&&Zc(e,a);var N=v=u.createElement("link");ht(N),Vt(N,"link",e),N._p=new Promise(function(G,W){N.onload=G,N.onerror=W}),N.addEventListener("load",function(){E.loading|=1}),N.addEventListener("error",function(){E.loading|=2}),E.loading|=4,ao(v,n,u)}v={type:"stylesheet",instance:v,count:1,state:E},f.set(h,v)}}}function ux(e,n){kl.X(e,n);var a=xi;if(a&&e){var u=Pt(a).hoistableScripts,f=Ei(e),h=u.get(f);h||(h=a.querySelector(Sr(f)),h||(e=g({src:e,async:!0},n),(n=Rn.get(f))&&Kc(e,n),h=a.createElement("script"),ht(h),Vt(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},u.set(f,h))}}function ox(e,n){kl.M(e,n);var a=xi;if(a&&e){var u=Pt(a).hoistableScripts,f=Ei(e),h=u.get(f);h||(h=a.querySelector(Sr(f)),h||(e=g({src:e,async:!0,type:"module"},n),(n=Rn.get(f))&&Kc(e,n),h=a.createElement("script"),ht(h),Vt(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},u.set(f,h))}}function cg(e,n,a,u){var f=(f=be.current)?lo(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=Si(a.href),a=Pt(f).hoistableStyles,u=a.get(n),u||(u={type:"style",instance:null,count:0,state:null},a.set(n,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Si(a.href);var h=Pt(f).hoistableStyles,v=h.get(e);if(v||(f=f.ownerDocument||f,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,v),(h=f.querySelector(xr(e)))&&!h._p&&(v.instance=h,v.state.loading=5),Rn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Rn.set(e,a),h||sx(f,e,a,v.state))),n&&u===null)throw Error(r(528,""));return v}if(n&&u!==null)throw Error(r(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Ei(a),a=Pt(f).hoistableScripts,u=a.get(n),u||(u={type:"script",instance:null,count:0,state:null},a.set(n,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Si(e){return'href="'+En(e)+'"'}function xr(e){return'link[rel="stylesheet"]['+e+"]"}function fg(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function sx(e,n,a,u){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=e.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),Vt(n,"link",a),ht(n),e.head.appendChild(n))}function Ei(e){return'[src="'+En(e)+'"]'}function Sr(e){return"script[async]"+e}function dg(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var u=e.querySelector('style[data-href~="'+En(a.href)+'"]');if(u)return n.instance=u,ht(u),u;var f=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(e.ownerDocument||e).createElement("style"),ht(u),Vt(u,"style",f),ao(u,a.precedence,e),n.instance=u;case"stylesheet":f=Si(a.href);var h=e.querySelector(xr(f));if(h)return n.state.loading|=4,n.instance=h,ht(h),h;u=fg(a),(f=Rn.get(f))&&Zc(u,f),h=(e.ownerDocument||e).createElement("link"),ht(h);var v=h;return v._p=new Promise(function(E,N){v.onload=E,v.onerror=N}),Vt(h,"link",u),n.state.loading|=4,ao(h,a.precedence,e),n.instance=h;case"script":return h=Ei(a.src),(f=e.querySelector(Sr(h)))?(n.instance=f,ht(f),f):(u=a,(f=Rn.get(h))&&(u=g({},a),Kc(u,f)),e=e.ownerDocument||e,f=e.createElement("script"),ht(f),Vt(f,"link",u),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,ao(u,a.precedence,e));return n.instance}function ao(e,n,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=u.length?u[u.length-1]:null,h=f,v=0;v<u.length;v++){var E=u[v];if(E.dataset.precedence===n)h=E;else if(h!==f)break}h?h.parentNode.insertBefore(e,h.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function Zc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Kc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var io=null;function hg(e,n,a){if(io===null){var u=new Map,f=io=new Map;f.set(a,u)}else f=io,u=f.get(a),u||(u=new Map,f.set(a,u));if(u.has(e))return u;for(u.set(e,null),a=a.getElementsByTagName(e),f=0;f<a.length;f++){var h=a[f];if(!(h[gt]||h[ge]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var v=h.getAttribute(n)||"";v=e+v;var E=u.get(v);E?E.push(h):u.set(v,[h])}}return u}function mg(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function cx(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){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"?(e=n.disabled,typeof n.precedence=="string"&&e==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 pg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function fx(e,n,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=Si(u.href),h=n.querySelector(xr(f));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=ro.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=h,ht(h);return}h=n.ownerDocument||n,u=fg(u),(f=Rn.get(f))&&Zc(u,f),h=h.createElement("link"),ht(h);var v=h;v._p=new Promise(function(E,N){v.onload=E,v.onerror=N}),Vt(h,"link",u),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ro.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var $c=0;function dx(e,n){return e.stylesheets&&e.count===0&&oo(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var u=setTimeout(function(){if(e.stylesheets&&oo(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+n);0<e.imgBytes&&$c===0&&($c=62500*X1());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&oo(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>$c?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(u),clearTimeout(f)}}:null}function ro(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)oo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var uo=null;function oo(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,uo=new Map,n.forEach(hx,e),uo=null,ro.call(e))}function hx(e,n){if(!(n.state.loading&4)){var a=uo.get(e);if(a)var u=a.get(null);else{a=new Map,uo.set(e,a);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var v=f[h];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),u=v)}u&&a.set(null,u)}f=n.instance,v=f.getAttribute("data-precedence"),h=a.get(v)||u,h===u&&a.set(null,f),a.set(v,f),this.count++,u=ro.bind(this),f.addEventListener("load",u),f.addEventListener("error",u),h?h.parentNode.insertBefore(f,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var Er={$$typeof:O,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function mx(e,n,a,u,f,h,v,E,N){this.tag=1,this.containerInfo=e,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=Nl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nl(0),this.hiddenUpdates=Nl(null),this.identifierPrefix=u,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function gg(e,n,a,u,f,h,v,E,N,G,W,le){return e=new mx(e,n,a,v,N,G,W,le,E),n=1,h===!0&&(n|=24),h=fn(3,null,null,n),e.current=h,h.stateNode=e,n=zs(),n.refCount++,e.pooledCache=n,n.refCount++,h.memoizedState={element:u,isDehydrated:a,cache:n},Ns(h),e}function yg(e){return e?(e=Wa,e):Wa}function vg(e,n,a,u,f,h){f=yg(f),u.context===null?u.context=f:u.pendingContext=f,u=Yl(n),u.payload={element:a},h=h===void 0?null:h,h!==null&&(u.callback=h),a=Vl(e,u,n),a!==null&&(ln(a,e,n),er(a,e,n))}function bg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Pc(e,n){bg(e,n),(e=e.alternate)&&bg(e,n)}function xg(e){if(e.tag===13||e.tag===31){var n=ka(e,67108864);n!==null&&ln(n,e,67108864),Pc(e,67108864)}}function Sg(e){if(e.tag===13||e.tag===31){var n=gn();n=K(n);var a=ka(e,n);a!==null&&ln(a,e,n),Pc(e,n)}}var so=!0;function px(e,n,a,u){var f=U.T;U.T=null;var h=J.p;try{J.p=2,Jc(e,n,a,u)}finally{J.p=h,U.T=f}}function gx(e,n,a,u){var f=U.T;U.T=null;var h=J.p;try{J.p=8,Jc(e,n,a,u)}finally{J.p=h,U.T=f}}function Jc(e,n,a,u){if(so){var f=Wc(u);if(f===null)Bc(e,n,u,co,a),wg(e,u);else if(vx(f,e,n,a,u))u.stopPropagation();else if(wg(e,u),n&4&&-1<yx.indexOf(e)){for(;f!==null;){var h=Qe(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var v=rl(h.pendingLanes);if(v!==0){var E=h;for(E.pendingLanes|=2,E.entangledLanes|=2;v;){var N=1<<31-tt(v);E.entanglements[1]|=N,v&=~N}$n(h),(et&6)===0&&(Xu=pt()+500,gr(0))}}break;case 31:case 13:E=ka(h,2),E!==null&&ln(E,h,2),Zu(),Pc(h,2)}if(h=Wc(u),h===null&&Bc(e,n,u,co,a),h===f)break;f=h}f!==null&&u.stopPropagation()}else Bc(e,n,u,null,a)}}function Wc(e){return e=ts(e),ef(e)}var co=null;function ef(e){if(co=null,e=bt(e),e!==null){var n=s(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=c(n),e!==null)return e;e=null}else if(a===31){if(e=d(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return co=e,null}function Eg(e){switch(e){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(al()){case te:return 2;case de:return 8;case Ce:case je:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var tf=!1,Wl=null,ea=null,ta=null,wr=new Map,kr=new Map,na=[],yx="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 wg(e,n){switch(e){case"focusin":case"focusout":Wl=null;break;case"dragenter":case"dragleave":ea=null;break;case"mouseover":case"mouseout":ta=null;break;case"pointerover":case"pointerout":wr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":kr.delete(n.pointerId)}}function Cr(e,n,a,u,f,h){return e===null||e.nativeEvent!==h?(e={blockedOn:n,domEventName:a,eventSystemFlags:u,nativeEvent:h,targetContainers:[f]},n!==null&&(n=Qe(n),n!==null&&xg(n)),e):(e.eventSystemFlags|=u,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function vx(e,n,a,u,f){switch(n){case"focusin":return Wl=Cr(Wl,e,n,a,u,f),!0;case"dragenter":return ea=Cr(ea,e,n,a,u,f),!0;case"mouseover":return ta=Cr(ta,e,n,a,u,f),!0;case"pointerover":var h=f.pointerId;return wr.set(h,Cr(wr.get(h)||null,e,n,a,u,f)),!0;case"gotpointercapture":return h=f.pointerId,kr.set(h,Cr(kr.get(h)||null,e,n,a,u,f)),!0}return!1}function kg(e){var n=bt(e.target);if(n!==null){var a=s(n);if(a!==null){if(n=a.tag,n===13){if(n=c(a),n!==null){e.blockedOn=n,ke(e.priority,function(){Sg(a)});return}}else if(n===31){if(n=d(a),n!==null){e.blockedOn=n,ke(e.priority,function(){Sg(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function fo(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=Wc(e.nativeEvent);if(a===null){a=e.nativeEvent;var u=new a.constructor(a.type,a);es=u,a.target.dispatchEvent(u),es=null}else return n=Qe(a),n!==null&&xg(n),e.blockedOn=a,!1;n.shift()}return!0}function Cg(e,n,a){fo(e)&&a.delete(n)}function bx(){tf=!1,Wl!==null&&fo(Wl)&&(Wl=null),ea!==null&&fo(ea)&&(ea=null),ta!==null&&fo(ta)&&(ta=null),wr.forEach(Cg),kr.forEach(Cg)}function ho(e,n){e.blockedOn===n&&(e.blockedOn=null,tf||(tf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,bx)))}var mo=null;function Tg(e){mo!==e&&(mo=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){mo===e&&(mo=null);for(var n=0;n<e.length;n+=3){var a=e[n],u=e[n+1],f=e[n+2];if(typeof u!="function"){if(ef(u||a)===null)continue;break}var h=Qe(a);h!==null&&(e.splice(n,3),n-=3,Ws(h,{pending:!0,data:f,method:a.method,action:u},u,f))}}))}function wi(e){function n(N){return ho(N,e)}Wl!==null&&ho(Wl,e),ea!==null&&ho(ea,e),ta!==null&&ho(ta,e),wr.forEach(n),kr.forEach(n);for(var a=0;a<na.length;a++){var u=na[a];u.blockedOn===e&&(u.blockedOn=null)}for(;0<na.length&&(a=na[0],a.blockedOn===null);)kg(a),a.blockedOn===null&&na.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(u=0;u<a.length;u+=3){var f=a[u],h=a[u+1],v=f[ve]||null;if(typeof h=="function")v||Tg(a);else if(v){var E=null;if(h&&h.hasAttribute("formAction")){if(f=h,v=h[ve]||null)E=v.formAction;else if(ef(f)!==null)continue}else E=v.action;typeof E=="function"?a[u+1]=E:(a.splice(u,3),u-=3),Tg(a)}}}function Ag(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(v){return f=v})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),u||setTimeout(a,20)}function a(){if(!u&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){u=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function nf(e){this._internalRoot=e}po.prototype.render=nf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var a=n.current,u=gn();vg(a,u,e,n,null,null)},po.prototype.unmount=nf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;vg(e.current,2,null,e,null,null),Zu(),n[we]=null}};function po(e){this._internalRoot=e}po.prototype.unstable_scheduleHydration=function(e){if(e){var n=he();e={blockedOn:null,target:e,priority:n};for(var a=0;a<na.length&&n!==0&&n<na[a].priority;a++);na.splice(a,0,e),a===0&&kg(e)}};var _g=l.version;if(_g!=="19.2.4")throw Error(r(527,_g,"19.2.4"));J.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(n),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var xx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var go=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!go.isDisabled&&go.supportsFiber)try{Lt=go.inject(xx),nt=go}catch{}}return Ar.createRoot=function(e,n){if(!o(e))throw Error(r(299));var a=!1,u="",f=Om,h=Lm,v=Um;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError)),n=gg(e,1,!1,null,null,a,u,null,f,h,v,Ag),e[we]=n.current,Uc(e),new nf(n)},Ar.hydrateRoot=function(e,n,a){if(!o(e))throw Error(r(299));var u=!1,f="",h=Om,v=Lm,E=Um,N=null;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(h=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.formState!==void 0&&(N=a.formState)),n=gg(e,1,!0,n,a??null,u,f,N,h,v,E,Ag),n.context=yg(null),a=n.current,u=gn(),u=K(u),f=Yl(u),f.callback=null,Vl(a,f,u),a=u,n.current.lanes=a,Ml(n,a),$n(n),e[we]=n.current,Uc(e),new po(n)},Ar.version="19.2.4",Ar}var Bg;function jx(){if(Bg)return rf.exports;Bg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(l){console.error(l)}}return t(),rf.exports=Dx(),rf.exports}var Nx=jx();var cv=t=>{throw TypeError(t)},Mx=(t,l,i)=>l.has(t)||cv("Cannot "+i),cf=(t,l,i)=>(Mx(t,l,"read from private field"),i?i.call(t):l.get(t)),Ox=(t,l,i)=>l.has(t)?cv("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(t):l.set(t,i),Hg="popstate";function Lx(t={}){function l(r,o){let{pathname:s,search:c,hash:d}=r.location;return Yr("",{pathname:s,search:c,hash:d},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function i(r,o){return typeof o=="string"?o:el(o)}return Bx(l,i,null,t)}function Be(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function Rt(t,l){if(!t){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function Ux(){return Math.random().toString(36).substring(2,10)}function qg(t,l){return{usr:t.state,key:t.key,idx:l}}function Yr(t,l,i=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof l=="string"?ca(l):l,state:i,key:l&&l.key||r||Ux()}}function el({pathname:t="/",search:l="",hash:i=""}){return l&&l!=="?"&&(t+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function ca(t){let l={};if(t){let i=t.indexOf("#");i>=0&&(l.hash=t.substring(i),t=t.substring(0,i));let r=t.indexOf("?");r>=0&&(l.search=t.substring(r),t=t.substring(0,r)),t&&(l.pathname=t)}return l}function Bx(t,l,i,r={}){let{window:o=document.defaultView,v5Compat:s=!1}=r,c=o.history,d="POP",p=null,m=y();m==null&&(m=0,c.replaceState({...c.state,idx:m},""));function y(){return(c.state||{idx:null}).idx}function g(){d="POP";let _=y(),A=_==null?null:_-m;m=_,p&&p({action:d,location:T.location,delta:A})}function b(_,A){d="PUSH";let R=Yr(T.location,_,A);m=y()+1;let O=qg(R,m),ee=T.createHref(R);try{c.pushState(O,"",ee)}catch(ie){if(ie instanceof DOMException&&ie.name==="DataCloneError")throw ie;o.location.assign(ee)}s&&p&&p({action:d,location:T.location,delta:1})}function x(_,A){d="REPLACE";let R=Yr(T.location,_,A);m=y();let O=qg(R,m),ee=T.createHref(R);c.replaceState(O,"",ee),s&&p&&p({action:d,location:T.location,delta:0})}function k(_){return fv(_)}let T={get action(){return d},get location(){return t(o,c)},listen(_){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(Hg,g),p=_,()=>{o.removeEventListener(Hg,g),p=null}},createHref(_){return l(o,_)},createURL:k,encodeLocation(_){let A=k(_);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:b,replace:x,go(_){return c.go(_)}};return T}function fv(t,l=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Be(i,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:el(t);return r=r.replace(/ $/,"%20"),!l&&r.startsWith("//")&&(r=i+r),new URL(r,i)}var Or,Yg=class{constructor(t){if(Ox(this,Or,new Map),t)for(let[l,i]of t)this.set(l,i)}get(t){if(cf(this,Or).has(t))return cf(this,Or).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,l){cf(this,Or).set(t,l)}};Or=new WeakMap;var Hx=new Set(["lazy","caseSensitive","path","id","index","children"]);function qx(t){return Hx.has(t)}var Yx=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Vx(t){return Yx.has(t)}function Fx(t){return t.index===!0}function Vr(t,l,i=[],r={},o=!1){return t.map((s,c)=>{let d=[...i,String(c)],p=typeof s.id=="string"?s.id:d.join("-");if(Be(s.index!==!0||!s.children,"Cannot specify children on an index route"),Be(o||!r[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),Fx(s)){let m={...s,id:p};return r[p]=Vg(m,l(m)),m}else{let m={...s,id:p,children:void 0};return r[p]=Vg(m,l(m)),s.children&&(m.children=Vr(s.children,l,d,r,o)),m}})}function Vg(t,l){return Object.assign(t,{...l,...typeof l.lazy=="object"&&l.lazy!=null?{lazy:{...t.lazy,...l.lazy}}:{}})}function ra(t,l,i="/"){return Lr(t,l,i,!1)}function Lr(t,l,i,r){let o=typeof l=="string"?ca(l):l,s=Nn(o.pathname||"/",i);if(s==null)return null;let c=dv(t);Qx(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let m=nS(s);d=eS(c[p],m,r)}return d}function Gx(t,l){let{route:i,pathname:r,params:o}=t;return{id:i.id,pathname:r,params:o,data:l[i.id],loaderData:l[i.id],handle:i.handle}}function dv(t,l=[],i=[],r="",o=!1){let s=(c,d,p=o,m)=>{let y={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(r)&&p)return;Be(y.relativePath.startsWith(r),`Absolute route path "${y.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(r.length)}let g=Wn([r,y.relativePath]),b=i.concat(y);c.children&&c.children.length>0&&(Be(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),dv(c.children,l,b,g,p)),!(c.path==null&&!c.index)&&l.push({path:g,score:Jx(g,c.index),routesMeta:b})};return t.forEach((c,d)=>{if(c.path===""||!c.path?.includes("?"))s(c,d);else for(let p of hv(c.path))s(c,d,!0,p)}),l}function hv(t){let l=t.split("/");if(l.length===0)return[];let[i,...r]=l,o=i.endsWith("?"),s=i.replace(/\?$/,"");if(r.length===0)return o?[s,""]:[s];let c=hv(r.join("/")),d=[];return d.push(...c.map(p=>p===""?s:[s,p].join("/"))),o&&d.push(...c),d.map(p=>t.startsWith("/")&&p===""?"/":p)}function Qx(t){t.sort((l,i)=>l.score!==i.score?i.score-l.score:Wx(l.routesMeta.map(r=>r.childrenIndex),i.routesMeta.map(r=>r.childrenIndex)))}var Xx=/^:[\w-]+$/,Ix=3,Zx=2,Kx=1,$x=10,Px=-2,Fg=t=>t==="*";function Jx(t,l){let i=t.split("/"),r=i.length;return i.some(Fg)&&(r+=Px),l&&(r+=Zx),i.filter(o=>!Fg(o)).reduce((o,s)=>o+(Xx.test(s)?Ix:s===""?Kx:$x),r)}function Wx(t,l){return t.length===l.length&&t.slice(0,-1).every((r,o)=>r===l[o])?t[t.length-1]-l[l.length-1]:0}function eS(t,l,i=!1){let{routesMeta:r}=t,o={},s="/",c=[];for(let d=0;d<r.length;++d){let p=r[d],m=d===r.length-1,y=s==="/"?l:l.slice(s.length)||"/",g=jo({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},y),b=p.route;if(!g&&m&&i&&!r[r.length-1].route.index&&(g=jo({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!g)return null;Object.assign(o,g.params),c.push({params:o,pathname:Wn([s,g.pathname]),pathnameBase:iS(Wn([s,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(s=Wn([s,g.pathnameBase]))}return c}function jo(t,l){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[i,r]=tS(t.path,t.caseSensitive,t.end),o=l.match(i);if(!o)return null;let s=o[0],c=s.replace(/(.)\/+$/,"$1"),d=o.slice(1);return{params:r.reduce((m,{paramName:y,isOptional:g},b)=>{if(y==="*"){let k=d[b]||"";c=s.slice(0,s.length-k.length).replace(/(.)\/+$/,"$1")}const x=d[b];return g&&!x?m[y]=void 0:m[y]=(x||"").replace(/%2F/g,"/"),m},{}),pathname:s,pathnameBase:c,pattern:t}}function tS(t,l=!1,i=!0){Rt(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,p)=>(r.push({paramName:d,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,l?void 0:"i"),r]}function nS(t){try{return t.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Rt(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),t}}function Nn(t,l){if(l==="/")return t;if(!t.toLowerCase().startsWith(l.toLowerCase()))return null;let i=l.endsWith("/")?l.length-1:l.length,r=t.charAt(i);return r&&r!=="/"?null:t.slice(i)||"/"}function lS({basename:t,pathname:l}){return l==="/"?t:Wn([t,l])}var mv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ud=t=>mv.test(t);function aS(t,l="/"){let{pathname:i,search:r="",hash:o=""}=typeof t=="string"?ca(t):t,s;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?s=Gg(i.substring(1),"/"):s=Gg(i,l)):s=l,{pathname:s,search:rS(r),hash:uS(o)}}function Gg(t,l){let i=l.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?i.length>1&&i.pop():o!=="."&&i.push(o)}),i.length>1?i.join("/"):"/"}function ff(t,l,i,r){return`Cannot include a '${t}' character in a manually specified \`to.${l}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function pv(t){return t.filter((l,i)=>i===0||l.route.path&&l.route.path.length>0)}function od(t){let l=pv(t);return l.map((i,r)=>r===l.length-1?i.pathname:i.pathnameBase)}function sd(t,l,i,r=!1){let o;typeof t=="string"?o=ca(t):(o={...t},Be(!o.pathname||!o.pathname.includes("?"),ff("?","pathname","search",o)),Be(!o.pathname||!o.pathname.includes("#"),ff("#","pathname","hash",o)),Be(!o.search||!o.search.includes("#"),ff("#","search","hash",o)));let s=t===""||o.pathname==="",c=s?"/":o.pathname,d;if(c==null)d=i;else{let g=l.length-1;if(!r&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),g-=1;o.pathname=b.join("/")}d=g>=0?l[g]:"/"}let p=aS(o,d),m=c&&c!=="/"&&c.endsWith("/"),y=(s||c===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(m||y)&&(p.pathname+="/"),p}var Wn=t=>t.join("/").replace(/\/\/+/g,"/"),iS=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),rS=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,uS=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,Xr=class{constructor(t,l,i,r=!1){this.status=t,this.statusText=l||"",this.internal=r,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function Fr(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function Ir(t){return t.map(l=>l.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var gv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function yv(t,l){let i=t;if(typeof i!="string"||!mv.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let r=i,o=!1;if(gv)try{let s=new URL(window.location.href),c=i.startsWith("//")?new URL(s.protocol+i):new URL(i),d=Nn(c.pathname,l);c.origin===s.origin&&d!=null?i=d+c.search+c.hash:o=!0}catch{Rt(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:i}}var sa=Symbol("Uninstrumented");function oS(t,l){let i={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};t.forEach(o=>o({id:l.id,index:l.index,path:l.path,instrument(s){let c=Object.keys(i);for(let d of c)s[d]&&i[d].push(s[d])}}));let r={};if(typeof l.lazy=="function"&&i.lazy.length>0){let o=_i(i.lazy,l.lazy,()=>{});o&&(r.lazy=o)}if(typeof l.lazy=="object"){let o=l.lazy;["middleware","loader","action"].forEach(s=>{let c=o[s],d=i[`lazy.${s}`];if(typeof c=="function"&&d.length>0){let p=_i(d,c,()=>{});p&&(r.lazy=Object.assign(r.lazy||{},{[s]:p}))}})}return["loader","action"].forEach(o=>{let s=l[o];if(typeof s=="function"&&i[o].length>0){let c=s[sa]??s,d=_i(i[o],c,(...p)=>Qg(p[0]));d&&(o==="loader"&&c.hydrate===!0&&(d.hydrate=!0),d[sa]=c,r[o]=d)}}),l.middleware&&l.middleware.length>0&&i.middleware.length>0&&(r.middleware=l.middleware.map(o=>{let s=o[sa]??o,c=_i(i.middleware,s,(...d)=>Qg(d[0]));return c?(c[sa]=s,c):o})),r}function sS(t,l){let i={navigate:[],fetch:[]};if(l.forEach(r=>r({instrument(o){let s=Object.keys(o);for(let c of s)o[c]&&i[c].push(o[c])}})),i.navigate.length>0){let r=t.navigate[sa]??t.navigate,o=_i(i.navigate,r,(...s)=>{let[c,d]=s;return{to:typeof c=="number"||typeof c=="string"?c:c?el(c):".",...Xg(t,d??{})}});o&&(o[sa]=r,t.navigate=o)}if(i.fetch.length>0){let r=t.fetch[sa]??t.fetch,o=_i(i.fetch,r,(...s)=>{let[c,,d,p]=s;return{href:d??".",fetcherKey:c,...Xg(t,p??{})}});o&&(o[sa]=r,t.fetch=o)}return t}function _i(t,l,i){return t.length===0?null:async(...r)=>{let o=await vv(t,i(...r),()=>l(...r),t.length-1);if(o.type==="error")throw o.value;return o.value}}async function vv(t,l,i,r){let o=t[r],s;if(o){let c,d=async()=>(c?console.error("You cannot call instrumented handlers more than once"):c=vv(t,l,i,r-1),s=await c,Be(s,"Expected a result"),s.type==="error"&&s.value instanceof Error?{status:"error",error:s.value}:{status:"success",error:void 0});try{await o(d,l)}catch(p){console.error("An instrumentation function threw an error:",p)}c||await d(),await c}else try{s={type:"success",value:await i()}}catch(c){s={type:"error",value:c}}return s||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Qg(t){let{request:l,context:i,params:r,unstable_pattern:o}=t;return{request:cS(l),params:{...r},unstable_pattern:o,context:fS(i)}}function Xg(t,l){return{currentUrl:el(t.state.location),..."formMethod"in l?{formMethod:l.formMethod}:{},..."formEncType"in l?{formEncType:l.formEncType}:{},..."formData"in l?{formData:l.formData}:{},..."body"in l?{body:l.body}:{}}}function cS(t){return{method:t.method,url:t.url,headers:{get:(...l)=>t.headers.get(...l)}}}function fS(t){if(hS(t)){let l={...t};return Object.freeze(l),l}else return{get:l=>t.get(l)}}var dS=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function hS(t){if(t===null||typeof t!="object")return!1;const l=Object.getPrototypeOf(t);return l===Object.prototype||l===null||Object.getOwnPropertyNames(l).sort().join("\0")===dS}var bv=["POST","PUT","PATCH","DELETE"],mS=new Set(bv),pS=["GET",...bv],gS=new Set(pS),xv=new Set([301,302,303,307,308]),yS=new Set([307,308]),df={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},vS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},_r={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},bS=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),Sv="remix-router-transitions",Ev=Symbol("ResetLoaderData");function xS(t){const l=t.window?t.window:typeof window<"u"?window:void 0,i=typeof l<"u"&&typeof l.document<"u"&&typeof l.document.createElement<"u";Be(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=t.hydrationRouteProperties||[],o=t.mapRouteProperties||bS,s=o;if(t.unstable_instrumentations){let j=t.unstable_instrumentations;s=H=>({...o(H),...oS(j.map(K=>K.route).filter(Boolean),H)})}let c={},d=Vr(t.routes,s,void 0,c),p,m=t.basename||"/";m.startsWith("/")||(m=`/${m}`);let y=t.dataStrategy||CS,g={...t.future},b=null,x=new Set,k=null,T=null,_=null,A=t.hydrationData!=null,R=ra(d,t.history.location,m),O=!1,ee=null,ie;if(R==null&&!t.patchRoutesOnNavigation){let j=Dn(404,{pathname:t.history.location.pathname}),{matches:H,route:K}=yo(d);ie=!0,R=H,ee={[K.id]:j}}else if(R&&!t.hydrationData&&ya(R,d,t.history.location.pathname).active&&(R=null),R)if(R.some(j=>j.route.lazy))ie=!1;else if(!R.some(j=>cd(j.route)))ie=!0;else{let j=t.hydrationData?t.hydrationData.loaderData:null,H=t.hydrationData?t.hydrationData.errors:null;if(H){let K=R.findIndex(oe=>H[oe.route.id]!==void 0);ie=R.slice(0,K+1).every(oe=>!Bf(oe.route,j,H))}else ie=R.every(K=>!Bf(K.route,j,H))}else{ie=!1,R=[];let j=ya(null,d,t.history.location.pathname);j.active&&j.matches&&(O=!0,R=j.matches)}let Y,D={historyAction:t.history.action,location:t.history.location,matches:R,initialized:ie,navigation:df,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||ee,fetchers:new Map,blockers:new Map},re="POP",fe=null,q=!1,V,Z=!1,Q=new Map,ue=null,$=!1,U=!1,J=new Set,se=new Map,xe=0,z=-1,M=new Map,I=new Set,w=new Map,ae=new Map,me=new Set,be=new Map,Ne,pe=null;function Re(){if(b=t.history.listen(({action:j,location:H,delta:K})=>{if(Ne){Ne(),Ne=void 0;return}Rt(be.size===0||K!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let oe=ma({currentLocation:D.location,nextLocation:H,historyAction:j});if(oe&&K!=null){let he=new Promise(ke=>{Ne=ke});t.history.go(K*-1),il(oe,{state:"blocked",location:H,proceed(){il(oe,{state:"proceeding",proceed:void 0,reset:void 0,location:H}),he.then(()=>t.history.go(K))},reset(){let ke=new Map(D.blockers);ke.set(oe,_r),yt({blockers:ke})}}),fe?.resolve(),fe=null;return}return $t(j,H)}),i){FS(l,Q);let j=()=>GS(l,Q);l.addEventListener("pagehide",j),ue=()=>l.removeEventListener("pagehide",j)}return D.initialized||$t("POP",D.location,{initialHydration:!0}),Y}function Dt(){b&&b(),ue&&ue(),x.clear(),V&&V.abort(),D.fetchers.forEach((j,H)=>un(H)),D.blockers.forEach((j,H)=>nu(H))}function Ln(j){return x.add(j),()=>x.delete(j)}function yt(j,H={}){j.matches&&(j.matches=j.matches.map(he=>{let ke=c[he.route.id],ye=he.route;return ye.element!==ke.element||ye.errorElement!==ke.errorElement||ye.hydrateFallbackElement!==ke.hydrateFallbackElement?{...he,route:ke}:he})),D={...D,...j};let K=[],oe=[];D.fetchers.forEach((he,ke)=>{he.state==="idle"&&(me.has(ke)?K.push(ke):oe.push(ke))}),me.forEach(he=>{!D.fetchers.has(he)&&!se.has(he)&&K.push(he)}),[...x].forEach(he=>he(D,{deletedFetchers:K,newErrors:j.errors??null,viewTransitionOpts:H.viewTransitionOpts,flushSync:H.flushSync===!0})),K.forEach(he=>un(he)),oe.forEach(he=>D.fetchers.delete(he))}function Un(j,H,{flushSync:K}={}){let oe=D.actionData!=null&&D.navigation.formMethod!=null&&Gt(D.navigation.formMethod)&&D.navigation.state==="loading"&&j.state?._isRedirect!==!0,he;H.actionData?Object.keys(H.actionData).length>0?he=H.actionData:he=null:oe?he=D.actionData:he=null;let ke=H.loaderData?ny(D.loaderData,H.loaderData,H.matches||[],H.errors):D.loaderData,ye=D.blockers;ye.size>0&&(ye=new Map(ye),ye.forEach((_e,Te)=>ye.set(Te,_r)));let ge=$?!1:lu(j,H.matches||D.matches),ve=q===!0||D.navigation.formMethod!=null&&Gt(D.navigation.formMethod)&&j.state?._isRedirect!==!0;p&&(d=p,p=void 0),$||re==="POP"||(re==="PUSH"?t.history.push(j,j.state):re==="REPLACE"&&t.history.replace(j,j.state));let we;if(re==="POP"){let _e=Q.get(D.location.pathname);_e&&_e.has(j.pathname)?we={currentLocation:D.location,nextLocation:j}:Q.has(j.pathname)&&(we={currentLocation:j,nextLocation:D.location})}else if(Z){let _e=Q.get(D.location.pathname);_e?_e.add(j.pathname):(_e=new Set([j.pathname]),Q.set(D.location.pathname,_e)),we={currentLocation:D.location,nextLocation:j}}yt({...H,actionData:he,loaderData:ke,historyAction:re,location:j,initialized:!0,navigation:df,revalidation:"idle",restoreScrollPosition:ge,preventScrollReset:ve,blockers:ye},{viewTransitionOpts:we,flushSync:K===!0}),re="POP",q=!1,Z=!1,$=!1,U=!1,fe?.resolve(),fe=null,pe?.resolve(),pe=null}async function xn(j,H){if(fe?.resolve(),fe=null,typeof j=="number"){fe||(fe=ry());let Ge=fe.promise;return t.history.go(j),Ge}let K=Uf(D.location,D.matches,m,j,H?.fromRouteId,H?.relative),{path:oe,submission:he,error:ke}=Ig(!1,K,H),ye=D.location,ge=Yr(D.location,oe,H&&H.state);ge={...ge,...t.history.encodeLocation(ge)};let ve=H&&H.replace!=null?H.replace:void 0,we="PUSH";ve===!0?we="REPLACE":ve===!1||he!=null&&Gt(he.formMethod)&&he.formAction===D.location.pathname+D.location.search&&(we="REPLACE");let _e=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,Te=(H&&H.flushSync)===!0,Ke=ma({currentLocation:ye,nextLocation:ge,historyAction:we});if(Ke){il(Ke,{state:"blocked",location:ge,proceed(){il(Ke,{state:"proceeding",proceed:void 0,reset:void 0,location:ge}),xn(j,H)},reset(){let Ge=new Map(D.blockers);Ge.set(Ke,_r),yt({blockers:Ge})}});return}await $t(we,ge,{submission:he,pendingError:ke,preventScrollReset:_e,replace:H&&H.replace,enableViewTransition:H&&H.viewTransition,flushSync:Te,callSiteDefaultShouldRevalidate:H&&H.unstable_defaultShouldRevalidate})}function Rl(){pe||(pe=ry()),de(),yt({revalidation:"loading"});let j=pe.promise;return D.navigation.state==="submitting"?j:D.navigation.state==="idle"?($t(D.historyAction,D.location,{startUninterruptedRevalidation:!0}),j):($t(re||D.historyAction,D.navigation.location,{overrideNavigation:D.navigation,enableViewTransition:Z===!0}),j)}async function $t(j,H,K){V&&V.abort(),V=null,re=j,$=(K&&K.startUninterruptedRevalidation)===!0,ga(D.location,D.matches),q=(K&&K.preventScrollReset)===!0,Z=(K&&K.enableViewTransition)===!0;let oe=p||d,he=K&&K.overrideNavigation,ke=K?.initialHydration&&D.matches&&D.matches.length>0&&!O?D.matches:ra(oe,H,m),ye=(K&&K.flushSync)===!0;if(ke&&D.initialized&&!U&&NS(D.location,H)&&!(K&&K.submission&&Gt(K.submission.formMethod))){Un(H,{matches:ke},{flushSync:ye});return}let ge=ya(ke,oe,H.pathname);if(ge.active&&ge.matches&&(ke=ge.matches),!ke){let{error:vt,notFoundMatches:bt,route:Qe}=jl(H.pathname);Un(H,{matches:bt,loaderData:{},errors:{[Qe.id]:vt}},{flushSync:ye});return}V=new AbortController;let ve=Ti(t.history,H,V.signal,K&&K.submission),we=t.getContext?await t.getContext():new Yg,_e;if(K&&K.pendingError)_e=[ua(ke).route.id,{type:"error",error:K.pendingError}];else if(K&&K.submission&&Gt(K.submission.formMethod)){let vt=await Fa(ve,H,K.submission,ke,we,ge.active,K&&K.initialHydration===!0,{replace:K.replace,flushSync:ye});if(vt.shortCircuited)return;if(vt.pendingActionResult){let[bt,Qe]=vt.pendingActionResult;if(vn(Qe)&&Fr(Qe.error)&&Qe.error.status===404){V=null,Un(H,{matches:vt.matches,loaderData:{},errors:{[bt]:Qe.error}});return}}ke=vt.matches||ke,_e=vt.pendingActionResult,he=hf(H,K.submission),ye=!1,ge.active=!1,ve=Ti(t.history,ve.url,ve.signal)}let{shortCircuited:Te,matches:Ke,loaderData:Ge,errors:gt}=await Ga(ve,H,ke,we,ge.active,he,K&&K.submission,K&&K.fetcherSubmission,K&&K.replace,K&&K.initialHydration===!0,ye,_e,K&&K.callSiteDefaultShouldRevalidate);Te||(V=null,Un(H,{matches:Ke||ke,...ly(_e),loaderData:Ge,errors:gt}))}async function Fa(j,H,K,oe,he,ke,ye,ge={}){de();let ve=YS(H,K);if(yt({navigation:ve},{flushSync:ge.flushSync===!0}),ke){let Te=await Nl(oe,H.pathname,j.signal);if(Te.type==="aborted")return{shortCircuited:!0};if(Te.type==="error"){if(Te.partialMatches.length===0){let{matches:Ge,route:gt}=yo(d);return{matches:Ge,pendingActionResult:[gt.id,{type:"error",error:Te.error}]}}let Ke=ua(Te.partialMatches).route.id;return{matches:Te.partialMatches,pendingActionResult:[Ke,{type:"error",error:Te.error}]}}else if(Te.matches)oe=Te.matches;else{let{notFoundMatches:Ke,error:Ge,route:gt}=jl(H.pathname);return{matches:Ke,pendingActionResult:[gt.id,{type:"error",error:Ge}]}}}let we,_e=Ao(oe,H);if(!_e.route.action&&!_e.route.lazy)we={type:"error",error:Dn(405,{method:j.method,pathname:H.pathname,routeId:_e.route.id})};else{let Te=zi(s,c,j,oe,_e,ye?[]:r,he),Ke=await al(j,Te,he,null);if(we=Ke[_e.route.id],!we){for(let Ge of oe)if(Ke[Ge.route.id]){we=Ke[Ge.route.id];break}}if(j.signal.aborted)return{shortCircuited:!0}}if(Ba(we)){let Te;return ge&&ge.replace!=null?Te=ge.replace:Te=Wg(we.response.headers.get("Location"),new URL(j.url),m,t.history)===D.location.pathname+D.location.search,await pt(j,we,!0,{submission:K,replace:Te}),{shortCircuited:!0}}if(vn(we)){let Te=ua(oe,_e.route.id);return(ge&&ge.replace)!==!0&&(re="PUSH"),{matches:oe,pendingActionResult:[Te.route.id,we,_e.route.id]}}return{matches:oe,pendingActionResult:[_e.route.id,we]}}async function Ga(j,H,K,oe,he,ke,ye,ge,ve,we,_e,Te,Ke){let Ge=ke||hf(H,ye),gt=ye||ge||iy(Ge),vt=!$&&!we;if(he){if(vt){let Et=ll(Te);yt({navigation:Ge,...Et!==void 0?{actionData:Et}:{}},{flushSync:_e})}let Xe=await Nl(K,H.pathname,j.signal);if(Xe.type==="aborted")return{shortCircuited:!0};if(Xe.type==="error"){if(Xe.partialMatches.length===0){let{matches:Yn,route:Bt}=yo(d);return{matches:Yn,loaderData:{},errors:{[Bt.id]:Xe.error}}}let Et=ua(Xe.partialMatches).route.id;return{matches:Xe.partialMatches,loaderData:{},errors:{[Et]:Xe.error}}}else if(Xe.matches)K=Xe.matches;else{let{error:Et,notFoundMatches:Yn,route:Bt}=jl(H.pathname);return{matches:Yn,loaderData:{},errors:{[Bt.id]:Et}}}}let bt=p||d,{dsMatches:Qe,revalidatingFetchers:Mt}=Zg(j,oe,s,c,t.history,D,K,gt,H,we?[]:r,we===!0,U,J,me,w,I,bt,m,t.patchRoutesOnNavigation!=null,Te,Ke);if(z=++xe,!t.dataStrategy&&!Qe.some(Xe=>Xe.shouldLoad)&&!Qe.some(Xe=>Xe.route.middleware&&Xe.route.middleware.length>0)&&Mt.length===0){let Xe=tt();return Un(H,{matches:K,loaderData:{},errors:Te&&vn(Te[1])?{[Te[0]]:Te[1].error}:null,...ly(Te),...Xe?{fetchers:new Map(D.fetchers)}:{}},{flushSync:_e}),{shortCircuited:!0}}if(vt){let Xe={};if(!he){Xe.navigation=Ge;let Et=ll(Te);Et!==void 0&&(Xe.actionData=Et)}Mt.length>0&&(Xe.fetchers=Dl(Mt)),yt(Xe,{flushSync:_e})}Mt.forEach(Xe=>{nt(Xe.key),Xe.controller&&se.set(Xe.key,Xe.controller)});let Pt=()=>Mt.forEach(Xe=>nt(Xe.key));V&&V.signal.addEventListener("abort",Pt);let{loaderResults:ht,fetcherResults:Hn}=await te(Qe,Mt,j,oe);if(j.signal.aborted)return{shortCircuited:!0};V&&V.signal.removeEventListener("abort",Pt),Mt.forEach(Xe=>se.delete(Xe.key));let sn=vo(ht);if(sn)return await pt(j,sn.result,!0,{replace:ve}),{shortCircuited:!0};if(sn=vo(Hn),sn)return I.add(sn.key),await pt(j,sn.result,!0,{replace:ve}),{shortCircuited:!0};let{loaderData:qn,errors:Sn}=ty(D,K,ht,Te,Mt,Hn);we&&D.errors&&(Sn={...D.errors,...Sn});let ul=tt(),va=Bn(z),ba=ul||va||Mt.length>0;return{matches:K,loaderData:qn,errors:Sn,...ba?{fetchers:new Map(D.fetchers)}:{}}}function ll(j){if(j&&!vn(j[1]))return{[j[0]]:j[1].data};if(D.actionData)return Object.keys(D.actionData).length===0?null:D.actionData}function Dl(j){return j.forEach(H=>{let K=D.fetchers.get(H.key),oe=zr(void 0,K?K.data:void 0);D.fetchers.set(H.key,oe)}),new Map(D.fetchers)}async function ha(j,H,K,oe){nt(j);let he=(oe&&oe.flushSync)===!0,ke=p||d,ye=Uf(D.location,D.matches,m,K,H,oe?.relative),ge=ra(ke,ye,m),ve=ya(ge,ke,ye);if(ve.active&&ve.matches&&(ge=ve.matches),!ge){je(j,H,Dn(404,{pathname:ye}),{flushSync:he});return}let{path:we,submission:_e,error:Te}=Ig(!0,ye,oe);if(Te){je(j,H,Te,{flushSync:he});return}let Ke=t.getContext?await t.getContext():new Yg,Ge=(oe&&oe.preventScrollReset)===!0;if(_e&&Gt(_e.formMethod)){await Li(j,H,we,ge,Ke,ve.active,he,Ge,_e,oe&&oe.unstable_defaultShouldRevalidate);return}w.set(j,{routeId:H,path:we}),await Ui(j,H,we,ge,Ke,ve.active,he,Ge,_e)}async function Li(j,H,K,oe,he,ke,ye,ge,ve,we){de(),w.delete(j);let _e=D.fetchers.get(j);Ce(j,VS(ve,_e),{flushSync:ye});let Te=new AbortController,Ke=Ti(t.history,K,Te.signal,ve);if(ke){let Ie=await Nl(oe,new URL(Ke.url).pathname,Ke.signal,j);if(Ie.type==="aborted")return;if(Ie.type==="error"){je(j,H,Ie.error,{flushSync:ye});return}else if(Ie.matches)oe=Ie.matches;else{je(j,H,Dn(404,{pathname:K}),{flushSync:ye});return}}let Ge=Ao(oe,K);if(!Ge.route.action&&!Ge.route.lazy){let Ie=Dn(405,{method:ve.formMethod,pathname:K,routeId:H});je(j,H,Ie,{flushSync:ye});return}se.set(j,Te);let gt=xe,vt=zi(s,c,Ke,oe,Ge,r,he),bt=await al(Ke,vt,he,j),Qe=bt[Ge.route.id];if(!Qe){for(let Ie of vt)if(bt[Ie.route.id]){Qe=bt[Ie.route.id];break}}if(Ke.signal.aborted){se.get(j)===Te&&se.delete(j);return}if(me.has(j)){if(Ba(Qe)||vn(Qe)){Ce(j,Al(void 0));return}}else{if(Ba(Qe))if(se.delete(j),z>gt){Ce(j,Al(void 0));return}else return I.add(j),Ce(j,zr(ve)),pt(Ke,Qe,!1,{fetcherSubmission:ve,preventScrollReset:ge});if(vn(Qe)){je(j,H,Qe.error);return}}let Mt=D.navigation.location||D.location,Pt=Ti(t.history,Mt,Te.signal),ht=p||d,Hn=D.navigation.state!=="idle"?ra(ht,D.navigation.location,m):D.matches;Be(Hn,"Didn't find any matches after fetcher action");let sn=++xe;M.set(j,sn);let qn=zr(ve,Qe.data);D.fetchers.set(j,qn);let{dsMatches:Sn,revalidatingFetchers:ul}=Zg(Pt,he,s,c,t.history,D,Hn,ve,Mt,r,!1,U,J,me,w,I,ht,m,t.patchRoutesOnNavigation!=null,[Ge.route.id,Qe],we);ul.filter(Ie=>Ie.key!==j).forEach(Ie=>{let xa=Ie.key,iu=D.fetchers.get(xa),Bi=zr(void 0,iu?iu.data:void 0);D.fetchers.set(xa,Bi),nt(xa),Ie.controller&&se.set(xa,Ie.controller)}),yt({fetchers:new Map(D.fetchers)});let va=()=>ul.forEach(Ie=>nt(Ie.key));Te.signal.addEventListener("abort",va);let{loaderResults:ba,fetcherResults:Xe}=await te(Sn,ul,Pt,he);if(Te.signal.aborted)return;if(Te.signal.removeEventListener("abort",va),M.delete(j),se.delete(j),ul.forEach(Ie=>se.delete(Ie.key)),D.fetchers.has(j)){let Ie=Al(Qe.data);D.fetchers.set(j,Ie)}let Et=vo(ba);if(Et)return pt(Pt,Et.result,!1,{preventScrollReset:ge});if(Et=vo(Xe),Et)return I.add(Et.key),pt(Pt,Et.result,!1,{preventScrollReset:ge});let{loaderData:Yn,errors:Bt}=ty(D,Hn,ba,void 0,ul,Xe);Bn(sn),D.navigation.state==="loading"&&sn>z?(Be(re,"Expected pending action"),V&&V.abort(),Un(D.navigation.location,{matches:Hn,loaderData:Yn,errors:Bt,fetchers:new Map(D.fetchers)})):(yt({errors:Bt,loaderData:ny(D.loaderData,Yn,Hn,Bt),fetchers:new Map(D.fetchers)}),U=!1)}async function Ui(j,H,K,oe,he,ke,ye,ge,ve){let we=D.fetchers.get(j);Ce(j,zr(ve,we?we.data:void 0),{flushSync:ye});let _e=new AbortController,Te=Ti(t.history,K,_e.signal);if(ke){let Qe=await Nl(oe,new URL(Te.url).pathname,Te.signal,j);if(Qe.type==="aborted")return;if(Qe.type==="error"){je(j,H,Qe.error,{flushSync:ye});return}else if(Qe.matches)oe=Qe.matches;else{je(j,H,Dn(404,{pathname:K}),{flushSync:ye});return}}let Ke=Ao(oe,K);se.set(j,_e);let Ge=xe,gt=zi(s,c,Te,oe,Ke,r,he),bt=(await al(Te,gt,he,j))[Ke.route.id];if(se.get(j)===_e&&se.delete(j),!Te.signal.aborted){if(me.has(j)){Ce(j,Al(void 0));return}if(Ba(bt))if(z>Ge){Ce(j,Al(void 0));return}else{I.add(j),await pt(Te,bt,!1,{preventScrollReset:ge});return}if(vn(bt)){je(j,H,bt.error);return}Ce(j,Al(bt.data))}}async function pt(j,H,K,{submission:oe,fetcherSubmission:he,preventScrollReset:ke,replace:ye}={}){K||(fe?.resolve(),fe=null),H.response.headers.has("X-Remix-Revalidate")&&(U=!0);let ge=H.response.headers.get("Location");Be(ge,"Expected a Location header on the redirect Response"),ge=Wg(ge,new URL(j.url),m,t.history);let ve=Yr(D.location,ge,{_isRedirect:!0});if(i){let gt=!1;if(H.response.headers.has("X-Remix-Reload-Document"))gt=!0;else if(ud(ge)){const vt=fv(ge,!0);gt=vt.origin!==l.location.origin||Nn(vt.pathname,m)==null}if(gt){ye?l.location.replace(ge):l.location.assign(ge);return}}V=null;let we=ye===!0||H.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:_e,formAction:Te,formEncType:Ke}=D.navigation;!oe&&!he&&_e&&Te&&Ke&&(oe=iy(D.navigation));let Ge=oe||he;if(yS.has(H.response.status)&&Ge&&Gt(Ge.formMethod))await $t(we,ve,{submission:{...Ge,formAction:ge},preventScrollReset:ke||q,enableViewTransition:K?Z:void 0});else{let gt=hf(ve,oe);await $t(we,ve,{overrideNavigation:gt,fetcherSubmission:he,preventScrollReset:ke||q,enableViewTransition:K?Z:void 0})}}async function al(j,H,K,oe){let he,ke={};try{he=await AS(y,j,H,oe,K,!1)}catch(ye){return H.filter(ge=>ge.shouldLoad).forEach(ge=>{ke[ge.route.id]={type:"error",error:ye}}),ke}if(j.signal.aborted)return ke;if(!Gt(j.method))for(let ye of H){if(he[ye.route.id]?.type==="error")break;!he.hasOwnProperty(ye.route.id)&&!D.loaderData.hasOwnProperty(ye.route.id)&&(!D.errors||!D.errors.hasOwnProperty(ye.route.id))&&ye.shouldCallHandler()&&(he[ye.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ye.route.id}`)})}for(let[ye,ge]of Object.entries(he))if(US(ge)){let ve=ge.result;ke[ye]={type:"redirect",response:DS(ve,j,ye,H,m)}}else ke[ye]=await RS(ge);return ke}async function te(j,H,K,oe){let he=al(K,j,oe,null),ke=Promise.all(H.map(async ve=>{if(ve.matches&&ve.match&&ve.request&&ve.controller){let _e=(await al(ve.request,ve.matches,oe,ve.key))[ve.match.route.id];return{[ve.key]:_e}}else return Promise.resolve({[ve.key]:{type:"error",error:Dn(404,{pathname:ve.path})}})})),ye=await he,ge=(await ke).reduce((ve,we)=>Object.assign(ve,we),{});return{loaderResults:ye,fetcherResults:ge}}function de(){U=!0,w.forEach((j,H)=>{se.has(H)&&J.add(H),nt(H)})}function Ce(j,H,K={}){D.fetchers.set(j,H),yt({fetchers:new Map(D.fetchers)},{flushSync:(K&&K.flushSync)===!0})}function je(j,H,K,oe={}){let he=ua(D.matches,H);un(j),yt({errors:{[he.route.id]:K},fetchers:new Map(D.fetchers)},{flushSync:(oe&&oe.flushSync)===!0})}function Pe(j){return ae.set(j,(ae.get(j)||0)+1),me.has(j)&&me.delete(j),D.fetchers.get(j)||vS}function It(j,H){nt(j,H?.reason),Ce(j,Al(null))}function un(j){let H=D.fetchers.get(j);se.has(j)&&!(H&&H.state==="loading"&&M.has(j))&&nt(j),w.delete(j),M.delete(j),I.delete(j),me.delete(j),J.delete(j),D.fetchers.delete(j)}function Lt(j){let H=(ae.get(j)||0)-1;H<=0?(ae.delete(j),me.add(j)):ae.set(j,H),yt({fetchers:new Map(D.fetchers)})}function nt(j,H){let K=se.get(j);K&&(K.abort(H),se.delete(j))}function Ut(j){for(let H of j){let K=Pe(H),oe=Al(K.data);D.fetchers.set(H,oe)}}function tt(){let j=[],H=!1;for(let K of I){let oe=D.fetchers.get(K);Be(oe,`Expected fetcher: ${K}`),oe.state==="loading"&&(I.delete(K),j.push(K),H=!0)}return Ut(j),H}function Bn(j){let H=[];for(let[K,oe]of M)if(oe<j){let he=D.fetchers.get(K);Be(he,`Expected fetcher: ${K}`),he.state==="loading"&&(nt(K),M.delete(K),H.push(K))}return Ut(H),H.length>0}function on(j,H){let K=D.blockers.get(j)||_r;return be.get(j)!==H&&be.set(j,H),K}function nu(j){D.blockers.delete(j),be.delete(j)}function il(j,H){let K=D.blockers.get(j)||_r;Be(K.state==="unblocked"&&H.state==="blocked"||K.state==="blocked"&&H.state==="blocked"||K.state==="blocked"&&H.state==="proceeding"||K.state==="blocked"&&H.state==="unblocked"||K.state==="proceeding"&&H.state==="unblocked",`Invalid blocker state transition: ${K.state} -> ${H.state}`);let oe=new Map(D.blockers);oe.set(j,H),yt({blockers:oe})}function ma({currentLocation:j,nextLocation:H,historyAction:K}){if(be.size===0)return;be.size>1&&Rt(!1,"A router only supports one blocker at a time");let oe=Array.from(be.entries()),[he,ke]=oe[oe.length-1],ye=D.blockers.get(he);if(!(ye&&ye.state==="proceeding")&&ke({currentLocation:j,nextLocation:H,historyAction:K}))return he}function jl(j){let H=Dn(404,{pathname:j}),K=p||d,{matches:oe,route:he}=yo(K);return{notFoundMatches:oe,route:he,error:H}}function rl(j,H,K){if(k=j,_=H,T=K||null,!A&&D.navigation===df){A=!0;let oe=lu(D.location,D.matches);oe!=null&&yt({restoreScrollPosition:oe})}return()=>{k=null,_=null,T=null}}function pa(j,H){return T&&T(j,H.map(oe=>Gx(oe,D.loaderData)))||j.key}function ga(j,H){if(k&&_){let K=pa(j,H);k[K]=_()}}function lu(j,H){if(k){let K=pa(j,H),oe=k[K];if(typeof oe=="number")return oe}return null}function ya(j,H,K){if(t.patchRoutesOnNavigation)if(j){if(Object.keys(j[0].params).length>0)return{active:!0,matches:Lr(H,K,m,!0)}}else return{active:!0,matches:Lr(H,K,m,!0)||[]};return{active:!1,matches:null}}async function Nl(j,H,K,oe){if(!t.patchRoutesOnNavigation)return{type:"success",matches:j};let he=j;for(;;){let ke=p==null,ye=p||d,ge=c;try{await t.patchRoutesOnNavigation({signal:K,path:H,matches:he,fetcherKey:oe,patch:(_e,Te)=>{K.aborted||Kg(_e,Te,ye,ge,s,!1)}})}catch(_e){return{type:"error",error:_e,partialMatches:he}}finally{ke&&!K.aborted&&(d=[...d])}if(K.aborted)return{type:"aborted"};let ve=ra(ye,H,m),we=null;if(ve){if(Object.keys(ve[0].params).length===0)return{type:"success",matches:ve};if(we=Lr(ye,H,m,!0),!(we&&he.length<we.length&&Ml(he,we.slice(0,he.length))))return{type:"success",matches:ve}}if(we||(we=Lr(ye,H,m,!0)),!we||Ml(he,we))return{type:"success",matches:null};he=we}}function Ml(j,H){return j.length===H.length&&j.every((K,oe)=>K.route.id===H[oe].route.id)}function $o(j){c={},p=Vr(j,s,void 0,c)}function au(j,H,K=!1){let oe=p==null;Kg(j,H,p||d,c,s,K),oe&&(d=[...d],yt({}))}return Y={get basename(){return m},get future(){return g},get state(){return D},get routes(){return d},get window(){return l},initialize:Re,subscribe:Ln,enableScrollRestoration:rl,navigate:xn,fetch:ha,revalidate:Rl,createHref:j=>t.history.createHref(j),encodeLocation:j=>t.history.encodeLocation(j),getFetcher:Pe,resetFetcher:It,deleteFetcher:Lt,dispose:Dt,getBlocker:on,deleteBlocker:nu,patchRoutes:au,_internalFetchControllers:se,_internalSetRoutes:$o,_internalSetStateDoNotUseOrYouWillBreakYourApp(j){yt(j)}},t.unstable_instrumentations&&(Y=sS(Y,t.unstable_instrumentations.map(j=>j.router).filter(Boolean))),Y}function SS(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function Uf(t,l,i,r,o,s){let c,d;if(o){c=[];for(let m of l)if(c.push(m),m.route.id===o){d=m;break}}else c=l,d=l[l.length-1];let p=sd(r||".",od(c),Nn(t.pathname,i)||t.pathname,s==="path");if(r==null&&(p.search=t.search,p.hash=t.hash),(r==null||r===""||r===".")&&d){let m=dd(p.search);if(d.route.index&&!m)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&m){let y=new URLSearchParams(p.search),g=y.getAll("index");y.delete("index"),g.filter(x=>x).forEach(x=>y.append("index",x));let b=y.toString();p.search=b?`?${b}`:""}}return i!=="/"&&(p.pathname=lS({basename:i,pathname:p.pathname})),el(p)}function Ig(t,l,i){if(!i||!SS(i))return{path:l};if(i.formMethod&&!qS(i.formMethod))return{path:l,error:Dn(405,{method:i.formMethod})};let r=()=>({path:l,error:Dn(400,{type:"invalid-body"})}),s=(i.formMethod||"get").toUpperCase(),c=_v(l);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!Gt(s))return r();let g=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((b,[x,k])=>`${b}${x}=${k}
10
- `,""):String(i.body);return{path:l,submission:{formMethod:s,formAction:c,formEncType:i.formEncType,formData:void 0,json:void 0,text:g}}}else if(i.formEncType==="application/json"){if(!Gt(s))return r();try{let g=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:l,submission:{formMethod:s,formAction:c,formEncType:i.formEncType,formData:void 0,json:g,text:void 0}}}catch{return r()}}}Be(typeof FormData=="function","FormData is not available in this environment");let d,p;if(i.formData)d=qf(i.formData),p=i.formData;else if(i.body instanceof FormData)d=qf(i.body),p=i.body;else if(i.body instanceof URLSearchParams)d=i.body,p=ey(d);else if(i.body==null)d=new URLSearchParams,p=new FormData;else try{d=new URLSearchParams(i.body),p=ey(d)}catch{return r()}let m={formMethod:s,formAction:c,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(Gt(m.formMethod))return{path:l,submission:m};let y=ca(l);return t&&y.search&&dd(y.search)&&d.append("index",""),y.search=`?${d}`,{path:el(y),submission:m}}function Zg(t,l,i,r,o,s,c,d,p,m,y,g,b,x,k,T,_,A,R,O,ee){let ie=O?vn(O[1])?O[1].error:O[1].data:void 0,Y=o.createURL(s.location),D=o.createURL(p),re;if(y&&s.errors){let $=Object.keys(s.errors)[0];re=c.findIndex(U=>U.route.id===$)}else if(O&&vn(O[1])){let $=O[0];re=c.findIndex(U=>U.route.id===$)-1}let fe=O?O[1].statusCode:void 0,q=fe&&fe>=400,V={currentUrl:Y,currentParams:s.matches[0]?.params||{},nextUrl:D,nextParams:c[0].params,...d,actionResult:ie,actionStatus:fe},Z=Ir(c),Q=c.map(($,U)=>{let{route:J}=$,se=null;if(re!=null&&U>re?se=!1:J.lazy?se=!0:cd(J)?y?se=Bf(J,s.loaderData,s.errors):ES(s.loaderData,s.matches[U],$)&&(se=!0):se=!1,se!==null)return Hf(i,r,t,Z,$,m,l,se);let xe=!1;typeof ee=="boolean"?xe=ee:q?xe=!1:(g||Y.pathname+Y.search===D.pathname+D.search||Y.search!==D.search||wS(s.matches[U],$))&&(xe=!0);let z={...V,defaultShouldRevalidate:xe},M=Ur($,z);return Hf(i,r,t,Z,$,m,l,M,z,ee)}),ue=[];return k.forEach(($,U)=>{if(y||!c.some(ae=>ae.route.id===$.routeId)||x.has(U))return;let J=s.fetchers.get(U),se=J&&J.state!=="idle"&&J.data===void 0,xe=ra(_,$.path,A);if(!xe){if(R&&se)return;ue.push({key:U,routeId:$.routeId,path:$.path,matches:null,match:null,request:null,controller:null});return}if(T.has(U))return;let z=Ao(xe,$.path),M=new AbortController,I=Ti(o,$.path,M.signal),w=null;if(b.has(U))b.delete(U),w=zi(i,r,I,xe,z,m,l);else if(se)g&&(w=zi(i,r,I,xe,z,m,l));else{let ae;typeof ee=="boolean"?ae=ee:q?ae=!1:ae=g;let me={...V,defaultShouldRevalidate:ae};Ur(z,me)&&(w=zi(i,r,I,xe,z,m,l,me))}w&&ue.push({key:U,routeId:$.routeId,path:$.path,matches:w,match:z,request:I,controller:M})}),{dsMatches:Q,revalidatingFetchers:ue}}function cd(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function Bf(t,l,i){if(t.lazy)return!0;if(!cd(t))return!1;let r=l!=null&&t.id in l,o=i!=null&&i[t.id]!==void 0;return!r&&o?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!r&&!o}function ES(t,l,i){let r=!l||i.route.id!==l.route.id,o=!t.hasOwnProperty(i.route.id);return r||o}function wS(t,l){let i=t.route.path;return t.pathname!==l.pathname||i!=null&&i.endsWith("*")&&t.params["*"]!==l.params["*"]}function Ur(t,l){if(t.route.shouldRevalidate){let i=t.route.shouldRevalidate(l);if(typeof i=="boolean")return i}return l.defaultShouldRevalidate}function Kg(t,l,i,r,o,s){let c;if(t){let m=r[t];Be(m,`No route found to patch children into: routeId = ${t}`),m.children||(m.children=[]),c=m.children}else c=i;let d=[],p=[];if(l.forEach(m=>{let y=c.find(g=>wv(m,g));y?p.push({existingRoute:y,newRoute:m}):d.push(m)}),d.length>0){let m=Vr(d,o,[t||"_","patch",String(c?.length||"0")],r);c.push(...m)}if(s&&p.length>0)for(let m=0;m<p.length;m++){let{existingRoute:y,newRoute:g}=p[m],b=y,[x]=Vr([g],o,[],{},!0);Object.assign(b,{element:x.element?x.element:b.element,errorElement:x.errorElement?x.errorElement:b.errorElement,hydrateFallbackElement:x.hydrateFallbackElement?x.hydrateFallbackElement:b.hydrateFallbackElement})}}function wv(t,l){return"id"in t&&"id"in l&&t.id===l.id?!0:t.index===l.index&&t.path===l.path&&t.caseSensitive===l.caseSensitive?(!t.children||t.children.length===0)&&(!l.children||l.children.length===0)?!0:t.children.every((i,r)=>l.children?.some(o=>wv(i,o))):!1}var $g=new WeakMap,kv=({key:t,route:l,manifest:i,mapRouteProperties:r})=>{let o=i[l.id];if(Be(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let s=o.lazy[t];if(!s)return;let c=$g.get(o);c||(c={},$g.set(o,c));let d=c[t];if(d)return d;let p=(async()=>{let m=qx(t),g=o[t]!==void 0&&t!=="hasErrorBoundary";if(m)Rt(!m,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),c[t]=Promise.resolve();else if(g)Rt(!1,`Route "${o.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let b=await s();b!=null&&(Object.assign(o,{[t]:b}),Object.assign(o,r(o)))}typeof o.lazy=="object"&&(o.lazy[t]=void 0,Object.values(o.lazy).every(b=>b===void 0)&&(o.lazy=void 0))})();return c[t]=p,p},Pg=new WeakMap;function kS(t,l,i,r,o){let s=i[t.id];if(Be(s,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let y=Pg.get(s);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let g=(async()=>{Be(typeof t.lazy=="function","No lazy route function found");let b=await t.lazy(),x={};for(let k in b){let T=b[k];if(T===void 0)continue;let _=Vx(k),R=s[k]!==void 0&&k!=="hasErrorBoundary";_?Rt(!_,"Route property "+k+" is not a supported property to be returned from a lazy route function. This property will be ignored."):R?Rt(!R,`Route "${s.id}" has a static property "${k}" defined but its lazy function is also returning a value for this property. The lazy route property "${k}" will be ignored.`):x[k]=T}Object.assign(s,x),Object.assign(s,{...r(s),lazy:void 0})})();return Pg.set(s,g),g.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:g}}let c=Object.keys(t.lazy),d=[],p;for(let y of c){if(o&&o.includes(y))continue;let g=kv({key:y,route:t,manifest:i,mapRouteProperties:r});g&&(d.push(g),y===l&&(p=g))}let m=d.length>0?Promise.all(d).then(()=>{}):void 0;return m?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:p}}async function Jg(t){let l=t.matches.filter(o=>o.shouldLoad),i={};return(await Promise.all(l.map(o=>o.resolve()))).forEach((o,s)=>{i[l[s].route.id]=o}),i}async function CS(t){return t.matches.some(l=>l.route.middleware)?Cv(t,()=>Jg(t)):Jg(t)}function Cv(t,l){return TS(t,l,r=>{if(HS(r))throw r;return r},OS,i);function i(r,o,s){if(s)return Promise.resolve(Object.assign(s.value,{[o]:{type:"error",result:r}}));{let{matches:c}=t,d=Math.min(Math.max(c.findIndex(m=>m.route.id===o),0),Math.max(c.findIndex(m=>m.shouldCallHandler()),0)),p=ua(c,c[d].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:r}})}}}async function TS(t,l,i,r,o){let{matches:s,request:c,params:d,context:p,unstable_pattern:m}=t,y=s.flatMap(b=>b.route.middleware?b.route.middleware.map(x=>[b.route.id,x]):[]);return await Tv({request:c,params:d,context:p,unstable_pattern:m},y,l,i,r,o)}async function Tv(t,l,i,r,o,s,c=0){let{request:d}=t;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let p=l[c];if(!p)return await i();let[m,y]=p,g,b=async()=>{if(g)throw new Error("You may only call `next()` once per middleware");try{return g={value:await Tv(t,l,i,r,o,s,c+1)},g.value}catch(x){return g={value:await s(x,m,g)},g.value}};try{let x=await y(t,b),k=x!=null?r(x):void 0;return o(k)?k:g?k??g.value:(g={value:await b()},g.value)}catch(x){return await s(x,m,g)}}function Av(t,l,i,r,o){let s=kv({key:"middleware",route:r.route,manifest:l,mapRouteProperties:t}),c=kS(r.route,Gt(i.method)?"action":"loader",l,t,o);return{middleware:s,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function Hf(t,l,i,r,o,s,c,d,p=null,m){let y=!1,g=Av(t,l,i,o,s);return{...o,_lazyPromises:g,shouldLoad:d,shouldRevalidateArgs:p,shouldCallHandler(b){return y=!0,p?typeof m=="boolean"?Ur(o,{...p,defaultShouldRevalidate:m}):typeof b=="boolean"?Ur(o,{...p,defaultShouldRevalidate:b}):Ur(o,p):d},resolve(b){let{lazy:x,loader:k,middleware:T}=o.route,_=y||d||b&&!Gt(i.method)&&(x||k),A=T&&T.length>0&&!k&&!x;return _&&(Gt(i.method)||!A)?_S({request:i,unstable_pattern:r,match:o,lazyHandlerPromise:g?.handler,lazyRoutePromise:g?.route,handlerOverride:b,scopedContext:c}):Promise.resolve({type:"data",result:void 0})}}}function zi(t,l,i,r,o,s,c,d=null){return r.map(p=>p.route.id!==o.route.id?{...p,shouldLoad:!1,shouldRevalidateArgs:d,shouldCallHandler:()=>!1,_lazyPromises:Av(t,l,i,p,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Hf(t,l,i,Ir(r),p,s,c,!0,d))}async function AS(t,l,i,r,o,s){i.some(m=>m._lazyPromises?.middleware)&&await Promise.all(i.map(m=>m._lazyPromises?.middleware));let c={request:l,unstable_pattern:Ir(i),params:i[0].params,context:o,matches:i},p=await t({...c,fetcherKey:r,runClientMiddleware:m=>{let y=c;return Cv(y,()=>m({...y,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(i.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return p}async function _S({request:t,unstable_pattern:l,match:i,lazyHandlerPromise:r,lazyRoutePromise:o,handlerOverride:s,scopedContext:c}){let d,p,m=Gt(t.method),y=m?"action":"loader",g=b=>{let x,k=new Promise((A,R)=>x=R);p=()=>x(),t.signal.addEventListener("abort",p);let T=A=>typeof b!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${y}" [routeId: ${i.route.id}]`)):b({request:t,unstable_pattern:l,params:i.params,context:c},...A!==void 0?[A]:[]),_=(async()=>{try{return{type:"data",result:await(s?s(R=>T(R)):T())}}catch(A){return{type:"error",result:A}}})();return Promise.race([_,k])};try{let b=m?i.route.action:i.route.loader;if(r||o)if(b){let x,[k]=await Promise.all([g(b).catch(T=>{x=T}),r,o]);if(x!==void 0)throw x;d=k}else{await r;let x=m?i.route.action:i.route.loader;if(x)[d]=await Promise.all([g(x),o]);else if(y==="action"){let k=new URL(t.url),T=k.pathname+k.search;throw Dn(405,{method:t.method,pathname:T,routeId:i.route.id})}else return{type:"data",result:void 0}}else if(b)d=await g(b);else{let x=new URL(t.url),k=x.pathname+x.search;throw Dn(404,{pathname:k})}}catch(b){return{type:"error",result:b}}finally{p&&t.signal.removeEventListener("abort",p)}return d}async function zS(t){let l=t.headers.get("Content-Type");return l&&/\bapplication\/json\b/.test(l)?t.body==null?null:t.json():t.text()}async function RS(t){let{result:l,type:i}=t;if(fd(l)){let r;try{r=await zS(l)}catch(o){return{type:"error",error:o}}return i==="error"?{type:"error",error:new Xr(l.status,l.statusText,r),statusCode:l.status,headers:l.headers}:{type:"data",data:r,statusCode:l.status,headers:l.headers}}return i==="error"?ay(l)?l.data instanceof Error?{type:"error",error:l.data,statusCode:l.init?.status,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"error",error:MS(l),statusCode:Fr(l)?l.status:void 0,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"error",error:l,statusCode:Fr(l)?l.status:void 0}:ay(l)?{type:"data",data:l.data,statusCode:l.init?.status,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"data",data:l}}function DS(t,l,i,r,o){let s=t.headers.get("Location");if(Be(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!ud(s)){let c=r.slice(0,r.findIndex(d=>d.route.id===i)+1);s=Uf(new URL(l.url),c,o,s),t.headers.set("Location",s)}return t}function Wg(t,l,i,r){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(ud(t)){let s=t,c=s.startsWith("//")?new URL(l.protocol+s):new URL(s);if(o.includes(c.protocol))throw new Error("Invalid redirect location");let d=Nn(c.pathname,i)!=null;if(c.origin===l.origin&&d)return c.pathname+c.search+c.hash}try{let s=r.createURL(t);if(o.includes(s.protocol))throw new Error("Invalid redirect location")}catch{}return t}function Ti(t,l,i,r){let o=t.createURL(_v(l)).toString(),s={signal:i};if(r&&Gt(r.formMethod)){let{formMethod:c,formEncType:d}=r;s.method=c.toUpperCase(),d==="application/json"?(s.headers=new Headers({"Content-Type":d}),s.body=JSON.stringify(r.json)):d==="text/plain"?s.body=r.text:d==="application/x-www-form-urlencoded"&&r.formData?s.body=qf(r.formData):s.body=r.formData}return new Request(o,s)}function qf(t){let l=new URLSearchParams;for(let[i,r]of t.entries())l.append(i,typeof r=="string"?r:r.name);return l}function ey(t){let l=new FormData;for(let[i,r]of t.entries())l.append(i,r);return l}function jS(t,l,i,r=!1,o=!1){let s={},c=null,d,p=!1,m={},y=i&&vn(i[1])?i[1].error:void 0;return t.forEach(g=>{if(!(g.route.id in l))return;let b=g.route.id,x=l[b];if(Be(!Ba(x),"Cannot handle redirect results in processLoaderData"),vn(x)){let k=x.error;if(y!==void 0&&(k=y,y=void 0),c=c||{},o)c[b]=k;else{let T=ua(t,b);c[T.route.id]==null&&(c[T.route.id]=k)}r||(s[b]=Ev),p||(p=!0,d=Fr(x.error)?x.error.status:500),x.headers&&(m[b]=x.headers)}else s[b]=x.data,x.statusCode&&x.statusCode!==200&&!p&&(d=x.statusCode),x.headers&&(m[b]=x.headers)}),y!==void 0&&i&&(c={[i[0]]:y},i[2]&&(s[i[2]]=void 0)),{loaderData:s,errors:c,statusCode:d||200,loaderHeaders:m}}function ty(t,l,i,r,o,s){let{loaderData:c,errors:d}=jS(l,i,r);return o.filter(p=>!p.matches||p.matches.some(m=>m.shouldLoad)).forEach(p=>{let{key:m,match:y,controller:g}=p;if(g&&g.signal.aborted)return;let b=s[m];if(Be(b,"Did not find corresponding fetcher result"),vn(b)){let x=ua(t.matches,y?.route.id);d&&d[x.route.id]||(d={...d,[x.route.id]:b.error}),t.fetchers.delete(m)}else if(Ba(b))Be(!1,"Unhandled fetcher revalidation redirect");else{let x=Al(b.data);t.fetchers.set(m,x)}}),{loaderData:c,errors:d}}function ny(t,l,i,r){let o=Object.entries(l).filter(([,s])=>s!==Ev).reduce((s,[c,d])=>(s[c]=d,s),{});for(let s of i){let c=s.route.id;if(!l.hasOwnProperty(c)&&t.hasOwnProperty(c)&&s.route.loader&&(o[c]=t[c]),r&&r.hasOwnProperty(c))break}return o}function ly(t){return t?vn(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function ua(t,l){return(l?t.slice(0,t.findIndex(r=>r.route.id===l)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function yo(t){let l=t.length===1?t[0]:t.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:l}],route:l}}function Dn(t,{pathname:l,routeId:i,method:r,type:o,message:s}={}){let c="Unknown Server Error",d="Unknown @remix-run/router error";return t===400?(c="Bad Request",r&&l&&i?d=`You made a ${r} request to "${l}" but did not provide a \`loader\` for route "${i}", so there is no way to handle the request.`:o==="invalid-body"&&(d="Unable to encode submission body")):t===403?(c="Forbidden",d=`Route "${i}" does not match URL "${l}"`):t===404?(c="Not Found",d=`No route matches URL "${l}"`):t===405&&(c="Method Not Allowed",r&&l&&i?d=`You made a ${r.toUpperCase()} request to "${l}" but did not provide an \`action\` for route "${i}", so there is no way to handle the request.`:r&&(d=`Invalid request method "${r.toUpperCase()}"`)),new Xr(t||500,c,new Error(d),!0)}function vo(t){let l=Object.entries(t);for(let i=l.length-1;i>=0;i--){let[r,o]=l[i];if(Ba(o))return{key:r,result:o}}}function _v(t){let l=typeof t=="string"?ca(t):t;return el({...l,hash:""})}function NS(t,l){return t.pathname!==l.pathname||t.search!==l.search?!1:t.hash===""?l.hash!=="":t.hash===l.hash?!0:l.hash!==""}function MS(t){return new Xr(t.init?.status??500,t.init?.statusText??"Internal Server Error",t.data)}function OS(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([l,i])=>typeof l=="string"&&LS(i))}function LS(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function US(t){return fd(t.result)&&xv.has(t.result.status)}function vn(t){return t.type==="error"}function Ba(t){return(t&&t.type)==="redirect"}function ay(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function fd(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function BS(t){return xv.has(t)}function HS(t){return fd(t)&&BS(t.status)&&t.headers.has("Location")}function qS(t){return gS.has(t.toUpperCase())}function Gt(t){return mS.has(t.toUpperCase())}function dd(t){return new URLSearchParams(t).getAll("index").some(l=>l==="")}function Ao(t,l){let i=typeof l=="string"?ca(l).search:l.search;if(t[t.length-1].route.index&&dd(i||""))return t[t.length-1];let r=pv(t);return r[r.length-1]}function iy(t){let{formMethod:l,formAction:i,formEncType:r,text:o,formData:s,json:c}=t;if(!(!l||!i||!r)){if(o!=null)return{formMethod:l,formAction:i,formEncType:r,formData:void 0,json:void 0,text:o};if(s!=null)return{formMethod:l,formAction:i,formEncType:r,formData:s,json:void 0,text:void 0};if(c!==void 0)return{formMethod:l,formAction:i,formEncType:r,formData:void 0,json:c,text:void 0}}}function hf(t,l){return l?{state:"loading",location:t,formMethod:l.formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function YS(t,l){return{state:"submitting",location:t,formMethod:l.formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.text}}function zr(t,l){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:l}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:l}}function VS(t,l){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:l?l.data:void 0}}function Al(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function FS(t,l){try{let i=t.sessionStorage.getItem(Sv);if(i){let r=JSON.parse(i);for(let[o,s]of Object.entries(r||{}))s&&Array.isArray(s)&&l.set(o,new Set(s||[]))}}catch{}}function GS(t,l){if(l.size>0){let i={};for(let[r,o]of l)i[r]=[...o];try{t.sessionStorage.setItem(Sv,JSON.stringify(i))}catch(r){Rt(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function ry(){let t,l,i=new Promise((r,o)=>{t=async s=>{r(s);try{await i}catch{}},l=async s=>{o(s);try{await i}catch{}}});return{promise:i,resolve:t,reject:l}}var Ya=C.createContext(null);Ya.displayName="DataRouter";var Zr=C.createContext(null);Zr.displayName="DataRouterState";var zv=C.createContext(!1);function QS(){return C.useContext(zv)}var hd=C.createContext({isTransitioning:!1});hd.displayName="ViewTransition";var Rv=C.createContext(new Map);Rv.displayName="Fetchers";var XS=C.createContext(null);XS.displayName="Await";var Mn=C.createContext(null);Mn.displayName="Navigation";var qo=C.createContext(null);qo.displayName="Location";var Xn=C.createContext({outlet:null,matches:[],isDataRoute:!1});Xn.displayName="Route";var md=C.createContext(null);md.displayName="RouteError";var Dv="REACT_ROUTER_ERROR",IS="REDIRECT",ZS="ROUTE_ERROR_RESPONSE";function KS(t){if(t.startsWith(`${Dv}:${IS}:{`))try{let l=JSON.parse(t.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function $S(t){if(t.startsWith(`${Dv}:${ZS}:{`))try{let l=JSON.parse(t.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new Xr(l.status,l.statusText,l.data)}catch{}}function PS(t,{relative:l}={}){Be(Kr(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:r}=C.useContext(Mn),{hash:o,pathname:s,search:c}=Pr(t,{relative:l}),d=s;return i!=="/"&&(d=s==="/"?i:Wn([i,s])),r.createHref({pathname:d,search:c,hash:o})}function Kr(){return C.useContext(qo)!=null}function tl(){return Be(Kr(),"useLocation() may be used only in the context of a <Router> component."),C.useContext(qo).location}var jv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Nv(t){C.useContext(Mn).static||C.useLayoutEffect(t)}function $r(){let{isDataRoute:t}=C.useContext(Xn);return t?dE():JS()}function JS(){Be(Kr(),"useNavigate() may be used only in the context of a <Router> component.");let t=C.useContext(Ya),{basename:l,navigator:i}=C.useContext(Mn),{matches:r}=C.useContext(Xn),{pathname:o}=tl(),s=JSON.stringify(od(r)),c=C.useRef(!1);return Nv(()=>{c.current=!0}),C.useCallback((p,m={})=>{if(Rt(c.current,jv),!c.current)return;if(typeof p=="number"){i.go(p);return}let y=sd(p,JSON.parse(s),o,m.relative==="path");t==null&&l!=="/"&&(y.pathname=y.pathname==="/"?l:Wn([l,y.pathname])),(m.replace?i.replace:i.push)(y,m.state,m)},[l,i,s,o,t])}var Mv=C.createContext(null);function Ov(){return C.useContext(Mv)}function WS(t){let l=C.useContext(Xn).outlet;return C.useMemo(()=>l&&C.createElement(Mv.Provider,{value:t},l),[l,t])}function eE(){let{matches:t}=C.useContext(Xn),l=t[t.length-1];return l?l.params:{}}function Pr(t,{relative:l}={}){let{matches:i}=C.useContext(Xn),{pathname:r}=tl(),o=JSON.stringify(od(i));return C.useMemo(()=>sd(t,JSON.parse(o),r,l==="path"),[t,o,r,l])}function tE(t,l,i,r,o){Be(Kr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=C.useContext(Mn),{matches:c}=C.useContext(Xn),d=c[c.length-1],p=d?d.params:{},m=d?d.pathname:"/",y=d?d.pathnameBase:"/",g=d&&d.route;{let R=g&&g.path||"";Uv(m,!g||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
11
-
12
- Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let b=tl(),x;x=b;let k=x.pathname||"/",T=k;if(y!=="/"){let R=y.replace(/^\//,"").split("/");T="/"+k.replace(/^\//,"").split("/").slice(R.length).join("/")}let _=ra(t,{pathname:T});return Rt(g||_!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Rt(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),rE(_&&_.map(R=>Object.assign({},R,{params:Object.assign({},p,R.params),pathname:Wn([y,s.encodeLocation?s.encodeLocation(R.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?y:Wn([y,s.encodeLocation?s.encodeLocation(R.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),c,i,r,o)}function nE(){let t=fE(),l=Fr(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),i=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",t),c=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:s},"ErrorBoundary")," or"," ",C.createElement("code",{style:s},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},l),i?C.createElement("pre",{style:o},i):null,c)}var lE=C.createElement(nE,null),Lv=class extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,l){return l.location!==t.location||l.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:l.error,location:l.location,revalidation:t.revalidation||l.revalidation}}componentDidCatch(t,l){this.props.onError?this.props.onError(t,l):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const i=$S(t.digest);i&&(t=i)}let l=t!==void 0?C.createElement(Xn.Provider,{value:this.props.routeContext},C.createElement(md.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?C.createElement(aE,{error:t},l):l}};Lv.contextType=zv;var mf=new WeakMap;function aE({children:t,error:l}){let{basename:i}=C.useContext(Mn);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let r=KS(l.digest);if(r){let o=mf.get(l);if(o)throw o;let s=yv(r.location,i);if(gv&&!mf.get(l))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw mf.set(l,c),c}return C.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function iE({routeContext:t,match:l,children:i}){let r=C.useContext(Ya);return r&&r.static&&r.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=l.route.id),C.createElement(Xn.Provider,{value:t},i)}function rE(t,l=[],i=null,r=null,o=null){if(t==null){if(!i)return null;if(i.errors)t=i.matches;else if(l.length===0&&!i.initialized&&i.matches.length>0)t=i.matches;else return null}let s=t,c=i?.errors;if(c!=null){let y=s.findIndex(g=>g.route.id&&c?.[g.route.id]!==void 0);Be(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let d=!1,p=-1;if(i)for(let y=0;y<s.length;y++){let g=s[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(p=y),g.route.id){let{loaderData:b,errors:x}=i,k=g.route.loader&&!b.hasOwnProperty(g.route.id)&&(!x||x[g.route.id]===void 0);if(g.route.lazy||k){d=!0,p>=0?s=s.slice(0,p+1):s=[s[0]];break}}}let m=i&&r?(y,g)=>{r(y,{location:i.location,params:i.matches?.[0]?.params??{},unstable_pattern:Ir(i.matches),errorInfo:g})}:void 0;return s.reduceRight((y,g,b)=>{let x,k=!1,T=null,_=null;i&&(x=c&&g.route.id?c[g.route.id]:void 0,T=g.route.errorElement||lE,d&&(p<0&&b===0?(Uv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,_=null):p===b&&(k=!0,_=g.route.hydrateFallbackElement||null)));let A=l.concat(s.slice(0,b+1)),R=()=>{let O;return x?O=T:k?O=_:g.route.Component?O=C.createElement(g.route.Component,null):g.route.element?O=g.route.element:O=y,C.createElement(iE,{match:g,routeContext:{outlet:y,matches:A,isDataRoute:i!=null},children:O})};return i&&(g.route.ErrorBoundary||g.route.errorElement||b===0)?C.createElement(Lv,{location:i.location,revalidation:i.revalidation,component:T,error:x,children:R(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:m}):R()},null)}function pd(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function uE(t){let l=C.useContext(Ya);return Be(l,pd(t)),l}function oE(t){let l=C.useContext(Zr);return Be(l,pd(t)),l}function sE(t){let l=C.useContext(Xn);return Be(l,pd(t)),l}function gd(t){let l=sE(t),i=l.matches[l.matches.length-1];return Be(i.route.id,`${t} can only be used on routes that contain a unique "id"`),i.route.id}function cE(){return gd("useRouteId")}function fE(){let t=C.useContext(md),l=oE("useRouteError"),i=gd("useRouteError");return t!==void 0?t:l.errors?.[i]}function dE(){let{router:t}=uE("useNavigate"),l=gd("useNavigate"),i=C.useRef(!1);return Nv(()=>{i.current=!0}),C.useCallback(async(o,s={})=>{Rt(i.current,jv),i.current&&(typeof o=="number"?await t.navigate(o):await t.navigate(o,{fromRouteId:l,...s}))},[t,l])}var uy={};function Uv(t,l,i){!l&&!uy[t]&&(uy[t]=!0,Rt(!1,i))}var oy={};function sy(t,l){!t&&!oy[l]&&(oy[l]=!0,console.warn(l))}var hE="useOptimistic",cy=Ax[hE],mE=()=>{};function pE(t){return cy?cy(t):[t,mE]}function gE(t){let l={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&Rt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(l,{element:C.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&Rt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(l,{hydrateFallbackElement:C.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&Rt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(l,{errorElement:C.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),l}var yE=["HydrateFallback","hydrateFallbackElement"],vE=class{constructor(){this.status="pending",this.promise=new Promise((t,l)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",t(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",l(i))}})}};function bE({router:t,flushSync:l,onError:i,unstable_useTransitions:r}){r=QS()||r;let[s,c]=C.useState(t.state),[d,p]=pE(s),[m,y]=C.useState(),[g,b]=C.useState({isTransitioning:!1}),[x,k]=C.useState(),[T,_]=C.useState(),[A,R]=C.useState(),O=C.useRef(new Map),ee=C.useCallback((re,{deletedFetchers:fe,newErrors:q,flushSync:V,viewTransitionOpts:Z})=>{q&&i&&Object.values(q).forEach(ue=>i(ue,{location:re.location,params:re.matches[0]?.params??{},unstable_pattern:Ir(re.matches)})),re.fetchers.forEach((ue,$)=>{ue.data!==void 0&&O.current.set($,ue.data)}),fe.forEach(ue=>O.current.delete(ue)),sy(V===!1||l!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Q=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(sy(Z==null||Q,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!Z||!Q){l&&V?l(()=>c(re)):r===!1?c(re):C.startTransition(()=>{r===!0&&p(ue=>fy(ue,re)),c(re)});return}if(l&&V){l(()=>{T&&(x?.resolve(),T.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})});let ue=t.window.document.startViewTransition(()=>{l(()=>c(re))});ue.finished.finally(()=>{l(()=>{k(void 0),_(void 0),y(void 0),b({isTransitioning:!1})})}),l(()=>_(ue));return}T?(x?.resolve(),T.skipTransition(),R({state:re,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})):(y(re),b({isTransitioning:!0,flushSync:!1,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation}))},[t.window,l,T,x,r,p,i]);C.useLayoutEffect(()=>t.subscribe(ee),[t,ee]),C.useEffect(()=>{g.isTransitioning&&!g.flushSync&&k(new vE)},[g]),C.useEffect(()=>{if(x&&m&&t.window){let re=m,fe=x.promise,q=t.window.document.startViewTransition(async()=>{r===!1?c(re):C.startTransition(()=>{r===!0&&p(V=>fy(V,re)),c(re)}),await fe});q.finished.finally(()=>{k(void 0),_(void 0),y(void 0),b({isTransitioning:!1})}),_(q)}},[m,x,t.window,r,p]),C.useEffect(()=>{x&&m&&d.location.key===m.location.key&&x.resolve()},[x,T,d.location,m]),C.useEffect(()=>{!g.isTransitioning&&A&&(y(A.state),b({isTransitioning:!0,flushSync:!1,currentLocation:A.currentLocation,nextLocation:A.nextLocation}),R(void 0))},[g.isTransitioning,A]);let ie=C.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:re=>t.navigate(re),push:(re,fe,q)=>t.navigate(re,{state:fe,preventScrollReset:q?.preventScrollReset}),replace:(re,fe,q)=>t.navigate(re,{replace:!0,state:fe,preventScrollReset:q?.preventScrollReset})}),[t]),Y=t.basename||"/",D=C.useMemo(()=>({router:t,navigator:ie,static:!1,basename:Y,onError:i}),[t,ie,Y,i]);return C.createElement(C.Fragment,null,C.createElement(Ya.Provider,{value:D},C.createElement(Zr.Provider,{value:d},C.createElement(Rv.Provider,{value:O.current},C.createElement(hd.Provider,{value:g},C.createElement(wE,{basename:Y,location:d.location,navigationType:d.historyAction,navigator:ie,unstable_useTransitions:r},C.createElement(xE,{routes:t.routes,future:t.future,state:d,onError:i})))))),null)}function fy(t,l){return{...t,navigation:l.navigation.state!=="idle"?l.navigation:t.navigation,revalidation:l.revalidation!=="idle"?l.revalidation:t.revalidation,actionData:l.navigation.state!=="submitting"?l.actionData:t.actionData,fetchers:l.fetchers}}var xE=C.memo(SE);function SE({routes:t,future:l,state:i,onError:r}){return tE(t,void 0,i,r,l)}function EE(t){return WS(t.context)}function wE({basename:t="/",children:l=null,location:i,navigationType:r="POP",navigator:o,static:s=!1,unstable_useTransitions:c}){Be(!Kr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=t.replace(/^\/*/,"/"),p=C.useMemo(()=>({basename:d,navigator:o,static:s,unstable_useTransitions:c,future:{}}),[d,o,s,c]);typeof i=="string"&&(i=ca(i));let{pathname:m="/",search:y="",hash:g="",state:b=null,key:x="default"}=i,k=C.useMemo(()=>{let T=Nn(m,d);return T==null?null:{location:{pathname:T,search:y,hash:g,state:b,key:x},navigationType:r}},[d,m,y,g,b,x,r]);return Rt(k!=null,`<Router basename="${d}"> is not able to match the URL "${m}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:C.createElement(Mn.Provider,{value:p},C.createElement(qo.Provider,{children:l,value:k}))}var _o="get",zo="application/x-www-form-urlencoded";function Yo(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function kE(t){return Yo(t)&&t.tagName.toLowerCase()==="button"}function CE(t){return Yo(t)&&t.tagName.toLowerCase()==="form"}function TE(t){return Yo(t)&&t.tagName.toLowerCase()==="input"}function AE(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function _E(t,l){return t.button===0&&(!l||l==="_self")&&!AE(t)}var bo=null;function zE(){if(bo===null)try{new FormData(document.createElement("form"),0),bo=!1}catch{bo=!0}return bo}var RE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function pf(t){return t!=null&&!RE.has(t)?(Rt(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${zo}"`),null):t}function DE(t,l){let i,r,o,s,c;if(CE(t)){let d=t.getAttribute("action");r=d?Nn(d,l):null,i=t.getAttribute("method")||_o,o=pf(t.getAttribute("enctype"))||zo,s=new FormData(t)}else if(kE(t)||TE(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=t.getAttribute("formaction")||d.getAttribute("action");if(r=p?Nn(p,l):null,i=t.getAttribute("formmethod")||d.getAttribute("method")||_o,o=pf(t.getAttribute("formenctype"))||pf(d.getAttribute("enctype"))||zo,s=new FormData(d,t),!zE()){let{name:m,type:y,value:g}=t;if(y==="image"){let b=m?`${m}.`:"";s.append(`${b}x`,"0"),s.append(`${b}y`,"0")}else m&&s.append(m,g)}}else{if(Yo(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=_o,r=null,o=zo,c=t}return s&&o==="text/plain"&&(c=s,s=void 0),{action:r,method:i.toLowerCase(),encType:o,formData:s,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function yd(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function jE(t,l,i,r){let o=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return i?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:l&&Nn(o.pathname,l)==="/"?o.pathname=`${l.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function NE(t,l){if(t.id in l)return l[t.id];try{let i=await import(t.module);return l[t.id]=i,i}catch(i){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ME(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function OE(t,l,i){let r=await Promise.all(t.map(async o=>{let s=l.routes[o.route.id];if(s){let c=await NE(s,i);return c.links?c.links():[]}return[]}));return HE(r.flat(1).filter(ME).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function dy(t,l,i,r,o,s){let c=(p,m)=>i[m]?p.route.id!==i[m].route.id:!0,d=(p,m)=>i[m].pathname!==p.pathname||i[m].route.path?.endsWith("*")&&i[m].params["*"]!==p.params["*"];return s==="assets"?l.filter((p,m)=>c(p,m)||d(p,m)):s==="data"?l.filter((p,m)=>{let y=r.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(c(p,m)||d(p,m))return!0;if(p.route.shouldRevalidate){let g=p.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:i[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function LE(t,l,{includeHydrateFallback:i}={}){return UE(t.map(r=>{let o=l.routes[r.route.id];if(!o)return[];let s=[o.module];return o.clientActionModule&&(s=s.concat(o.clientActionModule)),o.clientLoaderModule&&(s=s.concat(o.clientLoaderModule)),i&&o.hydrateFallbackModule&&(s=s.concat(o.hydrateFallbackModule)),o.imports&&(s=s.concat(o.imports)),s}).flat(1))}function UE(t){return[...new Set(t)]}function BE(t){let l={},i=Object.keys(t).sort();for(let r of i)l[r]=t[r];return l}function HE(t,l){let i=new Set;return new Set(l),t.reduce((r,o)=>{let s=JSON.stringify(BE(o));return i.has(s)||(i.add(s),r.push({key:s,link:o})),r},[])}function Bv(){let t=C.useContext(Ya);return yd(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function qE(){let t=C.useContext(Zr);return yd(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var vd=C.createContext(void 0);vd.displayName="FrameworkContext";function Hv(){let t=C.useContext(vd);return yd(t,"You must render this element inside a <HydratedRouter> element"),t}function YE(t,l){let i=C.useContext(vd),[r,o]=C.useState(!1),[s,c]=C.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:m,onMouseLeave:y,onTouchStart:g}=l,b=C.useRef(null);C.useEffect(()=>{if(t==="render"&&c(!0),t==="viewport"){let T=A=>{A.forEach(R=>{c(R.isIntersecting)})},_=new IntersectionObserver(T,{threshold:.5});return b.current&&_.observe(b.current),()=>{_.disconnect()}}},[t]),C.useEffect(()=>{if(r){let T=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(T)}}},[r]);let x=()=>{o(!0)},k=()=>{o(!1),c(!1)};return i?t!=="intent"?[s,b,{}]:[s,b,{onFocus:Rr(d,x),onBlur:Rr(p,k),onMouseEnter:Rr(m,x),onMouseLeave:Rr(y,k),onTouchStart:Rr(g,x)}]:[!1,b,{}]}function Rr(t,l){return i=>{t&&t(i),i.defaultPrevented||l(i)}}function VE({page:t,...l}){let{router:i}=Bv(),r=C.useMemo(()=>ra(i.routes,t,i.basename),[i.routes,t,i.basename]);return r?C.createElement(GE,{page:t,matches:r,...l}):null}function FE(t){let{manifest:l,routeModules:i}=Hv(),[r,o]=C.useState([]);return C.useEffect(()=>{let s=!1;return OE(t,l,i).then(c=>{s||o(c)}),()=>{s=!0}},[t,l,i]),r}function GE({page:t,matches:l,...i}){let r=tl(),{future:o,manifest:s,routeModules:c}=Hv(),{basename:d}=Bv(),{loaderData:p,matches:m}=qE(),y=C.useMemo(()=>dy(t,l,m,s,r,"data"),[t,l,m,s,r]),g=C.useMemo(()=>dy(t,l,m,s,r,"assets"),[t,l,m,s,r]),b=C.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let T=new Set,_=!1;if(l.forEach(R=>{let O=s.routes[R.route.id];!O||!O.hasLoader||(!y.some(ee=>ee.route.id===R.route.id)&&R.route.id in p&&c[R.route.id]?.shouldRevalidate||O.hasClientLoader?_=!0:T.add(R.route.id))}),T.size===0)return[];let A=jE(t,d,o.unstable_trailingSlashAwareDataRequests,"data");return _&&T.size>0&&A.searchParams.set("_routes",l.filter(R=>T.has(R.route.id)).map(R=>R.route.id).join(",")),[A.pathname+A.search]},[d,o.unstable_trailingSlashAwareDataRequests,p,r,s,y,l,t,c]),x=C.useMemo(()=>LE(g,s),[g,s]),k=FE(g);return C.createElement(C.Fragment,null,b.map(T=>C.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...i})),x.map(T=>C.createElement("link",{key:T,rel:"modulepreload",href:T,...i})),k.map(({key:T,link:_})=>C.createElement("link",{key:T,nonce:i.nonce,..._,crossOrigin:_.crossOrigin??i.crossOrigin})))}function QE(...t){return l=>{t.forEach(i=>{typeof i=="function"?i(l):i!=null&&(i.current=l)})}}var XE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{XE&&(window.__reactRouterVersion="7.13.0")}catch{}function IE(t,l){return xS({basename:l?.basename,getContext:l?.getContext,future:l?.future,history:Lx({window:l?.window}),hydrationData:ZE(),routes:t,mapRouteProperties:gE,hydrationRouteProperties:yE,dataStrategy:l?.dataStrategy,patchRoutesOnNavigation:l?.patchRoutesOnNavigation,window:l?.window,unstable_instrumentations:l?.unstable_instrumentations}).initialize()}function ZE(){let t=window?.__staticRouterHydrationData;return t&&t.errors&&(t={...t,errors:KE(t.errors)}),t}function KE(t){if(!t)return null;let l=Object.entries(t),i={};for(let[r,o]of l)if(o&&o.__type==="RouteErrorResponse")i[r]=new Xr(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let s=window[o.__subType];if(typeof s=="function")try{let c=new s(o.message);c.stack="",i[r]=c}catch{}}if(i[r]==null){let s=new Error(o.message);s.stack="",i[r]=s}}else i[r]=o;return i}var qv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yv=C.forwardRef(function({onClick:l,discover:i="render",prefetch:r="none",relative:o,reloadDocument:s,replace:c,state:d,target:p,to:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...x},k){let{basename:T,unstable_useTransitions:_}=C.useContext(Mn),A=typeof m=="string"&&qv.test(m),R=yv(m,T);m=R.to;let O=PS(m,{relative:o}),[ee,ie,Y]=YE(r,x),D=WE(m,{replace:c,state:d,target:p,preventScrollReset:y,relative:o,viewTransition:g,unstable_defaultShouldRevalidate:b,unstable_useTransitions:_});function re(q){l&&l(q),q.defaultPrevented||D(q)}let fe=C.createElement("a",{...x,...Y,href:R.absoluteURL||O,onClick:R.isExternal||s?l:re,ref:QE(k,ie),target:p,"data-discover":!A&&i==="render"?"true":void 0});return ee&&!A?C.createElement(C.Fragment,null,fe,C.createElement(VE,{page:O})):fe});Yv.displayName="Link";var $E=C.forwardRef(function({"aria-current":l="page",caseSensitive:i=!1,className:r="",end:o=!1,style:s,to:c,viewTransition:d,children:p,...m},y){let g=Pr(c,{relative:m.relative}),b=tl(),x=C.useContext(Zr),{navigator:k,basename:T}=C.useContext(Mn),_=x!=null&&aw(g)&&d===!0,A=k.encodeLocation?k.encodeLocation(g).pathname:g.pathname,R=b.pathname,O=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;i||(R=R.toLowerCase(),O=O?O.toLowerCase():null,A=A.toLowerCase()),O&&T&&(O=Nn(O,T)||O);const ee=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let ie=R===A||!o&&R.startsWith(A)&&R.charAt(ee)==="/",Y=O!=null&&(O===A||!o&&O.startsWith(A)&&O.charAt(A.length)==="/"),D={isActive:ie,isPending:Y,isTransitioning:_},re=ie?l:void 0,fe;typeof r=="function"?fe=r(D):fe=[r,ie?"active":null,Y?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let q=typeof s=="function"?s(D):s;return C.createElement(Yv,{...m,"aria-current":re,className:fe,ref:y,style:q,to:c,viewTransition:d},typeof p=="function"?p(D):p)});$E.displayName="NavLink";var PE=C.forwardRef(({discover:t="render",fetcherKey:l,navigate:i,reloadDocument:r,replace:o,state:s,method:c=_o,action:d,onSubmit:p,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...x},k)=>{let{unstable_useTransitions:T}=C.useContext(Mn),_=nw(),A=lw(d,{relative:m}),R=c.toLowerCase()==="get"?"get":"post",O=typeof d=="string"&&qv.test(d),ee=ie=>{if(p&&p(ie),ie.defaultPrevented)return;ie.preventDefault();let Y=ie.nativeEvent.submitter,D=Y?.getAttribute("formmethod")||c,re=()=>_(Y||ie.currentTarget,{fetcherKey:l,method:D,navigate:i,replace:o,state:s,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b});T&&i!==!1?C.startTransition(()=>re()):re()};return C.createElement("form",{ref:k,method:R,action:A,onSubmit:r?p:ee,...x,"data-discover":!O&&t==="render"?"true":void 0})});PE.displayName="Form";function JE(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Vv(t){let l=C.useContext(Ya);return Be(l,JE(t)),l}function WE(t,{target:l,replace:i,state:r,preventScrollReset:o,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:d,unstable_useTransitions:p}={}){let m=$r(),y=tl(),g=Pr(t,{relative:s});return C.useCallback(b=>{if(_E(b,l)){b.preventDefault();let x=i!==void 0?i:el(y)===el(g),k=()=>m(t,{replace:x,state:r,preventScrollReset:o,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:d});p?C.startTransition(()=>k()):k()}},[y,m,g,i,r,l,t,o,s,c,d,p])}var ew=0,tw=()=>`__${String(++ew)}__`;function nw(){let{router:t}=Vv("useSubmit"),{basename:l}=C.useContext(Mn),i=cE(),r=t.fetch,o=t.navigate;return C.useCallback(async(s,c={})=>{let{action:d,method:p,encType:m,formData:y,body:g}=DE(s,l);if(c.navigate===!1){let b=c.fetcherKey||tw();await r(b,i,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||p,formEncType:c.encType||m,flushSync:c.flushSync})}else await o(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||p,formEncType:c.encType||m,replace:c.replace,state:c.state,fromRouteId:i,flushSync:c.flushSync,viewTransition:c.viewTransition})},[r,o,l,i])}function lw(t,{relative:l}={}){let{basename:i}=C.useContext(Mn),r=C.useContext(Xn);Be(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),s={...Pr(t||".",{relative:l})},c=tl();if(t==null){s.search=c.search;let d=new URLSearchParams(s.search),p=d.getAll("index");if(p.some(y=>y==="")){d.delete("index"),p.filter(g=>g).forEach(g=>d.append("index",g));let y=d.toString();s.search=y?`?${y}`:""}}return(!t||t===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(s.pathname=s.pathname==="/"?i:Wn([i,s.pathname])),el(s)}function aw(t,{relative:l}={}){let i=C.useContext(hd);Be(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Vv("useViewTransitionState"),o=Pr(t,{relative:l});if(!i.isTransitioning)return!1;let s=Nn(i.currentLocation.pathname,r)||i.currentLocation.pathname,c=Nn(i.nextLocation.pathname,r)||i.nextLocation.pathname;return jo(o.pathname,c)!=null||jo(o.pathname,s)!=null}var Vo=sv();function iw(t){return C.createElement(bE,{flushSync:Vo.flushSync,...t})}const bd="electric-agent:anthropic-api-key",xd="electric-agent:oauth-token",Sd="electric-agent:gh-token";function Fv(){return localStorage.getItem(bd)}function rw(t){localStorage.setItem(bd,t)}function uw(){localStorage.removeItem(bd)}function ow(){return!!Fv()}function Gv(){return localStorage.getItem(xd)}function sw(t){localStorage.setItem(xd,t)}function cw(){localStorage.removeItem(xd)}function Ed(){return localStorage.getItem(Sd)}function fw(t){localStorage.setItem(Sd,t)}function dw(){localStorage.removeItem(Sd)}function hw(){return!!Ed()}const Yf="electric-agent:font-size";function Qv(){const t=localStorage.getItem(Yf);return t==="large"||t==="larger"?t:"default"}function mw(t){t==="default"?localStorage.removeItem(Yf):localStorage.setItem(Yf,t)}function Xv(t){const l=t??Qv();document.documentElement.setAttribute("data-font-size",l)}function wd(t,l,i){C.useEffect(()=>{if(i?.disabled)return;function r(o){if(!i?.allowInInputs){const s=o.target?.tagName;if(s==="INPUT"||s==="TEXTAREA"||s==="SELECT")return}o.key===t&&(o.preventDefault(),l())}return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[t,l,i?.disabled,i?.allowInInputs])}function Ni(t,l){C.useEffect(()=>{if(l)return;function i(r){r.key==="Escape"&&(r.preventDefault(),t())}return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[t,l])}const hy=[{bg:"#4a3f6b",fg:"#d0bcff"},{bg:"#2d4a4a",fg:"#75fbfd"},{bg:"#3b4a2d",fg:"#a8e6a1"},{bg:"#4a3a2d",fg:"#ffb87a"},{bg:"#4a2d3b",fg:"#f8a4c8"},{bg:"#2d3b4a",fg:"#9ecbff"},{bg:"#4a4a2d",fg:"#e6e6a1"},{bg:"#3b2d4a",fg:"#c4a4f8"},{bg:"#2d4a3b",fg:"#75e6b8"},{bg:"#4a2d2d",fg:"#f8a4a4"},{bg:"#2d3a4a",fg:"#a4d4f8"},{bg:"#4a3b2d",fg:"#e6c4a1"}];function pw(t){let l=0;for(let i=0;i<t.length;i++)l=(l<<5)-l+t.charCodeAt(i)|0;return Math.abs(l)}function gw(t){return hy[pw(t)%hy.length]}function yw(t){const l=Date.now()-new Date(t).getTime(),i=Math.floor(l/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const r=Math.floor(i/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function vw({projectName:t,onConfirm:l,onCancel:i}){return Ni(i),wd("Enter",l),Vo.createPortal(S.jsx("div",{className:"modal-overlay",onClick:i,children:S.jsxs("div",{className:"modal-card",onClick:r=>r.stopPropagation(),children:[S.jsxs("div",{className:"modal-title",children:["Delete ",t,"?"]}),S.jsx("div",{className:"modal-body",children:"All containers, database state, and generated code will be permanently lost."}),S.jsxs("div",{className:"modal-actions",children:[S.jsx("button",{type:"button",className:"modal-btn",onClick:i,children:"Cancel"}),S.jsx("button",{type:"button",className:"modal-btn modal-btn-danger",onClick:l,children:"Delete"})]})]})}),document.body)}function bw({session:t,active:l,onClick:i,onDelete:r}){const[o,s]=C.useState(!1),d=`session-avatar ${`session-avatar-${t.status}`}`,p=gw(t.id),m={background:p.bg,color:p.fg},y=t.projectName.split(/[-_ ]+/).slice(0,2).map(g=>g.charAt(0).toUpperCase()).join("");return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:`session-item ${l?"active":""}`,onClick:i,title:t.projectName,children:[S.jsx("span",{className:d,style:m,children:y}),S.jsxs("div",{className:"session-item-details",children:[S.jsx("div",{className:"session-item-name",children:t.projectName}),S.jsx("div",{className:"session-item-meta",children:S.jsx("span",{children:yw(t.lastActiveAt)})})]}),S.jsx("button",{type:"button",className:"session-item-delete",onClick:g=>{g.stopPropagation(),s(!0)},title:"Delete session",children:"×"})]}),o&&S.jsx(vw,{projectName:t.projectName,onConfirm:()=>{s(!1),r()},onCancel:()=>s(!1)})]})}function xw({collapsed:t}){return S.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-label":t?"Expand menu":"Collapse menu",children:[S.jsx("title",{children:t?"Expand menu":"Collapse menu"}),S.jsx("rect",{x:"2",y:"2",width:"12",height:"12",rx:"2"}),S.jsx("line",{x1:"6",y1:"2",x2:"6",y2:"14"}),t?S.jsx("polyline",{points:"9 6.5 11.5 8 9 9.5"}):S.jsx("polyline",{points:"11.5 6.5 9 8 11.5 9.5"})]})}function Sw({collapsed:t,onToggle:l,mobileOpen:i,onMobileClose:r}){const{sessions:o,pendingProject:s,handleDeleteSession:c}=Cd(),d=$r(),p=tl(),m=p.pathname.startsWith("/session/")?p.pathname.split("/session/")[1]:null,y=[...o].sort((b,x)=>new Date(x.lastActiveAt).getTime()-new Date(b.lastActiveAt).getTime()),g=b=>{d(b),r?.()};return S.jsxs("aside",{className:`sidebar ${i?"mobile-open":""}`,children:[S.jsxs("div",{className:"sidebar-header",children:[S.jsxs("svg",{className:"sidebar-icon",viewBox:"0 0 192 192","aria-label":"Electric",children:[S.jsx("title",{children:"Electric"}),S.jsx("path",{d:"M106.992 16.1244C107.711 15.4029 108.683 15 109.692 15H170L84.0082 101.089C83.2888 101.811 82.3171 102.213 81.3081 102.213H21L106.992 16.1244Z",fill:"var(--brand-1)"}),S.jsx("path",{d:"M96.4157 104.125C96.4157 103.066 97.2752 102.204 98.331 102.204H170L96.4157 176V104.125Z",fill:"var(--brand-1)"})]}),S.jsx("span",{className:"sidebar-brand",children:"Electric Agent"})]}),S.jsxs("div",{className:"sidebar-sessions",children:[S.jsxs("div",{className:"session-item",onClick:()=>g("/"),title:"New App",children:[S.jsx("span",{className:"session-avatar new-project-avatar",children:"+"}),S.jsx("div",{className:"session-item-details",children:S.jsx("div",{className:"session-item-name",children:"New App"})})]}),s&&S.jsxs("div",{className:"session-item session-item-pending",title:s.name,children:[S.jsx("span",{className:"session-avatar session-avatar-pending"}),S.jsxs("div",{className:"session-item-details",children:[S.jsx("div",{className:"session-item-name",children:s.name}),S.jsx("div",{className:"session-item-meta",children:S.jsx("span",{children:"Setting up..."})})]})]}),y.map(b=>S.jsx(bw,{session:b,active:b.id===m,onClick:()=>g(`/session/${b.id}`),onDelete:()=>c(b.id)},b.id))]}),S.jsx("div",{className:"sidebar-collapse",children:S.jsxs("button",{type:"button",className:"sidebar-collapse-btn",onClick:l,children:[S.jsx(xw,{collapsed:t}),S.jsx("span",{className:"sidebar-collapse-label",children:t?"Expand menu":"Collapse menu"})]})})]})}let Ew={data:""},ww=t=>{if(typeof window=="object"){let l=(t?t.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return l.nonce=window.__nonce__,l.parentNode||(t||document.head).appendChild(l),l.firstChild}return t||Ew},kw=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Cw=/\/\*[^]*?\*\/| +/g,my=/\n+/g,oa=(t,l)=>{let i="",r="",o="";for(let s in t){let c=t[s];s[0]=="@"?s[1]=="i"?i=s+" "+c+";":r+=s[1]=="f"?oa(c,s):s+"{"+oa(c,s[1]=="k"?"":l)+"}":typeof c=="object"?r+=oa(c,l?l.replace(/([^,])+/g,d=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,p=>/&/.test(p)?p.replace(/&/g,d):d?d+" "+p:p)):s):c!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=oa.p?oa.p(s,c):s+":"+c+";")}return i+(l&&o?l+"{"+o+"}":o)+r},Cl={},Iv=t=>{if(typeof t=="object"){let l="";for(let i in t)l+=i+Iv(t[i]);return l}return t},Tw=(t,l,i,r,o)=>{let s=Iv(t),c=Cl[s]||(Cl[s]=(p=>{let m=0,y=11;for(;m<p.length;)y=101*y+p.charCodeAt(m++)>>>0;return"go"+y})(s));if(!Cl[c]){let p=s!==t?t:(m=>{let y,g,b=[{}];for(;y=kw.exec(m.replace(Cw,""));)y[4]?b.shift():y[3]?(g=y[3].replace(my," ").trim(),b.unshift(b[0][g]=b[0][g]||{})):b[0][y[1]]=y[2].replace(my," ").trim();return b[0]})(t);Cl[c]=oa(o?{["@keyframes "+c]:p}:p,i?"":"."+c)}let d=i&&Cl.g?Cl.g:null;return i&&(Cl.g=Cl[c]),((p,m,y,g)=>{g?m.data=m.data.replace(g,p):m.data.indexOf(p)===-1&&(m.data=y?p+m.data:m.data+p)})(Cl[c],l,r,d),c},Aw=(t,l,i)=>t.reduce((r,o,s)=>{let c=l[s];if(c&&c.call){let d=c(i),p=d&&d.props&&d.props.className||/^go/.test(d)&&d;c=p?"."+p:d&&typeof d=="object"?d.props?"":oa(d,""):d===!1?"":d}return r+o+(c??"")},"");function Fo(t){let l=this||{},i=t.call?t(l.p):t;return Tw(i.unshift?i.raw?Aw(i,[].slice.call(arguments,1),l.p):i.reduce((r,o)=>Object.assign(r,o&&o.call?o(l.p):o),{}):i,ww(l.target),l.g,l.o,l.k)}let Zv,Vf,Ff;Fo.bind({g:1});let _l=Fo.bind({k:1});function _w(t,l,i,r){oa.p=l,Zv=t,Vf=i,Ff=r}function fa(t,l){let i=this||{};return function(){let r=arguments;function o(s,c){let d=Object.assign({},s),p=d.className||o.className;i.p=Object.assign({theme:Vf&&Vf()},d),i.o=/ *go\d+/.test(p),d.className=Fo.apply(i,r)+(p?" "+p:"");let m=t;return t[0]&&(m=d.as||t,delete d.as),Ff&&m[0]&&Ff(d),Zv(m,d)}return o}}var zw=t=>typeof t=="function",No=(t,l)=>zw(t)?t(l):t,Rw=(()=>{let t=0;return()=>(++t).toString()})(),Kv=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let l=matchMedia("(prefers-reduced-motion: reduce)");t=!l||l.matches}return t}})(),Dw=20,kd="default",$v=(t,l)=>{let{toastLimit:i}=t.settings;switch(l.type){case 0:return{...t,toasts:[l.toast,...t.toasts].slice(0,i)};case 1:return{...t,toasts:t.toasts.map(c=>c.id===l.toast.id?{...c,...l.toast}:c)};case 2:let{toast:r}=l;return $v(t,{type:t.toasts.find(c=>c.id===r.id)?1:0,toast:r});case 3:let{toastId:o}=l;return{...t,toasts:t.toasts.map(c=>c.id===o||o===void 0?{...c,dismissed:!0,visible:!1}:c)};case 4:return l.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(c=>c.id!==l.toastId)};case 5:return{...t,pausedAt:l.time};case 6:let s=l.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(c=>({...c,pauseDuration:c.pauseDuration+s}))}}},Ro=[],Pv={toasts:[],pausedAt:void 0,settings:{toastLimit:Dw}},Jn={},Jv=(t,l=kd)=>{Jn[l]=$v(Jn[l]||Pv,t),Ro.forEach(([i,r])=>{i===l&&r(Jn[l])})},Wv=t=>Object.keys(Jn).forEach(l=>Jv(t,l)),jw=t=>Object.keys(Jn).find(l=>Jn[l].toasts.some(i=>i.id===t)),Go=(t=kd)=>l=>{Jv(l,t)},Nw={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Mw=(t={},l=kd)=>{let[i,r]=C.useState(Jn[l]||Pv),o=C.useRef(Jn[l]);C.useEffect(()=>(o.current!==Jn[l]&&r(Jn[l]),Ro.push([l,r]),()=>{let c=Ro.findIndex(([d])=>d===l);c>-1&&Ro.splice(c,1)}),[l]);let s=i.toasts.map(c=>{var d,p,m;return{...t,...t[c.type],...c,removeDelay:c.removeDelay||((d=t[c.type])==null?void 0:d.removeDelay)||t?.removeDelay,duration:c.duration||((p=t[c.type])==null?void 0:p.duration)||t?.duration||Nw[c.type],style:{...t.style,...(m=t[c.type])==null?void 0:m.style,...c.style}}});return{...i,toasts:s}},Ow=(t,l="blank",i)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:l,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...i,id:i?.id||Rw()}),Jr=t=>(l,i)=>{let r=Ow(l,t,i);return Go(r.toasterId||jw(r.id))({type:2,toast:r}),r.id},Nt=(t,l)=>Jr("blank")(t,l);Nt.error=Jr("error");Nt.success=Jr("success");Nt.loading=Jr("loading");Nt.custom=Jr("custom");Nt.dismiss=(t,l)=>{let i={type:3,toastId:t};l?Go(l)(i):Wv(i)};Nt.dismissAll=t=>Nt.dismiss(void 0,t);Nt.remove=(t,l)=>{let i={type:4,toastId:t};l?Go(l)(i):Wv(i)};Nt.removeAll=t=>Nt.remove(void 0,t);Nt.promise=(t,l,i)=>{let r=Nt.loading(l.loading,{...i,...i?.loading});return typeof t=="function"&&(t=t()),t.then(o=>{let s=l.success?No(l.success,o):void 0;return s?Nt.success(s,{id:r,...i,...i?.success}):Nt.dismiss(r),o}).catch(o=>{let s=l.error?No(l.error,o):void 0;s?Nt.error(s,{id:r,...i,...i?.error}):Nt.dismiss(r)}),t};var Lw=1e3,Uw=(t,l="default")=>{let{toasts:i,pausedAt:r}=Mw(t,l),o=C.useRef(new Map).current,s=C.useCallback((g,b=Lw)=>{if(o.has(g))return;let x=setTimeout(()=>{o.delete(g),c({type:4,toastId:g})},b);o.set(g,x)},[]);C.useEffect(()=>{if(r)return;let g=Date.now(),b=i.map(x=>{if(x.duration===1/0)return;let k=(x.duration||0)+x.pauseDuration-(g-x.createdAt);if(k<0){x.visible&&Nt.dismiss(x.id);return}return setTimeout(()=>Nt.dismiss(x.id,l),k)});return()=>{b.forEach(x=>x&&clearTimeout(x))}},[i,r,l]);let c=C.useCallback(Go(l),[l]),d=C.useCallback(()=>{c({type:5,time:Date.now()})},[c]),p=C.useCallback((g,b)=>{c({type:1,toast:{id:g,height:b}})},[c]),m=C.useCallback(()=>{r&&c({type:6,time:Date.now()})},[r,c]),y=C.useCallback((g,b)=>{let{reverseOrder:x=!1,gutter:k=8,defaultPosition:T}=b||{},_=i.filter(O=>(O.position||T)===(g.position||T)&&O.height),A=_.findIndex(O=>O.id===g.id),R=_.filter((O,ee)=>ee<A&&O.visible).length;return _.filter(O=>O.visible).slice(...x?[R+1]:[0,R]).reduce((O,ee)=>O+(ee.height||0)+k,0)},[i]);return C.useEffect(()=>{i.forEach(g=>{if(g.dismissed)s(g.id,g.removeDelay);else{let b=o.get(g.id);b&&(clearTimeout(b),o.delete(g.id))}})},[i,s]),{toasts:i,handlers:{updateHeight:p,startPause:d,endPause:m,calculateOffset:y}}},Bw=_l`
13
- from {
14
- transform: scale(0) rotate(45deg);
15
- opacity: 0;
16
- }
17
- to {
18
- transform: scale(1) rotate(45deg);
19
- opacity: 1;
20
- }`,Hw=_l`
21
- from {
22
- transform: scale(0);
23
- opacity: 0;
24
- }
25
- to {
26
- transform: scale(1);
27
- opacity: 1;
28
- }`,qw=_l`
29
- from {
30
- transform: scale(0) rotate(90deg);
31
- opacity: 0;
32
- }
33
- to {
34
- transform: scale(1) rotate(90deg);
35
- opacity: 1;
36
- }`,Yw=fa("div")`
37
- width: 20px;
38
- opacity: 0;
39
- height: 20px;
40
- border-radius: 10px;
41
- background: ${t=>t.primary||"#ff4b4b"};
42
- position: relative;
43
- transform: rotate(45deg);
44
-
45
- animation: ${Bw} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
46
- forwards;
47
- animation-delay: 100ms;
48
-
49
- &:after,
50
- &:before {
51
- content: '';
52
- animation: ${Hw} 0.15s ease-out forwards;
53
- animation-delay: 150ms;
54
- position: absolute;
55
- border-radius: 3px;
56
- opacity: 0;
57
- background: ${t=>t.secondary||"#fff"};
58
- bottom: 9px;
59
- left: 4px;
60
- height: 2px;
61
- width: 12px;
62
- }
63
-
64
- &:before {
65
- animation: ${qw} 0.15s ease-out forwards;
66
- animation-delay: 180ms;
67
- transform: rotate(90deg);
68
- }
69
- `,Vw=_l`
70
- from {
71
- transform: rotate(0deg);
72
- }
73
- to {
74
- transform: rotate(360deg);
75
- }
76
- `,Fw=fa("div")`
77
- width: 12px;
78
- height: 12px;
79
- box-sizing: border-box;
80
- border: 2px solid;
81
- border-radius: 100%;
82
- border-color: ${t=>t.secondary||"#e0e0e0"};
83
- border-right-color: ${t=>t.primary||"#616161"};
84
- animation: ${Vw} 1s linear infinite;
85
- `,Gw=_l`
86
- from {
87
- transform: scale(0) rotate(45deg);
88
- opacity: 0;
89
- }
90
- to {
91
- transform: scale(1) rotate(45deg);
92
- opacity: 1;
93
- }`,Qw=_l`
94
- 0% {
95
- height: 0;
96
- width: 0;
97
- opacity: 0;
98
- }
99
- 40% {
100
- height: 0;
101
- width: 6px;
102
- opacity: 1;
103
- }
104
- 100% {
105
- opacity: 1;
106
- height: 10px;
107
- }`,Xw=fa("div")`
108
- width: 20px;
109
- opacity: 0;
110
- height: 20px;
111
- border-radius: 10px;
112
- background: ${t=>t.primary||"#61d345"};
113
- position: relative;
114
- transform: rotate(45deg);
115
-
116
- animation: ${Gw} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
117
- forwards;
118
- animation-delay: 100ms;
119
- &:after {
120
- content: '';
121
- box-sizing: border-box;
122
- animation: ${Qw} 0.2s ease-out forwards;
123
- opacity: 0;
124
- animation-delay: 200ms;
125
- position: absolute;
126
- border-right: 2px solid;
127
- border-bottom: 2px solid;
128
- border-color: ${t=>t.secondary||"#fff"};
129
- bottom: 6px;
130
- left: 6px;
131
- height: 10px;
132
- width: 6px;
133
- }
134
- `,Iw=fa("div")`
135
- position: absolute;
136
- `,Zw=fa("div")`
137
- position: relative;
138
- display: flex;
139
- justify-content: center;
140
- align-items: center;
141
- min-width: 20px;
142
- min-height: 20px;
143
- `,Kw=_l`
144
- from {
145
- transform: scale(0.6);
146
- opacity: 0.4;
147
- }
148
- to {
149
- transform: scale(1);
150
- opacity: 1;
151
- }`,$w=fa("div")`
152
- position: relative;
153
- transform: scale(0.6);
154
- opacity: 0.4;
155
- min-width: 20px;
156
- animation: ${Kw} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
157
- forwards;
158
- `,Pw=({toast:t})=>{let{icon:l,type:i,iconTheme:r}=t;return l!==void 0?typeof l=="string"?C.createElement($w,null,l):l:i==="blank"?null:C.createElement(Zw,null,C.createElement(Fw,{...r}),i!=="loading"&&C.createElement(Iw,null,i==="error"?C.createElement(Yw,{...r}):C.createElement(Xw,{...r})))},Jw=t=>`
159
- 0% {transform: translate3d(0,${t*-200}%,0) scale(.6); opacity:.5;}
160
- 100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
161
- `,Ww=t=>`
162
- 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
163
- 100% {transform: translate3d(0,${t*-150}%,-1px) scale(.6); opacity:0;}
164
- `,ek="0%{opacity:0;} 100%{opacity:1;}",tk="0%{opacity:1;} 100%{opacity:0;}",nk=fa("div")`
165
- display: flex;
166
- align-items: center;
167
- background: #fff;
168
- color: #363636;
169
- line-height: 1.3;
170
- will-change: transform;
171
- box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
172
- max-width: 350px;
173
- pointer-events: auto;
174
- padding: 8px 10px;
175
- border-radius: 8px;
176
- `,lk=fa("div")`
177
- display: flex;
178
- justify-content: center;
179
- margin: 4px 10px;
180
- color: inherit;
181
- flex: 1 1 auto;
182
- white-space: pre-line;
183
- `,ak=(t,l)=>{let i=t.includes("top")?1:-1,[r,o]=Kv()?[ek,tk]:[Jw(i),Ww(i)];return{animation:l?`${_l(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${_l(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},ik=C.memo(({toast:t,position:l,style:i,children:r})=>{let o=t.height?ak(t.position||l||"top-center",t.visible):{opacity:0},s=C.createElement(Pw,{toast:t}),c=C.createElement(lk,{...t.ariaProps},No(t.message,t));return C.createElement(nk,{className:t.className,style:{...o,...i,...t.style}},typeof r=="function"?r({icon:s,message:c}):C.createElement(C.Fragment,null,s,c))});_w(C.createElement);var rk=({id:t,className:l,style:i,onHeightUpdate:r,children:o})=>{let s=C.useCallback(c=>{if(c){let d=()=>{let p=c.getBoundingClientRect().height;r(t,p)};d(),new MutationObserver(d).observe(c,{subtree:!0,childList:!0,characterData:!0})}},[t,r]);return C.createElement("div",{ref:s,className:l,style:i},o)},uk=(t,l)=>{let i=t.includes("top"),r=i?{top:0}:{bottom:0},o=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Kv()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${l*(i?1:-1)}px)`,...r,...o}},ok=Fo`
184
- z-index: 9999;
185
- > * {
186
- pointer-events: auto;
187
- }
188
- `,xo=16,sk=({reverseOrder:t,position:l="top-center",toastOptions:i,gutter:r,children:o,toasterId:s,containerStyle:c,containerClassName:d})=>{let{toasts:p,handlers:m}=Uw(i,s);return C.createElement("div",{"data-rht-toaster":s||"",style:{position:"fixed",zIndex:9999,top:xo,left:xo,right:xo,bottom:xo,pointerEvents:"none",...c},className:d,onMouseEnter:m.startPause,onMouseLeave:m.endPause},p.map(y=>{let g=y.position||l,b=m.calculateOffset(y,{reverseOrder:t,gutter:r,defaultPosition:l}),x=uk(g,b);return C.createElement(rk,{id:y.id,key:y.id,onHeightUpdate:m.updateHeight,className:y.visible?ok:"",style:x},y.type==="custom"?No(y.message,y):o?o(y):C.createElement(ik,{toast:y,position:g}))}))},py=Nt;function ck(){return S.jsx(sk,{position:"bottom-right",toastOptions:{style:{background:"var(--bg-surface)",color:"var(--text)",border:"1px solid var(--border)",fontFamily:"var(--font-mono)",fontSize:"13px"},success:{iconTheme:{primary:"var(--green)",secondary:"var(--bg-surface)"}},error:{iconTheme:{primary:"var(--red)",secondary:"var(--bg-surface)"}}}})}const fk="/api";function eb(){const t={},l=Fv(),i=Gv(),r=Ed();return l?t.apiKey=l:i&&(t.oauthToken=i),r&&(t.ghToken=r),t}function tb(){const t=Ed();return t?{"X-GH-Token":t}:{}}async function On(t,l){const i={...l?.headers};l?.body&&(i["Content-Type"]="application/json");const r=await fetch(`${fk}${t}`,{method:l?.method??"GET",headers:Object.keys(i).length>0?i:void 0,body:l?.body?JSON.stringify(l.body):void 0});if(!r.ok){const o=await r.json().catch(()=>({error:r.statusText}));throw new Error(o.error||r.statusText)}return r.json()}function dk(){return On("/sessions")}function hk(t,l){return On("/sessions",{method:"POST",body:{description:t,name:l,...eb()}})}function mk(t,l){return On(`/sessions/${t}/iterate`,{method:"POST",body:{request:l}})}function Di(t,l,i){return On(`/sessions/${t}/respond`,{method:"POST",body:{gate:l,...i}})}function pk(t){return On(`/sessions/${t}/cancel`,{method:"POST"})}function gk(t){return On(`/sessions/${t}`,{method:"DELETE"})}function yk(t){return On(`/sessions/${t}/app-status`)}function vk(){return On("/provision-electric",{method:"POST"})}function bk(){return On("/github/repos",{headers:tb()})}function xk(t){return On(`/github/repos/${t}/branches`,{headers:tb()})}function Sk(){return On("/credentials/keychain")}function Ek(t,l){return On("/sessions/resume",{method:"POST",body:{repoUrl:t,branch:l,...eb()}})}const nb=C.createContext(null);function Cd(){const t=C.useContext(nb);if(!t)throw new Error("useAppContext must be used within AppShell");return t}function wk(){const[t,l]=C.useState(()=>window.innerWidth<=768);return C.useEffect(()=>{const i=window.matchMedia("(max-width: 768px)"),r=o=>l(o.matches);return i.addEventListener("change",r),()=>i.removeEventListener("change",r)},[]),t}function kk(){const[t,l]=C.useState([]),[i,r]=C.useState(null),[o,s]=C.useState(null),[c,d]=C.useState(!1),[p]=C.useState(!1),[m,y]=C.useState(null),[g,b]=C.useState(()=>localStorage.getItem("sidebarCollapsed")==="true"),[x,k]=C.useState(!1),T=wk(),_=C.useCallback(()=>{b(V=>(localStorage.setItem("sidebarCollapsed",String(!V)),!V))},[]),A=C.useCallback(()=>k(!0),[]),R=C.useCallback(()=>k(!1),[]),O=$r(),ee=tl(),ie=C.useRef(ee.pathname);C.useEffect(()=>{const V=ie.current.startsWith("/session/"),Z=ee.pathname.startsWith("/session/");ie.current=ee.pathname,k(!1),Z&&!V&&(b(!0),localStorage.setItem("sidebarCollapsed","true")),!Z&&V&&(b(!1),localStorage.setItem("sidebarCollapsed","false"))},[ee.pathname]);const Y=C.useCallback(async()=>{try{const V=await dk();l(V.sessions),y(null)}catch{}},[]),D=C.useCallback(async()=>{const V=hw();if(s(V),ow()){r("api-key");return}if(Gv()){r("keychain");return}try{const{oauthToken:Z}=await Sk();if(Z){sw(Z),r("keychain");return}}catch{}r(null),d(!0)},[]);C.useEffect(()=>{Y(),D()},[Y,D]);const re=C.useCallback(V=>{const Z=V.split(/\s+/).slice(0,3).join(" ");y({name:Z||"New project"}),O("/session/new",{state:{description:V}})},[O]),fe=C.useCallback(async V=>{try{await gk(V),await Y(),ee.pathname===`/session/${V}`&&O("/")}catch(Z){console.error("Failed to delete session:",Z)}},[Y,ee.pathname,O]),q={sessions:t,pendingProject:m,authSource:i,hasGhToken:o,showSettings:c,setShowSettings:d,refreshSessions:Y,refreshSettings:D,handleNewProject:re,handleDeleteSession:fe,loading:p};return S.jsxs(nb.Provider,{value:q,children:[S.jsxs("div",{className:`app-shell ${g?"sidebar-collapsed":""}`,children:[T&&x&&S.jsx("div",{className:"sidebar-backdrop",onClick:R,onKeyDown:V=>{V.key==="Escape"&&R()}}),S.jsx(Sw,{collapsed:g,onToggle:_,mobileOpen:x,onMobileClose:R}),S.jsx("main",{className:"main-content",children:S.jsx(EE,{context:{openMobileDrawer:A}})}),S.jsx("button",{type:"button",className:"global-settings-btn",onClick:()=>d(V=>!V),title:"Settings",children:S.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16","aria-label":"Settings",children:[S.jsx("title",{children:"Settings"}),S.jsx("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"}),S.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]}),S.jsx(ck,{})]})}function lb({onSubmit:t,placeholder:l,disabled:i,isRunning:r,onCancel:o}){const[s,c]=C.useState(""),d=C.useRef(null),p=C.useCallback(()=>{const b=s.trim();b&&(t(b),c(""),d.current&&(d.current.style.height="auto"))},[s,t]),m=C.useCallback(()=>{r&&o&&o()},[r,o]);Ni(m,!r);const y=C.useCallback(b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),p())},[p]),g=C.useCallback(()=>{const b=d.current;b&&(b.style.height="auto",b.style.height=`${Math.min(b.scrollHeight,200)}px`)},[]);return S.jsxs("div",{className:"prompt-bar",children:[S.jsx("textarea",{ref:d,value:s,onChange:b=>{c(b.target.value),g()},onKeyDown:y,placeholder:l??"Describe what you want to build...",disabled:i,rows:1}),S.jsx("button",{className:"primary",onClick:p,disabled:i||!s.trim(),children:"Send"}),r&&o&&S.jsx("button",{className:"danger",onClick:o,children:"Stop"})]})}function Ck(t){const l=Date.now()-new Date(t).getTime(),i=Math.floor(l/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const r=Math.floor(i/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function Tk({onSelect:t,onClose:l}){const[i,r]=C.useState([]),[o,s]=C.useState(!0),[c,d]=C.useState(null),[p,m]=C.useState(""),[y,g]=C.useState(null),[b,x]=C.useState([]),[k,T]=C.useState(!1),[_,A]=C.useState(""),[R,O]=C.useState(""),[ee,ie]=C.useState(!1);C.useEffect(()=>{bk().then(Q=>{r(Q.repos),s(!1)}).catch(Q=>{d(Q instanceof Error?Q.message:"Failed to load repos"),s(!1)})},[]);function Y(Q){g(Q),T(!0),x([]),A(""),ie(!1),O(""),xk(Q.nameWithOwner).then(ue=>{x(ue.branches),T(!1)}).catch(()=>{T(!1)})}function D(){g(null),x([]),A(""),ie(!1)}function re(Q){y&&t(y.url,Q)}const fe=C.useCallback(()=>{y?D():l()},[y,l]);Ni(fe);const q=p?i.filter(Q=>Q.nameWithOwner.toLowerCase().includes(p.toLowerCase())):i,Z=[..._?b.filter(Q=>Q.name.toLowerCase().includes(_.toLowerCase())):b].sort((Q,ue)=>Q.isDefault&&!ue.isDefault?-1:!Q.isDefault&&ue.isDefault?1:Q.name.localeCompare(ue.name));return Vo.createPortal(S.jsx("div",{className:"modal-overlay",onClick:l,children:S.jsx("div",{className:"modal-card",onClick:Q=>Q.stopPropagation(),style:{maxWidth:500},children:y?S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"modal-title",children:[S.jsx("button",{type:"button",onClick:D,style:{background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:"0 8px 0 0",fontSize:14},children:"←"}),y.nameWithOwner]}),S.jsx("div",{className:"repo-picker-filter",children:S.jsx("input",{type:"text",value:_,onChange:Q=>A(Q.target.value),placeholder:"Filter branches..."})}),k&&S.jsx("div",{style:{padding:"24px 0",textAlign:"center",color:"var(--text-subtle)"},children:"Loading branches..."}),!k&&S.jsxs("div",{className:"repo-picker-list",children:[Z.map(Q=>S.jsx("div",{className:"repo-picker-item",onClick:()=>re(Q.name),children:S.jsxs("span",{className:"repo-picker-item-name",children:[Q.name,Q.isDefault&&S.jsx("span",{style:{marginLeft:8,fontSize:11,color:"var(--text-subtle)",fontWeight:400},children:"default"})]})},Q.name)),ee?S.jsxs("div",{className:"repo-picker-new-branch",children:[S.jsx("input",{type:"text",value:R,onChange:Q=>O(Q.target.value),onKeyDown:Q=>{Q.key==="Enter"&&R.trim()&&re(R.trim())},placeholder:"branch-name"}),S.jsx("button",{type:"button",className:"modal-btn modal-btn-primary",disabled:!R.trim(),onClick:()=>re(R.trim()),children:"Create"})]}):S.jsx("div",{className:"repo-picker-item",style:{color:"var(--brand-1)"},onClick:()=>ie(!0),children:S.jsx("span",{className:"repo-picker-item-name",children:"+ Create new branch"})})]}),S.jsxs("div",{className:"modal-actions",children:[S.jsx("button",{type:"button",className:"modal-btn",onClick:D,children:"Back"}),S.jsx("button",{type:"button",className:"modal-btn",onClick:l,children:"Cancel"})]})]}):S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"modal-title",children:"Resume from GitHub"}),S.jsx("div",{className:"repo-picker-filter",children:S.jsx("input",{type:"text",value:p,onChange:Q=>m(Q.target.value),placeholder:"Filter repositories..."})}),o&&S.jsx("div",{style:{padding:"24px 0",textAlign:"center",color:"var(--text-subtle)"},children:"Loading repositories..."}),c&&S.jsx("div",{style:{padding:"16px 0",color:"var(--red)",fontSize:13},children:c}),!o&&!c&&S.jsx("div",{className:"repo-picker-list",children:q.length===0?S.jsx("div",{style:{padding:16,textAlign:"center",color:"var(--text-subtle)",fontSize:13},children:p?"No matching repos":"No repos found"}):q.map(Q=>S.jsxs("div",{className:"repo-picker-item",onClick:()=>Y(Q),children:[S.jsx("span",{className:"repo-picker-item-name",children:Q.nameWithOwner}),S.jsx("span",{className:"repo-picker-item-date",children:Ck(Q.updatedAt)})]},Q.nameWithOwner))}),S.jsx("div",{className:"modal-actions",children:S.jsx("button",{type:"button",className:"modal-btn",onClick:l,children:"Cancel"})})]})})}),document.body)}function ab({authSource:t,hasGhToken:l,onKeySaved:i,onClose:r,onCopyLog:o}){const s=C.useId(),c=C.useId(),[d,p]=C.useState(""),[m,y]=C.useState(""),[g,b]=C.useState(!1),[x,k]=C.useState(Qv),T=C.useCallback(D=>{k(D),mw(D),Xv(D)},[]),_=C.useCallback(()=>{d.trim()&&(rw(d.trim()),p(""),i())},[d,i]),A=C.useCallback(()=>{uw(),cw(),i()},[i]),R=C.useCallback(()=>{m.trim()&&(fw(m.trim()),y(""),i())},[m,i]),O=C.useCallback(()=>{dw(),i()},[i]),ee=C.useCallback(D=>{D.key==="Enter"&&(D.preventDefault(),_())},[_]),ie=C.useCallback(D=>{D.key==="Enter"&&(D.preventDefault(),R())},[R]),Y=C.useCallback(()=>{o?.(),b(!0),setTimeout(()=>b(!1),2e3)},[o]);return Ni(r),Vo.createPortal(S.jsx("div",{className:"modal-overlay",onClick:r,children:S.jsxs("div",{className:"modal-card",onClick:D=>D.stopPropagation(),children:[S.jsx("div",{className:"modal-title",children:"Settings"}),S.jsxs("div",{className:"settings-field",style:{marginTop:12},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[S.jsx("label",{htmlFor:s,style:{margin:0},children:"Anthropic API Key"}),S.jsx("span",{className:`settings-status ${t?"active":"missing"}`,children:t==="keychain"?"Using Claude keychain":t==="api-key"?"API key set":"No API key"})]}),S.jsxs("div",{className:"settings-input-row",children:[S.jsx("input",{id:s,type:"password",value:d,onChange:D=>p(D.target.value),onKeyDown:ee,placeholder:t?"Enter new key to override...":"sk-ant-..."}),d.trim()?S.jsx("button",{type:"button",onClick:_,className:"primary",children:"Save"}):t&&S.jsx("button",{type:"button",onClick:A,className:"btn btn-danger",children:"Remove"})]})]}),S.jsx("div",{className:"settings-divider"}),S.jsx("div",{className:"settings-section-label",children:"GitHub"}),S.jsxs("div",{className:"settings-field",children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[S.jsx("label",{htmlFor:c,style:{margin:0},children:"Personal Access Token"}),S.jsx("span",{className:`settings-status ${l?"active":"missing"}`,children:l?"Connected":"Not connected"})]}),S.jsxs("div",{className:"settings-input-row",children:[S.jsx("input",{id:c,type:"password",value:m,onChange:D=>y(D.target.value),onKeyDown:ie,placeholder:l?"Enter new token to override...":"ghp_..."}),m.trim()?S.jsx("button",{type:"button",onClick:R,className:"primary",children:"Save"}):l&&S.jsx("button",{type:"button",onClick:O,className:"btn btn-danger",children:"Remove"})]}),S.jsxs("div",{style:{fontSize:11,color:"var(--text-subtle)",marginTop:4},children:["Required scopes: ",S.jsx("code",{children:"repo"}),", ",S.jsx("code",{children:"read:user"}),". Create one at"," ",S.jsx("a",{href:"https://github.com/settings/tokens/new?scopes=repo,read:user",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--brand-1)"},children:"github.com/settings/tokens"})]})]}),S.jsx("div",{className:"settings-divider"}),S.jsx("div",{className:"settings-section-label",children:"Display"}),S.jsxs("div",{className:"settings-field",children:[S.jsx("label",{style:{margin:0,marginBottom:8},children:"Font Size"}),S.jsx("div",{className:"font-size-options",children:["default","large","larger"].map(D=>S.jsx("button",{type:"button",className:`font-size-option${x===D?" active":""}`,onClick:()=>T(D),children:D==="default"?"Default":D==="large"?"Large":"Extra Large"},D))})]}),o&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"settings-divider"}),S.jsx("div",{className:"settings-section-label",children:"Debug"}),S.jsx("button",{type:"button",className:"btn",onClick:Y,children:g?"Copied!":"Copy session log"})]}),S.jsx("div",{className:"modal-actions",style:{marginTop:16},children:S.jsx("button",{type:"button",className:"modal-btn",onClick:r,children:"Close"})})]})}),document.body)}function Ak(){const{authSource:t,hasGhToken:l,showSettings:i,setShowSettings:r,refreshSettings:o,refreshSessions:s,handleNewProject:c,loading:d}=Cd(),p=$r(),{openMobileDrawer:m}=Ov(),[y,g]=C.useState(!1),[b,x]=C.useState(!1),k=C.useCallback(async(T,_)=>{g(!1),x(!0);try{const{sessionId:A}=await Ek(T,_);await s(),p(`/session/${A}`)}catch(A){console.error("Failed to resume from GitHub:",A)}finally{x(!1)}},[p,s]);return S.jsxs(S.Fragment,{children:[i&&S.jsx(ab,{authSource:t,hasGhToken:l??!1,onKeySaved:o,onClose:()=>r(!1)}),S.jsxs("div",{className:"mobile-home-topbar",children:[S.jsx("button",{type:"button",className:"mobile-hamburger",onClick:m,"aria-label":"Open menu",children:S.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[S.jsx("title",{children:"Menu"}),S.jsx("line",{x1:"3",y1:"4.5",x2:"15",y2:"4.5"}),S.jsx("line",{x1:"3",y1:"9",x2:"15",y2:"9"}),S.jsx("line",{x1:"3",y1:"13.5",x2:"15",y2:"13.5"})]})}),S.jsx("img",{src:"/img/brand/logo.svg",alt:"Electric",className:"mobile-topbar-logo"})]}),S.jsxs("div",{className:"hero",children:[S.jsx("img",{src:"/img/brand/logo.svg",alt:"Electric",className:"hero-logo"}),S.jsx("p",{className:"hero-subtitle",children:"Build Reactive apps on Sync"}),S.jsx("div",{className:"hero-prompt",children:S.jsx(lb,{onSubmit:c,placeholder:t?"Describe the application you want to build...":"Set an API key in Settings to get started...",disabled:d||!t})}),l&&S.jsx("button",{type:"button",className:"hero-resume-btn",onClick:()=>g(!0),disabled:b,children:b?"Cloning...":"Resume from GitHub"})]}),y&&S.jsx(Tk,{onSelect:k,onClose:()=>g(!1)})]})}function _k(t,l){const i={};return(t[t.length-1]===""?[...t,""]:t).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const zk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Rk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Dk={};function gy(t,l){return(Dk.jsx?Rk:zk).test(t)}const jk=/[ \t\n\f\r]/g;function Nk(t){return typeof t=="object"?t.type==="text"?yy(t.value):!1:yy(t)}function yy(t){return t.replace(jk,"")===""}class Wr{constructor(l,i,r){this.normal=i,this.property=l,r&&(this.space=r)}}Wr.prototype.normal={};Wr.prototype.property={};Wr.prototype.space=void 0;function ib(t,l){const i={},r={};for(const o of t)Object.assign(i,o.property),Object.assign(r,o.normal);return new Wr(i,r,l)}function Gf(t){return t.toLowerCase()}class rn{constructor(l,i){this.attribute=i,this.property=l}}rn.prototype.attribute="";rn.prototype.booleanish=!1;rn.prototype.boolean=!1;rn.prototype.commaOrSpaceSeparated=!1;rn.prototype.commaSeparated=!1;rn.prototype.defined=!1;rn.prototype.mustUseProperty=!1;rn.prototype.number=!1;rn.prototype.overloadedBoolean=!1;rn.prototype.property="";rn.prototype.spaceSeparated=!1;rn.prototype.space=void 0;let Mk=0;const Ue=Va(),zt=Va(),Qf=Va(),ce=Va(),ct=Va(),Ri=Va(),yn=Va();function Va(){return 2**++Mk}const Xf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:zt,commaOrSpaceSeparated:yn,commaSeparated:Ri,number:ce,overloadedBoolean:Qf,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),gf=Object.keys(Xf);class Td extends rn{constructor(l,i,r,o){let s=-1;if(super(l,i),vy(this,"space",o),typeof r=="number")for(;++s<gf.length;){const c=gf[s];vy(this,gf[s],(r&Xf[c])===Xf[c])}}}Td.prototype.defined=!0;function vy(t,l,i){i&&(t[l]=i)}function Mi(t){const l={},i={};for(const[r,o]of Object.entries(t.properties)){const s=new Td(r,t.transform(t.attributes||{},r),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),l[r]=s,i[Gf(r)]=r,i[Gf(s.attribute)]=r}return new Wr(l,i,t.space)}const rb=Mi({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:ce,ariaColIndex:ce,ariaColSpan:ce,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:ct,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:ce,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:ce,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:ct,ariaRowCount:ce,ariaRowIndex:ce,ariaRowSpan:ce,ariaSelected:zt,ariaSetSize:ce,ariaSort:null,ariaValueMax:ce,ariaValueMin:ce,ariaValueNow:ce,ariaValueText:null,role:null},transform(t,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function ub(t,l){return l in t?t[l]:l}function ob(t,l){return ub(t,l.toLowerCase())}const Ok=Mi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ri,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:ct,autoFocus:Ue,autoPlay:Ue,blocking:ct,capture:null,charSet:null,checked:Ue,cite:null,className:ct,cols:ce,colSpan:null,content:null,contentEditable:zt,controls:Ue,controlsList:ct,coords:ce|Ri,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:Qf,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:ct,height:ce,hidden:Qf,high:ce,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:ct,itemRef:ct,itemScope:Ue,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:ce,manifest:null,max:null,maxLength:ce,media:null,method:null,min:null,minLength:ce,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,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:Ue,optimum:ce,pattern:null,ping:ct,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:ct,required:Ue,reversed:Ue,rows:ce,rowSpan:ce,sandbox:ct,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:ce,sizes:null,slot:null,span:ce,spellCheck:zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ce,step:null,style:null,tabIndex:ce,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:zt,width:ce,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:ce,borderColor:null,bottomMargin:ce,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:ce,leftMargin:ce,link:null,longDesc:null,lowSrc:null,marginHeight:ce,marginWidth:ce,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:ce,rules:null,scheme:null,scrolling:zt,standby:null,summary:null,text:null,topMargin:ce,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ce,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:ce,security:null,unselectable:null},space:"html",transform:ob}),Lk=Mi({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:yn,accentHeight:ce,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ce,amplitude:ce,arabicForm:null,ascent:ce,attributeName:null,attributeType:null,azimuth:ce,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ce,by:null,calcMode:null,capHeight:ce,className:ct,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:ce,diffuseConstant:ce,direction:null,display:null,dur:null,divisor:ce,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:ce,enableBackground:null,end:null,event:null,exponent:ce,externalResourcesRequired:null,fill:null,fillOpacity:ce,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:Ri,g2:Ri,glyphName:Ri,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ce,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ce,horizOriginX:ce,horizOriginY:ce,id:null,ideographic:ce,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ce,k:ce,k1:ce,k2:ce,k3:ce,k4:ce,kernelMatrix:yn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ce,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:ce,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:ce,overlineThickness:ce,paintOrder:null,panose1:null,path:null,pathLength:ce,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ce,pointsAtY:ce,pointsAtZ:ce,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:yn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:yn,rev:yn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:yn,requiredFeatures:yn,requiredFonts:yn,requiredFormats:yn,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:ce,specularExponent:ce,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ce,strikethroughThickness:ce,string:null,stroke:null,strokeDashArray:yn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ce,strokeOpacity:ce,strokeWidth:null,style:null,surfaceScale:ce,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:yn,tabIndex:ce,tableValues:null,target:null,targetX:ce,targetY:ce,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:yn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ce,underlineThickness:ce,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ce,values:null,vAlphabetic:ce,vMathematical:ce,vectorEffect:null,vHanging:ce,vIdeographic:ce,version:null,vertAdvY:ce,vertOriginX:ce,vertOriginY:ce,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ce,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ub}),sb=Mi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,l){return"xlink:"+l.slice(5).toLowerCase()}}),cb=Mi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ob}),fb=Mi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,l){return"xml:"+l.slice(3).toLowerCase()}}),Uk={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"},Bk=/[A-Z]/g,by=/-[a-z]/g,Hk=/^data[-\w.:]+$/i;function qk(t,l){const i=Gf(l);let r=l,o=rn;if(i in t.normal)return t.property[t.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&Hk.test(l)){if(l.charAt(4)==="-"){const s=l.slice(5).replace(by,Vk);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=l.slice(4);if(!by.test(s)){let c=s.replace(Bk,Yk);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}o=Td}return new o(r,l)}function Yk(t){return"-"+t.toLowerCase()}function Vk(t){return t.charAt(1).toUpperCase()}const Fk=ib([rb,Ok,sb,cb,fb],"html"),Ad=ib([rb,Lk,sb,cb,fb],"svg");function Gk(t){return t.join(" ").trim()}var ki={},yf,xy;function Qk(){if(xy)return yf;xy=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
189
- `,m="/",y="*",g="",b="comment",x="declaration";function k(_,A){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];A=A||{};var R=1,O=1;function ee(ue){var $=ue.match(l);$&&(R+=$.length);var U=ue.lastIndexOf(p);O=~U?ue.length-U:O+ue.length}function ie(){var ue={line:R,column:O};return function($){return $.position=new Y(ue),fe(),$}}function Y(ue){this.start=ue,this.end={line:R,column:O},this.source=A.source}Y.prototype.content=_;function D(ue){var $=new Error(A.source+":"+R+":"+O+": "+ue);if($.reason=ue,$.filename=A.source,$.line=R,$.column=O,$.source=_,!A.silent)throw $}function re(ue){var $=ue.exec(_);if($){var U=$[0];return ee(U),_=_.slice(U.length),$}}function fe(){re(i)}function q(ue){var $;for(ue=ue||[];$=V();)$!==!1&&ue.push($);return ue}function V(){var ue=ie();if(!(m!=_.charAt(0)||y!=_.charAt(1))){for(var $=2;g!=_.charAt($)&&(y!=_.charAt($)||m!=_.charAt($+1));)++$;if($+=2,g===_.charAt($-1))return D("End of comment missing");var U=_.slice(2,$-2);return O+=2,ee(U),_=_.slice($),O+=2,ue({type:b,comment:U})}}function Z(){var ue=ie(),$=re(r);if($){if(V(),!re(o))return D("property missing ':'");var U=re(s),J=ue({type:x,property:T($[0].replace(t,g)),value:U?T(U[0].replace(t,g)):g});return re(c),J}}function Q(){var ue=[];q(ue);for(var $;$=Z();)$!==!1&&(ue.push($),q(ue));return ue}return fe(),Q()}function T(_){return _?_.replace(d,g):g}return yf=k,yf}var Sy;function Xk(){if(Sy)return ki;Sy=1;var t=ki&&ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ki,"__esModule",{value:!0}),ki.default=i;const l=t(Qk());function i(r,o){let s=null;if(!r||typeof r!="string")return s;const c=(0,l.default)(r),d=typeof o=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:y}=p;d?o(m,y,p):y&&(s=s||{},s[m]=y)}),s}return ki}var Dr={},Ey;function Ik(){if(Ey)return Dr;Ey=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,i=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(m){return!m||i.test(m)||t.test(m)},c=function(m,y){return y.toUpperCase()},d=function(m,y){return"".concat(y,"-")},p=function(m,y){return y===void 0&&(y={}),s(m)?m:(m=m.toLowerCase(),y.reactCompat?m=m.replace(o,d):m=m.replace(r,d),m.replace(l,c))};return Dr.camelCase=p,Dr}var jr,wy;function Zk(){if(wy)return jr;wy=1;var t=jr&&jr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},l=t(Xk()),i=Ik();function r(o,s){var c={};return!o||typeof o!="string"||(0,l.default)(o,function(d,p){d&&p&&(c[(0,i.camelCase)(d,s)]=p)}),c}return r.default=r,jr=r,jr}var Kk=Zk();const $k=id(Kk),db=hb("end"),_d=hb("start");function hb(t){return l;function l(i){const r=i&&i.position&&i.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Pk(t){const l=_d(t),i=db(t);if(l&&i)return{start:l,end:i}}function Br(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?ky(t.position):"start"in t||"end"in t?ky(t):"line"in t||"column"in t?If(t):""}function If(t){return Cy(t&&t.line)+":"+Cy(t&&t.column)}function ky(t){return If(t&&t.start)+"-"+If(t&&t.end)}function Cy(t){return t&&typeof t=="number"?t:1}class Xt extends Error{constructor(l,i,r){super(),typeof i=="string"&&(r=i,i=void 0);let o="",s={},c=!1;if(i&&("line"in i&&"column"in i?s={place:i}:"start"in i&&"end"in i?s={place:i}:"type"in i?s={ancestors:[i],place:i.position}:s={...i}),typeof l=="string"?o=l:!s.cause&&l&&(c=!0,o=l.message,s.cause=l),!s.ruleId&&!s.source&&typeof r=="string"){const p=r.indexOf(":");p===-1?s.ruleId=r:(s.source=r.slice(0,p),s.ruleId=r.slice(p+1))}if(!s.place&&s.ancestors&&s.ancestors){const p=s.ancestors[s.ancestors.length-1];p&&(s.place=p.position)}const d=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=d?d.line:void 0,this.name=Br(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Xt.prototype.file="";Xt.prototype.name="";Xt.prototype.reason="";Xt.prototype.message="";Xt.prototype.stack="";Xt.prototype.column=void 0;Xt.prototype.line=void 0;Xt.prototype.ancestors=void 0;Xt.prototype.cause=void 0;Xt.prototype.fatal=void 0;Xt.prototype.place=void 0;Xt.prototype.ruleId=void 0;Xt.prototype.source=void 0;const zd={}.hasOwnProperty,Jk=new Map,Wk=/[A-Z]/g,eC=new Set(["table","tbody","thead","tfoot","tr"]),tC=new Set(["td","th"]),mb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function nC(t,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=l.filePath||void 0;let r;if(l.development){if(typeof l.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=cC(i,l.jsxDEV)}else{if(typeof l.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof l.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=sC(i,l.jsx,l.jsxs)}const o={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:r,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?Ad:Fk,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},s=pb(o,t,void 0);return s&&typeof s!="string"?s:o.create(t,o.Fragment,{children:s||void 0},void 0)}function pb(t,l,i){if(l.type==="element")return lC(t,l,i);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return aC(t,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return rC(t,l,i);if(l.type==="mdxjsEsm")return iC(t,l);if(l.type==="root")return uC(t,l,i);if(l.type==="text")return oC(t,l)}function lC(t,l,i){const r=t.schema;let o=r;l.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Ad,t.schema=o),t.ancestors.push(l);const s=yb(t,l.tagName,!1),c=fC(t,l);let d=Dd(t,l);return eC.has(l.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!Nk(p):!0})),gb(t,c,s,l),Rd(c,d),t.ancestors.pop(),t.schema=r,t.create(l,s,c,i)}function aC(t,l){if(l.data&&l.data.estree&&t.evaluater){const r=l.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}Gr(t,l.position)}function iC(t,l){if(l.data&&l.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(l.data.estree);Gr(t,l.position)}function rC(t,l,i){const r=t.schema;let o=r;l.name==="svg"&&r.space==="html"&&(o=Ad,t.schema=o),t.ancestors.push(l);const s=l.name===null?t.Fragment:yb(t,l.name,!0),c=dC(t,l),d=Dd(t,l);return gb(t,c,s,l),Rd(c,d),t.ancestors.pop(),t.schema=r,t.create(l,s,c,i)}function uC(t,l,i){const r={};return Rd(r,Dd(t,l)),t.create(l,t.Fragment,r,i)}function oC(t,l){return l.value}function gb(t,l,i,r){typeof i!="string"&&i!==t.Fragment&&t.passNode&&(l.node=r)}function Rd(t,l){if(l.length>0){const i=l.length>1?l:l[0];i&&(t.children=i)}}function sC(t,l,i){return r;function r(o,s,c,d){const m=Array.isArray(c.children)?i:l;return d?m(s,c,d):m(s,c)}}function cC(t,l){return i;function i(r,o,s,c){const d=Array.isArray(s.children),p=_d(r);return l(o,s,c,d,{columnNumber:p?p.column-1:void 0,fileName:t,lineNumber:p?p.line:void 0},void 0)}}function fC(t,l){const i={};let r,o;for(o in l.properties)if(o!=="children"&&zd.call(l.properties,o)){const s=hC(t,o,l.properties[o]);if(s){const[c,d]=s;t.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&tC.has(l.tagName)?r=d:i[c]=d}}if(r){const s=i.style||(i.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return i}function dC(t,l){const i={};for(const r of l.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const s=r.data.estree.body[0];s.type;const c=s.expression;c.type;const d=c.properties[0];d.type,Object.assign(i,t.evaluater.evaluateExpression(d.argument))}else Gr(t,l.position);else{const o=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const d=r.value.data.estree.body[0];d.type,s=t.evaluater.evaluateExpression(d.expression)}else Gr(t,l.position);else s=r.value===null?!0:r.value;i[o]=s}return i}function Dd(t,l){const i=[];let r=-1;const o=t.passKeys?new Map:Jk;for(;++r<l.children.length;){const s=l.children[r];let c;if(t.passKeys){const p=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(p){const m=o.get(p)||0;c=p+"-"+m,o.set(p,m+1)}}const d=pb(t,s,c);d!==void 0&&i.push(d)}return i}function hC(t,l,i){const r=qk(t.schema,l);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?_k(i):Gk(i)),r.property==="style"){let o=typeof i=="object"?i:mC(t,String(i));return t.stylePropertyNameCase==="css"&&(o=pC(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&r.space?Uk[r.property]||r.property:r.attribute,i]}}function mC(t,l){try{return $k(l,{reactCompat:!0})}catch(i){if(t.ignoreInvalidStyle)return{};const r=i,o=new Xt("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=t.filePath||void 0,o.url=mb+"#cannot-parse-style-attribute",o}}function yb(t,l,i){let r;if(!i)r={type:"Literal",value:l};else if(l.includes(".")){const o=l.split(".");let s=-1,c;for(;++s<o.length;){const d=gy(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(s&&d.type==="Literal"),optional:!1}:d}r=c}else r=gy(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(r.type==="Literal"){const o=r.value;return zd.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(r);Gr(t)}function Gr(t,l){const i=new Xt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=mb+"#cannot-handle-mdx-estrees-without-createevaluater",i}function pC(t){const l={};let i;for(i in t)zd.call(t,i)&&(l[gC(i)]=t[i]);return l}function gC(t){let l=t.replace(Wk,yC);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function yC(t){return"-"+t.toLowerCase()}const vf={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"]},vC={};function jd(t,l){const i=vC,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return vb(t,r,o)}function vb(t,l,i){if(bC(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(l&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Ty(t.children,l,i)}return Array.isArray(t)?Ty(t,l,i):""}function Ty(t,l,i){const r=[];let o=-1;for(;++o<t.length;)r[o]=vb(t[o],l,i);return r.join("")}function bC(t){return!!(t&&typeof t=="object")}const Ay=document.createElement("i");function Nd(t){const l="&"+t+";";Ay.innerHTML=l;const i=Ay.textContent;return i.charCodeAt(i.length-1)===59&&t!=="semi"||i===l?!1:i}function bn(t,l,i,r){const o=t.length;let s=0,c;if(l<0?l=-l>o?0:o+l:l=l>o?o:l,i=i>0?i:0,r.length<1e4)c=Array.from(r),c.unshift(l,i),t.splice(...c);else for(i&&t.splice(l,i);s<r.length;)c=r.slice(s,s+1e4),c.unshift(l,0),t.splice(...c),s+=1e4,l+=1e4}function jn(t,l){return t.length>0?(bn(t,t.length,0,l),t):l}const _y={}.hasOwnProperty;function bb(t){const l={};let i=-1;for(;++i<t.length;)xC(l,t[i]);return l}function xC(t,l){let i;for(i in l){const o=(_y.call(t,i)?t[i]:void 0)||(t[i]={}),s=l[i];let c;if(s)for(c in s){_y.call(o,c)||(o[c]=[]);const d=s[c];SC(o[c],Array.isArray(d)?d:d?[d]:[])}}}function SC(t,l){let i=-1;const r=[];for(;++i<l.length;)(l[i].add==="after"?t:r).push(l[i]);bn(t,0,0,r)}function xb(t,l){const i=Number.parseInt(t,l);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function Qn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Kt=da(/[A-Za-z]/),Qt=da(/[\dA-Za-z]/),EC=da(/[#-'*+\--9=?A-Z^-~]/);function Mo(t){return t!==null&&(t<32||t===127)}const Zf=da(/\d/),wC=da(/[\dA-Fa-f]/),kC=da(/[!-/:-@[-`{-~]/);function ze(t){return t!==null&&t<-2}function st(t){return t!==null&&(t<0||t===32)}function Ye(t){return t===-2||t===-1||t===32}const Qo=da(new RegExp("\\p{P}|\\p{S}","u")),Ha=da(/\s/);function da(t){return l;function l(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Oi(t){const l=[];let i=-1,r=0,o=0;for(;++i<t.length;){const s=t.charCodeAt(i);let c="";if(s===37&&Qt(t.charCodeAt(i+1))&&Qt(t.charCodeAt(i+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const d=t.charCodeAt(i+1);s<56320&&d>56319&&d<57344?(c=String.fromCharCode(s,d),o=1):c="�"}else c=String.fromCharCode(s);c&&(l.push(t.slice(r,i),encodeURIComponent(c)),r=i+o+1,c=""),o&&(i+=o,o=0)}return l.join("")+t.slice(r)}function $e(t,l,i,r){const o=r?r-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(p){return Ye(p)?(t.enter(i),d(p)):l(p)}function d(p){return Ye(p)&&s++<o?(t.consume(p),d):(t.exit(i),l(p))}}const CC={tokenize:TC};function TC(t){const l=t.attempt(this.parser.constructs.contentInitial,r,o);let i;return l;function r(d){if(d===null){t.consume(d);return}return t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),$e(t,l,"linePrefix")}function o(d){return t.enter("paragraph"),s(d)}function s(d){const p=t.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=p),i=p,c(d)}function c(d){if(d===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(d);return}return ze(d)?(t.consume(d),t.exit("chunkText"),s):(t.consume(d),c)}}const AC={tokenize:_C},zy={tokenize:zC};function _C(t){const l=this,i=[];let r=0,o,s,c;return d;function d(O){if(r<i.length){const ee=i[r];return l.containerState=ee[1],t.attempt(ee[0].continuation,p,m)(O)}return m(O)}function p(O){if(r++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,o&&R();const ee=l.events.length;let ie=ee,Y;for(;ie--;)if(l.events[ie][0]==="exit"&&l.events[ie][1].type==="chunkFlow"){Y=l.events[ie][1].end;break}A(r);let D=ee;for(;D<l.events.length;)l.events[D][1].end={...Y},D++;return bn(l.events,ie+1,0,l.events.slice(ee)),l.events.length=D,m(O)}return d(O)}function m(O){if(r===i.length){if(!o)return b(O);if(o.currentConstruct&&o.currentConstruct.concrete)return k(O);l.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return l.containerState={},t.check(zy,y,g)(O)}function y(O){return o&&R(),A(r),b(O)}function g(O){return l.parser.lazy[l.now().line]=r!==i.length,c=l.now().offset,k(O)}function b(O){return l.containerState={},t.attempt(zy,x,k)(O)}function x(O){return r++,i.push([l.currentConstruct,l.containerState]),b(O)}function k(O){if(O===null){o&&R(),A(0),t.consume(O);return}return o=o||l.parser.flow(l.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),T(O)}function T(O){if(O===null){_(t.exit("chunkFlow"),!0),A(0),t.consume(O);return}return ze(O)?(t.consume(O),_(t.exit("chunkFlow")),r=0,l.interrupt=void 0,d):(t.consume(O),T)}function _(O,ee){const ie=l.sliceStream(O);if(ee&&ie.push(null),O.previous=s,s&&(s.next=O),s=O,o.defineSkip(O.start),o.write(ie),l.parser.lazy[O.start.line]){let Y=o.events.length;for(;Y--;)if(o.events[Y][1].start.offset<c&&(!o.events[Y][1].end||o.events[Y][1].end.offset>c))return;const D=l.events.length;let re=D,fe,q;for(;re--;)if(l.events[re][0]==="exit"&&l.events[re][1].type==="chunkFlow"){if(fe){q=l.events[re][1].end;break}fe=!0}for(A(r),Y=D;Y<l.events.length;)l.events[Y][1].end={...q},Y++;bn(l.events,re+1,0,l.events.slice(D)),l.events.length=Y}}function A(O){let ee=i.length;for(;ee-- >O;){const ie=i[ee];l.containerState=ie[1],ie[0].exit.call(l,t)}i.length=O}function R(){o.write([null]),s=void 0,o=void 0,l.containerState._closeFlow=void 0}}function zC(t,l,i){return $e(t,t.attempt(this.parser.constructs.document,l,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ji(t){if(t===null||st(t)||Ha(t))return 1;if(Qo(t))return 2}function Xo(t,l,i){const r=[];let o=-1;for(;++o<t.length;){const s=t[o].resolveAll;s&&!r.includes(s)&&(l=s(l,i),r.push(s))}return l}const Kf={name:"attention",resolveAll:RC,tokenize:DC};function RC(t,l){let i=-1,r,o,s,c,d,p,m,y;for(;++i<t.length;)if(t[i][0]==="enter"&&t[i][1].type==="attentionSequence"&&t[i][1]._close){for(r=i;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&l.sliceSerialize(t[r][1]).charCodeAt(0)===l.sliceSerialize(t[i][1]).charCodeAt(0)){if((t[r][1]._close||t[i][1]._open)&&(t[i][1].end.offset-t[i][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[i][1].end.offset-t[i][1].start.offset)%3))continue;p=t[r][1].end.offset-t[r][1].start.offset>1&&t[i][1].end.offset-t[i][1].start.offset>1?2:1;const g={...t[r][1].end},b={...t[i][1].start};Ry(g,-p),Ry(b,p),c={type:p>1?"strongSequence":"emphasisSequence",start:g,end:{...t[r][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...t[i][1].start},end:b},s={type:p>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[i][1].start}},o={type:p>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},t[r][1].end={...c.start},t[i][1].start={...d.end},m=[],t[r][1].end.offset-t[r][1].start.offset&&(m=jn(m,[["enter",t[r][1],l],["exit",t[r][1],l]])),m=jn(m,[["enter",o,l],["enter",c,l],["exit",c,l],["enter",s,l]]),m=jn(m,Xo(l.parser.constructs.insideSpan.null,t.slice(r+1,i),l)),m=jn(m,[["exit",s,l],["enter",d,l],["exit",d,l],["exit",o,l]]),t[i][1].end.offset-t[i][1].start.offset?(y=2,m=jn(m,[["enter",t[i][1],l],["exit",t[i][1],l]])):y=0,bn(t,r-1,i-r+3,m),i=r+m.length-y-2;break}}for(i=-1;++i<t.length;)t[i][1].type==="attentionSequence"&&(t[i][1].type="data");return t}function DC(t,l){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,o=ji(r);let s;return c;function c(p){return s=p,t.enter("attentionSequence"),d(p)}function d(p){if(p===s)return t.consume(p),d;const m=t.exit("attentionSequence"),y=ji(p),g=!y||y===2&&o||i.includes(p),b=!o||o===2&&y||i.includes(r);return m._open=!!(s===42?g:g&&(o||!b)),m._close=!!(s===42?b:b&&(y||!g)),l(p)}}function Ry(t,l){t.column+=l,t.offset+=l,t._bufferIndex+=l}const jC={name:"autolink",tokenize:NC};function NC(t,l,i){let r=0;return o;function o(x){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(x){return Kt(x)?(t.consume(x),c):x===64?i(x):m(x)}function c(x){return x===43||x===45||x===46||Qt(x)?(r=1,d(x)):m(x)}function d(x){return x===58?(t.consume(x),r=0,p):(x===43||x===45||x===46||Qt(x))&&r++<32?(t.consume(x),d):(r=0,m(x))}function p(x){return x===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.exit("autolink"),l):x===null||x===32||x===60||Mo(x)?i(x):(t.consume(x),p)}function m(x){return x===64?(t.consume(x),y):EC(x)?(t.consume(x),m):i(x)}function y(x){return Qt(x)?g(x):i(x)}function g(x){return x===46?(t.consume(x),r=0,y):x===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.exit("autolink"),l):b(x)}function b(x){if((x===45||Qt(x))&&r++<63){const k=x===45?b:g;return t.consume(x),k}return i(x)}}const eu={partial:!0,tokenize:MC};function MC(t,l,i){return r;function r(s){return Ye(s)?$e(t,o,"linePrefix")(s):o(s)}function o(s){return s===null||ze(s)?l(s):i(s)}}const Sb={continuation:{tokenize:LC},exit:UC,name:"blockQuote",tokenize:OC};function OC(t,l,i){const r=this;return o;function o(c){if(c===62){const d=r.containerState;return d.open||(t.enter("blockQuote",{_container:!0}),d.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),s}return i(c)}function s(c){return Ye(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),l):(t.exit("blockQuotePrefix"),l(c))}}function LC(t,l,i){const r=this;return o;function o(c){return Ye(c)?$e(t,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return t.attempt(Sb,l,i)(c)}}function UC(t){t.exit("blockQuote")}const Eb={name:"characterEscape",tokenize:BC};function BC(t,l,i){return r;function r(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),o}function o(s){return kC(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),l):i(s)}}const wb={name:"characterReference",tokenize:HC};function HC(t,l,i){const r=this;let o=0,s,c;return d;function d(g){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(g),t.exit("characterReferenceMarker"),p}function p(g){return g===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(g),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),s=31,c=Qt,y(g))}function m(g){return g===88||g===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(g),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,c=wC,y):(t.enter("characterReferenceValue"),s=7,c=Zf,y(g))}function y(g){if(g===59&&o){const b=t.exit("characterReferenceValue");return c===Qt&&!Nd(r.sliceSerialize(b))?i(g):(t.enter("characterReferenceMarker"),t.consume(g),t.exit("characterReferenceMarker"),t.exit("characterReference"),l)}return c(g)&&o++<s?(t.consume(g),y):i(g)}}const Dy={partial:!0,tokenize:YC},jy={concrete:!0,name:"codeFenced",tokenize:qC};function qC(t,l,i){const r=this,o={partial:!0,tokenize:ie};let s=0,c=0,d;return p;function p(Y){return m(Y)}function m(Y){const D=r.events[r.events.length-1];return s=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,d=Y,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),y(Y)}function y(Y){return Y===d?(c++,t.consume(Y),y):c<3?i(Y):(t.exit("codeFencedFenceSequence"),Ye(Y)?$e(t,g,"whitespace")(Y):g(Y))}function g(Y){return Y===null||ze(Y)?(t.exit("codeFencedFence"),r.interrupt?l(Y):t.check(Dy,T,ee)(Y)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),b(Y))}function b(Y){return Y===null||ze(Y)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),g(Y)):Ye(Y)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),$e(t,x,"whitespace")(Y)):Y===96&&Y===d?i(Y):(t.consume(Y),b)}function x(Y){return Y===null||ze(Y)?g(Y):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),k(Y))}function k(Y){return Y===null||ze(Y)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),g(Y)):Y===96&&Y===d?i(Y):(t.consume(Y),k)}function T(Y){return t.attempt(o,ee,_)(Y)}function _(Y){return t.enter("lineEnding"),t.consume(Y),t.exit("lineEnding"),A}function A(Y){return s>0&&Ye(Y)?$e(t,R,"linePrefix",s+1)(Y):R(Y)}function R(Y){return Y===null||ze(Y)?t.check(Dy,T,ee)(Y):(t.enter("codeFlowValue"),O(Y))}function O(Y){return Y===null||ze(Y)?(t.exit("codeFlowValue"),R(Y)):(t.consume(Y),O)}function ee(Y){return t.exit("codeFenced"),l(Y)}function ie(Y,D,re){let fe=0;return q;function q($){return Y.enter("lineEnding"),Y.consume($),Y.exit("lineEnding"),V}function V($){return Y.enter("codeFencedFence"),Ye($)?$e(Y,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):Z($)}function Z($){return $===d?(Y.enter("codeFencedFenceSequence"),Q($)):re($)}function Q($){return $===d?(fe++,Y.consume($),Q):fe>=c?(Y.exit("codeFencedFenceSequence"),Ye($)?$e(Y,ue,"whitespace")($):ue($)):re($)}function ue($){return $===null||ze($)?(Y.exit("codeFencedFence"),D($)):re($)}}}function YC(t,l,i){const r=this;return o;function o(c){return c===null?i(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s)}function s(c){return r.parser.lazy[r.now().line]?i(c):l(c)}}const bf={name:"codeIndented",tokenize:FC},VC={partial:!0,tokenize:GC};function FC(t,l,i){const r=this;return o;function o(m){return t.enter("codeIndented"),$e(t,s,"linePrefix",5)(m)}function s(m){const y=r.events[r.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(m):i(m)}function c(m){return m===null?p(m):ze(m)?t.attempt(VC,c,p)(m):(t.enter("codeFlowValue"),d(m))}function d(m){return m===null||ze(m)?(t.exit("codeFlowValue"),c(m)):(t.consume(m),d)}function p(m){return t.exit("codeIndented"),l(m)}}function GC(t,l,i){const r=this;return o;function o(c){return r.parser.lazy[r.now().line]?i(c):ze(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o):$e(t,s,"linePrefix",5)(c)}function s(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):ze(c)?o(c):i(c)}}const QC={name:"codeText",previous:IC,resolve:XC,tokenize:ZC};function XC(t){let l=t.length-4,i=3,r,o;if((t[i][1].type==="lineEnding"||t[i][1].type==="space")&&(t[l][1].type==="lineEnding"||t[l][1].type==="space")){for(r=i;++r<l;)if(t[r][1].type==="codeTextData"){t[i][1].type="codeTextPadding",t[l][1].type="codeTextPadding",i+=2,l-=2;break}}for(r=i-1,l++;++r<=l;)o===void 0?r!==l&&t[r][1].type!=="lineEnding"&&(o=r):(r===l||t[r][1].type==="lineEnding")&&(t[o][1].type="codeTextData",r!==o+2&&(t[o][1].end=t[r-1][1].end,t.splice(o+2,r-o-2),l-=r-o-2,r=o+2),o=void 0);return t}function IC(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ZC(t,l,i){let r=0,o,s;return c;function c(g){return t.enter("codeText"),t.enter("codeTextSequence"),d(g)}function d(g){return g===96?(t.consume(g),r++,d):(t.exit("codeTextSequence"),p(g))}function p(g){return g===null?i(g):g===32?(t.enter("space"),t.consume(g),t.exit("space"),p):g===96?(s=t.enter("codeTextSequence"),o=0,y(g)):ze(g)?(t.enter("lineEnding"),t.consume(g),t.exit("lineEnding"),p):(t.enter("codeTextData"),m(g))}function m(g){return g===null||g===32||g===96||ze(g)?(t.exit("codeTextData"),p(g)):(t.consume(g),m)}function y(g){return g===96?(t.consume(g),o++,y):o===r?(t.exit("codeTextSequence"),t.exit("codeText"),l(g)):(s.type="codeTextData",m(g))}}class KC{constructor(l){this.left=l?[...l]:[],this.right=[]}get(l){if(l<0||l>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+l+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return l<this.left.length?this.left[l]:this.right[this.right.length-l+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(l,i){const r=i??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(l,r):l>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-l+this.left.length).reverse():this.left.slice(l).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(l,i,r){const o=i||0;this.setCursor(Math.trunc(l));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Nr(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(l){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(l)}pushMany(l){this.setCursor(Number.POSITIVE_INFINITY),Nr(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),Nr(this.right,l.reverse())}setCursor(l){if(!(l===this.left.length||l>this.left.length&&this.right.length===0||l<0&&this.left.length===0))if(l<this.left.length){const i=this.left.splice(l,Number.POSITIVE_INFINITY);Nr(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);Nr(this.left,i.reverse())}}}function Nr(t,l){let i=0;if(l.length<1e4)t.push(...l);else for(;i<l.length;)t.push(...l.slice(i,i+1e4)),i+=1e4}function kb(t){const l={};let i=-1,r,o,s,c,d,p,m;const y=new KC(t);for(;++i<y.length;){for(;i in l;)i=l[i];if(r=y.get(i),i&&r[1].type==="chunkFlow"&&y.get(i-1)[1].type==="listItemPrefix"&&(p=r[1]._tokenizer.events,s=0,s<p.length&&p[s][1].type==="lineEndingBlank"&&(s+=2),s<p.length&&p[s][1].type==="content"))for(;++s<p.length&&p[s][1].type!=="content";)p[s][1].type==="chunkText"&&(p[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(l,$C(y,i)),i=l[i],m=!0);else if(r[1]._container){for(s=i,o=void 0;s--;)if(c=y.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(y.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(r[1].end={...y.get(o)[1].start},d=y.slice(o,i),d.unshift(r),y.splice(o,i-o+1,d))}}return bn(t,0,Number.POSITIVE_INFINITY,y.slice(0)),!m}function $C(t,l){const i=t.get(l)[1],r=t.get(l)[2];let o=l-1;const s=[];let c=i._tokenizer;c||(c=r.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,p=[],m={};let y,g,b=-1,x=i,k=0,T=0;const _=[T];for(;x;){for(;t.get(++o)[1]!==x;);s.push(o),x._tokenizer||(y=r.sliceStream(x),x.next||y.push(null),g&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=x,x=x.next}for(x=i;++b<d.length;)d[b][0]==="exit"&&d[b-1][0]==="enter"&&d[b][1].type===d[b-1][1].type&&d[b][1].start.line!==d[b][1].end.line&&(T=b+1,_.push(T),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):_.pop(),b=_.length;b--;){const A=d.slice(_[b],_[b+1]),R=s.pop();p.push([R,R+A.length-1]),t.splice(R,2,A)}for(p.reverse(),b=-1;++b<p.length;)m[k+p[b][0]]=k+p[b][1],k+=p[b][1]-p[b][0]-1;return m}const PC={resolve:WC,tokenize:e2},JC={partial:!0,tokenize:t2};function WC(t){return kb(t),t}function e2(t,l){let i;return r;function r(d){return t.enter("content"),i=t.enter("chunkContent",{contentType:"content"}),o(d)}function o(d){return d===null?s(d):ze(d)?t.check(JC,c,s)(d):(t.consume(d),o)}function s(d){return t.exit("chunkContent"),t.exit("content"),l(d)}function c(d){return t.consume(d),t.exit("chunkContent"),i.next=t.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function t2(t,l,i){const r=this;return o;function o(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),$e(t,s,"linePrefix")}function s(c){if(c===null||ze(c))return i(c);const d=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):t.interrupt(r.parser.constructs.flow,i,l)(c)}}function Cb(t,l,i,r,o,s,c,d,p){const m=p||Number.POSITIVE_INFINITY;let y=0;return g;function g(A){return A===60?(t.enter(r),t.enter(o),t.enter(s),t.consume(A),t.exit(s),b):A===null||A===32||A===41||Mo(A)?i(A):(t.enter(r),t.enter(c),t.enter(d),t.enter("chunkString",{contentType:"string"}),T(A))}function b(A){return A===62?(t.enter(s),t.consume(A),t.exit(s),t.exit(o),t.exit(r),l):(t.enter(d),t.enter("chunkString",{contentType:"string"}),x(A))}function x(A){return A===62?(t.exit("chunkString"),t.exit(d),b(A)):A===null||A===60||ze(A)?i(A):(t.consume(A),A===92?k:x)}function k(A){return A===60||A===62||A===92?(t.consume(A),x):x(A)}function T(A){return!y&&(A===null||A===41||st(A))?(t.exit("chunkString"),t.exit(d),t.exit(c),t.exit(r),l(A)):y<m&&A===40?(t.consume(A),y++,T):A===41?(t.consume(A),y--,T):A===null||A===32||A===40||Mo(A)?i(A):(t.consume(A),A===92?_:T)}function _(A){return A===40||A===41||A===92?(t.consume(A),T):T(A)}}function Tb(t,l,i,r,o,s){const c=this;let d=0,p;return m;function m(x){return t.enter(r),t.enter(o),t.consume(x),t.exit(o),t.enter(s),y}function y(x){return d>999||x===null||x===91||x===93&&!p||x===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?i(x):x===93?(t.exit(s),t.enter(o),t.consume(x),t.exit(o),t.exit(r),l):ze(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),y):(t.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||x===91||x===93||ze(x)||d++>999?(t.exit("chunkString"),y(x)):(t.consume(x),p||(p=!Ye(x)),x===92?b:g)}function b(x){return x===91||x===92||x===93?(t.consume(x),d++,g):g(x)}}function Ab(t,l,i,r,o,s){let c;return d;function d(b){return b===34||b===39||b===40?(t.enter(r),t.enter(o),t.consume(b),t.exit(o),c=b===40?41:b,p):i(b)}function p(b){return b===c?(t.enter(o),t.consume(b),t.exit(o),t.exit(r),l):(t.enter(s),m(b))}function m(b){return b===c?(t.exit(s),p(c)):b===null?i(b):ze(b)?(t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),$e(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===c||b===null||ze(b)?(t.exit("chunkString"),m(b)):(t.consume(b),b===92?g:y)}function g(b){return b===c||b===92?(t.consume(b),y):y(b)}}function Hr(t,l){let i;return r;function r(o){return ze(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i=!0,r):Ye(o)?$e(t,r,i?"linePrefix":"lineSuffix")(o):l(o)}}const n2={name:"definition",tokenize:a2},l2={partial:!0,tokenize:i2};function a2(t,l,i){const r=this;let o;return s;function s(x){return t.enter("definition"),c(x)}function c(x){return Tb.call(r,t,d,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function d(x){return o=Qn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),x===58?(t.enter("definitionMarker"),t.consume(x),t.exit("definitionMarker"),p):i(x)}function p(x){return st(x)?Hr(t,m)(x):m(x)}function m(x){return Cb(t,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function y(x){return t.attempt(l2,g,g)(x)}function g(x){return Ye(x)?$e(t,b,"whitespace")(x):b(x)}function b(x){return x===null||ze(x)?(t.exit("definition"),r.parser.defined.push(o),l(x)):i(x)}}function i2(t,l,i){return r;function r(d){return st(d)?Hr(t,o)(d):i(d)}function o(d){return Ab(t,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function s(d){return Ye(d)?$e(t,c,"whitespace")(d):c(d)}function c(d){return d===null||ze(d)?l(d):i(d)}}const r2={name:"hardBreakEscape",tokenize:u2};function u2(t,l,i){return r;function r(s){return t.enter("hardBreakEscape"),t.consume(s),o}function o(s){return ze(s)?(t.exit("hardBreakEscape"),l(s)):i(s)}}const o2={name:"headingAtx",resolve:s2,tokenize:c2};function s2(t,l){let i=t.length-2,r=3,o,s;return t[r][1].type==="whitespace"&&(r+=2),i-2>r&&t[i][1].type==="whitespace"&&(i-=2),t[i][1].type==="atxHeadingSequence"&&(r===i-1||i-4>r&&t[i-2][1].type==="whitespace")&&(i-=r+1===i?2:4),i>r&&(o={type:"atxHeadingText",start:t[r][1].start,end:t[i][1].end},s={type:"chunkText",start:t[r][1].start,end:t[i][1].end,contentType:"text"},bn(t,r,i-r+1,[["enter",o,l],["enter",s,l],["exit",s,l],["exit",o,l]])),t}function c2(t,l,i){let r=0;return o;function o(y){return t.enter("atxHeading"),s(y)}function s(y){return t.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&r++<6?(t.consume(y),c):y===null||st(y)?(t.exit("atxHeadingSequence"),d(y)):i(y)}function d(y){return y===35?(t.enter("atxHeadingSequence"),p(y)):y===null||ze(y)?(t.exit("atxHeading"),l(y)):Ye(y)?$e(t,d,"whitespace")(y):(t.enter("atxHeadingText"),m(y))}function p(y){return y===35?(t.consume(y),p):(t.exit("atxHeadingSequence"),d(y))}function m(y){return y===null||y===35||st(y)?(t.exit("atxHeadingText"),d(y)):(t.consume(y),m)}}const f2=["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"],Ny=["pre","script","style","textarea"],d2={concrete:!0,name:"htmlFlow",resolveTo:p2,tokenize:g2},h2={partial:!0,tokenize:v2},m2={partial:!0,tokenize:y2};function p2(t){let l=t.length;for(;l--&&!(t[l][0]==="enter"&&t[l][1].type==="htmlFlow"););return l>1&&t[l-2][1].type==="linePrefix"&&(t[l][1].start=t[l-2][1].start,t[l+1][1].start=t[l-2][1].start,t.splice(l-2,2)),t}function g2(t,l,i){const r=this;let o,s,c,d,p;return m;function m(w){return y(w)}function y(w){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(w),g}function g(w){return w===33?(t.consume(w),b):w===47?(t.consume(w),s=!0,T):w===63?(t.consume(w),o=3,r.interrupt?l:z):Kt(w)?(t.consume(w),c=String.fromCharCode(w),_):i(w)}function b(w){return w===45?(t.consume(w),o=2,x):w===91?(t.consume(w),o=5,d=0,k):Kt(w)?(t.consume(w),o=4,r.interrupt?l:z):i(w)}function x(w){return w===45?(t.consume(w),r.interrupt?l:z):i(w)}function k(w){const ae="CDATA[";return w===ae.charCodeAt(d++)?(t.consume(w),d===ae.length?r.interrupt?l:Z:k):i(w)}function T(w){return Kt(w)?(t.consume(w),c=String.fromCharCode(w),_):i(w)}function _(w){if(w===null||w===47||w===62||st(w)){const ae=w===47,me=c.toLowerCase();return!ae&&!s&&Ny.includes(me)?(o=1,r.interrupt?l(w):Z(w)):f2.includes(c.toLowerCase())?(o=6,ae?(t.consume(w),A):r.interrupt?l(w):Z(w)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(w):s?R(w):O(w))}return w===45||Qt(w)?(t.consume(w),c+=String.fromCharCode(w),_):i(w)}function A(w){return w===62?(t.consume(w),r.interrupt?l:Z):i(w)}function R(w){return Ye(w)?(t.consume(w),R):q(w)}function O(w){return w===47?(t.consume(w),q):w===58||w===95||Kt(w)?(t.consume(w),ee):Ye(w)?(t.consume(w),O):q(w)}function ee(w){return w===45||w===46||w===58||w===95||Qt(w)?(t.consume(w),ee):ie(w)}function ie(w){return w===61?(t.consume(w),Y):Ye(w)?(t.consume(w),ie):O(w)}function Y(w){return w===null||w===60||w===61||w===62||w===96?i(w):w===34||w===39?(t.consume(w),p=w,D):Ye(w)?(t.consume(w),Y):re(w)}function D(w){return w===p?(t.consume(w),p=null,fe):w===null||ze(w)?i(w):(t.consume(w),D)}function re(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||st(w)?ie(w):(t.consume(w),re)}function fe(w){return w===47||w===62||Ye(w)?O(w):i(w)}function q(w){return w===62?(t.consume(w),V):i(w)}function V(w){return w===null||ze(w)?Z(w):Ye(w)?(t.consume(w),V):i(w)}function Z(w){return w===45&&o===2?(t.consume(w),U):w===60&&o===1?(t.consume(w),J):w===62&&o===4?(t.consume(w),M):w===63&&o===3?(t.consume(w),z):w===93&&o===5?(t.consume(w),xe):ze(w)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(h2,I,Q)(w)):w===null||ze(w)?(t.exit("htmlFlowData"),Q(w)):(t.consume(w),Z)}function Q(w){return t.check(m2,ue,I)(w)}function ue(w){return t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),$}function $(w){return w===null||ze(w)?Q(w):(t.enter("htmlFlowData"),Z(w))}function U(w){return w===45?(t.consume(w),z):Z(w)}function J(w){return w===47?(t.consume(w),c="",se):Z(w)}function se(w){if(w===62){const ae=c.toLowerCase();return Ny.includes(ae)?(t.consume(w),M):Z(w)}return Kt(w)&&c.length<8?(t.consume(w),c+=String.fromCharCode(w),se):Z(w)}function xe(w){return w===93?(t.consume(w),z):Z(w)}function z(w){return w===62?(t.consume(w),M):w===45&&o===2?(t.consume(w),z):Z(w)}function M(w){return w===null||ze(w)?(t.exit("htmlFlowData"),I(w)):(t.consume(w),M)}function I(w){return t.exit("htmlFlow"),l(w)}}function y2(t,l,i){const r=this;return o;function o(c){return ze(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):i(c)}function s(c){return r.parser.lazy[r.now().line]?i(c):l(c)}}function v2(t,l,i){return r;function r(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(eu,l,i)}}const b2={name:"htmlText",tokenize:x2};function x2(t,l,i){const r=this;let o,s,c;return d;function d(z){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(z),p}function p(z){return z===33?(t.consume(z),m):z===47?(t.consume(z),ie):z===63?(t.consume(z),O):Kt(z)?(t.consume(z),re):i(z)}function m(z){return z===45?(t.consume(z),y):z===91?(t.consume(z),s=0,k):Kt(z)?(t.consume(z),R):i(z)}function y(z){return z===45?(t.consume(z),x):i(z)}function g(z){return z===null?i(z):z===45?(t.consume(z),b):ze(z)?(c=g,J(z)):(t.consume(z),g)}function b(z){return z===45?(t.consume(z),x):g(z)}function x(z){return z===62?U(z):z===45?b(z):g(z)}function k(z){const M="CDATA[";return z===M.charCodeAt(s++)?(t.consume(z),s===M.length?T:k):i(z)}function T(z){return z===null?i(z):z===93?(t.consume(z),_):ze(z)?(c=T,J(z)):(t.consume(z),T)}function _(z){return z===93?(t.consume(z),A):T(z)}function A(z){return z===62?U(z):z===93?(t.consume(z),A):T(z)}function R(z){return z===null||z===62?U(z):ze(z)?(c=R,J(z)):(t.consume(z),R)}function O(z){return z===null?i(z):z===63?(t.consume(z),ee):ze(z)?(c=O,J(z)):(t.consume(z),O)}function ee(z){return z===62?U(z):O(z)}function ie(z){return Kt(z)?(t.consume(z),Y):i(z)}function Y(z){return z===45||Qt(z)?(t.consume(z),Y):D(z)}function D(z){return ze(z)?(c=D,J(z)):Ye(z)?(t.consume(z),D):U(z)}function re(z){return z===45||Qt(z)?(t.consume(z),re):z===47||z===62||st(z)?fe(z):i(z)}function fe(z){return z===47?(t.consume(z),U):z===58||z===95||Kt(z)?(t.consume(z),q):ze(z)?(c=fe,J(z)):Ye(z)?(t.consume(z),fe):U(z)}function q(z){return z===45||z===46||z===58||z===95||Qt(z)?(t.consume(z),q):V(z)}function V(z){return z===61?(t.consume(z),Z):ze(z)?(c=V,J(z)):Ye(z)?(t.consume(z),V):fe(z)}function Z(z){return z===null||z===60||z===61||z===62||z===96?i(z):z===34||z===39?(t.consume(z),o=z,Q):ze(z)?(c=Z,J(z)):Ye(z)?(t.consume(z),Z):(t.consume(z),ue)}function Q(z){return z===o?(t.consume(z),o=void 0,$):z===null?i(z):ze(z)?(c=Q,J(z)):(t.consume(z),Q)}function ue(z){return z===null||z===34||z===39||z===60||z===61||z===96?i(z):z===47||z===62||st(z)?fe(z):(t.consume(z),ue)}function $(z){return z===47||z===62||st(z)?fe(z):i(z)}function U(z){return z===62?(t.consume(z),t.exit("htmlTextData"),t.exit("htmlText"),l):i(z)}function J(z){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(z),t.exit("lineEnding"),se}function se(z){return Ye(z)?$e(t,xe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):xe(z)}function xe(z){return t.enter("htmlTextData"),c(z)}}const Md={name:"labelEnd",resolveAll:k2,resolveTo:C2,tokenize:T2},S2={tokenize:A2},E2={tokenize:_2},w2={tokenize:z2};function k2(t){let l=-1;const i=[];for(;++l<t.length;){const r=t[l][1];if(i.push(t[l]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",l+=o}}return t.length!==i.length&&bn(t,0,t.length,i),t}function C2(t,l){let i=t.length,r=0,o,s,c,d;for(;i--;)if(o=t[i][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;t[i][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(t[i][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=i,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(c=i);const p={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[s][1].start},end:{...t[c][1].end}},y={type:"labelText",start:{...t[s+r+2][1].end},end:{...t[c-2][1].start}};return d=[["enter",p,l],["enter",m,l]],d=jn(d,t.slice(s+1,s+r+3)),d=jn(d,[["enter",y,l]]),d=jn(d,Xo(l.parser.constructs.insideSpan.null,t.slice(s+r+4,c-3),l)),d=jn(d,[["exit",y,l],t[c-2],t[c-1],["exit",m,l]]),d=jn(d,t.slice(c+1)),d=jn(d,[["exit",p,l]]),bn(t,s,t.length,d),t}function T2(t,l,i){const r=this;let o=r.events.length,s,c;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){s=r.events[o][1];break}return d;function d(b){return s?s._inactive?g(b):(c=r.parser.defined.includes(Qn(r.sliceSerialize({start:s.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(b),t.exit("labelMarker"),t.exit("labelEnd"),p):i(b)}function p(b){return b===40?t.attempt(S2,y,c?y:g)(b):b===91?t.attempt(E2,y,c?m:g)(b):c?y(b):g(b)}function m(b){return t.attempt(w2,y,g)(b)}function y(b){return l(b)}function g(b){return s._balanced=!0,i(b)}}function A2(t,l,i){return r;function r(g){return t.enter("resource"),t.enter("resourceMarker"),t.consume(g),t.exit("resourceMarker"),o}function o(g){return st(g)?Hr(t,s)(g):s(g)}function s(g){return g===41?y(g):Cb(t,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return st(g)?Hr(t,p)(g):y(g)}function d(g){return i(g)}function p(g){return g===34||g===39||g===40?Ab(t,m,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function m(g){return st(g)?Hr(t,y)(g):y(g)}function y(g){return g===41?(t.enter("resourceMarker"),t.consume(g),t.exit("resourceMarker"),t.exit("resource"),l):i(g)}}function _2(t,l,i){const r=this;return o;function o(d){return Tb.call(r,t,s,c,"reference","referenceMarker","referenceString")(d)}function s(d){return r.parser.defined.includes(Qn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?l(d):i(d)}function c(d){return i(d)}}function z2(t,l,i){return r;function r(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),o}function o(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),l):i(s)}}const R2={name:"labelStartImage",resolveAll:Md.resolveAll,tokenize:D2};function D2(t,l,i){const r=this;return o;function o(d){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(d),t.exit("labelImageMarker"),s}function s(d){return d===91?(t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelImage"),c):i(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(d):l(d)}}const j2={name:"labelStartLink",resolveAll:Md.resolveAll,tokenize:N2};function N2(t,l,i){const r=this;return o;function o(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(c):l(c)}}const xf={name:"lineEnding",tokenize:M2};function M2(t,l){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),$e(t,l,"linePrefix")}}const Do={name:"thematicBreak",tokenize:O2};function O2(t,l,i){let r=0,o;return s;function s(m){return t.enter("thematicBreak"),c(m)}function c(m){return o=m,d(m)}function d(m){return m===o?(t.enter("thematicBreakSequence"),p(m)):r>=3&&(m===null||ze(m))?(t.exit("thematicBreak"),l(m)):i(m)}function p(m){return m===o?(t.consume(m),r++,p):(t.exit("thematicBreakSequence"),Ye(m)?$e(t,d,"whitespace")(m):d(m))}}const an={continuation:{tokenize:H2},exit:Y2,name:"list",tokenize:B2},L2={partial:!0,tokenize:V2},U2={partial:!0,tokenize:q2};function B2(t,l,i){const r=this,o=r.events[r.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return d;function d(x){const k=r.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||x===r.containerState.marker:Zf(x)){if(r.containerState.type||(r.containerState.type=k,t.enter(k,{_container:!0})),k==="listUnordered")return t.enter("listItemPrefix"),x===42||x===45?t.check(Do,i,m)(x):m(x);if(!r.interrupt||x===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),p(x)}return i(x)}function p(x){return Zf(x)&&++c<10?(t.consume(x),p):(!r.interrupt||c<2)&&(r.containerState.marker?x===r.containerState.marker:x===41||x===46)?(t.exit("listItemValue"),m(x)):i(x)}function m(x){return t.enter("listItemMarker"),t.consume(x),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||x,t.check(eu,r.interrupt?i:y,t.attempt(L2,b,g))}function y(x){return r.containerState.initialBlankLine=!0,s++,b(x)}function g(x){return Ye(x)?(t.enter("listItemPrefixWhitespace"),t.consume(x),t.exit("listItemPrefixWhitespace"),b):i(x)}function b(x){return r.containerState.size=s+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,l(x)}}function H2(t,l,i){const r=this;return r.containerState._closeFlow=void 0,t.check(eu,o,s);function o(d){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$e(t,l,"listItemIndent",r.containerState.size+1)(d)}function s(d){return r.containerState.furtherBlankLines||!Ye(d)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,c(d)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(U2,l,c)(d))}function c(d){return r.containerState._closeFlow=!0,r.interrupt=void 0,$e(t,t.attempt(an,l,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function q2(t,l,i){const r=this;return $e(t,o,"listItemIndent",r.containerState.size+1);function o(s){const c=r.events[r.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===r.containerState.size?l(s):i(s)}}function Y2(t){t.exit(this.containerState.type)}function V2(t,l,i){const r=this;return $e(t,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const c=r.events[r.events.length-1];return!Ye(s)&&c&&c[1].type==="listItemPrefixWhitespace"?l(s):i(s)}}const My={name:"setextUnderline",resolveTo:F2,tokenize:G2};function F2(t,l){let i=t.length,r,o,s;for(;i--;)if(t[i][0]==="enter"){if(t[i][1].type==="content"){r=i;break}t[i][1].type==="paragraph"&&(o=i)}else t[i][1].type==="content"&&t.splice(i,1),!s&&t[i][1].type==="definition"&&(s=i);const c={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[o][1].type="setextHeadingText",s?(t.splice(o,0,["enter",c,l]),t.splice(s+1,0,["exit",t[r][1],l]),t[r][1].end={...t[s][1].end}):t[r][1]=c,t.push(["exit",c,l]),t}function G2(t,l,i){const r=this;let o;return s;function s(m){let y=r.events.length,g;for(;y--;)if(r.events[y][1].type!=="lineEnding"&&r.events[y][1].type!=="linePrefix"&&r.events[y][1].type!=="content"){g=r.events[y][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(t.enter("setextHeadingLine"),o=m,c(m)):i(m)}function c(m){return t.enter("setextHeadingLineSequence"),d(m)}function d(m){return m===o?(t.consume(m),d):(t.exit("setextHeadingLineSequence"),Ye(m)?$e(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||ze(m)?(t.exit("setextHeadingLine"),l(m)):i(m)}}const Q2={tokenize:X2};function X2(t){const l=this,i=t.attempt(eu,r,t.attempt(this.parser.constructs.flowInitial,o,$e(t,t.attempt(this.parser.constructs.flow,o,t.attempt(PC,o)),"linePrefix")));return i;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),l.currentConstruct=void 0,i}function o(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),l.currentConstruct=void 0,i}}const I2={resolveAll:zb()},Z2=_b("string"),K2=_b("text");function _b(t){return{resolveAll:zb(t==="text"?$2:void 0),tokenize:l};function l(i){const r=this,o=this.parser.constructs[t],s=i.attempt(o,c,d);return c;function c(y){return m(y)?s(y):d(y)}function d(y){if(y===null){i.consume(y);return}return i.enter("data"),i.consume(y),p}function p(y){return m(y)?(i.exit("data"),s(y)):(i.consume(y),p)}function m(y){if(y===null)return!0;const g=o[y];let b=-1;if(g)for(;++b<g.length;){const x=g[b];if(!x.previous||x.previous.call(r,r.previous))return!0}return!1}}}function zb(t){return l;function l(i,r){let o=-1,s;for(;++o<=i.length;)s===void 0?i[o]&&i[o][1].type==="data"&&(s=o,o++):(!i[o]||i[o][1].type!=="data")&&(o!==s+2&&(i[s][1].end=i[o-1][1].end,i.splice(s+2,o-s-2),o=s+2),s=void 0);return t?t(i,r):i}}function $2(t,l){let i=0;for(;++i<=t.length;)if((i===t.length||t[i][1].type==="lineEnding")&&t[i-1][1].type==="data"){const r=t[i-1][1],o=l.sliceStream(r);let s=o.length,c=-1,d=0,p;for(;s--;){const m=o[s];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(m===-2)p=!0,d++;else if(m!==-1){s++;break}}if(l._contentTypeTextTrailing&&i===t.length&&(d=0),d){const m={type:i===t.length||p||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:r.start._bufferIndex+c,_index:r.start._index+s,line:r.end.line,column:r.end.column-d,offset:r.end.offset-d},end:{...r.end}};r.end={...m.start},r.start.offset===r.end.offset?Object.assign(r,m):(t.splice(i,0,["enter",m,l],["exit",m,l]),i+=2)}i++}return t}const P2={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:Sb},J2={91:n2},W2={[-2]:bf,[-1]:bf,32:bf},eT={35:o2,42:Do,45:[My,Do],60:d2,61:My,95:Do,96:jy,126:jy},tT={38:wb,92:Eb},nT={[-5]:xf,[-4]:xf,[-3]:xf,33:R2,38:wb,42:Kf,60:[jC,b2],91:j2,92:[r2,Eb],93:Md,95:Kf,96:QC},lT={null:[Kf,I2]},aT={null:[42,95]},iT={null:[]},rT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:aT,contentInitial:J2,disable:iT,document:P2,flow:eT,flowInitial:W2,insideSpan:lT,string:tT,text:nT},Symbol.toStringTag,{value:"Module"}));function uT(t,l,i){let r={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const o={},s=[];let c=[],d=[];const p={attempt:D(ie),check:D(Y),consume:R,enter:O,exit:ee,interrupt:D(Y,{interrupt:!0})},m={code:null,containerState:{},defineSkip:T,events:[],now:k,parser:t,previous:null,sliceSerialize:b,sliceStream:x,write:g};let y=l.tokenize.call(m,p);return l.resolveAll&&s.push(l),m;function g(V){return c=jn(c,V),_(),c[c.length-1]!==null?[]:(re(l,0),m.events=Xo(s,m.events,m),m.events)}function b(V,Z){return sT(x(V),Z)}function x(V){return oT(c,V)}function k(){const{_bufferIndex:V,_index:Z,line:Q,column:ue,offset:$}=r;return{_bufferIndex:V,_index:Z,line:Q,column:ue,offset:$}}function T(V){o[V.line]=V.column,q()}function _(){let V;for(;r._index<c.length;){const Z=c[r._index];if(typeof Z=="string")for(V=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===V&&r._bufferIndex<Z.length;)A(Z.charCodeAt(r._bufferIndex));else A(Z)}}function A(V){y=y(V)}function R(V){ze(V)?(r.line++,r.column=1,r.offset+=V===-3?2:1,q()):V!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===c[r._index].length&&(r._bufferIndex=-1,r._index++)),m.previous=V}function O(V,Z){const Q=Z||{};return Q.type=V,Q.start=k(),m.events.push(["enter",Q,m]),d.push(Q),Q}function ee(V){const Z=d.pop();return Z.end=k(),m.events.push(["exit",Z,m]),Z}function ie(V,Z){re(V,Z.from)}function Y(V,Z){Z.restore()}function D(V,Z){return Q;function Q(ue,$,U){let J,se,xe,z;return Array.isArray(ue)?I(ue):"tokenize"in ue?I([ue]):M(ue);function M(be){return Ne;function Ne(pe){const Re=pe!==null&&be[pe],Dt=pe!==null&&be.null,Ln=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(Dt)?Dt:Dt?[Dt]:[]];return I(Ln)(pe)}}function I(be){return J=be,se=0,be.length===0?U:w(be[se])}function w(be){return Ne;function Ne(pe){return z=fe(),xe=be,be.partial||(m.currentConstruct=be),be.name&&m.parser.constructs.disable.null.includes(be.name)?me():be.tokenize.call(Z?Object.assign(Object.create(m),Z):m,p,ae,me)(pe)}}function ae(be){return V(xe,z),$}function me(be){return z.restore(),++se<J.length?w(J[se]):U}}}function re(V,Z){V.resolveAll&&!s.includes(V)&&s.push(V),V.resolve&&bn(m.events,Z,m.events.length-Z,V.resolve(m.events.slice(Z),m)),V.resolveTo&&(m.events=V.resolveTo(m.events,m))}function fe(){const V=k(),Z=m.previous,Q=m.currentConstruct,ue=m.events.length,$=Array.from(d);return{from:ue,restore:U};function U(){r=V,m.previous=Z,m.currentConstruct=Q,m.events.length=ue,d=$,q()}}function q(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function oT(t,l){const i=l.start._index,r=l.start._bufferIndex,o=l.end._index,s=l.end._bufferIndex;let c;if(i===o)c=[t[i].slice(r,s)];else{if(c=t.slice(i,o),r>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(r):c.shift()}s>0&&c.push(t[o].slice(0,s))}return c}function sT(t,l){let i=-1;const r=[];let o;for(;++i<t.length;){const s=t[i];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
190
- `;break}case-3:{c=`\r
191
- `;break}case-2:{c=l?" ":" ";break}case-1:{if(!l&&o)continue;c=" ";break}default:c=String.fromCharCode(s)}o=s===-2,r.push(c)}return r.join("")}function cT(t){const r={constructs:bb([rT,...(t||{}).extensions||[]]),content:o(CC),defined:[],document:o(AC),flow:o(Q2),lazy:{},string:o(Z2),text:o(K2)};return r;function o(s){return c;function c(d){return uT(r,s,d)}}}function fT(t){for(;!kb(t););return t}const Oy=/[\0\t\n\r]/g;function dT(){let t=1,l="",i=!0,r;return o;function o(s,c,d){const p=[];let m,y,g,b,x;for(s=l+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),g=0,l="",i&&(s.charCodeAt(0)===65279&&g++,i=void 0);g<s.length;){if(Oy.lastIndex=g,m=Oy.exec(s),b=m&&m.index!==void 0?m.index:s.length,x=s.charCodeAt(b),!m){l=s.slice(g);break}if(x===10&&g===b&&r)p.push(-3),r=void 0;else switch(r&&(p.push(-5),r=void 0),g<b&&(p.push(s.slice(g,b)),t+=b-g),x){case 0:{p.push(65533),t++;break}case 9:{for(y=Math.ceil(t/4)*4,p.push(-2);t++<y;)p.push(-1);break}case 10:{p.push(-4),t=1;break}default:r=!0,t=1}g=b+1}return d&&(r&&p.push(-5),l&&p.push(l),p.push(null)),p}}const hT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mT(t){return t.replace(hT,pT)}function pT(t,l,i){if(l)return l;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),s=o===120||o===88;return xb(i.slice(s?2:1),s?16:10)}return Nd(i)||t}const Rb={}.hasOwnProperty;function gT(t,l,i){return typeof l!="string"&&(i=l,l=void 0),yT(i)(fT(cT(i).document().write(dT()(t,l,!0))))}function yT(t){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ll),autolinkProtocol:fe,autolinkEmail:fe,atxHeading:s(Rl),blockQuote:s(Dt),characterEscape:fe,characterReference:fe,codeFenced:s(Ln),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Ln,c),codeText:s(yt,c),codeTextData:fe,data:fe,codeFlowValue:fe,definition:s(Un),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(xn),hardBreakEscape:s($t),hardBreakTrailing:s($t),htmlFlow:s(Fa,c),htmlFlowData:fe,htmlText:s(Fa,c),htmlTextData:fe,image:s(Ga),label:c,link:s(ll),listItem:s(ha),listItemValue:b,listOrdered:s(Dl,g),listUnordered:s(Dl),paragraph:s(Li),reference:w,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(Rl),strong:s(Ui),thematicBreak:s(al)},exit:{atxHeading:p(),atxHeadingSequence:ie,autolink:p(),autolinkEmail:Re,autolinkProtocol:pe,blockQuote:p(),characterEscapeValue:q,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:be,characterReference:Ne,codeFenced:p(_),codeFencedFence:T,codeFencedFenceInfo:x,codeFencedFenceMeta:k,codeFlowValue:q,codeIndented:p(A),codeText:p($),codeTextData:q,data:q,definition:p(),definitionDestinationString:ee,definitionLabelString:R,definitionTitleString:O,emphasis:p(),hardBreakEscape:p(Z),hardBreakTrailing:p(Z),htmlFlow:p(Q),htmlFlowData:q,htmlText:p(ue),htmlTextData:q,image:p(J),label:xe,labelText:se,lineEnding:V,link:p(U),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ae,resourceDestinationString:z,resourceTitleString:M,resource:I,setextHeading:p(re),setextHeadingLineSequence:D,setextHeadingText:Y,strong:p(),thematicBreak:p()}};Db(l,(t||{}).mdastExtensions||[]);const i={};return r;function r(te){let de={type:"root",children:[]};const Ce={stack:[de],tokenStack:[],config:l,enter:d,exit:m,buffer:c,resume:y,data:i},je=[];let Pe=-1;for(;++Pe<te.length;)if(te[Pe][1].type==="listOrdered"||te[Pe][1].type==="listUnordered")if(te[Pe][0]==="enter")je.push(Pe);else{const It=je.pop();Pe=o(te,It,Pe)}for(Pe=-1;++Pe<te.length;){const It=l[te[Pe][0]];Rb.call(It,te[Pe][1].type)&&It[te[Pe][1].type].call(Object.assign({sliceSerialize:te[Pe][2].sliceSerialize},Ce),te[Pe][1])}if(Ce.tokenStack.length>0){const It=Ce.tokenStack[Ce.tokenStack.length-1];(It[1]||Ly).call(Ce,void 0,It[0])}for(de.position={start:aa(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:aa(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},Pe=-1;++Pe<l.transforms.length;)de=l.transforms[Pe](de)||de;return de}function o(te,de,Ce){let je=de-1,Pe=-1,It=!1,un,Lt,nt,Ut;for(;++je<=Ce;){const tt=te[je];switch(tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tt[0]==="enter"?Pe++:Pe--,Ut=void 0;break}case"lineEndingBlank":{tt[0]==="enter"&&(un&&!Ut&&!Pe&&!nt&&(nt=je),Ut=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ut=void 0}if(!Pe&&tt[0]==="enter"&&tt[1].type==="listItemPrefix"||Pe===-1&&tt[0]==="exit"&&(tt[1].type==="listUnordered"||tt[1].type==="listOrdered")){if(un){let Bn=je;for(Lt=void 0;Bn--;){const on=te[Bn];if(on[1].type==="lineEnding"||on[1].type==="lineEndingBlank"){if(on[0]==="exit")continue;Lt&&(te[Lt][1].type="lineEndingBlank",It=!0),on[1].type="lineEnding",Lt=Bn}else if(!(on[1].type==="linePrefix"||on[1].type==="blockQuotePrefix"||on[1].type==="blockQuotePrefixWhitespace"||on[1].type==="blockQuoteMarker"||on[1].type==="listItemIndent"))break}nt&&(!Lt||nt<Lt)&&(un._spread=!0),un.end=Object.assign({},Lt?te[Lt][1].start:tt[1].end),te.splice(Lt||je,0,["exit",un,tt[2]]),je++,Ce++}if(tt[1].type==="listItemPrefix"){const Bn={type:"listItem",_spread:!1,start:Object.assign({},tt[1].start),end:void 0};un=Bn,te.splice(je,0,["enter",Bn,tt[2]]),je++,Ce++,nt=void 0,Ut=!0}}}return te[de][1]._spread=It,Ce}function s(te,de){return Ce;function Ce(je){d.call(this,te(je),je),de&&de.call(this,je)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(te,de,Ce){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([de,Ce||void 0]),te.position={start:aa(de.start),end:void 0}}function p(te){return de;function de(Ce){te&&te.call(this,Ce),m.call(this,Ce)}}function m(te,de){const Ce=this.stack.pop(),je=this.tokenStack.pop();if(je)je[0].type!==te.type&&(de?de.call(this,te,je[0]):(je[1]||Ly).call(this,te,je[0]));else throw new Error("Cannot close `"+te.type+"` ("+Br({start:te.start,end:te.end})+"): it’s not open");Ce.position.end=aa(te.end)}function y(){return jd(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(te){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function x(){const te=this.resume(),de=this.stack[this.stack.length-1];de.lang=te}function k(){const te=this.resume(),de=this.stack[this.stack.length-1];de.meta=te}function T(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te.replace(/(\r?\n|\r)$/g,"")}function R(te){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=Qn(this.sliceSerialize(te)).toLowerCase()}function O(){const te=this.resume(),de=this.stack[this.stack.length-1];de.title=te}function ee(){const te=this.resume(),de=this.stack[this.stack.length-1];de.url=te}function ie(te){const de=this.stack[this.stack.length-1];if(!de.depth){const Ce=this.sliceSerialize(te).length;de.depth=Ce}}function Y(){this.data.setextHeadingSlurpLineEnding=!0}function D(te){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function re(){this.data.setextHeadingSlurpLineEnding=void 0}function fe(te){const Ce=this.stack[this.stack.length-1].children;let je=Ce[Ce.length-1];(!je||je.type!=="text")&&(je=pt(),je.position={start:aa(te.start),end:void 0},Ce.push(je)),this.stack.push(je)}function q(te){const de=this.stack.pop();de.value+=this.sliceSerialize(te),de.position.end=aa(te.end)}function V(te){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=de.children[de.children.length-1];Ce.position.end=aa(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(de.type)&&(fe.call(this,te),q.call(this,te))}function Z(){this.data.atHardBreak=!0}function Q(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te}function ue(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te}function $(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te}function U(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=de,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function J(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=de,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function se(te){const de=this.sliceSerialize(te),Ce=this.stack[this.stack.length-2];Ce.label=mT(de),Ce.identifier=Qn(de).toLowerCase()}function xe(){const te=this.stack[this.stack.length-1],de=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const je=te.children;Ce.children=je}else Ce.alt=de}function z(){const te=this.resume(),de=this.stack[this.stack.length-1];de.url=te}function M(){const te=this.resume(),de=this.stack[this.stack.length-1];de.title=te}function I(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function ae(te){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=Qn(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function me(te){this.data.characterReferenceType=te.type}function be(te){const de=this.sliceSerialize(te),Ce=this.data.characterReferenceType;let je;Ce?(je=xb(de,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):je=Nd(de);const Pe=this.stack[this.stack.length-1];Pe.value+=je}function Ne(te){const de=this.stack.pop();de.position.end=aa(te.end)}function pe(te){q.call(this,te);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(te)}function Re(te){q.call(this,te);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(te)}function Dt(){return{type:"blockquote",children:[]}}function Ln(){return{type:"code",lang:null,meta:null,value:""}}function yt(){return{type:"inlineCode",value:""}}function Un(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xn(){return{type:"emphasis",children:[]}}function Rl(){return{type:"heading",depth:0,children:[]}}function $t(){return{type:"break"}}function Fa(){return{type:"html",value:""}}function Ga(){return{type:"image",title:null,url:"",alt:null}}function ll(){return{type:"link",title:null,url:"",children:[]}}function Dl(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[]}}function ha(te){return{type:"listItem",spread:te._spread,checked:null,children:[]}}function Li(){return{type:"paragraph",children:[]}}function Ui(){return{type:"strong",children:[]}}function pt(){return{type:"text",value:""}}function al(){return{type:"thematicBreak"}}}function aa(t){return{line:t.line,column:t.column,offset:t.offset}}function Db(t,l){let i=-1;for(;++i<l.length;){const r=l[i];Array.isArray(r)?Db(t,r):vT(t,r)}}function vT(t,l){let i;for(i in l)if(Rb.call(l,i))switch(i){case"canContainEols":{const r=l[i];r&&t[i].push(...r);break}case"transforms":{const r=l[i];r&&t[i].push(...r);break}case"enter":case"exit":{const r=l[i];r&&Object.assign(t[i],r);break}}}function Ly(t,l){throw t?new Error("Cannot close `"+t.type+"` ("+Br({start:t.start,end:t.end})+"): a different token (`"+l.type+"`, "+Br({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+Br({start:l.start,end:l.end})+") is still open")}function bT(t){const l=this;l.parser=i;function i(r){return gT(r,{...l.data("settings"),...t,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function xT(t,l){const i={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(l),!0)};return t.patch(l,i),t.applyData(l,i)}function ST(t,l){const i={type:"element",tagName:"br",properties:{},children:[]};return t.patch(l,i),[t.applyData(l,i),{type:"text",value:`
192
- `}]}function ET(t,l){const i=l.value?l.value+`
193
- `:"",r={},o=l.lang?l.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:i}]};return l.meta&&(s.data={meta:l.meta}),t.patch(l,s),s=t.applyData(l,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(l,s),s}function wT(t,l){const i={type:"element",tagName:"del",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function kT(t,l){const i={type:"element",tagName:"em",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function CT(t,l){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(l.identifier).toUpperCase(),o=Oi(r.toLowerCase()),s=t.footnoteOrder.indexOf(r);let c,d=t.footnoteCounts.get(r);d===void 0?(d=0,t.footnoteOrder.push(r),c=t.footnoteOrder.length):c=s+1,d+=1,t.footnoteCounts.set(r,d);const p={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};t.patch(l,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return t.patch(l,m),t.applyData(l,m)}function TT(t,l){const i={type:"element",tagName:"h"+l.depth,properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function AT(t,l){if(t.options.allowDangerousHtml){const i={type:"raw",value:l.value};return t.patch(l,i),t.applyData(l,i)}}function jb(t,l){const i=l.referenceType;let r="]";if(i==="collapsed"?r+="[]":i==="full"&&(r+="["+(l.label||l.identifier)+"]"),l.type==="imageReference")return[{type:"text",value:"!["+l.alt+r}];const o=t.all(l),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=r:o.push({type:"text",value:r}),o}function _T(t,l){const i=String(l.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return jb(t,l);const o={src:Oi(r.url||""),alt:l.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const s={type:"element",tagName:"img",properties:o,children:[]};return t.patch(l,s),t.applyData(l,s)}function zT(t,l){const i={src:Oi(l.url)};l.alt!==null&&l.alt!==void 0&&(i.alt=l.alt),l.title!==null&&l.title!==void 0&&(i.title=l.title);const r={type:"element",tagName:"img",properties:i,children:[]};return t.patch(l,r),t.applyData(l,r)}function RT(t,l){const i={type:"text",value:l.value.replace(/\r?\n|\r/g," ")};t.patch(l,i);const r={type:"element",tagName:"code",properties:{},children:[i]};return t.patch(l,r),t.applyData(l,r)}function DT(t,l){const i=String(l.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return jb(t,l);const o={href:Oi(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const s={type:"element",tagName:"a",properties:o,children:t.all(l)};return t.patch(l,s),t.applyData(l,s)}function jT(t,l){const i={href:Oi(l.url)};l.title!==null&&l.title!==void 0&&(i.title=l.title);const r={type:"element",tagName:"a",properties:i,children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function NT(t,l,i){const r=t.all(l),o=i?MT(i):Nb(l),s={},c=[];if(typeof l.checked=="boolean"){const y=r[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},r.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:l.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let d=-1;for(;++d<r.length;){const y=r[d];(o||d!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
194
- `}),y.type==="element"&&y.tagName==="p"&&!o?c.push(...y.children):c.push(y)}const p=r[r.length-1];p&&(o||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
195
- `});const m={type:"element",tagName:"li",properties:s,children:c};return t.patch(l,m),t.applyData(l,m)}function MT(t){let l=!1;if(t.type==="list"){l=t.spread||!1;const i=t.children;let r=-1;for(;!l&&++r<i.length;)l=Nb(i[r])}return l}function Nb(t){const l=t.spread;return l??t.children.length>1}function OT(t,l){const i={},r=t.all(l);let o=-1;for(typeof l.start=="number"&&l.start!==1&&(i.start=l.start);++o<r.length;){const c=r[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const s={type:"element",tagName:l.ordered?"ol":"ul",properties:i,children:t.wrap(r,!0)};return t.patch(l,s),t.applyData(l,s)}function LT(t,l){const i={type:"element",tagName:"p",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function UT(t,l){const i={type:"root",children:t.wrap(t.all(l))};return t.patch(l,i),t.applyData(l,i)}function BT(t,l){const i={type:"element",tagName:"strong",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function HT(t,l){const i=t.all(l),r=i.shift(),o=[];if(r){const c={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(l.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:t.wrap(i,!0)},d=_d(l.children[1]),p=db(l.children[l.children.length-1]);d&&p&&(c.position={start:d,end:p}),o.push(c)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(o,!0)};return t.patch(l,s),t.applyData(l,s)}function qT(t,l,i){const r=i?i.children:void 0,s=(r?r.indexOf(l):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,d=c?c.length:l.children.length;let p=-1;const m=[];for(;++p<d;){const g=l.children[p],b={},x=c?c[p]:void 0;x&&(b.align=x);let k={type:"element",tagName:s,properties:b,children:[]};g&&(k.children=t.all(g),t.patch(g,k),k=t.applyData(g,k)),m.push(k)}const y={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(l,y),t.applyData(l,y)}function YT(t,l){const i={type:"element",tagName:"td",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}const Uy=9,By=32;function VT(t){const l=String(t),i=/\r?\n|\r/g;let r=i.exec(l),o=0;const s=[];for(;r;)s.push(Hy(l.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=i.exec(l);return s.push(Hy(l.slice(o),o>0,!1)),s.join("")}function Hy(t,l,i){let r=0,o=t.length;if(l){let s=t.codePointAt(r);for(;s===Uy||s===By;)r++,s=t.codePointAt(r)}if(i){let s=t.codePointAt(o-1);for(;s===Uy||s===By;)o--,s=t.codePointAt(o-1)}return o>r?t.slice(r,o):""}function FT(t,l){const i={type:"text",value:VT(String(l.value))};return t.patch(l,i),t.applyData(l,i)}function GT(t,l){const i={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(l,i),t.applyData(l,i)}const QT={blockquote:xT,break:ST,code:ET,delete:wT,emphasis:kT,footnoteReference:CT,heading:TT,html:AT,imageReference:_T,image:zT,inlineCode:RT,linkReference:DT,link:jT,listItem:NT,list:OT,paragraph:LT,root:UT,strong:BT,table:HT,tableCell:YT,tableRow:qT,text:FT,thematicBreak:GT,toml:So,yaml:So,definition:So,footnoteDefinition:So};function So(){}const Mb=-1,Io=0,qr=1,Oo=2,Od=3,Ld=4,Ud=5,Bd=6,Ob=7,Lb=8,qy=typeof self=="object"?self:globalThis,XT=(t,l)=>{const i=(o,s)=>(t.set(s,o),o),r=o=>{if(t.has(o))return t.get(o);const[s,c]=l[o];switch(s){case Io:case Mb:return i(c,o);case qr:{const d=i([],o);for(const p of c)d.push(r(p));return d}case Oo:{const d=i({},o);for(const[p,m]of c)d[r(p)]=r(m);return d}case Od:return i(new Date(c),o);case Ld:{const{source:d,flags:p}=c;return i(new RegExp(d,p),o)}case Ud:{const d=i(new Map,o);for(const[p,m]of c)d.set(r(p),r(m));return d}case Bd:{const d=i(new Set,o);for(const p of c)d.add(r(p));return d}case Ob:{const{name:d,message:p}=c;return i(new qy[d](p),o)}case Lb:return i(BigInt(c),o);case"BigInt":return i(Object(BigInt(c)),o);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return i(new DataView(d),c)}}return i(new qy[s](c),o)};return r},Yy=t=>XT(new Map,t)(0),Ci="",{toString:IT}={},{keys:ZT}=Object,Mr=t=>{const l=typeof t;if(l!=="object"||!t)return[Io,l];const i=IT.call(t).slice(8,-1);switch(i){case"Array":return[qr,Ci];case"Object":return[Oo,Ci];case"Date":return[Od,Ci];case"RegExp":return[Ld,Ci];case"Map":return[Ud,Ci];case"Set":return[Bd,Ci];case"DataView":return[qr,i]}return i.includes("Array")?[qr,i]:i.includes("Error")?[Ob,i]:[Oo,i]},Eo=([t,l])=>t===Io&&(l==="function"||l==="symbol"),KT=(t,l,i,r)=>{const o=(c,d)=>{const p=r.push(c)-1;return i.set(d,p),p},s=c=>{if(i.has(c))return i.get(c);let[d,p]=Mr(c);switch(d){case Io:{let y=c;switch(p){case"bigint":d=Lb,y=c.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+p);y=null;break;case"undefined":return o([Mb],c)}return o([d,y],c)}case qr:{if(p){let b=c;return p==="DataView"?b=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(b=new Uint8Array(c)),o([p,[...b]],c)}const y=[],g=o([d,y],c);for(const b of c)y.push(s(b));return g}case Oo:{if(p)switch(p){case"BigInt":return o([p,c.toString()],c);case"Boolean":case"Number":case"String":return o([p,c.valueOf()],c)}if(l&&"toJSON"in c)return s(c.toJSON());const y=[],g=o([d,y],c);for(const b of ZT(c))(t||!Eo(Mr(c[b])))&&y.push([s(b),s(c[b])]);return g}case Od:return o([d,c.toISOString()],c);case Ld:{const{source:y,flags:g}=c;return o([d,{source:y,flags:g}],c)}case Ud:{const y=[],g=o([d,y],c);for(const[b,x]of c)(t||!(Eo(Mr(b))||Eo(Mr(x))))&&y.push([s(b),s(x)]);return g}case Bd:{const y=[],g=o([d,y],c);for(const b of c)(t||!Eo(Mr(b)))&&y.push(s(b));return g}}const{message:m}=c;return o([d,{name:p,message:m}],c)};return s},Vy=(t,{json:l,lossy:i}={})=>{const r=[];return KT(!(l||i),!!l,new Map,r)(t),r},Lo=typeof structuredClone=="function"?(t,l)=>l&&("json"in l||"lossy"in l)?Yy(Vy(t,l)):structuredClone(t):(t,l)=>Yy(Vy(t,l));function $T(t,l){const i=[{type:"text",value:"↩"}];return l>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(l)}]}),i}function PT(t,l){return"Back to reference "+(t+1)+(l>1?"-"+l:"")}function JT(t){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=t.options.footnoteBackContent||$T,r=t.options.footnoteBackLabel||PT,o=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",c=t.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let p=-1;for(;++p<t.footnoteOrder.length;){const m=t.footnoteById.get(t.footnoteOrder[p]);if(!m)continue;const y=t.all(m),g=String(m.identifier).toUpperCase(),b=Oi(g.toLowerCase());let x=0;const k=[],T=t.footnoteCounts.get(g);for(;T!==void 0&&++x<=T;){k.length>0&&k.push({type:"text",value:" "});let R=typeof i=="string"?i:i(p,x);typeof R=="string"&&(R={type:"text",value:R}),k.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+b+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(p,x),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const _=y[y.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const R=_.children[_.children.length-1];R&&R.type==="text"?R.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...k)}else y.push(...k);const A={type:"element",tagName:"li",properties:{id:l+"fn-"+b},children:t.wrap(y,!0)};t.patch(m,A),d.push(A)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Lo(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
196
- `},{type:"element",tagName:"ol",properties:{},children:t.wrap(d,!0)},{type:"text",value:`
197
- `}]}}const Zo=(function(t){if(t==null)return nA;if(typeof t=="function")return Ko(t);if(typeof t=="object")return Array.isArray(t)?WT(t):eA(t);if(typeof t=="string")return tA(t);throw new Error("Expected function, string, or object as test")});function WT(t){const l=[];let i=-1;for(;++i<t.length;)l[i]=Zo(t[i]);return Ko(r);function r(...o){let s=-1;for(;++s<l.length;)if(l[s].apply(this,o))return!0;return!1}}function eA(t){const l=t;return Ko(i);function i(r){const o=r;let s;for(s in t)if(o[s]!==l[s])return!1;return!0}}function tA(t){return Ko(l);function l(i){return i&&i.type===t}}function Ko(t){return l;function l(i,r,o){return!!(lA(i)&&t.call(this,i,typeof r=="number"?r:void 0,o||void 0))}}function nA(){return!0}function lA(t){return t!==null&&typeof t=="object"&&"type"in t}const Ub=[],aA=!0,$f=!1,iA="skip";function Bb(t,l,i,r){let o;typeof l=="function"&&typeof i!="function"?(r=i,i=l):o=l;const s=Zo(o),c=r?-1:1;d(t,void 0,[])();function d(p,m,y){const g=p&&typeof p=="object"?p:{};if(typeof g.type=="string"){const x=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(p.type+(x?"<"+x+">":""))+")"})}return b;function b(){let x=Ub,k,T,_;if((!l||s(p,m,y[y.length-1]||void 0))&&(x=rA(i(p,y)),x[0]===$f))return x;if("children"in p&&p.children){const A=p;if(A.children&&x[0]!==iA)for(T=(r?A.children.length:-1)+c,_=y.concat(A);T>-1&&T<A.children.length;){const R=A.children[T];if(k=d(R,T,_)(),k[0]===$f)return k;T=typeof k[1]=="number"?k[1]:T+c}}return x}}}function rA(t){return Array.isArray(t)?t:typeof t=="number"?[aA,t]:t==null?Ub:[t]}function Hd(t,l,i,r){let o,s,c;typeof l=="function"&&typeof i!="function"?(s=void 0,c=l,o=i):(s=l,c=i,o=r),Bb(t,s,d,o);function d(p,m){const y=m[m.length-1],g=y?y.children.indexOf(p):void 0;return c(p,g,y)}}const Pf={}.hasOwnProperty,uA={};function oA(t,l){const i=l||uA,r=new Map,o=new Map,s=new Map,c={...QT,...i.handlers},d={all:m,applyData:cA,definitionById:r,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:p,options:i,patch:sA,wrap:dA};return Hd(t,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?r:o,b=String(y.identifier).toUpperCase();g.has(b)||g.set(b,y)}}),d;function p(y,g){const b=y.type,x=d.handlers[b];if(Pf.call(d.handlers,b)&&x)return x(d,y,g);if(d.options.passThrough&&d.options.passThrough.includes(b)){if("children"in y){const{children:T,..._}=y,A=Lo(_);return A.children=d.all(y),A}return Lo(y)}return(d.options.unknownHandler||fA)(d,y,g)}function m(y){const g=[];if("children"in y){const b=y.children;let x=-1;for(;++x<b.length;){const k=d.one(b[x],y);if(k){if(x&&b[x-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=Fy(k.value)),!Array.isArray(k)&&k.type==="element")){const T=k.children[0];T&&T.type==="text"&&(T.value=Fy(T.value))}Array.isArray(k)?g.push(...k):g.push(k)}}}return g}}function sA(t,l){t.position&&(l.position=Pk(t))}function cA(t,l){let i=l;if(t&&t.data){const r=t.data.hName,o=t.data.hChildren,s=t.data.hProperties;if(typeof r=="string")if(i.type==="element")i.tagName=r;else{const c="children"in i?i.children:[i];i={type:"element",tagName:r,properties:{},children:c}}i.type==="element"&&s&&Object.assign(i.properties,Lo(s)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function fA(t,l){const i=l.data||{},r="value"in l&&!(Pf.call(i,"hProperties")||Pf.call(i,"hChildren"))?{type:"text",value:l.value}:{type:"element",tagName:"div",properties:{},children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function dA(t,l){const i=[];let r=-1;for(l&&i.push({type:"text",value:`
198
- `});++r<t.length;)r&&i.push({type:"text",value:`
199
- `}),i.push(t[r]);return l&&t.length>0&&i.push({type:"text",value:`
200
- `}),i}function Fy(t){let l=0,i=t.charCodeAt(l);for(;i===9||i===32;)l++,i=t.charCodeAt(l);return t.slice(l)}function Gy(t,l){const i=oA(t,l),r=i.one(t,void 0),o=JT(i),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
201
- `},o),s}function hA(t,l){return t&&"run"in t?async function(i,r){const o=Gy(i,{file:r,...l});await t.run(o,r)}:function(i,r){return Gy(i,{file:r,...t||l})}}function Qy(t){if(t)throw t}var Sf,Xy;function mA(){if(Xy)return Sf;Xy=1;var t=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(m){return typeof Array.isArray=="function"?Array.isArray(m):l.call(m)==="[object Array]"},s=function(m){if(!m||l.call(m)!=="[object Object]")return!1;var y=t.call(m,"constructor"),g=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!y&&!g)return!1;var b;for(b in m);return typeof b>"u"||t.call(m,b)},c=function(m,y){i&&y.name==="__proto__"?i(m,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):m[y.name]=y.newValue},d=function(m,y){if(y==="__proto__")if(t.call(m,y)){if(r)return r(m,y).value}else return;return m[y]};return Sf=function p(){var m,y,g,b,x,k,T=arguments[0],_=1,A=arguments.length,R=!1;for(typeof T=="boolean"&&(R=T,T=arguments[1]||{},_=2),(T==null||typeof T!="object"&&typeof T!="function")&&(T={});_<A;++_)if(m=arguments[_],m!=null)for(y in m)g=d(T,y),b=d(m,y),T!==b&&(R&&b&&(s(b)||(x=o(b)))?(x?(x=!1,k=g&&o(g)?g:[]):k=g&&s(g)?g:{},c(T,{name:y,newValue:p(R,k,b)})):typeof b<"u"&&c(T,{name:y,newValue:b}));return T},Sf}var pA=mA();const Ef=id(pA);function Jf(t){if(typeof t!="object"||t===null)return!1;const l=Object.getPrototypeOf(t);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function gA(){const t=[],l={run:i,use:r};return l;function i(...o){let s=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...o);function d(p,...m){const y=t[++s];let g=-1;if(p){c(p);return}for(;++g<o.length;)(m[g]===null||m[g]===void 0)&&(m[g]=o[g]);o=m,y?yA(y,d)(...m):c(null,...m)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),l}}function yA(t,l){let i;return r;function r(...c){const d=t.length>c.length;let p;d&&c.push(o);try{p=t.apply(this,c)}catch(m){const y=m;if(d&&i)throw y;return o(y)}d||(p&&p.then&&typeof p.then=="function"?p.then(s,o):p instanceof Error?o(p):s(p))}function o(c,...d){i||(i=!0,l(c,...d))}function s(c){o(null,c)}}const Pn={basename:vA,dirname:bA,extname:xA,join:SA,sep:"/"};function vA(t,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');tu(t);let i=0,r=-1,o=t.length,s;if(l===void 0||l.length===0||l.length>t.length){for(;o--;)if(t.codePointAt(o)===47){if(s){i=o+1;break}}else r<0&&(s=!0,r=o+1);return r<0?"":t.slice(i,r)}if(l===t)return"";let c=-1,d=l.length-1;for(;o--;)if(t.codePointAt(o)===47){if(s){i=o+1;break}}else c<0&&(s=!0,c=o+1),d>-1&&(t.codePointAt(o)===l.codePointAt(d--)?d<0&&(r=o):(d=-1,r=c));return i===r?r=c:r<0&&(r=t.length),t.slice(i,r)}function bA(t){if(tu(t),t.length===0)return".";let l=-1,i=t.length,r;for(;--i;)if(t.codePointAt(i)===47){if(r){l=i;break}}else r||(r=!0);return l<0?t.codePointAt(0)===47?"/":".":l===1&&t.codePointAt(0)===47?"//":t.slice(0,l)}function xA(t){tu(t);let l=t.length,i=-1,r=0,o=-1,s=0,c;for(;l--;){const d=t.codePointAt(l);if(d===47){if(c){r=l+1;break}continue}i<0&&(c=!0,i=l+1),d===46?o<0?o=l:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||i<0||s===0||s===1&&o===i-1&&o===r+1?"":t.slice(o,i)}function SA(...t){let l=-1,i;for(;++l<t.length;)tu(t[l]),t[l]&&(i=i===void 0?t[l]:i+"/"+t[l]);return i===void 0?".":EA(i)}function EA(t){tu(t);const l=t.codePointAt(0)===47;let i=wA(t,!l);return i.length===0&&!l&&(i="."),i.length>0&&t.codePointAt(t.length-1)===47&&(i+="/"),l?"/"+i:i}function wA(t,l){let i="",r=0,o=-1,s=0,c=-1,d,p;for(;++c<=t.length;){if(c<t.length)d=t.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(o===c-1||s===1))if(o!==c-1&&s===2){if(i.length<2||r!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(p=i.lastIndexOf("/"),p!==i.length-1){p<0?(i="",r=0):(i=i.slice(0,p),r=i.length-1-i.lastIndexOf("/")),o=c,s=0;continue}}else if(i.length>0){i="",r=0,o=c,s=0;continue}}l&&(i=i.length>0?i+"/..":"..",r=2)}else i.length>0?i+="/"+t.slice(o+1,c):i=t.slice(o+1,c),r=c-o-1;o=c,s=0}else d===46&&s>-1?s++:s=-1}return i}function tu(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const kA={cwd:CA};function CA(){return"/"}function Wf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function TA(t){if(typeof t=="string")t=new URL(t);else if(!Wf(t)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(t.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return AA(t)}function AA(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const l=t.pathname;let i=-1;for(;++i<l.length;)if(l.codePointAt(i)===37&&l.codePointAt(i+1)===50){const r=l.codePointAt(i+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(l)}const wf=["history","path","basename","stem","extname","dirname"];class Hb{constructor(l){let i;l?Wf(l)?i={path:l}:typeof l=="string"||_A(l)?i={value:l}:i=l:i={},this.cwd="cwd"in i?"":kA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<wf.length;){const s=wf[r];s in i&&i[s]!==void 0&&i[s]!==null&&(this[s]=s==="history"?[...i[s]]:i[s])}let o;for(o in i)wf.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?Pn.basename(this.path):void 0}set basename(l){Cf(l,"basename"),kf(l,"basename"),this.path=Pn.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?Pn.dirname(this.path):void 0}set dirname(l){Iy(this.basename,"dirname"),this.path=Pn.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?Pn.extname(this.path):void 0}set extname(l){if(kf(l,"extname"),Iy(this.dirname,"extname"),l){if(l.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(l.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Pn.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){Wf(l)&&(l=TA(l)),Cf(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?Pn.basename(this.path,this.extname):void 0}set stem(l){Cf(l,"stem"),kf(l,"stem"),this.path=Pn.join(this.dirname||"",l+(this.extname||""))}fail(l,i,r){const o=this.message(l,i,r);throw o.fatal=!0,o}info(l,i,r){const o=this.message(l,i,r);return o.fatal=void 0,o}message(l,i,r){const o=new Xt(l,i,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function kf(t,l){if(t&&t.includes(Pn.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+Pn.sep+"`")}function Cf(t,l){if(!t)throw new Error("`"+l+"` cannot be empty")}function Iy(t,l){if(!t)throw new Error("Setting `"+l+"` requires `path` to be set too")}function _A(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const zA=(function(t){const r=this.constructor.prototype,o=r[t],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),RA={}.hasOwnProperty;class qd extends zA{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=gA()}copy(){const l=new qd;let i=-1;for(;++i<this.attachers.length;){const r=this.attachers[i];l.use(...r)}return l.data(Ef(!0,{},this.namespace)),l}data(l,i){return typeof l=="string"?arguments.length===2?(_f("data",this.frozen),this.namespace[l]=i,this):RA.call(this.namespace,l)&&this.namespace[l]||void 0:l?(_f("data",this.frozen),this.namespace=l,this):this.namespace}freeze(){if(this.frozen)return this;const l=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=i.call(l,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const i=wo(l),r=this.parser||this.Parser;return Tf("parse",r),r(String(i),i)}process(l,i){const r=this;return this.freeze(),Tf("process",this.parser||this.Parser),Af("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(s,c){const d=wo(l),p=r.parse(d);r.run(p,d,function(y,g,b){if(y||!g||!b)return m(y);const x=g,k=r.stringify(x,b);NA(k)?b.value=k:b.result=k,m(y,b)});function m(y,g){y||!g?c(y):s?s(g):i(void 0,g)}}}processSync(l){let i=!1,r;return this.freeze(),Tf("processSync",this.parser||this.Parser),Af("processSync",this.compiler||this.Compiler),this.process(l,o),Ky("processSync","process",i),r;function o(s,c){i=!0,Qy(s),r=c}}run(l,i,r){Zy(l),this.freeze();const o=this.transformers;return!r&&typeof i=="function"&&(r=i,i=void 0),r?s(void 0,r):new Promise(s);function s(c,d){const p=wo(i);o.run(l,p,m);function m(y,g,b){const x=g||l;y?d(y):c?c(x):r(void 0,x,b)}}}runSync(l,i){let r=!1,o;return this.run(l,i,s),Ky("runSync","run",r),o;function s(c,d){Qy(c),o=d,r=!0}}stringify(l,i){this.freeze();const r=wo(i),o=this.compiler||this.Compiler;return Af("stringify",o),Zy(l),o(l,r)}use(l,...i){const r=this.attachers,o=this.namespace;if(_f("use",this.frozen),l!=null)if(typeof l=="function")p(l,i);else if(typeof l=="object")Array.isArray(l)?d(l):c(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function s(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[y,...g]=m;p(y,g)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))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");d(m.plugins),m.settings&&(o.settings=Ef(!0,o.settings,m.settings))}function d(m){let y=-1;if(m!=null)if(Array.isArray(m))for(;++y<m.length;){const g=m[y];s(g)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,y){let g=-1,b=-1;for(;++g<r.length;)if(r[g][0]===m){b=g;break}if(b===-1)r.push([m,...y]);else if(y.length>0){let[x,...k]=y;const T=r[b][1];Jf(T)&&Jf(x)&&(x=Ef(!0,T,x)),r[b]=[m,x,...k]}}}}const DA=new qd().freeze();function Tf(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Af(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function _f(t,l){if(l)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Zy(t){if(!Jf(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Ky(t,l,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+l+"` instead")}function wo(t){return jA(t)?t:new Hb(t)}function jA(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function NA(t){return typeof t=="string"||MA(t)}function MA(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const OA="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",$y=[],Py={allowDangerousHtml:!0},LA=/^(https?|ircs?|mailto|xmpp)$/i,UA=[{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 BA(t){const l=HA(t),i=qA(t);return YA(l.runSync(l.parse(i),i),t)}function HA(t){const l=t.rehypePlugins||$y,i=t.remarkPlugins||$y,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Py}:Py;return DA().use(bT).use(i).use(hA,r).use(l)}function qA(t){const l=t.children||"",i=new Hb;return typeof l=="string"&&(i.value=l),i}function YA(t,l){const i=l.allowedElements,r=l.allowElement,o=l.components,s=l.disallowedElements,c=l.skipHtml,d=l.unwrapDisallowed,p=l.urlTransform||VA;for(const y of UA)Object.hasOwn(l,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+OA+y.id,void 0);return Hd(t,m),nC(t,{Fragment:S.Fragment,components:o,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function m(y,g,b){if(y.type==="raw"&&b&&typeof g=="number")return c?b.children.splice(g,1):b.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let x;for(x in vf)if(Object.hasOwn(vf,x)&&Object.hasOwn(y.properties,x)){const k=y.properties[x],T=vf[x];(T===null||T.includes(y.tagName))&&(y.properties[x]=p(String(k||""),x,y))}}if(y.type==="element"){let x=i?!i.includes(y.tagName):s?s.includes(y.tagName):!1;if(!x&&r&&typeof g=="number"&&(x=!r(y,g,b)),x&&b&&typeof g=="number")return d&&y.children?b.children.splice(g,1,...y.children):b.children.splice(g,1),g}}}function VA(t){const l=t.indexOf(":"),i=t.indexOf("?"),r=t.indexOf("#"),o=t.indexOf("/");return l===-1||o!==-1&&l>o||i!==-1&&l>i||r!==-1&&l>r||LA.test(t.slice(0,l))?t:""}function Jy(t,l){const i=String(t);if(typeof l!="string")throw new TypeError("Expected character");let r=0,o=i.indexOf(l);for(;o!==-1;)r++,o=i.indexOf(l,o+l.length);return r}function FA(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function GA(t,l,i){const o=Zo((i||{}).ignore||[]),s=QA(l);let c=-1;for(;++c<s.length;)Bb(t,"text",d);function d(m,y){let g=-1,b;for(;++g<y.length;){const x=y[g],k=b?b.children:void 0;if(o(x,k?k.indexOf(x):void 0,b))return;b=x}if(b)return p(m,y)}function p(m,y){const g=y[y.length-1],b=s[c][0],x=s[c][1];let k=0;const _=g.children.indexOf(m);let A=!1,R=[];b.lastIndex=0;let O=b.exec(m.value);for(;O;){const ee=O.index,ie={index:O.index,input:O.input,stack:[...y,m]};let Y=x(...O,ie);if(typeof Y=="string"&&(Y=Y.length>0?{type:"text",value:Y}:void 0),Y===!1?b.lastIndex=ee+1:(k!==ee&&R.push({type:"text",value:m.value.slice(k,ee)}),Array.isArray(Y)?R.push(...Y):Y&&R.push(Y),k=ee+O[0].length,A=!0),!b.global)break;O=b.exec(m.value)}return A?(k<m.value.length&&R.push({type:"text",value:m.value.slice(k)}),g.children.splice(_,1,...R)):R=[m],_+R.length}}function QA(t){const l=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<i.length;){const o=i[r];l.push([XA(o[0]),IA(o[1])])}return l}function XA(t){return typeof t=="string"?new RegExp(FA(t),"g"):t}function IA(t){return typeof t=="function"?t:function(){return t}}const zf="phrasing",Rf=["autolink","link","image","label"];function ZA(){return{transforms:[t_],enter:{literalAutolink:$A,literalAutolinkEmail:Df,literalAutolinkHttp:Df,literalAutolinkWww:Df},exit:{literalAutolink:e_,literalAutolinkEmail:WA,literalAutolinkHttp:PA,literalAutolinkWww:JA}}}function KA(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:zf,notInConstruct:Rf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:zf,notInConstruct:Rf},{character:":",before:"[ps]",after:"\\/",inConstruct:zf,notInConstruct:Rf}]}}function $A(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Df(t){this.config.enter.autolinkProtocol.call(this,t)}function PA(t){this.config.exit.autolinkProtocol.call(this,t)}function JA(t){this.config.exit.data.call(this,t);const l=this.stack[this.stack.length-1];l.type,l.url="http://"+this.sliceSerialize(t)}function WA(t){this.config.exit.autolinkEmail.call(this,t)}function e_(t){this.exit(t)}function t_(t){GA(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,n_],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),l_]],{ignore:["link","linkReference"]})}function n_(t,l,i,r,o){let s="";if(!qb(o)||(/^w/i.test(l)&&(i=l+i,l="",s="http://"),!a_(i)))return!1;const c=i_(i+r);if(!c[0])return!1;const d={type:"link",title:null,url:s+l+c[0],children:[{type:"text",value:l+c[0]}]};return c[1]?[d,{type:"text",value:c[1]}]:d}function l_(t,l,i,r){return!qb(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+i,children:[{type:"text",value:l+"@"+i}]}}function a_(t){const l=t.split(".");return!(l.length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[a-zA-Z\d]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[a-zA-Z\d]/.test(l[l.length-2])))}function i_(t){const l=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!l)return[t,void 0];t=t.slice(0,l.index);let i=l[0],r=i.indexOf(")");const o=Jy(t,"(");let s=Jy(t,")");for(;r!==-1&&o>s;)t+=i.slice(0,r+1),i=i.slice(r+1),r=i.indexOf(")"),s++;return[t,i]}function qb(t,l){const i=t.input.charCodeAt(t.index-1);return(t.index===0||Ha(i)||Qo(i))&&(!l||i!==47)}Yb.peek=m_;function r_(){this.buffer()}function u_(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function o_(){this.buffer()}function s_(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function c_(t){const l=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Qn(this.sliceSerialize(t)).toLowerCase(),i.label=l}function f_(t){this.exit(t)}function d_(t){const l=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Qn(this.sliceSerialize(t)).toLowerCase(),i.label=l}function h_(t){this.exit(t)}function m_(){return"["}function Yb(t,l,i,r){const o=i.createTracker(r);let s=o.move("[^");const c=i.enter("footnoteReference"),d=i.enter("reference");return s+=o.move(i.safe(i.associationId(t),{after:"]",before:s})),d(),c(),s+=o.move("]"),s}function p_(){return{enter:{gfmFootnoteCallString:r_,gfmFootnoteCall:u_,gfmFootnoteDefinitionLabelString:o_,gfmFootnoteDefinition:s_},exit:{gfmFootnoteCallString:c_,gfmFootnoteCall:f_,gfmFootnoteDefinitionLabelString:d_,gfmFootnoteDefinition:h_}}}function g_(t){let l=!1;return t&&t.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:i,footnoteReference:Yb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(r,o,s,c){const d=s.createTracker(c);let p=d.move("[^");const m=s.enter("footnoteDefinition"),y=s.enter("label");return p+=d.move(s.safe(s.associationId(r),{before:p,after:"]"})),y(),p+=d.move("]:"),r.children&&r.children.length>0&&(d.shift(4),p+=d.move((l?`
202
- `:" ")+s.indentLines(s.containerFlow(r,d.current()),l?Vb:y_))),m(),p}}function y_(t,l,i){return l===0?t:Vb(t,l,i)}function Vb(t,l,i){return(i?"":" ")+t}const v_=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Fb.peek=w_;function b_(){return{canContainEols:["delete"],enter:{strikethrough:S_},exit:{strikethrough:E_}}}function x_(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:v_}],handlers:{delete:Fb}}}function S_(t){this.enter({type:"delete",children:[]},t)}function E_(t){this.exit(t)}function Fb(t,l,i,r){const o=i.createTracker(r),s=i.enter("strikethrough");let c=o.move("~~");return c+=i.containerPhrasing(t,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),s(),c}function w_(){return"~"}function k_(t){return t.length}function C_(t,l){const i=l||{},r=(i.align||[]).concat(),o=i.stringLength||k_,s=[],c=[],d=[],p=[];let m=0,y=-1;for(;++y<t.length;){const T=[],_=[];let A=-1;for(t[y].length>m&&(m=t[y].length);++A<t[y].length;){const R=T_(t[y][A]);if(i.alignDelimiters!==!1){const O=o(R);_[A]=O,(p[A]===void 0||O>p[A])&&(p[A]=O)}T.push(R)}c[y]=T,d[y]=_}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<m;)s[g]=Wy(r[g]);else{const T=Wy(r);for(;++g<m;)s[g]=T}g=-1;const b=[],x=[];for(;++g<m;){const T=s[g];let _="",A="";T===99?(_=":",A=":"):T===108?_=":":T===114&&(A=":");let R=i.alignDelimiters===!1?1:Math.max(1,p[g]-_.length-A.length);const O=_+"-".repeat(R)+A;i.alignDelimiters!==!1&&(R=_.length+R+A.length,R>p[g]&&(p[g]=R),x[g]=R),b[g]=O}c.splice(1,0,b),d.splice(1,0,x),y=-1;const k=[];for(;++y<c.length;){const T=c[y],_=d[y];g=-1;const A=[];for(;++g<m;){const R=T[g]||"";let O="",ee="";if(i.alignDelimiters!==!1){const ie=p[g]-(_[g]||0),Y=s[g];Y===114?O=" ".repeat(ie):Y===99?ie%2?(O=" ".repeat(ie/2+.5),ee=" ".repeat(ie/2-.5)):(O=" ".repeat(ie/2),ee=O):ee=" ".repeat(ie)}i.delimiterStart!==!1&&!g&&A.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&R==="")&&(i.delimiterStart!==!1||g)&&A.push(" "),i.alignDelimiters!==!1&&A.push(O),A.push(R),i.alignDelimiters!==!1&&A.push(ee),i.padding!==!1&&A.push(" "),(i.delimiterEnd!==!1||g!==m-1)&&A.push("|")}k.push(i.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return k.join(`
203
- `)}function T_(t){return t==null?"":String(t)}function Wy(t){const l=typeof t=="string"?t.codePointAt(0):0;return l===67||l===99?99:l===76||l===108?108:l===82||l===114?114:0}function A_(t,l,i,r){const o=i.enter("blockquote"),s=i.createTracker(r);s.move("> "),s.shift(2);const c=i.indentLines(i.containerFlow(t,s.current()),__);return o(),c}function __(t,l,i){return">"+(i?"":" ")+t}function z_(t,l){return ev(t,l.inConstruct,!0)&&!ev(t,l.notInConstruct,!1)}function ev(t,l,i){if(typeof l=="string"&&(l=[l]),!l||l.length===0)return i;let r=-1;for(;++r<l.length;)if(t.includes(l[r]))return!0;return!1}function tv(t,l,i,r){let o=-1;for(;++o<i.unsafe.length;)if(i.unsafe[o].character===`
204
- `&&z_(i.stack,i.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
205
- `}function R_(t,l){const i=String(t);let r=i.indexOf(l),o=r,s=0,c=0;if(typeof l!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++s>c&&(c=s):s=1,o=r+l.length,r=i.indexOf(l,o);return c}function D_(t,l){return!!(l.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function j_(t){const l=t.options.fence||"`";if(l!=="`"&&l!=="~")throw new Error("Cannot serialize code with `"+l+"` for `options.fence`, expected `` ` `` or `~`");return l}function N_(t,l,i,r){const o=j_(i),s=t.value||"",c=o==="`"?"GraveAccent":"Tilde";if(D_(t,i)){const g=i.enter("codeIndented"),b=i.indentLines(s,M_);return g(),b}const d=i.createTracker(r),p=o.repeat(Math.max(R_(s,o)+1,3)),m=i.enter("codeFenced");let y=d.move(p);if(t.lang){const g=i.enter(`codeFencedLang${c}`);y+=d.move(i.safe(t.lang,{before:y,after:" ",encode:["`"],...d.current()})),g()}if(t.lang&&t.meta){const g=i.enter(`codeFencedMeta${c}`);y+=d.move(" "),y+=d.move(i.safe(t.meta,{before:y,after:`
206
- `,encode:["`"],...d.current()})),g()}return y+=d.move(`
207
- `),s&&(y+=d.move(s+`
208
- `)),y+=d.move(p),m(),y}function M_(t,l,i){return(i?"":" ")+t}function Yd(t){const l=t.options.quote||'"';if(l!=='"'&&l!=="'")throw new Error("Cannot serialize title with `"+l+"` for `options.quote`, expected `\"`, or `'`");return l}function O_(t,l,i,r){const o=Yd(i),s=o==='"'?"Quote":"Apostrophe",c=i.enter("definition");let d=i.enter("label");const p=i.createTracker(r);let m=p.move("[");return m+=p.move(i.safe(i.associationId(t),{before:m,after:"]",...p.current()})),m+=p.move("]: "),d(),!t.url||/[\0- \u007F]/.test(t.url)?(d=i.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(i.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(d=i.enter("destinationRaw"),m+=p.move(i.safe(t.url,{before:m,after:t.title?" ":`
209
- `,...p.current()}))),d(),t.title&&(d=i.enter(`title${s}`),m+=p.move(" "+o),m+=p.move(i.safe(t.title,{before:m,after:o,...p.current()})),m+=p.move(o),d()),c(),m}function L_(t){const l=t.options.emphasis||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize emphasis with `"+l+"` for `options.emphasis`, expected `*`, or `_`");return l}function Qr(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Uo(t,l,i){const r=ji(t),o=ji(l);return r===void 0?o===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Gb.peek=U_;function Gb(t,l,i,r){const o=L_(i),s=i.enter("emphasis"),c=i.createTracker(r),d=c.move(o);let p=c.move(i.containerPhrasing(t,{after:o,before:d,...c.current()}));const m=p.charCodeAt(0),y=Uo(r.before.charCodeAt(r.before.length-1),m,o);y.inside&&(p=Qr(m)+p.slice(1));const g=p.charCodeAt(p.length-1),b=Uo(r.after.charCodeAt(0),g,o);b.inside&&(p=p.slice(0,-1)+Qr(g));const x=c.move(o);return s(),i.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},d+p+x}function U_(t,l,i){return i.options.emphasis||"*"}function B_(t,l){let i=!1;return Hd(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return i=!0,$f}),!!((!t.depth||t.depth<3)&&jd(t)&&(l.options.setext||i))}function H_(t,l,i,r){const o=Math.max(Math.min(6,t.depth||1),1),s=i.createTracker(r);if(B_(t,i)){const y=i.enter("headingSetext"),g=i.enter("phrasing"),b=i.containerPhrasing(t,{...s.current(),before:`
210
- `,after:`
211
- `});return g(),y(),b+`
212
- `+(o===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
213
- `))+1))}const c="#".repeat(o),d=i.enter("headingAtx"),p=i.enter("phrasing");s.move(c+" ");let m=i.containerPhrasing(t,{before:"# ",after:`
214
- `,...s.current()});return/^[\t ]/.test(m)&&(m=Qr(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,i.options.closeAtx&&(m+=" "+c),p(),d(),m}Qb.peek=q_;function Qb(t){return t.value||""}function q_(){return"<"}Xb.peek=Y_;function Xb(t,l,i,r){const o=Yd(i),s=o==='"'?"Quote":"Apostrophe",c=i.enter("image");let d=i.enter("label");const p=i.createTracker(r);let m=p.move("![");return m+=p.move(i.safe(t.alt,{before:m,after:"]",...p.current()})),m+=p.move("]("),d(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(d=i.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(i.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(d=i.enter("destinationRaw"),m+=p.move(i.safe(t.url,{before:m,after:t.title?" ":")",...p.current()}))),d(),t.title&&(d=i.enter(`title${s}`),m+=p.move(" "+o),m+=p.move(i.safe(t.title,{before:m,after:o,...p.current()})),m+=p.move(o),d()),m+=p.move(")"),c(),m}function Y_(){return"!"}Ib.peek=V_;function Ib(t,l,i,r){const o=t.referenceType,s=i.enter("imageReference");let c=i.enter("label");const d=i.createTracker(r);let p=d.move("![");const m=i.safe(t.alt,{before:p,after:"]",...d.current()});p+=d.move(m+"]["),c();const y=i.stack;i.stack=[],c=i.enter("reference");const g=i.safe(i.associationId(t),{before:p,after:"]",...d.current()});return c(),i.stack=y,s(),o==="full"||!m||m!==g?p+=d.move(g+"]"):o==="shortcut"?p=p.slice(0,-1):p+=d.move("]"),p}function V_(){return"!"}Zb.peek=F_;function Zb(t,l,i){let r=t.value||"",o="`",s=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<i.unsafe.length;){const c=i.unsafe[s],d=i.compilePattern(c);let p;if(c.atBreak)for(;p=d.exec(r);){let m=p.index;r.charCodeAt(m)===10&&r.charCodeAt(m-1)===13&&m--,r=r.slice(0,m)+" "+r.slice(p.index+1)}}return o+r+o}function F_(){return"`"}function Kb(t,l){const i=jd(t);return!!(!l.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(i===t.url||"mailto:"+i===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}$b.peek=G_;function $b(t,l,i,r){const o=Yd(i),s=o==='"'?"Quote":"Apostrophe",c=i.createTracker(r);let d,p;if(Kb(t,i)){const y=i.stack;i.stack=[],d=i.enter("autolink");let g=c.move("<");return g+=c.move(i.containerPhrasing(t,{before:g,after:">",...c.current()})),g+=c.move(">"),d(),i.stack=y,g}d=i.enter("link"),p=i.enter("label");let m=c.move("[");return m+=c.move(i.containerPhrasing(t,{before:m,after:"](",...c.current()})),m+=c.move("]("),p(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(p=i.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(i.safe(t.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(p=i.enter("destinationRaw"),m+=c.move(i.safe(t.url,{before:m,after:t.title?" ":")",...c.current()}))),p(),t.title&&(p=i.enter(`title${s}`),m+=c.move(" "+o),m+=c.move(i.safe(t.title,{before:m,after:o,...c.current()})),m+=c.move(o),p()),m+=c.move(")"),d(),m}function G_(t,l,i){return Kb(t,i)?"<":"["}Pb.peek=Q_;function Pb(t,l,i,r){const o=t.referenceType,s=i.enter("linkReference");let c=i.enter("label");const d=i.createTracker(r);let p=d.move("[");const m=i.containerPhrasing(t,{before:p,after:"]",...d.current()});p+=d.move(m+"]["),c();const y=i.stack;i.stack=[],c=i.enter("reference");const g=i.safe(i.associationId(t),{before:p,after:"]",...d.current()});return c(),i.stack=y,s(),o==="full"||!m||m!==g?p+=d.move(g+"]"):o==="shortcut"?p=p.slice(0,-1):p+=d.move("]"),p}function Q_(){return"["}function Vd(t){const l=t.options.bullet||"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bullet`, expected `*`, `+`, or `-`");return l}function X_(t){const l=Vd(t),i=t.options.bulletOther;if(!i)return l==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===l)throw new Error("Expected `bullet` (`"+l+"`) and `bulletOther` (`"+i+"`) to be different");return i}function I_(t){const l=t.options.bulletOrdered||".";if(l!=="."&&l!==")")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOrdered`, expected `.` or `)`");return l}function Jb(t){const l=t.options.rule||"*";if(l!=="*"&&l!=="-"&&l!=="_")throw new Error("Cannot serialize rules with `"+l+"` for `options.rule`, expected `*`, `-`, or `_`");return l}function Z_(t,l,i,r){const o=i.enter("list"),s=i.bulletCurrent;let c=t.ordered?I_(i):Vd(i);const d=t.ordered?c==="."?")":".":X_(i);let p=l&&i.bulletLastUsed?c===i.bulletLastUsed:!1;if(!t.ordered){const y=t.children?t.children[0]:void 0;if((c==="*"||c==="-")&&y&&(!y.children||!y.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(p=!0),Jb(i)===c&&y){let g=-1;for(;++g<t.children.length;){const b=t.children[g];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(c=d),i.bulletCurrent=c;const m=i.containerFlow(t,r);return i.bulletLastUsed=c,i.bulletCurrent=s,o(),m}function K_(t){const l=t.options.listItemIndent||"one";if(l!=="tab"&&l!=="one"&&l!=="mixed")throw new Error("Cannot serialize items with `"+l+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return l}function $_(t,l,i,r){const o=K_(i);let s=i.bulletCurrent||Vd(i);l&&l.type==="list"&&l.ordered&&(s=(typeof l.start=="number"&&l.start>-1?l.start:1)+(i.options.incrementListMarker===!1?0:l.children.indexOf(t))+s);let c=s.length+1;(o==="tab"||o==="mixed"&&(l&&l.type==="list"&&l.spread||t.spread))&&(c=Math.ceil(c/4)*4);const d=i.createTracker(r);d.move(s+" ".repeat(c-s.length)),d.shift(c);const p=i.enter("listItem"),m=i.indentLines(i.containerFlow(t,d.current()),y);return p(),m;function y(g,b,x){return b?(x?"":" ".repeat(c))+g:(x?s:s+" ".repeat(c-s.length))+g}}function P_(t,l,i,r){const o=i.enter("paragraph"),s=i.enter("phrasing"),c=i.containerPhrasing(t,r);return s(),o(),c}const J_=Zo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function W_(t,l,i,r){return(t.children.some(function(c){return J_(c)})?i.containerPhrasing:i.containerFlow).call(i,t,r)}function ez(t){const l=t.options.strong||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize strong with `"+l+"` for `options.strong`, expected `*`, or `_`");return l}Wb.peek=tz;function Wb(t,l,i,r){const o=ez(i),s=i.enter("strong"),c=i.createTracker(r),d=c.move(o+o);let p=c.move(i.containerPhrasing(t,{after:o,before:d,...c.current()}));const m=p.charCodeAt(0),y=Uo(r.before.charCodeAt(r.before.length-1),m,o);y.inside&&(p=Qr(m)+p.slice(1));const g=p.charCodeAt(p.length-1),b=Uo(r.after.charCodeAt(0),g,o);b.inside&&(p=p.slice(0,-1)+Qr(g));const x=c.move(o+o);return s(),i.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},d+p+x}function tz(t,l,i){return i.options.strong||"*"}function nz(t,l,i,r){return i.safe(t.value,r)}function lz(t){const l=t.options.ruleRepetition||3;if(l<3)throw new Error("Cannot serialize rules with repetition `"+l+"` for `options.ruleRepetition`, expected `3` or more");return l}function az(t,l,i){const r=(Jb(i)+(i.options.ruleSpaces?" ":"")).repeat(lz(i));return i.options.ruleSpaces?r.slice(0,-1):r}const e0={blockquote:A_,break:tv,code:N_,definition:O_,emphasis:Gb,hardBreak:tv,heading:H_,html:Qb,image:Xb,imageReference:Ib,inlineCode:Zb,link:$b,linkReference:Pb,list:Z_,listItem:$_,paragraph:P_,root:W_,strong:Wb,text:nz,thematicBreak:az};function iz(){return{enter:{table:rz,tableData:nv,tableHeader:nv,tableRow:oz},exit:{codeText:sz,table:uz,tableData:jf,tableHeader:jf,tableRow:jf}}}function rz(t){const l=t._align;this.enter({type:"table",align:l.map(function(i){return i==="none"?null:i}),children:[]},t),this.data.inTable=!0}function uz(t){this.exit(t),this.data.inTable=void 0}function oz(t){this.enter({type:"tableRow",children:[]},t)}function jf(t){this.exit(t)}function nv(t){this.enter({type:"tableCell",children:[]},t)}function sz(t){let l=this.resume();this.data.inTable&&(l=l.replace(/\\([\\|])/g,cz));const i=this.stack[this.stack.length-1];i.type,i.value=l,this.exit(t)}function cz(t,l){return l==="|"?l:t}function fz(t){const l=t||{},i=l.tableCellPadding,r=l.tablePipeAlign,o=l.stringLength,s=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
215
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:c,tableCell:p,tableRow:d}};function c(x,k,T,_){return m(y(x,T,_),x.align)}function d(x,k,T,_){const A=g(x,T,_),R=m([A]);return R.slice(0,R.indexOf(`
216
- `))}function p(x,k,T,_){const A=T.enter("tableCell"),R=T.enter("phrasing"),O=T.containerPhrasing(x,{..._,before:s,after:s});return R(),A(),O}function m(x,k){return C_(x,{align:k,alignDelimiters:r,padding:i,stringLength:o})}function y(x,k,T){const _=x.children;let A=-1;const R=[],O=k.enter("table");for(;++A<_.length;)R[A]=g(_[A],k,T);return O(),R}function g(x,k,T){const _=x.children;let A=-1;const R=[],O=k.enter("tableRow");for(;++A<_.length;)R[A]=p(_[A],x,k,T);return O(),R}function b(x,k,T){let _=e0.inlineCode(x,k,T);return T.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function dz(){return{exit:{taskListCheckValueChecked:lv,taskListCheckValueUnchecked:lv,paragraph:mz}}}function hz(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:pz}}}function lv(t){const l=this.stack[this.stack.length-2];l.type,l.checked=t.type==="taskListCheckValueChecked"}function mz(t){const l=this.stack[this.stack.length-2];if(l&&l.type==="listItem"&&typeof l.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const r=i.children[0];if(r&&r.type==="text"){const o=l.children;let s=-1,c;for(;++s<o.length;){const d=o[s];if(d.type==="paragraph"){c=d;break}}c===i&&(r.value=r.value.slice(1),r.value.length===0?i.children.shift():i.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,i.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function pz(t,l,i,r){const o=t.children[0],s=typeof t.checked=="boolean"&&o&&o.type==="paragraph",c="["+(t.checked?"x":" ")+"] ",d=i.createTracker(r);s&&d.move(c);let p=e0.listItem(t,l,i,{...r,...d.current()});return s&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(y){return y+c}}function gz(){return[ZA(),p_(),b_(),iz(),dz()]}function yz(t){return{extensions:[KA(),g_(t),x_(),fz(t),hz()]}}const vz={tokenize:kz,partial:!0},t0={tokenize:Cz,partial:!0},n0={tokenize:Tz,partial:!0},l0={tokenize:Az,partial:!0},bz={tokenize:_z,partial:!0},a0={name:"wwwAutolink",tokenize:Ez,previous:r0},i0={name:"protocolAutolink",tokenize:wz,previous:u0},zl={name:"emailAutolink",tokenize:Sz,previous:o0},nl={};function xz(){return{text:nl}}let Ua=48;for(;Ua<123;)nl[Ua]=zl,Ua++,Ua===58?Ua=65:Ua===91&&(Ua=97);nl[43]=zl;nl[45]=zl;nl[46]=zl;nl[95]=zl;nl[72]=[zl,i0];nl[104]=[zl,i0];nl[87]=[zl,a0];nl[119]=[zl,a0];function Sz(t,l,i){const r=this;let o,s;return c;function c(g){return!ed(g)||!o0.call(r,r.previous)||Fd(r.events)?i(g):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),d(g))}function d(g){return ed(g)?(t.consume(g),d):g===64?(t.consume(g),p):i(g)}function p(g){return g===46?t.check(bz,y,m)(g):g===45||g===95||Qt(g)?(s=!0,t.consume(g),p):y(g)}function m(g){return t.consume(g),o=!0,p}function y(g){return s&&o&&Kt(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),l(g)):i(g)}}function Ez(t,l,i){const r=this;return o;function o(c){return c!==87&&c!==119||!r0.call(r,r.previous)||Fd(r.events)?i(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(vz,t.attempt(t0,t.attempt(n0,s),i),i)(c))}function s(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),l(c)}}function wz(t,l,i){const r=this;let o="",s=!1;return c;function c(g){return(g===72||g===104)&&u0.call(r,r.previous)&&!Fd(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),t.consume(g),d):i(g)}function d(g){if(Kt(g)&&o.length<5)return o+=String.fromCodePoint(g),t.consume(g),d;if(g===58){const b=o.toLowerCase();if(b==="http"||b==="https")return t.consume(g),p}return i(g)}function p(g){return g===47?(t.consume(g),s?m:(s=!0,p)):i(g)}function m(g){return g===null||Mo(g)||st(g)||Ha(g)||Qo(g)?i(g):t.attempt(t0,t.attempt(n0,y),i)(g)}function y(g){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),l(g)}}function kz(t,l,i){let r=0;return o;function o(c){return(c===87||c===119)&&r<3?(r++,t.consume(c),o):c===46&&r===3?(t.consume(c),s):i(c)}function s(c){return c===null?i(c):l(c)}}function Cz(t,l,i){let r,o,s;return c;function c(m){return m===46||m===95?t.check(l0,p,d)(m):m===null||st(m)||Ha(m)||m!==45&&Qo(m)?p(m):(s=!0,t.consume(m),c)}function d(m){return m===95?r=!0:(o=r,r=void 0),t.consume(m),c}function p(m){return o||r||!s?i(m):l(m)}}function Tz(t,l){let i=0,r=0;return o;function o(c){return c===40?(i++,t.consume(c),o):c===41&&r<i?s(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?t.check(l0,l,s)(c):c===null||st(c)||Ha(c)?l(c):(t.consume(c),o)}function s(c){return c===41&&r++,t.consume(c),o}}function Az(t,l,i){return r;function r(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(t.consume(d),r):d===38?(t.consume(d),s):d===93?(t.consume(d),o):d===60||d===null||st(d)||Ha(d)?l(d):i(d)}function o(d){return d===null||d===40||d===91||st(d)||Ha(d)?l(d):r(d)}function s(d){return Kt(d)?c(d):i(d)}function c(d){return d===59?(t.consume(d),r):Kt(d)?(t.consume(d),c):i(d)}}function _z(t,l,i){return r;function r(s){return t.consume(s),o}function o(s){return Qt(s)?i(s):l(s)}}function r0(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||st(t)}function u0(t){return!Kt(t)}function o0(t){return!(t===47||ed(t))}function ed(t){return t===43||t===45||t===46||t===95||Qt(t)}function Fd(t){let l=t.length,i=!1;for(;l--;){const r=t[l][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){i=!0;break}if(r._gfmAutolinkLiteralWalkedInto){i=!1;break}}return t.length>0&&!i&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const zz={tokenize:Uz,partial:!0};function Rz(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Mz,continuation:{tokenize:Oz},exit:Lz}},text:{91:{name:"gfmFootnoteCall",tokenize:Nz},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Dz,resolveTo:jz}}}}function Dz(t,l,i){const r=this;let o=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c;for(;o--;){const p=r.events[o][1];if(p.type==="labelImage"){c=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return d;function d(p){if(!c||!c._balanced)return i(p);const m=Qn(r.sliceSerialize({start:c.end,end:r.now()}));return m.codePointAt(0)!==94||!s.includes(m.slice(1))?i(p):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),l(p))}}function jz(t,l){let i=t.length;for(;i--;)if(t[i][1].type==="labelImage"&&t[i][0]==="enter"){t[i][1];break}t[i+1][1].type="data",t[i+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[i+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[i+3][1].end),end:Object.assign({},t[i+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},d=[t[i+1],t[i+2],["enter",r,l],t[i+3],t[i+4],["enter",o,l],["exit",o,l],["enter",s,l],["enter",c,l],["exit",c,l],["exit",s,l],t[t.length-2],t[t.length-1],["exit",r,l]];return t.splice(i,t.length-i+1,...d),t}function Nz(t,l,i){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,c;return d;function d(g){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),p}function p(g){return g!==94?i(g):(t.enter("gfmFootnoteCallMarker"),t.consume(g),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(g){if(s>999||g===93&&!c||g===null||g===91||st(g))return i(g);if(g===93){t.exit("chunkString");const b=t.exit("gfmFootnoteCallString");return o.includes(Qn(r.sliceSerialize(b)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),l):i(g)}return st(g)||(c=!0),s++,t.consume(g),g===92?y:m}function y(g){return g===91||g===92||g===93?(t.consume(g),s++,m):m(g)}}function Mz(t,l,i){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,c=0,d;return p;function p(k){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(k){return k===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",y):i(k)}function y(k){if(c>999||k===93&&!d||k===null||k===91||st(k))return i(k);if(k===93){t.exit("chunkString");const T=t.exit("gfmFootnoteDefinitionLabelString");return s=Qn(r.sliceSerialize(T)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),b}return st(k)||(d=!0),c++,t.consume(k),k===92?g:y}function g(k){return k===91||k===92||k===93?(t.consume(k),c++,y):y(k)}function b(k){return k===58?(t.enter("definitionMarker"),t.consume(k),t.exit("definitionMarker"),o.includes(s)||o.push(s),$e(t,x,"gfmFootnoteDefinitionWhitespace")):i(k)}function x(k){return l(k)}}function Oz(t,l,i){return t.check(eu,l,t.attempt(zz,l,i))}function Lz(t){t.exit("gfmFootnoteDefinition")}function Uz(t,l,i){const r=this;return $e(t,o,"gfmFootnoteDefinitionIndent",5);function o(s){const c=r.events[r.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?l(s):i(s)}}function Bz(t){let i=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:o};return i==null&&(i=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(c,d){let p=-1;for(;++p<c.length;)if(c[p][0]==="enter"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._close){let m=p;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[p][1].end.offset-c[p][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[p][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[p][1].end)},g={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[p][1].start)},b=[["enter",y,d],["enter",c[m][1],d],["exit",c[m][1],d],["enter",g,d]],x=d.parser.constructs.insideSpan.null;x&&bn(b,b.length,0,Xo(x,c.slice(m+1,p),d)),bn(b,b.length,0,[["exit",g,d],["enter",c[p][1],d],["exit",c[p][1],d],["exit",y,d]]),bn(c,m-1,p-m+3,b),p=m+b.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function s(c,d,p){const m=this.previous,y=this.events;let g=0;return b;function b(k){return m===126&&y[y.length-1][1].type!=="characterEscape"?p(k):(c.enter("strikethroughSequenceTemporary"),x(k))}function x(k){const T=ji(m);if(k===126)return g>1?p(k):(c.consume(k),g++,x);if(g<2&&!i)return p(k);const _=c.exit("strikethroughSequenceTemporary"),A=ji(k);return _._open=!A||A===2&&!!T,_._close=!T||T===2&&!!A,d(k)}}}class Hz{constructor(){this.map=[]}add(l,i,r){qz(this,l,i,r)}consume(l){if(this.map.sort(function(s,c){return s[0]-c[0]}),this.map.length===0)return;let i=this.map.length;const r=[];for(;i>0;)i-=1,r.push(l.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),l.length=this.map[i][0];r.push(l.slice()),l.length=0;let o=r.pop();for(;o;){for(const s of o)l.push(s);o=r.pop()}this.map.length=0}}function qz(t,l,i,r){let o=0;if(!(i===0&&r.length===0)){for(;o<t.map.length;){if(t.map[o][0]===l){t.map[o][1]+=i,t.map[o][2].push(...r);return}o+=1}t.map.push([l,i,r])}}function Yz(t,l){let i=!1;const r=[];for(;l<t.length;){const o=t[l];if(i){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(t[l+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(t[l-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(i=!0);l+=1}return r}function Vz(){return{flow:{null:{name:"table",tokenize:Fz,resolveAll:Gz}}}}function Fz(t,l,i){const r=this;let o=0,s=0,c;return d;function d(q){let V=r.events.length-1;for(;V>-1;){const ue=r.events[V][1].type;if(ue==="lineEnding"||ue==="linePrefix")V--;else break}const Z=V>-1?r.events[V][1].type:null,Q=Z==="tableHead"||Z==="tableRow"?Y:p;return Q===Y&&r.parser.lazy[r.now().line]?i(q):Q(q)}function p(q){return t.enter("tableHead"),t.enter("tableRow"),m(q)}function m(q){return q===124||(c=!0,s+=1),y(q)}function y(q){return q===null?i(q):ze(q)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(q),t.exit("lineEnding"),x):i(q):Ye(q)?$e(t,y,"whitespace")(q):(s+=1,c&&(c=!1,o+=1),q===124?(t.enter("tableCellDivider"),t.consume(q),t.exit("tableCellDivider"),c=!0,y):(t.enter("data"),g(q)))}function g(q){return q===null||q===124||st(q)?(t.exit("data"),y(q)):(t.consume(q),q===92?b:g)}function b(q){return q===92||q===124?(t.consume(q),g):g(q)}function x(q){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(q):(t.enter("tableDelimiterRow"),c=!1,Ye(q)?$e(t,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):k(q))}function k(q){return q===45||q===58?_(q):q===124?(c=!0,t.enter("tableCellDivider"),t.consume(q),t.exit("tableCellDivider"),T):ie(q)}function T(q){return Ye(q)?$e(t,_,"whitespace")(q):_(q)}function _(q){return q===58?(s+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(q),t.exit("tableDelimiterMarker"),A):q===45?(s+=1,A(q)):q===null||ze(q)?ee(q):ie(q)}function A(q){return q===45?(t.enter("tableDelimiterFiller"),R(q)):ie(q)}function R(q){return q===45?(t.consume(q),R):q===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(q),t.exit("tableDelimiterMarker"),O):(t.exit("tableDelimiterFiller"),O(q))}function O(q){return Ye(q)?$e(t,ee,"whitespace")(q):ee(q)}function ee(q){return q===124?k(q):q===null||ze(q)?!c||o!==s?ie(q):(t.exit("tableDelimiterRow"),t.exit("tableHead"),l(q)):ie(q)}function ie(q){return i(q)}function Y(q){return t.enter("tableRow"),D(q)}function D(q){return q===124?(t.enter("tableCellDivider"),t.consume(q),t.exit("tableCellDivider"),D):q===null||ze(q)?(t.exit("tableRow"),l(q)):Ye(q)?$e(t,D,"whitespace")(q):(t.enter("data"),re(q))}function re(q){return q===null||q===124||st(q)?(t.exit("data"),D(q)):(t.consume(q),q===92?fe:re)}function fe(q){return q===92||q===124?(t.consume(q),re):re(q)}}function Gz(t,l){let i=-1,r=!0,o=0,s=[0,0,0,0],c=[0,0,0,0],d=!1,p=0,m,y,g;const b=new Hz;for(;++i<t.length;){const x=t[i],k=x[1];x[0]==="enter"?k.type==="tableHead"?(d=!1,p!==0&&(av(b,l,p,m,y),y=void 0,p=0),m={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(i,0,[["enter",m,l]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,g=void 0,s=[0,0,0,0],c=[0,i+1,0,0],d&&(d=!1,y={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(i,0,[["enter",y,l]])),o=k.type==="tableDelimiterRow"?2:y?3:1):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,c[2]===0&&(s[1]!==0&&(c[0]=c[1],g=ko(b,l,s,o,void 0,g),s=[0,0,0,0]),c[2]=i)):k.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(c[0]=c[1],g=ko(b,l,s,o,void 0,g)),s=c,c=[s[1],i,0,0])):k.type==="tableHead"?(d=!0,p=i):k.type==="tableRow"||k.type==="tableDelimiterRow"?(p=i,s[1]!==0?(c[0]=c[1],g=ko(b,l,s,o,i,g)):c[1]!==0&&(g=ko(b,l,c,o,i,g)),o=0):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(c[3]=i)}for(p!==0&&av(b,l,p,m,y),b.consume(l.events),i=-1;++i<l.events.length;){const x=l.events[i];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=Yz(l.events,i))}return t}function ko(t,l,i,r,o,s){const c=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",d="tableContent";i[0]!==0&&(s.end=Object.assign({},Ai(l.events,i[0])),t.add(i[0],0,[["exit",s,l]]));const p=Ai(l.events,i[1]);if(s={type:c,start:Object.assign({},p),end:Object.assign({},p)},t.add(i[1],0,[["enter",s,l]]),i[2]!==0){const m=Ai(l.events,i[2]),y=Ai(l.events,i[3]),g={type:d,start:Object.assign({},m),end:Object.assign({},y)};if(t.add(i[2],0,[["enter",g,l]]),r!==2){const b=l.events[i[2]],x=l.events[i[3]];if(b[1].end=Object.assign({},x[1].end),b[1].type="chunkText",b[1].contentType="text",i[3]>i[2]+1){const k=i[2]+1,T=i[3]-i[2]-1;t.add(k,T,[])}}t.add(i[3]+1,0,[["exit",g,l]])}return o!==void 0&&(s.end=Object.assign({},Ai(l.events,o)),t.add(o,0,[["exit",s,l]]),s=void 0),s}function av(t,l,i,r,o){const s=[],c=Ai(l.events,i);o&&(o.end=Object.assign({},c),s.push(["exit",o,l])),r.end=Object.assign({},c),s.push(["exit",r,l]),t.add(i+1,0,s)}function Ai(t,l){const i=t[l],r=i[0]==="enter"?"start":"end";return i[1][r]}const Qz={name:"tasklistCheck",tokenize:Iz};function Xz(){return{text:{91:Qz}}}function Iz(t,l,i){const r=this;return o;function o(p){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?i(p):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),s)}function s(p){return st(p)?(t.enter("taskListCheckValueUnchecked"),t.consume(p),t.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(t.enter("taskListCheckValueChecked"),t.consume(p),t.exit("taskListCheckValueChecked"),c):i(p)}function c(p){return p===93?(t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),d):i(p)}function d(p){return ze(p)?l(p):Ye(p)?t.check({tokenize:Zz},l,i)(p):i(p)}}function Zz(t,l,i){return $e(t,r,"whitespace");function r(o){return o===null?i(o):l(o)}}function Kz(t){return bb([xz(),Rz(),Bz(t),Vz(),Xz()])}const $z={};function Pz(t){const l=this,i=t||$z,r=l.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),c=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(Kz(i)),s.push(gz()),c.push(yz(i))}const td=new Set(["<",">","{","}","[","]"]),Jz=new Set(["for","do","while","if","else","return","function","var","let","const","true","false","undefined","this","new","delete","typeof","in","instanceof","void","break","continue","switch","case","default","throw","try","catch","finally","debugger","with","yield","async","await","class","extends","super","import","export","from","static"]),s0=new Set(["+","-","*","/","%","=","!","&","|","^","~","!","?",":",".",",",";","'",'"',".","(",")","[","]","#","@","\\",...td]),Wz={keywords:Jz,onCommentStart:h0,onCommentEnd:oR},Gd=["identifier","keyword","string","class","property","entity","jsxliterals","sign","comment","break","space"],[Nf,eR,ia,tR,Mf,nR,lR,Tl,iv,nd,rv]=Gd.map((t,l)=>l);function Co(t){return/^[^\S\r\n]+$/g.test(t)}function aR(t){return s0.has(t)}function iR(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Bo(t){return/^[\w_]+$/.test(t)||c0(t)}function rR(t){const l=t[0];return Bo(l)&&l===l.toUpperCase()||t==="null"}function c0(t){return/[^\u0000-\u007f]/.test(t)}function f0(t){return/^[a-zA-Z]$/.test(t)}function d0(t){return f0(t)||c0(t)}function To(t){return d0(t[0])&&(t.length===1||Bo(t.slice(1)))}function ld(t){return t==="`"}function ad(t){return t==='"'||t==="'"}function uR(t){return ad(t)||ld(t)}function h0(t,l){const i=t+l;return i==="/*"?2:i==="//"?1:0}function oR(t,l){return t+l==="*/"?2:l===`
217
- `?1:0}function sR(t){return t[0]==="/"&&!h0(t[0],t[1])}function cR(t,l){const{keywords:i,onCommentStart:r,onCommentEnd:o}={...Wz,...l};let s="",c=-1,d=[-1,""],p=[-2,""];const m=[];let y=!1,g=0,b=!1,x=0;const k=()=>y&&!b&&!g,T=()=>g&&!k(),_=()=>!g&&k()&&!b&&x>0;let A=null,R=!1,O=0,ee=0;const ie=()=>A!==null,Y=()=>R,D=()=>ee>O,re=()=>ee>0&&ee===O,fe=()=>ie()||D();function q(Z){const Q=Z===`
218
- `;if(T()){if(ie())return ia;const[,$]=d;if(To(Z)&&($==="<"||$==="</"))return nR}if(_())return lR;if(ie()||D())return ia;if(i.has(Z))return d[1]==="."?Nf:eR;if(Q)return nd;if(Co(Z))return rv;if(Z.split("").every(aR))return Tl;if(rR(Z))return T()?Nf:tR;if(To(Z)){const $=d[1]==="."&&To(p[1]);if(!fe()&&!$)return Nf;if($)return Mf}return ia}const V=(Z,Q)=>{if(Q&&(s=Q),s){c=Z||q(s);const ue=[c,s];c!==rv&&c!==nd&&(p=d,d=ue),m.push(ue)}s=""};for(let Z=0;Z<t.length;Z++){const Q=t[Z],ue=t[Z-1],$=t[Z+1],U=ue+Q,J=Q+$;if(ad(Q)&&!_()&&!D()){V(),ue!=="\\"&&(A&&Q===A?A=null:A||(A=Q)),V(ia,Q);continue}if(!D()&&ue!=="\\n"&&ld(Q)){V(),V(ia,Q),ee++;continue}if(D()){if(ue!=="\\n"&&ld(Q)&&ee>0){V(),ee--,V(ia,Q);continue}if(J==="${"){O++,V(ia),V(Tl,J),Z++;continue}}if(re()&&Q==="}"){V(),O--,V(Tl,Q);continue}if(k()&&Q==="{"){V(),V(Tl,Q),b=!0;continue}if(y){if(!g&&Q==="<"){V(),$==="/"?(g=2,s=J,Z++):(g=1,s=Q),V(Tl);continue}if(g){if(Q===">"&&!"/=".includes(ue)){V(),g===1?(g=0,x++):(g=0,y=!1),V(Tl,Q);continue}if(J==="/>"||J==="</"){s!=="<"&&s!=="/"&&V(),J==="/>"?g=0:x--,x||(y=!1),s=J,Z++,V(Tl);continue}if(Q==="<"){V(),s=Q,V(Tl);continue}if($==="-"&&!fe()&&!_()&&s){V(Mf,s+Q+$),Z++;continue}if($==="="&&!fe()&&!Co(Q)){Co(s)&&V();const I=s+Q;if(To(I)){V(Mf,I);continue}}}}!g&&(Q==="<"&&d0($)||J==="</")&&(g=$==="/"?2:1,Q==="<"&&($==="/"||f0($))&&!fe()&&!_()&&!Y()&&(y=!0));const se=uR(Q),xe=D(),z=!y&&sR(J),M=_();if(se||xe||ad(A))s+=Q;else if(z){V();const[I,w]=d;if(z&&I!==-1&&!(I===Tl&&w!==")"||I===iv)){s=Q,V();continue}R=!0;const ae=Z++,me=()=>Z>=t.length,be=()=>me()||t[Z]===`
219
- `;let Ne=!1;for(;!be();Z++)if(t[Z]==="/"&&t[Z-1]!=="\\"){for(Ne=!0;ae!==Z&&/^[a-z]$/.test(t[Z+1])&&!be();)Z++;break}R=!1,ae!==Z&&Ne?(s=t.slice(ae,Z+1),V(ia)):(s=Q,V(),Z=ae)}else if(r(Q,$)){V();const I=Z,w=r(Q,$);if(w)for(;Z<t.length&&o(t[Z-1],t[Z])!=w;Z++);s=t.slice(I,Z+1),V(iv)}else Q===" "||Q===`
220
- `?Q===" "&&(Co(s)||!s||M)?(s+=Q,$==="<"&&V()):(V(),s=Q,V()):b&&Q==="}"?(V(),s=Q,V(),b=!1):M&&!td.has(Q)||D()||(Bo(Q)===Bo(s[s.length-1])||k())&&!s0.has(Q)?s+=Q:(U==="</"&&(s=U),V(),U!=="</"&&(s=Q),J==="</"||J==="/>"?(s=J,V(),Z++):td.has(Q)&&V())}return V(),m}function fR(t){const l=[],i=c=>({type:"element",tagName:"span",children:c,properties:{className:"sh__line"}});function r(c){const d=c.map(([p,m])=>{const y=Gd[p];return{type:"element",tagName:"span",children:[{type:"text",value:m}],properties:{className:`sh__token--${y}`,style:{color:`var(--sh-${y})`}}}});l.push(i(d))}const o=[];let s=!1;for(let c=0;c<t.length;c++){const d=t[c],[p,m]=d,y=c===t.length-1;if(p!==nd){if(m.includes(`
221
- `)){const g=m.split(`
222
- `);for(let b=0;b<g.length;b++)o.push([p,g[b]]),b<g.length-1&&(r(o),o.length=0)}else o.push(d);s=!1}else s?r([]):(r(o),o.length=0),y&&r([]),s=!0}return o.length&&r(o),l}const dR=t=>{let l=`class="${t.className}"`;if(t.style){const i=Object.entries(t.style).map(([r,o])=>`${r}:${o}`).join(";");l+=` style="${i}"`}return l};function hR(t){return t.map(l=>{const{tagName:i}=l,r=l.children.map(o=>{const{tagName:s,children:c,properties:d}=o;return`<${s} ${dR(d)}>${iR(c[0].value)}</${s}>`}).join("");return`<${i} class="${l.properties.className}">${r}</${i}>`}).join(`
223
- `)}function m0(t,l){const i=cR(t,l),r=fR(i);return hR(r)}new Map(Gd.map((t,l)=>[t,l]));function mR({className:t,children:l}){const i=String(l).replace(/\n$/,"");if(!t)return S.jsx("code",{children:l});const o=m0(i);return S.jsx("code",{dangerouslySetInnerHTML:{__html:o}})}function Ho({children:t,inline:l}){return S.jsx("div",{className:l?"markdown-inline":"markdown",children:S.jsx(BA,{remarkPlugins:[Pz],components:{code:mR},children:t})})}const pR={plan:"[plan]",approve:"[approve]",task:"[task]",build:"[build]",fix:"[fix]",done:"[done]",error:"[error]",verbose:"[verbose]"};function qa({value:t}){return t?S.jsx("span",{className:"duration",children:t}):null}function gR({entry:t,duration:l}){return S.jsxs("div",{className:"console-entry",children:[S.jsx("span",{className:`prefix ${t.level}`,children:pR[t.level]}),S.jsx("span",{children:t.message}),S.jsx(qa,{value:l})]})}function yR({entry:t}){return S.jsxs("div",{className:"console-entry user-message",children:[S.jsx("span",{className:"prefix",style:{color:"var(--orange)"},children:"[you]"}),S.jsx("span",{children:t.message})]})}function vR({entry:t,duration:l}){const i=t.agent||"agent";return S.jsxs("details",{className:"thinking-inline",children:[S.jsxs("summary",{children:[S.jsxs("span",{className:"thinking-label",children:["[",i,"] Thinking"]}),S.jsxs("span",{className:"thinking-preview",children:[t.text.slice(0,100),"..."]}),S.jsx(qa,{value:l})]}),S.jsx("div",{className:"thinking-body",children:S.jsx(Ho,{inline:!0,children:t.text})})]})}const bR=300;function xR({entry:t,duration:l}){const i=t.agent||"agent";return t.text.length<=bR?S.jsxs("div",{className:"console-entry",children:[S.jsxs("span",{className:"prefix task",children:["[",i,"]"]}),S.jsx("span",{children:S.jsx(Ho,{inline:!0,children:t.text})}),S.jsx(qa,{value:l})]}):S.jsxs("details",{className:"tool-inline",children:[S.jsxs("summary",{children:[S.jsx("span",{className:"tool-inline-name",children:i}),S.jsxs("span",{className:"tool-inline-summary",children:[t.text.slice(0,120),"..."]}),S.jsx(qa,{value:l})]}),S.jsx("div",{className:"tool-inline-body",children:S.jsx(Ho,{children:t.text})})]})}function SR({sessionId:t,event:l,onResolved:i,resolved:r}){const[o,s]=C.useState(l.questions.map(()=>"")),[c,d]=C.useState(""),[p,m]=C.useState(!1),y=p||!!r;async function g(){m(!0);const b=o.filter(k=>k.trim()),x=b.length>0?b.join("; "):"Answers provided";try{await Di(t,"clarification",{answers:[...o,c],_summary:x}),i(x)}catch{m(!1)}}return S.jsxs("div",{className:"gate-prompt",children:[S.jsxs("h3",{children:["Need more details (confidence: ",l.confidence,"%)"]}),l.summary&&S.jsx("p",{className:"gate-summary",children:l.summary}),l.questions.map((b,x)=>S.jsxs("div",{className:"question",children:[S.jsxs("label",{children:[x+1,". ",b]}),S.jsx("input",{type:"text",value:o[x],onChange:k=>{const T=[...o];T[x]=k.target.value,s(T)},disabled:y})]},x)),!r&&S.jsxs("div",{className:"question",children:[S.jsx("label",{children:"Anything else you'd like to add?"}),S.jsx("textarea",{value:c,onChange:b=>d(b.target.value),disabled:y,rows:3,placeholder:"Optional: add any extra context, requirements, or preferences..."})]}),!r&&S.jsx("div",{className:"gate-actions",children:S.jsx("button",{className:"gate-btn gate-btn-primary",onClick:g,disabled:y,children:p?"Submitting...":"Submit Answers"})})]})}function ER({sessionId:t,event:l,onResolved:i,resolved:r}){const[o,s]=C.useState(!1),c=C.useCallback(async m=>{s(!0);const g={approve:"Plan approved",revise:"Revision requested",cancel:"Cancelled"}[m];try{await Di(t,"approval",{decision:m,_summary:g}),i(g)}catch{s(!1)}},[t,i]),d=C.useCallback(()=>c("approve"),[c]),p=C.useCallback(()=>c("cancel"),[c]);return wd("Enter",d,{disabled:o||!!r}),Ni(p,o||!!r),S.jsxs("div",{className:"gate-plan",children:[S.jsx("div",{className:"gate-plan-body",children:S.jsx(Ho,{children:l.plan})}),!r&&S.jsxs("div",{className:"gate-plan-actions",children:[S.jsx("button",{className:"gate-btn gate-btn-primary",onClick:()=>c("approve"),disabled:o,children:"Approve"}),S.jsx("button",{className:"gate-btn",onClick:()=>c("revise"),disabled:o,children:"Revise"}),S.jsx("button",{className:"gate-btn gate-btn-danger",onClick:()=>c("cancel"),disabled:o,children:"Cancel"})]})]})}function wR({sessionId:t,reason:l,onResolved:i,resolved:r,resolvedSummary:o}){const[s,c]=C.useState(!1),d=C.useCallback(async g=>{c(!0);const b=g?"Continued":"Stopped";try{await Di(t,"continue",{proceed:g,_summary:b}),i(b)}catch{c(!1)}},[t,i]),p=C.useCallback(()=>d(!0),[d]),m=C.useCallback(()=>d(!1),[d]);wd("Enter",p,{disabled:s||!!r}),Ni(m,s||!!r);const y=l==="max_budget";return S.jsxs("div",{className:"gate-continue",children:[S.jsx("span",{className:"gate-continue-text",children:y?"Budget limit reached. Continue with additional budget?":"Turn limit reached. Continue?"}),r?S.jsx("span",{className:"gate-continue-decision",children:o||"Decided"}):S.jsxs(S.Fragment,{children:[S.jsx("button",{className:"gate-btn gate-btn-primary",onClick:()=>d(!0),disabled:s,children:"Continue"}),S.jsx("button",{className:"gate-btn",onClick:()=>d(!1),disabled:s,children:"Stop"})]})]})}function kR({sessionId:t,event:l,onResolved:i,resolved:r,resolvedDetails:o}){const s=l.runtime==="docker",[c,d]=C.useState(s?"local":"claim"),[p,m]=C.useState(""),[y,g]=C.useState("https://api.electric-sql.cloud"),[b,x]=C.useState(""),[k,T]=C.useState(""),[_,A]=C.useState(""),[R,O]=C.useState(""),[ee,ie]=C.useState(!1),[Y,D]=C.useState(!1),[re,fe]=C.useState(!1),[q,V]=C.useState(null),Z=l.ghAccounts.length>0,[Q,ue]=C.useState(l.ghAccounts[0]?.login??""),[$,U]=C.useState(l.projectName),[J,se]=C.useState("private"),[xe,z]=C.useState(Z);async function M(){D(!0),V(null);try{const pe=await vk();m(pe.databaseUrl),g(pe.electricUrl),x(pe.sourceId),T(pe.secret),A(pe.claimId),O(pe.claimUrl),fe(!0)}catch(pe){V(pe instanceof Error?pe.message:"Provisioning failed")}finally{D(!1)}}async function I(){ie(!0);const pe=[];try{const Re={};c==="claim"?(Re.mode="claim",Re.databaseUrl=p,Re.electricUrl=y,Re.sourceId=b,Re.secret=k,Re.claimId=_,pe.push(`Database: ${p}`),pe.push(`Source ID: ${b}`),R&&pe.push(`Claim: ${R}`)):c==="cloud"?(Re.mode="cloud",Re.databaseUrl=p,Re.electricUrl=y,Re.sourceId=b,Re.secret=k,pe.push(`Database: ${p}`),pe.push(`Source ID: ${b}`)):(Re.mode="local",pe.push("Local Docker")),xe&&Q&&$.trim()&&(Re.repoAccount=Q,Re.repoName=$,Re.repoVisibility=J,pe.push(`${Q}/${$} (${J})`)),Re._summary=pe.join(`
224
- `),await Di(t,"infra_config",Re),i(pe.join(`
225
- `))}catch{ie(!1)}}const w=ee||!!r,ae=p.trim()&&b.trim()&&k.trim(),me=re&&p.trim()&&b.trim()&&k.trim(),be=!xe||Q&&$.trim(),Ne={claim:"Provisioned (Cloud)",local:"Local (Docker)",cloud:"Electric Cloud (BYO)"};if(r){const pe=o??{};return o||(pe.Infrastructure=Ne[c],(c==="cloud"||c==="claim")&&(p&&(pe["Connection string"]=p),b&&(pe["Source ID"]=b)),c==="claim"&&R&&(pe["Claim link"]=R),xe&&Q&&$.trim()&&(pe.Repository=`${Q}/${$}`,pe.Visibility=J)),S.jsx("div",{className:"gate-prompt",children:S.jsx("div",{className:"gate-config-summary",children:Object.entries(pe).map(([Re,Dt])=>S.jsxs("div",{children:[S.jsxs("strong",{children:[Re,":"]})," ",Dt.startsWith("http")?S.jsx("a",{href:Dt,target:"_blank",rel:"noopener noreferrer",children:Dt}):Dt]},Re))})})}return S.jsxs("div",{className:"gate-prompt",children:[S.jsxs("h3",{children:["Setup ",l.projectName]}),S.jsx("p",{className:"gate-summary",children:"Infrastructure"}),S.jsxs("div",{className:"gate-option-group",children:[S.jsxs("button",{type:"button",className:`gate-option ${c==="claim"?"active":""}`,onClick:()=>d("claim"),disabled:ee,children:[S.jsx("span",{className:"gate-option-title",children:"Provision"}),S.jsx("span",{className:"gate-option-desc",children:"Auto-provision database & Electric Cloud (72h)"})]}),s&&S.jsxs("button",{type:"button",className:`gate-option ${c==="local"?"active":""}`,onClick:()=>d("local"),disabled:ee,children:[S.jsx("span",{className:"gate-option-title",children:"Local"}),S.jsx("span",{className:"gate-option-desc",children:"Run with Docker Compose on your machine"})]}),S.jsxs("button",{type:"button",className:`gate-option ${c==="cloud"?"active":""}`,onClick:()=>d("cloud"),disabled:ee,children:[S.jsx("span",{className:"gate-option-title",children:"Bring your own"}),S.jsx("span",{className:"gate-option-desc",children:"Provide your own database & Electric details"})]})]}),c==="claim"&&S.jsx("div",{className:"question",children:re?S.jsxs("div",{style:{fontSize:"0.85em"},children:[S.jsx("p",{style:{color:"var(--color-done, #4c4)",margin:"0 0 6px"},children:"Resources provisioned successfully (72h TTL)."}),S.jsxs("div",{style:{background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:6,padding:"8px 10px",margin:"6px 0",fontFamily:"monospace",fontSize:"0.9em",lineHeight:1.6,wordBreak:"break-all"},children:[S.jsxs("div",{children:[S.jsx("strong",{children:"Database URL:"})," ",p]}),S.jsxs("div",{children:[S.jsx("strong",{children:"Source ID:"})," ",b]}),S.jsxs("div",{children:[S.jsx("strong",{children:"Electric URL:"})," ",y]})]}),R&&S.jsxs("p",{style:{margin:"8px 0 0"},children:["Claim into your account:"," ",S.jsx("a",{href:R,target:"_blank",rel:"noopener noreferrer",style:{wordBreak:"break-all"},children:R})]})]}):S.jsxs(S.Fragment,{children:[S.jsx("p",{style:{fontSize:"0.85em",opacity:.7,margin:"0 0 8px"},children:"Automatically provision a Neon Postgres database and Electric Cloud source. Resources are available for 72 hours."}),S.jsx("button",{className:"gate-btn gate-btn-primary",onClick:M,disabled:Y||w,style:{marginBottom:8},children:Y?"Provisioning...":"Provision Resources"}),Y&&S.jsx("p",{style:{fontSize:"0.85em",opacity:.7},children:"This may take 30-60 seconds..."}),q&&S.jsx("p",{style:{color:"var(--color-error, #e55)",fontSize:"0.85em"},children:q})]})}),c==="cloud"&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"question",children:[S.jsx("label",{children:"Database URL"}),S.jsx("input",{type:"text",value:p,onChange:pe=>m(pe.target.value),disabled:w,placeholder:"postgresql://user:pass@host:5432/dbname"})]}),S.jsxs("div",{className:"question",children:[S.jsx("label",{children:"Electric URL"}),S.jsx("input",{type:"text",value:y,onChange:pe=>g(pe.target.value),disabled:w,placeholder:"https://api.electric-sql.cloud"})]}),S.jsxs("div",{className:"question",children:[S.jsx("label",{children:"Source ID"}),S.jsx("input",{type:"text",value:b,onChange:pe=>x(pe.target.value),disabled:w,placeholder:"Your Electric Cloud source ID"})]}),S.jsxs("div",{className:"question",children:[S.jsx("label",{children:"Secret"}),S.jsx("input",{type:"password",value:k,onChange:pe=>T(pe.target.value),disabled:w,placeholder:"Your Electric Cloud secret"})]})]}),Z&&S.jsxs(S.Fragment,{children:[S.jsx("p",{className:"gate-summary",style:{marginTop:16},children:"GitHub Repository"}),S.jsx("div",{className:"question",children:S.jsxs("label",{className:"gate-radio",style:{marginBottom:8},children:[S.jsx("input",{type:"checkbox",checked:xe,onChange:pe=>z(pe.target.checked),disabled:w}),"Create a GitHub repo for this project"]})}),xe&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"question",children:[S.jsx("label",{children:"Account"}),l.ghAccounts.length>1?S.jsx("select",{value:Q,onChange:pe=>ue(pe.target.value),disabled:w,children:l.ghAccounts.map(pe=>S.jsxs("option",{value:pe.login,children:[pe.login," ",pe.type==="org"?"(org)":"(personal)"]},pe.login))}):S.jsx("input",{type:"text",value:l.ghAccounts[0].login,disabled:!0})]}),S.jsxs("div",{className:"question",children:[S.jsx("label",{children:"Repository name"}),S.jsx("input",{type:"text",value:$,onChange:pe=>U(pe.target.value),disabled:w,placeholder:"my-app"})]}),S.jsxs("div",{className:"question",children:[S.jsx("label",{children:"Visibility"}),S.jsxs("div",{className:"gate-radio-group",children:[S.jsxs("label",{className:"gate-radio",children:[S.jsx("input",{type:"radio",name:"repo-visibility",checked:J==="private",onChange:()=>se("private"),disabled:w}),"Private"]}),S.jsxs("label",{className:"gate-radio",children:[S.jsx("input",{type:"radio",name:"repo-visibility",checked:J==="public",onChange:()=>se("public"),disabled:w}),"Public"]})]})]})]})]}),S.jsx("div",{className:"gate-actions",children:S.jsx("button",{className:"gate-btn gate-btn-primary",onClick:I,disabled:w||c==="cloud"&&!ae||c==="claim"&&!me||!be,children:ee?"Configuring...":"Start"})})]})}function CR({sessionId:t,event:l,onResolved:i,resolved:r,resolvedSummary:o}){const[s,c]=C.useState(""),[d,p]=C.useState(null),[m,y]=C.useState(!1),g=m||!!r,b=d||o||"";async function x(T){p(T),y(!0);try{await Di(t,"ask_user_question",{toolUseId:l.tool_use_id,answer:T,_summary:T}),i(T)}catch{p(null),y(!1)}}async function k(){if(!s.trim())return;y(!0);const T=s.trim().slice(0,80);try{await Di(t,"ask_user_question",{toolUseId:l.tool_use_id,answer:s.trim(),_summary:T}),i(T)}catch{y(!1)}}return S.jsxs("div",{className:"gate-prompt",children:[S.jsx("h3",{children:"Question"}),S.jsx("p",{className:"gate-summary",children:l.question}),l.options&&l.options.length>0?S.jsx("div",{className:"gate-option-group-vert",children:l.options.map(T=>{const _=r&&T.label===b;return S.jsxs("button",{type:"button",className:`gate-option ${_?"selected":""}`,onClick:()=>x(T.label),disabled:g,children:[S.jsx("span",{className:"gate-option-title",children:T.label}),T.description&&S.jsx("span",{className:"gate-option-desc",children:T.description})]},T.label)})}):r?S.jsx("div",{className:"gate-answer-summary",children:b}):S.jsx("div",{className:"question",children:S.jsx("textarea",{value:s,onChange:T=>c(T.target.value),disabled:g,rows:3,placeholder:"Type your answer..."})}),!r&&!l.options?.length&&S.jsx("div",{className:"gate-actions",children:S.jsx("button",{className:"gate-btn gate-btn-primary",onClick:k,disabled:g||!s.trim(),children:m?"Submitting...":"Submit"})})]})}function TR(t){switch(t){case"clarification_needed":return"Clarification answered";case"plan_ready":return"Plan reviewed";case"infra_config_prompt":return"Project configured";case"continue_needed":return"Decision made";case"ask_user_question":return"Question answered";default:return"Decision made"}}function AR({sessionId:t,entry:l,entryIndex:i,onResolved:r,duration:o}){const s=m=>r(i,m),{resolved:c,resolvedSummary:d}=l;let p=null;switch(l.event.type){case"clarification_needed":p=S.jsx(SR,{sessionId:t,event:l.event,onResolved:s,resolved:c});break;case"plan_ready":p=S.jsx(ER,{sessionId:t,event:l.event,onResolved:s,resolved:c});break;case"continue_needed":p=S.jsx(wR,{sessionId:t,reason:l.event.reason,onResolved:s,resolved:c,resolvedSummary:d});break;case"infra_config_prompt":p=S.jsx(kR,{sessionId:t,event:l.event,onResolved:s,resolved:c,resolvedDetails:l.resolvedDetails});break;case"ask_user_question":p=S.jsx(CR,{sessionId:t,event:l.event,onResolved:s,resolved:c,resolvedSummary:d});break;default:return null}return c?S.jsxs("div",{className:"gate-answered",children:[S.jsxs("div",{className:"gate-answered-header",children:[S.jsx("span",{className:"prefix done",children:"[gate]"}),S.jsx("span",{className:"gate-resolved-label",children:TR(l.event.type)}),S.jsx(qa,{value:o})]}),p]}):p}const uv={pending:"○",in_progress:"◉",completed:"✓"};function _R(t){switch(t){case"completed":return"todo-status-done";case"in_progress":return"todo-status-progress";default:return"todo-status-pending"}}function zR({entry:t}){const{todos:l}=t,i=l.filter(c=>c.status==="completed").length,r=l.filter(c=>c.status==="in_progress").length,o=l.length,s=[];return i>0&&s.push(`${i}/${o} done`),r>0&&s.push(`${r} in progress`),s.length===0&&s.push(`${o} pending`),S.jsxs("details",{className:"tool-inline",open:!0,children:[S.jsxs("summary",{children:[S.jsx("span",{className:"tool-inline-name",children:"TodoWrite"}),S.jsx("span",{className:"tool-inline-summary",children:s.join(", ")})]}),S.jsx("div",{className:"tool-inline-body",children:S.jsx("ul",{className:"todo-list",children:l.map(c=>S.jsxs("li",{className:"todo-item",children:[S.jsx("span",{className:`todo-status-icon ${_R(c.status)}`,children:uv[c.status]||uv.pending}),S.jsx("span",{className:"todo-content",children:c.content}),c.priority&&S.jsx("span",{className:"todo-priority",children:c.priority})]},c.id))})})]})}function RR(t){const{tool_name:l,tool_input:i}=t;if(l==="Glob"){const r=i.pattern||"*",o=i.path;return o?`${r} in ${o}`:r}if(l==="Grep"){const o=[i.pattern||""];return i.path&&o.push(`in ${i.path}`),i.glob&&o.push(`(${i.glob})`),o.join(" ")}if(l==="Read"){const o=[i.file_path||"unknown file"];return i.offset&&o.push(`offset:${i.offset}`),i.limit&&o.push(`limit:${i.limit}`),o.join(" ")}return l==="Write"||l==="Edit"?i.file_path||"unknown file":l==="Bash"?(i.command||"").slice(0,80):l.includes("playbook")?i.name||"read":l.includes("build")?"pnpm build + check":l}function DR(t){return Object.entries(t).map(([i,r])=>{const o=typeof r=="string"?r:JSON.stringify(r,null,2);return o.length>500?`${i}: ${o.slice(0,500)}... (${o.length} chars)`:`${i}: ${o}`}).join(`
226
- `)}function Of({text:t,maxLen:l}){const i=t.length>l,r=i?t.slice(0,l):t,o=m0(r)+(i?`
227
- ... (truncated)`:"");return S.jsx("pre",{dangerouslySetInnerHTML:{__html:o}})}function jR({entry:t,duration:l}){const i=t.tool_response===null,r=t.tool_name==="Bash"||t.tool_name==="bash",o=r&&t.tool_input.command||"";return r?S.jsxs("details",{className:"tool-inline",children:[S.jsxs("summary",{children:[t.agent&&S.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),S.jsx("span",{className:"tool-inline-name",children:"$"}),S.jsx("span",{className:"tool-inline-command",children:o}),i?S.jsx("span",{className:"spinner-inline"}):S.jsx(qa,{value:l})]}),S.jsx("div",{className:"tool-inline-body",children:t.tool_response!==null&&S.jsx(Of,{text:t.tool_response,maxLen:5e3})})]}):S.jsxs("details",{className:"tool-inline",children:[S.jsxs("summary",{children:[t.agent&&S.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),S.jsx("span",{className:"tool-inline-name",children:t.tool_name}),S.jsx("span",{className:"tool-inline-summary",children:RR(t)}),i?S.jsx("span",{className:"spinner-inline"}):S.jsx(qa,{value:l})]}),S.jsxs("div",{className:"tool-inline-body",children:[S.jsx("div",{className:"section-label",children:"Input"}),S.jsx(Of,{text:DR(t.tool_input),maxLen:5e3}),t.tool_response!==null&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"section-label",children:"Output"}),S.jsx(Of,{text:t.tool_response,maxLen:5e3})]})]})]})}function NR(t){if(t.kind!=="user_prompt")return t.ts}function p0(t){if(t<1e3)return`${t}ms`;const l=t/1e3;if(l<60)return`${l.toFixed(1)}s`;const i=Math.floor(l/60),r=l%60;return`${i}m ${r.toFixed(0)}s`}function MR({sinceTs:t}){const[l,i]=C.useState("");return C.useEffect(()=>{const r=new Date(t).getTime(),o=()=>{const c=Date.now()-r;i(p0(Math.max(0,c)))};o();const s=setInterval(o,1e3);return()=>clearInterval(s)},[t]),S.jsxs("div",{className:"console-entry waiting-indicator",children:[S.jsx("span",{className:"spinner-inline"}),S.jsx("span",{className:"waiting-label",children:"Waiting for response..."}),S.jsx("span",{className:"duration",children:l})]})}function OR({sessionId:t,entries:l,isLive:i,isComplete:r,onGateResolved:o}){const s=C.useRef(null),c=C.useRef(null),[d,p]=C.useState(!0),m=l.length,y=C.useCallback(()=>{c.current?.scrollIntoView({behavior:"smooth"})},[]),g=C.useCallback(()=>{const _=s.current;if(!_)return;const R=_.scrollHeight-_.scrollTop-_.clientHeight<80;p(R)},[]);C.useEffect(()=>{d&&c.current?.scrollIntoView({behavior:"smooth"})},[m,d]);const b=[];let x=null;for(const _ of l){const A=NR(_);if(_.kind==="user_prompt"||!A)b.push(null);else if(x){const R=new Date(A).getTime()-new Date(x).getTime();b.push(R>=0?p0(R):null)}else b.push(null);A&&(x=A)}let k=!1,T="";if(i&&!r&&l.length>0){const _=l[l.length-1],A=_.kind==="tool_use"&&_.tool_response===null,R=_.kind==="gate"&&!_.resolved,O=_.kind==="assistant_message";!A&&!R&&!O&&(k=!0,T=x||new Date().toISOString())}return S.jsxs("div",{className:"console",ref:s,onScroll:g,children:[l.map((_,A)=>{const R=b[A];switch(_.kind){case"log":return S.jsx(gR,{entry:_,duration:R},`log-${A}`);case"user_prompt":return S.jsx(yR,{entry:_},`user-${A}`);case"tool_use":return S.jsx(jR,{entry:_,duration:R},_.tool_use_id||`tool-${A}`);case"assistant_message":return S.jsx(xR,{entry:_,duration:R},`text-${A}`);case"assistant_thinking":return S.jsx(vR,{entry:_,duration:R},`thinking-${A}`);case"todo_widget":return S.jsx(zR,{entry:_},`todo-${A}`);case"gate":return S.jsx(AR,{sessionId:t,entry:_,entryIndex:A,onResolved:o,duration:R},`gate-${A}`);default:return null}}),k&&S.jsx(MR,{sinceTs:T}),S.jsx("div",{ref:c}),!d&&S.jsx("button",{type:"button",className:"jump-to-bottom",onClick:y,children:"Jump to latest"})]})}function Lf({variant:t="line",width:l}){const i=t==="block"?"skeleton skeleton-block":"skeleton skeleton-line";return S.jsx("div",{className:i,style:l?{width:l}:void 0})}function LR(t){const[l,i]=C.useState([]),[r,o]=C.useState(!1),[s,c]=C.useState(!1),[d,p]=C.useState(!1),[m,y]=C.useState(0),g=C.useRef(!1),b=C.useRef(!1),x=C.useCallback(T=>{i(_=>{switch(T.type){case"log":return[..._,{kind:"log",level:T.level,message:T.message,ts:T.ts}];case"user_prompt":return[..._,{kind:"user_prompt",message:T.message}];case"pre_tool_use":return[..._,{kind:"tool_use",tool_name:T.tool_name,tool_use_id:T.tool_use_id,tool_input:T.tool_input,tool_response:null,agent:T.agent,ts:T.ts}];case"post_tool_use":{const A=[..._];for(let R=A.length-1;R>=0;R--){const O=A[R];if(O.kind==="tool_use"&&O.tool_use_id===T.tool_use_id){A[R]={...O,tool_response:T.tool_response,agent:O.agent||T.agent};break}}return A}case"post_tool_use_failure":{const A=[..._];for(let R=A.length-1;R>=0;R--){const O=A[R];if(O.kind==="tool_use"&&O.tool_use_id===T.tool_use_id){A[R]={...O,tool_response:`Error: ${T.error}`,agent:O.agent||T.agent};break}}return A}case"assistant_message":return[..._,{kind:"assistant_message",text:T.text,agent:T.agent,ts:T.ts}];case"assistant_thinking":return[..._,{kind:"assistant_thinking",text:T.text,agent:T.agent,ts:T.ts}];case"todo_write":{const A=_.findIndex(O=>O.kind==="todo_widget"),R={kind:"todo_widget",tool_use_id:T.tool_use_id,todos:T.todos,ts:T.ts};if(A>=0){const O=[..._];return O[A]=R,O}return[..._,R]}case"ask_user_question":case"clarification_needed":case"plan_ready":case"continue_needed":case"infra_config_prompt":return[..._,{kind:"gate",event:T,resolved:!1,ts:T.ts}];case"gate_resolved":{const A=[..._];let R=!1;for(let O=A.length-1;O>=0;O--){const ee=A[O];if(ee.kind==="gate"&&!ee.resolved){A[O]={...ee,resolved:!0,resolvedSummary:T.summary||ee.resolvedSummary,resolvedDetails:T.details},R=!0;break}}if(!R&&T.details)for(let O=A.length-1;O>=0;O--){const ee=A[O];if(ee.kind==="gate"&&ee.resolved&&!ee.resolvedDetails){A[O]={...ee,resolvedDetails:T.details};break}}return A}case"cost_update":case"session_end":case"session_start":case"phase_complete":case"app_ready":return _;default:return _}}),T.type==="cost_update"&&y(_=>_+T.totalCostUsd),T.type==="app_ready"&&p(!0),T.type==="session_end"&&(c(!0),b.current&&!g.current&&(g.current=!0,T.success?py.success("Session completed successfully"):py.error("Session completed with errors")))},[]);C.useEffect(()=>{if(!t)return;i([]),o(!1),c(!1),p(!1),y(0),g.current=!1,b.current=!1;let T=!1,_=null,A=0;const R=10;function O(){if(!T){if(A>=R){console.warn(`[sse] Giving up on session ${t} after ${R} retries`),o(!1);return}_=new EventSource(`/api/sessions/${t}/events`),_.onopen=()=>{T||(A=0,o(!0),setTimeout(()=>{b.current=!0},500))},_.onmessage=ee=>{if(!T)try{const ie=JSON.parse(ee.data);x(ie)}catch{}},_.onerror=()=>{if(T)return;_?.close(),A++;const ee=Math.min(1e3*2**(A-1),3e4);setTimeout(O,ee)}}}return O(),()=>{T=!0,_&&(_.close(),_=null)}},[t,x]);const k=C.useCallback((T,_)=>{i(A=>{const R=[...A],O=R[T];return O?.kind==="gate"&&(R[T]={...O,resolved:!0,resolvedSummary:_}),R})},[]);return{entries:l,isLive:r,isComplete:s,appReady:d,totalCost:m,markGateResolved:k}}function UR(t){const l=[];for(const i of t)switch(i.kind){case"user_prompt":l.push(`## User
228
-
229
- ${i.message}
230
- `);break;case"assistant_message":l.push(`## Assistant
231
-
232
- ${i.text}
233
- `);break;case"log":l.push(`[${i.level}] ${i.message}`);break;case"tool_use":{l.push(`### Tool: ${i.tool_name}`),l.push("**Input:**"),l.push("```json"),l.push(JSON.stringify(i.tool_input,null,2)),l.push("```"),i.tool_response!=null&&(l.push("**Output:**"),l.push("```"),l.push(i.tool_response),l.push("```")),l.push("");break}case"gate":i.event.type==="plan_ready"?l.push(`## Plan
234
-
235
- ${i.event.plan}
236
- `):i.event.type==="clarification_needed"&&l.push(`## Clarification Needed
237
-
238
- ${i.event.questions.join(`
239
- `)}
240
- `);break}return l.join(`
241
- `)}function BR(){const{id:t}=eE(),l=tl(),i=$r(),{openMobileDrawer:r}=Ov(),{sessions:o,showSettings:s,setShowSettings:c,authSource:d,hasGhToken:p,refreshSettings:m,refreshSessions:y}=Cd(),[g,b]=C.useState(!1);C.useEffect(()=>{if(!g)return;const w=()=>b(!1);return document.addEventListener("click",w),()=>document.removeEventListener("click",w)},[g]);const[x,k]=C.useState(t==="new"),[T,_]=C.useState(t==="new"?null:t??null),A=C.useRef(!1);C.useEffect(()=>{t&&t!=="new"&&(_(t),k(!1),A.current=!1)},[t]),C.useEffect(()=>{if(t!=="new"||A.current)return;const w=l.state;if(!w?.description){i("/",{replace:!0});return}A.current=!0,k(!0),hk(w.description).then(async({sessionId:ae,appPort:me})=>{me&&ue(me),await y(),_(ae),k(!1),i(`/session/${ae}`,{replace:!0})}).catch(ae=>{console.error("Failed to create session:",ae),i("/",{replace:!0})})},[t,l.state,i,y]);const R=T,{entries:O,isLive:ee,isComplete:ie,appReady:Y,totalCost:D,markGateResolved:re}=LR(R),[fe,q]=C.useState(null),[V,Z]=C.useState("hidden"),[Q,ue]=C.useState(()=>o.find(w=>w.id===R)?.appPort),[$,U]=C.useState(()=>o.find(w=>w.id===R)?.previewUrl);C.useEffect(()=>{if(R){const w=o.find(ae=>ae.id===R);q(w??null),w?.appPort&&ue(w.appPort),w?.previewUrl&&U(w.previewUrl)}},[R,o]);const J=ie||Y||fe?.status==="complete"||fe?.status==="error",se=V==="running"&&!!$;C.useEffect(()=>{if(!R||!J||se){J||Z("hidden");return}const w=async()=>{try{const me=await yk(R);Z(me.running?"running":"stopped"),me.port&&ue(me.port),me.previewUrl&&U(me.previewUrl)}catch{Z("stopped")}};w();const ae=setInterval(w,1e4);return()=>clearInterval(ae)},[R,J,se]);const xe=C.useCallback(async w=>{if(R)try{await mk(R,w),await y()}catch(ae){console.error("Failed to send iteration:",ae)}},[R,y]),z=C.useCallback(async()=>{if(R)try{await pk(R),await y()}catch(w){console.error("Failed to cancel:",w)}},[R,y]),M=C.useCallback(()=>{const w=UR(O);navigator.clipboard.writeText(w)},[O]);if(!t)return null;const I=fe?.status==="running"&&!ie;return S.jsxs(S.Fragment,{children:[s&&S.jsx(ab,{authSource:d,hasGhToken:p??!1,onKeySaved:m,onClose:()=>c(!1),onCopyLog:R?M:void 0}),S.jsxs("div",{className:"session-header",children:[S.jsx("button",{type:"button",className:"mobile-hamburger",onClick:r,"aria-label":"Open menu",children:S.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[S.jsx("title",{children:"Menu"}),S.jsx("line",{x1:"3",y1:"4.5",x2:"15",y2:"4.5"}),S.jsx("line",{x1:"3",y1:"9",x2:"15",y2:"9"}),S.jsx("line",{x1:"3",y1:"13.5",x2:"15",y2:"13.5"})]})}),S.jsx("span",{className:"session-header-name",children:x?"Initializing...":fe?.projectName??"Loading..."}),I&&S.jsx("span",{className:"session-header-status",style:{color:"var(--green)"},children:"Live"}),ie&&S.jsx("span",{className:"session-header-status",style:{color:"var(--text-subtle)"},children:"Complete"}),!x&&!ee&&!ie&&S.jsx("span",{className:"session-header-status",style:{color:"var(--yellow)"},children:"Connecting..."}),S.jsx("span",{className:"session-header-cost",children:D>0&&S.jsxs("span",{style:{color:"var(--text-subtle)",fontSize:12,marginLeft:4},children:["$",D.toFixed(4)]})}),S.jsx("span",{className:"session-header-actions-group",children:Q&&(Y||V==="running"||J)&&S.jsx("a",{href:$??`http://localhost:${Q}`,target:"_blank",rel:"noopener noreferrer",className:"session-header-action primary",children:"Preview"})}),S.jsx("button",{type:"button",className:"session-header-overflow",onClick:w=>{w.stopPropagation(),b(ae=>!ae)},"aria-label":"More options",children:S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[S.jsx("title",{children:"More"}),S.jsx("circle",{cx:"8",cy:"3",r:"1.5"}),S.jsx("circle",{cx:"8",cy:"8",r:"1.5"}),S.jsx("circle",{cx:"8",cy:"13",r:"1.5"})]})}),g&&S.jsxs("div",{className:"session-header-overflow-menu",children:[D>0&&S.jsxs("div",{className:"session-header-overflow-menu-item",children:["Cost: $",D.toFixed(4)]}),Q&&(Y||V==="running"||J)&&S.jsx("a",{href:$??`http://localhost:${Q}`,target:"_blank",rel:"noopener noreferrer",className:"session-header-overflow-menu-item",onClick:()=>b(!1),children:"Preview App"}),S.jsx("button",{type:"button",className:"session-header-overflow-menu-item",onClick:()=>{b(!1),c(w=>!w)},children:"Settings"})]})]}),($||Q)&&J&&S.jsx("div",{className:"mobile-preview-bar",children:S.jsxs("a",{href:$??`http://localhost:${Q}`,target:"_blank",rel:"noopener noreferrer",className:"mobile-preview-link",children:[S.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("title",{children:"Open preview"}),S.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),S.jsx("polyline",{points:"15 3 21 3 21 9"}),S.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"Open Preview"]})}),S.jsxs("div",{className:"session-content",children:[x?S.jsxs("div",{className:"session-initializing",children:[S.jsx("div",{className:"session-initializing-spinner"}),S.jsx("span",{children:"Setting up your project..."})]}):!ee&&!ie?S.jsxs("div",{style:{padding:16,flex:1},children:[S.jsx(Lf,{variant:"block"}),S.jsx(Lf,{variant:"line",width:"80%"}),S.jsx(Lf,{variant:"line",width:"60%"})]}):S.jsx(OR,{sessionId:R??"",entries:O,isLive:ee,isComplete:ie,onGateResolved:re}),S.jsx(lb,{onSubmit:xe,placeholder:I?"Send a follow-up message...":"Describe changes you want to make...",disabled:x,isRunning:I,onCancel:z})]})]})}const HR=IE([{element:S.jsx(kk,{}),children:[{path:"/",element:S.jsx(Ak,{})},{path:"/session/:id",element:S.jsx(BR,{})}]}]);Xv();const ov=document.getElementById("root");ov&&Nx.createRoot(ov).render(S.jsx(C.StrictMode,{children:S.jsx(iw,{router:HR})}));