@electric-agent/studio 1.13.0 → 1.14.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 (89) hide show
  1. package/dist/active-sessions.d.ts +4 -13
  2. package/dist/active-sessions.d.ts.map +1 -1
  3. package/dist/active-sessions.js +5 -39
  4. package/dist/active-sessions.js.map +1 -1
  5. package/dist/bridge/claude-code-base.d.ts +0 -2
  6. package/dist/bridge/claude-code-base.d.ts.map +1 -1
  7. package/dist/bridge/claude-code-base.js +0 -2
  8. package/dist/bridge/claude-code-base.js.map +1 -1
  9. package/dist/bridge/claude-md-generator.d.ts +2 -12
  10. package/dist/bridge/claude-md-generator.d.ts.map +1 -1
  11. package/dist/bridge/claude-md-generator.js +94 -72
  12. package/dist/bridge/claude-md-generator.js.map +1 -1
  13. package/dist/bridge/role-skills.d.ts.map +1 -1
  14. package/dist/bridge/role-skills.js +0 -8
  15. package/dist/bridge/role-skills.js.map +1 -1
  16. package/dist/client/assets/index-BfvQSMwH.css +1 -0
  17. package/dist/client/assets/index-BtX82X61.js +234 -0
  18. package/dist/client/index.html +2 -2
  19. package/dist/room-router.d.ts.map +1 -1
  20. package/dist/room-router.js +5 -20
  21. package/dist/room-router.js.map +1 -1
  22. package/dist/sandbox/docker.d.ts +0 -10
  23. package/dist/sandbox/docker.d.ts.map +1 -1
  24. package/dist/sandbox/docker.js +1 -115
  25. package/dist/sandbox/docker.js.map +1 -1
  26. package/dist/sandbox/sprites.d.ts +0 -1
  27. package/dist/sandbox/sprites.d.ts.map +1 -1
  28. package/dist/sandbox/sprites.js +0 -51
  29. package/dist/sandbox/sprites.js.map +1 -1
  30. package/dist/sandbox/types.d.ts +0 -5
  31. package/dist/sandbox/types.d.ts.map +1 -1
  32. package/dist/server.d.ts +0 -12
  33. package/dist/server.d.ts.map +1 -1
  34. package/dist/server.js +187 -1097
  35. package/dist/server.js.map +1 -1
  36. package/dist/session-auth.d.ts +0 -3
  37. package/dist/session-auth.d.ts.map +1 -1
  38. package/dist/session-auth.js +0 -10
  39. package/dist/session-auth.js.map +1 -1
  40. package/dist/sessions.d.ts +0 -2
  41. package/dist/sessions.d.ts.map +1 -1
  42. package/dist/sessions.js.map +1 -1
  43. package/package.json +2 -2
  44. package/dist/api-schemas.d.ts +0 -244
  45. package/dist/api-schemas.d.ts.map +0 -1
  46. package/dist/api-schemas.js +0 -103
  47. package/dist/api-schemas.js.map +0 -1
  48. package/dist/bridge/codex-docker.d.ts +0 -70
  49. package/dist/bridge/codex-docker.d.ts.map +0 -1
  50. package/dist/bridge/codex-docker.js +0 -234
  51. package/dist/bridge/codex-docker.js.map +0 -1
  52. package/dist/bridge/codex-json-parser.d.ts +0 -31
  53. package/dist/bridge/codex-json-parser.d.ts.map +0 -1
  54. package/dist/bridge/codex-json-parser.js +0 -267
  55. package/dist/bridge/codex-json-parser.js.map +0 -1
  56. package/dist/bridge/codex-md-generator.d.ts +0 -14
  57. package/dist/bridge/codex-md-generator.d.ts.map +0 -1
  58. package/dist/bridge/codex-md-generator.js +0 -55
  59. package/dist/bridge/codex-md-generator.js.map +0 -1
  60. package/dist/bridge/codex-sprites.d.ts +0 -64
  61. package/dist/bridge/codex-sprites.d.ts.map +0 -1
  62. package/dist/bridge/codex-sprites.js +0 -227
  63. package/dist/bridge/codex-sprites.js.map +0 -1
  64. package/dist/bridge/daytona.d.ts +0 -35
  65. package/dist/bridge/daytona.d.ts.map +0 -1
  66. package/dist/bridge/daytona.js +0 -141
  67. package/dist/bridge/daytona.js.map +0 -1
  68. package/dist/bridge/docker-stdio.d.ts +0 -30
  69. package/dist/bridge/docker-stdio.d.ts.map +0 -1
  70. package/dist/bridge/docker-stdio.js +0 -135
  71. package/dist/bridge/docker-stdio.js.map +0 -1
  72. package/dist/bridge/sprites.d.ts +0 -32
  73. package/dist/bridge/sprites.d.ts.map +0 -1
  74. package/dist/bridge/sprites.js +0 -133
  75. package/dist/bridge/sprites.js.map +0 -1
  76. package/dist/client/assets/index-BXdgNRgB.js +0 -235
  77. package/dist/client/assets/index-IvCtVUfs.css +0 -1
  78. package/dist/github-app.d.ts +0 -14
  79. package/dist/github-app.d.ts.map +0 -1
  80. package/dist/github-app.js +0 -62
  81. package/dist/github-app.js.map +0 -1
  82. package/dist/github-app.test.d.ts +0 -2
  83. package/dist/github-app.test.d.ts.map +0 -1
  84. package/dist/github-app.test.js +0 -62
  85. package/dist/github-app.test.js.map +0 -1
  86. package/dist/validate.d.ts +0 -10
  87. package/dist/validate.d.ts.map +0 -1
  88. package/dist/validate.js +0 -24
  89. package/dist/validate.js.map +0 -1
@@ -1,235 +0,0 @@
1
- function AS(t,l){for(var a=0;a<l.length;a++){const r=l[a];if(typeof r!="string"&&!Array.isArray(r)){for(const u in r)if(u!=="default"&&!(u in t)){const s=Object.getOwnPropertyDescriptor(r,u);s&&Object.defineProperty(t,u,s.get?s:{enumerable:!0,get:()=>r[u]})}}}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 u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const s of u)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 a(u){const s={};return u.integrity&&(s.integrity=u.integrity),u.referrerPolicy&&(s.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?s.credentials="include":u.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(u){if(u.ep)return;u.ep=!0;const s=a(u);fetch(u.href,s)}})();function Fd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Af={exports:{}},Ur={};var yy;function _S(){if(yy)return Ur;yy=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function a(r,u,s){var c=null;if(s!==void 0&&(c=""+s),u.key!==void 0&&(c=""+u.key),"key"in u){s={};for(var d in u)d!=="key"&&(s[d]=u[d])}else s=u;return u=s.ref,{$$typeof:t,type:r,key:c,ref:u!==void 0?u:null,props:s}}return Ur.Fragment=l,Ur.jsx=a,Ur.jsxs=a,Ur}var vy;function RS(){return vy||(vy=1,Af.exports=_S()),Af.exports}var v=RS(),_f={exports:{}},He={};var by;function DS(){if(by)return He;by=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),u=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 S(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,D={};function C(O,W,k){this.props=O,this.context=W,this.refs=D,this.updater=k||E}C.prototype.isReactComponent={},C.prototype.setState=function(O,W){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,W,"setState")},C.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function A(){}A.prototype=C.prototype;function j(O,W,k){this.props=O,this.context=W,this.refs=D,this.updater=k||E}var ee=j.prototype=new A;ee.constructor=j,_(ee,C.prototype),ee.isPureReactComponent=!0;var V=Array.isArray;function q(){}var N={H:null,A:null,T:null,S:null},le=Object.prototype.hasOwnProperty;function X(O,W,k){var de=k.ref;return{$$typeof:t,type:O,key:W,ref:de!==void 0?de:null,props:k}}function L(O,W){return X(O.type,W,O.props)}function G(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function F(O){var W={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(k){return W[k]})}var H=/\/+/g;function ie(O,W){return typeof O=="object"&&O!==null&&O.key!=null?F(""+O.key):W.toString(36)}function J(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(q,q):(O.status="pending",O.then(function(W){O.status==="pending"&&(O.status="fulfilled",O.value=W)},function(W){O.status==="pending"&&(O.status="rejected",O.reason=W)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function B(O,W,k,de,ye){var Te=typeof O;(Te==="undefined"||Te==="boolean")&&(O=null);var ze=!1;if(O===null)ze=!0;else switch(Te){case"bigint":case"string":case"number":ze=!0;break;case"object":switch(O.$$typeof){case t:case l:ze=!0;break;case y:return ze=O._init,B(ze(O._payload),W,k,de,ye)}}if(ze)return ye=ye(O),ze=de===""?"."+ie(O,0):de,V(ye)?(k="",ze!=null&&(k=ze.replace(H,"$&/")+"/"),B(ye,W,k,"",function(At){return At})):ye!=null&&(G(ye)&&(ye=L(ye,k+(ye.key==null||O&&O.key===ye.key?"":(""+ye.key).replace(H,"$&/")+"/")+ze)),W.push(ye)),1;ze=0;var be=de===""?".":de+":";if(V(O))for(var Oe=0;Oe<O.length;Oe++)de=O[Oe],Te=be+ie(de,Oe),ze+=B(de,W,k,Te,ye);else if(Oe=S(O),typeof Oe=="function")for(O=Oe.call(O),Oe=0;!(de=O.next()).done;)de=de.value,Te=be+ie(de,Oe++),ze+=B(de,W,k,Te,ye);else if(Te==="object"){if(typeof O.then=="function")return B(J(O),W,k,de,ye);throw W=String(O),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return ze}function te(O,W,k){if(O==null)return O;var de=[],ye=0;return B(O,de,"","",function(Te){return W.call(k,Te,ye++)}),de}function ce(O){if(O._status===-1){var W=O._result;W=W(),W.then(function(k){(O._status===0||O._status===-1)&&(O._status=1,O._result=k)},function(k){(O._status===0||O._status===-1)&&(O._status=2,O._result=k)}),O._status===-1&&(O._status=0,O._result=W)}if(O._status===1)return O._result.default;throw O._result}var pe=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},R={map:te,forEach:function(O,W,k){te(O,function(){W.apply(this,arguments)},k)},count:function(O){var W=0;return te(O,function(){W++}),W},toArray:function(O){return te(O,function(W){return W})||[]},only:function(O){if(!G(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return He.Activity=g,He.Children=R,He.Component=C,He.Fragment=a,He.Profiler=u,He.PureComponent=j,He.StrictMode=r,He.Suspense=p,He.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,He.__COMPILER_RUNTIME={__proto__:null,c:function(O){return N.H.useMemoCache(O)}},He.cache=function(O){return function(){return O.apply(null,arguments)}},He.cacheSignal=function(){return null},He.cloneElement=function(O,W,k){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var de=_({},O.props),ye=O.key;if(W!=null)for(Te in W.key!==void 0&&(ye=""+W.key),W)!le.call(W,Te)||Te==="key"||Te==="__self"||Te==="__source"||Te==="ref"&&W.ref===void 0||(de[Te]=W[Te]);var Te=arguments.length-2;if(Te===1)de.children=k;else if(1<Te){for(var ze=Array(Te),be=0;be<Te;be++)ze[be]=arguments[be+2];de.children=ze}return X(O.type,ye,de)},He.createContext=function(O){return O={$$typeof:c,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:s,_context:O},O},He.createElement=function(O,W,k){var de,ye={},Te=null;if(W!=null)for(de in W.key!==void 0&&(Te=""+W.key),W)le.call(W,de)&&de!=="key"&&de!=="__self"&&de!=="__source"&&(ye[de]=W[de]);var ze=arguments.length-2;if(ze===1)ye.children=k;else if(1<ze){for(var be=Array(ze),Oe=0;Oe<ze;Oe++)be[Oe]=arguments[Oe+2];ye.children=be}if(O&&O.defaultProps)for(de in ze=O.defaultProps,ze)ye[de]===void 0&&(ye[de]=ze[de]);return X(O,Te,ye)},He.createRef=function(){return{current:null}},He.forwardRef=function(O){return{$$typeof:d,render:O}},He.isValidElement=G,He.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:ce}},He.memo=function(O,W){return{$$typeof:m,type:O,compare:W===void 0?null:W}},He.startTransition=function(O){var W=N.T,k={};N.T=k;try{var de=O(),ye=N.S;ye!==null&&ye(k,de),typeof de=="object"&&de!==null&&typeof de.then=="function"&&de.then(q,pe)}catch(Te){pe(Te)}finally{W!==null&&k.types!==null&&(W.types=k.types),N.T=W}},He.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},He.use=function(O){return N.H.use(O)},He.useActionState=function(O,W,k){return N.H.useActionState(O,W,k)},He.useCallback=function(O,W){return N.H.useCallback(O,W)},He.useContext=function(O){return N.H.useContext(O)},He.useDebugValue=function(){},He.useDeferredValue=function(O,W){return N.H.useDeferredValue(O,W)},He.useEffect=function(O,W){return N.H.useEffect(O,W)},He.useEffectEvent=function(O){return N.H.useEffectEvent(O)},He.useId=function(){return N.H.useId()},He.useImperativeHandle=function(O,W,k){return N.H.useImperativeHandle(O,W,k)},He.useInsertionEffect=function(O,W){return N.H.useInsertionEffect(O,W)},He.useLayoutEffect=function(O,W){return N.H.useLayoutEffect(O,W)},He.useMemo=function(O,W){return N.H.useMemo(O,W)},He.useOptimistic=function(O,W){return N.H.useOptimistic(O,W)},He.useReducer=function(O,W,k){return N.H.useReducer(O,W,k)},He.useRef=function(O){return N.H.useRef(O)},He.useState=function(O){return N.H.useState(O)},He.useSyncExternalStore=function(O,W,k){return N.H.useSyncExternalStore(O,W,k)},He.useTransition=function(){return N.H.useTransition()},He.version="19.2.4",He}var xy;function Gd(){return xy||(xy=1,_f.exports=DS()),_f.exports}var T=Gd();const NS=Fd(T),jS=AS({__proto__:null,default:NS},[T]);var Rf={exports:{}},Br={},Df={exports:{}},Nf={};var Sy;function OS(){return Sy||(Sy=1,(function(t){function l(B,te){var ce=B.length;B.push(te);e:for(;0<ce;){var pe=ce-1>>>1,R=B[pe];if(0<u(R,te))B[pe]=te,B[ce]=R,ce=pe;else break e}}function a(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var te=B[0],ce=B.pop();if(ce!==te){B[0]=ce;e:for(var pe=0,R=B.length,O=R>>>1;pe<O;){var W=2*(pe+1)-1,k=B[W],de=W+1,ye=B[de];if(0>u(k,ce))de<R&&0>u(ye,k)?(B[pe]=ye,B[de]=ce,pe=de):(B[pe]=k,B[W]=ce,pe=W);else if(de<R&&0>u(ye,ce))B[pe]=ye,B[de]=ce,pe=de;else break e}}return te}function u(B,te){var ce=B.sortIndex-te.sortIndex;return ce!==0?ce:B.id-te.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,S=!1,E=!1,_=!1,D=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function ee(B){for(var te=a(m);te!==null;){if(te.callback===null)r(m);else if(te.startTime<=B)r(m),te.sortIndex=te.expirationTime,l(p,te);else break;te=a(m)}}function V(B){if(_=!1,ee(B),!E)if(a(p)!==null)E=!0,q||(q=!0,F());else{var te=a(m);te!==null&&J(V,te.startTime-B)}}var q=!1,N=-1,le=5,X=-1;function L(){return D?!0:!(t.unstable_now()-X<le)}function G(){if(D=!1,q){var B=t.unstable_now();X=B;var te=!0;try{e:{E=!1,_&&(_=!1,A(N),N=-1),S=!0;var ce=b;try{t:{for(ee(B),g=a(p);g!==null&&!(g.expirationTime>B&&L());){var pe=g.callback;if(typeof pe=="function"){g.callback=null,b=g.priorityLevel;var R=pe(g.expirationTime<=B);if(B=t.unstable_now(),typeof R=="function"){g.callback=R,ee(B),te=!0;break t}g===a(p)&&r(p),ee(B)}else r(p);g=a(p)}if(g!==null)te=!0;else{var O=a(m);O!==null&&J(V,O.startTime-B),te=!1}}break e}finally{g=null,b=ce,S=!1}te=void 0}}finally{te?F():q=!1}}}var F;if(typeof j=="function")F=function(){j(G)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,ie=H.port2;H.port1.onmessage=G,F=function(){ie.postMessage(null)}}else F=function(){C(G,0)};function J(B,te){N=C(function(){B(t.unstable_now())},te)}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(B){B.callback=null},t.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<B?Math.floor(1e3/B):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(B){switch(b){case 1:case 2:case 3:var te=3;break;default:te=b}var ce=b;b=te;try{return B()}finally{b=ce}},t.unstable_requestPaint=function(){D=!0},t.unstable_runWithPriority=function(B,te){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ce=b;b=B;try{return te()}finally{b=ce}},t.unstable_scheduleCallback=function(B,te,ce){var pe=t.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?pe+ce:pe):ce=pe,B){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=ce+R,B={id:y++,callback:te,priorityLevel:B,startTime:ce,expirationTime:R,sortIndex:-1},ce>pe?(B.sortIndex=ce,l(m,B),a(p)===null&&B===a(m)&&(_?(A(N),N=-1):_=!0,J(V,ce-pe))):(B.sortIndex=R,l(p,B),E||S||(E=!0,q||(q=!0,F()))),B},t.unstable_shouldYield=L,t.unstable_wrapCallback=function(B){var te=b;return function(){var ce=b;b=te;try{return B.apply(this,arguments)}finally{b=ce}}}})(Nf)),Nf}var Ey;function MS(){return Ey||(Ey=1,Df.exports=OS()),Df.exports}var jf={exports:{}},rn={};var wy;function zS(){if(wy)return rn;wy=1;var t=Gd();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 a(){}var r={d:{f:a,r:function(){throw Error(l(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},u=Symbol.for("react.portal");function s(p,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,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 rn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,rn.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)},rn.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()}},rn.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))},rn.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},rn.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,S=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:S}):y==="script"&&r.d.X(p,{crossOrigin:g,integrity:b,fetchPriority:S,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},rn.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)},rn.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})}},rn.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)},rn.requestFormReset=function(p){r.d.r(p)},rn.unstable_batchedUpdates=function(p,m){return p(m)},rn.useFormState=function(p,m,y){return c.H.useFormState(p,m,y)},rn.useFormStatus=function(){return c.H.useHostTransitionStatus()},rn.version="19.2.4",rn}var Ty;function ob(){if(Ty)return jf.exports;Ty=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(),jf.exports=zS(),jf.exports}var ky;function LS(){if(ky)return Br;ky=1;var t=MS(),l=Gd(),a=ob();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i])}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 u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var n=e,i=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(i=n.return),e=n.return;while(e)}return n.tag===3?i: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 i=e,o=n;;){var f=i.return;if(f===null)break;var h=f.alternate;if(h===null){if(o=f.return,o!==null){i=o;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===i)return p(f),e;if(h===o)return p(f),n;h=h.sibling}throw Error(r(188))}if(i.return!==o.return)i=f,o=h;else{for(var x=!1,w=f.child;w;){if(w===i){x=!0,i=f,o=h;break}if(w===o){x=!0,o=f,i=h;break}w=w.sibling}if(!x){for(w=h.child;w;){if(w===i){x=!0,i=h,o=f;break}if(w===o){x=!0,o=h,i=f;break}w=w.sibling}if(!x)throw Error(r(189))}}if(i.alternate!==o)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?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"),S=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),j=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function F(e){return e===null||typeof e!="object"?null:(e=G&&e[G]||e["@@iterator"],typeof e=="function"?e:null)}var H=Symbol.for("react.client.reference");function ie(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===H?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _:return"Fragment";case C:return"Profiler";case D:return"StrictMode";case V:return"Suspense";case q:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case j:return e.displayName||"Context";case A: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 N:return n=e.displayName||null,n!==null?n:ie(e.type)||"Memo";case le:n=e._payload,e=e._init;try{return ie(e(n))}catch{}}return null}var J=Array.isArray,B=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},pe=[],R=-1;function O(e){return{current:e}}function W(e){0>R||(e.current=pe[R],pe[R]=null,R--)}function k(e,n){R++,pe[R]=e.current,e.current=n}var de=O(null),ye=O(null),Te=O(null),ze=O(null);function be(e,n){switch(k(Te,n),k(ye,e),k(de,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Ig(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Ig(n),e=qg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}W(de),k(de,e)}function Oe(){W(de),W(ye),W(Te)}function At(e){e.memoizedState!==null&&k(ze,e);var n=de.current,i=qg(n,e.type);n!==i&&(k(ye,e),k(de,i))}function vn(e){ye.current===e&&(W(de),W(ye)),ze.current===e&&(W(ze),Or._currentValue=ce)}var Et,Yt;function Qt(e){if(Et===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);Et=n&&n[1]||"",Yt=-1<i.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Et+e+Yt}var nn=!1;function Pt(e,n){if(!e||nn)return"";nn=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(ne){var Z=ne}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(ne){Z=ne}e.call(ue.prototype)}}else{try{throw Error()}catch(ne){Z=ne}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(ne){if(ne&&Z&&typeof ne.stack=="string")return[ne.stack,Z.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=o.DetermineComponentFrameRoot(),x=h[0],w=h[1];if(x&&w){var z=x.split(`
4
- `),K=w.split(`
5
- `);for(f=o=0;o<z.length&&!z[o].includes("DetermineComponentFrameRoot");)o++;for(;f<K.length&&!K[f].includes("DetermineComponentFrameRoot");)f++;if(o===z.length||f===K.length)for(o=z.length-1,f=K.length-1;1<=o&&0<=f&&z[o]!==K[f];)f--;for(;1<=o&&0<=f;o--,f--)if(z[o]!==K[f]){if(o!==1||f!==1)do if(o--,f--,0>f||z[o]!==K[f]){var re=`
6
- `+z[o].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=o&&0<=f);break}}}finally{nn=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Qt(i):""}function dl(e,n){switch(e.tag){case 26:case 27:case 5:return Qt(e.type);case 16:return Qt("Lazy");case 13:return e.child!==n&&n!==null?Qt("Suspense Fallback"):Qt("Suspense");case 19:return Qt("SuspenseList");case 0:case 15:return Pt(e.type,!1);case 11:return Pt(e.type.render,!1);case 1:return Pt(e.type,!0);case 31:return Qt("Activity");default:return""}}function Dn(e){try{var n="",i=null;do n+=dl(e,i),i=e,e=e.return;while(e);return n}catch(o){return`
7
- Error generating stack: `+o.message+`
8
- `+o.stack}}var bn=Object.prototype.hasOwnProperty,Nn=t.unstable_scheduleCallback,hl=t.unstable_cancelCallback,Wl=t.unstable_shouldYield,Oa=t.unstable_requestPaint,pt=t.unstable_now,cn=t.unstable_getCurrentPriorityLevel,ae=t.unstable_ImmediatePriority,he=t.unstable_UserBlockingPriority,Ae=t.unstable_NormalPriority,Ue=t.unstable_LowPriority,Je=t.unstable_IdlePriority,qt=t.log,ln=t.unstable_setDisableYieldValue,Rt=null,at=null;function gt(e){if(typeof qt=="function"&&ln(e),at&&typeof at.setStrictMode=="function")try{at.setStrictMode(Rt,e)}catch{}}var Ve=Math.clz32?Math.clz32:ai,fn=Math.log,Kt=Math.LN2;function ai(e){return e>>>=0,e===0?32:31-(fn(e)/Kt|0)|0}var xn=256,Gn=262144,ml=4194304;function dn(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 Rl(e,n,i){var o=e.pendingLanes;if(o===0)return 0;var f=0,h=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var w=o&134217727;return w!==0?(o=w&~h,o!==0?f=dn(o):(x&=w,x!==0?f=dn(x):i||(i=w&~e,i!==0&&(f=dn(i))))):(w=o&~h,w!==0?f=dn(w):x!==0?f=dn(x):i||(i=o&~e,i!==0&&(f=dn(i)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,i=n&-n,h>=i||h===32&&(i&4194048)!==0)?n:f}function Dl(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function kt(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 Sn(){var e=ml;return ml<<=1,(ml&62914560)===0&&(ml=4194304),e}function pl(e){for(var n=[],i=0;31>i;i++)n.push(e);return n}function il(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ma(e,n,i,o,f,h){var x=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var w=e.entanglements,z=e.expirationTimes,K=e.hiddenUpdates;for(i=x&~i;0<i;){var re=31-Ve(i),ue=1<<re;w[re]=0,z[re]=-1;var Z=K[re];if(Z!==null)for(K[re]=null,re=0;re<Z.length;re++){var ne=Z[re];ne!==null&&(ne.lane&=-536870913)}i&=~ue}o!==0&&za(e,o,0),h!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=h&~(x&~n))}function za(e,n,i){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-Ve(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|i&261930}function M(e,n){var i=e.entangledLanes|=n;for(e=e.entanglements;i;){var o=31-Ve(i),f=1<<o;f&n|e[o]&n&&(e[o]|=n),i&=~f}}function Y(e,n){var i=n&-n;return i=(i&42)!==0?1:$(i),(i&(e.suspendedLanes|n))!==0?0:i}function $(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 fe(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ve(){var e=te.p;return e!==0?e:(e=window.event,e===void 0?32:cy(e.type))}function _e(e,n){var i=te.p;try{return te.p=e,n()}finally{te.p=i}}var we=Math.random().toString(36).slice(2),Se="__reactFiber$"+we,xe="__reactProps$"+we,Ce="__reactContainer$"+we,Ne="__reactEvents$"+we,De="__reactListeners$"+we,Xe="__reactHandles$"+we,$e="__reactResources$"+we,Ee="__reactMarker$"+we;function U(e){delete e[Se],delete e[xe],delete e[Ne],delete e[De],delete e[Xe]}function se(e){var n=e[Se];if(n)return n;for(var i=e.parentNode;i;){if(n=i[Ce]||i[Se]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(e=$g(e);e!==null;){if(i=e[Se])return i;e=$g(e)}return n}e=i,i=e.parentNode}return null}function me(e){if(e=e[Se]||e[Ce]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Ie(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function ut(e){var n=e[$e];return n||(n=e[$e]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Be(e){e[Ee]=!0}var xt=new Set,_t={};function Vt(e,n){an(e,n),an(e+"Capture",n)}function an(e,n){for(_t[e]=n,e=0;e<n.length;e++)xt.add(n[e])}var yt=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]*$"),gl={},yl={};function tt(e){return bn.call(yl,e)?!0:bn.call(gl,e)?!1:yt.test(e)?yl[e]=!0:(gl[e]=!0,!1)}function jt(e,n,i){if(tt(n))if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+i)}}function rl(e,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+i)}}function Zt(e,n,i,o){if(o===null)e.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(n,i,""+o)}}function nt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function La(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function xo(e,n,i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,h=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(x){i=""+x,h.call(this,x)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(x){i=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Qi(e){if(!e._valueTracker){var n=La(e)?"checked":"value";e._valueTracker=xo(e,n,""+e[n])}}function Oh(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),o="";return e&&(o=La(e)?e.checked?"true":"false":e.value),e=o,e!==i?(n.setValue(e),!0):!1}function So(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 Sx=/[\n"\\]/g;function Yn(e){return e.replace(Sx,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function xs(e,n,i,o,f,h,x,w){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),n!=null?x==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+nt(n)):e.value!==""+nt(n)&&(e.value=""+nt(n)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),n!=null?Ss(e,x,nt(n)):i!=null?Ss(e,x,nt(i)):o!=null&&e.removeAttribute("value"),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+nt(w):e.removeAttribute("name")}function Mh(e,n,i,o,f,h,x,w){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||i!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){Qi(e);return}i=i!=null?""+nt(i):"",n=n!=null?""+nt(n):i,w||n===e.value||(e.value=n),e.defaultValue=n}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=w?e.checked:!!o,e.defaultChecked=!!o,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Qi(e)}function Ss(e,n,i){n==="number"&&So(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ii(e,n,i,o){if(e=e.options,n){n={};for(var f=0;f<i.length;f++)n["$"+i[f]]=!0;for(i=0;i<e.length;i++)f=n.hasOwnProperty("$"+e[i].value),e[i].selected!==f&&(e[i].selected=f),f&&o&&(e[i].defaultSelected=!0)}else{for(i=""+nt(i),n=null,f=0;f<e.length;f++){if(e[f].value===i){e[f].selected=!0,o&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function zh(e,n,i){if(n!=null&&(n=""+nt(n),n!==e.value&&(e.value=n),i==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=i!=null?""+nt(i):""}function Lh(e,n,i,o){if(n==null){if(o!=null){if(i!=null)throw Error(r(92));if(J(o)){if(1<o.length)throw Error(r(93));o=o[0]}i=o}i==null&&(i=""),n=i}i=nt(n),e.defaultValue=i,o=e.textContent,o===i&&o!==""&&o!==null&&(e.value=o),Qi(e)}function ri(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var Ex=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 Uh(e,n,i){var o=n.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,i):typeof i!="number"||i===0||Ex.has(n)?n==="float"?e.cssFloat=i:e[n]=(""+i).trim():e[n]=i+"px"}function Bh(e,n,i){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,i!=null){for(var o in i)!i.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var f in n)o=n[f],n.hasOwnProperty(f)&&i[f]!==o&&Uh(e,f,o)}else for(var h in n)n.hasOwnProperty(h)&&Uh(e,h,n[h])}function Es(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 wx=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"]]),Tx=/^[\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 Eo(e){return Tx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Nl(){}var ws=null;function Ts(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var oi=null,ui=null;function Hh(e){var n=me(e);if(n&&(e=n.stateNode)){var i=e[xe]||null;e:switch(e=n.stateNode,n.type){case"input":if(xs(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),n=i.name,i.type==="radio"&&n!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Yn(""+n)+'"][type="radio"]'),n=0;n<i.length;n++){var o=i[n];if(o!==e&&o.form===e.form){var f=o[xe]||null;if(!f)throw Error(r(90));xs(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<i.length;n++)o=i[n],o.form===e.form&&Oh(o)}break e;case"textarea":zh(e,i.value,i.defaultValue);break e;case"select":n=i.value,n!=null&&ii(e,!!i.multiple,n,!1)}}}var ks=!1;function Ih(e,n,i){if(ks)return e(n,i);ks=!0;try{var o=e(n);return o}finally{if(ks=!1,(oi!==null||ui!==null)&&(su(),oi&&(n=oi,e=ui,ui=oi=null,Hh(n),e)))for(n=0;n<e.length;n++)Hh(e[n])}}function Ki(e,n){var i=e.stateNode;if(i===null)return null;var o=i[xe]||null;if(o===null)return null;i=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(r(231,n,typeof i));return i}var jl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cs=!1;if(jl)try{var Zi={};Object.defineProperty(Zi,"passive",{get:function(){Cs=!0}}),window.addEventListener("test",Zi,Zi),window.removeEventListener("test",Zi,Zi)}catch{Cs=!1}var ea=null,As=null,wo=null;function qh(){if(wo)return wo;var e,n=As,i=n.length,o,f="value"in ea?ea.value:ea.textContent,h=f.length;for(e=0;e<i&&n[e]===f[e];e++);var x=i-e;for(o=1;o<=x&&n[i-o]===f[h-o];o++);return wo=f.slice(e,1<o?1-o:void 0)}function To(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 ko(){return!0}function Fh(){return!1}function En(e){function n(i,o,f,h,x){this._reactName=i,this._targetInst=f,this.type=o,this.nativeEvent=h,this.target=x,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(i=e[w],this[w]=i?i(h):h[w]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?ko:Fh,this.isPropagationStopped=Fh,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=ko)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=ko)},persist:function(){},isPersistent:ko}),n}var Ua={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Co=En(Ua),Ji=g({},Ua,{view:0,detail:0}),kx=En(Ji),_s,Rs,Wi,Ao=g({},Ji,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ns,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!==Wi&&(Wi&&e.type==="mousemove"?(_s=e.screenX-Wi.screenX,Rs=e.screenY-Wi.screenY):Rs=_s=0,Wi=e),_s)},movementY:function(e){return"movementY"in e?e.movementY:Rs}}),Gh=En(Ao),Cx=g({},Ao,{dataTransfer:0}),Ax=En(Cx),_x=g({},Ji,{relatedTarget:0}),Ds=En(_x),Rx=g({},Ua,{animationName:0,elapsedTime:0,pseudoElement:0}),Dx=En(Rx),Nx=g({},Ua,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jx=En(Nx),Ox=g({},Ua,{data:0}),Yh=En(Ox),Mx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zx={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"},Lx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ux(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Lx[e])?!!n[e]:!1}function Ns(){return Ux}var Bx=g({},Ji,{key:function(e){if(e.key){var n=Mx[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=To(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?zx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ns,charCode:function(e){return e.type==="keypress"?To(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?To(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Hx=En(Bx),Ix=g({},Ao,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ph=En(Ix),qx=g({},Ji,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ns}),Fx=En(qx),Gx=g({},Ua,{propertyName:0,elapsedTime:0,pseudoElement:0}),Yx=En(Gx),Px=g({},Ao,{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}),Vx=En(Px),Xx=g({},Ua,{newState:0,oldState:0}),$x=En(Xx),Qx=[9,13,27,32],js=jl&&"CompositionEvent"in window,er=null;jl&&"documentMode"in document&&(er=document.documentMode);var Kx=jl&&"TextEvent"in window&&!er,Vh=jl&&(!js||er&&8<er&&11>=er),Xh=" ",$h=!1;function Qh(e,n){switch(e){case"keyup":return Qx.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var si=!1;function Zx(e,n){switch(e){case"compositionend":return Kh(n);case"keypress":return n.which!==32?null:($h=!0,Xh);case"textInput":return e=n.data,e===Xh&&$h?null:e;default:return null}}function Jx(e,n){if(si)return e==="compositionend"||!js&&Qh(e,n)?(e=qh(),wo=As=ea=null,si=!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 Vh&&n.locale!=="ko"?null:n.data;default:return null}}var Wx={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 Zh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Wx[e.type]:n==="textarea"}function Jh(e,n,i,o){oi?ui?ui.push(o):ui=[o]:oi=o,n=gu(n,"onChange"),0<n.length&&(i=new Co("onChange","change",null,i,o),e.push({event:i,listeners:n}))}var tr=null,nr=null;function e1(e){Mg(e,0)}function _o(e){var n=Ie(e);if(Oh(n))return e}function Wh(e,n){if(e==="change")return n}var em=!1;if(jl){var Os;if(jl){var Ms="oninput"in document;if(!Ms){var tm=document.createElement("div");tm.setAttribute("oninput","return;"),Ms=typeof tm.oninput=="function"}Os=Ms}else Os=!1;em=Os&&(!document.documentMode||9<document.documentMode)}function nm(){tr&&(tr.detachEvent("onpropertychange",lm),nr=tr=null)}function lm(e){if(e.propertyName==="value"&&_o(nr)){var n=[];Jh(n,nr,e,Ts(e)),Ih(e1,n)}}function t1(e,n,i){e==="focusin"?(nm(),tr=n,nr=i,tr.attachEvent("onpropertychange",lm)):e==="focusout"&&nm()}function n1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _o(nr)}function l1(e,n){if(e==="click")return _o(n)}function a1(e,n){if(e==="input"||e==="change")return _o(n)}function i1(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var jn=typeof Object.is=="function"?Object.is:i1;function lr(e,n){if(jn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var i=Object.keys(e),o=Object.keys(n);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var f=i[o];if(!bn.call(n,f)||!jn(e[f],n[f]))return!1}return!0}function am(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function im(e,n){var i=am(e);e=0;for(var o;i;){if(i.nodeType===3){if(o=e+i.textContent.length,e<=n&&o>=n)return{node:i,offset:n-e};e=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=am(i)}}function rm(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?rm(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function om(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=So(e.document);n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=So(e.document)}return n}function zs(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 r1=jl&&"documentMode"in document&&11>=document.documentMode,ci=null,Ls=null,ar=null,Us=!1;function um(e,n,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Us||ci==null||ci!==So(o)||(o=ci,"selectionStart"in o&&zs(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),ar&&lr(ar,o)||(ar=o,o=gu(Ls,"onSelect"),0<o.length&&(n=new Co("onSelect","select",null,n,i),e.push({event:n,listeners:o}),n.target=ci)))}function Ba(e,n){var i={};return i[e.toLowerCase()]=n.toLowerCase(),i["Webkit"+e]="webkit"+n,i["Moz"+e]="moz"+n,i}var fi={animationend:Ba("Animation","AnimationEnd"),animationiteration:Ba("Animation","AnimationIteration"),animationstart:Ba("Animation","AnimationStart"),transitionrun:Ba("Transition","TransitionRun"),transitionstart:Ba("Transition","TransitionStart"),transitioncancel:Ba("Transition","TransitionCancel"),transitionend:Ba("Transition","TransitionEnd")},Bs={},sm={};jl&&(sm=document.createElement("div").style,"AnimationEvent"in window||(delete fi.animationend.animation,delete fi.animationiteration.animation,delete fi.animationstart.animation),"TransitionEvent"in window||delete fi.transitionend.transition);function Ha(e){if(Bs[e])return Bs[e];if(!fi[e])return e;var n=fi[e],i;for(i in n)if(n.hasOwnProperty(i)&&i in sm)return Bs[e]=n[i];return e}var cm=Ha("animationend"),fm=Ha("animationiteration"),dm=Ha("animationstart"),o1=Ha("transitionrun"),u1=Ha("transitionstart"),s1=Ha("transitioncancel"),hm=Ha("transitionend"),mm=new Map,Hs="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(" ");Hs.push("scrollEnd");function ol(e,n){mm.set(e,n),Vt(n,[e])}var Ro=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)},Pn=[],di=0,Is=0;function Do(){for(var e=di,n=Is=di=0;n<e;){var i=Pn[n];Pn[n++]=null;var o=Pn[n];Pn[n++]=null;var f=Pn[n];Pn[n++]=null;var h=Pn[n];if(Pn[n++]=null,o!==null&&f!==null){var x=o.pending;x===null?f.next=f:(f.next=x.next,x.next=f),o.pending=f}h!==0&&pm(i,f,h)}}function No(e,n,i,o){Pn[di++]=e,Pn[di++]=n,Pn[di++]=i,Pn[di++]=o,Is|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function qs(e,n,i,o){return No(e,n,i,o),jo(e)}function Ia(e,n){return No(e,null,null,n),jo(e)}function pm(e,n,i){e.lanes|=i;var o=e.alternate;o!==null&&(o.lanes|=i);for(var f=!1,h=e.return;h!==null;)h.childLanes|=i,o=h.alternate,o!==null&&(o.childLanes|=i),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-Ve(i),e=h.hiddenUpdates,o=e[f],o===null?e[f]=[n]:o.push(n),n.lane=i|536870912),h):null}function jo(e){if(50<Cr)throw Cr=0,Kc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var hi={};function c1(e,n,i,o){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function On(e,n,i,o){return new c1(e,n,i,o)}function Fs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ol(e,n){var i=e.alternate;return i===null?(i=On(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function gm(e,n){e.flags&=65011714;var i=e.alternate;return i===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=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,n=i.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Oo(e,n,i,o,f,h){var x=0;if(o=e,typeof e=="function")Fs(e)&&(x=1);else if(typeof e=="string")x=pS(e,i,de.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X:return e=On(31,i,n,f),e.elementType=X,e.lanes=h,e;case _:return qa(i.children,f,h,n);case D:x=8,f|=24;break;case C:return e=On(12,i,n,f|2),e.elementType=C,e.lanes=h,e;case V:return e=On(13,i,n,f),e.elementType=V,e.lanes=h,e;case q:return e=On(19,i,n,f),e.elementType=q,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case j:x=10;break e;case A:x=9;break e;case ee:x=11;break e;case N:x=14;break e;case le:x=16,o=null;break e}x=29,i=Error(r(130,e===null?"null":typeof e,"")),o=null}return n=On(x,i,n,f),n.elementType=e,n.type=o,n.lanes=h,n}function qa(e,n,i,o){return e=On(7,e,o,n),e.lanes=i,e}function Gs(e,n,i){return e=On(6,e,null,n),e.lanes=i,e}function ym(e){var n=On(18,null,null,0);return n.stateNode=e,n}function Ys(e,n,i){return n=On(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var vm=new WeakMap;function Vn(e,n){if(typeof e=="object"&&e!==null){var i=vm.get(e);return i!==void 0?i:(n={value:e,source:n,stack:Dn(n)},vm.set(e,n),n)}return{value:e,source:n,stack:Dn(n)}}var mi=[],pi=0,Mo=null,ir=0,Xn=[],$n=0,ta=null,vl=1,bl="";function Ml(e,n){mi[pi++]=ir,mi[pi++]=Mo,Mo=e,ir=n}function bm(e,n,i){Xn[$n++]=vl,Xn[$n++]=bl,Xn[$n++]=ta,ta=e;var o=vl;e=bl;var f=32-Ve(o)-1;o&=~(1<<f),i+=1;var h=32-Ve(n)+f;if(30<h){var x=f-f%5;h=(o&(1<<x)-1).toString(32),o>>=x,f-=x,vl=1<<32-Ve(n)+f|i<<f|o,bl=h+e}else vl=1<<h|i<<f|o,bl=e}function Ps(e){e.return!==null&&(Ml(e,1),bm(e,1,0))}function Vs(e){for(;e===Mo;)Mo=mi[--pi],mi[pi]=null,ir=mi[--pi],mi[pi]=null;for(;e===ta;)ta=Xn[--$n],Xn[$n]=null,bl=Xn[--$n],Xn[$n]=null,vl=Xn[--$n],Xn[$n]=null}function xm(e,n){Xn[$n++]=vl,Xn[$n++]=bl,Xn[$n++]=ta,vl=n.id,bl=n.overflow,ta=e}var Jt=null,wt=null,lt=!1,na=null,Qn=!1,Xs=Error(r(519));function la(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw rr(Vn(n,e)),Xs}function Sm(e){var n=e.stateNode,i=e.type,o=e.memoizedProps;switch(n[Se]=e,n[xe]=o,i){case"dialog":Ke("cancel",n),Ke("close",n);break;case"iframe":case"object":case"embed":Ke("load",n);break;case"video":case"audio":for(i=0;i<_r.length;i++)Ke(_r[i],n);break;case"source":Ke("error",n);break;case"img":case"image":case"link":Ke("error",n),Ke("load",n);break;case"details":Ke("toggle",n);break;case"input":Ke("invalid",n),Mh(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Ke("invalid",n);break;case"textarea":Ke("invalid",n),Lh(n,o.value,o.defaultValue,o.children)}i=o.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||n.textContent===""+i||o.suppressHydrationWarning===!0||Bg(n.textContent,i)?(o.popover!=null&&(Ke("beforetoggle",n),Ke("toggle",n)),o.onScroll!=null&&Ke("scroll",n),o.onScrollEnd!=null&&Ke("scrollend",n),o.onClick!=null&&(n.onclick=Nl),n=!0):n=!1,n||la(e,!0)}function Em(e){for(Jt=e.return;Jt;)switch(Jt.tag){case 5:case 31:case 13:Qn=!1;return;case 27:case 3:Qn=!0;return;default:Jt=Jt.return}}function gi(e){if(e!==Jt)return!1;if(!lt)return Em(e),lt=!0,!1;var n=e.tag,i;if((i=n!==3&&n!==27)&&((i=n===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||df(e.type,e.memoizedProps)),i=!i),i&&wt&&la(e),Em(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));wt=Xg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));wt=Xg(e)}else n===27?(n=wt,ya(e.type)?(e=yf,yf=null,wt=e):wt=n):wt=Jt?Zn(e.stateNode.nextSibling):null;return!0}function Fa(){wt=Jt=null,lt=!1}function $s(){var e=na;return e!==null&&(Cn===null?Cn=e:Cn.push.apply(Cn,e),na=null),e}function rr(e){na===null?na=[e]:na.push(e)}var Qs=O(null),Ga=null,zl=null;function aa(e,n,i){k(Qs,n._currentValue),n._currentValue=i}function Ll(e){e._currentValue=Qs.current,W(Qs)}function Ks(e,n,i){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===i)break;e=e.return}}function Zs(e,n,i,o){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var h=f.dependencies;if(h!==null){var x=f.child;h=h.firstContext;e:for(;h!==null;){var w=h;h=f;for(var z=0;z<n.length;z++)if(w.context===n[z]){h.lanes|=i,w=h.alternate,w!==null&&(w.lanes|=i),Ks(h.return,i,e),o||(x=null);break e}h=w.next}}else if(f.tag===18){if(x=f.return,x===null)throw Error(r(341));x.lanes|=i,h=x.alternate,h!==null&&(h.lanes|=i),Ks(x,i,e),x=null}else x=f.child;if(x!==null)x.return=f;else for(x=f;x!==null;){if(x===e){x=null;break}if(f=x.sibling,f!==null){f.return=x.return,x=f;break}x=x.return}f=x}}function yi(e,n,i,o){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 x=f.alternate;if(x===null)throw Error(r(387));if(x=x.memoizedProps,x!==null){var w=f.type;jn(f.pendingProps.value,x.value)||(e!==null?e.push(w):e=[w])}}else if(f===ze.current){if(x=f.alternate,x===null)throw Error(r(387));x.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Or):e=[Or])}f=f.return}e!==null&&Zs(n,e,i,o),n.flags|=262144}function zo(e){for(e=e.firstContext;e!==null;){if(!jn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ya(e){Ga=e,zl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Wt(e){return wm(Ga,e)}function Lo(e,n){return Ga===null&&Ya(e),wm(e,n)}function wm(e,n){var i=n._currentValue;if(n={context:n,memoizedValue:i,next:null},zl===null){if(e===null)throw Error(r(308));zl=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else zl=zl.next=n;return i}var f1=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(i,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(i){return i()})}},d1=t.unstable_scheduleCallback,h1=t.unstable_NormalPriority,Lt={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Js(){return{controller:new f1,data:new Map,refCount:0}}function or(e){e.refCount--,e.refCount===0&&d1(h1,function(){e.controller.abort()})}var ur=null,Ws=0,vi=0,bi=null;function m1(e,n){if(ur===null){var i=ur=[];Ws=0,vi=nf(),bi={status:"pending",value:void 0,then:function(o){i.push(o)}}}return Ws++,n.then(Tm,Tm),n}function Tm(){if(--Ws===0&&ur!==null){bi!==null&&(bi.status="fulfilled");var e=ur;ur=null,vi=0,bi=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function p1(e,n){var i=[],o={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var f=0;f<i.length;f++)(0,i[f])(n)},function(f){for(o.status="rejected",o.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),o}var km=B.S;B.S=function(e,n){ug=pt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&m1(e,n),km!==null&&km(e,n)};var Pa=O(null);function ec(){var e=Pa.current;return e!==null?e:vt.pooledCache}function Uo(e,n){n===null?k(Pa,Pa.current):k(Pa,n.pool)}function Cm(){var e=ec();return e===null?null:{parent:Lt._currentValue,pool:e}}var xi=Error(r(460)),tc=Error(r(474)),Bo=Error(r(542)),Ho={then:function(){}};function Am(e){return e=e.status,e==="fulfilled"||e==="rejected"}function _m(e,n,i){switch(i=e[i],i===void 0?e.push(n):i!==n&&(n.then(Nl,Nl),n=i),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Dm(e),e;default:if(typeof n.status=="string")n.then(Nl,Nl);else{if(e=vt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(o){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=o}},function(o){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Dm(e),e}throw Xa=n,xi}}function Va(e){try{var n=e._init;return n(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Xa=i,xi):i}}var Xa=null;function Rm(){if(Xa===null)throw Error(r(459));var e=Xa;return Xa=null,e}function Dm(e){if(e===xi||e===Bo)throw Error(r(483))}var Si=null,sr=0;function Io(e){var n=sr;return sr+=1,Si===null&&(Si=[]),_m(Si,e,n)}function cr(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function qo(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 Nm(e){function n(P,I){if(e){var Q=P.deletions;Q===null?(P.deletions=[I],P.flags|=16):Q.push(I)}}function i(P,I){if(!e)return null;for(;I!==null;)n(P,I),I=I.sibling;return null}function o(P){for(var I=new Map;P!==null;)P.key!==null?I.set(P.key,P):I.set(P.index,P),P=P.sibling;return I}function f(P,I){return P=Ol(P,I),P.index=0,P.sibling=null,P}function h(P,I,Q){return P.index=Q,e?(Q=P.alternate,Q!==null?(Q=Q.index,Q<I?(P.flags|=67108866,I):Q):(P.flags|=67108866,I)):(P.flags|=1048576,I)}function x(P){return e&&P.alternate===null&&(P.flags|=67108866),P}function w(P,I,Q,oe){return I===null||I.tag!==6?(I=Gs(Q,P.mode,oe),I.return=P,I):(I=f(I,Q),I.return=P,I)}function z(P,I,Q,oe){var je=Q.type;return je===_?re(P,I,Q.props.children,oe,Q.key):I!==null&&(I.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===le&&Va(je)===I.type)?(I=f(I,Q.props),cr(I,Q),I.return=P,I):(I=Oo(Q.type,Q.key,Q.props,null,P.mode,oe),cr(I,Q),I.return=P,I)}function K(P,I,Q,oe){return I===null||I.tag!==4||I.stateNode.containerInfo!==Q.containerInfo||I.stateNode.implementation!==Q.implementation?(I=Ys(Q,P.mode,oe),I.return=P,I):(I=f(I,Q.children||[]),I.return=P,I)}function re(P,I,Q,oe,je){return I===null||I.tag!==7?(I=qa(Q,P.mode,oe,je),I.return=P,I):(I=f(I,Q),I.return=P,I)}function ue(P,I,Q){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return I=Gs(""+I,P.mode,Q),I.return=P,I;if(typeof I=="object"&&I!==null){switch(I.$$typeof){case S:return Q=Oo(I.type,I.key,I.props,null,P.mode,Q),cr(Q,I),Q.return=P,Q;case E:return I=Ys(I,P.mode,Q),I.return=P,I;case le:return I=Va(I),ue(P,I,Q)}if(J(I)||F(I))return I=qa(I,P.mode,Q,null),I.return=P,I;if(typeof I.then=="function")return ue(P,Io(I),Q);if(I.$$typeof===j)return ue(P,Lo(P,I),Q);qo(P,I)}return null}function Z(P,I,Q,oe){var je=I!==null?I.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return je!==null?null:w(P,I,""+Q,oe);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case S:return Q.key===je?z(P,I,Q,oe):null;case E:return Q.key===je?K(P,I,Q,oe):null;case le:return Q=Va(Q),Z(P,I,Q,oe)}if(J(Q)||F(Q))return je!==null?null:re(P,I,Q,oe,null);if(typeof Q.then=="function")return Z(P,I,Io(Q),oe);if(Q.$$typeof===j)return Z(P,I,Lo(P,Q),oe);qo(P,Q)}return null}function ne(P,I,Q,oe,je){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return P=P.get(Q)||null,w(I,P,""+oe,je);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case S:return P=P.get(oe.key===null?Q:oe.key)||null,z(I,P,oe,je);case E:return P=P.get(oe.key===null?Q:oe.key)||null,K(I,P,oe,je);case le:return oe=Va(oe),ne(P,I,Q,oe,je)}if(J(oe)||F(oe))return P=P.get(Q)||null,re(I,P,oe,je,null);if(typeof oe.then=="function")return ne(P,I,Q,Io(oe),je);if(oe.$$typeof===j)return ne(P,I,Q,Lo(I,oe),je);qo(I,oe)}return null}function ke(P,I,Q,oe){for(var je=null,rt=null,Re=I,Fe=I=0,et=null;Re!==null&&Fe<Q.length;Fe++){Re.index>Fe?(et=Re,Re=null):et=Re.sibling;var ot=Z(P,Re,Q[Fe],oe);if(ot===null){Re===null&&(Re=et);break}e&&Re&&ot.alternate===null&&n(P,Re),I=h(ot,I,Fe),rt===null?je=ot:rt.sibling=ot,rt=ot,Re=et}if(Fe===Q.length)return i(P,Re),lt&&Ml(P,Fe),je;if(Re===null){for(;Fe<Q.length;Fe++)Re=ue(P,Q[Fe],oe),Re!==null&&(I=h(Re,I,Fe),rt===null?je=Re:rt.sibling=Re,rt=Re);return lt&&Ml(P,Fe),je}for(Re=o(Re);Fe<Q.length;Fe++)et=ne(Re,P,Fe,Q[Fe],oe),et!==null&&(e&&et.alternate!==null&&Re.delete(et.key===null?Fe:et.key),I=h(et,I,Fe),rt===null?je=et:rt.sibling=et,rt=et);return e&&Re.forEach(function(Ea){return n(P,Ea)}),lt&&Ml(P,Fe),je}function Le(P,I,Q,oe){if(Q==null)throw Error(r(151));for(var je=null,rt=null,Re=I,Fe=I=0,et=null,ot=Q.next();Re!==null&&!ot.done;Fe++,ot=Q.next()){Re.index>Fe?(et=Re,Re=null):et=Re.sibling;var Ea=Z(P,Re,ot.value,oe);if(Ea===null){Re===null&&(Re=et);break}e&&Re&&Ea.alternate===null&&n(P,Re),I=h(Ea,I,Fe),rt===null?je=Ea:rt.sibling=Ea,rt=Ea,Re=et}if(ot.done)return i(P,Re),lt&&Ml(P,Fe),je;if(Re===null){for(;!ot.done;Fe++,ot=Q.next())ot=ue(P,ot.value,oe),ot!==null&&(I=h(ot,I,Fe),rt===null?je=ot:rt.sibling=ot,rt=ot);return lt&&Ml(P,Fe),je}for(Re=o(Re);!ot.done;Fe++,ot=Q.next())ot=ne(Re,P,Fe,ot.value,oe),ot!==null&&(e&&ot.alternate!==null&&Re.delete(ot.key===null?Fe:ot.key),I=h(ot,I,Fe),rt===null?je=ot:rt.sibling=ot,rt=ot);return e&&Re.forEach(function(CS){return n(P,CS)}),lt&&Ml(P,Fe),je}function mt(P,I,Q,oe){if(typeof Q=="object"&&Q!==null&&Q.type===_&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case S:e:{for(var je=Q.key;I!==null;){if(I.key===je){if(je=Q.type,je===_){if(I.tag===7){i(P,I.sibling),oe=f(I,Q.props.children),oe.return=P,P=oe;break e}}else if(I.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===le&&Va(je)===I.type){i(P,I.sibling),oe=f(I,Q.props),cr(oe,Q),oe.return=P,P=oe;break e}i(P,I);break}else n(P,I);I=I.sibling}Q.type===_?(oe=qa(Q.props.children,P.mode,oe,Q.key),oe.return=P,P=oe):(oe=Oo(Q.type,Q.key,Q.props,null,P.mode,oe),cr(oe,Q),oe.return=P,P=oe)}return x(P);case E:e:{for(je=Q.key;I!==null;){if(I.key===je)if(I.tag===4&&I.stateNode.containerInfo===Q.containerInfo&&I.stateNode.implementation===Q.implementation){i(P,I.sibling),oe=f(I,Q.children||[]),oe.return=P,P=oe;break e}else{i(P,I);break}else n(P,I);I=I.sibling}oe=Ys(Q,P.mode,oe),oe.return=P,P=oe}return x(P);case le:return Q=Va(Q),mt(P,I,Q,oe)}if(J(Q))return ke(P,I,Q,oe);if(F(Q)){if(je=F(Q),typeof je!="function")throw Error(r(150));return Q=je.call(Q),Le(P,I,Q,oe)}if(typeof Q.then=="function")return mt(P,I,Io(Q),oe);if(Q.$$typeof===j)return mt(P,I,Lo(P,Q),oe);qo(P,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,I!==null&&I.tag===6?(i(P,I.sibling),oe=f(I,Q),oe.return=P,P=oe):(i(P,I),oe=Gs(Q,P.mode,oe),oe.return=P,P=oe),x(P)):i(P,I)}return function(P,I,Q,oe){try{sr=0;var je=mt(P,I,Q,oe);return Si=null,je}catch(Re){if(Re===xi||Re===Bo)throw Re;var rt=On(29,Re,null,P.mode);return rt.lanes=oe,rt.return=P,rt}}}var $a=Nm(!0),jm=Nm(!1),ia=!1;function nc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lc(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 ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function oa(e,n,i){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(st&2)!==0){var f=o.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),o.pending=n,n=jo(e),pm(e,null,i),n}return No(e,o,n,i),jo(e)}function fr(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,i|=o,n.lanes=i,M(e,i)}}function ac(e,n){var i=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var f=null,h=null;if(i=i.firstBaseUpdate,i!==null){do{var x={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};h===null?f=h=x:h=h.next=x,i=i.next}while(i!==null);h===null?f=h=n:h=h.next=n}else f=h=n;i={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:o.shared,callbacks:o.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}var ic=!1;function dr(){if(ic){var e=bi;if(e!==null)throw e}}function hr(e,n,i,o){ic=!1;var f=e.updateQueue;ia=!1;var h=f.firstBaseUpdate,x=f.lastBaseUpdate,w=f.shared.pending;if(w!==null){f.shared.pending=null;var z=w,K=z.next;z.next=null,x===null?h=K:x.next=K,x=z;var re=e.alternate;re!==null&&(re=re.updateQueue,w=re.lastBaseUpdate,w!==x&&(w===null?re.firstBaseUpdate=K:w.next=K,re.lastBaseUpdate=z))}if(h!==null){var ue=f.baseState;x=0,re=K=z=null,w=h;do{var Z=w.lane&-536870913,ne=Z!==w.lane;if(ne?(We&Z)===Z:(o&Z)===Z){Z!==0&&Z===vi&&(ic=!0),re!==null&&(re=re.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var ke=e,Le=w;Z=n;var mt=i;switch(Le.tag){case 1:if(ke=Le.payload,typeof ke=="function"){ue=ke.call(mt,ue,Z);break e}ue=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Le.payload,Z=typeof ke=="function"?ke.call(mt,ue,Z):ke,Z==null)break e;ue=g({},ue,Z);break e;case 2:ia=!0}}Z=w.callback,Z!==null&&(e.flags|=64,ne&&(e.flags|=8192),ne=f.callbacks,ne===null?f.callbacks=[Z]:ne.push(Z))}else ne={lane:Z,tag:w.tag,payload:w.payload,callback:w.callback,next:null},re===null?(K=re=ne,z=ue):re=re.next=ne,x|=Z;if(w=w.next,w===null){if(w=f.shared.pending,w===null)break;ne=w,w=ne.next,ne.next=null,f.lastBaseUpdate=ne,f.shared.pending=null}}while(!0);re===null&&(z=ue),f.baseState=z,f.firstBaseUpdate=K,f.lastBaseUpdate=re,h===null&&(f.shared.lanes=0),da|=x,e.lanes=x,e.memoizedState=ue}}function Om(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Mm(e,n){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Om(i[e],n)}var Ei=O(null),Fo=O(0);function zm(e,n){e=Pl,k(Fo,e),k(Ei,n),Pl=e|n.baseLanes}function rc(){k(Fo,Pl),k(Ei,Ei.current)}function oc(){Pl=Fo.current,W(Ei),W(Fo)}var Mn=O(null),Kn=null;function ua(e){var n=e.alternate;k(Ot,Ot.current&1),k(Mn,e),Kn===null&&(n===null||Ei.current!==null||n.memoizedState!==null)&&(Kn=e)}function uc(e){k(Ot,Ot.current),k(Mn,e),Kn===null&&(Kn=e)}function Lm(e){e.tag===22?(k(Ot,Ot.current),k(Mn,e),Kn===null&&(Kn=e)):sa()}function sa(){k(Ot,Ot.current),k(Mn,Mn.current)}function zn(e){W(Mn),Kn===e&&(Kn=null),W(Ot)}var Ot=O(0);function Go(e){for(var n=e;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||pf(i)||gf(i)))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 Ul=0,qe=null,dt=null,Ut=null,Yo=!1,wi=!1,Qa=!1,Po=0,mr=0,Ti=null,g1=0;function Dt(){throw Error(r(321))}function sc(e,n){if(n===null)return!1;for(var i=0;i<n.length&&i<e.length;i++)if(!jn(e[i],n[i]))return!1;return!0}function cc(e,n,i,o,f,h){return Ul=h,qe=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,B.H=e===null||e.memoizedState===null?bp:kc,Qa=!1,h=i(o,f),Qa=!1,wi&&(h=Bm(n,i,o,f)),Um(e),h}function Um(e){B.H=yr;var n=dt!==null&&dt.next!==null;if(Ul=0,Ut=dt=qe=null,Yo=!1,mr=0,Ti=null,n)throw Error(r(300));e===null||Bt||(e=e.dependencies,e!==null&&zo(e)&&(Bt=!0))}function Bm(e,n,i,o){qe=e;var f=0;do{if(wi&&(Ti=null),mr=0,wi=!1,25<=f)throw Error(r(301));if(f+=1,Ut=dt=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}B.H=xp,h=n(i,o)}while(wi);return h}function y1(){var e=B.H,n=e.useState()[0];return n=typeof n.then=="function"?pr(n):n,e=e.useState()[0],(dt!==null?dt.memoizedState:null)!==e&&(qe.flags|=1024),n}function fc(){var e=Po!==0;return Po=0,e}function dc(e,n,i){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i}function hc(e){if(Yo){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Yo=!1}Ul=0,Ut=dt=qe=null,wi=!1,mr=Po=0,Ti=null}function hn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?qe.memoizedState=Ut=e:Ut=Ut.next=e,Ut}function Mt(){if(dt===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=dt.next;var n=Ut===null?qe.memoizedState:Ut.next;if(n!==null)Ut=n,dt=e;else{if(e===null)throw qe.alternate===null?Error(r(467)):Error(r(310));dt=e,e={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},Ut===null?qe.memoizedState=Ut=e:Ut=Ut.next=e}return Ut}function Vo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pr(e){var n=mr;return mr+=1,Ti===null&&(Ti=[]),e=_m(Ti,e,n),n=qe,(Ut===null?n.memoizedState:Ut.next)===null&&(n=n.alternate,B.H=n===null||n.memoizedState===null?bp:kc),e}function Xo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return pr(e);if(e.$$typeof===j)return Wt(e)}throw Error(r(438,String(e)))}function mc(e){var n=null,i=qe.updateQueue;if(i!==null&&(n=i.memoCache),n==null){var o=qe.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),i===null&&(i=Vo(),qe.updateQueue=i),i.memoCache=n,i=n.data[n.index],i===void 0)for(i=n.data[n.index]=Array(e),o=0;o<e;o++)i[o]=L;return n.index++,i}function Bl(e,n){return typeof n=="function"?n(e):n}function $o(e){var n=Mt();return pc(n,dt,e)}function pc(e,n,i){var o=e.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=i;var f=e.baseQueue,h=o.pending;if(h!==null){if(f!==null){var x=f.next;f.next=h.next,h.next=x}n.baseQueue=f=h,o.pending=null}if(h=e.baseState,f===null)e.memoizedState=h;else{n=f.next;var w=x=null,z=null,K=n,re=!1;do{var ue=K.lane&-536870913;if(ue!==K.lane?(We&ue)===ue:(Ul&ue)===ue){var Z=K.revertLane;if(Z===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),ue===vi&&(re=!0);else if((Ul&Z)===Z){K=K.next,Z===vi&&(re=!0);continue}else ue={lane:0,revertLane:K.revertLane,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},z===null?(w=z=ue,x=h):z=z.next=ue,qe.lanes|=Z,da|=Z;ue=K.action,Qa&&i(h,ue),h=K.hasEagerState?K.eagerState:i(h,ue)}else Z={lane:ue,revertLane:K.revertLane,gesture:K.gesture,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},z===null?(w=z=Z,x=h):z=z.next=Z,qe.lanes|=ue,da|=ue;K=K.next}while(K!==null&&K!==n);if(z===null?x=h:z.next=w,!jn(h,e.memoizedState)&&(Bt=!0,re&&(i=bi,i!==null)))throw i;e.memoizedState=h,e.baseState=x,e.baseQueue=z,o.lastRenderedState=h}return f===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function gc(e){var n=Mt(),i=n.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=e;var o=i.dispatch,f=i.pending,h=n.memoizedState;if(f!==null){i.pending=null;var x=f=f.next;do h=e(h,x.action),x=x.next;while(x!==f);jn(h,n.memoizedState)||(Bt=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),i.lastRenderedState=h}return[h,o]}function Hm(e,n,i){var o=qe,f=Mt(),h=lt;if(h){if(i===void 0)throw Error(r(407));i=i()}else i=n();var x=!jn((dt||f).memoizedState,i);if(x&&(f.memoizedState=i,Bt=!0),f=f.queue,bc(Fm.bind(null,o,f,e),[e]),f.getSnapshot!==n||x||Ut!==null&&Ut.memoizedState.tag&1){if(o.flags|=2048,ki(9,{destroy:void 0},qm.bind(null,o,f,i,n),null),vt===null)throw Error(r(349));h||(Ul&127)!==0||Im(o,n,i)}return i}function Im(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=qe.updateQueue,n===null?(n=Vo(),qe.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function qm(e,n,i,o){n.value=i,n.getSnapshot=o,Gm(n)&&Ym(e)}function Fm(e,n,i){return i(function(){Gm(n)&&Ym(e)})}function Gm(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!jn(e,i)}catch{return!0}}function Ym(e){var n=Ia(e,2);n!==null&&An(n,e,2)}function yc(e){var n=hn();if(typeof e=="function"){var i=e;if(e=i(),Qa){gt(!0);try{i()}finally{gt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bl,lastRenderedState:e},n}function Pm(e,n,i,o){return e.baseState=i,pc(e,dt,typeof o=="function"?o:Bl)}function v1(e,n,i,o,f){if(Zo(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(x){h.listeners.push(x)}};B.T!==null?i(!0):h.isTransition=!1,o(h),i=n.pending,i===null?(h.next=n.pending=h,Vm(n,h)):(h.next=i.next,n.pending=i.next=h)}}function Vm(e,n){var i=n.action,o=n.payload,f=e.state;if(n.isTransition){var h=B.T,x={};B.T=x;try{var w=i(f,o),z=B.S;z!==null&&z(x,w),Xm(e,n,w)}catch(K){vc(e,n,K)}finally{h!==null&&x.types!==null&&(h.types=x.types),B.T=h}}else try{h=i(f,o),Xm(e,n,h)}catch(K){vc(e,n,K)}}function Xm(e,n,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(o){$m(e,n,o)},function(o){return vc(e,n,o)}):$m(e,n,i)}function $m(e,n,i){n.status="fulfilled",n.value=i,Qm(n),e.state=i,n=e.pending,n!==null&&(i=n.next,i===n?e.pending=null:(i=i.next,n.next=i,Vm(e,i)))}function vc(e,n,i){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=i,Qm(n),n=n.next;while(n!==o)}e.action=null}function Qm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function Km(e,n){return n}function Zm(e,n){if(lt){var i=vt.formState;if(i!==null){e:{var o=qe;if(lt){if(wt){t:{for(var f=wt,h=Qn;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){wt=Zn(f.nextSibling),o=f.data==="F!";break e}}la(o)}o=!1}o&&(n=i[0])}}return i=hn(),i.memoizedState=i.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Km,lastRenderedState:n},i.queue=o,i=gp.bind(null,qe,o),o.dispatch=i,o=yc(!1),h=Tc.bind(null,qe,!1,o.queue),o=hn(),f={state:n,dispatch:null,action:e,pending:null},o.queue=f,i=v1.bind(null,qe,f,h,i),f.dispatch=i,o.memoizedState=e,[n,i,!1]}function Jm(e){var n=Mt();return Wm(n,dt,e)}function Wm(e,n,i){if(n=pc(e,n,Km)[0],e=$o(Bl)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=pr(n)}catch(x){throw x===xi?Bo:x}else o=n;n=Mt();var f=n.queue,h=f.dispatch;return i!==n.memoizedState&&(qe.flags|=2048,ki(9,{destroy:void 0},b1.bind(null,f,i),null)),[o,h,e]}function b1(e,n){e.action=n}function ep(e){var n=Mt(),i=dt;if(i!==null)return Wm(n,i,e);Mt(),n=n.memoizedState,i=Mt();var o=i.queue.dispatch;return i.memoizedState=e,[n,o,!1]}function ki(e,n,i,o){return e={tag:e,create:i,deps:o,inst:n,next:null},n=qe.updateQueue,n===null&&(n=Vo(),qe.updateQueue=n),i=n.lastEffect,i===null?n.lastEffect=e.next=e:(o=i.next,i.next=e,e.next=o,n.lastEffect=e),e}function tp(){return Mt().memoizedState}function Qo(e,n,i,o){var f=hn();qe.flags|=e,f.memoizedState=ki(1|n,{destroy:void 0},i,o===void 0?null:o)}function Ko(e,n,i,o){var f=Mt();o=o===void 0?null:o;var h=f.memoizedState.inst;dt!==null&&o!==null&&sc(o,dt.memoizedState.deps)?f.memoizedState=ki(n,h,i,o):(qe.flags|=e,f.memoizedState=ki(1|n,h,i,o))}function np(e,n){Qo(8390656,8,e,n)}function bc(e,n){Ko(2048,8,e,n)}function x1(e){qe.flags|=4;var n=qe.updateQueue;if(n===null)n=Vo(),qe.updateQueue=n,n.events=[e];else{var i=n.events;i===null?n.events=[e]:i.push(e)}}function lp(e){var n=Mt().memoizedState;return x1({ref:n,nextImpl:e}),function(){if((st&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function ap(e,n){return Ko(4,2,e,n)}function ip(e,n){return Ko(4,4,e,n)}function rp(e,n){if(typeof n=="function"){e=e();var i=n(e);return function(){typeof i=="function"?i():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function op(e,n,i){i=i!=null?i.concat([e]):null,Ko(4,4,rp.bind(null,n,e),i)}function xc(){}function up(e,n){var i=Mt();n=n===void 0?null:n;var o=i.memoizedState;return n!==null&&sc(n,o[1])?o[0]:(i.memoizedState=[e,n],e)}function sp(e,n){var i=Mt();n=n===void 0?null:n;var o=i.memoizedState;if(n!==null&&sc(n,o[1]))return o[0];if(o=e(),Qa){gt(!0);try{e()}finally{gt(!1)}}return i.memoizedState=[o,n],o}function Sc(e,n,i){return i===void 0||(Ul&1073741824)!==0&&(We&261930)===0?e.memoizedState=n:(e.memoizedState=i,e=cg(),qe.lanes|=e,da|=e,i)}function cp(e,n,i,o){return jn(i,n)?i:Ei.current!==null?(e=Sc(e,i,o),jn(e,n)||(Bt=!0),e):(Ul&42)===0||(Ul&1073741824)!==0&&(We&261930)===0?(Bt=!0,e.memoizedState=i):(e=cg(),qe.lanes|=e,da|=e,n)}function fp(e,n,i,o,f){var h=te.p;te.p=h!==0&&8>h?h:8;var x=B.T,w={};B.T=w,Tc(e,!1,n,i);try{var z=f(),K=B.S;if(K!==null&&K(w,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var re=p1(z,o);gr(e,n,re,Bn(e))}else gr(e,n,o,Bn(e))}catch(ue){gr(e,n,{then:function(){},status:"rejected",reason:ue},Bn())}finally{te.p=h,x!==null&&w.types!==null&&(x.types=w.types),B.T=x}}function S1(){}function Ec(e,n,i,o){if(e.tag!==5)throw Error(r(476));var f=dp(e).queue;fp(e,f,n,ce,i===null?S1:function(){return hp(e),i(o)})}function dp(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bl,lastRenderedState:ce},next:null};var i={};return n.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bl,lastRenderedState:i},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function hp(e){var n=dp(e);n.next===null&&(n=e.alternate.memoizedState),gr(e,n.next.queue,{},Bn())}function wc(){return Wt(Or)}function mp(){return Mt().memoizedState}function pp(){return Mt().memoizedState}function E1(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var i=Bn();e=ra(i);var o=oa(n,e,i);o!==null&&(An(o,n,i),fr(o,n,i)),n={cache:Js()},e.payload=n;return}n=n.return}}function w1(e,n,i){var o=Bn();i={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Zo(e)?yp(n,i):(i=qs(e,n,i,o),i!==null&&(An(i,e,o),vp(i,n,o)))}function gp(e,n,i){var o=Bn();gr(e,n,i,o)}function gr(e,n,i,o){var f={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Zo(e))yp(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var x=n.lastRenderedState,w=h(x,i);if(f.hasEagerState=!0,f.eagerState=w,jn(w,x))return No(e,n,f,0),vt===null&&Do(),!1}catch{}if(i=qs(e,n,f,o),i!==null)return An(i,e,o),vp(i,n,o),!0}return!1}function Tc(e,n,i,o){if(o={lane:2,revertLane:nf(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Zo(e)){if(n)throw Error(r(479))}else n=qs(e,i,o,2),n!==null&&An(n,e,2)}function Zo(e){var n=e.alternate;return e===qe||n!==null&&n===qe}function yp(e,n){wi=Yo=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function vp(e,n,i){if((i&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,i|=o,n.lanes=i,M(e,i)}}var yr={readContext:Wt,use:Xo,useCallback:Dt,useContext:Dt,useEffect:Dt,useImperativeHandle:Dt,useLayoutEffect:Dt,useInsertionEffect:Dt,useMemo:Dt,useReducer:Dt,useRef:Dt,useState:Dt,useDebugValue:Dt,useDeferredValue:Dt,useTransition:Dt,useSyncExternalStore:Dt,useId:Dt,useHostTransitionStatus:Dt,useFormState:Dt,useActionState:Dt,useOptimistic:Dt,useMemoCache:Dt,useCacheRefresh:Dt};yr.useEffectEvent=Dt;var bp={readContext:Wt,use:Xo,useCallback:function(e,n){return hn().memoizedState=[e,n===void 0?null:n],e},useContext:Wt,useEffect:np,useImperativeHandle:function(e,n,i){i=i!=null?i.concat([e]):null,Qo(4194308,4,rp.bind(null,n,e),i)},useLayoutEffect:function(e,n){return Qo(4194308,4,e,n)},useInsertionEffect:function(e,n){Qo(4,2,e,n)},useMemo:function(e,n){var i=hn();n=n===void 0?null:n;var o=e();if(Qa){gt(!0);try{e()}finally{gt(!1)}}return i.memoizedState=[o,n],o},useReducer:function(e,n,i){var o=hn();if(i!==void 0){var f=i(n);if(Qa){gt(!0);try{i(n)}finally{gt(!1)}}}else f=n;return o.memoizedState=o.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},o.queue=e,e=e.dispatch=w1.bind(null,qe,e),[o.memoizedState,e]},useRef:function(e){var n=hn();return e={current:e},n.memoizedState=e},useState:function(e){e=yc(e);var n=e.queue,i=gp.bind(null,qe,n);return n.dispatch=i,[e.memoizedState,i]},useDebugValue:xc,useDeferredValue:function(e,n){var i=hn();return Sc(i,e,n)},useTransition:function(){var e=yc(!1);return e=fp.bind(null,qe,e.queue,!0,!1),hn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,i){var o=qe,f=hn();if(lt){if(i===void 0)throw Error(r(407));i=i()}else{if(i=n(),vt===null)throw Error(r(349));(We&127)!==0||Im(o,n,i)}f.memoizedState=i;var h={value:i,getSnapshot:n};return f.queue=h,np(Fm.bind(null,o,h,e),[e]),o.flags|=2048,ki(9,{destroy:void 0},qm.bind(null,o,h,i,n),null),i},useId:function(){var e=hn(),n=vt.identifierPrefix;if(lt){var i=bl,o=vl;i=(o&~(1<<32-Ve(o)-1)).toString(32)+i,n="_"+n+"R_"+i,i=Po++,0<i&&(n+="H"+i.toString(32)),n+="_"}else i=g1++,n="_"+n+"r_"+i.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:wc,useFormState:Zm,useActionState:Zm,useOptimistic:function(e){var n=hn();n.memoizedState=n.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=i,n=Tc.bind(null,qe,!0,i),i.dispatch=n,[e,n]},useMemoCache:mc,useCacheRefresh:function(){return hn().memoizedState=E1.bind(null,qe)},useEffectEvent:function(e){var n=hn(),i={impl:e};return n.memoizedState=i,function(){if((st&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},kc={readContext:Wt,use:Xo,useCallback:up,useContext:Wt,useEffect:bc,useImperativeHandle:op,useInsertionEffect:ap,useLayoutEffect:ip,useMemo:sp,useReducer:$o,useRef:tp,useState:function(){return $o(Bl)},useDebugValue:xc,useDeferredValue:function(e,n){var i=Mt();return cp(i,dt.memoizedState,e,n)},useTransition:function(){var e=$o(Bl)[0],n=Mt().memoizedState;return[typeof e=="boolean"?e:pr(e),n]},useSyncExternalStore:Hm,useId:mp,useHostTransitionStatus:wc,useFormState:Jm,useActionState:Jm,useOptimistic:function(e,n){var i=Mt();return Pm(i,dt,e,n)},useMemoCache:mc,useCacheRefresh:pp};kc.useEffectEvent=lp;var xp={readContext:Wt,use:Xo,useCallback:up,useContext:Wt,useEffect:bc,useImperativeHandle:op,useInsertionEffect:ap,useLayoutEffect:ip,useMemo:sp,useReducer:gc,useRef:tp,useState:function(){return gc(Bl)},useDebugValue:xc,useDeferredValue:function(e,n){var i=Mt();return dt===null?Sc(i,e,n):cp(i,dt.memoizedState,e,n)},useTransition:function(){var e=gc(Bl)[0],n=Mt().memoizedState;return[typeof e=="boolean"?e:pr(e),n]},useSyncExternalStore:Hm,useId:mp,useHostTransitionStatus:wc,useFormState:ep,useActionState:ep,useOptimistic:function(e,n){var i=Mt();return dt!==null?Pm(i,dt,e,n):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:mc,useCacheRefresh:pp};xp.useEffectEvent=lp;function Cc(e,n,i,o){n=e.memoizedState,i=i(o,n),i=i==null?n:g({},n,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Ac={enqueueSetState:function(e,n,i){e=e._reactInternals;var o=Bn(),f=ra(o);f.payload=n,i!=null&&(f.callback=i),n=oa(e,f,o),n!==null&&(An(n,e,o),fr(n,e,o))},enqueueReplaceState:function(e,n,i){e=e._reactInternals;var o=Bn(),f=ra(o);f.tag=1,f.payload=n,i!=null&&(f.callback=i),n=oa(e,f,o),n!==null&&(An(n,e,o),fr(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var i=Bn(),o=ra(i);o.tag=2,n!=null&&(o.callback=n),n=oa(e,o,i),n!==null&&(An(n,e,i),fr(n,e,i))}};function Sp(e,n,i,o,f,h,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,h,x):n.prototype&&n.prototype.isPureReactComponent?!lr(i,o)||!lr(f,h):!0}function Ep(e,n,i,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,o),n.state!==e&&Ac.enqueueReplaceState(n,n.state,null)}function Ka(e,n){var i=n;if("ref"in n){i={};for(var o in n)o!=="ref"&&(i[o]=n[o])}if(e=e.defaultProps){i===n&&(i=g({},i));for(var f in e)i[f]===void 0&&(i[f]=e[f])}return i}function wp(e){Ro(e)}function Tp(e){console.error(e)}function kp(e){Ro(e)}function Jo(e,n){try{var i=e.onUncaughtError;i(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function Cp(e,n,i){try{var o=e.onCaughtError;o(i.value,{componentStack:i.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function _c(e,n,i){return i=ra(i),i.tag=3,i.payload={element:null},i.callback=function(){Jo(e,n)},i}function Ap(e){return e=ra(e),e.tag=3,e}function _p(e,n,i,o){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var h=o.value;e.payload=function(){return f(h)},e.callback=function(){Cp(n,i,o)}}var x=i.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Cp(n,i,o),typeof f!="function"&&(ha===null?ha=new Set([this]):ha.add(this));var w=o.stack;this.componentDidCatch(o.value,{componentStack:w!==null?w:""})})}function T1(e,n,i,o,f){if(i.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=i.alternate,n!==null&&yi(n,i,f,!0),i=Mn.current,i!==null){switch(i.tag){case 31:case 13:return Kn===null?cu():i.alternate===null&&Nt===0&&(Nt=3),i.flags&=-257,i.flags|=65536,i.lanes=f,o===Ho?i.flags|=16384:(n=i.updateQueue,n===null?i.updateQueue=new Set([o]):n.add(o),Wc(e,o,f)),!1;case 22:return i.flags|=65536,o===Ho?i.flags|=16384:(n=i.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},i.updateQueue=n):(i=n.retryQueue,i===null?n.retryQueue=new Set([o]):i.add(o)),Wc(e,o,f)),!1}throw Error(r(435,i.tag))}return Wc(e,o,f),cu(),!1}if(lt)return n=Mn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,o!==Xs&&(e=Error(r(422),{cause:o}),rr(Vn(e,i)))):(o!==Xs&&(n=Error(r(423),{cause:o}),rr(Vn(n,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,o=Vn(o,i),f=_c(e.stateNode,o,f),ac(e,f),Nt!==4&&(Nt=2)),!1;var h=Error(r(520),{cause:o});if(h=Vn(h,i),kr===null?kr=[h]:kr.push(h),Nt!==4&&(Nt=2),n===null)return!0;o=Vn(o,i),i=n;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=_c(i.stateNode,o,e),ac(i,e),!1;case 1:if(n=i.type,h=i.stateNode,(i.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(ha===null||!ha.has(h))))return i.flags|=65536,f&=-f,i.lanes|=f,f=Ap(f),_p(f,e,i,o),ac(i,f),!1}i=i.return}while(i!==null);return!1}var Rc=Error(r(461)),Bt=!1;function en(e,n,i,o){n.child=e===null?jm(n,null,i,o):$a(n,e.child,i,o)}function Rp(e,n,i,o,f){i=i.render;var h=n.ref;if("ref"in o){var x={};for(var w in o)w!=="ref"&&(x[w]=o[w])}else x=o;return Ya(n),o=cc(e,n,i,x,h,f),w=fc(),e!==null&&!Bt?(dc(e,n,f),Hl(e,n,f)):(lt&&w&&Ps(n),n.flags|=1,en(e,n,o,f),n.child)}function Dp(e,n,i,o,f){if(e===null){var h=i.type;return typeof h=="function"&&!Fs(h)&&h.defaultProps===void 0&&i.compare===null?(n.tag=15,n.type=h,Np(e,n,h,o,f)):(e=Oo(i.type,null,o,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(h=e.child,!Uc(e,f)){var x=h.memoizedProps;if(i=i.compare,i=i!==null?i:lr,i(x,o)&&e.ref===n.ref)return Hl(e,n,f)}return n.flags|=1,e=Ol(h,o),e.ref=n.ref,e.return=n,n.child=e}function Np(e,n,i,o,f){if(e!==null){var h=e.memoizedProps;if(lr(h,o)&&e.ref===n.ref)if(Bt=!1,n.pendingProps=o=h,Uc(e,f))(e.flags&131072)!==0&&(Bt=!0);else return n.lanes=e.lanes,Hl(e,n,f)}return Dc(e,n,i,o,f)}function jp(e,n,i,o){var f=o.children,h=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(h=h!==null?h.baseLanes|i:i,e!==null){for(o=n.child=e.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~h}else o=0,n.child=null;return Op(e,n,h,i,o)}if((i&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Uo(n,h!==null?h.cachePool:null),h!==null?zm(n,h):rc(),Lm(n);else return o=n.lanes=536870912,Op(e,n,h!==null?h.baseLanes|i:i,i,o)}else h!==null?(Uo(n,h.cachePool),zm(n,h),sa(),n.memoizedState=null):(e!==null&&Uo(n,null),rc(),sa());return en(e,n,f,i),n.child}function vr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Op(e,n,i,o,f){var h=ec();return h=h===null?null:{parent:Lt._currentValue,pool:h},n.memoizedState={baseLanes:i,cachePool:h},e!==null&&Uo(n,null),rc(),Lm(n),e!==null&&yi(e,n,o,!0),n.childLanes=f,null}function Wo(e,n){return n=tu({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Mp(e,n,i){return $a(n,e.child,null,i),e=Wo(n,n.pendingProps),e.flags|=2,zn(n),n.memoizedState=null,e}function k1(e,n,i){var o=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(lt){if(o.mode==="hidden")return e=Wo(n,o),n.lanes=536870912,vr(null,e);if(uc(n),(e=wt)?(e=Vg(e,Qn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:ta!==null?{id:vl,overflow:bl}:null,retryLane:536870912,hydrationErrors:null},i=ym(e),i.return=n,n.child=i,Jt=n,wt=null)):e=null,e===null)throw la(n);return n.lanes=536870912,null}return Wo(n,o)}var h=e.memoizedState;if(h!==null){var x=h.dehydrated;if(uc(n),f)if(n.flags&256)n.flags&=-257,n=Mp(e,n,i);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(Bt||yi(e,n,i,!1),f=(i&e.childLanes)!==0,Bt||f){if(o=vt,o!==null&&(x=Y(o,i),x!==0&&x!==h.retryLane))throw h.retryLane=x,Ia(e,x),An(o,e,x),Rc;cu(),n=Mp(e,n,i)}else e=h.treeContext,wt=Zn(x.nextSibling),Jt=n,lt=!0,na=null,Qn=!1,e!==null&&xm(n,e),n=Wo(n,o),n.flags|=4096;return n}return e=Ol(e.child,{mode:o.mode,children:o.children}),e.ref=n.ref,n.child=e,e.return=n,e}function eu(e,n){var i=n.ref;if(i===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(r(284));(e===null||e.ref!==i)&&(n.flags|=4194816)}}function Dc(e,n,i,o,f){return Ya(n),i=cc(e,n,i,o,void 0,f),o=fc(),e!==null&&!Bt?(dc(e,n,f),Hl(e,n,f)):(lt&&o&&Ps(n),n.flags|=1,en(e,n,i,f),n.child)}function zp(e,n,i,o,f,h){return Ya(n),n.updateQueue=null,i=Bm(n,o,i,f),Um(e),o=fc(),e!==null&&!Bt?(dc(e,n,h),Hl(e,n,h)):(lt&&o&&Ps(n),n.flags|=1,en(e,n,i,h),n.child)}function Lp(e,n,i,o,f){if(Ya(n),n.stateNode===null){var h=hi,x=i.contextType;typeof x=="object"&&x!==null&&(h=Wt(x)),h=new i(o,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=o,h.state=n.memoizedState,h.refs={},nc(n),x=i.contextType,h.context=typeof x=="object"&&x!==null?Wt(x):hi,h.state=n.memoizedState,x=i.getDerivedStateFromProps,typeof x=="function"&&(Cc(n,i,x,o),h.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(x=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),x!==h.state&&Ac.enqueueReplaceState(h,h.state,null),hr(n,o,h,f),dr(),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){h=n.stateNode;var w=n.memoizedProps,z=Ka(i,w);h.props=z;var K=h.context,re=i.contextType;x=hi,typeof re=="object"&&re!==null&&(x=Wt(re));var ue=i.getDerivedStateFromProps;re=typeof ue=="function"||typeof h.getSnapshotBeforeUpdate=="function",w=n.pendingProps!==w,re||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(w||K!==x)&&Ep(n,h,o,x),ia=!1;var Z=n.memoizedState;h.state=Z,hr(n,o,h,f),dr(),K=n.memoizedState,w||Z!==K||ia?(typeof ue=="function"&&(Cc(n,i,ue,o),K=n.memoizedState),(z=ia||Sp(n,i,z,o,Z,K,x))?(re||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=o,n.memoizedState=K),h.props=o,h.state=K,h.context=x,o=z):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{h=n.stateNode,lc(e,n),x=n.memoizedProps,re=Ka(i,x),h.props=re,ue=n.pendingProps,Z=h.context,K=i.contextType,z=hi,typeof K=="object"&&K!==null&&(z=Wt(K)),w=i.getDerivedStateFromProps,(K=typeof w=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(x!==ue||Z!==z)&&Ep(n,h,o,z),ia=!1,Z=n.memoizedState,h.state=Z,hr(n,o,h,f),dr();var ne=n.memoizedState;x!==ue||Z!==ne||ia||e!==null&&e.dependencies!==null&&zo(e.dependencies)?(typeof w=="function"&&(Cc(n,i,w,o),ne=n.memoizedState),(re=ia||Sp(n,i,re,o,Z,ne,z)||e!==null&&e.dependencies!==null&&zo(e.dependencies))?(K||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(o,ne,z),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(o,ne,z)),typeof h.componentDidUpdate=="function"&&(n.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof h.componentDidUpdate!="function"||x===e.memoizedProps&&Z===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&Z===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=ne),h.props=o,h.state=ne,h.context=z,o=re):(typeof h.componentDidUpdate!="function"||x===e.memoizedProps&&Z===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&Z===e.memoizedState||(n.flags|=1024),o=!1)}return h=o,eu(e,n),o=(n.flags&128)!==0,h||o?(h=n.stateNode,i=o&&typeof i.getDerivedStateFromError!="function"?null:h.render(),n.flags|=1,e!==null&&o?(n.child=$a(n,e.child,null,f),n.child=$a(n,null,i,f)):en(e,n,i,f),n.memoizedState=h.state,e=n.child):e=Hl(e,n,f),e}function Up(e,n,i,o){return Fa(),n.flags|=256,en(e,n,i,o),n.child}var Nc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jc(e){return{baseLanes:e,cachePool:Cm()}}function Oc(e,n,i){return e=e!==null?e.childLanes&~i:0,n&&(e|=Un),e}function Bp(e,n,i){var o=n.pendingProps,f=!1,h=(n.flags&128)!==0,x;if((x=h)||(x=e!==null&&e.memoizedState===null?!1:(Ot.current&2)!==0),x&&(f=!0,n.flags&=-129),x=(n.flags&32)!==0,n.flags&=-33,e===null){if(lt){if(f?ua(n):sa(),(e=wt)?(e=Vg(e,Qn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:ta!==null?{id:vl,overflow:bl}:null,retryLane:536870912,hydrationErrors:null},i=ym(e),i.return=n,n.child=i,Jt=n,wt=null)):e=null,e===null)throw la(n);return gf(e)?n.lanes=32:n.lanes=536870912,null}var w=o.children;return o=o.fallback,f?(sa(),f=n.mode,w=tu({mode:"hidden",children:w},f),o=qa(o,f,i,null),w.return=n,o.return=n,w.sibling=o,n.child=w,o=n.child,o.memoizedState=jc(i),o.childLanes=Oc(e,x,i),n.memoizedState=Nc,vr(null,o)):(ua(n),Mc(n,w))}var z=e.memoizedState;if(z!==null&&(w=z.dehydrated,w!==null)){if(h)n.flags&256?(ua(n),n.flags&=-257,n=zc(e,n,i)):n.memoizedState!==null?(sa(),n.child=e.child,n.flags|=128,n=null):(sa(),w=o.fallback,f=n.mode,o=tu({mode:"visible",children:o.children},f),w=qa(w,f,i,null),w.flags|=2,o.return=n,w.return=n,o.sibling=w,n.child=o,$a(n,e.child,null,i),o=n.child,o.memoizedState=jc(i),o.childLanes=Oc(e,x,i),n.memoizedState=Nc,n=vr(null,o));else if(ua(n),gf(w)){if(x=w.nextSibling&&w.nextSibling.dataset,x)var K=x.dgst;x=K,o=Error(r(419)),o.stack="",o.digest=x,rr({value:o,source:null,stack:null}),n=zc(e,n,i)}else if(Bt||yi(e,n,i,!1),x=(i&e.childLanes)!==0,Bt||x){if(x=vt,x!==null&&(o=Y(x,i),o!==0&&o!==z.retryLane))throw z.retryLane=o,Ia(e,o),An(x,e,o),Rc;pf(w)||cu(),n=zc(e,n,i)}else pf(w)?(n.flags|=192,n.child=e.child,n=null):(e=z.treeContext,wt=Zn(w.nextSibling),Jt=n,lt=!0,na=null,Qn=!1,e!==null&&xm(n,e),n=Mc(n,o.children),n.flags|=4096);return n}return f?(sa(),w=o.fallback,f=n.mode,z=e.child,K=z.sibling,o=Ol(z,{mode:"hidden",children:o.children}),o.subtreeFlags=z.subtreeFlags&65011712,K!==null?w=Ol(K,w):(w=qa(w,f,i,null),w.flags|=2),w.return=n,o.return=n,o.sibling=w,n.child=o,vr(null,o),o=n.child,w=e.child.memoizedState,w===null?w=jc(i):(f=w.cachePool,f!==null?(z=Lt._currentValue,f=f.parent!==z?{parent:z,pool:z}:f):f=Cm(),w={baseLanes:w.baseLanes|i,cachePool:f}),o.memoizedState=w,o.childLanes=Oc(e,x,i),n.memoizedState=Nc,vr(e.child,o)):(ua(n),i=e.child,e=i.sibling,i=Ol(i,{mode:"visible",children:o.children}),i.return=n,i.sibling=null,e!==null&&(x=n.deletions,x===null?(n.deletions=[e],n.flags|=16):x.push(e)),n.child=i,n.memoizedState=null,i)}function Mc(e,n){return n=tu({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function tu(e,n){return e=On(22,e,null,n),e.lanes=0,e}function zc(e,n,i){return $a(n,e.child,null,i),e=Mc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Hp(e,n,i){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Ks(e.return,n,i)}function Lc(e,n,i,o,f,h){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:f,treeForkCount:h}:(x.isBackwards=n,x.rendering=null,x.renderingStartTime=0,x.last=o,x.tail=i,x.tailMode=f,x.treeForkCount=h)}function Ip(e,n,i){var o=n.pendingProps,f=o.revealOrder,h=o.tail;o=o.children;var x=Ot.current,w=(x&2)!==0;if(w?(x=x&1|2,n.flags|=128):x&=1,k(Ot,x),en(e,n,o,i),o=lt?ir:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hp(e,i,n);else if(e.tag===19)Hp(e,i,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(i=n.child,f=null;i!==null;)e=i.alternate,e!==null&&Go(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=n.child,n.child=null):(f=i.sibling,i.sibling=null),Lc(n,!1,f,i,h,o);break;case"backwards":case"unstable_legacy-backwards":for(i=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&Go(e)===null){n.child=f;break}e=f.sibling,f.sibling=i,i=f,f=e}Lc(n,!0,i,null,h,o);break;case"together":Lc(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function Hl(e,n,i){if(e!==null&&(n.dependencies=e.dependencies),da|=n.lanes,(i&n.childLanes)===0)if(e!==null){if(yi(e,n,i,!1),(i&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,i=Ol(e,e.pendingProps),n.child=i,i.return=n;e.sibling!==null;)e=e.sibling,i=i.sibling=Ol(e,e.pendingProps),i.return=n;i.sibling=null}return n.child}function Uc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&zo(e)))}function C1(e,n,i){switch(n.tag){case 3:be(n,n.stateNode.containerInfo),aa(n,Lt,e.memoizedState.cache),Fa();break;case 27:case 5:At(n);break;case 4:be(n,n.stateNode.containerInfo);break;case 10:aa(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,uc(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(ua(n),n.flags|=128,null):(i&n.child.childLanes)!==0?Bp(e,n,i):(ua(n),e=Hl(e,n,i),e!==null?e.sibling:null);ua(n);break;case 19:var f=(e.flags&128)!==0;if(o=(i&n.childLanes)!==0,o||(yi(e,n,i,!1),o=(i&n.childLanes)!==0),f){if(o)return Ip(e,n,i);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),k(Ot,Ot.current),o)break;return null;case 22:return n.lanes=0,jp(e,n,i,n.pendingProps);case 24:aa(n,Lt,e.memoizedState.cache)}return Hl(e,n,i)}function qp(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps)Bt=!0;else{if(!Uc(e,i)&&(n.flags&128)===0)return Bt=!1,C1(e,n,i);Bt=(e.flags&131072)!==0}else Bt=!1,lt&&(n.flags&1048576)!==0&&bm(n,ir,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(e=Va(n.elementType),n.type=e,typeof e=="function")Fs(e)?(o=Ka(e,o),n.tag=1,n=Lp(null,n,e,o,i)):(n.tag=0,n=Dc(null,n,e,o,i));else{if(e!=null){var f=e.$$typeof;if(f===ee){n.tag=11,n=Rp(null,n,e,o,i);break e}else if(f===N){n.tag=14,n=Dp(null,n,e,o,i);break e}}throw n=ie(e)||e,Error(r(306,n,""))}}return n;case 0:return Dc(e,n,n.type,n.pendingProps,i);case 1:return o=n.type,f=Ka(o,n.pendingProps),Lp(e,n,o,f,i);case 3:e:{if(be(n,n.stateNode.containerInfo),e===null)throw Error(r(387));o=n.pendingProps;var h=n.memoizedState;f=h.element,lc(e,n),hr(n,o,null,i);var x=n.memoizedState;if(o=x.cache,aa(n,Lt,o),o!==h.cache&&Zs(n,[Lt],i,!0),dr(),o=x.element,h.isDehydrated)if(h={element:o,isDehydrated:!1,cache:x.cache},n.updateQueue.baseState=h,n.memoizedState=h,n.flags&256){n=Up(e,n,o,i);break e}else if(o!==f){f=Vn(Error(r(424)),n),rr(f),n=Up(e,n,o,i);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,wt=Zn(e.firstChild),Jt=n,lt=!0,na=null,Qn=!0,i=jm(n,null,o,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Fa(),o===f){n=Hl(e,n,i);break e}en(e,n,o,i)}n=n.child}return n;case 26:return eu(e,n),e===null?(i=Jg(n.type,null,n.pendingProps,null))?n.memoizedState=i:lt||(i=n.type,e=n.pendingProps,o=yu(Te.current).createElement(i),o[Se]=n,o[xe]=e,tn(o,i,e),Be(o),n.stateNode=o):n.memoizedState=Jg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return At(n),e===null&&lt&&(o=n.stateNode=Qg(n.type,n.pendingProps,Te.current),Jt=n,Qn=!0,f=wt,ya(n.type)?(yf=f,wt=Zn(o.firstChild)):wt=f),en(e,n,n.pendingProps.children,i),eu(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&lt&&((f=o=wt)&&(o=nS(o,n.type,n.pendingProps,Qn),o!==null?(n.stateNode=o,Jt=n,wt=Zn(o.firstChild),Qn=!1,f=!0):f=!1),f||la(n)),At(n),f=n.type,h=n.pendingProps,x=e!==null?e.memoizedProps:null,o=h.children,df(f,h)?o=null:x!==null&&df(f,x)&&(n.flags|=32),n.memoizedState!==null&&(f=cc(e,n,y1,null,null,i),Or._currentValue=f),eu(e,n),en(e,n,o,i),n.child;case 6:return e===null&&lt&&((e=i=wt)&&(i=lS(i,n.pendingProps,Qn),i!==null?(n.stateNode=i,Jt=n,wt=null,e=!0):e=!1),e||la(n)),null;case 13:return Bp(e,n,i);case 4:return be(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=$a(n,null,o,i):en(e,n,o,i),n.child;case 11:return Rp(e,n,n.type,n.pendingProps,i);case 7:return en(e,n,n.pendingProps,i),n.child;case 8:return en(e,n,n.pendingProps.children,i),n.child;case 12:return en(e,n,n.pendingProps.children,i),n.child;case 10:return o=n.pendingProps,aa(n,n.type,o.value),en(e,n,o.children,i),n.child;case 9:return f=n.type._context,o=n.pendingProps.children,Ya(n),f=Wt(f),o=o(f),n.flags|=1,en(e,n,o,i),n.child;case 14:return Dp(e,n,n.type,n.pendingProps,i);case 15:return Np(e,n,n.type,n.pendingProps,i);case 19:return Ip(e,n,i);case 31:return k1(e,n,i);case 22:return jp(e,n,i,n.pendingProps);case 24:return Ya(n),o=Wt(Lt),e===null?(f=ec(),f===null&&(f=vt,h=Js(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=i),f=h),n.memoizedState={parent:o,cache:f},nc(n),aa(n,Lt,f)):((e.lanes&i)!==0&&(lc(e,n),hr(n,null,null,i),dr()),f=e.memoizedState,h=n.memoizedState,f.parent!==o?(f={parent:o,cache:o},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),aa(n,Lt,o)):(o=h.cache,aa(n,Lt,o),o!==f.cache&&Zs(n,[Lt],i,!0))),en(e,n,n.pendingProps.children,i),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function Il(e){e.flags|=4}function Bc(e,n,i,o,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(mg())e.flags|=8192;else throw Xa=Ho,tc}else e.flags&=-16777217}function Fp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ly(n))if(mg())e.flags|=8192;else throw Xa=Ho,tc}function nu(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Sn():536870912,e.lanes|=n,Ri|=n)}function br(e,n){if(!lt)switch(e.tailMode){case"hidden":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Tt(e){var n=e.alternate!==null&&e.alternate.child===e.child,i=0,o=0;if(n)for(var f=e.child;f!==null;)i|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)i|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=o,e.childLanes=i,n}function A1(e,n,i){var o=n.pendingProps;switch(Vs(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tt(n),null;case 1:return Tt(n),null;case 3:return i=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),Ll(Lt),Oe(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(gi(n)?Il(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,$s())),Tt(n),null;case 26:var f=n.type,h=n.memoizedState;return e===null?(Il(n),h!==null?(Tt(n),Fp(n,h)):(Tt(n),Bc(n,f,null,o,i))):h?h!==e.memoizedState?(Il(n),Tt(n),Fp(n,h)):(Tt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==o&&Il(n),Tt(n),Bc(n,f,e,o,i)),null;case 27:if(vn(n),i=Te.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&Il(n);else{if(!o){if(n.stateNode===null)throw Error(r(166));return Tt(n),null}e=de.current,gi(n)?Sm(n):(e=Qg(f,o,i),n.stateNode=e,Il(n))}return Tt(n),null;case 5:if(vn(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&Il(n);else{if(!o){if(n.stateNode===null)throw Error(r(166));return Tt(n),null}if(h=de.current,gi(n))Sm(n);else{var x=yu(Te.current);switch(h){case 1:h=x.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=x.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=x.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=x.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=x.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof o.is=="string"?x.createElement("select",{is:o.is}):x.createElement("select"),o.multiple?h.multiple=!0:o.size&&(h.size=o.size);break;default:h=typeof o.is=="string"?x.createElement(f,{is:o.is}):x.createElement(f)}}h[Se]=n,h[xe]=o;e:for(x=n.child;x!==null;){if(x.tag===5||x.tag===6)h.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===n)break e;for(;x.sibling===null;){if(x.return===null||x.return===n)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}n.stateNode=h;e:switch(tn(h,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Il(n)}}return Tt(n),Bc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,i),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&Il(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(r(166));if(e=Te.current,gi(n)){if(e=n.stateNode,i=n.memoizedProps,o=null,f=Jt,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}e[Se]=n,e=!!(e.nodeValue===i||o!==null&&o.suppressHydrationWarning===!0||Bg(e.nodeValue,i)),e||la(n,!0)}else e=yu(e).createTextNode(o),e[Se]=n,n.stateNode=e}return Tt(n),null;case 31:if(i=n.memoizedState,e===null||e.memoizedState!==null){if(o=gi(n),i!==null){if(e===null){if(!o)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Se]=n}else Fa(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Tt(n),e=!1}else i=$s(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return n.flags&256?(zn(n),n):(zn(n),null);if((n.flags&128)!==0)throw Error(r(558))}return Tt(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=gi(n),o!==null&&o.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[Se]=n}else Fa(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Tt(n),f=!1}else f=$s(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(zn(n),n):(zn(n),null)}return zn(n),(n.flags&128)!==0?(n.lanes=i,n):(i=o!==null,e=e!==null&&e.memoizedState!==null,i&&(o=n.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),h=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),h!==f&&(o.flags|=2048)),i!==e&&i&&(n.child.flags|=8192),nu(n,n.updateQueue),Tt(n),null);case 4:return Oe(),e===null&&of(n.stateNode.containerInfo),Tt(n),null;case 10:return Ll(n.type),Tt(n),null;case 19:if(W(Ot),o=n.memoizedState,o===null)return Tt(n),null;if(f=(n.flags&128)!==0,h=o.rendering,h===null)if(f)br(o,!1);else{if(Nt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=Go(e),h!==null){for(n.flags|=128,br(o,!1),e=h.updateQueue,n.updateQueue=e,nu(n,e),n.subtreeFlags=0,e=i,i=n.child;i!==null;)gm(i,e),i=i.sibling;return k(Ot,Ot.current&1|2),lt&&Ml(n,o.treeForkCount),n.child}e=e.sibling}o.tail!==null&&pt()>ou&&(n.flags|=128,f=!0,br(o,!1),n.lanes=4194304)}else{if(!f)if(e=Go(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,nu(n,e),br(o,!0),o.tail===null&&o.tailMode==="hidden"&&!h.alternate&&!lt)return Tt(n),null}else 2*pt()-o.renderingStartTime>ou&&i!==536870912&&(n.flags|=128,f=!0,br(o,!1),n.lanes=4194304);o.isBackwards?(h.sibling=n.child,n.child=h):(e=o.last,e!==null?e.sibling=h:n.child=h,o.last=h)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=pt(),e.sibling=null,i=Ot.current,k(Ot,f?i&1|2:i&1),lt&&Ml(n,o.treeForkCount),e):(Tt(n),null);case 22:case 23:return zn(n),oc(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(i&536870912)!==0&&(n.flags&128)===0&&(Tt(n),n.subtreeFlags&6&&(n.flags|=8192)):Tt(n),i=n.updateQueue,i!==null&&nu(n,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==i&&(n.flags|=2048),e!==null&&W(Pa),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),Ll(Lt),Tt(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function _1(e,n){switch(Vs(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Ll(Lt),Oe(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return vn(n),null;case 31:if(n.memoizedState!==null){if(zn(n),n.alternate===null)throw Error(r(340));Fa()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(zn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Fa()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return W(Ot),null;case 4:return Oe(),null;case 10:return Ll(n.type),null;case 22:case 23:return zn(n),oc(),e!==null&&W(Pa),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Ll(Lt),null;case 25:return null;default:return null}}function Gp(e,n){switch(Vs(n),n.tag){case 3:Ll(Lt),Oe();break;case 26:case 27:case 5:vn(n);break;case 4:Oe();break;case 31:n.memoizedState!==null&&zn(n);break;case 13:zn(n);break;case 19:W(Ot);break;case 10:Ll(n.type);break;case 22:case 23:zn(n),oc(),e!==null&&W(Pa);break;case 24:Ll(Lt)}}function xr(e,n){try{var i=n.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var f=o.next;i=f;do{if((i.tag&e)===e){o=void 0;var h=i.create,x=i.inst;o=h(),x.destroy=o}i=i.next}while(i!==f)}}catch(w){ft(n,n.return,w)}}function ca(e,n,i){try{var o=n.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var h=f.next;o=h;do{if((o.tag&e)===e){var x=o.inst,w=x.destroy;if(w!==void 0){x.destroy=void 0,f=n;var z=i,K=w;try{K()}catch(re){ft(f,z,re)}}}o=o.next}while(o!==h)}}catch(re){ft(n,n.return,re)}}function Yp(e){var n=e.updateQueue;if(n!==null){var i=e.stateNode;try{Mm(n,i)}catch(o){ft(e,e.return,o)}}}function Pp(e,n,i){i.props=Ka(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(o){ft(e,n,o)}}function Sr(e,n){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof i=="function"?e.refCleanup=i(o):i.current=o}}catch(f){ft(e,n,f)}}function xl(e,n){var i=e.ref,o=e.refCleanup;if(i!==null)if(typeof o=="function")try{o()}catch(f){ft(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){ft(e,n,f)}else i.current=null}function Vp(e){var n=e.type,i=e.memoizedProps,o=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":i.autoFocus&&o.focus();break e;case"img":i.src?o.src=i.src:i.srcSet&&(o.srcset=i.srcSet)}}catch(f){ft(e,e.return,f)}}function Hc(e,n,i){try{var o=e.stateNode;K1(o,e.type,i,n),o[xe]=n}catch(f){ft(e,e.return,f)}}function Xp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ya(e.type)||e.tag===4}function Ic(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xp(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&&ya(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 qc(e,n,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,n):(n=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,n.appendChild(e),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=Nl));else if(o!==4&&(o===27&&ya(e.type)&&(i=e.stateNode,n=null),e=e.child,e!==null))for(qc(e,n,i),e=e.sibling;e!==null;)qc(e,n,i),e=e.sibling}function lu(e,n,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(o!==4&&(o===27&&ya(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(lu(e,n,i),e=e.sibling;e!==null;)lu(e,n,i),e=e.sibling}function $p(e){var n=e.stateNode,i=e.memoizedProps;try{for(var o=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);tn(n,o,i),n[Se]=e,n[xe]=i}catch(h){ft(e,e.return,h)}}var ql=!1,Ht=!1,Fc=!1,Qp=typeof WeakSet=="function"?WeakSet:Set,Xt=null;function R1(e,n){if(e=e.containerInfo,cf=Tu,e=om(e),zs(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var f=o.anchorOffset,h=o.focusNode;o=o.focusOffset;try{i.nodeType,h.nodeType}catch{i=null;break e}var x=0,w=-1,z=-1,K=0,re=0,ue=e,Z=null;t:for(;;){for(var ne;ue!==i||f!==0&&ue.nodeType!==3||(w=x+f),ue!==h||o!==0&&ue.nodeType!==3||(z=x+o),ue.nodeType===3&&(x+=ue.nodeValue.length),(ne=ue.firstChild)!==null;)Z=ue,ue=ne;for(;;){if(ue===e)break t;if(Z===i&&++K===f&&(w=x),Z===h&&++re===o&&(z=x),(ne=ue.nextSibling)!==null)break;ue=Z,Z=ue.parentNode}ue=ne}i=w===-1||z===-1?null:{start:w,end:z}}else i=null}i=i||{start:0,end:0}}else i=null;for(ff={focusedElem:e,selectionRange:i},Tu=!1,Xt=n;Xt!==null;)if(n=Xt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Xt=e;else for(;Xt!==null;){switch(n=Xt,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(i=0;i<e.length;i++)f=e[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,i=n,f=h.memoizedProps,h=h.memoizedState,o=i.stateNode;try{var ke=Ka(i.type,f);e=o.getSnapshotBeforeUpdate(ke,h),o.__reactInternalSnapshotBeforeUpdate=e}catch(Le){ft(i,i.return,Le)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,i=e.nodeType,i===9)mf(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":mf(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,Xt=e;break}Xt=n.return}}function Kp(e,n,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:Gl(e,i),o&4&&xr(5,i);break;case 1:if(Gl(e,i),o&4)if(e=i.stateNode,n===null)try{e.componentDidMount()}catch(x){ft(i,i.return,x)}else{var f=Ka(i.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(x){ft(i,i.return,x)}}o&64&&Yp(i),o&512&&Sr(i,i.return);break;case 3:if(Gl(e,i),o&64&&(e=i.updateQueue,e!==null)){if(n=null,i.child!==null)switch(i.child.tag){case 27:case 5:n=i.child.stateNode;break;case 1:n=i.child.stateNode}try{Mm(e,n)}catch(x){ft(i,i.return,x)}}break;case 27:n===null&&o&4&&$p(i);case 26:case 5:Gl(e,i),n===null&&o&4&&Vp(i),o&512&&Sr(i,i.return);break;case 12:Gl(e,i);break;case 31:Gl(e,i),o&4&&Wp(e,i);break;case 13:Gl(e,i),o&4&&eg(e,i),o&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=B1.bind(null,i),aS(e,i))));break;case 22:if(o=i.memoizedState!==null||ql,!o){n=n!==null&&n.memoizedState!==null||Ht,f=ql;var h=Ht;ql=o,(Ht=n)&&!h?Yl(e,i,(i.subtreeFlags&8772)!==0):Gl(e,i),ql=f,Ht=h}break;case 30:break;default:Gl(e,i)}}function Zp(e){var n=e.alternate;n!==null&&(e.alternate=null,Zp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&U(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 Ct=null,wn=!1;function Fl(e,n,i){for(i=i.child;i!==null;)Jp(e,n,i),i=i.sibling}function Jp(e,n,i){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(Rt,i)}catch{}switch(i.tag){case 26:Ht||xl(i,n),Fl(e,n,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Ht||xl(i,n);var o=Ct,f=wn;ya(i.type)&&(Ct=i.stateNode,wn=!1),Fl(e,n,i),Dr(i.stateNode),Ct=o,wn=f;break;case 5:Ht||xl(i,n);case 6:if(o=Ct,f=wn,Ct=null,Fl(e,n,i),Ct=o,wn=f,Ct!==null)if(wn)try{(Ct.nodeType===9?Ct.body:Ct.nodeName==="HTML"?Ct.ownerDocument.body:Ct).removeChild(i.stateNode)}catch(h){ft(i,n,h)}else try{Ct.removeChild(i.stateNode)}catch(h){ft(i,n,h)}break;case 18:Ct!==null&&(wn?(e=Ct,Yg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Ui(e)):Yg(Ct,i.stateNode));break;case 4:o=Ct,f=wn,Ct=i.stateNode.containerInfo,wn=!0,Fl(e,n,i),Ct=o,wn=f;break;case 0:case 11:case 14:case 15:ca(2,i,n),Ht||ca(4,i,n),Fl(e,n,i);break;case 1:Ht||(xl(i,n),o=i.stateNode,typeof o.componentWillUnmount=="function"&&Pp(i,n,o)),Fl(e,n,i);break;case 21:Fl(e,n,i);break;case 22:Ht=(o=Ht)||i.memoizedState!==null,Fl(e,n,i),Ht=o;break;default:Fl(e,n,i)}}function Wp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ui(e)}catch(i){ft(n,n.return,i)}}}function eg(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ui(e)}catch(i){ft(n,n.return,i)}}function D1(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Qp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Qp),n;default:throw Error(r(435,e.tag))}}function au(e,n){var i=D1(e);n.forEach(function(o){if(!i.has(o)){i.add(o);var f=H1.bind(null,e,o);o.then(f,f)}})}function Tn(e,n){var i=n.deletions;if(i!==null)for(var o=0;o<i.length;o++){var f=i[o],h=e,x=n,w=x;e:for(;w!==null;){switch(w.tag){case 27:if(ya(w.type)){Ct=w.stateNode,wn=!1;break e}break;case 5:Ct=w.stateNode,wn=!1;break e;case 3:case 4:Ct=w.stateNode.containerInfo,wn=!0;break e}w=w.return}if(Ct===null)throw Error(r(160));Jp(h,x,f),Ct=null,wn=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)tg(n,e),n=n.sibling}var ul=null;function tg(e,n){var i=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Tn(n,e),kn(e),o&4&&(ca(3,e,e.return),xr(3,e),ca(5,e,e.return));break;case 1:Tn(n,e),kn(e),o&512&&(Ht||i===null||xl(i,i.return)),o&64&&ql&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?o:i.concat(o))));break;case 26:var f=ul;if(Tn(n,e),kn(e),o&512&&(Ht||i===null||xl(i,i.return)),o&4){var h=i!==null?i.memoizedState:null;if(o=e.memoizedState,i===null)if(o===null)if(e.stateNode===null){e:{o=e.type,i=e.memoizedProps,f=f.ownerDocument||f;t:switch(o){case"title":h=f.getElementsByTagName("title")[0],(!h||h[Ee]||h[Se]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(o),f.head.insertBefore(h,f.querySelector("head > title"))),tn(h,o,i),h[Se]=e,Be(h),o=h;break e;case"link":var x=ty("link","href",f).get(o+(i.href||""));if(x){for(var w=0;w<x.length;w++)if(h=x[w],h.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&h.getAttribute("rel")===(i.rel==null?null:i.rel)&&h.getAttribute("title")===(i.title==null?null:i.title)&&h.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){x.splice(w,1);break t}}h=f.createElement(o),tn(h,o,i),f.head.appendChild(h);break;case"meta":if(x=ty("meta","content",f).get(o+(i.content||""))){for(w=0;w<x.length;w++)if(h=x[w],h.getAttribute("content")===(i.content==null?null:""+i.content)&&h.getAttribute("name")===(i.name==null?null:i.name)&&h.getAttribute("property")===(i.property==null?null:i.property)&&h.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&h.getAttribute("charset")===(i.charSet==null?null:i.charSet)){x.splice(w,1);break t}}h=f.createElement(o),tn(h,o,i),f.head.appendChild(h);break;default:throw Error(r(468,o))}h[Se]=e,Be(h),o=h}e.stateNode=o}else ny(f,e.type,e.stateNode);else e.stateNode=ey(f,o,e.memoizedProps);else h!==o?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,o===null?ny(f,e.type,e.stateNode):ey(f,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Hc(e,e.memoizedProps,i.memoizedProps)}break;case 27:Tn(n,e),kn(e),o&512&&(Ht||i===null||xl(i,i.return)),i!==null&&o&4&&Hc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Tn(n,e),kn(e),o&512&&(Ht||i===null||xl(i,i.return)),e.flags&32){f=e.stateNode;try{ri(f,"")}catch(ke){ft(e,e.return,ke)}}o&4&&e.stateNode!=null&&(f=e.memoizedProps,Hc(e,f,i!==null?i.memoizedProps:f)),o&1024&&(Fc=!0);break;case 6:if(Tn(n,e),kn(e),o&4){if(e.stateNode===null)throw Error(r(162));o=e.memoizedProps,i=e.stateNode;try{i.nodeValue=o}catch(ke){ft(e,e.return,ke)}}break;case 3:if(xu=null,f=ul,ul=vu(n.containerInfo),Tn(n,e),ul=f,kn(e),o&4&&i!==null&&i.memoizedState.isDehydrated)try{Ui(n.containerInfo)}catch(ke){ft(e,e.return,ke)}Fc&&(Fc=!1,ng(e));break;case 4:o=ul,ul=vu(e.stateNode.containerInfo),Tn(n,e),kn(e),ul=o;break;case 12:Tn(n,e),kn(e);break;case 31:Tn(n,e),kn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,au(e,o)));break;case 13:Tn(n,e),kn(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(ru=pt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,au(e,o)));break;case 22:f=e.memoizedState!==null;var z=i!==null&&i.memoizedState!==null,K=ql,re=Ht;if(ql=K||f,Ht=re||z,Tn(n,e),Ht=re,ql=K,kn(e),o&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(i===null||z||ql||Ht||Za(e)),i=null,n=e;;){if(n.tag===5||n.tag===26){if(i===null){z=i=n;try{if(h=z.stateNode,f)x=h.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{w=z.stateNode;var ue=z.memoizedProps.style,Z=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;w.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(ke){ft(z,z.return,ke)}}}else if(n.tag===6){if(i===null){z=n;try{z.stateNode.nodeValue=f?"":z.memoizedProps}catch(ke){ft(z,z.return,ke)}}}else if(n.tag===18){if(i===null){z=n;try{var ne=z.stateNode;f?Pg(ne,!0):Pg(z.stateNode,!1)}catch(ke){ft(z,z.return,ke)}}}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;i===n&&(i=null),n=n.return}i===n&&(i=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(i=o.retryQueue,i!==null&&(o.retryQueue=null,au(e,i))));break;case 19:Tn(n,e),kn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,au(e,o)));break;case 30:break;case 21:break;default:Tn(n,e),kn(e)}}function kn(e){var n=e.flags;if(n&2){try{for(var i,o=e.return;o!==null;){if(Xp(o)){i=o;break}o=o.return}if(i==null)throw Error(r(160));switch(i.tag){case 27:var f=i.stateNode,h=Ic(e);lu(e,h,f);break;case 5:var x=i.stateNode;i.flags&32&&(ri(x,""),i.flags&=-33);var w=Ic(e);lu(e,w,x);break;case 3:case 4:var z=i.stateNode.containerInfo,K=Ic(e);qc(e,K,z);break;default:throw Error(r(161))}}catch(re){ft(e,e.return,re)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function ng(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;ng(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Gl(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Kp(e,n.alternate,n),n=n.sibling}function Za(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:ca(4,n,n.return),Za(n);break;case 1:xl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&Pp(n,n.return,i),Za(n);break;case 27:Dr(n.stateNode);case 26:case 5:xl(n,n.return),Za(n);break;case 22:n.memoizedState===null&&Za(n);break;case 30:Za(n);break;default:Za(n)}e=e.sibling}}function Yl(e,n,i){for(i=i&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,f=e,h=n,x=h.flags;switch(h.tag){case 0:case 11:case 15:Yl(f,h,i),xr(4,h);break;case 1:if(Yl(f,h,i),o=h,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(K){ft(o,o.return,K)}if(o=h,f=o.updateQueue,f!==null){var w=o.stateNode;try{var z=f.shared.hiddenCallbacks;if(z!==null)for(f.shared.hiddenCallbacks=null,f=0;f<z.length;f++)Om(z[f],w)}catch(K){ft(o,o.return,K)}}i&&x&64&&Yp(h),Sr(h,h.return);break;case 27:$p(h);case 26:case 5:Yl(f,h,i),i&&o===null&&x&4&&Vp(h),Sr(h,h.return);break;case 12:Yl(f,h,i);break;case 31:Yl(f,h,i),i&&x&4&&Wp(f,h);break;case 13:Yl(f,h,i),i&&x&4&&eg(f,h);break;case 22:h.memoizedState===null&&Yl(f,h,i),Sr(h,h.return);break;case 30:break;default:Yl(f,h,i)}n=n.sibling}}function Gc(e,n){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&or(i))}function Yc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&or(e))}function sl(e,n,i,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)lg(e,n,i,o),n=n.sibling}function lg(e,n,i,o){var f=n.flags;switch(n.tag){case 0:case 11:case 15:sl(e,n,i,o),f&2048&&xr(9,n);break;case 1:sl(e,n,i,o);break;case 3:sl(e,n,i,o),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&or(e)));break;case 12:if(f&2048){sl(e,n,i,o),e=n.stateNode;try{var h=n.memoizedProps,x=h.id,w=h.onPostCommit;typeof w=="function"&&w(x,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(z){ft(n,n.return,z)}}else sl(e,n,i,o);break;case 31:sl(e,n,i,o);break;case 13:sl(e,n,i,o);break;case 23:break;case 22:h=n.stateNode,x=n.alternate,n.memoizedState!==null?h._visibility&2?sl(e,n,i,o):Er(e,n):h._visibility&2?sl(e,n,i,o):(h._visibility|=2,Ci(e,n,i,o,(n.subtreeFlags&10256)!==0||!1)),f&2048&&Gc(x,n);break;case 24:sl(e,n,i,o),f&2048&&Yc(n.alternate,n);break;default:sl(e,n,i,o)}}function Ci(e,n,i,o,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var h=e,x=n,w=i,z=o,K=x.flags;switch(x.tag){case 0:case 11:case 15:Ci(h,x,w,z,f),xr(8,x);break;case 23:break;case 22:var re=x.stateNode;x.memoizedState!==null?re._visibility&2?Ci(h,x,w,z,f):Er(h,x):(re._visibility|=2,Ci(h,x,w,z,f)),f&&K&2048&&Gc(x.alternate,x);break;case 24:Ci(h,x,w,z,f),f&&K&2048&&Yc(x.alternate,x);break;default:Ci(h,x,w,z,f)}n=n.sibling}}function Er(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var i=e,o=n,f=o.flags;switch(o.tag){case 22:Er(i,o),f&2048&&Gc(o.alternate,o);break;case 24:Er(i,o),f&2048&&Yc(o.alternate,o);break;default:Er(i,o)}n=n.sibling}}var wr=8192;function Ai(e,n,i){if(e.subtreeFlags&wr)for(e=e.child;e!==null;)ag(e,n,i),e=e.sibling}function ag(e,n,i){switch(e.tag){case 26:Ai(e,n,i),e.flags&wr&&e.memoizedState!==null&&gS(i,ul,e.memoizedState,e.memoizedProps);break;case 5:Ai(e,n,i);break;case 3:case 4:var o=ul;ul=vu(e.stateNode.containerInfo),Ai(e,n,i),ul=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=wr,wr=16777216,Ai(e,n,i),wr=o):Ai(e,n,i));break;default:Ai(e,n,i)}}function ig(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 Tr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var o=n[i];Xt=o,og(o,e)}ig(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)rg(e),e=e.sibling}function rg(e){switch(e.tag){case 0:case 11:case 15:Tr(e),e.flags&2048&&ca(9,e,e.return);break;case 3:Tr(e);break;case 12:Tr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,iu(e)):Tr(e);break;default:Tr(e)}}function iu(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var o=n[i];Xt=o,og(o,e)}ig(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:ca(8,n,n.return),iu(n);break;case 22:i=n.stateNode,i._visibility&2&&(i._visibility&=-3,iu(n));break;default:iu(n)}e=e.sibling}}function og(e,n){for(;Xt!==null;){var i=Xt;switch(i.tag){case 0:case 11:case 15:ca(8,i,n);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var o=i.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:or(i.memoizedState.cache)}if(o=i.child,o!==null)o.return=i,Xt=o;else e:for(i=e;Xt!==null;){o=Xt;var f=o.sibling,h=o.return;if(Zp(o),o===i){Xt=null;break e}if(f!==null){f.return=h,Xt=f;break e}Xt=h}}}var N1={getCacheForType:function(e){var n=Wt(Lt),i=n.data.get(e);return i===void 0&&(i=e(),n.data.set(e,i)),i},cacheSignal:function(){return Wt(Lt).controller.signal}},j1=typeof WeakMap=="function"?WeakMap:Map,st=0,vt=null,Qe=null,We=0,ct=0,Ln=null,fa=!1,_i=!1,Pc=!1,Pl=0,Nt=0,da=0,Ja=0,Vc=0,Un=0,Ri=0,kr=null,Cn=null,Xc=!1,ru=0,ug=0,ou=1/0,uu=null,ha=null,Ft=0,ma=null,Di=null,Vl=0,$c=0,Qc=null,sg=null,Cr=0,Kc=null;function Bn(){return(st&2)!==0&&We!==0?We&-We:B.T!==null?nf():ve()}function cg(){if(Un===0)if((We&536870912)===0||lt){var e=Gn;Gn<<=1,(Gn&3932160)===0&&(Gn=262144),Un=e}else Un=536870912;return e=Mn.current,e!==null&&(e.flags|=32),Un}function An(e,n,i){(e===vt&&(ct===2||ct===9)||e.cancelPendingCommit!==null)&&(Ni(e,0),pa(e,We,Un,!1)),il(e,i),((st&2)===0||e!==vt)&&(e===vt&&((st&2)===0&&(Ja|=i),Nt===4&&pa(e,We,Un,!1)),Sl(e))}function fg(e,n,i){if((st&6)!==0)throw Error(r(327));var o=!i&&(n&127)===0&&(n&e.expiredLanes)===0||Dl(e,n),f=o?z1(e,n):Jc(e,n,!0),h=o;do{if(f===0){_i&&!o&&pa(e,n,0,!1);break}else{if(i=e.current.alternate,h&&!O1(i)){f=Jc(e,n,!1),h=!1;continue}if(f===2){if(h=n,e.errorRecoveryDisabledLanes&h)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){n=x;e:{var w=e;f=kr;var z=w.current.memoizedState.isDehydrated;if(z&&(Ni(w,x).flags|=256),x=Jc(w,x,!1),x!==2){if(Pc&&!z){w.errorRecoveryDisabledLanes|=h,Ja|=h,f=4;break e}h=Cn,Cn=f,h!==null&&(Cn===null?Cn=h:Cn.push.apply(Cn,h))}f=x}if(h=!1,f!==2)continue}}if(f===1){Ni(e,0),pa(e,n,0,!0);break}e:{switch(o=e,h=f,h){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:pa(o,n,Un,!fa);break e;case 2:Cn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(f=ru+300-pt(),10<f)){if(pa(o,n,Un,!fa),Rl(o,0,!0)!==0)break e;Vl=n,o.timeoutHandle=Fg(dg.bind(null,o,i,Cn,uu,Xc,n,Un,Ja,Ri,fa,h,"Throttled",-0,0),f);break e}dg(o,i,Cn,uu,Xc,n,Un,Ja,Ri,fa,h,null,-0,0)}}break}while(!0);Sl(e)}function dg(e,n,i,o,f,h,x,w,z,K,re,ue,Z,ne){if(e.timeoutHandle=-1,ue=n.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Nl},ag(n,h,ue);var ke=(h&62914560)===h?ru-pt():(h&4194048)===h?ug-pt():0;if(ke=yS(ue,ke),ke!==null){Vl=h,e.cancelPendingCommit=ke(xg.bind(null,e,n,h,i,o,f,x,w,z,re,ue,null,Z,ne)),pa(e,h,x,!K);return}}xg(e,n,h,i,o,f,x,w,z)}function O1(e){for(var n=e;;){var i=n.tag;if((i===0||i===11||i===15)&&n.flags&16384&&(i=n.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var o=0;o<i.length;o++){var f=i[o],h=f.getSnapshot;f=f.value;try{if(!jn(h(),f))return!1}catch{return!1}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;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 pa(e,n,i,o){n&=~Vc,n&=~Ja,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var f=n;0<f;){var h=31-Ve(f),x=1<<h;o[h]=-1,f&=~x}i!==0&&za(e,i,n)}function su(){return(st&6)===0?(Ar(0),!1):!0}function Zc(){if(Qe!==null){if(ct===0)var e=Qe.return;else e=Qe,zl=Ga=null,hc(e),Si=null,sr=0,e=Qe;for(;e!==null;)Gp(e.alternate,e),e=e.return;Qe=null}}function Ni(e,n){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,W1(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Vl=0,Zc(),vt=e,Qe=i=Ol(e.current,null),We=n,ct=0,Ln=null,fa=!1,_i=Dl(e,n),Pc=!1,Ri=Un=Vc=Ja=da=Nt=0,Cn=kr=null,Xc=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var f=31-Ve(o),h=1<<f;n|=e[f],o&=~h}return Pl=n,Do(),i}function hg(e,n){qe=null,B.H=yr,n===xi||n===Bo?(n=Rm(),ct=3):n===tc?(n=Rm(),ct=4):ct=n===Rc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Ln=n,Qe===null&&(Nt=1,Jo(e,Vn(n,e.current)))}function mg(){var e=Mn.current;return e===null?!0:(We&4194048)===We?Kn===null:(We&62914560)===We||(We&536870912)!==0?e===Kn:!1}function pg(){var e=B.H;return B.H=yr,e===null?yr:e}function gg(){var e=B.A;return B.A=N1,e}function cu(){Nt=4,fa||(We&4194048)!==We&&Mn.current!==null||(_i=!0),(da&134217727)===0&&(Ja&134217727)===0||vt===null||pa(vt,We,Un,!1)}function Jc(e,n,i){var o=st;st|=2;var f=pg(),h=gg();(vt!==e||We!==n)&&(uu=null,Ni(e,n)),n=!1;var x=Nt;e:do try{if(ct!==0&&Qe!==null){var w=Qe,z=Ln;switch(ct){case 8:Zc(),x=6;break e;case 3:case 2:case 9:case 6:Mn.current===null&&(n=!0);var K=ct;if(ct=0,Ln=null,ji(e,w,z,K),i&&_i){x=0;break e}break;default:K=ct,ct=0,Ln=null,ji(e,w,z,K)}}M1(),x=Nt;break}catch(re){hg(e,re)}while(!0);return n&&e.shellSuspendCounter++,zl=Ga=null,st=o,B.H=f,B.A=h,Qe===null&&(vt=null,We=0,Do()),x}function M1(){for(;Qe!==null;)yg(Qe)}function z1(e,n){var i=st;st|=2;var o=pg(),f=gg();vt!==e||We!==n?(uu=null,ou=pt()+500,Ni(e,n)):_i=Dl(e,n);e:do try{if(ct!==0&&Qe!==null){n=Qe;var h=Ln;t:switch(ct){case 1:ct=0,Ln=null,ji(e,n,h,1);break;case 2:case 9:if(Am(h)){ct=0,Ln=null,vg(n);break}n=function(){ct!==2&&ct!==9||vt!==e||(ct=7),Sl(e)},h.then(n,n);break e;case 3:ct=7;break e;case 4:ct=5;break e;case 7:Am(h)?(ct=0,Ln=null,vg(n)):(ct=0,Ln=null,ji(e,n,h,7));break;case 5:var x=null;switch(Qe.tag){case 26:x=Qe.memoizedState;case 5:case 27:var w=Qe;if(x?ly(x):w.stateNode.complete){ct=0,Ln=null;var z=w.sibling;if(z!==null)Qe=z;else{var K=w.return;K!==null?(Qe=K,fu(K)):Qe=null}break t}}ct=0,Ln=null,ji(e,n,h,5);break;case 6:ct=0,Ln=null,ji(e,n,h,6);break;case 8:Zc(),Nt=6;break e;default:throw Error(r(462))}}L1();break}catch(re){hg(e,re)}while(!0);return zl=Ga=null,B.H=o,B.A=f,st=i,Qe!==null?0:(vt=null,We=0,Do(),Nt)}function L1(){for(;Qe!==null&&!Wl();)yg(Qe)}function yg(e){var n=qp(e.alternate,e,Pl);e.memoizedProps=e.pendingProps,n===null?fu(e):Qe=n}function vg(e){var n=e,i=n.alternate;switch(n.tag){case 15:case 0:n=zp(i,n,n.pendingProps,n.type,void 0,We);break;case 11:n=zp(i,n,n.pendingProps,n.type.render,n.ref,We);break;case 5:hc(n);default:Gp(i,n),n=Qe=gm(n,Pl),n=qp(i,n,Pl)}e.memoizedProps=e.pendingProps,n===null?fu(e):Qe=n}function ji(e,n,i,o){zl=Ga=null,hc(n),Si=null,sr=0;var f=n.return;try{if(T1(e,f,n,i,We)){Nt=1,Jo(e,Vn(i,e.current)),Qe=null;return}}catch(h){if(f!==null)throw Qe=f,h;Nt=1,Jo(e,Vn(i,e.current)),Qe=null;return}n.flags&32768?(lt||o===1?e=!0:_i||(We&536870912)!==0?e=!1:(fa=e=!0,(o===2||o===9||o===3||o===6)&&(o=Mn.current,o!==null&&o.tag===13&&(o.flags|=16384))),bg(n,e)):fu(n)}function fu(e){var n=e;do{if((n.flags&32768)!==0){bg(n,fa);return}e=n.return;var i=A1(n.alternate,n,Pl);if(i!==null){Qe=i;return}if(n=n.sibling,n!==null){Qe=n;return}Qe=n=e}while(n!==null);Nt===0&&(Nt=5)}function bg(e,n){do{var i=_1(e.alternate,e);if(i!==null){i.flags&=32767,Qe=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!n&&(e=e.sibling,e!==null)){Qe=e;return}Qe=e=i}while(e!==null);Nt=6,Qe=null}function xg(e,n,i,o,f,h,x,w,z){e.cancelPendingCommit=null;do du();while(Ft!==0);if((st&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(h=n.lanes|n.childLanes,h|=Is,Ma(e,i,h,x,w,z),e===vt&&(Qe=vt=null,We=0),Di=n,ma=e,Vl=i,$c=h,Qc=f,sg=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,I1(Ae,function(){return kg(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=B.T,B.T=null,f=te.p,te.p=2,x=st,st|=4;try{R1(e,n,i)}finally{st=x,te.p=f,B.T=o}}Ft=1,Sg(),Eg(),wg()}}function Sg(){if(Ft===1){Ft=0;var e=ma,n=Di,i=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||i){i=B.T,B.T=null;var o=te.p;te.p=2;var f=st;st|=4;try{tg(n,e);var h=ff,x=om(e.containerInfo),w=h.focusedElem,z=h.selectionRange;if(x!==w&&w&&w.ownerDocument&&rm(w.ownerDocument.documentElement,w)){if(z!==null&&zs(w)){var K=z.start,re=z.end;if(re===void 0&&(re=K),"selectionStart"in w)w.selectionStart=K,w.selectionEnd=Math.min(re,w.value.length);else{var ue=w.ownerDocument||document,Z=ue&&ue.defaultView||window;if(Z.getSelection){var ne=Z.getSelection(),ke=w.textContent.length,Le=Math.min(z.start,ke),mt=z.end===void 0?Le:Math.min(z.end,ke);!ne.extend&&Le>mt&&(x=mt,mt=Le,Le=x);var P=im(w,Le),I=im(w,mt);if(P&&I&&(ne.rangeCount!==1||ne.anchorNode!==P.node||ne.anchorOffset!==P.offset||ne.focusNode!==I.node||ne.focusOffset!==I.offset)){var Q=ue.createRange();Q.setStart(P.node,P.offset),ne.removeAllRanges(),Le>mt?(ne.addRange(Q),ne.extend(I.node,I.offset)):(Q.setEnd(I.node,I.offset),ne.addRange(Q))}}}}for(ue=[],ne=w;ne=ne.parentNode;)ne.nodeType===1&&ue.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<ue.length;w++){var oe=ue[w];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}Tu=!!cf,ff=cf=null}finally{st=f,te.p=o,B.T=i}}e.current=n,Ft=2}}function Eg(){if(Ft===2){Ft=0;var e=ma,n=Di,i=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||i){i=B.T,B.T=null;var o=te.p;te.p=2;var f=st;st|=4;try{Kp(e,n.alternate,n)}finally{st=f,te.p=o,B.T=i}}Ft=3}}function wg(){if(Ft===4||Ft===3){Ft=0,Oa();var e=ma,n=Di,i=Vl,o=sg;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Ft=5:(Ft=0,Di=ma=null,Tg(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(ha=null),fe(i),n=n.stateNode,at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(Rt,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=B.T,f=te.p,te.p=2,B.T=null;try{for(var h=e.onRecoverableError,x=0;x<o.length;x++){var w=o[x];h(w.value,{componentStack:w.stack})}}finally{B.T=n,te.p=f}}(Vl&3)!==0&&du(),Sl(e),f=e.pendingLanes,(i&261930)!==0&&(f&42)!==0?e===Kc?Cr++:(Cr=0,Kc=e):Cr=0,Ar(0)}}function Tg(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,or(n)))}function du(){return Sg(),Eg(),wg(),kg()}function kg(){if(Ft!==5)return!1;var e=ma,n=$c;$c=0;var i=fe(Vl),o=B.T,f=te.p;try{te.p=32>i?32:i,B.T=null,i=Qc,Qc=null;var h=ma,x=Vl;if(Ft=0,Di=ma=null,Vl=0,(st&6)!==0)throw Error(r(331));var w=st;if(st|=4,rg(h.current),lg(h,h.current,x,i),st=w,Ar(0,!1),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(Rt,h)}catch{}return!0}finally{te.p=f,B.T=o,Tg(e,n)}}function Cg(e,n,i){n=Vn(i,n),n=_c(e.stateNode,n,2),e=oa(e,n,2),e!==null&&(il(e,2),Sl(e))}function ft(e,n,i){if(e.tag===3)Cg(e,e,i);else for(;n!==null;){if(n.tag===3){Cg(n,e,i);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(ha===null||!ha.has(o))){e=Vn(i,e),i=Ap(2),o=oa(n,i,2),o!==null&&(_p(i,o,n,e),il(o,2),Sl(o));break}}n=n.return}}function Wc(e,n,i){var o=e.pingCache;if(o===null){o=e.pingCache=new j1;var f=new Set;o.set(n,f)}else f=o.get(n),f===void 0&&(f=new Set,o.set(n,f));f.has(i)||(Pc=!0,f.add(i),e=U1.bind(null,e,n,i),n.then(e,e))}function U1(e,n,i){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,vt===e&&(We&i)===i&&(Nt===4||Nt===3&&(We&62914560)===We&&300>pt()-ru?(st&2)===0&&Ni(e,0):Vc|=i,Ri===We&&(Ri=0)),Sl(e)}function Ag(e,n){n===0&&(n=Sn()),e=Ia(e,n),e!==null&&(il(e,n),Sl(e))}function B1(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),Ag(e,i)}function H1(e,n){var i=0;switch(e.tag){case 31:case 13:var o=e.stateNode,f=e.memoizedState;f!==null&&(i=f.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(r(314))}o!==null&&o.delete(n),Ag(e,i)}function I1(e,n){return Nn(e,n)}var hu=null,Oi=null,ef=!1,mu=!1,tf=!1,ga=0;function Sl(e){e!==Oi&&e.next===null&&(Oi===null?hu=Oi=e:Oi=Oi.next=e),mu=!0,ef||(ef=!0,F1())}function Ar(e,n){if(!tf&&mu){tf=!0;do for(var i=!1,o=hu;o!==null;){if(e!==0){var f=o.pendingLanes;if(f===0)var h=0;else{var x=o.suspendedLanes,w=o.pingedLanes;h=(1<<31-Ve(42|e)+1)-1,h&=f&~(x&~w),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(i=!0,Ng(o,h))}else h=We,h=Rl(o,o===vt?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(h&3)===0||Dl(o,h)||(i=!0,Ng(o,h));o=o.next}while(i);tf=!1}}function q1(){_g()}function _g(){mu=ef=!1;var e=0;ga!==0&&J1()&&(e=ga);for(var n=pt(),i=null,o=hu;o!==null;){var f=o.next,h=Rg(o,n);h===0?(o.next=null,i===null?hu=f:i.next=f,f===null&&(Oi=i)):(i=o,(e!==0||(h&3)!==0)&&(mu=!0)),o=f}Ft!==0&&Ft!==5||Ar(e),ga!==0&&(ga=0)}function Rg(e,n){for(var i=e.suspendedLanes,o=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var x=31-Ve(h),w=1<<x,z=f[x];z===-1?((w&i)===0||(w&o)!==0)&&(f[x]=kt(w,n)):z<=n&&(e.expiredLanes|=w),h&=~w}if(n=vt,i=We,i=Rl(e,e===n?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,i===0||e===n&&(ct===2||ct===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&hl(o),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Dl(e,i)){if(n=i&-i,n===e.callbackPriority)return n;switch(o!==null&&hl(o),fe(i)){case 2:case 8:i=he;break;case 32:i=Ae;break;case 268435456:i=Je;break;default:i=Ae}return o=Dg.bind(null,e),i=Nn(i,o),e.callbackPriority=n,e.callbackNode=i,n}return o!==null&&o!==null&&hl(o),e.callbackPriority=2,e.callbackNode=null,2}function Dg(e,n){if(Ft!==0&&Ft!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(du()&&e.callbackNode!==i)return null;var o=We;return o=Rl(e,e===vt?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(fg(e,o,n),Rg(e,pt()),e.callbackNode!=null&&e.callbackNode===i?Dg.bind(null,e):null)}function Ng(e,n){if(du())return null;fg(e,n,!0)}function F1(){eS(function(){(st&6)!==0?Nn(ae,q1):_g()})}function nf(){if(ga===0){var e=vi;e===0&&(e=xn,xn<<=1,(xn&261888)===0&&(xn=256)),ga=e}return ga}function jg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Eo(""+e)}function Og(e,n){var i=n.ownerDocument.createElement("input");return i.name=n.name,i.value=n.value,e.id&&i.setAttribute("form",e.id),n.parentNode.insertBefore(i,n),e=new FormData(e),i.parentNode.removeChild(i),e}function G1(e,n,i,o,f){if(n==="submit"&&i&&i.stateNode===f){var h=jg((f[xe]||null).action),x=o.submitter;x&&(n=(n=x[xe]||null)?jg(n.formAction):x.getAttribute("formAction"),n!==null&&(h=n,x=null));var w=new Co("action","action",null,o,f);e.push({event:w,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(ga!==0){var z=x?Og(f,x):new FormData(f);Ec(i,{pending:!0,data:z,method:f.method,action:h},null,z)}}else typeof h=="function"&&(w.preventDefault(),z=x?Og(f,x):new FormData(f),Ec(i,{pending:!0,data:z,method:f.method,action:h},h,z))},currentTarget:f}]})}}for(var lf=0;lf<Hs.length;lf++){var af=Hs[lf],Y1=af.toLowerCase(),P1=af[0].toUpperCase()+af.slice(1);ol(Y1,"on"+P1)}ol(cm,"onAnimationEnd"),ol(fm,"onAnimationIteration"),ol(dm,"onAnimationStart"),ol("dblclick","onDoubleClick"),ol("focusin","onFocus"),ol("focusout","onBlur"),ol(o1,"onTransitionRun"),ol(u1,"onTransitionStart"),ol(s1,"onTransitionCancel"),ol(hm,"onTransitionEnd"),an("onMouseEnter",["mouseout","mouseover"]),an("onMouseLeave",["mouseout","mouseover"]),an("onPointerEnter",["pointerout","pointerover"]),an("onPointerLeave",["pointerout","pointerover"]),Vt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _r="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(" "),V1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_r));function Mg(e,n){n=(n&4)!==0;for(var i=0;i<e.length;i++){var o=e[i],f=o.event;o=o.listeners;e:{var h=void 0;if(n)for(var x=o.length-1;0<=x;x--){var w=o[x],z=w.instance,K=w.currentTarget;if(w=w.listener,z!==h&&f.isPropagationStopped())break e;h=w,f.currentTarget=K;try{h(f)}catch(re){Ro(re)}f.currentTarget=null,h=z}else for(x=0;x<o.length;x++){if(w=o[x],z=w.instance,K=w.currentTarget,w=w.listener,z!==h&&f.isPropagationStopped())break e;h=w,f.currentTarget=K;try{h(f)}catch(re){Ro(re)}f.currentTarget=null,h=z}}}}function Ke(e,n){var i=n[Ne];i===void 0&&(i=n[Ne]=new Set);var o=e+"__bubble";i.has(o)||(zg(n,e,2,!1),i.add(o))}function rf(e,n,i){var o=0;n&&(o|=4),zg(i,e,o,n)}var pu="_reactListening"+Math.random().toString(36).slice(2);function of(e){if(!e[pu]){e[pu]=!0,xt.forEach(function(i){i!=="selectionchange"&&(V1.has(i)||rf(i,!1,e),rf(i,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[pu]||(n[pu]=!0,rf("selectionchange",!1,n))}}function zg(e,n,i,o){switch(cy(n)){case 2:var f=xS;break;case 8:f=SS;break;default:f=Ef}i=f.bind(null,n,i,e),f=void 0,!Cs||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),o?f!==void 0?e.addEventListener(n,i,{capture:!0,passive:f}):e.addEventListener(n,i,!0):f!==void 0?e.addEventListener(n,i,{passive:f}):e.addEventListener(n,i,!1)}function uf(e,n,i,o,f){var h=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var x=o.tag;if(x===3||x===4){var w=o.stateNode.containerInfo;if(w===f)break;if(x===4)for(x=o.return;x!==null;){var z=x.tag;if((z===3||z===4)&&x.stateNode.containerInfo===f)return;x=x.return}for(;w!==null;){if(x=se(w),x===null)return;if(z=x.tag,z===5||z===6||z===26||z===27){o=h=x;continue e}w=w.parentNode}}o=o.return}Ih(function(){var K=h,re=Ts(i),ue=[];e:{var Z=mm.get(e);if(Z!==void 0){var ne=Co,ke=e;switch(e){case"keypress":if(To(i)===0)break e;case"keydown":case"keyup":ne=Hx;break;case"focusin":ke="focus",ne=Ds;break;case"focusout":ke="blur",ne=Ds;break;case"beforeblur":case"afterblur":ne=Ds;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=Gh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=Ax;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=Fx;break;case cm:case fm:case dm:ne=Dx;break;case hm:ne=Yx;break;case"scroll":case"scrollend":ne=kx;break;case"wheel":ne=Vx;break;case"copy":case"cut":case"paste":ne=jx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=Ph;break;case"toggle":case"beforetoggle":ne=$x}var Le=(n&4)!==0,mt=!Le&&(e==="scroll"||e==="scrollend"),P=Le?Z!==null?Z+"Capture":null:Z;Le=[];for(var I=K,Q;I!==null;){var oe=I;if(Q=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||Q===null||P===null||(oe=Ki(I,P),oe!=null&&Le.push(Rr(I,oe,Q))),mt)break;I=I.return}0<Le.length&&(Z=new ne(Z,ke,null,i,re),ue.push({event:Z,listeners:Le}))}}if((n&7)===0){e:{if(Z=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",Z&&i!==ws&&(ke=i.relatedTarget||i.fromElement)&&(se(ke)||ke[Ce]))break e;if((ne||Z)&&(Z=re.window===re?re:(Z=re.ownerDocument)?Z.defaultView||Z.parentWindow:window,ne?(ke=i.relatedTarget||i.toElement,ne=K,ke=ke?se(ke):null,ke!==null&&(mt=s(ke),Le=ke.tag,ke!==mt||Le!==5&&Le!==27&&Le!==6)&&(ke=null)):(ne=null,ke=K),ne!==ke)){if(Le=Gh,oe="onMouseLeave",P="onMouseEnter",I="mouse",(e==="pointerout"||e==="pointerover")&&(Le=Ph,oe="onPointerLeave",P="onPointerEnter",I="pointer"),mt=ne==null?Z:Ie(ne),Q=ke==null?Z:Ie(ke),Z=new Le(oe,I+"leave",ne,i,re),Z.target=mt,Z.relatedTarget=Q,oe=null,se(re)===K&&(Le=new Le(P,I+"enter",ke,i,re),Le.target=Q,Le.relatedTarget=mt,oe=Le),mt=oe,ne&&ke)t:{for(Le=X1,P=ne,I=ke,Q=0,oe=P;oe;oe=Le(oe))Q++;oe=0;for(var je=I;je;je=Le(je))oe++;for(;0<Q-oe;)P=Le(P),Q--;for(;0<oe-Q;)I=Le(I),oe--;for(;Q--;){if(P===I||I!==null&&P===I.alternate){Le=P;break t}P=Le(P),I=Le(I)}Le=null}else Le=null;ne!==null&&Lg(ue,Z,ne,Le,!1),ke!==null&&mt!==null&&Lg(ue,mt,ke,Le,!0)}}e:{if(Z=K?Ie(K):window,ne=Z.nodeName&&Z.nodeName.toLowerCase(),ne==="select"||ne==="input"&&Z.type==="file")var rt=Wh;else if(Zh(Z))if(em)rt=a1;else{rt=n1;var Re=t1}else ne=Z.nodeName,!ne||ne.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?K&&Es(K.elementType)&&(rt=Wh):rt=l1;if(rt&&(rt=rt(e,K))){Jh(ue,rt,i,re);break e}Re&&Re(e,Z,K),e==="focusout"&&K&&Z.type==="number"&&K.memoizedProps.value!=null&&Ss(Z,"number",Z.value)}switch(Re=K?Ie(K):window,e){case"focusin":(Zh(Re)||Re.contentEditable==="true")&&(ci=Re,Ls=K,ar=null);break;case"focusout":ar=Ls=ci=null;break;case"mousedown":Us=!0;break;case"contextmenu":case"mouseup":case"dragend":Us=!1,um(ue,i,re);break;case"selectionchange":if(r1)break;case"keydown":case"keyup":um(ue,i,re)}var Fe;if(js)e:{switch(e){case"compositionstart":var et="onCompositionStart";break e;case"compositionend":et="onCompositionEnd";break e;case"compositionupdate":et="onCompositionUpdate";break e}et=void 0}else si?Qh(e,i)&&(et="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(et="onCompositionStart");et&&(Vh&&i.locale!=="ko"&&(si||et!=="onCompositionStart"?et==="onCompositionEnd"&&si&&(Fe=qh()):(ea=re,As="value"in ea?ea.value:ea.textContent,si=!0)),Re=gu(K,et),0<Re.length&&(et=new Yh(et,e,null,i,re),ue.push({event:et,listeners:Re}),Fe?et.data=Fe:(Fe=Kh(i),Fe!==null&&(et.data=Fe)))),(Fe=Kx?Zx(e,i):Jx(e,i))&&(et=gu(K,"onBeforeInput"),0<et.length&&(Re=new Yh("onBeforeInput","beforeinput",null,i,re),ue.push({event:Re,listeners:et}),Re.data=Fe)),G1(ue,e,K,i,re)}Mg(ue,n)})}function Rr(e,n,i){return{instance:e,listener:n,currentTarget:i}}function gu(e,n){for(var i=n+"Capture",o=[];e!==null;){var f=e,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=Ki(e,i),f!=null&&o.unshift(Rr(e,f,h)),f=Ki(e,n),f!=null&&o.push(Rr(e,f,h))),e.tag===3)return o;e=e.return}return[]}function X1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Lg(e,n,i,o,f){for(var h=n._reactName,x=[];i!==null&&i!==o;){var w=i,z=w.alternate,K=w.stateNode;if(w=w.tag,z!==null&&z===o)break;w!==5&&w!==26&&w!==27||K===null||(z=K,f?(K=Ki(i,h),K!=null&&x.unshift(Rr(i,K,z))):f||(K=Ki(i,h),K!=null&&x.push(Rr(i,K,z)))),i=i.return}x.length!==0&&e.push({event:n,listeners:x})}var $1=/\r\n?/g,Q1=/\u0000|\uFFFD/g;function Ug(e){return(typeof e=="string"?e:""+e).replace($1,`
9
- `).replace(Q1,"")}function Bg(e,n){return n=Ug(n),Ug(e)===n}function ht(e,n,i,o,f,h){switch(i){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||ri(e,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&ri(e,""+o);break;case"className":rl(e,"class",o);break;case"tabIndex":rl(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":rl(e,i,o);break;case"style":Bh(e,o,h);break;case"data":if(n!=="object"){rl(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||i!=="href")){e.removeAttribute(i);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(i);break}o=Eo(""+o),e.setAttribute(i,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(i,"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"&&(i==="formAction"?(n!=="input"&&ht(e,n,"name",f.name,f,null),ht(e,n,"formEncType",f.formEncType,f,null),ht(e,n,"formMethod",f.formMethod,f,null),ht(e,n,"formTarget",f.formTarget,f,null)):(ht(e,n,"encType",f.encType,f,null),ht(e,n,"method",f.method,f,null),ht(e,n,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(i);break}o=Eo(""+o),e.setAttribute(i,o);break;case"onClick":o!=null&&(e.onclick=Nl);break;case"onScroll":o!=null&&Ke("scroll",e);break;case"onScrollEnd":o!=null&&Ke("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(i=o.__html,i!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}i=Eo(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,""+o):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":o===!0?e.setAttribute(i,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,o):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(i,o):e.removeAttribute(i);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(i):e.setAttribute(i,o);break;case"popover":Ke("beforetoggle",e),Ke("toggle",e),jt(e,"popover",o);break;case"xlinkActuate":Zt(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Zt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Zt(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Zt(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Zt(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Zt(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":jt(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=wx.get(i)||i,jt(e,i,o))}}function sf(e,n,i,o,f,h){switch(i){case"style":Bh(e,o,h);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(i=o.__html,i!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"children":typeof o=="string"?ri(e,o):(typeof o=="number"||typeof o=="bigint")&&ri(e,""+o);break;case"onScroll":o!=null&&Ke("scroll",e);break;case"onScrollEnd":o!=null&&Ke("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Nl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_t.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),n=i.slice(2,f?i.length-7:void 0),h=e[xe]||null,h=h!=null?h[i]:null,typeof h=="function"&&e.removeEventListener(n,h,f),typeof o=="function")){typeof h!="function"&&h!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(n,o,f);break e}i in e?e[i]=o:o===!0?e.setAttribute(i,""):jt(e,i,o)}}}function tn(e,n,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ke("error",e),Ke("load",e);var o=!1,f=!1,h;for(h in i)if(i.hasOwnProperty(h)){var x=i[h];if(x!=null)switch(h){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:ht(e,n,h,x,i,null)}}f&&ht(e,n,"srcSet",i.srcSet,i,null),o&&ht(e,n,"src",i.src,i,null);return;case"input":Ke("invalid",e);var w=h=x=f=null,z=null,K=null;for(o in i)if(i.hasOwnProperty(o)){var re=i[o];if(re!=null)switch(o){case"name":f=re;break;case"type":x=re;break;case"checked":z=re;break;case"defaultChecked":K=re;break;case"value":h=re;break;case"defaultValue":w=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,n));break;default:ht(e,n,o,re,i,null)}}Mh(e,h,w,z,K,x,f,!1);return;case"select":Ke("invalid",e),o=x=h=null;for(f in i)if(i.hasOwnProperty(f)&&(w=i[f],w!=null))switch(f){case"value":h=w;break;case"defaultValue":x=w;break;case"multiple":o=w;default:ht(e,n,f,w,i,null)}n=h,i=x,e.multiple=!!o,n!=null?ii(e,!!o,n,!1):i!=null&&ii(e,!!o,i,!0);return;case"textarea":Ke("invalid",e),h=f=o=null;for(x in i)if(i.hasOwnProperty(x)&&(w=i[x],w!=null))switch(x){case"value":o=w;break;case"defaultValue":f=w;break;case"children":h=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(91));break;default:ht(e,n,x,w,i,null)}Lh(e,o,f,h);return;case"option":for(z in i)i.hasOwnProperty(z)&&(o=i[z],o!=null)&&(z==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":ht(e,n,z,o,i,null));return;case"dialog":Ke("beforetoggle",e),Ke("toggle",e),Ke("cancel",e),Ke("close",e);break;case"iframe":case"object":Ke("load",e);break;case"video":case"audio":for(o=0;o<_r.length;o++)Ke(_r[o],e);break;case"image":Ke("error",e),Ke("load",e);break;case"details":Ke("toggle",e);break;case"embed":case"source":case"link":Ke("error",e),Ke("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(K in i)if(i.hasOwnProperty(K)&&(o=i[K],o!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:ht(e,n,K,o,i,null)}return;default:if(Es(n)){for(re in i)i.hasOwnProperty(re)&&(o=i[re],o!==void 0&&sf(e,n,re,o,i,void 0));return}}for(w in i)i.hasOwnProperty(w)&&(o=i[w],o!=null&&ht(e,n,w,o,i,null))}function K1(e,n,i,o){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,x=null,w=null,z=null,K=null,re=null;for(ne in i){var ue=i[ne];if(i.hasOwnProperty(ne)&&ue!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":z=ue;default:o.hasOwnProperty(ne)||ht(e,n,ne,null,o,ue)}}for(var Z in o){var ne=o[Z];if(ue=i[Z],o.hasOwnProperty(Z)&&(ne!=null||ue!=null))switch(Z){case"type":h=ne;break;case"name":f=ne;break;case"checked":K=ne;break;case"defaultChecked":re=ne;break;case"value":x=ne;break;case"defaultValue":w=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,n));break;default:ne!==ue&&ht(e,n,Z,ne,o,ue)}}xs(e,x,w,z,K,re,h,f);return;case"select":ne=x=w=Z=null;for(h in i)if(z=i[h],i.hasOwnProperty(h)&&z!=null)switch(h){case"value":break;case"multiple":ne=z;default:o.hasOwnProperty(h)||ht(e,n,h,null,o,z)}for(f in o)if(h=o[f],z=i[f],o.hasOwnProperty(f)&&(h!=null||z!=null))switch(f){case"value":Z=h;break;case"defaultValue":w=h;break;case"multiple":x=h;default:h!==z&&ht(e,n,f,h,o,z)}n=w,i=x,o=ne,Z!=null?ii(e,!!i,Z,!1):!!o!=!!i&&(n!=null?ii(e,!!i,n,!0):ii(e,!!i,i?[]:"",!1));return;case"textarea":ne=Z=null;for(w in i)if(f=i[w],i.hasOwnProperty(w)&&f!=null&&!o.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:ht(e,n,w,null,o,f)}for(x in o)if(f=o[x],h=i[x],o.hasOwnProperty(x)&&(f!=null||h!=null))switch(x){case"value":Z=f;break;case"defaultValue":ne=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==h&&ht(e,n,x,f,o,h)}zh(e,Z,ne);return;case"option":for(var ke in i)Z=i[ke],i.hasOwnProperty(ke)&&Z!=null&&!o.hasOwnProperty(ke)&&(ke==="selected"?e.selected=!1:ht(e,n,ke,null,o,Z));for(z in o)Z=o[z],ne=i[z],o.hasOwnProperty(z)&&Z!==ne&&(Z!=null||ne!=null)&&(z==="selected"?e.selected=Z&&typeof Z!="function"&&typeof Z!="symbol":ht(e,n,z,Z,o,ne));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 Le in i)Z=i[Le],i.hasOwnProperty(Le)&&Z!=null&&!o.hasOwnProperty(Le)&&ht(e,n,Le,null,o,Z);for(K in o)if(Z=o[K],ne=i[K],o.hasOwnProperty(K)&&Z!==ne&&(Z!=null||ne!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(137,n));break;default:ht(e,n,K,Z,o,ne)}return;default:if(Es(n)){for(var mt in i)Z=i[mt],i.hasOwnProperty(mt)&&Z!==void 0&&!o.hasOwnProperty(mt)&&sf(e,n,mt,void 0,o,Z);for(re in o)Z=o[re],ne=i[re],!o.hasOwnProperty(re)||Z===ne||Z===void 0&&ne===void 0||sf(e,n,re,Z,o,ne);return}}for(var P in i)Z=i[P],i.hasOwnProperty(P)&&Z!=null&&!o.hasOwnProperty(P)&&ht(e,n,P,null,o,Z);for(ue in o)Z=o[ue],ne=i[ue],!o.hasOwnProperty(ue)||Z===ne||Z==null&&ne==null||ht(e,n,ue,Z,o,ne)}function Hg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Z1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,i=performance.getEntriesByType("resource"),o=0;o<i.length;o++){var f=i[o],h=f.transferSize,x=f.initiatorType,w=f.duration;if(h&&w&&Hg(x)){for(x=0,w=f.responseEnd,o+=1;o<i.length;o++){var z=i[o],K=z.startTime;if(K>w)break;var re=z.transferSize,ue=z.initiatorType;re&&Hg(ue)&&(z=z.responseEnd,x+=re*(z<w?1:(w-K)/(z-K)))}if(--o,n+=8*(h+x)/(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 cf=null,ff=null;function yu(e){return e.nodeType===9?e:e.ownerDocument}function Ig(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 qg(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 df(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 hf=null;function J1(){var e=window.event;return e&&e.type==="popstate"?e===hf?!1:(hf=e,!0):(hf=null,!1)}var Fg=typeof setTimeout=="function"?setTimeout:void 0,W1=typeof clearTimeout=="function"?clearTimeout:void 0,Gg=typeof Promise=="function"?Promise:void 0,eS=typeof queueMicrotask=="function"?queueMicrotask:typeof Gg<"u"?function(e){return Gg.resolve(null).then(e).catch(tS)}:Fg;function tS(e){setTimeout(function(){throw e})}function ya(e){return e==="head"}function Yg(e,n){var i=n,o=0;do{var f=i.nextSibling;if(e.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(o===0){e.removeChild(f),Ui(n);return}o--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")o++;else if(i==="html")Dr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Dr(i);for(var h=i.firstChild;h;){var x=h.nextSibling,w=h.nodeName;h[Ee]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&h.rel.toLowerCase()==="stylesheet"||i.removeChild(h),h=x}}else i==="body"&&Dr(e.ownerDocument.body);i=f}while(i);Ui(n)}function Pg(e,n){var i=e;e=0;do{var o=i.nextSibling;if(i.nodeType===1?n?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(n?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),o&&o.nodeType===8)if(i=o.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=o}while(i)}function mf(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var i=n;switch(n=n.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":mf(i),U(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function nS(e,n,i,o){for(;e.nodeType===1;){var f=i;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Ee])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 lS(e,n,i){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Zn(e.nextSibling),e===null))return null;return e}function Vg(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 pf(e){return e.data==="$?"||e.data==="$~"}function gf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function aS(e,n){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||i.readyState!=="loading")n();else{var o=function(){n(),i.removeEventListener("DOMContentLoaded",o)};i.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}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 yf=null;function Xg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(n===0)return Zn(e.nextSibling);n--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||n++}e=e.nextSibling}return null}function $g(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(n===0)return e;n--}else i!=="/$"&&i!=="/&"||n++}e=e.previousSibling}return null}function Qg(e,n,i){switch(n=yu(i),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 Dr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);U(e)}var Jn=new Map,Kg=new Set;function vu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Xl=te.d;te.d={f:iS,r:rS,D:oS,C:uS,L:sS,m:cS,X:dS,S:fS,M:hS};function iS(){var e=Xl.f(),n=su();return e||n}function rS(e){var n=me(e);n!==null&&n.tag===5&&n.type==="form"?hp(n):Xl.r(e)}var Mi=typeof document>"u"?null:document;function Zg(e,n,i){var o=Mi;if(o&&typeof n=="string"&&n){var f=Yn(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),Kg.has(f)||(Kg.add(f),e={rel:e,crossOrigin:i,href:n},o.querySelector(f)===null&&(n=o.createElement("link"),tn(n,"link",e),Be(n),o.head.appendChild(n)))}}function oS(e){Xl.D(e),Zg("dns-prefetch",e,null)}function uS(e,n){Xl.C(e,n),Zg("preconnect",e,n)}function sS(e,n,i){Xl.L(e,n,i);var o=Mi;if(o&&e&&n){var f='link[rel="preload"][as="'+Yn(n)+'"]';n==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+Yn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+Yn(i.imageSizes)+'"]')):f+='[href="'+Yn(e)+'"]';var h=f;switch(n){case"style":h=zi(e);break;case"script":h=Li(e)}Jn.has(h)||(e=g({rel:"preload",href:n==="image"&&i&&i.imageSrcSet?void 0:e,as:n},i),Jn.set(h,e),o.querySelector(f)!==null||n==="style"&&o.querySelector(Nr(h))||n==="script"&&o.querySelector(jr(h))||(n=o.createElement("link"),tn(n,"link",e),Be(n),o.head.appendChild(n)))}}function cS(e,n){Xl.m(e,n);var i=Mi;if(i&&e){var o=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+Yn(o)+'"][href="'+Yn(e)+'"]',h=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Li(e)}if(!Jn.has(h)&&(e=g({rel:"modulepreload",href:e},n),Jn.set(h,e),i.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(jr(h)))return}o=i.createElement("link"),tn(o,"link",e),Be(o),i.head.appendChild(o)}}}function fS(e,n,i){Xl.S(e,n,i);var o=Mi;if(o&&e){var f=ut(o).hoistableStyles,h=zi(e);n=n||"default";var x=f.get(h);if(!x){var w={loading:0,preload:null};if(x=o.querySelector(Nr(h)))w.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":n},i),(i=Jn.get(h))&&vf(e,i);var z=x=o.createElement("link");Be(z),tn(z,"link",e),z._p=new Promise(function(K,re){z.onload=K,z.onerror=re}),z.addEventListener("load",function(){w.loading|=1}),z.addEventListener("error",function(){w.loading|=2}),w.loading|=4,bu(x,n,o)}x={type:"stylesheet",instance:x,count:1,state:w},f.set(h,x)}}}function dS(e,n){Xl.X(e,n);var i=Mi;if(i&&e){var o=ut(i).hoistableScripts,f=Li(e),h=o.get(f);h||(h=i.querySelector(jr(f)),h||(e=g({src:e,async:!0},n),(n=Jn.get(f))&&bf(e,n),h=i.createElement("script"),Be(h),tn(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(f,h))}}function hS(e,n){Xl.M(e,n);var i=Mi;if(i&&e){var o=ut(i).hoistableScripts,f=Li(e),h=o.get(f);h||(h=i.querySelector(jr(f)),h||(e=g({src:e,async:!0,type:"module"},n),(n=Jn.get(f))&&bf(e,n),h=i.createElement("script"),Be(h),tn(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(f,h))}}function Jg(e,n,i,o){var f=(f=Te.current)?vu(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(n=zi(i.href),i=ut(f).hoistableStyles,o=i.get(n),o||(o={type:"style",instance:null,count:0,state:null},i.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=zi(i.href);var h=ut(f).hoistableStyles,x=h.get(e);if(x||(f=f.ownerDocument||f,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,x),(h=f.querySelector(Nr(e)))&&!h._p&&(x.instance=h,x.state.loading=5),Jn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Jn.set(e,i),h||mS(f,e,i,x.state))),n&&o===null)throw Error(r(528,""));return x}if(n&&o!==null)throw Error(r(529,""));return null;case"script":return n=i.async,i=i.src,typeof i=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Li(i),i=ut(f).hoistableScripts,o=i.get(n),o||(o={type:"script",instance:null,count:0,state:null},i.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function zi(e){return'href="'+Yn(e)+'"'}function Nr(e){return'link[rel="stylesheet"]['+e+"]"}function Wg(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function mS(e,n,i,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),tn(n,"link",i),Be(n),e.head.appendChild(n))}function Li(e){return'[src="'+Yn(e)+'"]'}function jr(e){return"script[async]"+e}function ey(e,n,i){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+Yn(i.href)+'"]');if(o)return n.instance=o,Be(o),o;var f=g({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Be(o),tn(o,"style",f),bu(o,i.precedence,e),n.instance=o;case"stylesheet":f=zi(i.href);var h=e.querySelector(Nr(f));if(h)return n.state.loading|=4,n.instance=h,Be(h),h;o=Wg(i),(f=Jn.get(f))&&vf(o,f),h=(e.ownerDocument||e).createElement("link"),Be(h);var x=h;return x._p=new Promise(function(w,z){x.onload=w,x.onerror=z}),tn(h,"link",o),n.state.loading|=4,bu(h,i.precedence,e),n.instance=h;case"script":return h=Li(i.src),(f=e.querySelector(jr(h)))?(n.instance=f,Be(f),f):(o=i,(f=Jn.get(h))&&(o=g({},i),bf(o,f)),e=e.ownerDocument||e,f=e.createElement("script"),Be(f),tn(f,"link",o),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&&(o=n.instance,n.state.loading|=4,bu(o,i.precedence,e));return n.instance}function bu(e,n,i){for(var o=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,h=f,x=0;x<o.length;x++){var w=o[x];if(w.dataset.precedence===n)h=w;else if(h!==f)break}h?h.parentNode.insertBefore(e,h.nextSibling):(n=i.nodeType===9?i.head:i,n.insertBefore(e,n.firstChild))}function vf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function bf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var xu=null;function ty(e,n,i){if(xu===null){var o=new Map,f=xu=new Map;f.set(i,o)}else f=xu,o=f.get(i),o||(o=new Map,f.set(i,o));if(o.has(e))return o;for(o.set(e,null),i=i.getElementsByTagName(e),f=0;f<i.length;f++){var h=i[f];if(!(h[Ee]||h[Se]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var x=h.getAttribute(n)||"";x=e+x;var w=o.get(x);w?w.push(h):o.set(x,[h])}}return o}function ny(e,n,i){e=e.ownerDocument||e,e.head.insertBefore(i,n==="title"?e.querySelector("head > title"):null)}function pS(e,n,i){if(i===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 ly(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function gS(e,n,i,o){if(i.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=zi(o.href),h=n.querySelector(Nr(f));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Su.bind(e),n.then(e,e)),i.state.loading|=4,i.instance=h,Be(h);return}h=n.ownerDocument||n,o=Wg(o),(f=Jn.get(f))&&vf(o,f),h=h.createElement("link"),Be(h);var x=h;x._p=new Promise(function(w,z){x.onload=w,x.onerror=z}),tn(h,"link",o),i.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,n),(n=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Su.bind(e),n.addEventListener("load",i),n.addEventListener("error",i))}}var xf=0;function yS(e,n){return e.stylesheets&&e.count===0&&wu(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var o=setTimeout(function(){if(e.stylesheets&&wu(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+n);0<e.imgBytes&&xf===0&&(xf=62500*Z1());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&wu(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>xf?50:800)+n);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function Su(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)wu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Eu=null;function wu(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Eu=new Map,n.forEach(vS,e),Eu=null,Su.call(e))}function vS(e,n){if(!(n.state.loading&4)){var i=Eu.get(e);if(i)var o=i.get(null);else{i=new Map,Eu.set(e,i);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var x=f[h];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(i.set(x.dataset.precedence,x),o=x)}o&&i.set(null,o)}f=n.instance,x=f.getAttribute("data-precedence"),h=i.get(x)||o,h===o&&i.set(null,f),i.set(x,f),this.count++,o=Su.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),h?h.parentNode.insertBefore(f,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var Or={$$typeof:j,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function bS(e,n,i,o,f,h,x,w,z){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=pl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pl(0),this.hiddenUpdates=pl(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function ay(e,n,i,o,f,h,x,w,z,K,re,ue){return e=new bS(e,n,i,x,z,K,re,ue,w),n=1,h===!0&&(n|=24),h=On(3,null,null,n),e.current=h,h.stateNode=e,n=Js(),n.refCount++,e.pooledCache=n,n.refCount++,h.memoizedState={element:o,isDehydrated:i,cache:n},nc(h),e}function iy(e){return e?(e=hi,e):hi}function ry(e,n,i,o,f,h){f=iy(f),o.context===null?o.context=f:o.pendingContext=f,o=ra(n),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=oa(e,o,n),i!==null&&(An(i,e,n),fr(i,e,n))}function oy(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<n?i:n}}function Sf(e,n){oy(e,n),(e=e.alternate)&&oy(e,n)}function uy(e){if(e.tag===13||e.tag===31){var n=Ia(e,67108864);n!==null&&An(n,e,67108864),Sf(e,67108864)}}function sy(e){if(e.tag===13||e.tag===31){var n=Bn();n=$(n);var i=Ia(e,n);i!==null&&An(i,e,n),Sf(e,n)}}var Tu=!0;function xS(e,n,i,o){var f=B.T;B.T=null;var h=te.p;try{te.p=2,Ef(e,n,i,o)}finally{te.p=h,B.T=f}}function SS(e,n,i,o){var f=B.T;B.T=null;var h=te.p;try{te.p=8,Ef(e,n,i,o)}finally{te.p=h,B.T=f}}function Ef(e,n,i,o){if(Tu){var f=wf(o);if(f===null)uf(e,n,o,ku,i),fy(e,o);else if(wS(f,e,n,i,o))o.stopPropagation();else if(fy(e,o),n&4&&-1<ES.indexOf(e)){for(;f!==null;){var h=me(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var x=dn(h.pendingLanes);if(x!==0){var w=h;for(w.pendingLanes|=2,w.entangledLanes|=2;x;){var z=1<<31-Ve(x);w.entanglements[1]|=z,x&=~z}Sl(h),(st&6)===0&&(ou=pt()+500,Ar(0))}}break;case 31:case 13:w=Ia(h,2),w!==null&&An(w,h,2),su(),Sf(h,2)}if(h=wf(o),h===null&&uf(e,n,o,ku,i),h===f)break;f=h}f!==null&&o.stopPropagation()}else uf(e,n,o,null,i)}}function wf(e){return e=Ts(e),Tf(e)}var ku=null;function Tf(e){if(ku=null,e=se(e),e!==null){var n=s(e);if(n===null)e=null;else{var i=n.tag;if(i===13){if(e=c(n),e!==null)return e;e=null}else if(i===31){if(e=d(n),e!==null)return e;e=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return ku=e,null}function cy(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(cn()){case ae:return 2;case he:return 8;case Ae:case Ue:return 32;case Je:return 268435456;default:return 32}default:return 32}}var kf=!1,va=null,ba=null,xa=null,Mr=new Map,zr=new Map,Sa=[],ES="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 fy(e,n){switch(e){case"focusin":case"focusout":va=null;break;case"dragenter":case"dragleave":ba=null;break;case"mouseover":case"mouseout":xa=null;break;case"pointerover":case"pointerout":Mr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":zr.delete(n.pointerId)}}function Lr(e,n,i,o,f,h){return e===null||e.nativeEvent!==h?(e={blockedOn:n,domEventName:i,eventSystemFlags:o,nativeEvent:h,targetContainers:[f]},n!==null&&(n=me(n),n!==null&&uy(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function wS(e,n,i,o,f){switch(n){case"focusin":return va=Lr(va,e,n,i,o,f),!0;case"dragenter":return ba=Lr(ba,e,n,i,o,f),!0;case"mouseover":return xa=Lr(xa,e,n,i,o,f),!0;case"pointerover":var h=f.pointerId;return Mr.set(h,Lr(Mr.get(h)||null,e,n,i,o,f)),!0;case"gotpointercapture":return h=f.pointerId,zr.set(h,Lr(zr.get(h)||null,e,n,i,o,f)),!0}return!1}function dy(e){var n=se(e.target);if(n!==null){var i=s(n);if(i!==null){if(n=i.tag,n===13){if(n=c(i),n!==null){e.blockedOn=n,_e(e.priority,function(){sy(i)});return}}else if(n===31){if(n=d(i),n!==null){e.blockedOn=n,_e(e.priority,function(){sy(i)});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Cu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var i=wf(e.nativeEvent);if(i===null){i=e.nativeEvent;var o=new i.constructor(i.type,i);ws=o,i.target.dispatchEvent(o),ws=null}else return n=me(i),n!==null&&uy(n),e.blockedOn=i,!1;n.shift()}return!0}function hy(e,n,i){Cu(e)&&i.delete(n)}function TS(){kf=!1,va!==null&&Cu(va)&&(va=null),ba!==null&&Cu(ba)&&(ba=null),xa!==null&&Cu(xa)&&(xa=null),Mr.forEach(hy),zr.forEach(hy)}function Au(e,n){e.blockedOn===n&&(e.blockedOn=null,kf||(kf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,TS)))}var _u=null;function my(e){_u!==e&&(_u=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){_u===e&&(_u=null);for(var n=0;n<e.length;n+=3){var i=e[n],o=e[n+1],f=e[n+2];if(typeof o!="function"){if(Tf(o||i)===null)continue;break}var h=me(i);h!==null&&(e.splice(n,3),n-=3,Ec(h,{pending:!0,data:f,method:i.method,action:o},o,f))}}))}function Ui(e){function n(z){return Au(z,e)}va!==null&&Au(va,e),ba!==null&&Au(ba,e),xa!==null&&Au(xa,e),Mr.forEach(n),zr.forEach(n);for(var i=0;i<Sa.length;i++){var o=Sa[i];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Sa.length&&(i=Sa[0],i.blockedOn===null);)dy(i),i.blockedOn===null&&Sa.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(o=0;o<i.length;o+=3){var f=i[o],h=i[o+1],x=f[xe]||null;if(typeof h=="function")x||my(i);else if(x){var w=null;if(h&&h.hasAttribute("formAction")){if(f=h,x=h[xe]||null)w=x.formAction;else if(Tf(f)!==null)continue}else w=x.action;typeof w=="function"?i[o+1]=w:(i.splice(o,3),o-=3),my(i)}}}function py(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(x){return f=x})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),o||setTimeout(i,20)}function i(){if(!o&&!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 o=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(i,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function Cf(e){this._internalRoot=e}Ru.prototype.render=Cf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var i=n.current,o=Bn();ry(i,o,e,n,null,null)},Ru.prototype.unmount=Cf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;ry(e.current,2,null,e,null,null),su(),n[Ce]=null}};function Ru(e){this._internalRoot=e}Ru.prototype.unstable_scheduleHydration=function(e){if(e){var n=ve();e={blockedOn:null,target:e,priority:n};for(var i=0;i<Sa.length&&n!==0&&n<Sa[i].priority;i++);Sa.splice(i,0,e),i===0&&dy(e)}};var gy=l.version;if(gy!=="19.2.4")throw Error(r(527,gy,"19.2.4"));te.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 kS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Du.isDisabled&&Du.supportsFiber)try{Rt=Du.inject(kS),at=Du}catch{}}return Br.createRoot=function(e,n){if(!u(e))throw Error(r(299));var i=!1,o="",f=wp,h=Tp,x=kp;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(x=n.onRecoverableError)),n=ay(e,1,!1,null,null,i,o,null,f,h,x,py),e[Ce]=n.current,of(e),new Cf(n)},Br.hydrateRoot=function(e,n,i){if(!u(e))throw Error(r(299));var o=!1,f="",h=wp,x=Tp,w=kp,z=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(x=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError),i.formState!==void 0&&(z=i.formState)),n=ay(e,1,!0,n,i??null,o,f,z,h,x,w,py),n.context=iy(null),i=n.current,o=Bn(),o=$(o),f=ra(o),f.callback=null,oa(i,f,o),i=o,n.current.lanes=i,il(n,i),Sl(n),e[Ce]=n.current,of(e),new Ru(n)},Br.version="19.2.4",Br}var Cy;function US(){if(Cy)return Rf.exports;Cy=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=LS(),Rf.exports}var BS=US();var ub=t=>{throw TypeError(t)},HS=(t,l,a)=>l.has(t)||ub("Cannot "+a),Of=(t,l,a)=>(HS(t,l,"read from private field"),a?a.call(t):l.get(t)),IS=(t,l,a)=>l.has(t)?ub("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(t):l.set(t,a),Ay="popstate";function qS(t={}){function l(r,u){let{pathname:s,search:c,hash:d}=r.location;return lo("",{pathname:s,search:c,hash:d},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function a(r,u){return typeof u=="string"?u:Cl(u)}return GS(l,a,null,t)}function Pe(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function zt(t,l){if(!t){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function FS(){return Math.random().toString(36).substring(2,10)}function _y(t,l){return{usr:t.state,key:t.key,idx:l}}function lo(t,l,a=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof l=="string"?Da(l):l,state:a,key:l&&l.key||r||FS()}}function Cl({pathname:t="/",search:l="",hash:a=""}){return l&&l!=="?"&&(t+=l.charAt(0)==="?"?l:"?"+l),a&&a!=="#"&&(t+=a.charAt(0)==="#"?a:"#"+a),t}function Da(t){let l={};if(t){let a=t.indexOf("#");a>=0&&(l.hash=t.substring(a),t=t.substring(0,a));let r=t.indexOf("?");r>=0&&(l.search=t.substring(r),t=t.substring(0,r)),t&&(l.pathname=t)}return l}function GS(t,l,a,r={}){let{window:u=document.defaultView,v5Compat:s=!1}=r,c=u.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 D=y(),C=D==null?null:D-m;m=D,p&&p({action:d,location:_.location,delta:C})}function b(D,C){d="PUSH";let A=lo(_.location,D,C);m=y()+1;let j=_y(A,m),ee=_.createHref(A);try{c.pushState(j,"",ee)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;u.location.assign(ee)}s&&p&&p({action:d,location:_.location,delta:1})}function S(D,C){d="REPLACE";let A=lo(_.location,D,C);m=y();let j=_y(A,m),ee=_.createHref(A);c.replaceState(j,"",ee),s&&p&&p({action:d,location:_.location,delta:0})}function E(D){return sb(D)}let _={get action(){return d},get location(){return t(u,c)},listen(D){if(p)throw new Error("A history only accepts one active listener");return u.addEventListener(Ay,g),p=D,()=>{u.removeEventListener(Ay,g),p=null}},createHref(D){return l(u,D)},createURL:E,encodeLocation(D){let C=E(D);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:b,replace:S,go(D){return c.go(D)}};return _}function sb(t,l=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),Pe(a,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:Cl(t);return r=r.replace(/ $/,"%20"),!l&&r.startsWith("//")&&(r=a+r),new URL(r,a)}var Zr,Ry=class{constructor(t){if(IS(this,Zr,new Map),t)for(let[l,a]of t)this.set(l,a)}get(t){if(Of(this,Zr).has(t))return Of(this,Zr).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,l){Of(this,Zr).set(t,l)}};Zr=new WeakMap;var YS=new Set(["lazy","caseSensitive","path","id","index","children"]);function PS(t){return YS.has(t)}var VS=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function XS(t){return VS.has(t)}function $S(t){return t.index===!0}function ao(t,l,a=[],r={},u=!1){return t.map((s,c)=>{let d=[...a,String(c)],p=typeof s.id=="string"?s.id:d.join("-");if(Pe(s.index!==!0||!s.children,"Cannot specify children on an index route"),Pe(u||!r[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),$S(s)){let m={...s,id:p};return r[p]=Dy(m,l(m)),m}else{let m={...s,id:p,children:void 0};return r[p]=Dy(m,l(m)),s.children&&(m.children=ao(s.children,l,d,r,u)),m}})}function Dy(t,l){return Object.assign(t,{...l,...typeof l.lazy=="object"&&l.lazy!=null?{lazy:{...t.lazy,...l.lazy}}:{}})}function ka(t,l,a="/"){return Jr(t,l,a,!1)}function Jr(t,l,a,r){let u=typeof l=="string"?Da(l):l,s=tl(u.pathname||"/",a);if(s==null)return null;let c=cb(t);KS(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let m=oE(s);d=iE(c[p],m,r)}return d}function QS(t,l){let{route:a,pathname:r,params:u}=t;return{id:a.id,pathname:r,params:u,data:l[a.id],loaderData:l[a.id],handle:a.handle}}function cb(t,l=[],a=[],r="",u=!1){let s=(c,d,p=u,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;Pe(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=kl([r,y.relativePath]),b=a.concat(y);c.children&&c.children.length>0&&(Pe(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),cb(c.children,l,b,g,p)),!(c.path==null&&!c.index)&&l.push({path:g,score:lE(g,c.index),routesMeta:b})};return t.forEach((c,d)=>{if(c.path===""||!c.path?.includes("?"))s(c,d);else for(let p of fb(c.path))s(c,d,!0,p)}),l}function fb(t){let l=t.split("/");if(l.length===0)return[];let[a,...r]=l,u=a.endsWith("?"),s=a.replace(/\?$/,"");if(r.length===0)return u?[s,""]:[s];let c=fb(r.join("/")),d=[];return d.push(...c.map(p=>p===""?s:[s,p].join("/"))),u&&d.push(...c),d.map(p=>t.startsWith("/")&&p===""?"/":p)}function KS(t){t.sort((l,a)=>l.score!==a.score?a.score-l.score:aE(l.routesMeta.map(r=>r.childrenIndex),a.routesMeta.map(r=>r.childrenIndex)))}var ZS=/^:[\w-]+$/,JS=3,WS=2,eE=1,tE=10,nE=-2,Ny=t=>t==="*";function lE(t,l){let a=t.split("/"),r=a.length;return a.some(Ny)&&(r+=nE),l&&(r+=WS),a.filter(u=>!Ny(u)).reduce((u,s)=>u+(ZS.test(s)?JS:s===""?eE:tE),r)}function aE(t,l){return t.length===l.length&&t.slice(0,-1).every((r,u)=>r===l[u])?t[t.length-1]-l[l.length-1]:0}function iE(t,l,a=!1){let{routesMeta:r}=t,u={},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=Zu({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},y),b=p.route;if(!g&&m&&a&&!r[r.length-1].route.index&&(g=Zu({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!g)return null;Object.assign(u,g.params),c.push({params:u,pathname:kl([s,g.pathname]),pathnameBase:cE(kl([s,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(s=kl([s,g.pathnameBase]))}return c}function Zu(t,l){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[a,r]=rE(t.path,t.caseSensitive,t.end),u=l.match(a);if(!u)return null;let s=u[0],c=s.replace(/(.)\/+$/,"$1"),d=u.slice(1);return{params:r.reduce((m,{paramName:y,isOptional:g},b)=>{if(y==="*"){let E=d[b]||"";c=s.slice(0,s.length-E.length).replace(/(.)\/+$/,"$1")}const S=d[b];return g&&!S?m[y]=void 0:m[y]=(S||"").replace(/%2F/g,"/"),m},{}),pathname:s,pathnameBase:c,pattern:t}}function rE(t,l=!1,a=!0){zt(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=[],u="^"+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:"*"}),u+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?u+="\\/*$":t!==""&&t!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,l?void 0:"i"),r]}function oE(t){try{return t.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return zt(!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 tl(t,l){if(l==="/")return t;if(!t.toLowerCase().startsWith(l.toLowerCase()))return null;let a=l.endsWith("/")?l.length-1:l.length,r=t.charAt(a);return r&&r!=="/"?null:t.slice(a)||"/"}function uE({basename:t,pathname:l}){return l==="/"?t:kl([t,l])}var db=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yd=t=>db.test(t);function sE(t,l="/"){let{pathname:a,search:r="",hash:u=""}=typeof t=="string"?Da(t):t,s;return a?(a=a.replace(/\/\/+/g,"/"),a.startsWith("/")?s=jy(a.substring(1),"/"):s=jy(a,l)):s=l,{pathname:s,search:fE(r),hash:dE(u)}}function jy(t,l){let a=l.replace(/\/+$/,"").split("/");return t.split("/").forEach(u=>{u===".."?a.length>1&&a.pop():u!=="."&&a.push(u)}),a.length>1?a.join("/"):"/"}function Mf(t,l,a,r){return`Cannot include a '${t}' character in a manually specified \`to.${l}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function hb(t){return t.filter((l,a)=>a===0||l.route.path&&l.route.path.length>0)}function Pd(t){let l=hb(t);return l.map((a,r)=>r===l.length-1?a.pathname:a.pathnameBase)}function Vd(t,l,a,r=!1){let u;typeof t=="string"?u=Da(t):(u={...t},Pe(!u.pathname||!u.pathname.includes("?"),Mf("?","pathname","search",u)),Pe(!u.pathname||!u.pathname.includes("#"),Mf("#","pathname","hash",u)),Pe(!u.search||!u.search.includes("#"),Mf("#","search","hash",u)));let s=t===""||u.pathname==="",c=s?"/":u.pathname,d;if(c==null)d=a;else{let g=l.length-1;if(!r&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),g-=1;u.pathname=b.join("/")}d=g>=0?l[g]:"/"}let p=sE(u,d),m=c&&c!=="/"&&c.endsWith("/"),y=(s||c===".")&&a.endsWith("/");return!p.pathname.endsWith("/")&&(m||y)&&(p.pathname+="/"),p}var kl=t=>t.join("/").replace(/\/\/+/g,"/"),cE=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),fE=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,dE=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,so=class{constructor(t,l,a,r=!1){this.status=t,this.statusText=l||"",this.internal=r,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function io(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function co(t){return t.map(l=>l.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var mb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function pb(t,l){let a=t;if(typeof a!="string"||!db.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let r=a,u=!1;if(mb)try{let s=new URL(window.location.href),c=a.startsWith("//")?new URL(s.protocol+a):new URL(a),d=tl(c.pathname,l);c.origin===s.origin&&d!=null?a=d+c.search+c.hash:u=!0}catch{zt(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:u,to:a}}var _a=Symbol("Uninstrumented");function hE(t,l){let a={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};t.forEach(u=>u({id:l.id,index:l.index,path:l.path,instrument(s){let c=Object.keys(a);for(let d of c)s[d]&&a[d].push(s[d])}}));let r={};if(typeof l.lazy=="function"&&a.lazy.length>0){let u=Fi(a.lazy,l.lazy,()=>{});u&&(r.lazy=u)}if(typeof l.lazy=="object"){let u=l.lazy;["middleware","loader","action"].forEach(s=>{let c=u[s],d=a[`lazy.${s}`];if(typeof c=="function"&&d.length>0){let p=Fi(d,c,()=>{});p&&(r.lazy=Object.assign(r.lazy||{},{[s]:p}))}})}return["loader","action"].forEach(u=>{let s=l[u];if(typeof s=="function"&&a[u].length>0){let c=s[_a]??s,d=Fi(a[u],c,(...p)=>Oy(p[0]));d&&(u==="loader"&&c.hydrate===!0&&(d.hydrate=!0),d[_a]=c,r[u]=d)}}),l.middleware&&l.middleware.length>0&&a.middleware.length>0&&(r.middleware=l.middleware.map(u=>{let s=u[_a]??u,c=Fi(a.middleware,s,(...d)=>Oy(d[0]));return c?(c[_a]=s,c):u})),r}function mE(t,l){let a={navigate:[],fetch:[]};if(l.forEach(r=>r({instrument(u){let s=Object.keys(u);for(let c of s)u[c]&&a[c].push(u[c])}})),a.navigate.length>0){let r=t.navigate[_a]??t.navigate,u=Fi(a.navigate,r,(...s)=>{let[c,d]=s;return{to:typeof c=="number"||typeof c=="string"?c:c?Cl(c):".",...My(t,d??{})}});u&&(u[_a]=r,t.navigate=u)}if(a.fetch.length>0){let r=t.fetch[_a]??t.fetch,u=Fi(a.fetch,r,(...s)=>{let[c,,d,p]=s;return{href:d??".",fetcherKey:c,...My(t,p??{})}});u&&(u[_a]=r,t.fetch=u)}return t}function Fi(t,l,a){return t.length===0?null:async(...r)=>{let u=await gb(t,a(...r),()=>l(...r),t.length-1);if(u.type==="error")throw u.value;return u.value}}async function gb(t,l,a,r){let u=t[r],s;if(u){let c,d=async()=>(c?console.error("You cannot call instrumented handlers more than once"):c=gb(t,l,a,r-1),s=await c,Pe(s,"Expected a result"),s.type==="error"&&s.value instanceof Error?{status:"error",error:s.value}:{status:"success",error:void 0});try{await u(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 a()}}catch(c){s={type:"error",value:c}}return s||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Oy(t){let{request:l,context:a,params:r,unstable_pattern:u}=t;return{request:pE(l),params:{...r},unstable_pattern:u,context:gE(a)}}function My(t,l){return{currentUrl:Cl(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 pE(t){return{method:t.method,url:t.url,headers:{get:(...l)=>t.headers.get(...l)}}}function gE(t){if(vE(t)){let l={...t};return Object.freeze(l),l}else return{get:l=>t.get(l)}}var yE=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function vE(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")===yE}var yb=["POST","PUT","PATCH","DELETE"],bE=new Set(yb),xE=["GET",...yb],SE=new Set(xE),vb=new Set([301,302,303,307,308]),EE=new Set([307,308]),zf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},wE={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Hr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},TE=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),bb="remix-router-transitions",xb=Symbol("ResetLoaderData");function kE(t){const l=t.window?t.window:typeof window<"u"?window:void 0,a=typeof l<"u"&&typeof l.document<"u"&&typeof l.document.createElement<"u";Pe(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=t.hydrationRouteProperties||[],u=t.mapRouteProperties||TE,s=u;if(t.unstable_instrumentations){let M=t.unstable_instrumentations;s=Y=>({...u(Y),...hE(M.map($=>$.route).filter(Boolean),Y)})}let c={},d=ao(t.routes,s,void 0,c),p,m=t.basename||"/";m.startsWith("/")||(m=`/${m}`);let y=t.dataStrategy||DE,g={...t.future},b=null,S=new Set,E=null,_=null,D=null,C=t.hydrationData!=null,A=ka(d,t.history.location,m),j=!1,ee=null,V;if(A==null&&!t.patchRoutesOnNavigation){let M=Wn(404,{pathname:t.history.location.pathname}),{matches:Y,route:$}=Nu(d);V=!0,A=Y,ee={[$.id]:M}}else if(A&&!t.hydrationData&&Sn(A,d,t.history.location.pathname).active&&(A=null),A)if(A.some(M=>M.route.lazy))V=!1;else if(!A.some(M=>Xd(M.route)))V=!0;else{let M=t.hydrationData?t.hydrationData.loaderData:null,Y=t.hydrationData?t.hydrationData.errors:null;if(Y){let $=A.findIndex(fe=>Y[fe.route.id]!==void 0);V=A.slice(0,$+1).every(fe=>!hd(fe.route,M,Y))}else V=A.every($=>!hd($.route,M,Y))}else{V=!1,A=[];let M=Sn(null,d,t.history.location.pathname);M.active&&M.matches&&(j=!0,A=M.matches)}let q,N={historyAction:t.history.action,location:t.history.location,matches:A,initialized:V,navigation:zf,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},le="POP",X=null,L=!1,G,F=!1,H=new Map,ie=null,J=!1,B=!1,te=new Set,ce=new Map,pe=0,R=-1,O=new Map,W=new Set,k=new Map,de=new Map,ye=new Set,Te=new Map,ze,be=null;function Oe(){if(b=t.history.listen(({action:M,location:Y,delta:$})=>{if(ze){ze(),ze=void 0;return}zt(Te.size===0||$!=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 fe=Gn({currentLocation:N.location,nextLocation:Y,historyAction:M});if(fe&&$!=null){let ve=new Promise(_e=>{ze=_e});t.history.go($*-1),xn(fe,{state:"blocked",location:Y,proceed(){xn(fe,{state:"proceeding",proceed:void 0,reset:void 0,location:Y}),ve.then(()=>t.history.go($))},reset(){let _e=new Map(N.blockers);_e.set(fe,Hr),Et({blockers:_e})}}),X?.resolve(),X=null;return}return Pt(M,Y)}),a){$E(l,H);let M=()=>QE(l,H);l.addEventListener("pagehide",M),ie=()=>l.removeEventListener("pagehide",M)}return N.initialized||Pt("POP",N.location,{initialHydration:!0}),q}function At(){b&&b(),ie&&ie(),S.clear(),G&&G.abort(),N.fetchers.forEach((M,Y)=>ln(Y)),N.blockers.forEach((M,Y)=>ai(Y))}function vn(M){return S.add(M),()=>S.delete(M)}function Et(M,Y={}){M.matches&&(M.matches=M.matches.map(ve=>{let _e=c[ve.route.id],we=ve.route;return we.element!==_e.element||we.errorElement!==_e.errorElement||we.hydrateFallbackElement!==_e.hydrateFallbackElement?{...ve,route:_e}:ve})),N={...N,...M};let $=[],fe=[];N.fetchers.forEach((ve,_e)=>{ve.state==="idle"&&(ye.has(_e)?$.push(_e):fe.push(_e))}),ye.forEach(ve=>{!N.fetchers.has(ve)&&!ce.has(ve)&&$.push(ve)}),[...S].forEach(ve=>ve(N,{deletedFetchers:$,newErrors:M.errors??null,viewTransitionOpts:Y.viewTransitionOpts,flushSync:Y.flushSync===!0})),$.forEach(ve=>ln(ve)),fe.forEach(ve=>N.fetchers.delete(ve))}function Yt(M,Y,{flushSync:$}={}){let fe=N.actionData!=null&&N.navigation.formMethod!=null&&on(N.navigation.formMethod)&&N.navigation.state==="loading"&&M.state?._isRedirect!==!0,ve;Y.actionData?Object.keys(Y.actionData).length>0?ve=Y.actionData:ve=null:fe?ve=N.actionData:ve=null;let _e=Y.loaderData?Yy(N.loaderData,Y.loaderData,Y.matches||[],Y.errors):N.loaderData,we=N.blockers;we.size>0&&(we=new Map(we),we.forEach((Ne,De)=>we.set(De,Hr)));let Se=J?!1:kt(M,Y.matches||N.matches),xe=L===!0||N.navigation.formMethod!=null&&on(N.navigation.formMethod)&&M.state?._isRedirect!==!0;p&&(d=p,p=void 0),J||le==="POP"||(le==="PUSH"?t.history.push(M,M.state):le==="REPLACE"&&t.history.replace(M,M.state));let Ce;if(le==="POP"){let Ne=H.get(N.location.pathname);Ne&&Ne.has(M.pathname)?Ce={currentLocation:N.location,nextLocation:M}:H.has(M.pathname)&&(Ce={currentLocation:M,nextLocation:N.location})}else if(F){let Ne=H.get(N.location.pathname);Ne?Ne.add(M.pathname):(Ne=new Set([M.pathname]),H.set(N.location.pathname,Ne)),Ce={currentLocation:N.location,nextLocation:M}}Et({...Y,actionData:ve,loaderData:_e,historyAction:le,location:M,initialized:!0,navigation:zf,revalidation:"idle",restoreScrollPosition:Se,preventScrollReset:xe,blockers:we},{viewTransitionOpts:Ce,flushSync:$===!0}),le="POP",L=!1,F=!1,J=!1,B=!1,X?.resolve(),X=null,be?.resolve(),be=null}async function Qt(M,Y){if(X?.resolve(),X=null,typeof M=="number"){X||(X=$y());let $e=X.promise;return t.history.go(M),$e}let $=dd(N.location,N.matches,m,M,Y?.fromRouteId,Y?.relative),{path:fe,submission:ve,error:_e}=zy(!1,$,Y),we=N.location,Se=lo(N.location,fe,Y&&Y.state);Se={...Se,...t.history.encodeLocation(Se)};let xe=Y&&Y.replace!=null?Y.replace:void 0,Ce="PUSH";xe===!0?Ce="REPLACE":xe===!1||ve!=null&&on(ve.formMethod)&&ve.formAction===N.location.pathname+N.location.search&&(Ce="REPLACE");let Ne=Y&&"preventScrollReset"in Y?Y.preventScrollReset===!0:void 0,De=(Y&&Y.flushSync)===!0,Xe=Gn({currentLocation:we,nextLocation:Se,historyAction:Ce});if(Xe){xn(Xe,{state:"blocked",location:Se,proceed(){xn(Xe,{state:"proceeding",proceed:void 0,reset:void 0,location:Se}),Qt(M,Y)},reset(){let $e=new Map(N.blockers);$e.set(Xe,Hr),Et({blockers:$e})}});return}await Pt(Ce,Se,{submission:ve,pendingError:_e,preventScrollReset:Ne,replace:Y&&Y.replace,enableViewTransition:Y&&Y.viewTransition,flushSync:De,callSiteDefaultShouldRevalidate:Y&&Y.unstable_defaultShouldRevalidate})}function nn(){be||(be=$y()),he(),Et({revalidation:"loading"});let M=be.promise;return N.navigation.state==="submitting"?M:N.navigation.state==="idle"?(Pt(N.historyAction,N.location,{startUninterruptedRevalidation:!0}),M):(Pt(le||N.historyAction,N.navigation.location,{overrideNavigation:N.navigation,enableViewTransition:F===!0}),M)}async function Pt(M,Y,$){G&&G.abort(),G=null,le=M,J=($&&$.startUninterruptedRevalidation)===!0,Dl(N.location,N.matches),L=($&&$.preventScrollReset)===!0,F=($&&$.enableViewTransition)===!0;let fe=p||d,ve=$&&$.overrideNavigation,_e=$?.initialHydration&&N.matches&&N.matches.length>0&&!j?N.matches:ka(fe,Y,m),we=($&&$.flushSync)===!0;if(_e&&N.initialized&&!B&&BE(N.location,Y)&&!($&&$.submission&&on($.submission.formMethod))){Yt(Y,{matches:_e},{flushSync:we});return}let Se=Sn(_e,fe,Y.pathname);if(Se.active&&Se.matches&&(_e=Se.matches),!_e){let{error:U,notFoundMatches:se,route:me}=ml(Y.pathname);Yt(Y,{matches:se,loaderData:{},errors:{[me.id]:U}},{flushSync:we});return}G=new AbortController;let xe=Ii(t.history,Y,G.signal,$&&$.submission),Ce=t.getContext?await t.getContext():new Ry,Ne;if($&&$.pendingError)Ne=[Ca(_e).route.id,{type:"error",error:$.pendingError}];else if($&&$.submission&&on($.submission.formMethod)){let U=await dl(xe,Y,$.submission,_e,Ce,Se.active,$&&$.initialHydration===!0,{replace:$.replace,flushSync:we});if(U.shortCircuited)return;if(U.pendingActionResult){let[se,me]=U.pendingActionResult;if(qn(me)&&io(me.error)&&me.error.status===404){G=null,Yt(Y,{matches:U.matches,loaderData:{},errors:{[se]:me.error}});return}}_e=U.matches||_e,Ne=U.pendingActionResult,ve=Lf(Y,$.submission),we=!1,Se.active=!1,xe=Ii(t.history,xe.url,xe.signal)}let{shortCircuited:De,matches:Xe,loaderData:$e,errors:Ee}=await Dn(xe,Y,_e,Ce,Se.active,ve,$&&$.submission,$&&$.fetcherSubmission,$&&$.replace,$&&$.initialHydration===!0,we,Ne,$&&$.callSiteDefaultShouldRevalidate);De||(G=null,Yt(Y,{matches:Xe||_e,...Py(Ne),loaderData:$e,errors:Ee}))}async function dl(M,Y,$,fe,ve,_e,we,Se={}){he();let xe=VE(Y,$);if(Et({navigation:xe},{flushSync:Se.flushSync===!0}),_e){let De=await pl(fe,Y.pathname,M.signal);if(De.type==="aborted")return{shortCircuited:!0};if(De.type==="error"){if(De.partialMatches.length===0){let{matches:$e,route:Ee}=Nu(d);return{matches:$e,pendingActionResult:[Ee.id,{type:"error",error:De.error}]}}let Xe=Ca(De.partialMatches).route.id;return{matches:De.partialMatches,pendingActionResult:[Xe,{type:"error",error:De.error}]}}else if(De.matches)fe=De.matches;else{let{notFoundMatches:Xe,error:$e,route:Ee}=ml(Y.pathname);return{matches:Xe,pendingActionResult:[Ee.id,{type:"error",error:$e}]}}}let Ce,Ne=Gu(fe,Y);if(!Ne.route.action&&!Ne.route.lazy)Ce={type:"error",error:Wn(405,{method:M.method,pathname:Y.pathname,routeId:Ne.route.id})};else{let De=Gi(s,c,M,fe,Ne,we?[]:r,ve),Xe=await cn(M,De,ve,null);if(Ce=Xe[Ne.route.id],!Ce){for(let $e of fe)if(Xe[$e.route.id]){Ce=Xe[$e.route.id];break}}if(M.signal.aborted)return{shortCircuited:!0}}if(ei(Ce)){let De;return Se&&Se.replace!=null?De=Se.replace:De=qy(Ce.response.headers.get("Location"),new URL(M.url),m,t.history)===N.location.pathname+N.location.search,await pt(M,Ce,!0,{submission:$,replace:De}),{shortCircuited:!0}}if(qn(Ce)){let De=Ca(fe,Ne.route.id);return(Se&&Se.replace)!==!0&&(le="PUSH"),{matches:fe,pendingActionResult:[De.route.id,Ce,Ne.route.id]}}return{matches:fe,pendingActionResult:[Ne.route.id,Ce]}}async function Dn(M,Y,$,fe,ve,_e,we,Se,xe,Ce,Ne,De,Xe){let $e=_e||Lf(Y,we),Ee=we||Se||Xy($e),U=!J&&!Ce;if(ve){if(U){let jt=bn(De);Et({navigation:$e,...jt!==void 0?{actionData:jt}:{}},{flushSync:Ne})}let tt=await pl($,Y.pathname,M.signal);if(tt.type==="aborted")return{shortCircuited:!0};if(tt.type==="error"){if(tt.partialMatches.length===0){let{matches:rl,route:Zt}=Nu(d);return{matches:rl,loaderData:{},errors:{[Zt.id]:tt.error}}}let jt=Ca(tt.partialMatches).route.id;return{matches:tt.partialMatches,loaderData:{},errors:{[jt]:tt.error}}}else if(tt.matches)$=tt.matches;else{let{error:jt,notFoundMatches:rl,route:Zt}=ml(Y.pathname);return{matches:rl,loaderData:{},errors:{[Zt.id]:jt}}}}let se=p||d,{dsMatches:me,revalidatingFetchers:Ie}=Ly(M,fe,s,c,t.history,N,$,Ee,Y,Ce?[]:r,Ce===!0,B,te,ye,k,W,se,m,t.patchRoutesOnNavigation!=null,De,Xe);if(R=++pe,!t.dataStrategy&&!me.some(tt=>tt.shouldLoad)&&!me.some(tt=>tt.route.middleware&&tt.route.middleware.length>0)&&Ie.length===0){let tt=Ve();return Yt(Y,{matches:$,loaderData:{},errors:De&&qn(De[1])?{[De[0]]:De[1].error}:null,...Py(De),...tt?{fetchers:new Map(N.fetchers)}:{}},{flushSync:Ne}),{shortCircuited:!0}}if(U){let tt={};if(!ve){tt.navigation=$e;let jt=bn(De);jt!==void 0&&(tt.actionData=jt)}Ie.length>0&&(tt.fetchers=Nn(Ie)),Et(tt,{flushSync:Ne})}Ie.forEach(tt=>{at(tt.key),tt.controller&&ce.set(tt.key,tt.controller)});let ut=()=>Ie.forEach(tt=>at(tt.key));G&&G.signal.addEventListener("abort",ut);let{loaderResults:Be,fetcherResults:xt}=await ae(me,Ie,M,fe);if(M.signal.aborted)return{shortCircuited:!0};G&&G.signal.removeEventListener("abort",ut),Ie.forEach(tt=>ce.delete(tt.key));let _t=ju(Be);if(_t)return await pt(M,_t.result,!0,{replace:xe}),{shortCircuited:!0};if(_t=ju(xt),_t)return W.add(_t.key),await pt(M,_t.result,!0,{replace:xe}),{shortCircuited:!0};let{loaderData:Vt,errors:an}=Gy(N,$,Be,De,Ie,xt);Ce&&N.errors&&(an={...N.errors,...an});let yt=Ve(),gl=fn(R),yl=yt||gl||Ie.length>0;return{matches:$,loaderData:Vt,errors:an,...yl?{fetchers:new Map(N.fetchers)}:{}}}function bn(M){if(M&&!qn(M[1]))return{[M[0]]:M[1].data};if(N.actionData)return Object.keys(N.actionData).length===0?null:N.actionData}function Nn(M){return M.forEach(Y=>{let $=N.fetchers.get(Y.key),fe=Ir(void 0,$?$.data:void 0);N.fetchers.set(Y.key,fe)}),new Map(N.fetchers)}async function hl(M,Y,$,fe){at(M);let ve=(fe&&fe.flushSync)===!0,_e=p||d,we=dd(N.location,N.matches,m,$,Y,fe?.relative),Se=ka(_e,we,m),xe=Sn(Se,_e,we);if(xe.active&&xe.matches&&(Se=xe.matches),!Se){Ue(M,Y,Wn(404,{pathname:we}),{flushSync:ve});return}let{path:Ce,submission:Ne,error:De}=zy(!0,we,fe);if(De){Ue(M,Y,De,{flushSync:ve});return}let Xe=t.getContext?await t.getContext():new Ry,$e=(fe&&fe.preventScrollReset)===!0;if(Ne&&on(Ne.formMethod)){await Wl(M,Y,Ce,Se,Xe,xe.active,ve,$e,Ne,fe&&fe.unstable_defaultShouldRevalidate);return}k.set(M,{routeId:Y,path:Ce}),await Oa(M,Y,Ce,Se,Xe,xe.active,ve,$e,Ne)}async function Wl(M,Y,$,fe,ve,_e,we,Se,xe,Ce){he(),k.delete(M);let Ne=N.fetchers.get(M);Ae(M,XE(xe,Ne),{flushSync:we});let De=new AbortController,Xe=Ii(t.history,$,De.signal,xe);if(_e){let nt=await pl(fe,new URL(Xe.url).pathname,Xe.signal,M);if(nt.type==="aborted")return;if(nt.type==="error"){Ue(M,Y,nt.error,{flushSync:we});return}else if(nt.matches)fe=nt.matches;else{Ue(M,Y,Wn(404,{pathname:$}),{flushSync:we});return}}let $e=Gu(fe,$);if(!$e.route.action&&!$e.route.lazy){let nt=Wn(405,{method:xe.formMethod,pathname:$,routeId:Y});Ue(M,Y,nt,{flushSync:we});return}ce.set(M,De);let Ee=pe,U=Gi(s,c,Xe,fe,$e,r,ve),se=await cn(Xe,U,ve,M),me=se[$e.route.id];if(!me){for(let nt of U)if(se[nt.route.id]){me=se[nt.route.id];break}}if(Xe.signal.aborted){ce.get(M)===De&&ce.delete(M);return}if(ye.has(M)){if(ei(me)||qn(me)){Ae(M,Kl(void 0));return}}else{if(ei(me))if(ce.delete(M),R>Ee){Ae(M,Kl(void 0));return}else return W.add(M),Ae(M,Ir(xe)),pt(Xe,me,!1,{fetcherSubmission:xe,preventScrollReset:Se});if(qn(me)){Ue(M,Y,me.error);return}}let Ie=N.navigation.location||N.location,ut=Ii(t.history,Ie,De.signal),Be=p||d,xt=N.navigation.state!=="idle"?ka(Be,N.navigation.location,m):N.matches;Pe(xt,"Didn't find any matches after fetcher action");let _t=++pe;O.set(M,_t);let Vt=Ir(xe,me.data);N.fetchers.set(M,Vt);let{dsMatches:an,revalidatingFetchers:yt}=Ly(ut,ve,s,c,t.history,N,xt,xe,Ie,r,!1,B,te,ye,k,W,Be,m,t.patchRoutesOnNavigation!=null,[$e.route.id,me],Ce);yt.filter(nt=>nt.key!==M).forEach(nt=>{let La=nt.key,xo=N.fetchers.get(La),Qi=Ir(void 0,xo?xo.data:void 0);N.fetchers.set(La,Qi),at(La),nt.controller&&ce.set(La,nt.controller)}),Et({fetchers:new Map(N.fetchers)});let gl=()=>yt.forEach(nt=>at(nt.key));De.signal.addEventListener("abort",gl);let{loaderResults:yl,fetcherResults:tt}=await ae(an,yt,ut,ve);if(De.signal.aborted)return;if(De.signal.removeEventListener("abort",gl),O.delete(M),ce.delete(M),yt.forEach(nt=>ce.delete(nt.key)),N.fetchers.has(M)){let nt=Kl(me.data);N.fetchers.set(M,nt)}let jt=ju(yl);if(jt)return pt(ut,jt.result,!1,{preventScrollReset:Se});if(jt=ju(tt),jt)return W.add(jt.key),pt(ut,jt.result,!1,{preventScrollReset:Se});let{loaderData:rl,errors:Zt}=Gy(N,xt,yl,void 0,yt,tt);fn(_t),N.navigation.state==="loading"&&_t>R?(Pe(le,"Expected pending action"),G&&G.abort(),Yt(N.navigation.location,{matches:xt,loaderData:rl,errors:Zt,fetchers:new Map(N.fetchers)})):(Et({errors:Zt,loaderData:Yy(N.loaderData,rl,xt,Zt),fetchers:new Map(N.fetchers)}),B=!1)}async function Oa(M,Y,$,fe,ve,_e,we,Se,xe){let Ce=N.fetchers.get(M);Ae(M,Ir(xe,Ce?Ce.data:void 0),{flushSync:we});let Ne=new AbortController,De=Ii(t.history,$,Ne.signal);if(_e){let me=await pl(fe,new URL(De.url).pathname,De.signal,M);if(me.type==="aborted")return;if(me.type==="error"){Ue(M,Y,me.error,{flushSync:we});return}else if(me.matches)fe=me.matches;else{Ue(M,Y,Wn(404,{pathname:$}),{flushSync:we});return}}let Xe=Gu(fe,$);ce.set(M,Ne);let $e=pe,Ee=Gi(s,c,De,fe,Xe,r,ve),se=(await cn(De,Ee,ve,M))[Xe.route.id];if(ce.get(M)===Ne&&ce.delete(M),!De.signal.aborted){if(ye.has(M)){Ae(M,Kl(void 0));return}if(ei(se))if(R>$e){Ae(M,Kl(void 0));return}else{W.add(M),await pt(De,se,!1,{preventScrollReset:Se});return}if(qn(se)){Ue(M,Y,se.error);return}Ae(M,Kl(se.data))}}async function pt(M,Y,$,{submission:fe,fetcherSubmission:ve,preventScrollReset:_e,replace:we}={}){$||(X?.resolve(),X=null),Y.response.headers.has("X-Remix-Revalidate")&&(B=!0);let Se=Y.response.headers.get("Location");Pe(Se,"Expected a Location header on the redirect Response"),Se=qy(Se,new URL(M.url),m,t.history);let xe=lo(N.location,Se,{_isRedirect:!0});if(a){let Ee=!1;if(Y.response.headers.has("X-Remix-Reload-Document"))Ee=!0;else if(Yd(Se)){const U=sb(Se,!0);Ee=U.origin!==l.location.origin||tl(U.pathname,m)==null}if(Ee){we?l.location.replace(Se):l.location.assign(Se);return}}G=null;let Ce=we===!0||Y.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ne,formAction:De,formEncType:Xe}=N.navigation;!fe&&!ve&&Ne&&De&&Xe&&(fe=Xy(N.navigation));let $e=fe||ve;if(EE.has(Y.response.status)&&$e&&on($e.formMethod))await Pt(Ce,xe,{submission:{...$e,formAction:Se},preventScrollReset:_e||L,enableViewTransition:$?F:void 0});else{let Ee=Lf(xe,fe);await Pt(Ce,xe,{overrideNavigation:Ee,fetcherSubmission:ve,preventScrollReset:_e||L,enableViewTransition:$?F:void 0})}}async function cn(M,Y,$,fe){let ve,_e={};try{ve=await jE(y,M,Y,fe,$,!1)}catch(we){return Y.filter(Se=>Se.shouldLoad).forEach(Se=>{_e[Se.route.id]={type:"error",error:we}}),_e}if(M.signal.aborted)return _e;if(!on(M.method))for(let we of Y){if(ve[we.route.id]?.type==="error")break;!ve.hasOwnProperty(we.route.id)&&!N.loaderData.hasOwnProperty(we.route.id)&&(!N.errors||!N.errors.hasOwnProperty(we.route.id))&&we.shouldCallHandler()&&(ve[we.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${we.route.id}`)})}for(let[we,Se]of Object.entries(ve))if(FE(Se)){let xe=Se.result;_e[we]={type:"redirect",response:LE(xe,M,we,Y,m)}}else _e[we]=await zE(Se);return _e}async function ae(M,Y,$,fe){let ve=cn($,M,fe,null),_e=Promise.all(Y.map(async xe=>{if(xe.matches&&xe.match&&xe.request&&xe.controller){let Ne=(await cn(xe.request,xe.matches,fe,xe.key))[xe.match.route.id];return{[xe.key]:Ne}}else return Promise.resolve({[xe.key]:{type:"error",error:Wn(404,{pathname:xe.path})}})})),we=await ve,Se=(await _e).reduce((xe,Ce)=>Object.assign(xe,Ce),{});return{loaderResults:we,fetcherResults:Se}}function he(){B=!0,k.forEach((M,Y)=>{ce.has(Y)&&te.add(Y),at(Y)})}function Ae(M,Y,$={}){N.fetchers.set(M,Y),Et({fetchers:new Map(N.fetchers)},{flushSync:($&&$.flushSync)===!0})}function Ue(M,Y,$,fe={}){let ve=Ca(N.matches,Y);ln(M),Et({errors:{[ve.route.id]:$},fetchers:new Map(N.fetchers)},{flushSync:(fe&&fe.flushSync)===!0})}function Je(M){return de.set(M,(de.get(M)||0)+1),ye.has(M)&&ye.delete(M),N.fetchers.get(M)||wE}function qt(M,Y){at(M,Y?.reason),Ae(M,Kl(null))}function ln(M){let Y=N.fetchers.get(M);ce.has(M)&&!(Y&&Y.state==="loading"&&O.has(M))&&at(M),k.delete(M),O.delete(M),W.delete(M),ye.delete(M),te.delete(M),N.fetchers.delete(M)}function Rt(M){let Y=(de.get(M)||0)-1;Y<=0?(de.delete(M),ye.add(M)):de.set(M,Y),Et({fetchers:new Map(N.fetchers)})}function at(M,Y){let $=ce.get(M);$&&($.abort(Y),ce.delete(M))}function gt(M){for(let Y of M){let $=Je(Y),fe=Kl($.data);N.fetchers.set(Y,fe)}}function Ve(){let M=[],Y=!1;for(let $ of W){let fe=N.fetchers.get($);Pe(fe,`Expected fetcher: ${$}`),fe.state==="loading"&&(W.delete($),M.push($),Y=!0)}return gt(M),Y}function fn(M){let Y=[];for(let[$,fe]of O)if(fe<M){let ve=N.fetchers.get($);Pe(ve,`Expected fetcher: ${$}`),ve.state==="loading"&&(at($),O.delete($),Y.push($))}return gt(Y),Y.length>0}function Kt(M,Y){let $=N.blockers.get(M)||Hr;return Te.get(M)!==Y&&Te.set(M,Y),$}function ai(M){N.blockers.delete(M),Te.delete(M)}function xn(M,Y){let $=N.blockers.get(M)||Hr;Pe($.state==="unblocked"&&Y.state==="blocked"||$.state==="blocked"&&Y.state==="blocked"||$.state==="blocked"&&Y.state==="proceeding"||$.state==="blocked"&&Y.state==="unblocked"||$.state==="proceeding"&&Y.state==="unblocked",`Invalid blocker state transition: ${$.state} -> ${Y.state}`);let fe=new Map(N.blockers);fe.set(M,Y),Et({blockers:fe})}function Gn({currentLocation:M,nextLocation:Y,historyAction:$}){if(Te.size===0)return;Te.size>1&&zt(!1,"A router only supports one blocker at a time");let fe=Array.from(Te.entries()),[ve,_e]=fe[fe.length-1],we=N.blockers.get(ve);if(!(we&&we.state==="proceeding")&&_e({currentLocation:M,nextLocation:Y,historyAction:$}))return ve}function ml(M){let Y=Wn(404,{pathname:M}),$=p||d,{matches:fe,route:ve}=Nu($);return{notFoundMatches:fe,route:ve,error:Y}}function dn(M,Y,$){if(E=M,D=Y,_=$||null,!C&&N.navigation===zf){C=!0;let fe=kt(N.location,N.matches);fe!=null&&Et({restoreScrollPosition:fe})}return()=>{E=null,D=null,_=null}}function Rl(M,Y){return _&&_(M,Y.map(fe=>QS(fe,N.loaderData)))||M.key}function Dl(M,Y){if(E&&D){let $=Rl(M,Y);E[$]=D()}}function kt(M,Y){if(E){let $=Rl(M,Y),fe=E[$];if(typeof fe=="number")return fe}return null}function Sn(M,Y,$){if(t.patchRoutesOnNavigation)if(M){if(Object.keys(M[0].params).length>0)return{active:!0,matches:Jr(Y,$,m,!0)}}else return{active:!0,matches:Jr(Y,$,m,!0)||[]};return{active:!1,matches:null}}async function pl(M,Y,$,fe){if(!t.patchRoutesOnNavigation)return{type:"success",matches:M};let ve=M;for(;;){let _e=p==null,we=p||d,Se=c;try{await t.patchRoutesOnNavigation({signal:$,path:Y,matches:ve,fetcherKey:fe,patch:(Ne,De)=>{$.aborted||Uy(Ne,De,we,Se,s,!1)}})}catch(Ne){return{type:"error",error:Ne,partialMatches:ve}}finally{_e&&!$.aborted&&(d=[...d])}if($.aborted)return{type:"aborted"};let xe=ka(we,Y,m),Ce=null;if(xe){if(Object.keys(xe[0].params).length===0)return{type:"success",matches:xe};if(Ce=Jr(we,Y,m,!0),!(Ce&&ve.length<Ce.length&&il(ve,Ce.slice(0,ve.length))))return{type:"success",matches:xe}}if(Ce||(Ce=Jr(we,Y,m,!0)),!Ce||il(ve,Ce))return{type:"success",matches:null};ve=Ce}}function il(M,Y){return M.length===Y.length&&M.every(($,fe)=>$.route.id===Y[fe].route.id)}function Ma(M){c={},p=ao(M,s,void 0,c)}function za(M,Y,$=!1){let fe=p==null;Uy(M,Y,p||d,c,s,$),fe&&(d=[...d],Et({}))}return q={get basename(){return m},get future(){return g},get state(){return N},get routes(){return d},get window(){return l},initialize:Oe,subscribe:vn,enableScrollRestoration:dn,navigate:Qt,fetch:hl,revalidate:nn,createHref:M=>t.history.createHref(M),encodeLocation:M=>t.history.encodeLocation(M),getFetcher:Je,resetFetcher:qt,deleteFetcher:Rt,dispose:At,getBlocker:Kt,deleteBlocker:ai,patchRoutes:za,_internalFetchControllers:ce,_internalSetRoutes:Ma,_internalSetStateDoNotUseOrYouWillBreakYourApp(M){Et(M)}},t.unstable_instrumentations&&(q=mE(q,t.unstable_instrumentations.map(M=>M.router).filter(Boolean))),q}function CE(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function dd(t,l,a,r,u,s){let c,d;if(u){c=[];for(let m of l)if(c.push(m),m.route.id===u){d=m;break}}else c=l,d=l[l.length-1];let p=Vd(r||".",Pd(c),tl(t.pathname,a)||t.pathname,s==="path");if(r==null&&(p.search=t.search,p.hash=t.hash),(r==null||r===""||r===".")&&d){let m=Qd(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(S=>S).forEach(S=>y.append("index",S));let b=y.toString();p.search=b?`?${b}`:""}}return a!=="/"&&(p.pathname=uE({basename:a,pathname:p.pathname})),Cl(p)}function zy(t,l,a){if(!a||!CE(a))return{path:l};if(a.formMethod&&!PE(a.formMethod))return{path:l,error:Wn(405,{method:a.formMethod})};let r=()=>({path:l,error:Wn(400,{type:"invalid-body"})}),s=(a.formMethod||"get").toUpperCase(),c=Cb(l);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!on(s))return r();let g=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((b,[S,E])=>`${b}${S}=${E}
10
- `,""):String(a.body);return{path:l,submission:{formMethod:s,formAction:c,formEncType:a.formEncType,formData:void 0,json:void 0,text:g}}}else if(a.formEncType==="application/json"){if(!on(s))return r();try{let g=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:l,submission:{formMethod:s,formAction:c,formEncType:a.formEncType,formData:void 0,json:g,text:void 0}}}catch{return r()}}}Pe(typeof FormData=="function","FormData is not available in this environment");let d,p;if(a.formData)d=pd(a.formData),p=a.formData;else if(a.body instanceof FormData)d=pd(a.body),p=a.body;else if(a.body instanceof URLSearchParams)d=a.body,p=Fy(d);else if(a.body==null)d=new URLSearchParams,p=new FormData;else try{d=new URLSearchParams(a.body),p=Fy(d)}catch{return r()}let m={formMethod:s,formAction:c,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(on(m.formMethod))return{path:l,submission:m};let y=Da(l);return t&&y.search&&Qd(y.search)&&d.append("index",""),y.search=`?${d}`,{path:Cl(y),submission:m}}function Ly(t,l,a,r,u,s,c,d,p,m,y,g,b,S,E,_,D,C,A,j,ee){let V=j?qn(j[1])?j[1].error:j[1].data:void 0,q=u.createURL(s.location),N=u.createURL(p),le;if(y&&s.errors){let J=Object.keys(s.errors)[0];le=c.findIndex(B=>B.route.id===J)}else if(j&&qn(j[1])){let J=j[0];le=c.findIndex(B=>B.route.id===J)-1}let X=j?j[1].statusCode:void 0,L=X&&X>=400,G={currentUrl:q,currentParams:s.matches[0]?.params||{},nextUrl:N,nextParams:c[0].params,...d,actionResult:V,actionStatus:X},F=co(c),H=c.map((J,B)=>{let{route:te}=J,ce=null;if(le!=null&&B>le?ce=!1:te.lazy?ce=!0:Xd(te)?y?ce=hd(te,s.loaderData,s.errors):AE(s.loaderData,s.matches[B],J)&&(ce=!0):ce=!1,ce!==null)return md(a,r,t,F,J,m,l,ce);let pe=!1;typeof ee=="boolean"?pe=ee:L?pe=!1:(g||q.pathname+q.search===N.pathname+N.search||q.search!==N.search||_E(s.matches[B],J))&&(pe=!0);let R={...G,defaultShouldRevalidate:pe},O=Wr(J,R);return md(a,r,t,F,J,m,l,O,R,ee)}),ie=[];return E.forEach((J,B)=>{if(y||!c.some(de=>de.route.id===J.routeId)||S.has(B))return;let te=s.fetchers.get(B),ce=te&&te.state!=="idle"&&te.data===void 0,pe=ka(D,J.path,C);if(!pe){if(A&&ce)return;ie.push({key:B,routeId:J.routeId,path:J.path,matches:null,match:null,request:null,controller:null});return}if(_.has(B))return;let R=Gu(pe,J.path),O=new AbortController,W=Ii(u,J.path,O.signal),k=null;if(b.has(B))b.delete(B),k=Gi(a,r,W,pe,R,m,l);else if(ce)g&&(k=Gi(a,r,W,pe,R,m,l));else{let de;typeof ee=="boolean"?de=ee:L?de=!1:de=g;let ye={...G,defaultShouldRevalidate:de};Wr(R,ye)&&(k=Gi(a,r,W,pe,R,m,l,ye))}k&&ie.push({key:B,routeId:J.routeId,path:J.path,matches:k,match:R,request:W,controller:O})}),{dsMatches:H,revalidatingFetchers:ie}}function Xd(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function hd(t,l,a){if(t.lazy)return!0;if(!Xd(t))return!1;let r=l!=null&&t.id in l,u=a!=null&&a[t.id]!==void 0;return!r&&u?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!r&&!u}function AE(t,l,a){let r=!l||a.route.id!==l.route.id,u=!t.hasOwnProperty(a.route.id);return r||u}function _E(t,l){let a=t.route.path;return t.pathname!==l.pathname||a!=null&&a.endsWith("*")&&t.params["*"]!==l.params["*"]}function Wr(t,l){if(t.route.shouldRevalidate){let a=t.route.shouldRevalidate(l);if(typeof a=="boolean")return a}return l.defaultShouldRevalidate}function Uy(t,l,a,r,u,s){let c;if(t){let m=r[t];Pe(m,`No route found to patch children into: routeId = ${t}`),m.children||(m.children=[]),c=m.children}else c=a;let d=[],p=[];if(l.forEach(m=>{let y=c.find(g=>Sb(m,g));y?p.push({existingRoute:y,newRoute:m}):d.push(m)}),d.length>0){let m=ao(d,u,[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,[S]=ao([g],u,[],{},!0);Object.assign(b,{element:S.element?S.element:b.element,errorElement:S.errorElement?S.errorElement:b.errorElement,hydrateFallbackElement:S.hydrateFallbackElement?S.hydrateFallbackElement:b.hydrateFallbackElement})}}function Sb(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((a,r)=>l.children?.some(u=>Sb(a,u))):!1}var By=new WeakMap,Eb=({key:t,route:l,manifest:a,mapRouteProperties:r})=>{let u=a[l.id];if(Pe(u,"No route found in manifest"),!u.lazy||typeof u.lazy!="object")return;let s=u.lazy[t];if(!s)return;let c=By.get(u);c||(c={},By.set(u,c));let d=c[t];if(d)return d;let p=(async()=>{let m=PS(t),g=u[t]!==void 0&&t!=="hasErrorBoundary";if(m)zt(!m,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),c[t]=Promise.resolve();else if(g)zt(!1,`Route "${u.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let b=await s();b!=null&&(Object.assign(u,{[t]:b}),Object.assign(u,r(u)))}typeof u.lazy=="object"&&(u.lazy[t]=void 0,Object.values(u.lazy).every(b=>b===void 0)&&(u.lazy=void 0))})();return c[t]=p,p},Hy=new WeakMap;function RE(t,l,a,r,u){let s=a[t.id];if(Pe(s,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let y=Hy.get(s);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let g=(async()=>{Pe(typeof t.lazy=="function","No lazy route function found");let b=await t.lazy(),S={};for(let E in b){let _=b[E];if(_===void 0)continue;let D=XS(E),A=s[E]!==void 0&&E!=="hasErrorBoundary";D?zt(!D,"Route property "+E+" is not a supported property to be returned from a lazy route function. This property will be ignored."):A?zt(!A,`Route "${s.id}" has a static property "${E}" defined but its lazy function is also returning a value for this property. The lazy route property "${E}" will be ignored.`):S[E]=_}Object.assign(s,S),Object.assign(s,{...r(s),lazy:void 0})})();return Hy.set(s,g),g.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:g}}let c=Object.keys(t.lazy),d=[],p;for(let y of c){if(u&&u.includes(y))continue;let g=Eb({key:y,route:t,manifest:a,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 Iy(t){let l=t.matches.filter(u=>u.shouldLoad),a={};return(await Promise.all(l.map(u=>u.resolve()))).forEach((u,s)=>{a[l[s].route.id]=u}),a}async function DE(t){return t.matches.some(l=>l.route.middleware)?wb(t,()=>Iy(t)):Iy(t)}function wb(t,l){return NE(t,l,r=>{if(YE(r))throw r;return r},IE,a);function a(r,u,s){if(s)return Promise.resolve(Object.assign(s.value,{[u]:{type:"error",result:r}}));{let{matches:c}=t,d=Math.min(Math.max(c.findIndex(m=>m.route.id===u),0),Math.max(c.findIndex(m=>m.shouldCallHandler()),0)),p=Ca(c,c[d].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:r}})}}}async function NE(t,l,a,r,u){let{matches:s,request:c,params:d,context:p,unstable_pattern:m}=t,y=s.flatMap(b=>b.route.middleware?b.route.middleware.map(S=>[b.route.id,S]):[]);return await Tb({request:c,params:d,context:p,unstable_pattern:m},y,l,a,r,u)}async function Tb(t,l,a,r,u,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 a();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 Tb(t,l,a,r,u,s,c+1)},g.value}catch(S){return g={value:await s(S,m,g)},g.value}};try{let S=await y(t,b),E=S!=null?r(S):void 0;return u(E)?E:g?E??g.value:(g={value:await b()},g.value)}catch(S){return await s(S,m,g)}}function kb(t,l,a,r,u){let s=Eb({key:"middleware",route:r.route,manifest:l,mapRouteProperties:t}),c=RE(r.route,on(a.method)?"action":"loader",l,t,u);return{middleware:s,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function md(t,l,a,r,u,s,c,d,p=null,m){let y=!1,g=kb(t,l,a,u,s);return{...u,_lazyPromises:g,shouldLoad:d,shouldRevalidateArgs:p,shouldCallHandler(b){return y=!0,p?typeof m=="boolean"?Wr(u,{...p,defaultShouldRevalidate:m}):typeof b=="boolean"?Wr(u,{...p,defaultShouldRevalidate:b}):Wr(u,p):d},resolve(b){let{lazy:S,loader:E,middleware:_}=u.route,D=y||d||b&&!on(a.method)&&(S||E),C=_&&_.length>0&&!E&&!S;return D&&(on(a.method)||!C)?OE({request:a,unstable_pattern:r,match:u,lazyHandlerPromise:g?.handler,lazyRoutePromise:g?.route,handlerOverride:b,scopedContext:c}):Promise.resolve({type:"data",result:void 0})}}}function Gi(t,l,a,r,u,s,c,d=null){return r.map(p=>p.route.id!==u.route.id?{...p,shouldLoad:!1,shouldRevalidateArgs:d,shouldCallHandler:()=>!1,_lazyPromises:kb(t,l,a,p,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:md(t,l,a,co(r),p,s,c,!0,d))}async function jE(t,l,a,r,u,s){a.some(m=>m._lazyPromises?.middleware)&&await Promise.all(a.map(m=>m._lazyPromises?.middleware));let c={request:l,unstable_pattern:co(a),params:a[0].params,context:u,matches:a},p=await t({...c,fetcherKey:r,runClientMiddleware:m=>{let y=c;return wb(y,()=>m({...y,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return p}async function OE({request:t,unstable_pattern:l,match:a,lazyHandlerPromise:r,lazyRoutePromise:u,handlerOverride:s,scopedContext:c}){let d,p,m=on(t.method),y=m?"action":"loader",g=b=>{let S,E=new Promise((C,A)=>S=A);p=()=>S(),t.signal.addEventListener("abort",p);let _=C=>typeof b!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${y}" [routeId: ${a.route.id}]`)):b({request:t,unstable_pattern:l,params:a.params,context:c},...C!==void 0?[C]:[]),D=(async()=>{try{return{type:"data",result:await(s?s(A=>_(A)):_())}}catch(C){return{type:"error",result:C}}})();return Promise.race([D,E])};try{let b=m?a.route.action:a.route.loader;if(r||u)if(b){let S,[E]=await Promise.all([g(b).catch(_=>{S=_}),r,u]);if(S!==void 0)throw S;d=E}else{await r;let S=m?a.route.action:a.route.loader;if(S)[d]=await Promise.all([g(S),u]);else if(y==="action"){let E=new URL(t.url),_=E.pathname+E.search;throw Wn(405,{method:t.method,pathname:_,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(b)d=await g(b);else{let S=new URL(t.url),E=S.pathname+S.search;throw Wn(404,{pathname:E})}}catch(b){return{type:"error",result:b}}finally{p&&t.signal.removeEventListener("abort",p)}return d}async function ME(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 zE(t){let{result:l,type:a}=t;if($d(l)){let r;try{r=await ME(l)}catch(u){return{type:"error",error:u}}return a==="error"?{type:"error",error:new so(l.status,l.statusText,r),statusCode:l.status,headers:l.headers}:{type:"data",data:r,statusCode:l.status,headers:l.headers}}return a==="error"?Vy(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:HE(l),statusCode:io(l)?l.status:void 0,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"error",error:l,statusCode:io(l)?l.status:void 0}:Vy(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 LE(t,l,a,r,u){let s=t.headers.get("Location");if(Pe(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Yd(s)){let c=r.slice(0,r.findIndex(d=>d.route.id===a)+1);s=dd(new URL(l.url),c,u,s),t.headers.set("Location",s)}return t}function qy(t,l,a,r){let u=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Yd(t)){let s=t,c=s.startsWith("//")?new URL(l.protocol+s):new URL(s);if(u.includes(c.protocol))throw new Error("Invalid redirect location");let d=tl(c.pathname,a)!=null;if(c.origin===l.origin&&d)return c.pathname+c.search+c.hash}try{let s=r.createURL(t);if(u.includes(s.protocol))throw new Error("Invalid redirect location")}catch{}return t}function Ii(t,l,a,r){let u=t.createURL(Cb(l)).toString(),s={signal:a};if(r&&on(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=pd(r.formData):s.body=r.formData}return new Request(u,s)}function pd(t){let l=new URLSearchParams;for(let[a,r]of t.entries())l.append(a,typeof r=="string"?r:r.name);return l}function Fy(t){let l=new FormData;for(let[a,r]of t.entries())l.append(a,r);return l}function UE(t,l,a,r=!1,u=!1){let s={},c=null,d,p=!1,m={},y=a&&qn(a[1])?a[1].error:void 0;return t.forEach(g=>{if(!(g.route.id in l))return;let b=g.route.id,S=l[b];if(Pe(!ei(S),"Cannot handle redirect results in processLoaderData"),qn(S)){let E=S.error;if(y!==void 0&&(E=y,y=void 0),c=c||{},u)c[b]=E;else{let _=Ca(t,b);c[_.route.id]==null&&(c[_.route.id]=E)}r||(s[b]=xb),p||(p=!0,d=io(S.error)?S.error.status:500),S.headers&&(m[b]=S.headers)}else s[b]=S.data,S.statusCode&&S.statusCode!==200&&!p&&(d=S.statusCode),S.headers&&(m[b]=S.headers)}),y!==void 0&&a&&(c={[a[0]]:y},a[2]&&(s[a[2]]=void 0)),{loaderData:s,errors:c,statusCode:d||200,loaderHeaders:m}}function Gy(t,l,a,r,u,s){let{loaderData:c,errors:d}=UE(l,a,r);return u.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(Pe(b,"Did not find corresponding fetcher result"),qn(b)){let S=Ca(t.matches,y?.route.id);d&&d[S.route.id]||(d={...d,[S.route.id]:b.error}),t.fetchers.delete(m)}else if(ei(b))Pe(!1,"Unhandled fetcher revalidation redirect");else{let S=Kl(b.data);t.fetchers.set(m,S)}}),{loaderData:c,errors:d}}function Yy(t,l,a,r){let u=Object.entries(l).filter(([,s])=>s!==xb).reduce((s,[c,d])=>(s[c]=d,s),{});for(let s of a){let c=s.route.id;if(!l.hasOwnProperty(c)&&t.hasOwnProperty(c)&&s.route.loader&&(u[c]=t[c]),r&&r.hasOwnProperty(c))break}return u}function Py(t){return t?qn(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function Ca(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 Nu(t){let l=t.length===1?t[0]:t.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:l}],route:l}}function Wn(t,{pathname:l,routeId:a,method:r,type:u,message:s}={}){let c="Unknown Server Error",d="Unknown @remix-run/router error";return t===400?(c="Bad Request",r&&l&&a?d=`You made a ${r} request to "${l}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:u==="invalid-body"&&(d="Unable to encode submission body")):t===403?(c="Forbidden",d=`Route "${a}" does not match URL "${l}"`):t===404?(c="Not Found",d=`No route matches URL "${l}"`):t===405&&(c="Method Not Allowed",r&&l&&a?d=`You made a ${r.toUpperCase()} request to "${l}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:r&&(d=`Invalid request method "${r.toUpperCase()}"`)),new so(t||500,c,new Error(d),!0)}function ju(t){let l=Object.entries(t);for(let a=l.length-1;a>=0;a--){let[r,u]=l[a];if(ei(u))return{key:r,result:u}}}function Cb(t){let l=typeof t=="string"?Da(t):t;return Cl({...l,hash:""})}function BE(t,l){return t.pathname!==l.pathname||t.search!==l.search?!1:t.hash===""?l.hash!=="":t.hash===l.hash?!0:l.hash!==""}function HE(t){return new so(t.init?.status??500,t.init?.statusText??"Internal Server Error",t.data)}function IE(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([l,a])=>typeof l=="string"&&qE(a))}function qE(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function FE(t){return $d(t.result)&&vb.has(t.result.status)}function qn(t){return t.type==="error"}function ei(t){return(t&&t.type)==="redirect"}function Vy(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function $d(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function GE(t){return vb.has(t)}function YE(t){return $d(t)&&GE(t.status)&&t.headers.has("Location")}function PE(t){return SE.has(t.toUpperCase())}function on(t){return bE.has(t.toUpperCase())}function Qd(t){return new URLSearchParams(t).getAll("index").some(l=>l==="")}function Gu(t,l){let a=typeof l=="string"?Da(l).search:l.search;if(t[t.length-1].route.index&&Qd(a||""))return t[t.length-1];let r=hb(t);return r[r.length-1]}function Xy(t){let{formMethod:l,formAction:a,formEncType:r,text:u,formData:s,json:c}=t;if(!(!l||!a||!r)){if(u!=null)return{formMethod:l,formAction:a,formEncType:r,formData:void 0,json:void 0,text:u};if(s!=null)return{formMethod:l,formAction:a,formEncType:r,formData:s,json:void 0,text:void 0};if(c!==void 0)return{formMethod:l,formAction:a,formEncType:r,formData:void 0,json:c,text:void 0}}}function Lf(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 VE(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 Ir(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 XE(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 Kl(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 $E(t,l){try{let a=t.sessionStorage.getItem(bb);if(a){let r=JSON.parse(a);for(let[u,s]of Object.entries(r||{}))s&&Array.isArray(s)&&l.set(u,new Set(s||[]))}}catch{}}function QE(t,l){if(l.size>0){let a={};for(let[r,u]of l)a[r]=[...u];try{t.sessionStorage.setItem(bb,JSON.stringify(a))}catch(r){zt(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function $y(){let t,l,a=new Promise((r,u)=>{t=async s=>{r(s);try{await a}catch{}},l=async s=>{u(s);try{await a}catch{}}});return{promise:a,resolve:t,reject:l}}var ni=T.createContext(null);ni.displayName="DataRouter";var fo=T.createContext(null);fo.displayName="DataRouterState";var Ab=T.createContext(!1);function KE(){return T.useContext(Ab)}var Kd=T.createContext({isTransitioning:!1});Kd.displayName="ViewTransition";var _b=T.createContext(new Map);_b.displayName="Fetchers";var ZE=T.createContext(null);ZE.displayName="Await";var ll=T.createContext(null);ll.displayName="Navigation";var as=T.createContext(null);as.displayName="Location";var fl=T.createContext({outlet:null,matches:[],isDataRoute:!1});fl.displayName="Route";var Zd=T.createContext(null);Zd.displayName="RouteError";var Rb="REACT_ROUTER_ERROR",JE="REDIRECT",WE="ROUTE_ERROR_RESPONSE";function ew(t){if(t.startsWith(`${Rb}:${JE}:{`))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 tw(t){if(t.startsWith(`${Rb}:${WE}:{`))try{let l=JSON.parse(t.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new so(l.status,l.statusText,l.data)}catch{}}function nw(t,{relative:l}={}){Pe(ho(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:r}=T.useContext(ll),{hash:u,pathname:s,search:c}=mo(t,{relative:l}),d=s;return a!=="/"&&(d=s==="/"?a:kl([a,s])),r.createHref({pathname:d,search:c,hash:u})}function ho(){return T.useContext(as)!=null}function al(){return Pe(ho(),"useLocation() may be used only in the context of a <Router> component."),T.useContext(as).location}var Db="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Nb(t){T.useContext(ll).static||T.useLayoutEffect(t)}function Al(){let{isDataRoute:t}=T.useContext(fl);return t?gw():lw()}function lw(){Pe(ho(),"useNavigate() may be used only in the context of a <Router> component.");let t=T.useContext(ni),{basename:l,navigator:a}=T.useContext(ll),{matches:r}=T.useContext(fl),{pathname:u}=al(),s=JSON.stringify(Pd(r)),c=T.useRef(!1);return Nb(()=>{c.current=!0}),T.useCallback((p,m={})=>{if(zt(c.current,Db),!c.current)return;if(typeof p=="number"){a.go(p);return}let y=Vd(p,JSON.parse(s),u,m.relative==="path");t==null&&l!=="/"&&(y.pathname=y.pathname==="/"?l:kl([l,y.pathname])),(m.replace?a.replace:a.push)(y,m.state,m)},[l,a,s,u,t])}var jb=T.createContext(null);function Jd(){return T.useContext(jb)}function aw(t){let l=T.useContext(fl).outlet;return T.useMemo(()=>l&&T.createElement(jb.Provider,{value:t},l),[l,t])}function Ob(){let{matches:t}=T.useContext(fl),l=t[t.length-1];return l?l.params:{}}function mo(t,{relative:l}={}){let{matches:a}=T.useContext(fl),{pathname:r}=al(),u=JSON.stringify(Pd(a));return T.useMemo(()=>Vd(t,JSON.parse(u),r,l==="path"),[t,u,r,l])}function iw(t,l,a,r,u){Pe(ho(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=T.useContext(ll),{matches:c}=T.useContext(fl),d=c[c.length-1],p=d?d.params:{},m=d?d.pathname:"/",y=d?d.pathnameBase:"/",g=d&&d.route;{let A=g&&g.path||"";zb(m,!g||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${A}">) 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="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let b=al(),S;S=b;let E=S.pathname||"/",_=E;if(y!=="/"){let A=y.replace(/^\//,"").split("/");_="/"+E.replace(/^\//,"").split("/").slice(A.length).join("/")}let D=ka(t,{pathname:_});return zt(g||D!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),zt(D==null||D[D.length-1].route.element!==void 0||D[D.length-1].route.Component!==void 0||D[D.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.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.`),cw(D&&D.map(A=>Object.assign({},A,{params:Object.assign({},p,A.params),pathname:kl([y,s.encodeLocation?s.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?y:kl([y,s.encodeLocation?s.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),c,a,r,u)}function rw(){let t=pw(),l=io(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",u={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=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:s},"ErrorBoundary")," or"," ",T.createElement("code",{style:s},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},l),a?T.createElement("pre",{style:u},a):null,c)}var ow=T.createElement(rw,null),Mb=class extends T.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 a=tw(t.digest);a&&(t=a)}let l=t!==void 0?T.createElement(fl.Provider,{value:this.props.routeContext},T.createElement(Zd.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?T.createElement(uw,{error:t},l):l}};Mb.contextType=Ab;var Uf=new WeakMap;function uw({children:t,error:l}){let{basename:a}=T.useContext(ll);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let r=ew(l.digest);if(r){let u=Uf.get(l);if(u)throw u;let s=pb(r.location,a);if(mb&&!Uf.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 Uf.set(l,c),c}return T.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function sw({routeContext:t,match:l,children:a}){let r=T.useContext(ni);return r&&r.static&&r.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=l.route.id),T.createElement(fl.Provider,{value:t},a)}function cw(t,l=[],a=null,r=null,u=null){if(t==null){if(!a)return null;if(a.errors)t=a.matches;else if(l.length===0&&!a.initialized&&a.matches.length>0)t=a.matches;else return null}let s=t,c=a?.errors;if(c!=null){let y=s.findIndex(g=>g.route.id&&c?.[g.route.id]!==void 0);Pe(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(a)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:S}=a,E=g.route.loader&&!b.hasOwnProperty(g.route.id)&&(!S||S[g.route.id]===void 0);if(g.route.lazy||E){d=!0,p>=0?s=s.slice(0,p+1):s=[s[0]];break}}}let m=a&&r?(y,g)=>{r(y,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:co(a.matches),errorInfo:g})}:void 0;return s.reduceRight((y,g,b)=>{let S,E=!1,_=null,D=null;a&&(S=c&&g.route.id?c[g.route.id]:void 0,_=g.route.errorElement||ow,d&&(p<0&&b===0?(zb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,D=null):p===b&&(E=!0,D=g.route.hydrateFallbackElement||null)));let C=l.concat(s.slice(0,b+1)),A=()=>{let j;return S?j=_:E?j=D:g.route.Component?j=T.createElement(g.route.Component,null):g.route.element?j=g.route.element:j=y,T.createElement(sw,{match:g,routeContext:{outlet:y,matches:C,isDataRoute:a!=null},children:j})};return a&&(g.route.ErrorBoundary||g.route.errorElement||b===0)?T.createElement(Mb,{location:a.location,revalidation:a.revalidation,component:_,error:S,children:A(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:m}):A()},null)}function Wd(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fw(t){let l=T.useContext(ni);return Pe(l,Wd(t)),l}function dw(t){let l=T.useContext(fo);return Pe(l,Wd(t)),l}function hw(t){let l=T.useContext(fl);return Pe(l,Wd(t)),l}function eh(t){let l=hw(t),a=l.matches[l.matches.length-1];return Pe(a.route.id,`${t} can only be used on routes that contain a unique "id"`),a.route.id}function mw(){return eh("useRouteId")}function pw(){let t=T.useContext(Zd),l=dw("useRouteError"),a=eh("useRouteError");return t!==void 0?t:l.errors?.[a]}function gw(){let{router:t}=fw("useNavigate"),l=eh("useNavigate"),a=T.useRef(!1);return Nb(()=>{a.current=!0}),T.useCallback(async(u,s={})=>{zt(a.current,Db),a.current&&(typeof u=="number"?await t.navigate(u):await t.navigate(u,{fromRouteId:l,...s}))},[t,l])}var Qy={};function zb(t,l,a){!l&&!Qy[t]&&(Qy[t]=!0,zt(!1,a))}var Ky={};function Zy(t,l){!t&&!Ky[l]&&(Ky[l]=!0,console.warn(l))}var yw="useOptimistic",Jy=jS[yw],vw=()=>{};function bw(t){return Jy?Jy(t):[t,vw]}function xw(t){let l={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&zt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(l,{element:T.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&zt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(l,{hydrateFallbackElement:T.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&zt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(l,{errorElement:T.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),l}var Sw=["HydrateFallback","hydrateFallbackElement"],Ew=class{constructor(){this.status="pending",this.promise=new Promise((t,l)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",t(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",l(a))}})}};function ww({router:t,flushSync:l,onError:a,unstable_useTransitions:r}){r=KE()||r;let[s,c]=T.useState(t.state),[d,p]=bw(s),[m,y]=T.useState(),[g,b]=T.useState({isTransitioning:!1}),[S,E]=T.useState(),[_,D]=T.useState(),[C,A]=T.useState(),j=T.useRef(new Map),ee=T.useCallback((le,{deletedFetchers:X,newErrors:L,flushSync:G,viewTransitionOpts:F})=>{L&&a&&Object.values(L).forEach(ie=>a(ie,{location:le.location,params:le.matches[0]?.params??{},unstable_pattern:co(le.matches)})),le.fetchers.forEach((ie,J)=>{ie.data!==void 0&&j.current.set(J,ie.data)}),X.forEach(ie=>j.current.delete(ie)),Zy(G===!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 H=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(Zy(F==null||H,"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."),!F||!H){l&&G?l(()=>c(le)):r===!1?c(le):T.startTransition(()=>{r===!0&&p(ie=>Wy(ie,le)),c(le)});return}if(l&&G){l(()=>{_&&(S?.resolve(),_.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:F.currentLocation,nextLocation:F.nextLocation})});let ie=t.window.document.startViewTransition(()=>{l(()=>c(le))});ie.finished.finally(()=>{l(()=>{E(void 0),D(void 0),y(void 0),b({isTransitioning:!1})})}),l(()=>D(ie));return}_?(S?.resolve(),_.skipTransition(),A({state:le,currentLocation:F.currentLocation,nextLocation:F.nextLocation})):(y(le),b({isTransitioning:!0,flushSync:!1,currentLocation:F.currentLocation,nextLocation:F.nextLocation}))},[t.window,l,_,S,r,p,a]);T.useLayoutEffect(()=>t.subscribe(ee),[t,ee]),T.useEffect(()=>{g.isTransitioning&&!g.flushSync&&E(new Ew)},[g]),T.useEffect(()=>{if(S&&m&&t.window){let le=m,X=S.promise,L=t.window.document.startViewTransition(async()=>{r===!1?c(le):T.startTransition(()=>{r===!0&&p(G=>Wy(G,le)),c(le)}),await X});L.finished.finally(()=>{E(void 0),D(void 0),y(void 0),b({isTransitioning:!1})}),D(L)}},[m,S,t.window,r,p]),T.useEffect(()=>{S&&m&&d.location.key===m.location.key&&S.resolve()},[S,_,d.location,m]),T.useEffect(()=>{!g.isTransitioning&&C&&(y(C.state),b({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),A(void 0))},[g.isTransitioning,C]);let V=T.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:le=>t.navigate(le),push:(le,X,L)=>t.navigate(le,{state:X,preventScrollReset:L?.preventScrollReset}),replace:(le,X,L)=>t.navigate(le,{replace:!0,state:X,preventScrollReset:L?.preventScrollReset})}),[t]),q=t.basename||"/",N=T.useMemo(()=>({router:t,navigator:V,static:!1,basename:q,onError:a}),[t,V,q,a]);return T.createElement(T.Fragment,null,T.createElement(ni.Provider,{value:N},T.createElement(fo.Provider,{value:d},T.createElement(_b.Provider,{value:j.current},T.createElement(Kd.Provider,{value:g},T.createElement(Aw,{basename:q,location:d.location,navigationType:d.historyAction,navigator:V,unstable_useTransitions:r},T.createElement(Tw,{routes:t.routes,future:t.future,state:d,onError:a})))))),null)}function Wy(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 Tw=T.memo(kw);function kw({routes:t,future:l,state:a,onError:r}){return iw(t,void 0,a,r,l)}function Cw(t){return aw(t.context)}function Aw({basename:t="/",children:l=null,location:a,navigationType:r="POP",navigator:u,static:s=!1,unstable_useTransitions:c}){Pe(!ho(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=t.replace(/^\/*/,"/"),p=T.useMemo(()=>({basename:d,navigator:u,static:s,unstable_useTransitions:c,future:{}}),[d,u,s,c]);typeof a=="string"&&(a=Da(a));let{pathname:m="/",search:y="",hash:g="",state:b=null,key:S="default"}=a,E=T.useMemo(()=>{let _=tl(m,d);return _==null?null:{location:{pathname:_,search:y,hash:g,state:b,key:S},navigationType:r}},[d,m,y,g,b,S,r]);return zt(E!=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.`),E==null?null:T.createElement(ll.Provider,{value:p},T.createElement(as.Provider,{children:l,value:E}))}var Yu="get",Pu="application/x-www-form-urlencoded";function is(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function _w(t){return is(t)&&t.tagName.toLowerCase()==="button"}function Rw(t){return is(t)&&t.tagName.toLowerCase()==="form"}function Dw(t){return is(t)&&t.tagName.toLowerCase()==="input"}function Nw(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function jw(t,l){return t.button===0&&(!l||l==="_self")&&!Nw(t)}function gd(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((l,a)=>{let r=t[a];return l.concat(Array.isArray(r)?r.map(u=>[a,u]):[[a,r]])},[]))}function Ow(t,l){let a=gd(t);return l&&l.forEach((r,u)=>{a.has(u)||l.getAll(u).forEach(s=>{a.append(u,s)})}),a}var Ou=null;function Mw(){if(Ou===null)try{new FormData(document.createElement("form"),0),Ou=!1}catch{Ou=!0}return Ou}var zw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Bf(t){return t!=null&&!zw.has(t)?(zt(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Pu}"`),null):t}function Lw(t,l){let a,r,u,s,c;if(Rw(t)){let d=t.getAttribute("action");r=d?tl(d,l):null,a=t.getAttribute("method")||Yu,u=Bf(t.getAttribute("enctype"))||Pu,s=new FormData(t)}else if(_w(t)||Dw(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?tl(p,l):null,a=t.getAttribute("formmethod")||d.getAttribute("method")||Yu,u=Bf(t.getAttribute("formenctype"))||Bf(d.getAttribute("enctype"))||Pu,s=new FormData(d,t),!Mw()){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(is(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Yu,r=null,u=Pu,c=t}return s&&u==="text/plain"&&(c=s,s=void 0),{action:r,method:a.toLowerCase(),encType:u,formData:s,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function th(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function Uw(t,l,a,r){let u=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return a?u.pathname.endsWith("/")?u.pathname=`${u.pathname}_.${r}`:u.pathname=`${u.pathname}.${r}`:u.pathname==="/"?u.pathname=`_root.${r}`:l&&tl(u.pathname,l)==="/"?u.pathname=`${l.replace(/\/$/,"")}/_root.${r}`:u.pathname=`${u.pathname.replace(/\/$/,"")}.${r}`,u}async function Bw(t,l){if(t.id in l)return l[t.id];try{let a=await import(t.module);return l[t.id]=a,a}catch(a){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Hw(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 Iw(t,l,a){let r=await Promise.all(t.map(async u=>{let s=l.routes[u.route.id];if(s){let c=await Bw(s,a);return c.links?c.links():[]}return[]}));return Yw(r.flat(1).filter(Hw).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function ev(t,l,a,r,u,s){let c=(p,m)=>a[m]?p.route.id!==a[m].route.id:!0,d=(p,m)=>a[m].pathname!==p.pathname||a[m].route.path?.endsWith("*")&&a[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(u.pathname+u.search+u.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function qw(t,l,{includeHydrateFallback:a}={}){return Fw(t.map(r=>{let u=l.routes[r.route.id];if(!u)return[];let s=[u.module];return u.clientActionModule&&(s=s.concat(u.clientActionModule)),u.clientLoaderModule&&(s=s.concat(u.clientLoaderModule)),a&&u.hydrateFallbackModule&&(s=s.concat(u.hydrateFallbackModule)),u.imports&&(s=s.concat(u.imports)),s}).flat(1))}function Fw(t){return[...new Set(t)]}function Gw(t){let l={},a=Object.keys(t).sort();for(let r of a)l[r]=t[r];return l}function Yw(t,l){let a=new Set;return new Set(l),t.reduce((r,u)=>{let s=JSON.stringify(Gw(u));return a.has(s)||(a.add(s),r.push({key:s,link:u})),r},[])}function Lb(){let t=T.useContext(ni);return th(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function Pw(){let t=T.useContext(fo);return th(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var nh=T.createContext(void 0);nh.displayName="FrameworkContext";function Ub(){let t=T.useContext(nh);return th(t,"You must render this element inside a <HydratedRouter> element"),t}function Vw(t,l){let a=T.useContext(nh),[r,u]=T.useState(!1),[s,c]=T.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:m,onMouseLeave:y,onTouchStart:g}=l,b=T.useRef(null);T.useEffect(()=>{if(t==="render"&&c(!0),t==="viewport"){let _=C=>{C.forEach(A=>{c(A.isIntersecting)})},D=new IntersectionObserver(_,{threshold:.5});return b.current&&D.observe(b.current),()=>{D.disconnect()}}},[t]),T.useEffect(()=>{if(r){let _=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(_)}}},[r]);let S=()=>{u(!0)},E=()=>{u(!1),c(!1)};return a?t!=="intent"?[s,b,{}]:[s,b,{onFocus:qr(d,S),onBlur:qr(p,E),onMouseEnter:qr(m,S),onMouseLeave:qr(y,E),onTouchStart:qr(g,S)}]:[!1,b,{}]}function qr(t,l){return a=>{t&&t(a),a.defaultPrevented||l(a)}}function Xw({page:t,...l}){let{router:a}=Lb(),r=T.useMemo(()=>ka(a.routes,t,a.basename),[a.routes,t,a.basename]);return r?T.createElement(Qw,{page:t,matches:r,...l}):null}function $w(t){let{manifest:l,routeModules:a}=Ub(),[r,u]=T.useState([]);return T.useEffect(()=>{let s=!1;return Iw(t,l,a).then(c=>{s||u(c)}),()=>{s=!0}},[t,l,a]),r}function Qw({page:t,matches:l,...a}){let r=al(),{future:u,manifest:s,routeModules:c}=Ub(),{basename:d}=Lb(),{loaderData:p,matches:m}=Pw(),y=T.useMemo(()=>ev(t,l,m,s,r,"data"),[t,l,m,s,r]),g=T.useMemo(()=>ev(t,l,m,s,r,"assets"),[t,l,m,s,r]),b=T.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let _=new Set,D=!1;if(l.forEach(A=>{let j=s.routes[A.route.id];!j||!j.hasLoader||(!y.some(ee=>ee.route.id===A.route.id)&&A.route.id in p&&c[A.route.id]?.shouldRevalidate||j.hasClientLoader?D=!0:_.add(A.route.id))}),_.size===0)return[];let C=Uw(t,d,u.unstable_trailingSlashAwareDataRequests,"data");return D&&_.size>0&&C.searchParams.set("_routes",l.filter(A=>_.has(A.route.id)).map(A=>A.route.id).join(",")),[C.pathname+C.search]},[d,u.unstable_trailingSlashAwareDataRequests,p,r,s,y,l,t,c]),S=T.useMemo(()=>qw(g,s),[g,s]),E=$w(g);return T.createElement(T.Fragment,null,b.map(_=>T.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...a})),S.map(_=>T.createElement("link",{key:_,rel:"modulepreload",href:_,...a})),E.map(({key:_,link:D})=>T.createElement("link",{key:_,nonce:a.nonce,...D,crossOrigin:D.crossOrigin??a.crossOrigin})))}function Kw(...t){return l=>{t.forEach(a=>{typeof a=="function"?a(l):a!=null&&(a.current=l)})}}var Zw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Zw&&(window.__reactRouterVersion="7.13.0")}catch{}function Jw(t,l){return kE({basename:l?.basename,getContext:l?.getContext,future:l?.future,history:qS({window:l?.window}),hydrationData:Ww(),routes:t,mapRouteProperties:xw,hydrationRouteProperties:Sw,dataStrategy:l?.dataStrategy,patchRoutesOnNavigation:l?.patchRoutesOnNavigation,window:l?.window,unstable_instrumentations:l?.unstable_instrumentations}).initialize()}function Ww(){let t=window?.__staticRouterHydrationData;return t&&t.errors&&(t={...t,errors:eT(t.errors)}),t}function eT(t){if(!t)return null;let l=Object.entries(t),a={};for(let[r,u]of l)if(u&&u.__type==="RouteErrorResponse")a[r]=new so(u.status,u.statusText,u.data,u.internal===!0);else if(u&&u.__type==="Error"){if(u.__subType){let s=window[u.__subType];if(typeof s=="function")try{let c=new s(u.message);c.stack="",a[r]=c}catch{}}if(a[r]==null){let s=new Error(u.message);s.stack="",a[r]=s}}else a[r]=u;return a}var Bb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hb=T.forwardRef(function({onClick:l,discover:a="render",prefetch:r="none",relative:u,reloadDocument:s,replace:c,state:d,target:p,to:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...S},E){let{basename:_,unstable_useTransitions:D}=T.useContext(ll),C=typeof m=="string"&&Bb.test(m),A=pb(m,_);m=A.to;let j=nw(m,{relative:u}),[ee,V,q]=Vw(r,S),N=aT(m,{replace:c,state:d,target:p,preventScrollReset:y,relative:u,viewTransition:g,unstable_defaultShouldRevalidate:b,unstable_useTransitions:D});function le(L){l&&l(L),L.defaultPrevented||N(L)}let X=T.createElement("a",{...S,...q,href:A.absoluteURL||j,onClick:A.isExternal||s?l:le,ref:Kw(E,V),target:p,"data-discover":!C&&a==="render"?"true":void 0});return ee&&!C?T.createElement(T.Fragment,null,X,T.createElement(Xw,{page:j})):X});Hb.displayName="Link";var tT=T.forwardRef(function({"aria-current":l="page",caseSensitive:a=!1,className:r="",end:u=!1,style:s,to:c,viewTransition:d,children:p,...m},y){let g=mo(c,{relative:m.relative}),b=al(),S=T.useContext(fo),{navigator:E,basename:_}=T.useContext(ll),D=S!=null&&cT(g)&&d===!0,C=E.encodeLocation?E.encodeLocation(g).pathname:g.pathname,A=b.pathname,j=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;a||(A=A.toLowerCase(),j=j?j.toLowerCase():null,C=C.toLowerCase()),j&&_&&(j=tl(j,_)||j);const ee=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let V=A===C||!u&&A.startsWith(C)&&A.charAt(ee)==="/",q=j!=null&&(j===C||!u&&j.startsWith(C)&&j.charAt(C.length)==="/"),N={isActive:V,isPending:q,isTransitioning:D},le=V?l:void 0,X;typeof r=="function"?X=r(N):X=[r,V?"active":null,q?"pending":null,D?"transitioning":null].filter(Boolean).join(" ");let L=typeof s=="function"?s(N):s;return T.createElement(Hb,{...m,"aria-current":le,className:X,ref:y,style:L,to:c,viewTransition:d},typeof p=="function"?p(N):p)});tT.displayName="NavLink";var nT=T.forwardRef(({discover:t="render",fetcherKey:l,navigate:a,reloadDocument:r,replace:u,state:s,method:c=Yu,action:d,onSubmit:p,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...S},E)=>{let{unstable_useTransitions:_}=T.useContext(ll),D=uT(),C=sT(d,{relative:m}),A=c.toLowerCase()==="get"?"get":"post",j=typeof d=="string"&&Bb.test(d),ee=V=>{if(p&&p(V),V.defaultPrevented)return;V.preventDefault();let q=V.nativeEvent.submitter,N=q?.getAttribute("formmethod")||c,le=()=>D(q||V.currentTarget,{fetcherKey:l,method:N,navigate:a,replace:u,state:s,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b});_&&a!==!1?T.startTransition(()=>le()):le()};return T.createElement("form",{ref:E,method:A,action:C,onSubmit:r?p:ee,...S,"data-discover":!j&&t==="render"?"true":void 0})});nT.displayName="Form";function lT(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ib(t){let l=T.useContext(ni);return Pe(l,lT(t)),l}function aT(t,{target:l,replace:a,state:r,preventScrollReset:u,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:d,unstable_useTransitions:p}={}){let m=Al(),y=al(),g=mo(t,{relative:s});return T.useCallback(b=>{if(jw(b,l)){b.preventDefault();let S=a!==void 0?a:Cl(y)===Cl(g),E=()=>m(t,{replace:S,state:r,preventScrollReset:u,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:d});p?T.startTransition(()=>E()):E()}},[y,m,g,a,r,l,t,u,s,c,d,p])}function iT(t){zt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let l=T.useRef(gd(t)),a=T.useRef(!1),r=al(),u=T.useMemo(()=>Ow(r.search,a.current?null:l.current),[r.search]),s=Al(),c=T.useCallback((d,p)=>{const m=gd(typeof d=="function"?d(new URLSearchParams(u)):d);a.current=!0,s("?"+m,p)},[s,u]);return[u,c]}var rT=0,oT=()=>`__${String(++rT)}__`;function uT(){let{router:t}=Ib("useSubmit"),{basename:l}=T.useContext(ll),a=mw(),r=t.fetch,u=t.navigate;return T.useCallback(async(s,c={})=>{let{action:d,method:p,encType:m,formData:y,body:g}=Lw(s,l);if(c.navigate===!1){let b=c.fetcherKey||oT();await r(b,a,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 u(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:a,flushSync:c.flushSync,viewTransition:c.viewTransition})},[r,u,l,a])}function sT(t,{relative:l}={}){let{basename:a}=T.useContext(ll),r=T.useContext(fl);Pe(r,"useFormAction must be used inside a RouteContext");let[u]=r.matches.slice(-1),s={...mo(t||".",{relative:l})},c=al();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===".")&&u.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(s.pathname=s.pathname==="/"?a:kl([a,s.pathname])),Cl(s)}function cT(t,{relative:l}={}){let a=T.useContext(Kd);Pe(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ib("useViewTransitionState"),u=mo(t,{relative:l});if(!a.isTransitioning)return!1;let s=tl(a.currentLocation.pathname,r)||a.currentLocation.pathname,c=tl(a.nextLocation.pathname,r)||a.nextLocation.pathname;return Zu(u.pathname,c)!=null||Zu(u.pathname,s)!=null}var rs=ob();function fT(t){return T.createElement(ww,{flushSync:rs.flushSync,...t})}const lh="electric-agent:rooms";function ro(){try{const t=localStorage.getItem(lh);return t?JSON.parse(t):[]}catch{return[]}}function yd(t){const a=ro().filter(r=>r.id!==t.id);a.push(t),localStorage.setItem(lh,JSON.stringify(a))}function dT(t){const a=ro().filter(r=>r.id!==t);localStorage.setItem(lh,JSON.stringify(a))}const ah="electric-agent:anthropic-api-key",os="electric-agent:oauth-token",ih="electric-agent:oauth-manual",rh="electric-agent:gh-token";function qb(){return localStorage.getItem(ah)}function hT(t){localStorage.setItem(ah,t)}function mT(){localStorage.removeItem(ah)}function pT(){return!!qb()}function vd(){return localStorage.getItem(os)}function gT(t){localStorage.setItem(os,t)}function yT(){localStorage.removeItem(os),localStorage.removeItem(ih)}function vT(t){localStorage.setItem(os,t),localStorage.setItem(ih,"1")}function Vu(){return localStorage.getItem(ih)==="1"}function oh(){return localStorage.getItem(rh)}function bT(t){localStorage.setItem(rh,t)}function xT(){localStorage.removeItem(rh)}function ST(){return!!oh()}function Fb(){let t=localStorage.getItem("participant-id"),l=localStorage.getItem("participant-name");return t||(t=crypto.randomUUID(),localStorage.setItem("participant-id",t)),l||(l=`User-${t.slice(0,4)}`,localStorage.setItem("participant-name",l)),{id:t,displayName:l}}const us="electric-agent:sessions",uh="electric-agent:session-tokens";function Pi(){try{const t=localStorage.getItem(us);return t?JSON.parse(t):[]}catch{return[]}}function ss(t){const a=Pi().filter(r=>r.id!==t.id);a.push(t),localStorage.setItem(us,JSON.stringify(a))}function bd(t,l){const a=Pi(),r=a.find(u=>u.id===t);r&&(Object.assign(r,l,{lastActiveAt:new Date().toISOString()}),localStorage.setItem(us,JSON.stringify(a)))}function ET(t){const a=Pi().filter(r=>r.id!==t);localStorage.setItem(us,JSON.stringify(a)),wT(t)}function tv(t){return Pi().find(l=>l.id===t)}function sh(){try{const t=localStorage.getItem(uh);return t?JSON.parse(t):{}}catch{return{}}}function cs(t,l){const a=sh();a[t]=l,localStorage.setItem(uh,JSON.stringify(a))}function ch(t){return sh()[t]}function wT(t){const l=sh();delete l[t],localStorage.setItem(uh,JSON.stringify(l))}const Gb="electric-agent:room-tokens";function Yb(){try{const t=localStorage.getItem(Gb);return t?JSON.parse(t):{}}catch{return{}}}function fh(t,l){const a=Yb();a[t]=l,localStorage.setItem(Gb,JSON.stringify(a))}function Pb(t){return Yb()[t]}const TT="/api";let Vb=!1;function kT(t){Vb=t}function fs(){if(!Vb)return{};const t={},l=qb(),a=vd(),r=oh();return a?t.oauthToken=a:l&&(t.apiKey=l),r&&(t.ghToken=r),t}function Xb(){const t=oh();return t?{"X-GH-Token":t}:{}}function CT(){const t=Fb();return{"X-Participant-Id":t.id,"X-Participant-Name":t.displayName}}function AT(t){return t.match(/^\/sessions\/([^/]+)/)?.[1]}function _T(t){const l=t.match(/^\/rooms\/([^/]+)/);if(l)return l[1]}async function Gt(t,l){const a={...CT(),...l?.headers};l?.body&&(a["Content-Type"]="application/json");const r=AT(t);if(r){const c=ch(r);c&&(a.Authorization=`Bearer ${c}`)}const u=_T(t);if(u){const c=Pb(u);c&&(a["X-Room-Token"]=c)}const s=await fetch(`${TT}${t}`,{method:l?.method??"GET",headers:Object.keys(a).length>0?a:void 0,body:l?.body?JSON.stringify(l.body):void 0});if(!s.ok){const c=await s.json().catch(()=>({error:s.statusText}));throw new Error(c.error||s.statusText)}return s.json()}function RT(){return Gt("/config")}async function DT(t,l,a){const r=await Gt("/sessions",{method:"POST",body:{description:t,name:l,freeform:a,...fs()}});return r.sessionToken&&cs(r.sessionId,r.sessionToken),r}function NT(t,l){return Gt(`/sessions/${t}/iterate`,{method:"POST",body:{request:l}})}function xd(t,l,a){return Gt(`/sessions/${t}/respond`,{method:"POST",body:{gate:l,...a}})}function jT(t){return Gt(`/sessions/${t}/interrupt`,{method:"POST"})}function OT(t){return Gt(`/sessions/${t}`,{method:"DELETE"})}function MT(){return Gt("/provision-electric",{method:"POST"})}function zT(){return Gt("/github/repos",{headers:Xb()})}function LT(t){return Gt(`/github/repos/${t}/branches`,{headers:Xb()})}function UT(){return Gt("/credentials/keychain")}async function BT(t,l){const a=await Gt("/sessions/resume",{method:"POST",body:{repoUrl:t,branch:l,...fs()}});return a.sessionToken&&cs(a.sessionId,a.sessionToken),a}async function HT(t,l){const a=await Gt("/rooms",{method:"POST",body:{name:t,maxRounds:l}});return a.roomToken&&fh(a.roomId,a.roomToken),a}async function IT(t,l){const a=await Gt("/rooms/create-app",{method:"POST",body:{description:t,name:l,...fs()}});a.roomToken&&fh(a.roomId,a.roomToken);for(const r of a.sessions)r.sessionToken&&cs(r.sessionId,r.sessionToken);return a}async function qT(t,l){const a=await Gt(`/join-room/${t}/${l}`);return a.roomToken&&fh(a.id,a.roomToken),a}function nv(t){return Gt(`/rooms/${t}`)}function FT(t,l){return Gt(`/rooms/${t}/agents`,{method:"POST",body:{...l,...fs()}})}function GT(t,l){const a=ch(l.sessionId);return Gt(`/rooms/${t}/sessions`,{method:"POST",body:l,headers:a?{Authorization:`Bearer ${a}`}:void 0})}function YT(t,l,a,r){return Gt(`/rooms/${t}/messages`,{method:"POST",body:{from:l,body:a,...r?{to:r}:{}}})}function PT(t){return Gt(`/rooms/${t}/close`,{method:"POST"})}function VT(t,l,a){T.useEffect(()=>{function r(u){{const s=u.target?.tagName;if(s==="INPUT"||s==="TEXTAREA"||s==="SELECT")return}u.key===t&&(u.preventDefault(),l())}return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[t,l,a?.disabled,a?.allowInInputs])}function ds(t,l){T.useEffect(()=>{if(l)return;function a(r){r.key==="Escape"&&(r.preventDefault(),t())}return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[t,l])}const lv=[{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 XT(t){let l=0;for(let a=0;a<t.length;a++)l=(l<<5)-l+t.charCodeAt(a)|0;return Math.abs(l)}function dh(t){return lv[XT(t)%lv.length]}function $T(t){const l=Date.now()-new Date(t).getTime(),a=Math.floor(l/6e4);if(a<1)return"just now";if(a<60)return`${a}m ago`;const r=Math.floor(a/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function $b({projectName:t,onConfirm:l,onCancel:a}){return ds(a),VT("Enter",l),rs.createPortal(v.jsx("div",{className:"modal-overlay",onClick:a,children:v.jsxs("div",{className:"modal-card",onClick:r=>r.stopPropagation(),children:[v.jsxs("div",{className:"modal-title",children:["Delete ",t,"?"]}),v.jsx("div",{className:"modal-body",children:"All containers, database state, and generated code will be permanently lost."}),v.jsxs("div",{className:"modal-actions",children:[v.jsx("button",{type:"button",className:"modal-btn",onClick:a,children:"Cancel"}),v.jsx("button",{type:"button",className:"modal-btn modal-btn-danger",onClick:l,children:"Delete"})]})]})}),document.body)}function QT({session:t,active:l,onClick:a,onDelete:r}){const[u,s]=T.useState(!1),d=`session-avatar ${t.needsInput?"session-avatar-needs-input":`session-avatar-${t.status}`}`,p=dh(t.id),m={background:p.bg,color:p.fg},y=t.projectName.split(/[-_ ]+/).slice(0,2).map(g=>g.charAt(0).toUpperCase()).join("");return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:`session-item ${l?"active":""}`,onClick:a,title:t.projectName,children:[v.jsx("span",{className:d,style:m,children:y}),v.jsxs("div",{className:"session-item-details",children:[v.jsx("div",{className:"session-item-name",children:t.projectName}),v.jsx("div",{className:"session-item-meta",children:v.jsx("span",{children:$T(t.lastActiveAt)})})]}),v.jsx("button",{type:"button",className:"session-item-delete",onClick:g=>{g.stopPropagation(),s(!0)},title:"Delete session",children:"×"})]}),u&&v.jsx($b,{projectName:t.projectName,onConfirm:()=>{s(!1),r()},onCancel:()=>s(!1)})]})}function KT({collapsed:t}){return v.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:[v.jsx("title",{children:t?"Expand menu":"Collapse menu"}),v.jsx("rect",{x:"2",y:"2",width:"12",height:"12",rx:"2"}),v.jsx("line",{x1:"6",y1:"2",x2:"6",y2:"14"}),t?v.jsx("polyline",{points:"9 6.5 11.5 8 9 9.5"}):v.jsx("polyline",{points:"11.5 6.5 9 8 11.5 9.5"})]})}function ZT(){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[v.jsx("title",{children:"Join room"}),v.jsx("path",{d:"M6.5 9.5a3.5 3.5 0 0 0 5 0l2-2a3.5 3.5 0 0 0-5-5l-1 1"}),v.jsx("path",{d:"M9.5 6.5a3.5 3.5 0 0 0-5 0l-2 2a3.5 3.5 0 0 0 5 5l1-1"})]})}function JT({collapsed:t,onToggle:l,mobileOpen:a,onMobileClose:r}){const{sessions:u,pendingProject:s,handleDeleteSession:c,agentRooms:d,refreshAgentRooms:p,devMode:m}=go(),y=Al(),g=al(),[b,S]=T.useState(!1),[E,_]=T.useState(""),[D,C]=T.useState(!1),[A,j]=T.useState(""),[ee,V]=T.useState(null);T.useEffect(()=>{t&&(S(!1),_(""),C(!1),j(""))},[t]);const q=g.pathname.startsWith("/session/")?g.pathname.split("/session/")[1]:null,N=g.pathname.startsWith("/room/")?g.pathname.split("/room/")[1]:null,le=[...u].sort((H,ie)=>new Date(ie.createdAt).getTime()-new Date(H.createdAt).getTime()),X=H=>{y(H),r?.()},L=T.useCallback(H=>{dT(H),p()},[p]),G=T.useCallback(async()=>{const H=E.trim();if(H)try{const{roomId:ie,code:J}=await HT(H);yd({id:ie,code:J,name:H,createdAt:new Date().toISOString()}),p(),_(""),S(!1),y(`/room/${ie}`),r?.()}catch(ie){console.error("Failed to create room:",ie)}},[E,y,r,p]),F=T.useCallback(async()=>{const H=A.trim();if(!H)return;const ie=H.indexOf(":");if(ie===-1)return;const J=H.slice(0,ie),B=H.slice(ie+1);if(!(!J||!B))try{const{id:te,code:ce,name:pe}=await qT(J,B);yd({id:te,code:ce,name:pe,createdAt:new Date().toISOString()}),p(),j(""),C(!1),y(`/room/${te}`),r?.()}catch(te){console.error("Failed to join room:",te)}},[A,y,r,p]);return v.jsxs("aside",{className:`sidebar ${a?"mobile-open":""}`,children:[v.jsxs("div",{className:"sidebar-header",children:[v.jsxs("svg",{className:"sidebar-icon",viewBox:"0 0 192 192","aria-label":"Electric",children:[v.jsx("title",{children:"Electric"}),v.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)"}),v.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)"})]}),v.jsx("span",{className:"sidebar-brand",children:"Electric Agent"})]}),v.jsxs("div",{className:"sidebar-sessions",children:[v.jsx("div",{className:"sidebar-section-label",children:"Sessions"}),v.jsxs("div",{className:"session-item",onClick:()=>X("/"),title:"New Electric App",children:[v.jsx("span",{className:"session-avatar new-project-avatar",children:"+"}),v.jsx("div",{className:"session-item-details",children:v.jsx("div",{className:"session-item-name",children:"New Electric App"})})]}),m&&v.jsxs("div",{className:"session-item",onClick:()=>X("/?mode=session"),title:"Claude Session",children:[v.jsx("span",{className:"session-avatar new-project-avatar",children:v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[v.jsx("title",{children:"Claude Session"}),v.jsx("path",{d:"M13 2.5l-9.5 9.5-1 3 3-1 9.5-9.5-2-2z"}),v.jsx("path",{d:"M10.5 5l2 2"})]})}),v.jsx("div",{className:"session-item-details",children:v.jsx("div",{className:"session-item-name",children:"Claude Session"})})]}),s&&v.jsxs("div",{className:"session-item session-item-pending",title:s.name,children:[v.jsx("span",{className:"session-avatar session-avatar-pending"}),v.jsxs("div",{className:"session-item-details",children:[v.jsx("div",{className:"session-item-name",children:s.name}),v.jsx("div",{className:"session-item-meta",children:v.jsx("span",{children:"Setting up..."})})]})]}),le.map(H=>v.jsx(QT,{session:H,active:H.id===q,onClick:()=>X(`/session/${H.id}`),onDelete:()=>c(H.id)},H.id)),v.jsx("div",{className:"sidebar-section-label",children:"Rooms"}),d.map(H=>{const ie=dh(H.id),J=H.name.split(/[-_ ]+/).slice(0,2).map(B=>B.charAt(0).toUpperCase()).join("");return v.jsxs("div",{className:`session-item ${N===H.id?"active":""}`,onClick:()=>X(`/room/${H.id}`),title:H.name,children:[v.jsx("span",{className:"session-avatar session-avatar-shared",style:{background:ie.bg,color:ie.fg},children:J}),v.jsxs("div",{className:"session-item-details",children:[v.jsx("div",{className:"session-item-name",children:H.name}),v.jsx("div",{className:"session-item-meta",children:v.jsx("span",{children:H.code||H.id.slice(0,8)})})]}),v.jsx("button",{type:"button",className:"session-item-delete",onClick:B=>{B.stopPropagation(),V(H.id)},title:"Remove",children:"×"}),ee===H.id&&v.jsx($b,{projectName:H.name,onConfirm:()=>{V(null),L(H.id)},onCancel:()=>V(null)})]},H.id)}),b&&!t?v.jsxs("div",{className:"sidebar-join-input",children:[v.jsx("input",{type:"text",placeholder:"Room name...",value:E,onChange:H=>_(H.target.value),onKeyDown:H=>{H.key==="Enter"&&G(),H.key==="Escape"&&(S(!1),_(""))}}),v.jsx("button",{type:"button",className:"sidebar-join-go",onClick:G,disabled:!E.trim(),children:"Go"})]}):v.jsxs("div",{className:"session-item",onClick:()=>{t&&l(),S(!0)},title:"Create room",children:[v.jsx("span",{className:"session-avatar new-project-avatar",children:"+"}),v.jsx("div",{className:"session-item-details",children:v.jsx("div",{className:"session-item-name",children:"Create"})})]}),D&&!t?v.jsxs("div",{className:"sidebar-join-input",children:[v.jsx("input",{type:"text",placeholder:"Paste join token...",value:A,onChange:H=>j(H.target.value),onKeyDown:H=>{H.key==="Enter"&&F(),H.key==="Escape"&&(C(!1),j(""))}}),v.jsx("button",{type:"button",className:"sidebar-join-go",onClick:F,disabled:!A.trim(),children:"Go"})]}):v.jsxs("div",{className:"session-item",onClick:()=>{t&&l(),C(!0)},title:"Join room",children:[v.jsx("span",{className:"session-avatar new-project-avatar",children:v.jsx(ZT,{})}),v.jsx("div",{className:"session-item-details",children:v.jsx("div",{className:"session-item-name",children:"Join"})})]})]}),v.jsx("div",{className:"sidebar-collapse",children:v.jsxs("button",{type:"button",className:"sidebar-collapse-btn",onClick:l,children:[v.jsx(KT,{collapsed:t}),v.jsx("span",{className:"sidebar-collapse-label",children:t?"Expand menu":"Collapse menu"})]})})]})}let WT={data:""},ek=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||WT},tk=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,nk=/\/\*[^]*?\*\/| +/g,av=/\n+/g,Aa=(t,l)=>{let a="",r="",u="";for(let s in t){let c=t[s];s[0]=="@"?s[1]=="i"?a=s+" "+c+";":r+=s[1]=="f"?Aa(c,s):s+"{"+Aa(c,s[1]=="k"?"":l)+"}":typeof c=="object"?r+=Aa(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(),u+=Aa.p?Aa.p(s,c):s+":"+c+";")}return a+(l&&u?l+"{"+u+"}":u)+r},$l={},Qb=t=>{if(typeof t=="object"){let l="";for(let a in t)l+=a+Qb(t[a]);return l}return t},lk=(t,l,a,r,u)=>{let s=Qb(t),c=$l[s]||($l[s]=(p=>{let m=0,y=11;for(;m<p.length;)y=101*y+p.charCodeAt(m++)>>>0;return"go"+y})(s));if(!$l[c]){let p=s!==t?t:(m=>{let y,g,b=[{}];for(;y=tk.exec(m.replace(nk,""));)y[4]?b.shift():y[3]?(g=y[3].replace(av," ").trim(),b.unshift(b[0][g]=b[0][g]||{})):b[0][y[1]]=y[2].replace(av," ").trim();return b[0]})(t);$l[c]=Aa(u?{["@keyframes "+c]:p}:p,a?"":"."+c)}let d=a&&$l.g?$l.g:null;return a&&($l.g=$l[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)})($l[c],l,r,d),c},ak=(t,l,a)=>t.reduce((r,u,s)=>{let c=l[s];if(c&&c.call){let d=c(a),p=d&&d.props&&d.props.className||/^go/.test(d)&&d;c=p?"."+p:d&&typeof d=="object"?d.props?"":Aa(d,""):d===!1?"":d}return r+u+(c??"")},"");function hs(t){let l=this||{},a=t.call?t(l.p):t;return lk(a.unshift?a.raw?ak(a,[].slice.call(arguments,1),l.p):a.reduce((r,u)=>Object.assign(r,u&&u.call?u(l.p):u),{}):a,ek(l.target),l.g,l.o,l.k)}let Kb,Sd,Ed;hs.bind({g:1});let Zl=hs.bind({k:1});function ik(t,l,a,r){Aa.p=l,Kb=t,Sd=a,Ed=r}function Na(t,l){let a=this||{};return function(){let r=arguments;function u(s,c){let d=Object.assign({},s),p=d.className||u.className;a.p=Object.assign({theme:Sd&&Sd()},d),a.o=/ *go\d+/.test(p),d.className=hs.apply(a,r)+(p?" "+p:"");let m=t;return t[0]&&(m=d.as||t,delete d.as),Ed&&m[0]&&Ed(d),Kb(m,d)}return u}}var rk=t=>typeof t=="function",Ju=(t,l)=>rk(t)?t(l):t,ok=(()=>{let t=0;return()=>(++t).toString()})(),Zb=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let l=matchMedia("(prefers-reduced-motion: reduce)");t=!l||l.matches}return t}})(),uk=20,hh="default",Jb=(t,l)=>{let{toastLimit:a}=t.settings;switch(l.type){case 0:return{...t,toasts:[l.toast,...t.toasts].slice(0,a)};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 Jb(t,{type:t.toasts.find(c=>c.id===r.id)?1:0,toast:r});case 3:let{toastId:u}=l;return{...t,toasts:t.toasts.map(c=>c.id===u||u===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}))}}},Xu=[],Wb={toasts:[],pausedAt:void 0,settings:{toastLimit:uk}},Tl={},e0=(t,l=hh)=>{Tl[l]=Jb(Tl[l]||Wb,t),Xu.forEach(([a,r])=>{a===l&&r(Tl[l])})},t0=t=>Object.keys(Tl).forEach(l=>e0(t,l)),sk=t=>Object.keys(Tl).find(l=>Tl[l].toasts.some(a=>a.id===t)),ms=(t=hh)=>l=>{e0(l,t)},ck={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},fk=(t={},l=hh)=>{let[a,r]=T.useState(Tl[l]||Wb),u=T.useRef(Tl[l]);T.useEffect(()=>(u.current!==Tl[l]&&r(Tl[l]),Xu.push([l,r]),()=>{let c=Xu.findIndex(([d])=>d===l);c>-1&&Xu.splice(c,1)}),[l]);let s=a.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||ck[c.type],style:{...t.style,...(m=t[c.type])==null?void 0:m.style,...c.style}}});return{...a,toasts:s}},dk=(t,l="blank",a)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:l,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...a,id:a?.id||ok()}),po=t=>(l,a)=>{let r=dk(l,t,a);return ms(r.toasterId||sk(r.id))({type:2,toast:r}),r.id},$t=(t,l)=>po("blank")(t,l);$t.error=po("error");$t.success=po("success");$t.loading=po("loading");$t.custom=po("custom");$t.dismiss=(t,l)=>{let a={type:3,toastId:t};l?ms(l)(a):t0(a)};$t.dismissAll=t=>$t.dismiss(void 0,t);$t.remove=(t,l)=>{let a={type:4,toastId:t};l?ms(l)(a):t0(a)};$t.removeAll=t=>$t.remove(void 0,t);$t.promise=(t,l,a)=>{let r=$t.loading(l.loading,{...a,...a?.loading});return typeof t=="function"&&(t=t()),t.then(u=>{let s=l.success?Ju(l.success,u):void 0;return s?$t.success(s,{id:r,...a,...a?.success}):$t.dismiss(r),u}).catch(u=>{let s=l.error?Ju(l.error,u):void 0;s?$t.error(s,{id:r,...a,...a?.error}):$t.dismiss(r)}),t};var hk=1e3,mk=(t,l="default")=>{let{toasts:a,pausedAt:r}=fk(t,l),u=T.useRef(new Map).current,s=T.useCallback((g,b=hk)=>{if(u.has(g))return;let S=setTimeout(()=>{u.delete(g),c({type:4,toastId:g})},b);u.set(g,S)},[]);T.useEffect(()=>{if(r)return;let g=Date.now(),b=a.map(S=>{if(S.duration===1/0)return;let E=(S.duration||0)+S.pauseDuration-(g-S.createdAt);if(E<0){S.visible&&$t.dismiss(S.id);return}return setTimeout(()=>$t.dismiss(S.id,l),E)});return()=>{b.forEach(S=>S&&clearTimeout(S))}},[a,r,l]);let c=T.useCallback(ms(l),[l]),d=T.useCallback(()=>{c({type:5,time:Date.now()})},[c]),p=T.useCallback((g,b)=>{c({type:1,toast:{id:g,height:b}})},[c]),m=T.useCallback(()=>{r&&c({type:6,time:Date.now()})},[r,c]),y=T.useCallback((g,b)=>{let{reverseOrder:S=!1,gutter:E=8,defaultPosition:_}=b||{},D=a.filter(j=>(j.position||_)===(g.position||_)&&j.height),C=D.findIndex(j=>j.id===g.id),A=D.filter((j,ee)=>ee<C&&j.visible).length;return D.filter(j=>j.visible).slice(...S?[A+1]:[0,A]).reduce((j,ee)=>j+(ee.height||0)+E,0)},[a]);return T.useEffect(()=>{a.forEach(g=>{if(g.dismissed)s(g.id,g.removeDelay);else{let b=u.get(g.id);b&&(clearTimeout(b),u.delete(g.id))}})},[a,s]),{toasts:a,handlers:{updateHeight:p,startPause:d,endPause:m,calculateOffset:y}}},pk=Zl`
13
- from {
14
- transform: scale(0) rotate(45deg);
15
- opacity: 0;
16
- }
17
- to {
18
- transform: scale(1) rotate(45deg);
19
- opacity: 1;
20
- }`,gk=Zl`
21
- from {
22
- transform: scale(0);
23
- opacity: 0;
24
- }
25
- to {
26
- transform: scale(1);
27
- opacity: 1;
28
- }`,yk=Zl`
29
- from {
30
- transform: scale(0) rotate(90deg);
31
- opacity: 0;
32
- }
33
- to {
34
- transform: scale(1) rotate(90deg);
35
- opacity: 1;
36
- }`,vk=Na("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: ${pk} 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: ${gk} 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: ${yk} 0.15s ease-out forwards;
66
- animation-delay: 180ms;
67
- transform: rotate(90deg);
68
- }
69
- `,bk=Zl`
70
- from {
71
- transform: rotate(0deg);
72
- }
73
- to {
74
- transform: rotate(360deg);
75
- }
76
- `,xk=Na("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: ${bk} 1s linear infinite;
85
- `,Sk=Zl`
86
- from {
87
- transform: scale(0) rotate(45deg);
88
- opacity: 0;
89
- }
90
- to {
91
- transform: scale(1) rotate(45deg);
92
- opacity: 1;
93
- }`,Ek=Zl`
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
- }`,wk=Na("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: ${Sk} 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: ${Ek} 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
- `,Tk=Na("div")`
135
- position: absolute;
136
- `,kk=Na("div")`
137
- position: relative;
138
- display: flex;
139
- justify-content: center;
140
- align-items: center;
141
- min-width: 20px;
142
- min-height: 20px;
143
- `,Ck=Zl`
144
- from {
145
- transform: scale(0.6);
146
- opacity: 0.4;
147
- }
148
- to {
149
- transform: scale(1);
150
- opacity: 1;
151
- }`,Ak=Na("div")`
152
- position: relative;
153
- transform: scale(0.6);
154
- opacity: 0.4;
155
- min-width: 20px;
156
- animation: ${Ck} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
157
- forwards;
158
- `,_k=({toast:t})=>{let{icon:l,type:a,iconTheme:r}=t;return l!==void 0?typeof l=="string"?T.createElement(Ak,null,l):l:a==="blank"?null:T.createElement(kk,null,T.createElement(xk,{...r}),a!=="loading"&&T.createElement(Tk,null,a==="error"?T.createElement(vk,{...r}):T.createElement(wk,{...r})))},Rk=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
- `,Dk=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
- `,Nk="0%{opacity:0;} 100%{opacity:1;}",jk="0%{opacity:1;} 100%{opacity:0;}",Ok=Na("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
- `,Mk=Na("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
- `,zk=(t,l)=>{let a=t.includes("top")?1:-1,[r,u]=Zb()?[Nk,jk]:[Rk(a),Dk(a)];return{animation:l?`${Zl(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Zl(u)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Lk=T.memo(({toast:t,position:l,style:a,children:r})=>{let u=t.height?zk(t.position||l||"top-center",t.visible):{opacity:0},s=T.createElement(_k,{toast:t}),c=T.createElement(Mk,{...t.ariaProps},Ju(t.message,t));return T.createElement(Ok,{className:t.className,style:{...u,...a,...t.style}},typeof r=="function"?r({icon:s,message:c}):T.createElement(T.Fragment,null,s,c))});ik(T.createElement);var Uk=({id:t,className:l,style:a,onHeightUpdate:r,children:u})=>{let s=T.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 T.createElement("div",{ref:s,className:l,style:a},u)},Bk=(t,l)=>{let a=t.includes("top"),r=a?{top:0}:{bottom:0},u=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Zb()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${l*(a?1:-1)}px)`,...r,...u}},Hk=hs`
184
- z-index: 9999;
185
- > * {
186
- pointer-events: auto;
187
- }
188
- `,Mu=16,Ik=({reverseOrder:t,position:l="top-center",toastOptions:a,gutter:r,children:u,toasterId:s,containerStyle:c,containerClassName:d})=>{let{toasts:p,handlers:m}=mk(a,s);return T.createElement("div",{"data-rht-toaster":s||"",style:{position:"fixed",zIndex:9999,top:Mu,left:Mu,right:Mu,bottom:Mu,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}),S=Bk(g,b);return T.createElement(Uk,{id:y.id,key:y.id,onHeightUpdate:m.updateHeight,className:y.visible?Hk:"",style:S},y.type==="custom"?Ju(y.message,y):u?u(y):T.createElement(Lk,{toast:y,position:g}))}))};function qk(){return v.jsx(Ik,{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 n0=T.createContext(null);function go(){const t=T.useContext(n0);if(!t)throw new Error("useAppContext must be used within AppShell");return t}function Fk(){const[t,l]=T.useState(()=>window.innerWidth<=768);return T.useEffect(()=>{const a=window.matchMedia("(max-width: 768px)"),r=u=>l(u.matches);return a.addEventListener("change",r),()=>a.removeEventListener("change",r)},[]),t}function Gk(){const[t,l]=T.useState(()=>Pi()),[a,r]=T.useState(null),[u,s]=T.useState(null),[c,d]=T.useState(!1),[p]=T.useState(!1),[m,y]=T.useState(null),[g,b]=T.useState(()=>ro()),[S,E]=T.useState(!1),[_,D]=T.useState(()=>localStorage.getItem("sidebarCollapsed")==="true"),[C,A]=T.useState(!1),j=Fk(),ee=T.useCallback(()=>{D(B=>(localStorage.setItem("sidebarCollapsed",String(!B)),!B))},[]),V=T.useCallback(()=>A(!0),[]),q=T.useCallback(()=>A(!1),[]),N=Al(),le=al(),X=T.useCallback(()=>{b(ro())},[]),L=T.useCallback(()=>{l(Pi()),y(null)},[]),G=T.useRef(le.pathname);T.useEffect(()=>{const B=pe=>pe.startsWith("/session/")||pe.startsWith("/shared/")||pe.startsWith("/room/"),te=B(G.current),ce=B(le.pathname);G.current=le.pathname,A(!1),ce&&!te&&(D(!0),localStorage.setItem("sidebarCollapsed","true")),!ce&&te&&(D(!1),localStorage.setItem("sidebarCollapsed","false")),ce||L()},[le.pathname,L]);const F=T.useCallback(async()=>{const B=ST();if(s(B),Vu()&&vd()){r("oauth");return}try{const{oauthToken:te}=await UT();if(te){gT(te),r("keychain");return}}catch{if(vd()){r("keychain");return}}if(pT()){r("api-key");return}r(null)},[]);T.useEffect(()=>{F(),RT().then(B=>{E(B.devMode),kT(B.devMode)}).catch(()=>{})},[F]);const H=T.useCallback((B,te)=>{const ce=B.split(/\s+/).slice(0,3).join(" ");y({name:ce||"New project"}),te?N("/session/new",{state:{description:B,freeform:!0}}):N("/room/new",{state:{description:B}})},[N]),ie=T.useCallback(async B=>{try{await OT(B)}catch{}ET(B),L(),le.pathname===`/session/${B}`&&N("/")},[le.pathname,N,L]),J={sessions:t,pendingProject:m,authSource:a,hasGhToken:u,showSettings:c,setShowSettings:d,refreshSessions:L,refreshSettings:F,handleNewProject:H,handleDeleteSession:ie,loading:p,agentRooms:g,refreshAgentRooms:X,devMode:S};return v.jsxs(n0.Provider,{value:J,children:[v.jsxs("div",{className:`app-shell ${_?"sidebar-collapsed":""}`,children:[j&&C&&v.jsx("div",{className:"sidebar-backdrop",onClick:q,onKeyDown:B=>{B.key==="Escape"&&q()}}),v.jsx(JT,{collapsed:_,onToggle:ee,mobileOpen:C,onMobileClose:q}),v.jsx("main",{className:"main-content",children:v.jsx(Cw,{context:{openMobileDrawer:V}})}),S&&v.jsx("button",{type:"button",className:"global-settings-btn",onClick:()=>d(B=>!B),title:"Settings",children:v.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:[v.jsx("title",{children:"Settings"}),v.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"}),v.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]}),v.jsx(qk,{})]})}function l0({onSubmit:t,placeholder:l,disabled:a,isRunning:r,onCancel:u}){const[s,c]=T.useState(""),d=T.useRef(null),p=T.useCallback(()=>{const b=s.trim();b&&(t(b),c(""),d.current&&(d.current.style.height="auto"))},[s,t]),m=T.useCallback(()=>{r&&u&&u()},[r,u]);ds(m,!r);const y=T.useCallback(b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),p())},[p]),g=T.useCallback(()=>{const b=d.current;b&&(b.style.height="auto",b.style.height=`${Math.min(b.scrollHeight,200)}px`)},[]);return v.jsxs("div",{className:"prompt-bar",children:[v.jsx("textarea",{ref:d,value:s,onChange:b=>{c(b.target.value),g()},onKeyDown:y,placeholder:l??"Describe what you want to build...",disabled:a,rows:1}),v.jsx("button",{className:"primary",onClick:p,disabled:a||!s.trim(),children:"Send"}),r&&u&&v.jsx("button",{className:"danger",onClick:u,children:"Stop"})]})}function Yk(t){const l=Date.now()-new Date(t).getTime(),a=Math.floor(l/6e4);if(a<1)return"just now";if(a<60)return`${a}m ago`;const r=Math.floor(a/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function Pk({onSelect:t,onClose:l}){const[a,r]=T.useState([]),[u,s]=T.useState(!0),[c,d]=T.useState(null),[p,m]=T.useState(""),[y,g]=T.useState(null),[b,S]=T.useState([]),[E,_]=T.useState(!1),[D,C]=T.useState(""),[A,j]=T.useState(""),[ee,V]=T.useState(!1);T.useEffect(()=>{zT().then(H=>{r(H.repos),s(!1)}).catch(H=>{d(H instanceof Error?H.message:"Failed to load repos"),s(!1)})},[]);function q(H){g(H),_(!0),S([]),C(""),V(!1),j(""),LT(H.nameWithOwner).then(ie=>{S(ie.branches),_(!1)}).catch(()=>{_(!1)})}function N(){g(null),S([]),C(""),V(!1)}function le(H){y&&t(y.url,H)}const X=T.useCallback(()=>{y?N():l()},[y,l]);ds(X);const L=p?a.filter(H=>H.nameWithOwner.toLowerCase().includes(p.toLowerCase())):a,F=[...D?b.filter(H=>H.name.toLowerCase().includes(D.toLowerCase())):b].sort((H,ie)=>H.isDefault&&!ie.isDefault?-1:!H.isDefault&&ie.isDefault?1:H.name.localeCompare(ie.name));return rs.createPortal(v.jsx("div",{className:"modal-overlay",onClick:l,children:v.jsx("div",{className:"modal-card",onClick:H=>H.stopPropagation(),style:{maxWidth:500},children:y?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"modal-title",children:[v.jsx("button",{type:"button",onClick:N,style:{background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:"0 8px 0 0",fontSize:14},children:"←"}),y.nameWithOwner]}),v.jsx("div",{className:"repo-picker-filter",children:v.jsx("input",{type:"text",value:D,onChange:H=>C(H.target.value),placeholder:"Filter branches..."})}),E&&v.jsx("div",{style:{padding:"24px 0",textAlign:"center",color:"var(--text-subtle)"},children:"Loading branches..."}),!E&&v.jsxs("div",{className:"repo-picker-list",children:[F.map(H=>v.jsx("div",{className:"repo-picker-item",onClick:()=>le(H.name),children:v.jsxs("span",{className:"repo-picker-item-name",children:[H.name,H.isDefault&&v.jsx("span",{style:{marginLeft:8,fontSize:11,color:"var(--text-subtle)",fontWeight:400},children:"default"})]})},H.name)),ee?v.jsxs("div",{className:"repo-picker-new-branch",children:[v.jsx("input",{type:"text",value:A,onChange:H=>j(H.target.value),onKeyDown:H=>{H.key==="Enter"&&A.trim()&&le(A.trim())},placeholder:"branch-name"}),v.jsx("button",{type:"button",className:"modal-btn modal-btn-primary",disabled:!A.trim(),onClick:()=>le(A.trim()),children:"Create"})]}):v.jsx("div",{className:"repo-picker-item",style:{color:"var(--brand-1)"},onClick:()=>V(!0),children:v.jsx("span",{className:"repo-picker-item-name",children:"+ Create new branch"})})]}),v.jsxs("div",{className:"modal-actions",children:[v.jsx("button",{type:"button",className:"modal-btn",onClick:N,children:"Back"}),v.jsx("button",{type:"button",className:"modal-btn",onClick:l,children:"Cancel"})]})]}):v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"modal-title",children:"Resume from GitHub"}),v.jsx("div",{className:"repo-picker-filter",children:v.jsx("input",{type:"text",value:p,onChange:H=>m(H.target.value),placeholder:"Filter repositories..."})}),u&&v.jsx("div",{style:{padding:"24px 0",textAlign:"center",color:"var(--text-subtle)"},children:"Loading repositories..."}),c&&v.jsx("div",{style:{padding:"16px 0",color:"var(--red)",fontSize:13},children:c}),!u&&!c&&v.jsx("div",{className:"repo-picker-list",children:L.length===0?v.jsx("div",{style:{padding:16,textAlign:"center",color:"var(--text-subtle)",fontSize:13},children:p?"No matching repos":"No repos found"}):L.map(H=>v.jsxs("div",{className:"repo-picker-item",onClick:()=>q(H),children:[v.jsx("span",{className:"repo-picker-item-name",children:H.nameWithOwner}),v.jsx("span",{className:"repo-picker-item-date",children:Yk(H.updatedAt)})]},H.nameWithOwner))}),v.jsx("div",{className:"modal-actions",children:v.jsx("button",{type:"button",className:"modal-btn",onClick:l,children:"Cancel"})})]})})}),document.body)}function a0({authSource:t,hasGhToken:l,onKeySaved:a,onClose:r,onCopyLog:u,devMode:s}){const c=T.useId(),d=T.useId(),[p,m]=T.useState(Vu()||t==="oauth"?"oauth":"api-key"),[y,g]=T.useState(""),[b,S]=T.useState(""),[E,_]=T.useState(!1),D=p==="api-key"?t==="api-key":Vu(),C=T.useCallback(()=>{y.trim()&&(p==="api-key"?hT(y.trim()):vT(y.trim()),g(""),a())},[y,p,a]),A=T.useCallback(()=>{p==="api-key"?mT():yT(),a()},[p,a]),j=T.useCallback(()=>{b.trim()&&(bT(b.trim()),S(""),a())},[b,a]),ee=T.useCallback(()=>{xT(),a()},[a]),V=T.useCallback(X=>{X.key==="Enter"&&(X.preventDefault(),C())},[C]),q=T.useCallback(X=>{X.key==="Enter"&&(X.preventDefault(),j())},[j]),N=T.useCallback(()=>{u?.(),_(!0),setTimeout(()=>_(!1),2e3)},[u]);ds(r);const le=p==="api-key"?t==="api-key"?"Enter new key to override...":"sk-ant-...":Vu()?"Enter new token to override...":"Paste OAuth token...";return rs.createPortal(v.jsx("div",{className:"modal-overlay",onClick:r,children:v.jsxs("div",{className:"modal-card",onClick:X=>X.stopPropagation(),children:[v.jsx("div",{className:"modal-title",children:"Settings"}),s&&v.jsxs("div",{className:"settings-field",style:{marginTop:12},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[v.jsx("label",{htmlFor:c,style:{margin:0},children:"Claude Authentication"}),v.jsx("span",{className:`settings-status ${t?"active":"missing"}`,children:t==="keychain"?"Using Claude keychain":t==="oauth"?"OAuth token set":t==="api-key"?"API key set":"No credentials"})]}),t==="keychain"&&v.jsx("div",{style:{fontSize:11,color:"var(--text-subtle)",marginBottom:8},children:"Credentials detected from macOS Keychain. No manual key needed."}),!t&&v.jsx("div",{style:{fontSize:11,color:"var(--text-subtle)",marginBottom:8},children:"If you have Claude Code installed on macOS, credentials are automatically read from the Keychain. Otherwise, enter a key below."}),v.jsxs("div",{className:"settings-input-row",children:[v.jsxs("select",{value:p,onChange:X=>{m(X.target.value),g("")},className:"settings-key-type-select",children:[v.jsx("option",{value:"api-key",children:"API Key"}),v.jsx("option",{value:"oauth",children:"OAuth Token"})]}),v.jsx("input",{id:c,type:"password",value:y,onChange:X=>g(X.target.value),onKeyDown:V,placeholder:le}),y.trim()?v.jsx("button",{type:"button",onClick:C,className:"primary",children:"Save"}):D&&v.jsx("button",{type:"button",onClick:A,className:"btn btn-danger",children:"Remove"})]})]}),s&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"settings-divider"}),v.jsx("div",{className:"settings-section-label",children:"GitHub"}),v.jsxs("div",{className:"settings-field",children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[v.jsx("label",{htmlFor:d,style:{margin:0},children:"Personal Access Token"}),v.jsx("span",{className:`settings-status ${l?"active":"missing"}`,children:l?"Connected":"Not connected"})]}),v.jsxs("div",{className:"settings-input-row",children:[v.jsx("input",{id:d,type:"password",value:b,onChange:X=>S(X.target.value),onKeyDown:q,placeholder:l?"Enter new token to override...":"ghp_..."}),b.trim()?v.jsx("button",{type:"button",onClick:j,className:"primary",children:"Save"}):l&&v.jsx("button",{type:"button",onClick:ee,className:"btn btn-danger",children:"Remove"})]}),v.jsxs("div",{style:{fontSize:11,color:"var(--text-subtle)",marginTop:4},children:["Required scopes: ",v.jsx("code",{children:"repo"}),", ",v.jsx("code",{children:"read:user"}),". Create one at"," ",v.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"})]})]})]}),v.jsx("div",{className:"settings-divider"}),s&&u&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"settings-divider"}),v.jsx("div",{className:"settings-section-label",children:"Debug"}),v.jsx("button",{type:"button",className:"btn",onClick:N,children:E?"Copied!":"Copy session log"})]}),v.jsx("div",{className:"modal-actions",style:{marginTop:16},children:v.jsx("button",{type:"button",className:"modal-btn",onClick:r,children:"Close"})})]})}),document.body)}function Vk(){const{authSource:t,hasGhToken:l,showSettings:a,setShowSettings:r,refreshSettings:u,refreshSessions:s,handleNewProject:c,loading:d,devMode:p}=go(),m=Al(),{openMobileDrawer:y}=Jd(),[g]=iT(),b=p&&g.get("mode")==="session",[S,E]=T.useState(!1),[_,D]=T.useState(!1),C=T.useCallback(j=>{c(j,!0)},[c]),A=T.useCallback(async(j,ee)=>{E(!1),D(!0);try{const{sessionId:V,session:q}=await BT(j,ee);ss(q),s(),m(`/session/${V}`)}catch(V){console.error("Failed to resume from GitHub:",V)}finally{D(!1)}},[m,s]);return v.jsxs(v.Fragment,{children:[a&&v.jsx(a0,{authSource:t,hasGhToken:l??!1,onKeySaved:u,onClose:()=>r(!1),devMode:p}),v.jsxs("div",{className:"mobile-home-topbar",children:[v.jsx("button",{type:"button",className:"mobile-hamburger",onClick:y,"aria-label":"Open menu",children:v.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[v.jsx("title",{children:"Menu"}),v.jsx("line",{x1:"3",y1:"4.5",x2:"15",y2:"4.5"}),v.jsx("line",{x1:"3",y1:"9",x2:"15",y2:"9"}),v.jsx("line",{x1:"3",y1:"13.5",x2:"15",y2:"13.5"})]})}),v.jsx("img",{src:"/img/brand/logo.svg",alt:"Electric",className:"mobile-topbar-logo"})]}),v.jsxs("div",{className:"hero",children:[v.jsx("img",{src:"/img/brand/logo.svg",alt:"Electric",className:"hero-logo"}),v.jsx("p",{className:"hero-subtitle",children:b?"Start a freeform session":"Build Reactive apps on Sync"}),v.jsx("div",{className:"hero-prompt",children:v.jsx(l0,{onSubmit:b?C:c,placeholder:p&&!t?"Set an API key in Settings to get started...":b?"What do you want to work on?":"What do you want to build?",disabled:d||p&&!t})}),p&&l&&v.jsx("button",{type:"button",className:"hero-resume-btn",onClick:()=>E(!0),disabled:_,children:_?"Cloning...":"Resume from GitHub"})]}),S&&v.jsx(Pk,{onSelect:A,onClose:()=>E(!1)})]})}function Xk(t){const[l,a]=T.useState([]),[r,u]=T.useState(!1),s=T.useRef("-1");T.useEffect(()=>{if(!t)return;a([]),u(!1),s.current="-1";let p=!1,m=null,y=0;const g=10;function b(){if(p)return;if(y>=g){u(!1);return}const S=new URLSearchParams,E=Pb(t);E&&S.set("token",E),s.current!=="-1"&&S.set("offset",s.current);const _=S.toString(),D=`/api/rooms/${t}/events${_?`?${_}`:""}`;m=new EventSource(D),m.onopen=()=>{p||(y=0,u(!0))},m.onmessage=C=>{if(!p){C.lastEventId&&(s.current=C.lastEventId);try{const A=JSON.parse(C.data);a(j=>[...j,A])}catch{}}},m.onerror=()=>{if(p)return;m?.close(),y++;const C=Math.min(1e3*2**(y-1),3e4);setTimeout(b,C)}}return b(),()=>{p=!0,m&&(m.close(),m=null)}},[t]);const c=l.filter(p=>p.type==="agent_message"),d=l.some(p=>p.type==="room_closed");return{events:l,messages:c,isLive:r,isClosed:d}}function $k(){const{id:t}=Ob(),l=Al(),a=al(),{openMobileDrawer:r}=Jd(),{refreshSessions:u,refreshAgentRooms:s}=go(),[c,d]=T.useState(null),[p,m]=T.useState(null),[y,g]=T.useState(!1),[b,S]=T.useState(!1),E=T.useRef(!1);T.useEffect(()=>{if(t!=="new")return;const q=a.state?.description;if(!q){l("/",{replace:!0});return}let N=!1;return IT(q).then(le=>{if(N)return;const X=L=>{const G=le.sessions?.find(F=>F.role===L);if(!G)throw new Error(`Server did not return expected role: ${L}`);return G.sessionId};yd({id:le.roomId,code:le.code,name:le.name,createdAt:new Date().toISOString(),sessions:{coder:X("coder"),reviewer:X("reviewer"),uiDesigner:X("ui-designer")}});for(const L of le.sessions)ss({id:L.sessionId,projectName:L.name,sandboxProjectDir:"",description:`Room agent: ${L.name} (${L.role})`,createdAt:new Date().toISOString(),lastActiveAt:new Date().toISOString(),status:"running"});u(),s(),l(`/room/${le.roomId}`,{replace:!0})}).catch(le=>{N||m(le instanceof Error?le.message:"Failed to create room")}),()=>{N=!0}},[t,a.state,l,u,s]);const{events:_,isClosed:D}=Xk(t&&t!=="new"?t:null),C=t?ro().find(V=>V.id===t):void 0;T.useEffect(()=>{if(!t||t==="new")return;let V=!1;E.current=!1;const q=()=>{nv(t).then(le=>{if(!V){E.current=!0,d(le),m(null);for(const X of le.participants)bd(X.sessionId,{status:X.running?"running":"complete",needsInput:X.needsInput});u()}}).catch(le=>{if(!V){const X=le instanceof Error?le.message:String(le);X.includes("not found")||X.includes("Not Found")?m(X):E.current||m(X)}})};q();const N=setInterval(q,5e3);return()=>{V=!0,clearInterval(N)}},[t,u]);const A=T.useCallback(async()=>{if(t)try{await PT(t),d(V=>V&&{...V,state:"closed"})}catch(V){console.error("Failed to close room:",V)}},[t]);if(p)return v.jsxs("div",{className:"room-error",children:[v.jsx("h2",{children:"Cannot load room"}),v.jsx("p",{children:p}),v.jsx("button",{type:"button",className:"btn",onClick:()=>l("/"),children:"Go Home"})]});const j=D?"closed":c?.state,ee=c?.participants??[];return v.jsxs(v.Fragment,{children:[v.jsx(Qk,{roomId:t,roomName:C?.name,roomCode:C?.code,state:j,participants:ee,onClose:A,onAddAgent:()=>g(!0),openMobileDrawer:r}),v.jsxs("div",{className:"session-content",children:[v.jsx("div",{className:"room-messages",children:v.jsx(Wk,{events:_,participants:ee,provisioning:!!C?.sessions&&ee.length<3})}),v.jsx(eC,{roomId:t??"",participants:ee,disabled:j==="closed"||b,sending:b,setSending:S})]}),y&&t&&v.jsx(nC,{roomId:t,onClose:()=>g(!1),onAdded:()=>{g(!1),u(),nv(t).then(d).catch(()=>{})}})]})}function Qk({roomId:t,roomName:l,roomCode:a,state:r,participants:u,onClose:s,onAddAgent:c,openMobileDrawer:d}){const p=Al(),[m,y]=T.useState(!1),g=T.useCallback(()=>{if(!t||!a)return;const b=`${t}:${a}`;navigator.clipboard.writeText(b),y(!0),setTimeout(()=>y(!1),2e3)},[t,a]);return v.jsxs("div",{className:"session-header",children:[v.jsx("button",{type:"button",className:"mobile-hamburger",onClick:d,"aria-label":"Open menu",children:v.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[v.jsx("title",{children:"Menu"}),v.jsx("line",{x1:"3",y1:"4.5",x2:"15",y2:"4.5"}),v.jsx("line",{x1:"3",y1:"9",x2:"15",y2:"9"}),v.jsx("line",{x1:"3",y1:"13.5",x2:"15",y2:"13.5"})]})}),v.jsx("span",{className:"session-header-name",children:l||`Room ${t?.slice(0,8)}`}),r==="active"&&v.jsx("span",{className:"session-header-status",style:{color:"var(--green)"},children:"Active"}),r==="closed"&&v.jsx("span",{className:"session-header-status",style:{color:"var(--text-subtle)"},children:"Closed"}),v.jsx("span",{className:"room-header-participants",children:u.map(b=>{const S=dh(b.sessionId),E=b.name.split(/[-_ ]+/).slice(0,2).map(_=>_.charAt(0).toUpperCase()).join("");return v.jsx("button",{type:"button",className:"room-header-avatar",style:{background:S.bg,color:S.fg},title:b.name,onClick:()=>p(`/session/${b.sessionId}`),children:E},b.sessionId)})}),a&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"invite-code-label",children:"Join code:"}),v.jsx("button",{type:"button",className:"invite-code-btn",onClick:g,children:m?"Copied!":a})]}),v.jsxs("span",{className:"session-header-actions-group",children:[v.jsx("button",{type:"button",className:"session-header-action",onClick:c,disabled:r==="closed",children:"+ Agent"}),r==="active"&&v.jsx("button",{type:"button",className:"session-header-action",onClick:s,children:"Close Room"})]})]})}function Kk({name:t,participants:l}){const a=Al(),r=l.find(u=>u.name===t);return r?v.jsx("button",{type:"button",className:"room-message-from room-message-from-link",onClick:()=>a(`/session/${r.sessionId}`),title:`Go to ${t}'s session`,children:t}):v.jsx("span",{className:"room-message-from",children:t})}function Zk(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jk({body:t,participants:l}){const a=Al(),r=new Map(l.map(d=>[d.name,d.sessionId]));if(r.size===0)return v.jsx(v.Fragment,{children:t});const u=[...r.keys()].map(Zk).join("|"),s=new RegExp(`(${u})`,"g"),c=t.split(s);return v.jsx(v.Fragment,{children:c.map((d,p)=>{const m=r.get(d);return m?v.jsx("button",{type:"button",className:"room-inline-link",onClick:()=>a(`/session/${m}`),title:`Go to ${d}'s session`,children:d},`${d}-${p}`):v.jsx("span",{children:d},`text-${p}`)})})}function Wk({events:t,participants:l,provisioning:a}){const r=T.useRef(null),u=l.filter(s=>s.running&&!s.needsInput);return T.useEffect(()=>{r.current?.scrollIntoView({behavior:"smooth"})},[t.length,u.length]),t.length===0?v.jsx("div",{className:"room-empty",children:a?v.jsxs("div",{className:"room-working-indicator",children:[v.jsxs("span",{className:"room-working-dots",children:[v.jsx("span",{}),v.jsx("span",{}),v.jsx("span",{})]}),v.jsx("span",{className:"room-working-text",children:"Setting up agents"})]}):v.jsx("p",{children:"No messages yet."})}):v.jsxs("div",{className:"room-event-list",children:[t.map((s,c)=>{const d=`${s.ts}-${c}`;switch(s.type){case"agent_message":return v.jsxs("div",{className:"room-event room-message",children:[v.jsx(Kk,{name:s.from,participants:l}),s.to&&v.jsxs("span",{className:"room-message-to",children:["→ ",s.to]}),v.jsx("span",{className:"room-message-body",children:v.jsx(Jk,{body:s.body,participants:l})}),v.jsx("span",{className:"room-message-time",children:new Date(s.ts).toLocaleTimeString()})]},d);case"participant_joined":return v.jsxs("div",{className:"room-event room-system-event",children:[v.jsxs("span",{children:[s.participant?.displayName??"Unknown"," joined the room"]}),v.jsx("span",{className:"room-message-time",children:new Date(s.ts).toLocaleTimeString()})]},d);case"participant_left":return v.jsx("div",{className:"room-event room-system-event",children:v.jsx("span",{children:"Participant left"})},d);case"room_closed":return v.jsxs("div",{className:"room-event room-system-event room-closed-event",children:[v.jsxs("span",{children:["Room closed by ",s.closedBy]}),s.summary&&v.jsxs("span",{children:[" — ",s.summary]})]},d);default:return null}}),u.length>0&&v.jsxs("div",{className:"room-working-indicator",children:[v.jsxs("span",{className:"room-working-dots",children:[v.jsx("span",{}),v.jsx("span",{}),v.jsx("span",{})]}),v.jsxs("span",{className:"room-working-text",children:[u.map(s=>s.name).join(", ")," ",u.length===1?"is":"are"," working"]})]}),v.jsx("div",{ref:r})]})}function eC({roomId:t,participants:l,disabled:a,sending:r,setSending:u}){const[s,c]=T.useState(""),[d,p]=T.useState("broadcast"),[m,y]=T.useState(null),g=T.useRef(null),b=T.useCallback(async()=>{const E=s.trim();if(!(!E||!t)){u(!0),y(null);try{const _=Fb(),D=d==="broadcast"?void 0:d;await YT(t,_.displayName,E,D),c(""),g.current&&(g.current.style.height="auto")}catch(_){const D=_ instanceof Error?_.message:"Failed to send message";y(D)}finally{u(!1)}}},[s,t,d,u]),S=T.useCallback(()=>{const E=g.current;E&&(E.style.height="auto",E.style.height=`${Math.min(E.scrollHeight,200)}px`)},[]);return v.jsxs("div",{className:"prompt-bar room-prompt-bar",children:[m&&v.jsxs("div",{className:"room-send-error",children:[m,v.jsx("button",{type:"button",onClick:()=>y(null),children:"×"})]}),v.jsxs("select",{className:"room-target-select",value:d,onChange:E=>p(E.target.value),disabled:a,children:[v.jsx("option",{value:"broadcast",children:"@room (broadcast)"}),l.map(E=>v.jsxs("option",{value:E.name,children:["@",E.name]},E.sessionId))]}),v.jsx("textarea",{ref:g,value:s,onChange:E=>{c(E.target.value),S()},onKeyDown:E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),b())},placeholder:a?"Room closed":"Send a message...",disabled:a,rows:1}),v.jsx("button",{type:"button",className:"primary",onClick:b,disabled:a||!s.trim()||r,children:r?"...":"Send"})]})}const tC=[{value:"coder",label:"Coder",description:"Writes code, creates PRs"},{value:"reviewer",label:"Reviewer",description:"Reviews PRs (read-only)"},{value:"ui-designer",label:"UI Designer",description:"Audits and improves UI"}];function nC({roomId:t,onClose:l,onAdded:a}){const{sessions:r}=go(),[u,s]=T.useState("new"),[c,d]=T.useState(""),[p,m]=T.useState(!1),[y,g]=T.useState(""),[b,S]=T.useState(""),[E,_]=T.useState(!1),[D,C]=T.useState(null),A=r.filter(V=>V.status==="running"||V.status==="complete"),j=T.useCallback(async()=>{_(!0),C(null);try{if(u==="existing"){if(!b)return;const q=A.find(N=>N.id===b)?.projectName??b.slice(0,8);await GT(t,{sessionId:b,name:q,initialPrompt:y.trim()||void 0})}else{const V=await FT(t,{role:c.trim()||void 0,gated:p,initialPrompt:y.trim()||void 0});V.sessionToken&&cs(V.sessionId,V.sessionToken),ss({id:V.sessionId,projectName:V.participantName,sandboxProjectDir:"",description:c.trim()||`Agent in room ${t.slice(0,8)}`,createdAt:new Date().toISOString(),lastActiveAt:new Date().toISOString(),status:"running"})}a()}catch(V){C(V instanceof Error?V.message:"Failed to add agent")}finally{_(!1)}},[t,u,c,p,y,b,A,a]),ee=u==="existing"?!!b:!0;return v.jsx("div",{className:"modal-overlay",onClick:l,children:v.jsxs("div",{className:"modal-card",onClick:V=>V.stopPropagation(),children:[v.jsx("div",{className:"modal-title",children:"Add Agent to Room"}),v.jsxs("div",{className:"modal-body",children:[v.jsxs("div",{className:"room-form-toggle",children:[v.jsx("button",{type:"button",className:`room-form-toggle-btn ${u==="new"?"active":""}`,onClick:()=>s("new"),children:"New Agent"}),v.jsx("button",{type:"button",className:`room-form-toggle-btn ${u==="existing"?"active":""}`,onClick:()=>s("existing"),children:"Existing Session"})]}),u==="existing"?v.jsxs("label",{className:"room-form-label",children:["Session *",v.jsxs("select",{value:b,onChange:V=>S(V.target.value),children:[v.jsx("option",{value:"",children:"Select a session..."}),A.map(V=>v.jsxs("option",{value:V.id,children:[V.projectName," (",V.id.slice(0,8),")"]},V.id))]})]}):v.jsxs(v.Fragment,{children:[v.jsxs("label",{className:"room-form-label",children:["Role",v.jsxs("select",{value:c,onChange:V=>d(V.target.value),children:[v.jsx("option",{value:"",children:"No role (generic participant)"}),tC.map(V=>v.jsxs("option",{value:V.value,children:[V.label," — ",V.description]},V.value))]})]}),v.jsxs("label",{className:"room-form-label",children:["Initial Prompt",v.jsx("textarea",{value:y,onChange:V=>g(V.target.value),placeholder:"Optional message to send after agent joins",rows:3})]}),v.jsxs("label",{className:"room-form-checkbox",children:[v.jsx("input",{type:"checkbox",checked:p,onChange:V=>m(V.target.checked)}),"Gated (require approval for outbound messages)"]})]}),D&&v.jsx("p",{className:"room-form-error",children:D})]}),v.jsxs("div",{className:"modal-actions",children:[v.jsx("button",{type:"button",className:"modal-btn",onClick:l,children:"Cancel"}),v.jsx("button",{type:"button",className:"modal-btn primary",onClick:j,disabled:!ee||E,children:E?"Adding...":u==="existing"?"Join Room":"Add Agent"})]})]})})}const{entries:i0,setPrototypeOf:iv,isFrozen:lC,getPrototypeOf:aC,getOwnPropertyDescriptor:iC}=Object;let{freeze:gn,seal:nl,create:$u}=Object,{apply:wd,construct:Td}=typeof Reflect<"u"&&Reflect;gn||(gn=function(l){return l});nl||(nl=function(l){return l});wd||(wd=function(l,a){for(var r=arguments.length,u=new Array(r>2?r-2:0),s=2;s<r;s++)u[s-2]=arguments[s];return l.apply(a,u)});Td||(Td=function(l){for(var a=arguments.length,r=new Array(a>1?a-1:0),u=1;u<a;u++)r[u-1]=arguments[u];return new l(...r)});const zu=yn(Array.prototype.forEach),rC=yn(Array.prototype.lastIndexOf),rv=yn(Array.prototype.pop),Fr=yn(Array.prototype.push),oC=yn(Array.prototype.splice),Qu=yn(String.prototype.toLowerCase),Hf=yn(String.prototype.toString),If=yn(String.prototype.match),Gr=yn(String.prototype.replace),uC=yn(String.prototype.indexOf),sC=yn(String.prototype.trim),In=yn(Object.prototype.hasOwnProperty),mn=yn(RegExp.prototype.test),Yr=cC(TypeError);function yn(t){return function(l){l instanceof RegExp&&(l.lastIndex=0);for(var a=arguments.length,r=new Array(a>1?a-1:0),u=1;u<a;u++)r[u-1]=arguments[u];return wd(t,l,r)}}function cC(t){return function(){for(var l=arguments.length,a=new Array(l),r=0;r<l;r++)a[r]=arguments[r];return Td(t,a)}}function Ye(t,l){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qu;iv&&iv(t,null);let r=l.length;for(;r--;){let u=l[r];if(typeof u=="string"){const s=a(u);s!==u&&(lC(l)||(l[r]=s),u=s)}t[u]=!0}return t}function fC(t){for(let l=0;l<t.length;l++)In(t,l)||(t[l]=null);return t}function El(t){const l=$u(null);for(const[a,r]of i0(t))In(t,a)&&(Array.isArray(r)?l[a]=fC(r):r&&typeof r=="object"&&r.constructor===Object?l[a]=El(r):l[a]=r);return l}function Pr(t,l){for(;t!==null;){const r=iC(t,l);if(r){if(r.get)return yn(r.get);if(typeof r.value=="function")return yn(r.value)}t=aC(t)}function a(){return null}return a}const ov=gn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),qf=gn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ff=gn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),dC=gn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Gf=gn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),hC=gn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),uv=gn(["#text"]),sv=gn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Yf=gn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),cv=gn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Lu=gn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),mC=nl(/\{\{[\w\W]*|[\w\W]*\}\}/gm),pC=nl(/<%[\w\W]*|[\w\W]*%>/gm),gC=nl(/\$\{[\w\W]*/gm),yC=nl(/^data-[\-\w.\u00B7-\uFFFF]+$/),vC=nl(/^aria-[\-\w]+$/),r0=nl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bC=nl(/^(?:\w+script|data):/i),xC=nl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),o0=nl(/^html$/i),SC=nl(/^[a-z][.\w]*(-[.\w]+)+$/i);var fv=Object.freeze({__proto__:null,ARIA_ATTR:vC,ATTR_WHITESPACE:xC,CUSTOM_ELEMENT:SC,DATA_ATTR:yC,DOCTYPE_NAME:o0,ERB_EXPR:pC,IS_ALLOWED_URI:r0,IS_SCRIPT_OR_DATA:bC,MUSTACHE_EXPR:mC,TMPLIT_EXPR:gC});const Vr={element:1,text:3,progressingInstruction:7,comment:8,document:9},EC=function(){return typeof window>"u"?null:window},wC=function(l,a){if(typeof l!="object"||typeof l.createPolicy!="function")return null;let r=null;const u="data-tt-policy-suffix";a&&a.hasAttribute(u)&&(r=a.getAttribute(u));const s="dompurify"+(r?"#"+r:"");try{return l.createPolicy(s,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},dv=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function u0(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:EC();const l=Ee=>u0(Ee);if(l.version="3.3.3",l.removed=[],!t||!t.document||t.document.nodeType!==Vr.document||!t.Element)return l.isSupported=!1,l;let{document:a}=t;const r=a,u=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:c,Node:d,Element:p,NodeFilter:m,NamedNodeMap:y=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:g,DOMParser:b,trustedTypes:S}=t,E=p.prototype,_=Pr(E,"cloneNode"),D=Pr(E,"remove"),C=Pr(E,"nextSibling"),A=Pr(E,"childNodes"),j=Pr(E,"parentNode");if(typeof c=="function"){const Ee=a.createElement("template");Ee.content&&Ee.content.ownerDocument&&(a=Ee.content.ownerDocument)}let ee,V="";const{implementation:q,createNodeIterator:N,createDocumentFragment:le,getElementsByTagName:X}=a,{importNode:L}=r;let G=dv();l.isSupported=typeof i0=="function"&&typeof j=="function"&&q&&q.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:H,TMPLIT_EXPR:ie,DATA_ATTR:J,ARIA_ATTR:B,IS_SCRIPT_OR_DATA:te,ATTR_WHITESPACE:ce,CUSTOM_ELEMENT:pe}=fv;let{IS_ALLOWED_URI:R}=fv,O=null;const W=Ye({},[...ov,...qf,...Ff,...Gf,...uv]);let k=null;const de=Ye({},[...sv,...Yf,...cv,...Lu]);let ye=Object.seal($u(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Te=null,ze=null;const be=Object.seal($u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Oe=!0,At=!0,vn=!1,Et=!0,Yt=!1,Qt=!0,nn=!1,Pt=!1,dl=!1,Dn=!1,bn=!1,Nn=!1,hl=!0,Wl=!1;const Oa="user-content-";let pt=!0,cn=!1,ae={},he=null;const Ae=Ye({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ue=null;const Je=Ye({},["audio","video","img","source","image","track"]);let qt=null;const ln=Ye({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rt="http://www.w3.org/1998/Math/MathML",at="http://www.w3.org/2000/svg",gt="http://www.w3.org/1999/xhtml";let Ve=gt,fn=!1,Kt=null;const ai=Ye({},[Rt,at,gt],Hf);let xn=Ye({},["mi","mo","mn","ms","mtext"]),Gn=Ye({},["annotation-xml"]);const ml=Ye({},["title","style","font","a","script"]);let dn=null;const Rl=["application/xhtml+xml","text/html"],Dl="text/html";let kt=null,Sn=null;const pl=a.createElement("form"),il=function(U){return U instanceof RegExp||U instanceof Function},Ma=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Sn&&Sn===U)){if((!U||typeof U!="object")&&(U={}),U=El(U),dn=Rl.indexOf(U.PARSER_MEDIA_TYPE)===-1?Dl:U.PARSER_MEDIA_TYPE,kt=dn==="application/xhtml+xml"?Hf:Qu,O=In(U,"ALLOWED_TAGS")?Ye({},U.ALLOWED_TAGS,kt):W,k=In(U,"ALLOWED_ATTR")?Ye({},U.ALLOWED_ATTR,kt):de,Kt=In(U,"ALLOWED_NAMESPACES")?Ye({},U.ALLOWED_NAMESPACES,Hf):ai,qt=In(U,"ADD_URI_SAFE_ATTR")?Ye(El(ln),U.ADD_URI_SAFE_ATTR,kt):ln,Ue=In(U,"ADD_DATA_URI_TAGS")?Ye(El(Je),U.ADD_DATA_URI_TAGS,kt):Je,he=In(U,"FORBID_CONTENTS")?Ye({},U.FORBID_CONTENTS,kt):Ae,Te=In(U,"FORBID_TAGS")?Ye({},U.FORBID_TAGS,kt):El({}),ze=In(U,"FORBID_ATTR")?Ye({},U.FORBID_ATTR,kt):El({}),ae=In(U,"USE_PROFILES")?U.USE_PROFILES:!1,Oe=U.ALLOW_ARIA_ATTR!==!1,At=U.ALLOW_DATA_ATTR!==!1,vn=U.ALLOW_UNKNOWN_PROTOCOLS||!1,Et=U.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Yt=U.SAFE_FOR_TEMPLATES||!1,Qt=U.SAFE_FOR_XML!==!1,nn=U.WHOLE_DOCUMENT||!1,Dn=U.RETURN_DOM||!1,bn=U.RETURN_DOM_FRAGMENT||!1,Nn=U.RETURN_TRUSTED_TYPE||!1,dl=U.FORCE_BODY||!1,hl=U.SANITIZE_DOM!==!1,Wl=U.SANITIZE_NAMED_PROPS||!1,pt=U.KEEP_CONTENT!==!1,cn=U.IN_PLACE||!1,R=U.ALLOWED_URI_REGEXP||r0,Ve=U.NAMESPACE||gt,xn=U.MATHML_TEXT_INTEGRATION_POINTS||xn,Gn=U.HTML_INTEGRATION_POINTS||Gn,ye=U.CUSTOM_ELEMENT_HANDLING||{},U.CUSTOM_ELEMENT_HANDLING&&il(U.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=U.CUSTOM_ELEMENT_HANDLING.tagNameCheck),U.CUSTOM_ELEMENT_HANDLING&&il(U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),U.CUSTOM_ELEMENT_HANDLING&&typeof U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ye.allowCustomizedBuiltInElements=U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Yt&&(At=!1),bn&&(Dn=!0),ae&&(O=Ye({},uv),k=$u(null),ae.html===!0&&(Ye(O,ov),Ye(k,sv)),ae.svg===!0&&(Ye(O,qf),Ye(k,Yf),Ye(k,Lu)),ae.svgFilters===!0&&(Ye(O,Ff),Ye(k,Yf),Ye(k,Lu)),ae.mathMl===!0&&(Ye(O,Gf),Ye(k,cv),Ye(k,Lu))),In(U,"ADD_TAGS")||(be.tagCheck=null),In(U,"ADD_ATTR")||(be.attributeCheck=null),U.ADD_TAGS&&(typeof U.ADD_TAGS=="function"?be.tagCheck=U.ADD_TAGS:(O===W&&(O=El(O)),Ye(O,U.ADD_TAGS,kt))),U.ADD_ATTR&&(typeof U.ADD_ATTR=="function"?be.attributeCheck=U.ADD_ATTR:(k===de&&(k=El(k)),Ye(k,U.ADD_ATTR,kt))),U.ADD_URI_SAFE_ATTR&&Ye(qt,U.ADD_URI_SAFE_ATTR,kt),U.FORBID_CONTENTS&&(he===Ae&&(he=El(he)),Ye(he,U.FORBID_CONTENTS,kt)),U.ADD_FORBID_CONTENTS&&(he===Ae&&(he=El(he)),Ye(he,U.ADD_FORBID_CONTENTS,kt)),pt&&(O["#text"]=!0),nn&&Ye(O,["html","head","body"]),O.table&&(Ye(O,["tbody"]),delete Te.tbody),U.TRUSTED_TYPES_POLICY){if(typeof U.TRUSTED_TYPES_POLICY.createHTML!="function")throw Yr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof U.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Yr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ee=U.TRUSTED_TYPES_POLICY,V=ee.createHTML("")}else ee===void 0&&(ee=wC(S,u)),ee!==null&&typeof V=="string"&&(V=ee.createHTML(""));gn&&gn(U),Sn=U}},za=Ye({},[...qf,...Ff,...dC]),M=Ye({},[...Gf,...hC]),Y=function(U){let se=j(U);(!se||!se.tagName)&&(se={namespaceURI:Ve,tagName:"template"});const me=Qu(U.tagName),Ie=Qu(se.tagName);return Kt[U.namespaceURI]?U.namespaceURI===at?se.namespaceURI===gt?me==="svg":se.namespaceURI===Rt?me==="svg"&&(Ie==="annotation-xml"||xn[Ie]):!!za[me]:U.namespaceURI===Rt?se.namespaceURI===gt?me==="math":se.namespaceURI===at?me==="math"&&Gn[Ie]:!!M[me]:U.namespaceURI===gt?se.namespaceURI===at&&!Gn[Ie]||se.namespaceURI===Rt&&!xn[Ie]?!1:!M[me]&&(ml[me]||!za[me]):!!(dn==="application/xhtml+xml"&&Kt[U.namespaceURI]):!1},$=function(U){Fr(l.removed,{element:U});try{j(U).removeChild(U)}catch{D(U)}},fe=function(U,se){try{Fr(l.removed,{attribute:se.getAttributeNode(U),from:se})}catch{Fr(l.removed,{attribute:null,from:se})}if(se.removeAttribute(U),U==="is")if(Dn||bn)try{$(se)}catch{}else try{se.setAttribute(U,"")}catch{}},ve=function(U){let se=null,me=null;if(dl)U="<remove></remove>"+U;else{const Be=If(U,/^[\r\n\t ]+/);me=Be&&Be[0]}dn==="application/xhtml+xml"&&Ve===gt&&(U='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+U+"</body></html>");const Ie=ee?ee.createHTML(U):U;if(Ve===gt)try{se=new b().parseFromString(Ie,dn)}catch{}if(!se||!se.documentElement){se=q.createDocument(Ve,"template",null);try{se.documentElement.innerHTML=fn?V:Ie}catch{}}const ut=se.body||se.documentElement;return U&&me&&ut.insertBefore(a.createTextNode(me),ut.childNodes[0]||null),Ve===gt?X.call(se,nn?"html":"body")[0]:nn?se.documentElement:ut},_e=function(U){return N.call(U.ownerDocument||U,U,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},we=function(U){return U instanceof g&&(typeof U.nodeName!="string"||typeof U.textContent!="string"||typeof U.removeChild!="function"||!(U.attributes instanceof y)||typeof U.removeAttribute!="function"||typeof U.setAttribute!="function"||typeof U.namespaceURI!="string"||typeof U.insertBefore!="function"||typeof U.hasChildNodes!="function")},Se=function(U){return typeof d=="function"&&U instanceof d};function xe(Ee,U,se){zu(Ee,me=>{me.call(l,U,se,Sn)})}const Ce=function(U){let se=null;if(xe(G.beforeSanitizeElements,U,null),we(U))return $(U),!0;const me=kt(U.nodeName);if(xe(G.uponSanitizeElement,U,{tagName:me,allowedTags:O}),Qt&&U.hasChildNodes()&&!Se(U.firstElementChild)&&mn(/<[/\w!]/g,U.innerHTML)&&mn(/<[/\w!]/g,U.textContent)||U.nodeType===Vr.progressingInstruction||Qt&&U.nodeType===Vr.comment&&mn(/<[/\w]/g,U.data))return $(U),!0;if(!(be.tagCheck instanceof Function&&be.tagCheck(me))&&(!O[me]||Te[me])){if(!Te[me]&&De(me)&&(ye.tagNameCheck instanceof RegExp&&mn(ye.tagNameCheck,me)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(me)))return!1;if(pt&&!he[me]){const Ie=j(U)||U.parentNode,ut=A(U)||U.childNodes;if(ut&&Ie){const Be=ut.length;for(let xt=Be-1;xt>=0;--xt){const _t=_(ut[xt],!0);_t.__removalCount=(U.__removalCount||0)+1,Ie.insertBefore(_t,C(U))}}}return $(U),!0}return U instanceof p&&!Y(U)||(me==="noscript"||me==="noembed"||me==="noframes")&&mn(/<\/no(script|embed|frames)/i,U.innerHTML)?($(U),!0):(Yt&&U.nodeType===Vr.text&&(se=U.textContent,zu([F,H,ie],Ie=>{se=Gr(se,Ie," ")}),U.textContent!==se&&(Fr(l.removed,{element:U.cloneNode()}),U.textContent=se)),xe(G.afterSanitizeElements,U,null),!1)},Ne=function(U,se,me){if(ze[se]||hl&&(se==="id"||se==="name")&&(me in a||me in pl))return!1;if(!(At&&!ze[se]&&mn(J,se))){if(!(Oe&&mn(B,se))){if(!(be.attributeCheck instanceof Function&&be.attributeCheck(se,U))){if(!k[se]||ze[se]){if(!(De(U)&&(ye.tagNameCheck instanceof RegExp&&mn(ye.tagNameCheck,U)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(U))&&(ye.attributeNameCheck instanceof RegExp&&mn(ye.attributeNameCheck,se)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(se,U))||se==="is"&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&mn(ye.tagNameCheck,me)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(me))))return!1}else if(!qt[se]){if(!mn(R,Gr(me,ce,""))){if(!((se==="src"||se==="xlink:href"||se==="href")&&U!=="script"&&uC(me,"data:")===0&&Ue[U])){if(!(vn&&!mn(te,Gr(me,ce,"")))){if(me)return!1}}}}}}}return!0},De=function(U){return U!=="annotation-xml"&&If(U,pe)},Xe=function(U){xe(G.beforeSanitizeAttributes,U,null);const{attributes:se}=U;if(!se||we(U))return;const me={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:k,forceKeepAttr:void 0};let Ie=se.length;for(;Ie--;){const ut=se[Ie],{name:Be,namespaceURI:xt,value:_t}=ut,Vt=kt(Be),an=_t;let yt=Be==="value"?an:sC(an);if(me.attrName=Vt,me.attrValue=yt,me.keepAttr=!0,me.forceKeepAttr=void 0,xe(G.uponSanitizeAttribute,U,me),yt=me.attrValue,Wl&&(Vt==="id"||Vt==="name")&&(fe(Be,U),yt=Oa+yt),Qt&&mn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,yt)){fe(Be,U);continue}if(Vt==="attributename"&&If(yt,"href")){fe(Be,U);continue}if(me.forceKeepAttr)continue;if(!me.keepAttr){fe(Be,U);continue}if(!Et&&mn(/\/>/i,yt)){fe(Be,U);continue}Yt&&zu([F,H,ie],yl=>{yt=Gr(yt,yl," ")});const gl=kt(U.nodeName);if(!Ne(gl,Vt,yt)){fe(Be,U);continue}if(ee&&typeof S=="object"&&typeof S.getAttributeType=="function"&&!xt)switch(S.getAttributeType(gl,Vt)){case"TrustedHTML":{yt=ee.createHTML(yt);break}case"TrustedScriptURL":{yt=ee.createScriptURL(yt);break}}if(yt!==an)try{xt?U.setAttributeNS(xt,Be,yt):U.setAttribute(Be,yt),we(U)?$(U):rv(l.removed)}catch{fe(Be,U)}}xe(G.afterSanitizeAttributes,U,null)},$e=function Ee(U){let se=null;const me=_e(U);for(xe(G.beforeSanitizeShadowDOM,U,null);se=me.nextNode();)xe(G.uponSanitizeShadowNode,se,null),Ce(se),Xe(se),se.content instanceof s&&Ee(se.content);xe(G.afterSanitizeShadowDOM,U,null)};return l.sanitize=function(Ee){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},se=null,me=null,Ie=null,ut=null;if(fn=!Ee,fn&&(Ee="<!-->"),typeof Ee!="string"&&!Se(Ee))if(typeof Ee.toString=="function"){if(Ee=Ee.toString(),typeof Ee!="string")throw Yr("dirty is not a string, aborting")}else throw Yr("toString is not a function");if(!l.isSupported)return Ee;if(Pt||Ma(U),l.removed=[],typeof Ee=="string"&&(cn=!1),cn){if(Ee.nodeName){const _t=kt(Ee.nodeName);if(!O[_t]||Te[_t])throw Yr("root node is forbidden and cannot be sanitized in-place")}}else if(Ee instanceof d)se=ve("<!---->"),me=se.ownerDocument.importNode(Ee,!0),me.nodeType===Vr.element&&me.nodeName==="BODY"||me.nodeName==="HTML"?se=me:se.appendChild(me);else{if(!Dn&&!Yt&&!nn&&Ee.indexOf("<")===-1)return ee&&Nn?ee.createHTML(Ee):Ee;if(se=ve(Ee),!se)return Dn?null:Nn?V:""}se&&dl&&$(se.firstChild);const Be=_e(cn?Ee:se);for(;Ie=Be.nextNode();)Ce(Ie),Xe(Ie),Ie.content instanceof s&&$e(Ie.content);if(cn)return Ee;if(Dn){if(bn)for(ut=le.call(se.ownerDocument);se.firstChild;)ut.appendChild(se.firstChild);else ut=se;return(k.shadowroot||k.shadowrootmode)&&(ut=L.call(r,ut,!0)),ut}let xt=nn?se.outerHTML:se.innerHTML;return nn&&O["!doctype"]&&se.ownerDocument&&se.ownerDocument.doctype&&se.ownerDocument.doctype.name&&mn(o0,se.ownerDocument.doctype.name)&&(xt="<!DOCTYPE "+se.ownerDocument.doctype.name+`>
189
- `+xt),Yt&&zu([F,H,ie],_t=>{xt=Gr(xt,_t," ")}),ee&&Nn?ee.createHTML(xt):xt},l.setConfig=function(){let Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ma(Ee),Pt=!0},l.clearConfig=function(){Sn=null,Pt=!1},l.isValidAttribute=function(Ee,U,se){Sn||Ma({});const me=kt(Ee),Ie=kt(U);return Ne(me,Ie,se)},l.addHook=function(Ee,U){typeof U=="function"&&Fr(G[Ee],U)},l.removeHook=function(Ee,U){if(U!==void 0){const se=rC(G[Ee],U);return se===-1?void 0:oC(G[Ee],se,1)[0]}return rv(G[Ee])},l.removeHooks=function(Ee){G[Ee]=[]},l.removeAllHooks=function(){G=dv()},l}var s0=u0();function TC(t,l){const a={};return(t[t.length-1]===""?[...t,""]:t).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const kC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,CC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,AC={};function hv(t,l){return(AC.jsx?CC:kC).test(t)}const _C=/[ \t\n\f\r]/g;function RC(t){return typeof t=="object"?t.type==="text"?mv(t.value):!1:mv(t)}function mv(t){return t.replace(_C,"")===""}class yo{constructor(l,a,r){this.normal=a,this.property=l,r&&(this.space=r)}}yo.prototype.normal={};yo.prototype.property={};yo.prototype.space=void 0;function c0(t,l){const a={},r={};for(const u of t)Object.assign(a,u.property),Object.assign(r,u.normal);return new yo(a,r,l)}function kd(t){return t.toLowerCase()}class Rn{constructor(l,a){this.attribute=a,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 DC=0;const Ge=li(),It=li(),Cd=li(),ge=li(),St=li(),Yi=li(),Hn=li();function li(){return 2**++DC}const Ad=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:It,commaOrSpaceSeparated:Hn,commaSeparated:Yi,number:ge,overloadedBoolean:Cd,spaceSeparated:St},Symbol.toStringTag,{value:"Module"})),Pf=Object.keys(Ad);class mh extends Rn{constructor(l,a,r,u){let s=-1;if(super(l,a),pv(this,"space",u),typeof r=="number")for(;++s<Pf.length;){const c=Pf[s];pv(this,Pf[s],(r&Ad[c])===Ad[c])}}}mh.prototype.defined=!0;function pv(t,l,a){a&&(t[l]=a)}function Xi(t){const l={},a={};for(const[r,u]of Object.entries(t.properties)){const s=new mh(r,t.transform(t.attributes||{},r),u,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),l[r]=s,a[kd(r)]=r,a[kd(s.attribute)]=r}return new yo(l,a,t.space)}const f0=Xi({properties:{ariaActiveDescendant:null,ariaAtomic:It,ariaAutoComplete:null,ariaBusy:It,ariaChecked:It,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:St,ariaCurrent:null,ariaDescribedBy:St,ariaDetails:null,ariaDisabled:It,ariaDropEffect:St,ariaErrorMessage:null,ariaExpanded:It,ariaFlowTo:St,ariaGrabbed:It,ariaHasPopup:null,ariaHidden:It,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:St,ariaLevel:ge,ariaLive:null,ariaModal:It,ariaMultiLine:It,ariaMultiSelectable:It,ariaOrientation:null,ariaOwns:St,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:It,ariaReadOnly:It,ariaRelevant:null,ariaRequired:It,ariaRoleDescription:St,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:It,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(t,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function d0(t,l){return l in t?t[l]:l}function h0(t,l){return d0(t,l.toLowerCase())}const NC=Xi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Yi,acceptCharset:St,accessKey:St,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:St,autoFocus:Ge,autoPlay:Ge,blocking:St,capture:null,charSet:null,checked:Ge,cite:null,className:St,cols:ge,colSpan:null,content:null,contentEditable:It,controls:Ge,controlsList:St,coords:ge|Yi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Cd,draggable:It,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:St,height:ge,hidden:Cd,high:ge,href:null,hrefLang:null,htmlFor:St,httpEquiv:St,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:St,itemRef:St,itemScope:Ge,itemType:St,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,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:Ge,optimum:ge,pattern:null,ping:St,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:St,required:Ge,reversed:Ge,rows:ge,rowSpan:ge,sandbox:St,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:It,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:It,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:St,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:It,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:h0}),jC=Xi({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:Hn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:St,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:Yi,g2:Yi,glyphName:Yi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:Hn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,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:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:St,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Hn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Hn,rev:Hn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Hn,requiredFeatures:Hn,requiredFonts:Hn,requiredFormats:Hn,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:Hn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Hn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Hn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:d0}),m0=Xi({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()}}),p0=Xi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:h0}),g0=Xi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,l){return"xml:"+l.slice(3).toLowerCase()}}),OC={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"},MC=/[A-Z]/g,gv=/-[a-z]/g,zC=/^data[-\w.:]+$/i;function LC(t,l){const a=kd(l);let r=l,u=Rn;if(a in t.normal)return t.property[t.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&zC.test(l)){if(l.charAt(4)==="-"){const s=l.slice(5).replace(gv,BC);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=l.slice(4);if(!gv.test(s)){let c=s.replace(MC,UC);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}u=mh}return new u(r,l)}function UC(t){return"-"+t.toLowerCase()}function BC(t){return t.charAt(1).toUpperCase()}const HC=c0([f0,NC,m0,p0,g0],"html"),ph=c0([f0,jC,m0,p0,g0],"svg");function IC(t){return t.join(" ").trim()}var Bi={},Vf,yv;function qC(){if(yv)return Vf;yv=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,a=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,u=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
190
- `,m="/",y="*",g="",b="comment",S="declaration";function E(D,C){if(typeof D!="string")throw new TypeError("First argument must be a string");if(!D)return[];C=C||{};var A=1,j=1;function ee(ie){var J=ie.match(l);J&&(A+=J.length);var B=ie.lastIndexOf(p);j=~B?ie.length-B:j+ie.length}function V(){var ie={line:A,column:j};return function(J){return J.position=new q(ie),X(),J}}function q(ie){this.start=ie,this.end={line:A,column:j},this.source=C.source}q.prototype.content=D;function N(ie){var J=new Error(C.source+":"+A+":"+j+": "+ie);if(J.reason=ie,J.filename=C.source,J.line=A,J.column=j,J.source=D,!C.silent)throw J}function le(ie){var J=ie.exec(D);if(J){var B=J[0];return ee(B),D=D.slice(B.length),J}}function X(){le(a)}function L(ie){var J;for(ie=ie||[];J=G();)J!==!1&&ie.push(J);return ie}function G(){var ie=V();if(!(m!=D.charAt(0)||y!=D.charAt(1))){for(var J=2;g!=D.charAt(J)&&(y!=D.charAt(J)||m!=D.charAt(J+1));)++J;if(J+=2,g===D.charAt(J-1))return N("End of comment missing");var B=D.slice(2,J-2);return j+=2,ee(B),D=D.slice(J),j+=2,ie({type:b,comment:B})}}function F(){var ie=V(),J=le(r);if(J){if(G(),!le(u))return N("property missing ':'");var B=le(s),te=ie({type:S,property:_(J[0].replace(t,g)),value:B?_(B[0].replace(t,g)):g});return le(c),te}}function H(){var ie=[];L(ie);for(var J;J=F();)J!==!1&&(ie.push(J),L(ie));return ie}return X(),H()}function _(D){return D?D.replace(d,g):g}return Vf=E,Vf}var vv;function FC(){if(vv)return Bi;vv=1;var t=Bi&&Bi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.default=a;const l=t(qC());function a(r,u){let s=null;if(!r||typeof r!="string")return s;const c=(0,l.default)(r),d=typeof u=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:y}=p;d?u(m,y,p):y&&(s=s||{},s[m]=y)}),s}return Bi}var Xr={},bv;function GC(){if(bv)return Xr;bv=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,a=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,u=/^-(ms)-/,s=function(m){return!m||a.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(u,d):m=m.replace(r,d),m.replace(l,c))};return Xr.camelCase=p,Xr}var $r,xv;function YC(){if(xv)return $r;xv=1;var t=$r&&$r.__importDefault||function(u){return u&&u.__esModule?u:{default:u}},l=t(FC()),a=GC();function r(u,s){var c={};return!u||typeof u!="string"||(0,l.default)(u,function(d,p){d&&p&&(c[(0,a.camelCase)(d,s)]=p)}),c}return r.default=r,$r=r,$r}var PC=YC();const VC=Fd(PC),y0=v0("end"),gh=v0("start");function v0(t){return l;function l(a){const r=a&&a.position&&a.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 XC(t){const l=gh(t),a=y0(t);if(l&&a)return{start:l,end:a}}function eo(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Sv(t.position):"start"in t||"end"in t?Sv(t):"line"in t||"column"in t?_d(t):""}function _d(t){return Ev(t&&t.line)+":"+Ev(t&&t.column)}function Sv(t){return _d(t&&t.start)+"-"+_d(t&&t.end)}function Ev(t){return t&&typeof t=="number"?t:1}class sn extends Error{constructor(l,a,r){super(),typeof a=="string"&&(r=a,a=void 0);let u="",s={},c=!1;if(a&&("line"in a&&"column"in a?s={place:a}:"start"in a&&"end"in a?s={place:a}:"type"in a?s={ancestors:[a],place:a.position}:s={...a}),typeof l=="string"?u=l:!s.cause&&l&&(c=!0,u=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=u,this.line=d?d.line:void 0,this.name=eo(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}}sn.prototype.file="";sn.prototype.name="";sn.prototype.reason="";sn.prototype.message="";sn.prototype.stack="";sn.prototype.column=void 0;sn.prototype.line=void 0;sn.prototype.ancestors=void 0;sn.prototype.cause=void 0;sn.prototype.fatal=void 0;sn.prototype.place=void 0;sn.prototype.ruleId=void 0;sn.prototype.source=void 0;const yh={}.hasOwnProperty,$C=new Map,QC=/[A-Z]/g,KC=new Set(["table","tbody","thead","tfoot","tr"]),ZC=new Set(["td","th"]),b0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function JC(t,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=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=rA(a,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=iA(a,l.jsx,l.jsxs)}const u={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:r,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?ph:HC,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},s=x0(u,t,void 0);return s&&typeof s!="string"?s:u.create(t,u.Fragment,{children:s||void 0},void 0)}function x0(t,l,a){if(l.type==="element")return WC(t,l,a);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return eA(t,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return nA(t,l,a);if(l.type==="mdxjsEsm")return tA(t,l);if(l.type==="root")return lA(t,l,a);if(l.type==="text")return aA(t,l)}function WC(t,l,a){const r=t.schema;let u=r;l.tagName.toLowerCase()==="svg"&&r.space==="html"&&(u=ph,t.schema=u),t.ancestors.push(l);const s=E0(t,l.tagName,!1),c=oA(t,l);let d=bh(t,l);return KC.has(l.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!RC(p):!0})),S0(t,c,s,l),vh(c,d),t.ancestors.pop(),t.schema=r,t.create(l,s,c,a)}function eA(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)}oo(t,l.position)}function tA(t,l){if(l.data&&l.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(l.data.estree);oo(t,l.position)}function nA(t,l,a){const r=t.schema;let u=r;l.name==="svg"&&r.space==="html"&&(u=ph,t.schema=u),t.ancestors.push(l);const s=l.name===null?t.Fragment:E0(t,l.name,!0),c=uA(t,l),d=bh(t,l);return S0(t,c,s,l),vh(c,d),t.ancestors.pop(),t.schema=r,t.create(l,s,c,a)}function lA(t,l,a){const r={};return vh(r,bh(t,l)),t.create(l,t.Fragment,r,a)}function aA(t,l){return l.value}function S0(t,l,a,r){typeof a!="string"&&a!==t.Fragment&&t.passNode&&(l.node=r)}function vh(t,l){if(l.length>0){const a=l.length>1?l:l[0];a&&(t.children=a)}}function iA(t,l,a){return r;function r(u,s,c,d){const m=Array.isArray(c.children)?a:l;return d?m(s,c,d):m(s,c)}}function rA(t,l){return a;function a(r,u,s,c){const d=Array.isArray(s.children),p=gh(r);return l(u,s,c,d,{columnNumber:p?p.column-1:void 0,fileName:t,lineNumber:p?p.line:void 0},void 0)}}function oA(t,l){const a={};let r,u;for(u in l.properties)if(u!=="children"&&yh.call(l.properties,u)){const s=sA(t,u,l.properties[u]);if(s){const[c,d]=s;t.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&ZC.has(l.tagName)?r=d:a[c]=d}}if(r){const s=a.style||(a.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return a}function uA(t,l){const a={};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(a,t.evaluater.evaluateExpression(d.argument))}else oo(t,l.position);else{const u=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 oo(t,l.position);else s=r.value===null?!0:r.value;a[u]=s}return a}function bh(t,l){const a=[];let r=-1;const u=t.passKeys?new Map:$C;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=u.get(p)||0;c=p+"-"+m,u.set(p,m+1)}}const d=x0(t,s,c);d!==void 0&&a.push(d)}return a}function sA(t,l,a){const r=LC(t.schema,l);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=r.commaSeparated?TC(a):IC(a)),r.property==="style"){let u=typeof a=="object"?a:cA(t,String(a));return t.stylePropertyNameCase==="css"&&(u=fA(u)),["style",u]}return[t.elementAttributeNameCase==="react"&&r.space?OC[r.property]||r.property:r.attribute,a]}}function cA(t,l){try{return VC(l,{reactCompat:!0})}catch(a){if(t.ignoreInvalidStyle)return{};const r=a,u=new sn("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw u.file=t.filePath||void 0,u.url=b0+"#cannot-parse-style-attribute",u}}function E0(t,l,a){let r;if(!a)r={type:"Literal",value:l};else if(l.includes(".")){const u=l.split(".");let s=-1,c;for(;++s<u.length;){const d=hv(u[s])?{type:"Identifier",name:u[s]}:{type:"Literal",value:u[s]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(s&&d.type==="Literal"),optional:!1}:d}r=c}else r=hv(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(r.type==="Literal"){const u=r.value;return yh.call(t.components,u)?t.components[u]:u}if(t.evaluater)return t.evaluater.evaluateExpression(r);oo(t)}function oo(t,l){const a=new sn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=t.filePath||void 0,a.url=b0+"#cannot-handle-mdx-estrees-without-createevaluater",a}function fA(t){const l={};let a;for(a in t)yh.call(t,a)&&(l[dA(a)]=t[a]);return l}function dA(t){let l=t.replace(QC,hA);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function hA(t){return"-"+t.toLowerCase()}const Xf={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"]},mA={};function xh(t,l){const a=mA,r=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,u=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return w0(t,r,u)}function w0(t,l,a){if(pA(t)){if("value"in t)return t.type==="html"&&!a?"":t.value;if(l&&"alt"in t&&t.alt)return t.alt;if("children"in t)return wv(t.children,l,a)}return Array.isArray(t)?wv(t,l,a):""}function wv(t,l,a){const r=[];let u=-1;for(;++u<t.length;)r[u]=w0(t[u],l,a);return r.join("")}function pA(t){return!!(t&&typeof t=="object")}const Tv=document.createElement("i");function Sh(t){const l="&"+t+";";Tv.innerHTML=l;const a=Tv.textContent;return a.charCodeAt(a.length-1)===59&&t!=="semi"||a===l?!1:a}function Fn(t,l,a,r){const u=t.length;let s=0,c;if(l<0?l=-l>u?0:u+l:l=l>u?u:l,a=a>0?a:0,r.length<1e4)c=Array.from(r),c.unshift(l,a),t.splice(...c);else for(a&&t.splice(l,a);s<r.length;)c=r.slice(s,s+1e4),c.unshift(l,0),t.splice(...c),s+=1e4,l+=1e4}function el(t,l){return t.length>0?(Fn(t,t.length,0,l),t):l}const kv={}.hasOwnProperty;function T0(t){const l={};let a=-1;for(;++a<t.length;)gA(l,t[a]);return l}function gA(t,l){let a;for(a in l){const u=(kv.call(t,a)?t[a]:void 0)||(t[a]={}),s=l[a];let c;if(s)for(c in s){kv.call(u,c)||(u[c]=[]);const d=s[c];yA(u[c],Array.isArray(d)?d:d?[d]:[])}}}function yA(t,l){let a=-1;const r=[];for(;++a<l.length;)(l[a].add==="after"?t:r).push(l[a]);Fn(t,0,0,r)}function k0(t,l){const a=Number.parseInt(t,l);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function cl(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const pn=ja(/[A-Za-z]/),un=ja(/[\dA-Za-z]/),vA=ja(/[#-'*+\--9=?A-Z^-~]/);function Wu(t){return t!==null&&(t<32||t===127)}const Rd=ja(/\d/),bA=ja(/[\dA-Fa-f]/),xA=ja(/[!-/:-@[-`{-~]/);function Me(t){return t!==null&&t<-2}function bt(t){return t!==null&&(t<0||t===32)}function Ze(t){return t===-2||t===-1||t===32}const ps=ja(new RegExp("\\p{P}|\\p{S}","u")),ti=ja(/\s/);function ja(t){return l;function l(a){return a!==null&&a>-1&&t.test(String.fromCharCode(a))}}function $i(t){const l=[];let a=-1,r=0,u=0;for(;++a<t.length;){const s=t.charCodeAt(a);let c="";if(s===37&&un(t.charCodeAt(a+1))&&un(t.charCodeAt(a+2)))u=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(a+1);s<56320&&d>56319&&d<57344?(c=String.fromCharCode(s,d),u=1):c="�"}else c=String.fromCharCode(s);c&&(l.push(t.slice(r,a),encodeURIComponent(c)),r=a+u+1,c=""),u&&(a+=u,u=0)}return l.join("")+t.slice(r)}function it(t,l,a,r){const u=r?r-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(p){return Ze(p)?(t.enter(a),d(p)):l(p)}function d(p){return Ze(p)&&s++<u?(t.consume(p),d):(t.exit(a),l(p))}}const SA={tokenize:EA};function EA(t){const l=t.attempt(this.parser.constructs.contentInitial,r,u);let a;return l;function r(d){if(d===null){t.consume(d);return}return t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),it(t,l,"linePrefix")}function u(d){return t.enter("paragraph"),s(d)}function s(d){const p=t.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=p),a=p,c(d)}function c(d){if(d===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(d);return}return Me(d)?(t.consume(d),t.exit("chunkText"),s):(t.consume(d),c)}}const wA={tokenize:TA},Cv={tokenize:kA};function TA(t){const l=this,a=[];let r=0,u,s,c;return d;function d(j){if(r<a.length){const ee=a[r];return l.containerState=ee[1],t.attempt(ee[0].continuation,p,m)(j)}return m(j)}function p(j){if(r++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,u&&A();const ee=l.events.length;let V=ee,q;for(;V--;)if(l.events[V][0]==="exit"&&l.events[V][1].type==="chunkFlow"){q=l.events[V][1].end;break}C(r);let N=ee;for(;N<l.events.length;)l.events[N][1].end={...q},N++;return Fn(l.events,V+1,0,l.events.slice(ee)),l.events.length=N,m(j)}return d(j)}function m(j){if(r===a.length){if(!u)return b(j);if(u.currentConstruct&&u.currentConstruct.concrete)return E(j);l.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return l.containerState={},t.check(Cv,y,g)(j)}function y(j){return u&&A(),C(r),b(j)}function g(j){return l.parser.lazy[l.now().line]=r!==a.length,c=l.now().offset,E(j)}function b(j){return l.containerState={},t.attempt(Cv,S,E)(j)}function S(j){return r++,a.push([l.currentConstruct,l.containerState]),b(j)}function E(j){if(j===null){u&&A(),C(0),t.consume(j);return}return u=u||l.parser.flow(l.now()),t.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:s}),_(j)}function _(j){if(j===null){D(t.exit("chunkFlow"),!0),C(0),t.consume(j);return}return Me(j)?(t.consume(j),D(t.exit("chunkFlow")),r=0,l.interrupt=void 0,d):(t.consume(j),_)}function D(j,ee){const V=l.sliceStream(j);if(ee&&V.push(null),j.previous=s,s&&(s.next=j),s=j,u.defineSkip(j.start),u.write(V),l.parser.lazy[j.start.line]){let q=u.events.length;for(;q--;)if(u.events[q][1].start.offset<c&&(!u.events[q][1].end||u.events[q][1].end.offset>c))return;const N=l.events.length;let le=N,X,L;for(;le--;)if(l.events[le][0]==="exit"&&l.events[le][1].type==="chunkFlow"){if(X){L=l.events[le][1].end;break}X=!0}for(C(r),q=N;q<l.events.length;)l.events[q][1].end={...L},q++;Fn(l.events,le+1,0,l.events.slice(N)),l.events.length=q}}function C(j){let ee=a.length;for(;ee-- >j;){const V=a[ee];l.containerState=V[1],V[0].exit.call(l,t)}a.length=j}function A(){u.write([null]),s=void 0,u=void 0,l.containerState._closeFlow=void 0}}function kA(t,l,a){return it(t,t.attempt(this.parser.constructs.document,l,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Vi(t){if(t===null||bt(t)||ti(t))return 1;if(ps(t))return 2}function gs(t,l,a){const r=[];let u=-1;for(;++u<t.length;){const s=t[u].resolveAll;s&&!r.includes(s)&&(l=s(l,a),r.push(s))}return l}const Dd={name:"attention",resolveAll:CA,tokenize:AA};function CA(t,l){let a=-1,r,u,s,c,d,p,m,y;for(;++a<t.length;)if(t[a][0]==="enter"&&t[a][1].type==="attentionSequence"&&t[a][1]._close){for(r=a;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[a][1]).charCodeAt(0)){if((t[r][1]._close||t[a][1]._open)&&(t[a][1].end.offset-t[a][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[a][1].end.offset-t[a][1].start.offset)%3))continue;p=t[r][1].end.offset-t[r][1].start.offset>1&&t[a][1].end.offset-t[a][1].start.offset>1?2:1;const g={...t[r][1].end},b={...t[a][1].start};Av(g,-p),Av(b,p),c={type:p>1?"strongSequence":"emphasisSequence",start:g,end:{...t[r][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...t[a][1].start},end:b},s={type:p>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[a][1].start}},u={type:p>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},t[r][1].end={...c.start},t[a][1].start={...d.end},m=[],t[r][1].end.offset-t[r][1].start.offset&&(m=el(m,[["enter",t[r][1],l],["exit",t[r][1],l]])),m=el(m,[["enter",u,l],["enter",c,l],["exit",c,l],["enter",s,l]]),m=el(m,gs(l.parser.constructs.insideSpan.null,t.slice(r+1,a),l)),m=el(m,[["exit",s,l],["enter",d,l],["exit",d,l],["exit",u,l]]),t[a][1].end.offset-t[a][1].start.offset?(y=2,m=el(m,[["enter",t[a][1],l],["exit",t[a][1],l]])):y=0,Fn(t,r-1,a-r+3,m),a=r+m.length-y-2;break}}for(a=-1;++a<t.length;)t[a][1].type==="attentionSequence"&&(t[a][1].type="data");return t}function AA(t,l){const a=this.parser.constructs.attentionMarkers.null,r=this.previous,u=Vi(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=Vi(p),g=!y||y===2&&u||a.includes(p),b=!u||u===2&&y||a.includes(r);return m._open=!!(s===42?g:g&&(u||!b)),m._close=!!(s===42?b:b&&(y||!g)),l(p)}}function Av(t,l){t.column+=l,t.offset+=l,t._bufferIndex+=l}const _A={name:"autolink",tokenize:RA};function RA(t,l,a){let r=0;return u;function u(S){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(S){return pn(S)?(t.consume(S),c):S===64?a(S):m(S)}function c(S){return S===43||S===45||S===46||un(S)?(r=1,d(S)):m(S)}function d(S){return S===58?(t.consume(S),r=0,p):(S===43||S===45||S===46||un(S))&&r++<32?(t.consume(S),d):(r=0,m(S))}function p(S){return S===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),l):S===null||S===32||S===60||Wu(S)?a(S):(t.consume(S),p)}function m(S){return S===64?(t.consume(S),y):vA(S)?(t.consume(S),m):a(S)}function y(S){return un(S)?g(S):a(S)}function g(S){return S===46?(t.consume(S),r=0,y):S===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),l):b(S)}function b(S){if((S===45||un(S))&&r++<63){const E=S===45?b:g;return t.consume(S),E}return a(S)}}const vo={partial:!0,tokenize:DA};function DA(t,l,a){return r;function r(s){return Ze(s)?it(t,u,"linePrefix")(s):u(s)}function u(s){return s===null||Me(s)?l(s):a(s)}}const C0={continuation:{tokenize:jA},exit:OA,name:"blockQuote",tokenize:NA};function NA(t,l,a){const r=this;return u;function u(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 a(c)}function s(c){return Ze(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),l):(t.exit("blockQuotePrefix"),l(c))}}function jA(t,l,a){const r=this;return u;function u(c){return Ze(c)?it(t,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return t.attempt(C0,l,a)(c)}}function OA(t){t.exit("blockQuote")}const A0={name:"characterEscape",tokenize:MA};function MA(t,l,a){return r;function r(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),u}function u(s){return xA(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),l):a(s)}}const _0={name:"characterReference",tokenize:zA};function zA(t,l,a){const r=this;let u=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=un,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=bA,y):(t.enter("characterReferenceValue"),s=7,c=Rd,y(g))}function y(g){if(g===59&&u){const b=t.exit("characterReferenceValue");return c===un&&!Sh(r.sliceSerialize(b))?a(g):(t.enter("characterReferenceMarker"),t.consume(g),t.exit("characterReferenceMarker"),t.exit("characterReference"),l)}return c(g)&&u++<s?(t.consume(g),y):a(g)}}const _v={partial:!0,tokenize:UA},Rv={concrete:!0,name:"codeFenced",tokenize:LA};function LA(t,l,a){const r=this,u={partial:!0,tokenize:V};let s=0,c=0,d;return p;function p(q){return m(q)}function m(q){const N=r.events[r.events.length-1];return s=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,d=q,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),y(q)}function y(q){return q===d?(c++,t.consume(q),y):c<3?a(q):(t.exit("codeFencedFenceSequence"),Ze(q)?it(t,g,"whitespace")(q):g(q))}function g(q){return q===null||Me(q)?(t.exit("codeFencedFence"),r.interrupt?l(q):t.check(_v,_,ee)(q)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),b(q))}function b(q){return q===null||Me(q)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),g(q)):Ze(q)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),it(t,S,"whitespace")(q)):q===96&&q===d?a(q):(t.consume(q),b)}function S(q){return q===null||Me(q)?g(q):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),E(q))}function E(q){return q===null||Me(q)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),g(q)):q===96&&q===d?a(q):(t.consume(q),E)}function _(q){return t.attempt(u,ee,D)(q)}function D(q){return t.enter("lineEnding"),t.consume(q),t.exit("lineEnding"),C}function C(q){return s>0&&Ze(q)?it(t,A,"linePrefix",s+1)(q):A(q)}function A(q){return q===null||Me(q)?t.check(_v,_,ee)(q):(t.enter("codeFlowValue"),j(q))}function j(q){return q===null||Me(q)?(t.exit("codeFlowValue"),A(q)):(t.consume(q),j)}function ee(q){return t.exit("codeFenced"),l(q)}function V(q,N,le){let X=0;return L;function L(J){return q.enter("lineEnding"),q.consume(J),q.exit("lineEnding"),G}function G(J){return q.enter("codeFencedFence"),Ze(J)?it(q,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(J):F(J)}function F(J){return J===d?(q.enter("codeFencedFenceSequence"),H(J)):le(J)}function H(J){return J===d?(X++,q.consume(J),H):X>=c?(q.exit("codeFencedFenceSequence"),Ze(J)?it(q,ie,"whitespace")(J):ie(J)):le(J)}function ie(J){return J===null||Me(J)?(q.exit("codeFencedFence"),N(J)):le(J)}}}function UA(t,l,a){const r=this;return u;function u(c){return c===null?a(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s)}function s(c){return r.parser.lazy[r.now().line]?a(c):l(c)}}const $f={name:"codeIndented",tokenize:HA},BA={partial:!0,tokenize:IA};function HA(t,l,a){const r=this;return u;function u(m){return t.enter("codeIndented"),it(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):a(m)}function c(m){return m===null?p(m):Me(m)?t.attempt(BA,c,p)(m):(t.enter("codeFlowValue"),d(m))}function d(m){return m===null||Me(m)?(t.exit("codeFlowValue"),c(m)):(t.consume(m),d)}function p(m){return t.exit("codeIndented"),l(m)}}function IA(t,l,a){const r=this;return u;function u(c){return r.parser.lazy[r.now().line]?a(c):Me(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),u):it(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):Me(c)?u(c):a(c)}}const qA={name:"codeText",previous:GA,resolve:FA,tokenize:YA};function FA(t){let l=t.length-4,a=3,r,u;if((t[a][1].type==="lineEnding"||t[a][1].type==="space")&&(t[l][1].type==="lineEnding"||t[l][1].type==="space")){for(r=a;++r<l;)if(t[r][1].type==="codeTextData"){t[a][1].type="codeTextPadding",t[l][1].type="codeTextPadding",a+=2,l-=2;break}}for(r=a-1,l++;++r<=l;)u===void 0?r!==l&&t[r][1].type!=="lineEnding"&&(u=r):(r===l||t[r][1].type==="lineEnding")&&(t[u][1].type="codeTextData",r!==u+2&&(t[u][1].end=t[r-1][1].end,t.splice(u+2,r-u-2),l-=r-u-2,r=u+2),u=void 0);return t}function GA(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function YA(t,l,a){let r=0,u,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?a(g):g===32?(t.enter("space"),t.consume(g),t.exit("space"),p):g===96?(s=t.enter("codeTextSequence"),u=0,y(g)):Me(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||Me(g)?(t.exit("codeTextData"),p(g)):(t.consume(g),m)}function y(g){return g===96?(t.consume(g),u++,y):u===r?(t.exit("codeTextSequence"),t.exit("codeText"),l(g)):(s.type="codeTextData",m(g))}}class PA{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,a){const r=a??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,a,r){const u=a||0;this.setCursor(Math.trunc(l));const s=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return r&&Qr(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),Qr(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),Qr(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 a=this.left.splice(l,Number.POSITIVE_INFINITY);Qr(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);Qr(this.left,a.reverse())}}}function Qr(t,l){let a=0;if(l.length<1e4)t.push(...l);else for(;a<l.length;)t.push(...l.slice(a,a+1e4)),a+=1e4}function R0(t){const l={};let a=-1,r,u,s,c,d,p,m;const y=new PA(t);for(;++a<y.length;){for(;a in l;)a=l[a];if(r=y.get(a),a&&r[1].type==="chunkFlow"&&y.get(a-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,VA(y,a)),a=l[a],m=!0);else if(r[1]._container){for(s=a,u=void 0;s--;)if(c=y.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(u&&(y.get(u)[1].type="lineEndingBlank"),c[1].type="lineEnding",u=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;u&&(r[1].end={...y.get(u)[1].start},d=y.slice(u,a),d.unshift(r),y.splice(u,a-u+1,d))}}return Fn(t,0,Number.POSITIVE_INFINITY,y.slice(0)),!m}function VA(t,l){const a=t.get(l)[1],r=t.get(l)[2];let u=l-1;const s=[];let c=a._tokenizer;c||(c=r.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,p=[],m={};let y,g,b=-1,S=a,E=0,_=0;const D=[_];for(;S;){for(;t.get(++u)[1]!==S;);s.push(u),S._tokenizer||(y=r.sliceStream(S),S.next||y.push(null),g&&c.defineSkip(S.start),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=S,S=S.next}for(S=a;++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&&(_=b+1,D.push(_),S._tokenizer=void 0,S.previous=void 0,S=S.next);for(c.events=[],S?(S._tokenizer=void 0,S.previous=void 0):D.pop(),b=D.length;b--;){const C=d.slice(D[b],D[b+1]),A=s.pop();p.push([A,A+C.length-1]),t.splice(A,2,C)}for(p.reverse(),b=-1;++b<p.length;)m[E+p[b][0]]=E+p[b][1],E+=p[b][1]-p[b][0]-1;return m}const XA={resolve:QA,tokenize:KA},$A={partial:!0,tokenize:ZA};function QA(t){return R0(t),t}function KA(t,l){let a;return r;function r(d){return t.enter("content"),a=t.enter("chunkContent",{contentType:"content"}),u(d)}function u(d){return d===null?s(d):Me(d)?t.check($A,c,s)(d):(t.consume(d),u)}function s(d){return t.exit("chunkContent"),t.exit("content"),l(d)}function c(d){return t.consume(d),t.exit("chunkContent"),a.next=t.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,u}}function ZA(t,l,a){const r=this;return u;function u(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),it(t,s,"linePrefix")}function s(c){if(c===null||Me(c))return a(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,a,l)(c)}}function D0(t,l,a,r,u,s,c,d,p){const m=p||Number.POSITIVE_INFINITY;let y=0;return g;function g(C){return C===60?(t.enter(r),t.enter(u),t.enter(s),t.consume(C),t.exit(s),b):C===null||C===32||C===41||Wu(C)?a(C):(t.enter(r),t.enter(c),t.enter(d),t.enter("chunkString",{contentType:"string"}),_(C))}function b(C){return C===62?(t.enter(s),t.consume(C),t.exit(s),t.exit(u),t.exit(r),l):(t.enter(d),t.enter("chunkString",{contentType:"string"}),S(C))}function S(C){return C===62?(t.exit("chunkString"),t.exit(d),b(C)):C===null||C===60||Me(C)?a(C):(t.consume(C),C===92?E:S)}function E(C){return C===60||C===62||C===92?(t.consume(C),S):S(C)}function _(C){return!y&&(C===null||C===41||bt(C))?(t.exit("chunkString"),t.exit(d),t.exit(c),t.exit(r),l(C)):y<m&&C===40?(t.consume(C),y++,_):C===41?(t.consume(C),y--,_):C===null||C===32||C===40||Wu(C)?a(C):(t.consume(C),C===92?D:_)}function D(C){return C===40||C===41||C===92?(t.consume(C),_):_(C)}}function N0(t,l,a,r,u,s){const c=this;let d=0,p;return m;function m(S){return t.enter(r),t.enter(u),t.consume(S),t.exit(u),t.enter(s),y}function y(S){return d>999||S===null||S===91||S===93&&!p||S===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?a(S):S===93?(t.exit(s),t.enter(u),t.consume(S),t.exit(u),t.exit(r),l):Me(S)?(t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),y):(t.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===null||S===91||S===93||Me(S)||d++>999?(t.exit("chunkString"),y(S)):(t.consume(S),p||(p=!Ze(S)),S===92?b:g)}function b(S){return S===91||S===92||S===93?(t.consume(S),d++,g):g(S)}}function j0(t,l,a,r,u,s){let c;return d;function d(b){return b===34||b===39||b===40?(t.enter(r),t.enter(u),t.consume(b),t.exit(u),c=b===40?41:b,p):a(b)}function p(b){return b===c?(t.enter(u),t.consume(b),t.exit(u),t.exit(r),l):(t.enter(s),m(b))}function m(b){return b===c?(t.exit(s),p(c)):b===null?a(b):Me(b)?(t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),it(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===c||b===null||Me(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 to(t,l){let a;return r;function r(u){return Me(u)?(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),a=!0,r):Ze(u)?it(t,r,a?"linePrefix":"lineSuffix")(u):l(u)}}const JA={name:"definition",tokenize:e_},WA={partial:!0,tokenize:t_};function e_(t,l,a){const r=this;let u;return s;function s(S){return t.enter("definition"),c(S)}function c(S){return N0.call(r,t,d,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(S)}function d(S){return u=cl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),S===58?(t.enter("definitionMarker"),t.consume(S),t.exit("definitionMarker"),p):a(S)}function p(S){return bt(S)?to(t,m)(S):m(S)}function m(S){return D0(t,y,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function y(S){return t.attempt(WA,g,g)(S)}function g(S){return Ze(S)?it(t,b,"whitespace")(S):b(S)}function b(S){return S===null||Me(S)?(t.exit("definition"),r.parser.defined.push(u),l(S)):a(S)}}function t_(t,l,a){return r;function r(d){return bt(d)?to(t,u)(d):a(d)}function u(d){return j0(t,s,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function s(d){return Ze(d)?it(t,c,"whitespace")(d):c(d)}function c(d){return d===null||Me(d)?l(d):a(d)}}const n_={name:"hardBreakEscape",tokenize:l_};function l_(t,l,a){return r;function r(s){return t.enter("hardBreakEscape"),t.consume(s),u}function u(s){return Me(s)?(t.exit("hardBreakEscape"),l(s)):a(s)}}const a_={name:"headingAtx",resolve:i_,tokenize:r_};function i_(t,l){let a=t.length-2,r=3,u,s;return t[r][1].type==="whitespace"&&(r+=2),a-2>r&&t[a][1].type==="whitespace"&&(a-=2),t[a][1].type==="atxHeadingSequence"&&(r===a-1||a-4>r&&t[a-2][1].type==="whitespace")&&(a-=r+1===a?2:4),a>r&&(u={type:"atxHeadingText",start:t[r][1].start,end:t[a][1].end},s={type:"chunkText",start:t[r][1].start,end:t[a][1].end,contentType:"text"},Fn(t,r,a-r+1,[["enter",u,l],["enter",s,l],["exit",s,l],["exit",u,l]])),t}function r_(t,l,a){let r=0;return u;function u(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||bt(y)?(t.exit("atxHeadingSequence"),d(y)):a(y)}function d(y){return y===35?(t.enter("atxHeadingSequence"),p(y)):y===null||Me(y)?(t.exit("atxHeading"),l(y)):Ze(y)?it(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||bt(y)?(t.exit("atxHeadingText"),d(y)):(t.consume(y),m)}}const o_=["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"],Dv=["pre","script","style","textarea"],u_={concrete:!0,name:"htmlFlow",resolveTo:f_,tokenize:d_},s_={partial:!0,tokenize:m_},c_={partial:!0,tokenize:h_};function f_(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 d_(t,l,a){const r=this;let u,s,c,d,p;return m;function m(k){return y(k)}function y(k){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(k),g}function g(k){return k===33?(t.consume(k),b):k===47?(t.consume(k),s=!0,_):k===63?(t.consume(k),u=3,r.interrupt?l:R):pn(k)?(t.consume(k),c=String.fromCharCode(k),D):a(k)}function b(k){return k===45?(t.consume(k),u=2,S):k===91?(t.consume(k),u=5,d=0,E):pn(k)?(t.consume(k),u=4,r.interrupt?l:R):a(k)}function S(k){return k===45?(t.consume(k),r.interrupt?l:R):a(k)}function E(k){const de="CDATA[";return k===de.charCodeAt(d++)?(t.consume(k),d===de.length?r.interrupt?l:F:E):a(k)}function _(k){return pn(k)?(t.consume(k),c=String.fromCharCode(k),D):a(k)}function D(k){if(k===null||k===47||k===62||bt(k)){const de=k===47,ye=c.toLowerCase();return!de&&!s&&Dv.includes(ye)?(u=1,r.interrupt?l(k):F(k)):o_.includes(c.toLowerCase())?(u=6,de?(t.consume(k),C):r.interrupt?l(k):F(k)):(u=7,r.interrupt&&!r.parser.lazy[r.now().line]?a(k):s?A(k):j(k))}return k===45||un(k)?(t.consume(k),c+=String.fromCharCode(k),D):a(k)}function C(k){return k===62?(t.consume(k),r.interrupt?l:F):a(k)}function A(k){return Ze(k)?(t.consume(k),A):L(k)}function j(k){return k===47?(t.consume(k),L):k===58||k===95||pn(k)?(t.consume(k),ee):Ze(k)?(t.consume(k),j):L(k)}function ee(k){return k===45||k===46||k===58||k===95||un(k)?(t.consume(k),ee):V(k)}function V(k){return k===61?(t.consume(k),q):Ze(k)?(t.consume(k),V):j(k)}function q(k){return k===null||k===60||k===61||k===62||k===96?a(k):k===34||k===39?(t.consume(k),p=k,N):Ze(k)?(t.consume(k),q):le(k)}function N(k){return k===p?(t.consume(k),p=null,X):k===null||Me(k)?a(k):(t.consume(k),N)}function le(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||bt(k)?V(k):(t.consume(k),le)}function X(k){return k===47||k===62||Ze(k)?j(k):a(k)}function L(k){return k===62?(t.consume(k),G):a(k)}function G(k){return k===null||Me(k)?F(k):Ze(k)?(t.consume(k),G):a(k)}function F(k){return k===45&&u===2?(t.consume(k),B):k===60&&u===1?(t.consume(k),te):k===62&&u===4?(t.consume(k),O):k===63&&u===3?(t.consume(k),R):k===93&&u===5?(t.consume(k),pe):Me(k)&&(u===6||u===7)?(t.exit("htmlFlowData"),t.check(s_,W,H)(k)):k===null||Me(k)?(t.exit("htmlFlowData"),H(k)):(t.consume(k),F)}function H(k){return t.check(c_,ie,W)(k)}function ie(k){return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),J}function J(k){return k===null||Me(k)?H(k):(t.enter("htmlFlowData"),F(k))}function B(k){return k===45?(t.consume(k),R):F(k)}function te(k){return k===47?(t.consume(k),c="",ce):F(k)}function ce(k){if(k===62){const de=c.toLowerCase();return Dv.includes(de)?(t.consume(k),O):F(k)}return pn(k)&&c.length<8?(t.consume(k),c+=String.fromCharCode(k),ce):F(k)}function pe(k){return k===93?(t.consume(k),R):F(k)}function R(k){return k===62?(t.consume(k),O):k===45&&u===2?(t.consume(k),R):F(k)}function O(k){return k===null||Me(k)?(t.exit("htmlFlowData"),W(k)):(t.consume(k),O)}function W(k){return t.exit("htmlFlow"),l(k)}}function h_(t,l,a){const r=this;return u;function u(c){return Me(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):a(c)}function s(c){return r.parser.lazy[r.now().line]?a(c):l(c)}}function m_(t,l,a){return r;function r(u){return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),t.attempt(vo,l,a)}}const p_={name:"htmlText",tokenize:g_};function g_(t,l,a){const r=this;let u,s,c;return d;function d(R){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(R),p}function p(R){return R===33?(t.consume(R),m):R===47?(t.consume(R),V):R===63?(t.consume(R),j):pn(R)?(t.consume(R),le):a(R)}function m(R){return R===45?(t.consume(R),y):R===91?(t.consume(R),s=0,E):pn(R)?(t.consume(R),A):a(R)}function y(R){return R===45?(t.consume(R),S):a(R)}function g(R){return R===null?a(R):R===45?(t.consume(R),b):Me(R)?(c=g,te(R)):(t.consume(R),g)}function b(R){return R===45?(t.consume(R),S):g(R)}function S(R){return R===62?B(R):R===45?b(R):g(R)}function E(R){const O="CDATA[";return R===O.charCodeAt(s++)?(t.consume(R),s===O.length?_:E):a(R)}function _(R){return R===null?a(R):R===93?(t.consume(R),D):Me(R)?(c=_,te(R)):(t.consume(R),_)}function D(R){return R===93?(t.consume(R),C):_(R)}function C(R){return R===62?B(R):R===93?(t.consume(R),C):_(R)}function A(R){return R===null||R===62?B(R):Me(R)?(c=A,te(R)):(t.consume(R),A)}function j(R){return R===null?a(R):R===63?(t.consume(R),ee):Me(R)?(c=j,te(R)):(t.consume(R),j)}function ee(R){return R===62?B(R):j(R)}function V(R){return pn(R)?(t.consume(R),q):a(R)}function q(R){return R===45||un(R)?(t.consume(R),q):N(R)}function N(R){return Me(R)?(c=N,te(R)):Ze(R)?(t.consume(R),N):B(R)}function le(R){return R===45||un(R)?(t.consume(R),le):R===47||R===62||bt(R)?X(R):a(R)}function X(R){return R===47?(t.consume(R),B):R===58||R===95||pn(R)?(t.consume(R),L):Me(R)?(c=X,te(R)):Ze(R)?(t.consume(R),X):B(R)}function L(R){return R===45||R===46||R===58||R===95||un(R)?(t.consume(R),L):G(R)}function G(R){return R===61?(t.consume(R),F):Me(R)?(c=G,te(R)):Ze(R)?(t.consume(R),G):X(R)}function F(R){return R===null||R===60||R===61||R===62||R===96?a(R):R===34||R===39?(t.consume(R),u=R,H):Me(R)?(c=F,te(R)):Ze(R)?(t.consume(R),F):(t.consume(R),ie)}function H(R){return R===u?(t.consume(R),u=void 0,J):R===null?a(R):Me(R)?(c=H,te(R)):(t.consume(R),H)}function ie(R){return R===null||R===34||R===39||R===60||R===61||R===96?a(R):R===47||R===62||bt(R)?X(R):(t.consume(R),ie)}function J(R){return R===47||R===62||bt(R)?X(R):a(R)}function B(R){return R===62?(t.consume(R),t.exit("htmlTextData"),t.exit("htmlText"),l):a(R)}function te(R){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(R),t.exit("lineEnding"),ce}function ce(R){return Ze(R)?it(t,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):pe(R)}function pe(R){return t.enter("htmlTextData"),c(R)}}const Eh={name:"labelEnd",resolveAll:x_,resolveTo:S_,tokenize:E_},y_={tokenize:w_},v_={tokenize:T_},b_={tokenize:k_};function x_(t){let l=-1;const a=[];for(;++l<t.length;){const r=t[l][1];if(a.push(t[l]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const u=r.type==="labelImage"?4:2;r.type="data",l+=u}}return t.length!==a.length&&Fn(t,0,t.length,a),t}function S_(t,l){let a=t.length,r=0,u,s,c,d;for(;a--;)if(u=t[a][1],s){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;t[a][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(c){if(t[a][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(s=a,u.type!=="labelLink")){r=2;break}}else u.type==="labelEnd"&&(c=a);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=el(d,t.slice(s+1,s+r+3)),d=el(d,[["enter",y,l]]),d=el(d,gs(l.parser.constructs.insideSpan.null,t.slice(s+r+4,c-3),l)),d=el(d,[["exit",y,l],t[c-2],t[c-1],["exit",m,l]]),d=el(d,t.slice(c+1)),d=el(d,[["exit",p,l]]),Fn(t,s,t.length,d),t}function E_(t,l,a){const r=this;let u=r.events.length,s,c;for(;u--;)if((r.events[u][1].type==="labelImage"||r.events[u][1].type==="labelLink")&&!r.events[u][1]._balanced){s=r.events[u][1];break}return d;function d(b){return s?s._inactive?g(b):(c=r.parser.defined.includes(cl(r.sliceSerialize({start:s.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(b),t.exit("labelMarker"),t.exit("labelEnd"),p):a(b)}function p(b){return b===40?t.attempt(y_,y,c?y:g)(b):b===91?t.attempt(v_,y,c?m:g)(b):c?y(b):g(b)}function m(b){return t.attempt(b_,y,g)(b)}function y(b){return l(b)}function g(b){return s._balanced=!0,a(b)}}function w_(t,l,a){return r;function r(g){return t.enter("resource"),t.enter("resourceMarker"),t.consume(g),t.exit("resourceMarker"),u}function u(g){return bt(g)?to(t,s)(g):s(g)}function s(g){return g===41?y(g):D0(t,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return bt(g)?to(t,p)(g):y(g)}function d(g){return a(g)}function p(g){return g===34||g===39||g===40?j0(t,m,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function m(g){return bt(g)?to(t,y)(g):y(g)}function y(g){return g===41?(t.enter("resourceMarker"),t.consume(g),t.exit("resourceMarker"),t.exit("resource"),l):a(g)}}function T_(t,l,a){const r=this;return u;function u(d){return N0.call(r,t,s,c,"reference","referenceMarker","referenceString")(d)}function s(d){return r.parser.defined.includes(cl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?l(d):a(d)}function c(d){return a(d)}}function k_(t,l,a){return r;function r(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),u}function u(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),l):a(s)}}const C_={name:"labelStartImage",resolveAll:Eh.resolveAll,tokenize:A_};function A_(t,l,a){const r=this;return u;function u(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):a(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(d):l(d)}}const __={name:"labelStartLink",resolveAll:Eh.resolveAll,tokenize:R_};function R_(t,l,a){const r=this;return u;function u(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?a(c):l(c)}}const Qf={name:"lineEnding",tokenize:D_};function D_(t,l){return a;function a(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),it(t,l,"linePrefix")}}const Ku={name:"thematicBreak",tokenize:N_};function N_(t,l,a){let r=0,u;return s;function s(m){return t.enter("thematicBreak"),c(m)}function c(m){return u=m,d(m)}function d(m){return m===u?(t.enter("thematicBreakSequence"),p(m)):r>=3&&(m===null||Me(m))?(t.exit("thematicBreak"),l(m)):a(m)}function p(m){return m===u?(t.consume(m),r++,p):(t.exit("thematicBreakSequence"),Ze(m)?it(t,d,"whitespace")(m):d(m))}}const _n={continuation:{tokenize:z_},exit:U_,name:"list",tokenize:M_},j_={partial:!0,tokenize:B_},O_={partial:!0,tokenize:L_};function M_(t,l,a){const r=this,u=r.events[r.events.length-1];let s=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,c=0;return d;function d(S){const E=r.containerState.type||(S===42||S===43||S===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||S===r.containerState.marker:Rd(S)){if(r.containerState.type||(r.containerState.type=E,t.enter(E,{_container:!0})),E==="listUnordered")return t.enter("listItemPrefix"),S===42||S===45?t.check(Ku,a,m)(S):m(S);if(!r.interrupt||S===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),p(S)}return a(S)}function p(S){return Rd(S)&&++c<10?(t.consume(S),p):(!r.interrupt||c<2)&&(r.containerState.marker?S===r.containerState.marker:S===41||S===46)?(t.exit("listItemValue"),m(S)):a(S)}function m(S){return t.enter("listItemMarker"),t.consume(S),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||S,t.check(vo,r.interrupt?a:y,t.attempt(j_,b,g))}function y(S){return r.containerState.initialBlankLine=!0,s++,b(S)}function g(S){return Ze(S)?(t.enter("listItemPrefixWhitespace"),t.consume(S),t.exit("listItemPrefixWhitespace"),b):a(S)}function b(S){return r.containerState.size=s+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,l(S)}}function z_(t,l,a){const r=this;return r.containerState._closeFlow=void 0,t.check(vo,u,s);function u(d){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,it(t,l,"listItemIndent",r.containerState.size+1)(d)}function s(d){return r.containerState.furtherBlankLines||!Ze(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(O_,l,c)(d))}function c(d){return r.containerState._closeFlow=!0,r.interrupt=void 0,it(t,t.attempt(_n,l,a),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function L_(t,l,a){const r=this;return it(t,u,"listItemIndent",r.containerState.size+1);function u(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):a(s)}}function U_(t){t.exit(this.containerState.type)}function B_(t,l,a){const r=this;return it(t,u,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(s){const c=r.events[r.events.length-1];return!Ze(s)&&c&&c[1].type==="listItemPrefixWhitespace"?l(s):a(s)}}const Nv={name:"setextUnderline",resolveTo:H_,tokenize:I_};function H_(t,l){let a=t.length,r,u,s;for(;a--;)if(t[a][0]==="enter"){if(t[a][1].type==="content"){r=a;break}t[a][1].type==="paragraph"&&(u=a)}else t[a][1].type==="content"&&t.splice(a,1),!s&&t[a][1].type==="definition"&&(s=a);const c={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[u][1].type="setextHeadingText",s?(t.splice(u,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 I_(t,l,a){const r=this;let u;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"),u=m,c(m)):a(m)}function c(m){return t.enter("setextHeadingLineSequence"),d(m)}function d(m){return m===u?(t.consume(m),d):(t.exit("setextHeadingLineSequence"),Ze(m)?it(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||Me(m)?(t.exit("setextHeadingLine"),l(m)):a(m)}}const q_={tokenize:F_};function F_(t){const l=this,a=t.attempt(vo,r,t.attempt(this.parser.constructs.flowInitial,u,it(t,t.attempt(this.parser.constructs.flow,u,t.attempt(XA,u)),"linePrefix")));return a;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),l.currentConstruct=void 0,a}function u(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),l.currentConstruct=void 0,a}}const G_={resolveAll:M0()},Y_=O0("string"),P_=O0("text");function O0(t){return{resolveAll:M0(t==="text"?V_:void 0),tokenize:l};function l(a){const r=this,u=this.parser.constructs[t],s=a.attempt(u,c,d);return c;function c(y){return m(y)?s(y):d(y)}function d(y){if(y===null){a.consume(y);return}return a.enter("data"),a.consume(y),p}function p(y){return m(y)?(a.exit("data"),s(y)):(a.consume(y),p)}function m(y){if(y===null)return!0;const g=u[y];let b=-1;if(g)for(;++b<g.length;){const S=g[b];if(!S.previous||S.previous.call(r,r.previous))return!0}return!1}}}function M0(t){return l;function l(a,r){let u=-1,s;for(;++u<=a.length;)s===void 0?a[u]&&a[u][1].type==="data"&&(s=u,u++):(!a[u]||a[u][1].type!=="data")&&(u!==s+2&&(a[s][1].end=a[u-1][1].end,a.splice(s+2,u-s-2),u=s+2),s=void 0);return t?t(a,r):a}}function V_(t,l){let a=0;for(;++a<=t.length;)if((a===t.length||t[a][1].type==="lineEnding")&&t[a-1][1].type==="data"){const r=t[a-1][1],u=l.sliceStream(r);let s=u.length,c=-1,d=0,p;for(;s--;){const m=u[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&&a===t.length&&(d=0),d){const m={type:a===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(a,0,["enter",m,l],["exit",m,l]),a+=2)}a++}return t}const X_={42:_n,43:_n,45:_n,48:_n,49:_n,50:_n,51:_n,52:_n,53:_n,54:_n,55:_n,56:_n,57:_n,62:C0},$_={91:JA},Q_={[-2]:$f,[-1]:$f,32:$f},K_={35:a_,42:Ku,45:[Nv,Ku],60:u_,61:Nv,95:Ku,96:Rv,126:Rv},Z_={38:_0,92:A0},J_={[-5]:Qf,[-4]:Qf,[-3]:Qf,33:C_,38:_0,42:Dd,60:[_A,p_],91:__,92:[n_,A0],93:Eh,95:Dd,96:qA},W_={null:[Dd,G_]},eR={null:[42,95]},tR={null:[]},nR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:eR,contentInitial:$_,disable:tR,document:X_,flow:K_,flowInitial:Q_,insideSpan:W_,string:Z_,text:J_},Symbol.toStringTag,{value:"Module"}));function lR(t,l,a){let r={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const u={},s=[];let c=[],d=[];const p={attempt:N(V),check:N(q),consume:A,enter:j,exit:ee,interrupt:N(q,{interrupt:!0})},m={code:null,containerState:{},defineSkip:_,events:[],now:E,parser:t,previous:null,sliceSerialize:b,sliceStream:S,write:g};let y=l.tokenize.call(m,p);return l.resolveAll&&s.push(l),m;function g(G){return c=el(c,G),D(),c[c.length-1]!==null?[]:(le(l,0),m.events=gs(s,m.events,m),m.events)}function b(G,F){return iR(S(G),F)}function S(G){return aR(c,G)}function E(){const{_bufferIndex:G,_index:F,line:H,column:ie,offset:J}=r;return{_bufferIndex:G,_index:F,line:H,column:ie,offset:J}}function _(G){u[G.line]=G.column,L()}function D(){let G;for(;r._index<c.length;){const F=c[r._index];if(typeof F=="string")for(G=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===G&&r._bufferIndex<F.length;)C(F.charCodeAt(r._bufferIndex));else C(F)}}function C(G){y=y(G)}function A(G){Me(G)?(r.line++,r.column=1,r.offset+=G===-3?2:1,L()):G!==-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=G}function j(G,F){const H=F||{};return H.type=G,H.start=E(),m.events.push(["enter",H,m]),d.push(H),H}function ee(G){const F=d.pop();return F.end=E(),m.events.push(["exit",F,m]),F}function V(G,F){le(G,F.from)}function q(G,F){F.restore()}function N(G,F){return H;function H(ie,J,B){let te,ce,pe,R;return Array.isArray(ie)?W(ie):"tokenize"in ie?W([ie]):O(ie);function O(Te){return ze;function ze(be){const Oe=be!==null&&Te[be],At=be!==null&&Te.null,vn=[...Array.isArray(Oe)?Oe:Oe?[Oe]:[],...Array.isArray(At)?At:At?[At]:[]];return W(vn)(be)}}function W(Te){return te=Te,ce=0,Te.length===0?B:k(Te[ce])}function k(Te){return ze;function ze(be){return R=X(),pe=Te,Te.partial||(m.currentConstruct=Te),Te.name&&m.parser.constructs.disable.null.includes(Te.name)?ye():Te.tokenize.call(F?Object.assign(Object.create(m),F):m,p,de,ye)(be)}}function de(Te){return G(pe,R),J}function ye(Te){return R.restore(),++ce<te.length?k(te[ce]):B}}}function le(G,F){G.resolveAll&&!s.includes(G)&&s.push(G),G.resolve&&Fn(m.events,F,m.events.length-F,G.resolve(m.events.slice(F),m)),G.resolveTo&&(m.events=G.resolveTo(m.events,m))}function X(){const G=E(),F=m.previous,H=m.currentConstruct,ie=m.events.length,J=Array.from(d);return{from:ie,restore:B};function B(){r=G,m.previous=F,m.currentConstruct=H,m.events.length=ie,d=J,L()}}function L(){r.line in u&&r.column<2&&(r.column=u[r.line],r.offset+=u[r.line]-1)}}function aR(t,l){const a=l.start._index,r=l.start._bufferIndex,u=l.end._index,s=l.end._bufferIndex;let c;if(a===u)c=[t[a].slice(r,s)];else{if(c=t.slice(a,u),r>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(r):c.shift()}s>0&&c.push(t[u].slice(0,s))}return c}function iR(t,l){let a=-1;const r=[];let u;for(;++a<t.length;){const s=t[a];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
191
- `;break}case-3:{c=`\r
192
- `;break}case-2:{c=l?" ":" ";break}case-1:{if(!l&&u)continue;c=" ";break}default:c=String.fromCharCode(s)}u=s===-2,r.push(c)}return r.join("")}function rR(t){const r={constructs:T0([nR,...(t||{}).extensions||[]]),content:u(SA),defined:[],document:u(wA),flow:u(q_),lazy:{},string:u(Y_),text:u(P_)};return r;function u(s){return c;function c(d){return lR(r,s,d)}}}function oR(t){for(;!R0(t););return t}const jv=/[\0\t\n\r]/g;function uR(){let t=1,l="",a=!0,r;return u;function u(s,c,d){const p=[];let m,y,g,b,S;for(s=l+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),g=0,l="",a&&(s.charCodeAt(0)===65279&&g++,a=void 0);g<s.length;){if(jv.lastIndex=g,m=jv.exec(s),b=m&&m.index!==void 0?m.index:s.length,S=s.charCodeAt(b),!m){l=s.slice(g);break}if(S===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),S){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 sR=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function cR(t){return t.replace(sR,fR)}function fR(t,l,a){if(l)return l;if(a.charCodeAt(0)===35){const u=a.charCodeAt(1),s=u===120||u===88;return k0(a.slice(s?2:1),s?16:10)}return Sh(a)||t}const z0={}.hasOwnProperty;function dR(t,l,a){return typeof l!="string"&&(a=l,l=void 0),hR(a)(oR(rR(a).document().write(uR()(t,l,!0))))}function hR(t){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(bn),autolinkProtocol:X,autolinkEmail:X,atxHeading:s(nn),blockQuote:s(At),characterEscape:X,characterReference:X,codeFenced:s(vn),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(vn,c),codeText:s(Et,c),codeTextData:X,data:X,codeFlowValue:X,definition:s(Yt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(Qt),hardBreakEscape:s(Pt),hardBreakTrailing:s(Pt),htmlFlow:s(dl,c),htmlFlowData:X,htmlText:s(dl,c),htmlTextData:X,image:s(Dn),label:c,link:s(bn),listItem:s(hl),listItemValue:b,listOrdered:s(Nn,g),listUnordered:s(Nn),paragraph:s(Wl),reference:k,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(nn),strong:s(Oa),thematicBreak:s(cn)},exit:{atxHeading:p(),atxHeadingSequence:V,autolink:p(),autolinkEmail:Oe,autolinkProtocol:be,blockQuote:p(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:ye,characterReferenceMarkerNumeric:ye,characterReferenceValue:Te,characterReference:ze,codeFenced:p(D),codeFencedFence:_,codeFencedFenceInfo:S,codeFencedFenceMeta:E,codeFlowValue:L,codeIndented:p(C),codeText:p(J),codeTextData:L,data:L,definition:p(),definitionDestinationString:ee,definitionLabelString:A,definitionTitleString:j,emphasis:p(),hardBreakEscape:p(F),hardBreakTrailing:p(F),htmlFlow:p(H),htmlFlowData:L,htmlText:p(ie),htmlTextData:L,image:p(te),label:pe,labelText:ce,lineEnding:G,link:p(B),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:de,resourceDestinationString:R,resourceTitleString:O,resource:W,setextHeading:p(le),setextHeadingLineSequence:N,setextHeadingText:q,strong:p(),thematicBreak:p()}};L0(l,(t||{}).mdastExtensions||[]);const a={};return r;function r(ae){let he={type:"root",children:[]};const Ae={stack:[he],tokenStack:[],config:l,enter:d,exit:m,buffer:c,resume:y,data:a},Ue=[];let Je=-1;for(;++Je<ae.length;)if(ae[Je][1].type==="listOrdered"||ae[Je][1].type==="listUnordered")if(ae[Je][0]==="enter")Ue.push(Je);else{const qt=Ue.pop();Je=u(ae,qt,Je)}for(Je=-1;++Je<ae.length;){const qt=l[ae[Je][0]];z0.call(qt,ae[Je][1].type)&&qt[ae[Je][1].type].call(Object.assign({sliceSerialize:ae[Je][2].sliceSerialize},Ae),ae[Je][1])}if(Ae.tokenStack.length>0){const qt=Ae.tokenStack[Ae.tokenStack.length-1];(qt[1]||Ov).call(Ae,void 0,qt[0])}for(he.position={start:wa(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:wa(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<l.transforms.length;)he=l.transforms[Je](he)||he;return he}function u(ae,he,Ae){let Ue=he-1,Je=-1,qt=!1,ln,Rt,at,gt;for(;++Ue<=Ae;){const Ve=ae[Ue];switch(Ve[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ve[0]==="enter"?Je++:Je--,gt=void 0;break}case"lineEndingBlank":{Ve[0]==="enter"&&(ln&&!gt&&!Je&&!at&&(at=Ue),gt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:gt=void 0}if(!Je&&Ve[0]==="enter"&&Ve[1].type==="listItemPrefix"||Je===-1&&Ve[0]==="exit"&&(Ve[1].type==="listUnordered"||Ve[1].type==="listOrdered")){if(ln){let fn=Ue;for(Rt=void 0;fn--;){const Kt=ae[fn];if(Kt[1].type==="lineEnding"||Kt[1].type==="lineEndingBlank"){if(Kt[0]==="exit")continue;Rt&&(ae[Rt][1].type="lineEndingBlank",qt=!0),Kt[1].type="lineEnding",Rt=fn}else if(!(Kt[1].type==="linePrefix"||Kt[1].type==="blockQuotePrefix"||Kt[1].type==="blockQuotePrefixWhitespace"||Kt[1].type==="blockQuoteMarker"||Kt[1].type==="listItemIndent"))break}at&&(!Rt||at<Rt)&&(ln._spread=!0),ln.end=Object.assign({},Rt?ae[Rt][1].start:Ve[1].end),ae.splice(Rt||Ue,0,["exit",ln,Ve[2]]),Ue++,Ae++}if(Ve[1].type==="listItemPrefix"){const fn={type:"listItem",_spread:!1,start:Object.assign({},Ve[1].start),end:void 0};ln=fn,ae.splice(Ue,0,["enter",fn,Ve[2]]),Ue++,Ae++,at=void 0,gt=!0}}}return ae[he][1]._spread=qt,Ae}function s(ae,he){return Ae;function Ae(Ue){d.call(this,ae(Ue),Ue),he&&he.call(this,Ue)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(ae,he,Ae){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([he,Ae||void 0]),ae.position={start:wa(he.start),end:void 0}}function p(ae){return he;function he(Ae){ae&&ae.call(this,Ae),m.call(this,Ae)}}function m(ae,he){const Ae=this.stack.pop(),Ue=this.tokenStack.pop();if(Ue)Ue[0].type!==ae.type&&(he?he.call(this,ae,Ue[0]):(Ue[1]||Ov).call(this,ae,Ue[0]));else throw new Error("Cannot close `"+ae.type+"` ("+eo({start:ae.start,end:ae.end})+"): it’s not open");Ae.position.end=wa(ae.end)}function y(){return xh(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(ae){if(this.data.expectingFirstListItemValue){const he=this.stack[this.stack.length-2];he.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function S(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.lang=ae}function E(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.meta=ae}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function D(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.value=ae.replace(/(\r?\n|\r)$/g,"")}function A(ae){const he=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=he,Ae.identifier=cl(this.sliceSerialize(ae)).toLowerCase()}function j(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.title=ae}function ee(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.url=ae}function V(ae){const he=this.stack[this.stack.length-1];if(!he.depth){const Ae=this.sliceSerialize(ae).length;he.depth=Ae}}function q(){this.data.setextHeadingSlurpLineEnding=!0}function N(ae){const he=this.stack[this.stack.length-1];he.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function le(){this.data.setextHeadingSlurpLineEnding=void 0}function X(ae){const Ae=this.stack[this.stack.length-1].children;let Ue=Ae[Ae.length-1];(!Ue||Ue.type!=="text")&&(Ue=pt(),Ue.position={start:wa(ae.start),end:void 0},Ae.push(Ue)),this.stack.push(Ue)}function L(ae){const he=this.stack.pop();he.value+=this.sliceSerialize(ae),he.position.end=wa(ae.end)}function G(ae){const he=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ae=he.children[he.children.length-1];Ae.position.end=wa(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(he.type)&&(X.call(this,ae),L.call(this,ae))}function F(){this.data.atHardBreak=!0}function H(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.value=ae}function ie(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.value=ae}function J(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.value=ae}function B(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=he,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function te(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=he,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function ce(ae){const he=this.sliceSerialize(ae),Ae=this.stack[this.stack.length-2];Ae.label=cR(he),Ae.identifier=cl(he).toLowerCase()}function pe(){const ae=this.stack[this.stack.length-1],he=this.resume(),Ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ae.type==="link"){const Ue=ae.children;Ae.children=Ue}else Ae.alt=he}function R(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.url=ae}function O(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.title=ae}function W(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function de(ae){const he=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=he,Ae.identifier=cl(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function ye(ae){this.data.characterReferenceType=ae.type}function Te(ae){const he=this.sliceSerialize(ae),Ae=this.data.characterReferenceType;let Ue;Ae?(Ue=k0(he,Ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ue=Sh(he);const Je=this.stack[this.stack.length-1];Je.value+=Ue}function ze(ae){const he=this.stack.pop();he.position.end=wa(ae.end)}function be(ae){L.call(this,ae);const he=this.stack[this.stack.length-1];he.url=this.sliceSerialize(ae)}function Oe(ae){L.call(this,ae);const he=this.stack[this.stack.length-1];he.url="mailto:"+this.sliceSerialize(ae)}function At(){return{type:"blockquote",children:[]}}function vn(){return{type:"code",lang:null,meta:null,value:""}}function Et(){return{type:"inlineCode",value:""}}function Yt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Qt(){return{type:"emphasis",children:[]}}function nn(){return{type:"heading",depth:0,children:[]}}function Pt(){return{type:"break"}}function dl(){return{type:"html",value:""}}function Dn(){return{type:"image",title:null,url:"",alt:null}}function bn(){return{type:"link",title:null,url:"",children:[]}}function Nn(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function hl(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function Wl(){return{type:"paragraph",children:[]}}function Oa(){return{type:"strong",children:[]}}function pt(){return{type:"text",value:""}}function cn(){return{type:"thematicBreak"}}}function wa(t){return{line:t.line,column:t.column,offset:t.offset}}function L0(t,l){let a=-1;for(;++a<l.length;){const r=l[a];Array.isArray(r)?L0(t,r):mR(t,r)}}function mR(t,l){let a;for(a in l)if(z0.call(l,a))switch(a){case"canContainEols":{const r=l[a];r&&t[a].push(...r);break}case"transforms":{const r=l[a];r&&t[a].push(...r);break}case"enter":case"exit":{const r=l[a];r&&Object.assign(t[a],r);break}}}function Ov(t,l){throw t?new Error("Cannot close `"+t.type+"` ("+eo({start:t.start,end:t.end})+"): a different token (`"+l.type+"`, "+eo({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+eo({start:l.start,end:l.end})+") is still open")}function pR(t){const l=this;l.parser=a;function a(r){return dR(r,{...l.data("settings"),...t,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function gR(t,l){const a={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(l),!0)};return t.patch(l,a),t.applyData(l,a)}function yR(t,l){const a={type:"element",tagName:"br",properties:{},children:[]};return t.patch(l,a),[t.applyData(l,a),{type:"text",value:`
193
- `}]}function vR(t,l){const a=l.value?l.value+`
194
- `:"",r={},u=l.lang?l.lang.split(/\s+/):[];u.length>0&&(r.className=["language-"+u[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:a}]};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 bR(t,l){const a={type:"element",tagName:"del",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function xR(t,l){const a={type:"element",tagName:"em",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function SR(t,l){const a=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(l.identifier).toUpperCase(),u=$i(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:"#"+a+"fn-"+u,id:a+"fnref-"+u+(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 ER(t,l){const a={type:"element",tagName:"h"+l.depth,properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function wR(t,l){if(t.options.allowDangerousHtml){const a={type:"raw",value:l.value};return t.patch(l,a),t.applyData(l,a)}}function U0(t,l){const a=l.referenceType;let r="]";if(a==="collapsed"?r+="[]":a==="full"&&(r+="["+(l.label||l.identifier)+"]"),l.type==="imageReference")return[{type:"text",value:"!["+l.alt+r}];const u=t.all(l),s=u[0];s&&s.type==="text"?s.value="["+s.value:u.unshift({type:"text",value:"["});const c=u[u.length-1];return c&&c.type==="text"?c.value+=r:u.push({type:"text",value:r}),u}function TR(t,l){const a=String(l.identifier).toUpperCase(),r=t.definitionById.get(a);if(!r)return U0(t,l);const u={src:$i(r.url||""),alt:l.alt};r.title!==null&&r.title!==void 0&&(u.title=r.title);const s={type:"element",tagName:"img",properties:u,children:[]};return t.patch(l,s),t.applyData(l,s)}function kR(t,l){const a={src:$i(l.url)};l.alt!==null&&l.alt!==void 0&&(a.alt=l.alt),l.title!==null&&l.title!==void 0&&(a.title=l.title);const r={type:"element",tagName:"img",properties:a,children:[]};return t.patch(l,r),t.applyData(l,r)}function CR(t,l){const a={type:"text",value:l.value.replace(/\r?\n|\r/g," ")};t.patch(l,a);const r={type:"element",tagName:"code",properties:{},children:[a]};return t.patch(l,r),t.applyData(l,r)}function AR(t,l){const a=String(l.identifier).toUpperCase(),r=t.definitionById.get(a);if(!r)return U0(t,l);const u={href:$i(r.url||"")};r.title!==null&&r.title!==void 0&&(u.title=r.title);const s={type:"element",tagName:"a",properties:u,children:t.all(l)};return t.patch(l,s),t.applyData(l,s)}function _R(t,l){const a={href:$i(l.url)};l.title!==null&&l.title!==void 0&&(a.title=l.title);const r={type:"element",tagName:"a",properties:a,children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function RR(t,l,a){const r=t.all(l),u=a?DR(a):B0(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];(u||d!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
195
- `}),y.type==="element"&&y.tagName==="p"&&!u?c.push(...y.children):c.push(y)}const p=r[r.length-1];p&&(u||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
196
- `});const m={type:"element",tagName:"li",properties:s,children:c};return t.patch(l,m),t.applyData(l,m)}function DR(t){let l=!1;if(t.type==="list"){l=t.spread||!1;const a=t.children;let r=-1;for(;!l&&++r<a.length;)l=B0(a[r])}return l}function B0(t){const l=t.spread;return l??t.children.length>1}function NR(t,l){const a={},r=t.all(l);let u=-1;for(typeof l.start=="number"&&l.start!==1&&(a.start=l.start);++u<r.length;){const c=r[u];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}const s={type:"element",tagName:l.ordered?"ol":"ul",properties:a,children:t.wrap(r,!0)};return t.patch(l,s),t.applyData(l,s)}function jR(t,l){const a={type:"element",tagName:"p",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function OR(t,l){const a={type:"root",children:t.wrap(t.all(l))};return t.patch(l,a),t.applyData(l,a)}function MR(t,l){const a={type:"element",tagName:"strong",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function zR(t,l){const a=t.all(l),r=a.shift(),u=[];if(r){const c={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(l.children[0],c),u.push(c)}if(a.length>0){const c={type:"element",tagName:"tbody",properties:{},children:t.wrap(a,!0)},d=gh(l.children[1]),p=y0(l.children[l.children.length-1]);d&&p&&(c.position={start:d,end:p}),u.push(c)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(u,!0)};return t.patch(l,s),t.applyData(l,s)}function LR(t,l,a){const r=a?a.children:void 0,s=(r?r.indexOf(l):1)===0?"th":"td",c=a&&a.type==="table"?a.align:void 0,d=c?c.length:l.children.length;let p=-1;const m=[];for(;++p<d;){const g=l.children[p],b={},S=c?c[p]:void 0;S&&(b.align=S);let E={type:"element",tagName:s,properties:b,children:[]};g&&(E.children=t.all(g),t.patch(g,E),E=t.applyData(g,E)),m.push(E)}const y={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(l,y),t.applyData(l,y)}function UR(t,l){const a={type:"element",tagName:"td",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}const Mv=9,zv=32;function BR(t){const l=String(t),a=/\r?\n|\r/g;let r=a.exec(l),u=0;const s=[];for(;r;)s.push(Lv(l.slice(u,r.index),u>0,!0),r[0]),u=r.index+r[0].length,r=a.exec(l);return s.push(Lv(l.slice(u),u>0,!1)),s.join("")}function Lv(t,l,a){let r=0,u=t.length;if(l){let s=t.codePointAt(r);for(;s===Mv||s===zv;)r++,s=t.codePointAt(r)}if(a){let s=t.codePointAt(u-1);for(;s===Mv||s===zv;)u--,s=t.codePointAt(u-1)}return u>r?t.slice(r,u):""}function HR(t,l){const a={type:"text",value:BR(String(l.value))};return t.patch(l,a),t.applyData(l,a)}function IR(t,l){const a={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(l,a),t.applyData(l,a)}const qR={blockquote:gR,break:yR,code:vR,delete:bR,emphasis:xR,footnoteReference:SR,heading:ER,html:wR,imageReference:TR,image:kR,inlineCode:CR,linkReference:AR,link:_R,listItem:RR,list:NR,paragraph:jR,root:OR,strong:MR,table:zR,tableCell:UR,tableRow:LR,text:HR,thematicBreak:IR,toml:Uu,yaml:Uu,definition:Uu,footnoteDefinition:Uu};function Uu(){}const H0=-1,ys=0,no=1,es=2,wh=3,Th=4,kh=5,Ch=6,I0=7,q0=8,Uv=typeof self=="object"?self:globalThis,FR=(t,l)=>{const a=(u,s)=>(t.set(s,u),u),r=u=>{if(t.has(u))return t.get(u);const[s,c]=l[u];switch(s){case ys:case H0:return a(c,u);case no:{const d=a([],u);for(const p of c)d.push(r(p));return d}case es:{const d=a({},u);for(const[p,m]of c)d[r(p)]=r(m);return d}case wh:return a(new Date(c),u);case Th:{const{source:d,flags:p}=c;return a(new RegExp(d,p),u)}case kh:{const d=a(new Map,u);for(const[p,m]of c)d.set(r(p),r(m));return d}case Ch:{const d=a(new Set,u);for(const p of c)d.add(r(p));return d}case I0:{const{name:d,message:p}=c;return a(new Uv[d](p),u)}case q0:return a(BigInt(c),u);case"BigInt":return a(Object(BigInt(c)),u);case"ArrayBuffer":return a(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return a(new DataView(d),c)}}return a(new Uv[s](c),u)};return r},Bv=t=>FR(new Map,t)(0),Hi="",{toString:GR}={},{keys:YR}=Object,Kr=t=>{const l=typeof t;if(l!=="object"||!t)return[ys,l];const a=GR.call(t).slice(8,-1);switch(a){case"Array":return[no,Hi];case"Object":return[es,Hi];case"Date":return[wh,Hi];case"RegExp":return[Th,Hi];case"Map":return[kh,Hi];case"Set":return[Ch,Hi];case"DataView":return[no,a]}return a.includes("Array")?[no,a]:a.includes("Error")?[I0,a]:[es,a]},Bu=([t,l])=>t===ys&&(l==="function"||l==="symbol"),PR=(t,l,a,r)=>{const u=(c,d)=>{const p=r.push(c)-1;return a.set(d,p),p},s=c=>{if(a.has(c))return a.get(c);let[d,p]=Kr(c);switch(d){case ys:{let y=c;switch(p){case"bigint":d=q0,y=c.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+p);y=null;break;case"undefined":return u([H0],c)}return u([d,y],c)}case no:{if(p){let b=c;return p==="DataView"?b=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(b=new Uint8Array(c)),u([p,[...b]],c)}const y=[],g=u([d,y],c);for(const b of c)y.push(s(b));return g}case es:{if(p)switch(p){case"BigInt":return u([p,c.toString()],c);case"Boolean":case"Number":case"String":return u([p,c.valueOf()],c)}if(l&&"toJSON"in c)return s(c.toJSON());const y=[],g=u([d,y],c);for(const b of YR(c))(t||!Bu(Kr(c[b])))&&y.push([s(b),s(c[b])]);return g}case wh:return u([d,c.toISOString()],c);case Th:{const{source:y,flags:g}=c;return u([d,{source:y,flags:g}],c)}case kh:{const y=[],g=u([d,y],c);for(const[b,S]of c)(t||!(Bu(Kr(b))||Bu(Kr(S))))&&y.push([s(b),s(S)]);return g}case Ch:{const y=[],g=u([d,y],c);for(const b of c)(t||!Bu(Kr(b)))&&y.push(s(b));return g}}const{message:m}=c;return u([d,{name:p,message:m}],c)};return s},Hv=(t,{json:l,lossy:a}={})=>{const r=[];return PR(!(l||a),!!l,new Map,r)(t),r},ts=typeof structuredClone=="function"?(t,l)=>l&&("json"in l||"lossy"in l)?Bv(Hv(t,l)):structuredClone(t):(t,l)=>Bv(Hv(t,l));function VR(t,l){const a=[{type:"text",value:"↩"}];return l>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(l)}]}),a}function XR(t,l){return"Back to reference "+(t+1)+(l>1?"-"+l:"")}function $R(t){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",a=t.options.footnoteBackContent||VR,r=t.options.footnoteBackLabel||XR,u=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=$i(g.toLowerCase());let S=0;const E=[],_=t.footnoteCounts.get(g);for(;_!==void 0&&++S<=_;){E.length>0&&E.push({type:"text",value:" "});let A=typeof a=="string"?a:a(p,S);typeof A=="string"&&(A={type:"text",value:A}),E.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+b+(S>1?"-"+S:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(p,S),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const D=y[y.length-1];if(D&&D.type==="element"&&D.tagName==="p"){const A=D.children[D.children.length-1];A&&A.type==="text"?A.value+=" ":D.children.push({type:"text",value:" "}),D.children.push(...E)}else y.push(...E);const C={type:"element",tagName:"li",properties:{id:l+"fn-"+b},children:t.wrap(y,!0)};t.patch(m,C),d.push(C)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...ts(c),id:"footnote-label"},children:[{type:"text",value:u}]},{type:"text",value:`
197
- `},{type:"element",tagName:"ol",properties:{},children:t.wrap(d,!0)},{type:"text",value:`
198
- `}]}}const vs=(function(t){if(t==null)return JR;if(typeof t=="function")return bs(t);if(typeof t=="object")return Array.isArray(t)?QR(t):KR(t);if(typeof t=="string")return ZR(t);throw new Error("Expected function, string, or object as test")});function QR(t){const l=[];let a=-1;for(;++a<t.length;)l[a]=vs(t[a]);return bs(r);function r(...u){let s=-1;for(;++s<l.length;)if(l[s].apply(this,u))return!0;return!1}}function KR(t){const l=t;return bs(a);function a(r){const u=r;let s;for(s in t)if(u[s]!==l[s])return!1;return!0}}function ZR(t){return bs(l);function l(a){return a&&a.type===t}}function bs(t){return l;function l(a,r,u){return!!(WR(a)&&t.call(this,a,typeof r=="number"?r:void 0,u||void 0))}}function JR(){return!0}function WR(t){return t!==null&&typeof t=="object"&&"type"in t}const F0=[],e2=!0,Nd=!1,t2="skip";function G0(t,l,a,r){let u;typeof l=="function"&&typeof a!="function"?(r=a,a=l):u=l;const s=vs(u),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 S=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(p.type+(S?"<"+S+">":""))+")"})}return b;function b(){let S=F0,E,_,D;if((!l||s(p,m,y[y.length-1]||void 0))&&(S=n2(a(p,y)),S[0]===Nd))return S;if("children"in p&&p.children){const C=p;if(C.children&&S[0]!==t2)for(_=(r?C.children.length:-1)+c,D=y.concat(C);_>-1&&_<C.children.length;){const A=C.children[_];if(E=d(A,_,D)(),E[0]===Nd)return E;_=typeof E[1]=="number"?E[1]:_+c}}return S}}}function n2(t){return Array.isArray(t)?t:typeof t=="number"?[e2,t]:t==null?F0:[t]}function Ah(t,l,a,r){let u,s,c;typeof l=="function"&&typeof a!="function"?(s=void 0,c=l,u=a):(s=l,c=a,u=r),G0(t,s,d,u);function d(p,m){const y=m[m.length-1],g=y?y.children.indexOf(p):void 0;return c(p,g,y)}}const jd={}.hasOwnProperty,l2={};function a2(t,l){const a=l||l2,r=new Map,u=new Map,s=new Map,c={...qR,...a.handlers},d={all:m,applyData:r2,definitionById:r,footnoteById:u,footnoteCounts:s,footnoteOrder:[],handlers:c,one:p,options:a,patch:i2,wrap:u2};return Ah(t,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?r:u,b=String(y.identifier).toUpperCase();g.has(b)||g.set(b,y)}}),d;function p(y,g){const b=y.type,S=d.handlers[b];if(jd.call(d.handlers,b)&&S)return S(d,y,g);if(d.options.passThrough&&d.options.passThrough.includes(b)){if("children"in y){const{children:_,...D}=y,C=ts(D);return C.children=d.all(y),C}return ts(y)}return(d.options.unknownHandler||o2)(d,y,g)}function m(y){const g=[];if("children"in y){const b=y.children;let S=-1;for(;++S<b.length;){const E=d.one(b[S],y);if(E){if(S&&b[S-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=Iv(E.value)),!Array.isArray(E)&&E.type==="element")){const _=E.children[0];_&&_.type==="text"&&(_.value=Iv(_.value))}Array.isArray(E)?g.push(...E):g.push(E)}}}return g}}function i2(t,l){t.position&&(l.position=XC(t))}function r2(t,l){let a=l;if(t&&t.data){const r=t.data.hName,u=t.data.hChildren,s=t.data.hProperties;if(typeof r=="string")if(a.type==="element")a.tagName=r;else{const c="children"in a?a.children:[a];a={type:"element",tagName:r,properties:{},children:c}}a.type==="element"&&s&&Object.assign(a.properties,ts(s)),"children"in a&&a.children&&u!==null&&u!==void 0&&(a.children=u)}return a}function o2(t,l){const a=l.data||{},r="value"in l&&!(jd.call(a,"hProperties")||jd.call(a,"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 u2(t,l){const a=[];let r=-1;for(l&&a.push({type:"text",value:`
199
- `});++r<t.length;)r&&a.push({type:"text",value:`
200
- `}),a.push(t[r]);return l&&t.length>0&&a.push({type:"text",value:`
201
- `}),a}function Iv(t){let l=0,a=t.charCodeAt(l);for(;a===9||a===32;)l++,a=t.charCodeAt(l);return t.slice(l)}function qv(t,l){const a=a2(t,l),r=a.one(t,void 0),u=$R(a),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return u&&s.children.push({type:"text",value:`
202
- `},u),s}function s2(t,l){return t&&"run"in t?async function(a,r){const u=qv(a,{file:r,...l});await t.run(u,r)}:function(a,r){return qv(a,{file:r,...t||l})}}function Fv(t){if(t)throw t}var Kf,Gv;function c2(){if(Gv)return Kf;Gv=1;var t=Object.prototype.hasOwnProperty,l=Object.prototype.toString,a=Object.defineProperty,r=Object.getOwnPropertyDescriptor,u=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){a&&y.name==="__proto__"?a(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 Kf=function p(){var m,y,g,b,S,E,_=arguments[0],D=1,C=arguments.length,A=!1;for(typeof _=="boolean"&&(A=_,_=arguments[1]||{},D=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});D<C;++D)if(m=arguments[D],m!=null)for(y in m)g=d(_,y),b=d(m,y),_!==b&&(A&&b&&(s(b)||(S=u(b)))?(S?(S=!1,E=g&&u(g)?g:[]):E=g&&s(g)?g:{},c(_,{name:y,newValue:p(A,E,b)})):typeof b<"u"&&c(_,{name:y,newValue:b}));return _},Kf}var f2=c2();const Zf=Fd(f2);function Od(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 d2(){const t=[],l={run:a,use:r};return l;function a(...u){let s=-1;const c=u.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...u);function d(p,...m){const y=t[++s];let g=-1;if(p){c(p);return}for(;++g<u.length;)(m[g]===null||m[g]===void 0)&&(m[g]=u[g]);u=m,y?h2(y,d)(...m):c(null,...m)}}function r(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return t.push(u),l}}function h2(t,l){let a;return r;function r(...c){const d=t.length>c.length;let p;d&&c.push(u);try{p=t.apply(this,c)}catch(m){const y=m;if(d&&a)throw y;return u(y)}d||(p&&p.then&&typeof p.then=="function"?p.then(s,u):p instanceof Error?u(p):s(p))}function u(c,...d){a||(a=!0,l(c,...d))}function s(c){u(null,c)}}const wl={basename:m2,dirname:p2,extname:g2,join:y2,sep:"/"};function m2(t,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');bo(t);let a=0,r=-1,u=t.length,s;if(l===void 0||l.length===0||l.length>t.length){for(;u--;)if(t.codePointAt(u)===47){if(s){a=u+1;break}}else r<0&&(s=!0,r=u+1);return r<0?"":t.slice(a,r)}if(l===t)return"";let c=-1,d=l.length-1;for(;u--;)if(t.codePointAt(u)===47){if(s){a=u+1;break}}else c<0&&(s=!0,c=u+1),d>-1&&(t.codePointAt(u)===l.codePointAt(d--)?d<0&&(r=u):(d=-1,r=c));return a===r?r=c:r<0&&(r=t.length),t.slice(a,r)}function p2(t){if(bo(t),t.length===0)return".";let l=-1,a=t.length,r;for(;--a;)if(t.codePointAt(a)===47){if(r){l=a;break}}else r||(r=!0);return l<0?t.codePointAt(0)===47?"/":".":l===1&&t.codePointAt(0)===47?"//":t.slice(0,l)}function g2(t){bo(t);let l=t.length,a=-1,r=0,u=-1,s=0,c;for(;l--;){const d=t.codePointAt(l);if(d===47){if(c){r=l+1;break}continue}a<0&&(c=!0,a=l+1),d===46?u<0?u=l:s!==1&&(s=1):u>-1&&(s=-1)}return u<0||a<0||s===0||s===1&&u===a-1&&u===r+1?"":t.slice(u,a)}function y2(...t){let l=-1,a;for(;++l<t.length;)bo(t[l]),t[l]&&(a=a===void 0?t[l]:a+"/"+t[l]);return a===void 0?".":v2(a)}function v2(t){bo(t);const l=t.codePointAt(0)===47;let a=b2(t,!l);return a.length===0&&!l&&(a="."),a.length>0&&t.codePointAt(t.length-1)===47&&(a+="/"),l?"/"+a:a}function b2(t,l){let a="",r=0,u=-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(!(u===c-1||s===1))if(u!==c-1&&s===2){if(a.length<2||r!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(p=a.lastIndexOf("/"),p!==a.length-1){p<0?(a="",r=0):(a=a.slice(0,p),r=a.length-1-a.lastIndexOf("/")),u=c,s=0;continue}}else if(a.length>0){a="",r=0,u=c,s=0;continue}}l&&(a=a.length>0?a+"/..":"..",r=2)}else a.length>0?a+="/"+t.slice(u+1,c):a=t.slice(u+1,c),r=c-u-1;u=c,s=0}else d===46&&s>-1?s++:s=-1}return a}function bo(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const x2={cwd:S2};function S2(){return"/"}function Md(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function E2(t){if(typeof t=="string")t=new URL(t);else if(!Md(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 w2(t)}function w2(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 a=-1;for(;++a<l.length;)if(l.codePointAt(a)===37&&l.codePointAt(a+1)===50){const r=l.codePointAt(a+2);if(r===70||r===102){const u=new TypeError("File URL path must not include encoded / characters");throw u.code="ERR_INVALID_FILE_URL_PATH",u}}return decodeURIComponent(l)}const Jf=["history","path","basename","stem","extname","dirname"];class Y0{constructor(l){let a;l?Md(l)?a={path:l}:typeof l=="string"||T2(l)?a={value:l}:a=l:a={},this.cwd="cwd"in a?"":x2.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Jf.length;){const s=Jf[r];s in a&&a[s]!==void 0&&a[s]!==null&&(this[s]=s==="history"?[...a[s]]:a[s])}let u;for(u in a)Jf.includes(u)||(this[u]=a[u])}get basename(){return typeof this.path=="string"?wl.basename(this.path):void 0}set basename(l){ed(l,"basename"),Wf(l,"basename"),this.path=wl.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?wl.dirname(this.path):void 0}set dirname(l){Yv(this.basename,"dirname"),this.path=wl.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?wl.extname(this.path):void 0}set extname(l){if(Wf(l,"extname"),Yv(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=wl.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){Md(l)&&(l=E2(l)),ed(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?wl.basename(this.path,this.extname):void 0}set stem(l){ed(l,"stem"),Wf(l,"stem"),this.path=wl.join(this.dirname||"",l+(this.extname||""))}fail(l,a,r){const u=this.message(l,a,r);throw u.fatal=!0,u}info(l,a,r){const u=this.message(l,a,r);return u.fatal=void 0,u}message(l,a,r){const u=new sn(l,a,r);return this.path&&(u.name=this.path+":"+u.name,u.file=this.path),u.fatal=!1,this.messages.push(u),u}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function Wf(t,l){if(t&&t.includes(wl.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+wl.sep+"`")}function ed(t,l){if(!t)throw new Error("`"+l+"` cannot be empty")}function Yv(t,l){if(!t)throw new Error("Setting `"+l+"` requires `path` to be set too")}function T2(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const k2=(function(t){const r=this.constructor.prototype,u=r[t],s=function(){return u.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),C2={}.hasOwnProperty;class _h extends k2{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=d2()}copy(){const l=new _h;let a=-1;for(;++a<this.attachers.length;){const r=this.attachers[a];l.use(...r)}return l.data(Zf(!0,{},this.namespace)),l}data(l,a){return typeof l=="string"?arguments.length===2?(ld("data",this.frozen),this.namespace[l]=a,this):C2.call(this.namespace,l)&&this.namespace[l]||void 0:l?(ld("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[a,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const u=a.call(l,...r);typeof u=="function"&&this.transformers.use(u)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const a=Hu(l),r=this.parser||this.Parser;return td("parse",r),r(String(a),a)}process(l,a){const r=this;return this.freeze(),td("process",this.parser||this.Parser),nd("process",this.compiler||this.Compiler),a?u(void 0,a):new Promise(u);function u(s,c){const d=Hu(l),p=r.parse(d);r.run(p,d,function(y,g,b){if(y||!g||!b)return m(y);const S=g,E=r.stringify(S,b);R2(E)?b.value=E:b.result=E,m(y,b)});function m(y,g){y||!g?c(y):s?s(g):a(void 0,g)}}}processSync(l){let a=!1,r;return this.freeze(),td("processSync",this.parser||this.Parser),nd("processSync",this.compiler||this.Compiler),this.process(l,u),Vv("processSync","process",a),r;function u(s,c){a=!0,Fv(s),r=c}}run(l,a,r){Pv(l),this.freeze();const u=this.transformers;return!r&&typeof a=="function"&&(r=a,a=void 0),r?s(void 0,r):new Promise(s);function s(c,d){const p=Hu(a);u.run(l,p,m);function m(y,g,b){const S=g||l;y?d(y):c?c(S):r(void 0,S,b)}}}runSync(l,a){let r=!1,u;return this.run(l,a,s),Vv("runSync","run",r),u;function s(c,d){Fv(c),u=d,r=!0}}stringify(l,a){this.freeze();const r=Hu(a),u=this.compiler||this.Compiler;return nd("stringify",u),Pv(l),u(l,r)}use(l,...a){const r=this.attachers,u=this.namespace;if(ld("use",this.frozen),l!=null)if(typeof l=="function")p(l,a);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&&(u.settings=Zf(!0,u.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[S,...E]=y;const _=r[b][1];Od(_)&&Od(S)&&(S=Zf(!0,_,S)),r[b]=[m,S,...E]}}}}const A2=new _h().freeze();function td(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function nd(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function ld(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 Pv(t){if(!Od(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Vv(t,l,a){if(!a)throw new Error("`"+t+"` finished async. Use `"+l+"` instead")}function Hu(t){return _2(t)?t:new Y0(t)}function _2(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function R2(t){return typeof t=="string"||D2(t)}function D2(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const N2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Xv=[],$v={allowDangerousHtml:!0},j2=/^(https?|ircs?|mailto|xmpp)$/i,O2=[{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 M2(t){const l=z2(t),a=L2(t);return U2(l.runSync(l.parse(a),a),t)}function z2(t){const l=t.rehypePlugins||Xv,a=t.remarkPlugins||Xv,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...$v}:$v;return A2().use(pR).use(a).use(s2,r).use(l)}function L2(t){const l=t.children||"",a=new Y0;return typeof l=="string"&&(a.value=l),a}function U2(t,l){const a=l.allowedElements,r=l.allowElement,u=l.components,s=l.disallowedElements,c=l.skipHtml,d=l.unwrapDisallowed,p=l.urlTransform||B2;for(const y of O2)Object.hasOwn(l,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+N2+y.id,void 0);return Ah(t,m),JC(t,{Fragment:v.Fragment,components:u,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.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 S;for(S in Xf)if(Object.hasOwn(Xf,S)&&Object.hasOwn(y.properties,S)){const E=y.properties[S],_=Xf[S];(_===null||_.includes(y.tagName))&&(y.properties[S]=p(String(E||""),S,y))}}if(y.type==="element"){let S=a?!a.includes(y.tagName):s?s.includes(y.tagName):!1;if(!S&&r&&typeof g=="number"&&(S=!r(y,g,b)),S&&b&&typeof g=="number")return d&&y.children?b.children.splice(g,1,...y.children):b.children.splice(g,1),g}}}function B2(t){const l=t.indexOf(":"),a=t.indexOf("?"),r=t.indexOf("#"),u=t.indexOf("/");return l===-1||u!==-1&&l>u||a!==-1&&l>a||r!==-1&&l>r||j2.test(t.slice(0,l))?t:""}function Qv(t,l){const a=String(t);if(typeof l!="string")throw new TypeError("Expected character");let r=0,u=a.indexOf(l);for(;u!==-1;)r++,u=a.indexOf(l,u+l.length);return r}function H2(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function I2(t,l,a){const u=vs((a||{}).ignore||[]),s=q2(l);let c=-1;for(;++c<s.length;)G0(t,"text",d);function d(m,y){let g=-1,b;for(;++g<y.length;){const S=y[g],E=b?b.children:void 0;if(u(S,E?E.indexOf(S):void 0,b))return;b=S}if(b)return p(m,y)}function p(m,y){const g=y[y.length-1],b=s[c][0],S=s[c][1];let E=0;const D=g.children.indexOf(m);let C=!1,A=[];b.lastIndex=0;let j=b.exec(m.value);for(;j;){const ee=j.index,V={index:j.index,input:j.input,stack:[...y,m]};let q=S(...j,V);if(typeof q=="string"&&(q=q.length>0?{type:"text",value:q}:void 0),q===!1?b.lastIndex=ee+1:(E!==ee&&A.push({type:"text",value:m.value.slice(E,ee)}),Array.isArray(q)?A.push(...q):q&&A.push(q),E=ee+j[0].length,C=!0),!b.global)break;j=b.exec(m.value)}return C?(E<m.value.length&&A.push({type:"text",value:m.value.slice(E)}),g.children.splice(D,1,...A)):A=[m],D+A.length}}function q2(t){const l=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const a=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<a.length;){const u=a[r];l.push([F2(u[0]),G2(u[1])])}return l}function F2(t){return typeof t=="string"?new RegExp(H2(t),"g"):t}function G2(t){return typeof t=="function"?t:function(){return t}}const ad="phrasing",id=["autolink","link","image","label"];function Y2(){return{transforms:[Z2],enter:{literalAutolink:V2,literalAutolinkEmail:rd,literalAutolinkHttp:rd,literalAutolinkWww:rd},exit:{literalAutolink:K2,literalAutolinkEmail:Q2,literalAutolinkHttp:X2,literalAutolinkWww:$2}}}function P2(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ad,notInConstruct:id},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ad,notInConstruct:id},{character:":",before:"[ps]",after:"\\/",inConstruct:ad,notInConstruct:id}]}}function V2(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function rd(t){this.config.enter.autolinkProtocol.call(this,t)}function X2(t){this.config.exit.autolinkProtocol.call(this,t)}function $2(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 Q2(t){this.config.exit.autolinkEmail.call(this,t)}function K2(t){this.exit(t)}function Z2(t){I2(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,J2],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),W2]],{ignore:["link","linkReference"]})}function J2(t,l,a,r,u){let s="";if(!P0(u)||(/^w/i.test(l)&&(a=l+a,l="",s="http://"),!eD(a)))return!1;const c=tD(a+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 W2(t,l,a,r){return!P0(r,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+a,children:[{type:"text",value:l+"@"+a}]}}function eD(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 tD(t){const l=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!l)return[t,void 0];t=t.slice(0,l.index);let a=l[0],r=a.indexOf(")");const u=Qv(t,"(");let s=Qv(t,")");for(;r!==-1&&u>s;)t+=a.slice(0,r+1),a=a.slice(r+1),r=a.indexOf(")"),s++;return[t,a]}function P0(t,l){const a=t.input.charCodeAt(t.index-1);return(t.index===0||ti(a)||ps(a))&&(!l||a!==47)}V0.peek=cD;function nD(){this.buffer()}function lD(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function aD(){this.buffer()}function iD(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function rD(t){const l=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=cl(this.sliceSerialize(t)).toLowerCase(),a.label=l}function oD(t){this.exit(t)}function uD(t){const l=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=cl(this.sliceSerialize(t)).toLowerCase(),a.label=l}function sD(t){this.exit(t)}function cD(){return"["}function V0(t,l,a,r){const u=a.createTracker(r);let s=u.move("[^");const c=a.enter("footnoteReference"),d=a.enter("reference");return s+=u.move(a.safe(a.associationId(t),{after:"]",before:s})),d(),c(),s+=u.move("]"),s}function fD(){return{enter:{gfmFootnoteCallString:nD,gfmFootnoteCall:lD,gfmFootnoteDefinitionLabelString:aD,gfmFootnoteDefinition:iD},exit:{gfmFootnoteCallString:rD,gfmFootnoteCall:oD,gfmFootnoteDefinitionLabelString:uD,gfmFootnoteDefinition:sD}}}function dD(t){let l=!1;return t&&t.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:a,footnoteReference:V0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(r,u,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?`
203
- `:" ")+s.indentLines(s.containerFlow(r,d.current()),l?X0:hD))),m(),p}}function hD(t,l,a){return l===0?t:X0(t,l,a)}function X0(t,l,a){return(a?"":" ")+t}const mD=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];$0.peek=bD;function pD(){return{canContainEols:["delete"],enter:{strikethrough:yD},exit:{strikethrough:vD}}}function gD(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:mD}],handlers:{delete:$0}}}function yD(t){this.enter({type:"delete",children:[]},t)}function vD(t){this.exit(t)}function $0(t,l,a,r){const u=a.createTracker(r),s=a.enter("strikethrough");let c=u.move("~~");return c+=a.containerPhrasing(t,{...u.current(),before:c,after:"~"}),c+=u.move("~~"),s(),c}function bD(){return"~"}function xD(t){return t.length}function SD(t,l){const a=l||{},r=(a.align||[]).concat(),u=a.stringLength||xD,s=[],c=[],d=[],p=[];let m=0,y=-1;for(;++y<t.length;){const _=[],D=[];let C=-1;for(t[y].length>m&&(m=t[y].length);++C<t[y].length;){const A=ED(t[y][C]);if(a.alignDelimiters!==!1){const j=u(A);D[C]=j,(p[C]===void 0||j>p[C])&&(p[C]=j)}_.push(A)}c[y]=_,d[y]=D}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<m;)s[g]=Kv(r[g]);else{const _=Kv(r);for(;++g<m;)s[g]=_}g=-1;const b=[],S=[];for(;++g<m;){const _=s[g];let D="",C="";_===99?(D=":",C=":"):_===108?D=":":_===114&&(C=":");let A=a.alignDelimiters===!1?1:Math.max(1,p[g]-D.length-C.length);const j=D+"-".repeat(A)+C;a.alignDelimiters!==!1&&(A=D.length+A+C.length,A>p[g]&&(p[g]=A),S[g]=A),b[g]=j}c.splice(1,0,b),d.splice(1,0,S),y=-1;const E=[];for(;++y<c.length;){const _=c[y],D=d[y];g=-1;const C=[];for(;++g<m;){const A=_[g]||"";let j="",ee="";if(a.alignDelimiters!==!1){const V=p[g]-(D[g]||0),q=s[g];q===114?j=" ".repeat(V):q===99?V%2?(j=" ".repeat(V/2+.5),ee=" ".repeat(V/2-.5)):(j=" ".repeat(V/2),ee=j):ee=" ".repeat(V)}a.delimiterStart!==!1&&!g&&C.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&A==="")&&(a.delimiterStart!==!1||g)&&C.push(" "),a.alignDelimiters!==!1&&C.push(j),C.push(A),a.alignDelimiters!==!1&&C.push(ee),a.padding!==!1&&C.push(" "),(a.delimiterEnd!==!1||g!==m-1)&&C.push("|")}E.push(a.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return E.join(`
204
- `)}function ED(t){return t==null?"":String(t)}function Kv(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 wD(t,l,a,r){const u=a.enter("blockquote"),s=a.createTracker(r);s.move("> "),s.shift(2);const c=a.indentLines(a.containerFlow(t,s.current()),TD);return u(),c}function TD(t,l,a){return">"+(a?"":" ")+t}function kD(t,l){return Zv(t,l.inConstruct,!0)&&!Zv(t,l.notInConstruct,!1)}function Zv(t,l,a){if(typeof l=="string"&&(l=[l]),!l||l.length===0)return a;let r=-1;for(;++r<l.length;)if(t.includes(l[r]))return!0;return!1}function Jv(t,l,a,r){let u=-1;for(;++u<a.unsafe.length;)if(a.unsafe[u].character===`
205
- `&&kD(a.stack,a.unsafe[u]))return/[ \t]/.test(r.before)?"":" ";return`\\
206
- `}function CD(t,l){const a=String(t);let r=a.indexOf(l),u=r,s=0,c=0;if(typeof l!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===u?++s>c&&(c=s):s=1,u=r+l.length,r=a.indexOf(l,u);return c}function AD(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 _D(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 RD(t,l,a,r){const u=_D(a),s=t.value||"",c=u==="`"?"GraveAccent":"Tilde";if(AD(t,a)){const g=a.enter("codeIndented"),b=a.indentLines(s,DD);return g(),b}const d=a.createTracker(r),p=u.repeat(Math.max(CD(s,u)+1,3)),m=a.enter("codeFenced");let y=d.move(p);if(t.lang){const g=a.enter(`codeFencedLang${c}`);y+=d.move(a.safe(t.lang,{before:y,after:" ",encode:["`"],...d.current()})),g()}if(t.lang&&t.meta){const g=a.enter(`codeFencedMeta${c}`);y+=d.move(" "),y+=d.move(a.safe(t.meta,{before:y,after:`
207
- `,encode:["`"],...d.current()})),g()}return y+=d.move(`
208
- `),s&&(y+=d.move(s+`
209
- `)),y+=d.move(p),m(),y}function DD(t,l,a){return(a?"":" ")+t}function Rh(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 ND(t,l,a,r){const u=Rh(a),s=u==='"'?"Quote":"Apostrophe",c=a.enter("definition");let d=a.enter("label");const p=a.createTracker(r);let m=p.move("[");return m+=p.move(a.safe(a.associationId(t),{before:m,after:"]",...p.current()})),m+=p.move("]: "),d(),!t.url||/[\0- \u007F]/.test(t.url)?(d=a.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(a.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(d=a.enter("destinationRaw"),m+=p.move(a.safe(t.url,{before:m,after:t.title?" ":`
210
- `,...p.current()}))),d(),t.title&&(d=a.enter(`title${s}`),m+=p.move(" "+u),m+=p.move(a.safe(t.title,{before:m,after:u,...p.current()})),m+=p.move(u),d()),c(),m}function jD(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 uo(t){return"&#x"+t.toString(16).toUpperCase()+";"}function ns(t,l,a){const r=Vi(t),u=Vi(l);return r===void 0?u===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:u===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?u===void 0?{inside:!1,outside:!1}:u===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:u===void 0?{inside:!1,outside:!1}:u===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Q0.peek=OD;function Q0(t,l,a,r){const u=jD(a),s=a.enter("emphasis"),c=a.createTracker(r),d=c.move(u);let p=c.move(a.containerPhrasing(t,{after:u,before:d,...c.current()}));const m=p.charCodeAt(0),y=ns(r.before.charCodeAt(r.before.length-1),m,u);y.inside&&(p=uo(m)+p.slice(1));const g=p.charCodeAt(p.length-1),b=ns(r.after.charCodeAt(0),g,u);b.inside&&(p=p.slice(0,-1)+uo(g));const S=c.move(u);return s(),a.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},d+p+S}function OD(t,l,a){return a.options.emphasis||"*"}function MD(t,l){let a=!1;return Ah(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return a=!0,Nd}),!!((!t.depth||t.depth<3)&&xh(t)&&(l.options.setext||a))}function zD(t,l,a,r){const u=Math.max(Math.min(6,t.depth||1),1),s=a.createTracker(r);if(MD(t,a)){const y=a.enter("headingSetext"),g=a.enter("phrasing"),b=a.containerPhrasing(t,{...s.current(),before:`
211
- `,after:`
212
- `});return g(),y(),b+`
213
- `+(u===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
214
- `))+1))}const c="#".repeat(u),d=a.enter("headingAtx"),p=a.enter("phrasing");s.move(c+" ");let m=a.containerPhrasing(t,{before:"# ",after:`
215
- `,...s.current()});return/^[\t ]/.test(m)&&(m=uo(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,a.options.closeAtx&&(m+=" "+c),p(),d(),m}K0.peek=LD;function K0(t){return t.value||""}function LD(){return"<"}Z0.peek=UD;function Z0(t,l,a,r){const u=Rh(a),s=u==='"'?"Quote":"Apostrophe",c=a.enter("image");let d=a.enter("label");const p=a.createTracker(r);let m=p.move("![");return m+=p.move(a.safe(t.alt,{before:m,after:"]",...p.current()})),m+=p.move("]("),d(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(d=a.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(a.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(d=a.enter("destinationRaw"),m+=p.move(a.safe(t.url,{before:m,after:t.title?" ":")",...p.current()}))),d(),t.title&&(d=a.enter(`title${s}`),m+=p.move(" "+u),m+=p.move(a.safe(t.title,{before:m,after:u,...p.current()})),m+=p.move(u),d()),m+=p.move(")"),c(),m}function UD(){return"!"}J0.peek=BD;function J0(t,l,a,r){const u=t.referenceType,s=a.enter("imageReference");let c=a.enter("label");const d=a.createTracker(r);let p=d.move("![");const m=a.safe(t.alt,{before:p,after:"]",...d.current()});p+=d.move(m+"]["),c();const y=a.stack;a.stack=[],c=a.enter("reference");const g=a.safe(a.associationId(t),{before:p,after:"]",...d.current()});return c(),a.stack=y,s(),u==="full"||!m||m!==g?p+=d.move(g+"]"):u==="shortcut"?p=p.slice(0,-1):p+=d.move("]"),p}function BD(){return"!"}W0.peek=HD;function W0(t,l,a){let r=t.value||"",u="`",s=-1;for(;new RegExp("(^|[^`])"+u+"([^`]|$)").test(r);)u+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<a.unsafe.length;){const c=a.unsafe[s],d=a.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 u+r+u}function HD(){return"`"}function ex(t,l){const a=xh(t);return!!(!l.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(a===t.url||"mailto:"+a===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}tx.peek=ID;function tx(t,l,a,r){const u=Rh(a),s=u==='"'?"Quote":"Apostrophe",c=a.createTracker(r);let d,p;if(ex(t,a)){const y=a.stack;a.stack=[],d=a.enter("autolink");let g=c.move("<");return g+=c.move(a.containerPhrasing(t,{before:g,after:">",...c.current()})),g+=c.move(">"),d(),a.stack=y,g}d=a.enter("link"),p=a.enter("label");let m=c.move("[");return m+=c.move(a.containerPhrasing(t,{before:m,after:"](",...c.current()})),m+=c.move("]("),p(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(p=a.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(a.safe(t.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(p=a.enter("destinationRaw"),m+=c.move(a.safe(t.url,{before:m,after:t.title?" ":")",...c.current()}))),p(),t.title&&(p=a.enter(`title${s}`),m+=c.move(" "+u),m+=c.move(a.safe(t.title,{before:m,after:u,...c.current()})),m+=c.move(u),p()),m+=c.move(")"),d(),m}function ID(t,l,a){return ex(t,a)?"<":"["}nx.peek=qD;function nx(t,l,a,r){const u=t.referenceType,s=a.enter("linkReference");let c=a.enter("label");const d=a.createTracker(r);let p=d.move("[");const m=a.containerPhrasing(t,{before:p,after:"]",...d.current()});p+=d.move(m+"]["),c();const y=a.stack;a.stack=[],c=a.enter("reference");const g=a.safe(a.associationId(t),{before:p,after:"]",...d.current()});return c(),a.stack=y,s(),u==="full"||!m||m!==g?p+=d.move(g+"]"):u==="shortcut"?p=p.slice(0,-1):p+=d.move("]"),p}function qD(){return"["}function Dh(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 FD(t){const l=Dh(t),a=t.options.bulletOther;if(!a)return l==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===l)throw new Error("Expected `bullet` (`"+l+"`) and `bulletOther` (`"+a+"`) to be different");return a}function GD(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 lx(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 YD(t,l,a,r){const u=a.enter("list"),s=a.bulletCurrent;let c=t.ordered?GD(a):Dh(a);const d=t.ordered?c==="."?")":".":FD(a);let p=l&&a.bulletLastUsed?c===a.bulletLastUsed:!1;if(!t.ordered){const y=t.children?t.children[0]:void 0;if((c==="*"||c==="-")&&y&&(!y.children||!y.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(p=!0),lx(a)===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),a.bulletCurrent=c;const m=a.containerFlow(t,r);return a.bulletLastUsed=c,a.bulletCurrent=s,u(),m}function PD(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 VD(t,l,a,r){const u=PD(a);let s=a.bulletCurrent||Dh(a);l&&l.type==="list"&&l.ordered&&(s=(typeof l.start=="number"&&l.start>-1?l.start:1)+(a.options.incrementListMarker===!1?0:l.children.indexOf(t))+s);let c=s.length+1;(u==="tab"||u==="mixed"&&(l&&l.type==="list"&&l.spread||t.spread))&&(c=Math.ceil(c/4)*4);const d=a.createTracker(r);d.move(s+" ".repeat(c-s.length)),d.shift(c);const p=a.enter("listItem"),m=a.indentLines(a.containerFlow(t,d.current()),y);return p(),m;function y(g,b,S){return b?(S?"":" ".repeat(c))+g:(S?s:s+" ".repeat(c-s.length))+g}}function XD(t,l,a,r){const u=a.enter("paragraph"),s=a.enter("phrasing"),c=a.containerPhrasing(t,r);return s(),u(),c}const $D=vs(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function QD(t,l,a,r){return(t.children.some(function(c){return $D(c)})?a.containerPhrasing:a.containerFlow).call(a,t,r)}function KD(t){const l=t.options.strong||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize strong with `"+l+"` for `options.strong`, expected `*`, or `_`");return l}ax.peek=ZD;function ax(t,l,a,r){const u=KD(a),s=a.enter("strong"),c=a.createTracker(r),d=c.move(u+u);let p=c.move(a.containerPhrasing(t,{after:u,before:d,...c.current()}));const m=p.charCodeAt(0),y=ns(r.before.charCodeAt(r.before.length-1),m,u);y.inside&&(p=uo(m)+p.slice(1));const g=p.charCodeAt(p.length-1),b=ns(r.after.charCodeAt(0),g,u);b.inside&&(p=p.slice(0,-1)+uo(g));const S=c.move(u+u);return s(),a.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},d+p+S}function ZD(t,l,a){return a.options.strong||"*"}function JD(t,l,a,r){return a.safe(t.value,r)}function WD(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 eN(t,l,a){const r=(lx(a)+(a.options.ruleSpaces?" ":"")).repeat(WD(a));return a.options.ruleSpaces?r.slice(0,-1):r}const ix={blockquote:wD,break:Jv,code:RD,definition:ND,emphasis:Q0,hardBreak:Jv,heading:zD,html:K0,image:Z0,imageReference:J0,inlineCode:W0,link:tx,linkReference:nx,list:YD,listItem:VD,paragraph:XD,root:QD,strong:ax,text:JD,thematicBreak:eN};function tN(){return{enter:{table:nN,tableData:Wv,tableHeader:Wv,tableRow:aN},exit:{codeText:iN,table:lN,tableData:od,tableHeader:od,tableRow:od}}}function nN(t){const l=t._align;this.enter({type:"table",align:l.map(function(a){return a==="none"?null:a}),children:[]},t),this.data.inTable=!0}function lN(t){this.exit(t),this.data.inTable=void 0}function aN(t){this.enter({type:"tableRow",children:[]},t)}function od(t){this.exit(t)}function Wv(t){this.enter({type:"tableCell",children:[]},t)}function iN(t){let l=this.resume();this.data.inTable&&(l=l.replace(/\\([\\|])/g,rN));const a=this.stack[this.stack.length-1];a.type,a.value=l,this.exit(t)}function rN(t,l){return l==="|"?l:t}function oN(t){const l=t||{},a=l.tableCellPadding,r=l.tablePipeAlign,u=l.stringLength,s=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
216
- `,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(S,E,_,D){return m(y(S,_,D),S.align)}function d(S,E,_,D){const C=g(S,_,D),A=m([C]);return A.slice(0,A.indexOf(`
217
- `))}function p(S,E,_,D){const C=_.enter("tableCell"),A=_.enter("phrasing"),j=_.containerPhrasing(S,{...D,before:s,after:s});return A(),C(),j}function m(S,E){return SD(S,{align:E,alignDelimiters:r,padding:a,stringLength:u})}function y(S,E,_){const D=S.children;let C=-1;const A=[],j=E.enter("table");for(;++C<D.length;)A[C]=g(D[C],E,_);return j(),A}function g(S,E,_){const D=S.children;let C=-1;const A=[],j=E.enter("tableRow");for(;++C<D.length;)A[C]=p(D[C],S,E,_);return j(),A}function b(S,E,_){let D=ix.inlineCode(S,E,_);return _.stack.includes("tableCell")&&(D=D.replace(/\|/g,"\\$&")),D}}function uN(){return{exit:{taskListCheckValueChecked:eb,taskListCheckValueUnchecked:eb,paragraph:cN}}}function sN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:fN}}}function eb(t){const l=this.stack[this.stack.length-2];l.type,l.checked=t.type==="taskListCheckValueChecked"}function cN(t){const l=this.stack[this.stack.length-2];if(l&&l.type==="listItem"&&typeof l.checked=="boolean"){const a=this.stack[this.stack.length-1];a.type;const r=a.children[0];if(r&&r.type==="text"){const u=l.children;let s=-1,c;for(;++s<u.length;){const d=u[s];if(d.type==="paragraph"){c=d;break}}c===a&&(r.value=r.value.slice(1),r.value.length===0?a.children.shift():a.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,a.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function fN(t,l,a,r){const u=t.children[0],s=typeof t.checked=="boolean"&&u&&u.type==="paragraph",c="["+(t.checked?"x":" ")+"] ",d=a.createTracker(r);s&&d.move(c);let p=ix.listItem(t,l,a,{...r,...d.current()});return s&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(y){return y+c}}function dN(){return[Y2(),fD(),pD(),tN(),uN()]}function hN(t){return{extensions:[P2(),dD(t),gD(),oN(t),sN()]}}const mN={tokenize:xN,partial:!0},rx={tokenize:SN,partial:!0},ox={tokenize:EN,partial:!0},ux={tokenize:wN,partial:!0},pN={tokenize:TN,partial:!0},sx={name:"wwwAutolink",tokenize:vN,previous:fx},cx={name:"protocolAutolink",tokenize:bN,previous:dx},Jl={name:"emailAutolink",tokenize:yN,previous:hx},_l={};function gN(){return{text:_l}}let Wa=48;for(;Wa<123;)_l[Wa]=Jl,Wa++,Wa===58?Wa=65:Wa===91&&(Wa=97);_l[43]=Jl;_l[45]=Jl;_l[46]=Jl;_l[95]=Jl;_l[72]=[Jl,cx];_l[104]=[Jl,cx];_l[87]=[Jl,sx];_l[119]=[Jl,sx];function yN(t,l,a){const r=this;let u,s;return c;function c(g){return!zd(g)||!hx.call(r,r.previous)||Nh(r.events)?a(g):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),d(g))}function d(g){return zd(g)?(t.consume(g),d):g===64?(t.consume(g),p):a(g)}function p(g){return g===46?t.check(pN,y,m)(g):g===45||g===95||un(g)?(s=!0,t.consume(g),p):y(g)}function m(g){return t.consume(g),u=!0,p}function y(g){return s&&u&&pn(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),l(g)):a(g)}}function vN(t,l,a){const r=this;return u;function u(c){return c!==87&&c!==119||!fx.call(r,r.previous)||Nh(r.events)?a(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(mN,t.attempt(rx,t.attempt(ox,s),a),a)(c))}function s(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),l(c)}}function bN(t,l,a){const r=this;let u="",s=!1;return c;function c(g){return(g===72||g===104)&&dx.call(r,r.previous)&&!Nh(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),u+=String.fromCodePoint(g),t.consume(g),d):a(g)}function d(g){if(pn(g)&&u.length<5)return u+=String.fromCodePoint(g),t.consume(g),d;if(g===58){const b=u.toLowerCase();if(b==="http"||b==="https")return t.consume(g),p}return a(g)}function p(g){return g===47?(t.consume(g),s?m:(s=!0,p)):a(g)}function m(g){return g===null||Wu(g)||bt(g)||ti(g)||ps(g)?a(g):t.attempt(rx,t.attempt(ox,y),a)(g)}function y(g){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),l(g)}}function xN(t,l,a){let r=0;return u;function u(c){return(c===87||c===119)&&r<3?(r++,t.consume(c),u):c===46&&r===3?(t.consume(c),s):a(c)}function s(c){return c===null?a(c):l(c)}}function SN(t,l,a){let r,u,s;return c;function c(m){return m===46||m===95?t.check(ux,p,d)(m):m===null||bt(m)||ti(m)||m!==45&&ps(m)?p(m):(s=!0,t.consume(m),c)}function d(m){return m===95?r=!0:(u=r,r=void 0),t.consume(m),c}function p(m){return u||r||!s?a(m):l(m)}}function EN(t,l){let a=0,r=0;return u;function u(c){return c===40?(a++,t.consume(c),u):c===41&&r<a?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(ux,l,s)(c):c===null||bt(c)||ti(c)?l(c):(t.consume(c),u)}function s(c){return c===41&&r++,t.consume(c),u}}function wN(t,l,a){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),u):d===60||d===null||bt(d)||ti(d)?l(d):a(d)}function u(d){return d===null||d===40||d===91||bt(d)||ti(d)?l(d):r(d)}function s(d){return pn(d)?c(d):a(d)}function c(d){return d===59?(t.consume(d),r):pn(d)?(t.consume(d),c):a(d)}}function TN(t,l,a){return r;function r(s){return t.consume(s),u}function u(s){return un(s)?a(s):l(s)}}function fx(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||bt(t)}function dx(t){return!pn(t)}function hx(t){return!(t===47||zd(t))}function zd(t){return t===43||t===45||t===46||t===95||un(t)}function Nh(t){let l=t.length,a=!1;for(;l--;){const r=t[l][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){a=!0;break}if(r._gfmAutolinkLiteralWalkedInto){a=!1;break}}return t.length>0&&!a&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const kN={tokenize:ON,partial:!0};function CN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:DN,continuation:{tokenize:NN},exit:jN}},text:{91:{name:"gfmFootnoteCall",tokenize:RN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:AN,resolveTo:_N}}}}function AN(t,l,a){const r=this;let u=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c;for(;u--;){const p=r.events[u][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 a(p);const m=cl(r.sliceSerialize({start:c.end,end:r.now()}));return m.codePointAt(0)!==94||!s.includes(m.slice(1))?a(p):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),l(p))}}function _N(t,l){let a=t.length;for(;a--;)if(t[a][1].type==="labelImage"&&t[a][0]==="enter"){t[a][1];break}t[a+1][1].type="data",t[a+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[a+3][1].start),end:Object.assign({},t[t.length-1][1].end)},u={type:"gfmFootnoteCallMarker",start:Object.assign({},t[a+3][1].end),end:Object.assign({},t[a+3][1].end)};u.end.column++,u.end.offset++,u.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},u.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[a+1],t[a+2],["enter",r,l],t[a+3],t[a+4],["enter",u,l],["exit",u,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(a,t.length-a+1,...d),t}function RN(t,l,a){const r=this,u=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?a(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||bt(g))return a(g);if(g===93){t.exit("chunkString");const b=t.exit("gfmFootnoteCallString");return u.includes(cl(r.sliceSerialize(b)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),l):a(g)}return bt(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 DN(t,l,a){const r=this,u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,c=0,d;return p;function p(E){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(E){return E===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",y):a(E)}function y(E){if(c>999||E===93&&!d||E===null||E===91||bt(E))return a(E);if(E===93){t.exit("chunkString");const _=t.exit("gfmFootnoteDefinitionLabelString");return s=cl(r.sliceSerialize(_)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),b}return bt(E)||(d=!0),c++,t.consume(E),E===92?g:y}function g(E){return E===91||E===92||E===93?(t.consume(E),c++,y):y(E)}function b(E){return E===58?(t.enter("definitionMarker"),t.consume(E),t.exit("definitionMarker"),u.includes(s)||u.push(s),it(t,S,"gfmFootnoteDefinitionWhitespace")):a(E)}function S(E){return l(E)}}function NN(t,l,a){return t.check(vo,l,t.attempt(kN,l,a))}function jN(t){t.exit("gfmFootnoteDefinition")}function ON(t,l,a){const r=this;return it(t,u,"gfmFootnoteDefinitionIndent",5);function u(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):a(s)}}function MN(t){let a=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:u};return a==null&&(a=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function u(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]],S=d.parser.constructs.insideSpan.null;S&&Fn(b,b.length,0,gs(S,c.slice(m+1,p),d)),Fn(b,b.length,0,[["exit",g,d],["enter",c[p][1],d],["exit",c[p][1],d],["exit",y,d]]),Fn(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(E){return m===126&&y[y.length-1][1].type!=="characterEscape"?p(E):(c.enter("strikethroughSequenceTemporary"),S(E))}function S(E){const _=Vi(m);if(E===126)return g>1?p(E):(c.consume(E),g++,S);if(g<2&&!a)return p(E);const D=c.exit("strikethroughSequenceTemporary"),C=Vi(E);return D._open=!C||C===2&&!!_,D._close=!_||_===2&&!!C,d(E)}}}class zN{constructor(){this.map=[]}add(l,a,r){LN(this,l,a,r)}consume(l){if(this.map.sort(function(s,c){return s[0]-c[0]}),this.map.length===0)return;let a=this.map.length;const r=[];for(;a>0;)a-=1,r.push(l.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),l.length=this.map[a][0];r.push(l.slice()),l.length=0;let u=r.pop();for(;u;){for(const s of u)l.push(s);u=r.pop()}this.map.length=0}}function LN(t,l,a,r){let u=0;if(!(a===0&&r.length===0)){for(;u<t.map.length;){if(t.map[u][0]===l){t.map[u][1]+=a,t.map[u][2].push(...r);return}u+=1}t.map.push([l,a,r])}}function UN(t,l){let a=!1;const r=[];for(;l<t.length;){const u=t[l];if(a){if(u[0]==="enter")u[1].type==="tableContent"&&r.push(t[l+1][1].type==="tableDelimiterMarker"?"left":"none");else if(u[1].type==="tableContent"){if(t[l-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(u[1].type==="tableDelimiterRow")break}else u[0]==="enter"&&u[1].type==="tableDelimiterRow"&&(a=!0);l+=1}return r}function BN(){return{flow:{null:{name:"table",tokenize:HN,resolveAll:IN}}}}function HN(t,l,a){const r=this;let u=0,s=0,c;return d;function d(L){let G=r.events.length-1;for(;G>-1;){const ie=r.events[G][1].type;if(ie==="lineEnding"||ie==="linePrefix")G--;else break}const F=G>-1?r.events[G][1].type:null,H=F==="tableHead"||F==="tableRow"?q:p;return H===q&&r.parser.lazy[r.now().line]?a(L):H(L)}function p(L){return t.enter("tableHead"),t.enter("tableRow"),m(L)}function m(L){return L===124||(c=!0,s+=1),y(L)}function y(L){return L===null?a(L):Me(L)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),S):a(L):Ze(L)?it(t,y,"whitespace")(L):(s+=1,c&&(c=!1,u+=1),L===124?(t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),c=!0,y):(t.enter("data"),g(L)))}function g(L){return L===null||L===124||bt(L)?(t.exit("data"),y(L)):(t.consume(L),L===92?b:g)}function b(L){return L===92||L===124?(t.consume(L),g):g(L)}function S(L){return r.interrupt=!1,r.parser.lazy[r.now().line]?a(L):(t.enter("tableDelimiterRow"),c=!1,Ze(L)?it(t,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):E(L))}function E(L){return L===45||L===58?D(L):L===124?(c=!0,t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),_):V(L)}function _(L){return Ze(L)?it(t,D,"whitespace")(L):D(L)}function D(L){return L===58?(s+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(L),t.exit("tableDelimiterMarker"),C):L===45?(s+=1,C(L)):L===null||Me(L)?ee(L):V(L)}function C(L){return L===45?(t.enter("tableDelimiterFiller"),A(L)):V(L)}function A(L){return L===45?(t.consume(L),A):L===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(L),t.exit("tableDelimiterMarker"),j):(t.exit("tableDelimiterFiller"),j(L))}function j(L){return Ze(L)?it(t,ee,"whitespace")(L):ee(L)}function ee(L){return L===124?E(L):L===null||Me(L)?!c||u!==s?V(L):(t.exit("tableDelimiterRow"),t.exit("tableHead"),l(L)):V(L)}function V(L){return a(L)}function q(L){return t.enter("tableRow"),N(L)}function N(L){return L===124?(t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),N):L===null||Me(L)?(t.exit("tableRow"),l(L)):Ze(L)?it(t,N,"whitespace")(L):(t.enter("data"),le(L))}function le(L){return L===null||L===124||bt(L)?(t.exit("data"),N(L)):(t.consume(L),L===92?X:le)}function X(L){return L===92||L===124?(t.consume(L),le):le(L)}}function IN(t,l){let a=-1,r=!0,u=0,s=[0,0,0,0],c=[0,0,0,0],d=!1,p=0,m,y,g;const b=new zN;for(;++a<t.length;){const S=t[a],E=S[1];S[0]==="enter"?E.type==="tableHead"?(d=!1,p!==0&&(tb(b,l,p,m,y),y=void 0,p=0),m={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(a,0,[["enter",m,l]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,g=void 0,s=[0,0,0,0],c=[0,a+1,0,0],d&&(d=!1,y={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(a,0,[["enter",y,l]])),u=E.type==="tableDelimiterRow"?2:y?3:1):u&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,c[2]===0&&(s[1]!==0&&(c[0]=c[1],g=Iu(b,l,s,u,void 0,g),s=[0,0,0,0]),c[2]=a)):E.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(c[0]=c[1],g=Iu(b,l,s,u,void 0,g)),s=c,c=[s[1],a,0,0])):E.type==="tableHead"?(d=!0,p=a):E.type==="tableRow"||E.type==="tableDelimiterRow"?(p=a,s[1]!==0?(c[0]=c[1],g=Iu(b,l,s,u,a,g)):c[1]!==0&&(g=Iu(b,l,c,u,a,g)),u=0):u&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=a)}for(p!==0&&tb(b,l,p,m,y),b.consume(l.events),a=-1;++a<l.events.length;){const S=l.events[a];S[0]==="enter"&&S[1].type==="table"&&(S[1]._align=UN(l.events,a))}return t}function Iu(t,l,a,r,u,s){const c=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",d="tableContent";a[0]!==0&&(s.end=Object.assign({},qi(l.events,a[0])),t.add(a[0],0,[["exit",s,l]]));const p=qi(l.events,a[1]);if(s={type:c,start:Object.assign({},p),end:Object.assign({},p)},t.add(a[1],0,[["enter",s,l]]),a[2]!==0){const m=qi(l.events,a[2]),y=qi(l.events,a[3]),g={type:d,start:Object.assign({},m),end:Object.assign({},y)};if(t.add(a[2],0,[["enter",g,l]]),r!==2){const b=l.events[a[2]],S=l.events[a[3]];if(b[1].end=Object.assign({},S[1].end),b[1].type="chunkText",b[1].contentType="text",a[3]>a[2]+1){const E=a[2]+1,_=a[3]-a[2]-1;t.add(E,_,[])}}t.add(a[3]+1,0,[["exit",g,l]])}return u!==void 0&&(s.end=Object.assign({},qi(l.events,u)),t.add(u,0,[["exit",s,l]]),s=void 0),s}function tb(t,l,a,r,u){const s=[],c=qi(l.events,a);u&&(u.end=Object.assign({},c),s.push(["exit",u,l])),r.end=Object.assign({},c),s.push(["exit",r,l]),t.add(a+1,0,s)}function qi(t,l){const a=t[l],r=a[0]==="enter"?"start":"end";return a[1][r]}const qN={name:"tasklistCheck",tokenize:GN};function FN(){return{text:{91:qN}}}function GN(t,l,a){const r=this;return u;function u(p){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?a(p):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),s)}function s(p){return bt(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):a(p)}function c(p){return p===93?(t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),d):a(p)}function d(p){return Me(p)?l(p):Ze(p)?t.check({tokenize:YN},l,a)(p):a(p)}}function YN(t,l,a){return it(t,r,"whitespace");function r(u){return u===null?a(u):l(u)}}function PN(t){return T0([gN(),CN(),MN(t),BN(),FN()])}const VN={};function XN(t){const l=this,a=t||VN,r=l.data(),u=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),c=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);u.push(PN(a)),s.push(dN()),c.push(hN(a))}const Ld=new Set(["<",">","{","}","[","]"]),$N=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"]),mx=new Set(["+","-","*","/","%","=","!","&","|","^","~","!","?",":",".",",",";","'",'"',".","(",")","[","]","#","@","\\",...Ld]),QN={keywords:$N,onCommentStart:vx,onCommentEnd:aj},jh=["identifier","keyword","string","class","property","entity","jsxliterals","sign","comment","break","space"],[ud,KN,Ta,ZN,sd,JN,WN,Ql,nb,Ud,lb]=jh.map((t,l)=>l);function qu(t){return/^[^\S\r\n]+$/g.test(t)}function ej(t){return mx.has(t)}function tj(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function ls(t){return/^[\w_]+$/.test(t)||px(t)}function nj(t){const l=t[0];return ls(l)&&l===l.toUpperCase()||t==="null"}function px(t){return/[^\u0000-\u007f]/.test(t)}function gx(t){return/^[a-zA-Z]$/.test(t)}function yx(t){return gx(t)||px(t)}function Fu(t){return yx(t[0])&&(t.length===1||ls(t.slice(1)))}function Bd(t){return t==="`"}function Hd(t){return t==='"'||t==="'"}function lj(t){return Hd(t)||Bd(t)}function vx(t,l){const a=t+l;return a==="/*"?2:a==="//"?1:0}function aj(t,l){return t+l==="*/"?2:l===`
218
- `?1:0}function ij(t){return t[0]==="/"&&!vx(t[0],t[1])}function rj(t,l){const{keywords:a,onCommentStart:r,onCommentEnd:u}={...QN,...l};let s="",c=-1,d=[-1,""],p=[-2,""];const m=[];let y=!1,g=0,b=!1,S=0;const E=()=>y&&!b&&!g,_=()=>g&&!E(),D=()=>!g&&E()&&!b&&S>0;let C=null,A=!1,j=0,ee=0;const V=()=>C!==null,q=()=>A,N=()=>ee>j,le=()=>ee>0&&ee===j,X=()=>V()||N();function L(F){const H=F===`
219
- `;if(_()){if(V())return Ta;const[,J]=d;if(Fu(F)&&(J==="<"||J==="</"))return JN}if(D())return WN;if(V()||N())return Ta;if(a.has(F))return d[1]==="."?ud:KN;if(H)return Ud;if(qu(F))return lb;if(F.split("").every(ej))return Ql;if(nj(F))return _()?ud:ZN;if(Fu(F)){const J=d[1]==="."&&Fu(p[1]);if(!X()&&!J)return ud;if(J)return sd}return Ta}const G=(F,H)=>{if(H&&(s=H),s){c=F||L(s);const ie=[c,s];c!==lb&&c!==Ud&&(p=d,d=ie),m.push(ie)}s=""};for(let F=0;F<t.length;F++){const H=t[F],ie=t[F-1],J=t[F+1],B=ie+H,te=H+J;if(Hd(H)&&!D()&&!N()){G(),ie!=="\\"&&(C&&H===C?C=null:C||(C=H)),G(Ta,H);continue}if(!N()&&ie!=="\\n"&&Bd(H)){G(),G(Ta,H),ee++;continue}if(N()){if(ie!=="\\n"&&Bd(H)&&ee>0){G(),ee--,G(Ta,H);continue}if(te==="${"){j++,G(Ta),G(Ql,te),F++;continue}}if(le()&&H==="}"){G(),j--,G(Ql,H);continue}if(E()&&H==="{"){G(),G(Ql,H),b=!0;continue}if(y){if(!g&&H==="<"){G(),J==="/"?(g=2,s=te,F++):(g=1,s=H),G(Ql);continue}if(g){if(H===">"&&!"/=".includes(ie)){G(),g===1?(g=0,S++):(g=0,y=!1),G(Ql,H);continue}if(te==="/>"||te==="</"){s!=="<"&&s!=="/"&&G(),te==="/>"?g=0:S--,S||(y=!1),s=te,F++,G(Ql);continue}if(H==="<"){G(),s=H,G(Ql);continue}if(J==="-"&&!X()&&!D()&&s){G(sd,s+H+J),F++;continue}if(J==="="&&!X()&&!qu(H)){qu(s)&&G();const W=s+H;if(Fu(W)){G(sd,W);continue}}}}!g&&(H==="<"&&yx(J)||te==="</")&&(g=J==="/"?2:1,H==="<"&&(J==="/"||gx(J))&&!X()&&!D()&&!q()&&(y=!0));const ce=lj(H),pe=N(),R=!y&&ij(te),O=D();if(ce||pe||Hd(C))s+=H;else if(R){G();const[W,k]=d;if(R&&W!==-1&&!(W===Ql&&k!==")"||W===nb)){s=H,G();continue}A=!0;const de=F++,ye=()=>F>=t.length,Te=()=>ye()||t[F]===`
220
- `;let ze=!1;for(;!Te();F++)if(t[F]==="/"&&t[F-1]!=="\\"){for(ze=!0;de!==F&&/^[a-z]$/.test(t[F+1])&&!Te();)F++;break}A=!1,de!==F&&ze?(s=t.slice(de,F+1),G(Ta)):(s=H,G(),F=de)}else if(r(H,J)){G();const W=F,k=r(H,J);if(k)for(;F<t.length&&u(t[F-1],t[F])!=k;F++);s=t.slice(W,F+1),G(nb)}else H===" "||H===`
221
- `?H===" "&&(qu(s)||!s||O)?(s+=H,J==="<"&&G()):(G(),s=H,G()):b&&H==="}"?(G(),s=H,G(),b=!1):O&&!Ld.has(H)||N()||(ls(H)===ls(s[s.length-1])||E())&&!mx.has(H)?s+=H:(B==="</"&&(s=B),G(),B!=="</"&&(s=H),te==="</"||te==="/>"?(s=te,G(),F++):Ld.has(H)&&G())}return G(),m}function oj(t){const l=[],a=c=>({type:"element",tagName:"span",children:c,properties:{className:"sh__line"}});function r(c){const d=c.map(([p,m])=>{const y=jh[p];return{type:"element",tagName:"span",children:[{type:"text",value:m}],properties:{className:`sh__token--${y}`,style:{color:`var(--sh-${y})`}}}});l.push(a(d))}const u=[];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!==Ud){if(m.includes(`
222
- `)){const g=m.split(`
223
- `);for(let b=0;b<g.length;b++)u.push([p,g[b]]),b<g.length-1&&(r(u),u.length=0)}else u.push(d);s=!1}else s?r([]):(r(u),u.length=0),y&&r([]),s=!0}return u.length&&r(u),l}const uj=t=>{let l=`class="${t.className}"`;if(t.style){const a=Object.entries(t.style).map(([r,u])=>`${r}:${u}`).join(";");l+=` style="${a}"`}return l};function sj(t){return t.map(l=>{const{tagName:a}=l,r=l.children.map(u=>{const{tagName:s,children:c,properties:d}=u;return`<${s} ${uj(d)}>${tj(c[0].value)}</${s}>`}).join("");return`<${a} class="${l.properties.className}">${r}</${a}>`}).join(`
224
- `)}function bx(t,l){const a=rj(t,l),r=oj(a);return sj(r)}new Map(jh.map((t,l)=>[t,l]));function cj(t){return s0.sanitize(t,{ALLOWED_TAGS:["span"],ALLOWED_ATTR:["style","class"]})}function fj({className:t,children:l}){const a=String(l).replace(/\n$/,"");if(!t)return v.jsx("code",{children:l});const u=cj(bx(a));return v.jsx("code",{dangerouslySetInnerHTML:{__html:u}})}function Id({children:t,inline:l}){return v.jsx("div",{className:l?"markdown-inline":"markdown",children:v.jsx(M2,{remarkPlugins:[XN],components:{code:fj},children:t})})}const dj={plan:"[plan]",approve:"[approve]",task:"[task]",build:"[build]",fix:"[fix]",done:"[done]",error:"[error]",verbose:"[verbose]"};function Ra({value:t}){return t?v.jsx("span",{className:"duration",children:t}):null}function hj({entry:t,duration:l}){return v.jsxs("div",{className:"console-entry",children:[v.jsx("span",{className:`prefix ${t.level}`,children:dj[t.level]}),v.jsx("span",{children:t.message}),v.jsx(Ra,{value:l})]})}function mj({entry:t}){const l=t.sender??"you";return v.jsxs("div",{className:"console-entry user-message",children:[v.jsxs("span",{className:"prefix",style:{color:"var(--orange)"},children:["[",l,"]"]}),v.jsx("span",{children:t.message})]})}const pj=300;function gj({entry:t,duration:l}){const a=t.agent||"agent";return t.text.length<=pj?v.jsxs("div",{className:"console-entry",children:[v.jsxs("span",{className:"prefix task",children:["[",a,"]"]}),v.jsx("span",{children:v.jsx(Id,{inline:!0,children:t.text})}),v.jsx(Ra,{value:l})]}):v.jsxs("details",{className:"tool-inline",children:[v.jsxs("summary",{children:[v.jsx("span",{className:"tool-inline-name",children:a}),v.jsxs("span",{className:"tool-inline-summary",children:[t.text.slice(0,120),"..."]}),v.jsx(Ra,{value:l})]}),v.jsx("div",{className:"tool-inline-body",children:v.jsx(Id,{children:t.text})})]})}function yj(t){const{tool_name:l,tool_input:a}=t;if(l==="Glob"){const r=a.pattern||"*",u=a.path;return u?`${r} in ${u}`:r}if(l==="Grep"){const u=[a.pattern||""];return a.path&&u.push(`in ${a.path}`),a.glob&&u.push(`(${a.glob})`),u.join(" ")}if(l==="Read"){const u=[a.file_path||"unknown file"];return a.offset&&u.push(`offset:${a.offset}`),a.limit&&u.push(`limit:${a.limit}`),u.join(" ")}return l==="Write"||l==="Edit"?a.file_path||"unknown file":l==="Bash"?(a.command||"").slice(0,80):l.includes("playbook")?a.name||"read":l.includes("build")?"pnpm build + check":l}function vj(t){return Object.entries(t).map(([a,r])=>{const u=typeof r=="string"?r:JSON.stringify(r,null,2);return u.length>500?`${a}: ${u.slice(0,500)}... (${u.length} chars)`:`${a}: ${u}`}).join(`
225
- `)}function cd({text:t,maxLen:l}){const a=t.length>l,r=a?t.slice(0,l):t,s=s0.sanitize(bx(r),{ALLOWED_TAGS:["span"],ALLOWED_ATTR:["style","class"]})+(a?`
226
- ... (truncated)`:"");return v.jsx("pre",{dangerouslySetInnerHTML:{__html:s}})}function bj(t){return t.tool_name!=="Write"?!1:(t.tool_input.file_path||"").endsWith(".md")}function qd({entry:t,duration:l}){const a=t.tool_response===null,r=t.tool_name==="Bash"||t.tool_name==="bash",u=r&&t.tool_input.command||"";if(r)return v.jsxs("details",{className:"tool-inline",children:[v.jsxs("summary",{children:[t.agent&&v.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),v.jsx("span",{className:"tool-inline-name",children:"$"}),v.jsx("span",{className:"tool-inline-command",children:u}),a?v.jsx("span",{className:"spinner-inline"}):v.jsx(Ra,{value:l})]}),v.jsx("div",{className:"tool-inline-body",children:t.tool_response!==null&&v.jsx(cd,{text:t.tool_response,maxLen:5e3})})]});if(bj(t)){const s=t.tool_input.content||"",c=t.tool_input.file_path||"unknown file";return v.jsxs("details",{className:"tool-inline",open:!0,children:[v.jsxs("summary",{children:[t.agent&&v.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),v.jsx("span",{className:"tool-inline-name",children:t.tool_name}),v.jsx("span",{className:"tool-inline-summary",children:c}),a?v.jsx("span",{className:"spinner-inline"}):v.jsx(Ra,{value:l})]}),v.jsx("div",{className:"tool-inline-body",children:v.jsx(Id,{children:s})})]})}return v.jsxs("details",{className:"tool-inline",children:[v.jsxs("summary",{children:[t.agent&&v.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),v.jsx("span",{className:"tool-inline-name",children:t.tool_name}),v.jsx("span",{className:"tool-inline-summary",children:yj(t)}),a?v.jsx("span",{className:"spinner-inline"}):v.jsx(Ra,{value:l})]}),v.jsxs("div",{className:"tool-inline-body",children:[v.jsx("div",{className:"section-label",children:"Input"}),v.jsx(cd,{text:vj(t.tool_input),maxLen:5e3}),t.tool_response!==null&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"section-label",children:"Output"}),v.jsx(cd,{text:t.tool_response,maxLen:5e3})]})]})]})}function xj(t){let l=0,a=!1;for(const{duration:c}of t)if(c)if(a=!0,c.endsWith("ms"))l+=Number.parseInt(c,10);else if(c.includes("m ")){const[d,p]=c.split("m ");l+=Number.parseInt(d,10)*6e4+Number.parseFloat(p)*1e3}else c.endsWith("s")&&(l+=Number.parseFloat(c)*1e3);if(!a)return null;if(l<1e3)return`${l}ms`;const r=l/1e3;if(r<60)return`${r.toFixed(0)}s`;const u=Math.floor(r/60),s=r%60;return`${u}m ${s.toFixed(0)}s`}function Sj(t){const l=t.filter(r=>r.entry.kind==="tool_use").length;return t.filter(r=>r.entry.kind==="tool_use").every(r=>r.entry.tool_response!==null)?`${l} action${l!==1?"s":""}`:`${l} action${l!==1?"s":""}...`}function Ej({items:t}){const[l,a]=T.useState(!1),r=t.filter(d=>d.entry.kind==="tool_use"),u=r.every(d=>d.entry.tool_response!==null),s=r.length>0?r[r.length-1]:t[t.length-1],c=xj(t);return v.jsxs("div",{className:"tool-group",children:[v.jsxs("div",{className:"tool-group-header",onClick:()=>a(d=>!d),children:[!u&&v.jsx("span",{className:"spinner-inline"}),v.jsx("span",{className:"tool-group-label",children:Sj(t)}),v.jsx("span",{className:"tool-group-chevron",children:l?"▼":"▶"}),u&&v.jsx(Ra,{value:c})]}),l&&v.jsx("div",{className:"tool-group-items",children:t.map(({entry:d,index:p,duration:m})=>d.kind==="tool_use"?v.jsx(qd,{entry:d,duration:m},d.tool_use_id||`gi-${p}`):null)}),!l&&s&&v.jsx("div",{className:"tool-group-tail",children:s.entry.kind==="tool_use"?v.jsx(qd,{entry:s.entry,duration:s.duration}):null})]})}function wj({sessionId:t,event:l,onResolved:a,resolved:r,resolvedDetails:u}){const s=l.runtime==="docker",[c,d]=T.useState(s?"local":"claim"),[p,m]=T.useState(""),[y,g]=T.useState("https://api.electric-sql.cloud"),[b,S]=T.useState(""),[E,_]=T.useState(""),[D,C]=T.useState(""),[A,j]=T.useState(""),[ee,V]=T.useState(!1),[q,N]=T.useState(!1),[le,X]=T.useState(!1),[L,G]=T.useState(null),F=l.ghAccounts.length>0,[H,ie]=T.useState(l.ghAccounts[0]?.login??""),[J,B]=T.useState(l.projectName),[te,ce]=T.useState("private"),[pe,R]=T.useState(!1);async function O(){N(!0),G(null);try{const be=await MT();m(be.databaseUrl),g(be.electricUrl),S(be.sourceId),_(be.secret),C(be.claimId),j(be.claimUrl),X(!0)}catch(be){G(be instanceof Error?be.message:"Provisioning failed")}finally{N(!1)}}async function W(){V(!0);const be=[];try{const Oe={};c==="claim"?(Oe.mode="claim",Oe.databaseUrl=p,Oe.electricUrl=y,Oe.sourceId=b,Oe.secret=E,Oe.claimId=D,be.push(`Database: ${p}`),be.push(`Source ID: ${b}`),A&&be.push(`Claim: ${A}`)):c==="cloud"?(Oe.mode="cloud",Oe.databaseUrl=p,Oe.electricUrl=y,Oe.sourceId=b,Oe.secret=E,be.push(`Database: ${p}`),be.push(`Source ID: ${b}`)):(Oe.mode="local",be.push("Local Docker")),pe&&H&&J.trim()&&(Oe.repoAccount=H,Oe.repoName=J,Oe.repoVisibility=te,be.push(`${H}/${J} (${te})`)),Oe._summary=be.join(`
227
- `),await xd(t,"infra_config",Oe),a(be.join(`
228
- `))}catch{V(!1)}}const k=ee||!!r,de=p.trim()&&b.trim()&&E.trim(),ye=le&&p.trim()&&b.trim()&&E.trim(),Te=!pe||H&&J.trim(),ze={claim:"Provisioned (Cloud)",local:"Local (Docker)",cloud:"Electric Cloud (BYO)"};if(r){const be=u??{};return u||(be.Infrastructure=ze[c],(c==="cloud"||c==="claim")&&(p&&(be["Connection string"]=p),b&&(be["Source ID"]=b)),c==="claim"&&A&&(be["Claim link"]=A),pe&&H&&J.trim()&&(be.Repository=`${H}/${J}`,be.Visibility=te)),v.jsx("div",{className:"gate-prompt",children:v.jsx("div",{className:"gate-config-summary",children:Object.entries(be).map(([Oe,At])=>v.jsxs("div",{children:[v.jsxs("strong",{children:[Oe,":"]})," ",At.startsWith("http")?v.jsx("a",{href:At,target:"_blank",rel:"noopener noreferrer",children:At}):At]},Oe))})})}return v.jsxs("div",{className:"gate-prompt",children:[v.jsxs("h3",{children:["Setup ",l.projectName]}),v.jsx("p",{className:"gate-summary",children:"Infrastructure"}),v.jsxs("div",{className:"gate-option-group",children:[v.jsxs("button",{type:"button",className:`gate-option ${c==="claim"?"active":""}`,onClick:()=>d("claim"),disabled:ee,children:[v.jsx("span",{className:"gate-option-title",children:"Provision"}),v.jsx("span",{className:"gate-option-desc",children:"Auto-provision database & Electric Cloud (72h)"})]}),s&&v.jsxs("button",{type:"button",className:`gate-option ${c==="local"?"active":""}`,onClick:()=>d("local"),disabled:ee,children:[v.jsx("span",{className:"gate-option-title",children:"Local"}),v.jsx("span",{className:"gate-option-desc",children:"Run with Docker Compose on your machine"})]}),v.jsxs("button",{type:"button",className:`gate-option ${c==="cloud"?"active":""}`,onClick:()=>d("cloud"),disabled:ee,children:[v.jsx("span",{className:"gate-option-title",children:"Bring your own"}),v.jsx("span",{className:"gate-option-desc",children:"Provide your own database & Electric details"})]})]}),c==="claim"&&v.jsx("div",{className:"question",children:le?v.jsxs("div",{style:{fontSize:"0.85em"},children:[v.jsx("p",{style:{color:"var(--color-done, #4c4)",margin:"0 0 6px"},children:"Resources provisioned successfully (72h TTL)."}),v.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:[v.jsxs("div",{children:[v.jsx("strong",{children:"Database URL:"})," ",p]}),v.jsxs("div",{children:[v.jsx("strong",{children:"Source ID:"})," ",b]}),v.jsxs("div",{children:[v.jsx("strong",{children:"Electric URL:"})," ",y]})]}),A&&v.jsxs("p",{style:{margin:"8px 0 0"},children:["Claim into your account:"," ",v.jsx("a",{href:A,target:"_blank",rel:"noopener noreferrer",style:{wordBreak:"break-all"},children:A})]})]}):v.jsxs(v.Fragment,{children:[v.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."}),v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:O,disabled:q||k,style:{marginBottom:8},children:q?"Provisioning...":"Provision Resources"}),q&&v.jsx("p",{style:{fontSize:"0.85em",opacity:.7},children:"This may take 30-60 seconds..."}),L&&v.jsx("p",{style:{color:"var(--color-error, #e55)",fontSize:"0.85em"},children:L})]})}),c==="cloud"&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Database URL"}),v.jsx("input",{type:"text",value:p,onChange:be=>m(be.target.value),disabled:k,placeholder:"postgresql://user:pass@host:5432/dbname"})]}),v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Electric URL"}),v.jsx("input",{type:"text",value:y,onChange:be=>g(be.target.value),disabled:k,placeholder:"https://api.electric-sql.cloud"})]}),v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Source ID"}),v.jsx("input",{type:"text",value:b,onChange:be=>S(be.target.value),disabled:k,placeholder:"Your Electric Cloud source ID"})]}),v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Secret"}),v.jsx("input",{type:"password",value:E,onChange:be=>_(be.target.value),disabled:k,placeholder:"Your Electric Cloud secret"})]})]}),F&&v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"gate-summary",style:{marginTop:16},children:"GitHub Repository"}),v.jsx("div",{className:"gate-option-group",children:v.jsx("button",{type:"button",className:`gate-option ${pe?"active":""}`,onClick:()=>R(!pe),disabled:k,children:v.jsx("span",{className:"gate-option-title",children:"Create a GitHub repo for this project"})})}),pe&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Account"}),l.ghAccounts.length>1?v.jsx("select",{value:H,onChange:be=>ie(be.target.value),disabled:k,children:l.ghAccounts.map(be=>v.jsxs("option",{value:be.login,children:[be.login," ",be.type==="org"?"(org)":"(personal)"]},be.login))}):v.jsx("input",{type:"text",value:l.ghAccounts[0].login,disabled:!0})]}),v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Repository name"}),v.jsx("input",{type:"text",value:J,onChange:be=>B(be.target.value),disabled:k,placeholder:"my-app"})]}),v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Visibility"}),v.jsxs("div",{className:"gate-option-group",children:[v.jsx("button",{type:"button",className:`gate-option ${te==="private"?"active":""}`,onClick:()=>ce("private"),disabled:k,children:v.jsx("span",{className:"gate-option-title",children:"Private"})}),v.jsx("button",{type:"button",className:`gate-option ${te==="public"?"active":""}`,onClick:()=>ce("public"),disabled:k,children:v.jsx("span",{className:"gate-option-title",children:"Public"})})]})]})]})]}),v.jsx("div",{className:"gate-actions",children:v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:W,disabled:k||c==="cloud"&&!de||c==="claim"&&!ye||!Te,children:ee?"Configuring...":"Start"})})]})}function Tj({sessionId:t,event:l,onResolved:a,resolved:r,resolvedSummary:u}){const s=Array.isArray(l.questions)&&l.questions.length?l.questions:[{question:l.question,options:l.options}],c=s.length>1,d=s.some(X=>X.multiSelect),p=c||d,[m,y]=T.useState({}),[g,b]=T.useState({}),[S,E]=T.useState({}),[_,D]=T.useState({}),[C,A]=T.useState(!1),j=C||!!r;function ee(){const X={};for(const L of s)if(L.multiSelect){const G=g[L.question],F=_[L.question]?.trim(),H=G?[...G]:[];F&&H.push(F),X[L.question]=H.join(", ")}else X[L.question]=m[L.question]||_[L.question]?.trim()||"";return X}function V(X){const L=Object.entries(X).filter(([,G])=>G);return L.length===1?L[0][1].slice(0,80):L.map(([,G])=>G.slice(0,40)).join("; ").slice(0,120)}async function q(X,L){y(F=>({...F,[X]:L})),A(!0);const G={[X]:L};try{await xd(t,"ask_user_question",{toolUseId:l.tool_use_id,answers:G,_summary:L}),a(L)}catch{y(F=>({...F,[X]:""})),A(!1)}}async function N(){const X=ee(),L=V(X);A(!0);try{await xd(t,"ask_user_question",{toolUseId:l.tool_use_id,answers:X,_summary:L}),a(L)}catch{A(!1)}}function le(X,L){b(G=>{const F=new Set(G[X]??[]);return F.has(L)?F.delete(L):F.add(L),{...G,[X]:F}})}if(r){const X=u||"";return v.jsxs("div",{className:"gate-prompt",children:[v.jsx("h3",{children:"Question"}),s.map(L=>v.jsxs("div",{className:"gate-question-section",children:[L.header&&v.jsx("span",{className:"gate-question-header",children:L.header}),v.jsx("p",{className:"gate-summary",children:L.question})]},L.question)),v.jsx("div",{className:"gate-answer-summary",children:X})]})}return v.jsxs("div",{className:"gate-prompt",children:[v.jsx("h3",{children:"Question"}),s.map(X=>{const L=X.options&&X.options.length>0,G=S[X.question];return v.jsxs("div",{className:"gate-question-section",children:[X.header&&v.jsx("span",{className:"gate-question-header",children:X.header}),v.jsx("p",{className:"gate-summary",children:X.question}),L&&X.multiSelect&&v.jsxs("div",{className:"gate-option-group-vert",children:[X.options?.map(F=>{const H=g[X.question]?.has(F.label)??!1;return v.jsxs("button",{type:"button",className:`gate-option gate-option-checkbox ${H?"checked":""}`,onClick:()=>le(X.question,F.label),disabled:j,children:[v.jsx("span",{className:"gate-checkbox-indicator",children:H?"☑":"☐"}),v.jsx("span",{className:"gate-option-title",children:F.label}),F.description&&v.jsx("span",{className:"gate-option-desc",children:F.description})]},F.label)}),!G&&v.jsx("button",{type:"button",className:"gate-option gate-option-other",onClick:()=>E(F=>({...F,[X.question]:!0})),disabled:j,children:v.jsx("span",{className:"gate-option-title",children:"Other..."})}),G&&v.jsx("div",{className:"question",children:v.jsx("input",{type:"text",value:_[X.question]||"",onChange:F=>D(H=>({...H,[X.question]:F.target.value})),disabled:j,placeholder:"Type your answer..."})})]}),L&&!X.multiSelect&&v.jsxs("div",{className:"gate-option-group-vert",children:[X.options?.map(F=>{const H=m[X.question]===F.label;return v.jsxs("button",{type:"button",className:`gate-option ${H?"selected":""}`,onClick:()=>p?y(ie=>({...ie,[X.question]:F.label})):q(X.question,F.label),disabled:j,children:[v.jsx("span",{className:"gate-option-title",children:F.label}),F.description&&v.jsx("span",{className:"gate-option-desc",children:F.description})]},F.label)}),!G&&v.jsx("button",{type:"button",className:"gate-option gate-option-other",onClick:()=>E(F=>({...F,[X.question]:!0})),disabled:j,children:v.jsx("span",{className:"gate-option-title",children:"Other..."})}),G&&v.jsx("div",{className:"question",children:v.jsx("input",{type:"text",value:_[X.question]||"",onChange:F=>{const H=F.target.value;D(ie=>({...ie,[X.question]:H})),y(ie=>({...ie,[X.question]:""}))},disabled:j,placeholder:"Type your answer..."})})]}),!L&&v.jsx("div",{className:"question",children:v.jsx("textarea",{value:_[X.question]||"",onChange:F=>D(H=>({...H,[X.question]:F.target.value})),disabled:j,rows:3,placeholder:"Type your answer..."})})]},X.question)}),p&&v.jsx("div",{className:"gate-actions",children:v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:N,disabled:j,children:C?"Submitting...":"Submit"})}),!p&&!s[0]?.options?.length&&v.jsx("div",{className:"gate-actions",children:v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:N,disabled:j||!_[s[0]?.question]?.trim(),children:C?"Submitting...":"Submit"})}),!p&&s[0]?.options?.length&&S[s[0]?.question]&&v.jsx("div",{className:"gate-actions",children:v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:N,disabled:j||!_[s[0]?.question]?.trim(),children:C?"Submitting...":"Submit"})})]})}function kj(t){switch(t){case"infra_config_prompt":return"Project configured";case"ask_user_question":return"Question answered";default:return"Decision made"}}function Cj({sessionId:t,entry:l,entryIndex:a,onResolved:r,duration:u}){const s=m=>r(a,m),{resolved:c,resolvedSummary:d}=l;let p=null;switch(l.event.type){case"infra_config_prompt":p=v.jsx(wj,{sessionId:t,event:l.event,onResolved:s,resolved:c,resolvedDetails:l.resolvedDetails});break;case"ask_user_question":p=v.jsx(Tj,{sessionId:t,event:l.event,onResolved:s,resolved:c,resolvedSummary:d});break;default:return null}return c?v.jsxs("div",{className:"gate-answered",children:[v.jsxs("div",{className:"gate-answered-header",children:[v.jsx("span",{className:"prefix done",children:"[gate]"}),v.jsx("span",{className:"gate-resolved-label",children:kj(l.event.type)}),v.jsx(Ra,{value:u})]}),p]}):p}const ab={pending:"○",in_progress:"◉",completed:"✓"};function Aj(t){switch(t){case"completed":return"todo-status-done";case"in_progress":return"todo-status-progress";default:return"todo-status-pending"}}function _j({entry:t}){const{todos:l}=t,a=l.filter(c=>c.status==="completed").length,r=l.filter(c=>c.status==="in_progress").length,u=l.length,s=[];return a>0&&s.push(`${a}/${u} done`),r>0&&s.push(`${r} in progress`),s.length===0&&s.push(`${u} pending`),v.jsxs("details",{className:"tool-inline",open:!0,children:[v.jsxs("summary",{children:[v.jsx("span",{className:"tool-inline-name",children:"TodoWrite"}),v.jsx("span",{className:"tool-inline-summary",children:s.join(", ")})]}),v.jsx("div",{className:"tool-inline-body",children:v.jsx("ul",{className:"todo-list",children:l.map(c=>v.jsxs("li",{className:"todo-item",children:[v.jsx("span",{className:`todo-status-icon ${Aj(c.status)}`,children:ab[c.status]||ab.pending}),v.jsx("span",{className:"todo-content",children:c.content}),c.priority&&v.jsx("span",{className:"todo-priority",children:c.priority})]},c.id))})})]})}const Rj=3;function ib(t){return t.kind==="tool_use"}function Dj(t,l){const a=[];let r=0;for(;r<t.length;){const u=t[r];if(ib(u)){const s=[];for(;r<t.length&&ib(t[r]);)s.push({entry:t[r],index:r,duration:l[r]}),r++;if(s.length>=Rj)a.push({type:"group",items:s});else for(const c of s)a.push({type:"single",...c});continue}a.push({type:"single",entry:u,index:r,duration:l[r]}),r++}return a}function Nj(t){if(t.kind!=="user_prompt")return t.ts}function xx(t){if(t<1e3)return`${t}ms`;const l=t/1e3;if(l<60)return`${l.toFixed(0)}s`;const a=Math.floor(l/60),r=l%60;return`${a}m ${r.toFixed(0)}s`}function jj({sinceTs:t}){const[l,a]=T.useState("");return T.useEffect(()=>{const r=new Date(t).getTime(),u=()=>{const c=Date.now()-r;a(xx(Math.max(0,c)))};u();const s=setInterval(u,1e3);return()=>clearInterval(s)},[t]),v.jsxs("div",{className:"console-entry waiting-indicator",children:[v.jsx("span",{className:"spinner-inline"}),v.jsx("span",{className:"waiting-label",children:"Waiting for response..."}),v.jsx("span",{className:"duration",children:l})]})}function Oj({sessionId:t,entries:l,isLive:a,isComplete:r,onGateResolved:u}){const s=T.useRef(null),c=T.useRef(null),[d,p]=T.useState(!0),m=l.length,y=T.useCallback(()=>{c.current?.scrollIntoView({behavior:"smooth"})},[]),g=T.useCallback(()=>{const C=s.current;if(!C)return;const j=C.scrollHeight-C.scrollTop-C.clientHeight<80;p(j)},[]);T.useEffect(()=>{d&&c.current?.scrollIntoView({behavior:"smooth"})},[m,d]);const b=[];let S=null;for(const C of l){const A=Nj(C);if(C.kind==="user_prompt"||!A)b.push(null);else if(S){const j=new Date(A).getTime()-new Date(S).getTime();b.push(j>=0?xx(j):null)}else b.push(null);A&&(S=A)}const E=T.useMemo(()=>Dj(l,b),[l,b]);let _=!1,D="";if(a&&!r&&l.length>0){const C=l[l.length-1],A=C.kind==="tool_use"&&C.tool_response===null,j=C.kind==="gate"&&!C.resolved,ee=C.kind==="assistant_message";!A&&!j&&!ee&&(_=!0,D=S||new Date().toISOString())}return v.jsxs("div",{className:"console",ref:s,onScroll:g,children:[E.map(C=>{if(C.type==="group")return v.jsx(Ej,{items:C.items},`group-${C.items[0].index}`);const{entry:A,index:j,duration:ee}=C;switch(A.kind){case"log":return v.jsx(hj,{entry:A,duration:ee},`log-${j}`);case"user_prompt":return v.jsx(mj,{entry:A},`user-${j}`);case"tool_use":return v.jsx(qd,{entry:A,duration:ee},A.tool_use_id||`tool-${j}`);case"assistant_message":return v.jsx(gj,{entry:A,duration:ee},`text-${j}`);case"todo_widget":return v.jsx(_j,{entry:A},`todo-${j}`);case"gate":return v.jsx(Cj,{sessionId:t,entry:A,entryIndex:j,onResolved:u,duration:ee},`gate-${j}`);default:return null}}),_&&v.jsx(jj,{sinceTs:D}),v.jsx("div",{ref:c}),!d&&v.jsx("button",{type:"button",className:"jump-to-bottom",onClick:y,children:"Jump to latest"})]})}function fd({variant:t="line",width:l}){const a=t==="block"?"skeleton skeleton-block":"skeleton skeleton-line";return v.jsx("div",{className:a,style:l?{width:l}:void 0})}function Mj(t){const[l,a]=T.useState([]),[r,u]=T.useState(!1),[s,c]=T.useState(!1),[d,p]=T.useState(null),[m,y]=T.useState({totalCostUsd:0,totalTurns:0,totalDurationMs:0}),g=T.useRef("-1"),b=T.useCallback(E=>{a(_=>{switch(E.type){case"log":return[..._,{kind:"log",level:E.level,message:E.message,ts:E.ts}];case"user_prompt":return[..._,{kind:"user_prompt",message:E.message,sender:E.sender}];case"pre_tool_use":return[..._,{kind:"tool_use",tool_name:E.tool_name,tool_use_id:E.tool_use_id,tool_input:E.tool_input,tool_response:null,agent:E.agent,ts:E.ts}];case"post_tool_use":{const D=[..._];for(let C=D.length-1;C>=0;C--){const A=D[C];if(A.kind==="tool_use"&&A.tool_use_id===E.tool_use_id){D[C]={...A,tool_response:E.tool_response,agent:A.agent||E.agent};break}}return D}case"post_tool_use_failure":{const D=[..._];for(let C=D.length-1;C>=0;C--){const A=D[C];if(A.kind==="tool_use"&&A.tool_use_id===E.tool_use_id){D[C]={...A,tool_response:`Error: ${E.error}`,agent:A.agent||E.agent};break}}return D}case"assistant_message":return[..._,{kind:"assistant_message",text:E.text,agent:E.agent,ts:E.ts}];case"todo_write":{const D=_.findIndex(A=>A.kind==="todo_widget"),C={kind:"todo_widget",tool_use_id:E.tool_use_id,todos:E.todos,ts:E.ts};if(D>=0){const A=[..._];return A[D]=C,A}return[..._,C]}case"ask_user_question":case"infra_config_prompt":return[..._,{kind:"gate",event:E,resolved:!1,ts:E.ts}];case"gate_resolved":{const D=[..._];let C=!1;for(let A=D.length-1;A>=0;A--){const j=D[A];if(j.kind==="gate"&&!j.resolved){D[A]={...j,resolved:!0,resolvedSummary:E.summary||j.resolvedSummary,resolvedDetails:E.details},C=!0;break}}if(!C&&E.details)for(let A=D.length-1;A>=0;A--){const j=D[A];if(j.kind==="gate"&&j.resolved&&!j.resolvedDetails){D[A]={...j,resolvedDetails:E.details};break}}return D}case"budget_exceeded":{const D=E;return[..._,{kind:"log",level:"error",message:`Session budget exceeded ($${D.spent_usd.toFixed(2)} / $${D.budget_usd.toFixed(2)} limit)`,ts:E.ts}]}case"session_end":case"session_start":case"app_status":return _;default:return _}}),E.type==="app_status"&&p({status:E.status,port:E.port,previewUrl:E.previewUrl}),E.type==="session_end"&&(c(!0),(E.cost_usd!=null||E.num_turns!=null||E.duration_ms!=null)&&y(_=>({totalCostUsd:_.totalCostUsd+(E.cost_usd??0),totalTurns:_.totalTurns+(E.num_turns??0),totalDurationMs:_.totalDurationMs+(E.duration_ms??0)}))),E.type==="budget_exceeded"&&c(!0)},[]);T.useEffect(()=>{if(!t)return;a([]),u(!1),c(!1),p(null),y({totalCostUsd:0,totalTurns:0,totalDurationMs:0}),g.current="-1";let E=!1,_=null,D=0;const C=10;function A(){if(E)return;if(D>=C){console.warn(`[sse] Giving up on session ${t} after ${C} retries`),u(!1);return}const j=ch(t),ee=new URLSearchParams;j&&ee.set("token",j),g.current!=="-1"&&ee.set("offset",g.current);const V=ee.toString(),q=`/api/sessions/${t}/events${V?`?${V}`:""}`;_=new EventSource(q),_.onopen=()=>{E||(D=0,u(!0))},_.onmessage=N=>{if(!E){N.lastEventId&&(g.current=N.lastEventId);try{const le=JSON.parse(N.data);b(le)}catch{}}},_.onerror=()=>{if(E)return;_?.close(),D++;const N=Math.min(1e3*2**(D-1),3e4);setTimeout(A,N)}}return A(),()=>{E=!0,_&&(_.close(),_=null)}},[t,b]);const S=T.useCallback((E,_)=>{a(D=>{const C=[...D],A=C[E];return A?.kind==="gate"&&(C[E]={...A,resolved:!0,resolvedSummary:_}),C})},[]);return{entries:l,isLive:r,isComplete:s,appStatus:d,cost:m,markGateResolved:S}}function zj(t){const l=[];for(const a of t)switch(a.kind){case"user_prompt":l.push(`## User
229
-
230
- ${a.message}
231
- `);break;case"assistant_message":l.push(`## Assistant
232
-
233
- ${a.text}
234
- `);break;case"log":l.push(`[${a.level}] ${a.message}`);break;case"tool_use":{l.push(`### Tool: ${a.tool_name}`),l.push("**Input:**"),l.push("```json"),l.push(JSON.stringify(a.tool_input,null,2)),l.push("```"),a.tool_response!=null&&(l.push("**Output:**"),l.push("```"),l.push(a.tool_response),l.push("```")),l.push("");break}}return l.join(`
235
- `)}function Lj(){const{id:t}=Ob(),l=al(),a=Al(),{openMobileDrawer:r}=Jd(),{showSettings:u,setShowSettings:s,authSource:c,hasGhToken:d,refreshSettings:p,refreshSessions:m,devMode:y}=go(),[g,b]=T.useState(!1);T.useEffect(()=>{if(!g)return;const pe=()=>b(!1);return document.addEventListener("click",pe),()=>document.removeEventListener("click",pe)},[g]);const[S,E]=T.useState(t==="new"),[_,D]=T.useState(t==="new"?null:t??null),C=T.useRef(!1);T.useEffect(()=>{t&&t!=="new"&&(D(t),E(!1),C.current=!1)},[t]),T.useEffect(()=>{if(t!=="new"||C.current)return;const pe=l.state;if(!pe?.description){a("/",{replace:!0});return}C.current=!0,E(!0),DT(pe.description,void 0,pe.freeform).then(({sessionId:R,session:O})=>{ss(O),m(),D(R),E(!1),a(`/session/${R}`,{replace:!0})}).catch(R=>{console.error("Failed to create session:",R),a("/",{replace:!0})})},[t,l.state,a,m]);const A=_,{entries:j,isLive:ee,isComplete:V,appStatus:q,cost:N,markGateResolved:le}=Mj(A),[X,L]=T.useState(()=>A?tv(A)??null:null);T.useEffect(()=>{if(A){const pe=tv(A);L(pe??null)}},[A]),T.useEffect(()=>{A&&V&&(bd(A,{status:"complete"}),m())},[A,V,m]);const G=q?.port,F=q?.previewUrl,[H,ie]=T.useState(null),J=T.useCallback(async pe=>{if(A){ie(null);try{await NT(A,pe)}catch(R){const O=R instanceof Error?R.message:"Failed to send message";ie(O)}}},[A]),B=T.useCallback(async()=>{if(A)try{await jT(A),bd(A,{status:"complete"}),L(pe=>pe?{...pe,status:"complete"}:null),m()}catch(pe){console.error("Failed to interrupt:",pe)}},[A,m]),te=T.useCallback(()=>{const pe=zj(j);navigator.clipboard.writeText(pe)},[j]);if(!t)return null;const ce=X?.status==="running"&&!V;return v.jsxs(v.Fragment,{children:[u&&v.jsx(a0,{authSource:c,hasGhToken:d??!1,onKeySaved:p,onClose:()=>s(!1),onCopyLog:A?te:void 0,devMode:y}),v.jsxs("div",{className:"session-header",children:[v.jsx("button",{type:"button",className:"mobile-hamburger",onClick:r,"aria-label":"Open menu",children:v.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[v.jsx("title",{children:"Menu"}),v.jsx("line",{x1:"3",y1:"4.5",x2:"15",y2:"4.5"}),v.jsx("line",{x1:"3",y1:"9",x2:"15",y2:"9"}),v.jsx("line",{x1:"3",y1:"13.5",x2:"15",y2:"13.5"})]})}),v.jsx("span",{className:"session-header-name",children:S?"Initializing...":X?.projectName??"Loading..."}),ce&&v.jsx("span",{className:"session-header-status",style:{color:"var(--green)"},children:"Live"}),!S&&!ee&&!V&&v.jsx("span",{className:"session-header-status",style:{color:"var(--yellow)"},children:"Connecting..."}),N.totalCostUsd>0&&v.jsxs("span",{className:"session-header-cost",title:`${N.totalTurns} turns`,children:["$",N.totalCostUsd.toFixed(2)]}),q&&(F||G)&&v.jsx("a",{href:F??`http://localhost:${G}`,target:"_blank",rel:"noopener noreferrer",className:`mobile-open-app-icon ${q.status==="running"?"primary":""}`,"aria-label":"Open App",children:v.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("title",{children:"Open App"}),v.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),v.jsx("polyline",{points:"15 3 21 3 21 9"}),v.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}),v.jsx("span",{className:"session-header-actions-group",children:q&&v.jsx("a",{href:F??(G?`http://localhost:${G}`:"#"),target:"_blank",rel:"noopener noreferrer",className:`session-header-action ${q.status==="running"?"primary":""}`,children:"Open App"})}),v.jsx("button",{type:"button",className:"session-header-overflow",onClick:pe=>{pe.stopPropagation(),b(R=>!R)},"aria-label":"More options",children:v.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[v.jsx("title",{children:"More"}),v.jsx("circle",{cx:"8",cy:"3",r:"1.5"}),v.jsx("circle",{cx:"8",cy:"8",r:"1.5"}),v.jsx("circle",{cx:"8",cy:"13",r:"1.5"})]})}),g&&v.jsxs("div",{className:"session-header-overflow-menu",children:[N.totalCostUsd>0&&v.jsxs("span",{className:"session-header-overflow-menu-item session-header-overflow-cost",children:["Cost: $",N.totalCostUsd.toFixed(2)," (",N.totalTurns," turns)"]}),v.jsx("button",{type:"button",className:"session-header-overflow-menu-item",onClick:()=>{b(!1),s(pe=>!pe)},children:"Settings"})]})]}),v.jsxs("div",{className:"session-content",children:[S?v.jsxs("div",{className:"session-initializing",children:[v.jsx("div",{className:"session-initializing-spinner"}),v.jsx("span",{children:"Setting up your project..."})]}):!ee&&!V?v.jsxs("div",{className:"session-loading",children:[v.jsx(fd,{variant:"block"}),v.jsx(fd,{variant:"line",width:"80%"}),v.jsx(fd,{variant:"line",width:"60%"})]}):v.jsx(Oj,{sessionId:A??"",entries:j,isLive:ee,isComplete:V,onGateResolved:le}),H&&v.jsxs("div",{className:"room-send-error",children:[H,v.jsx("button",{type:"button",onClick:()=>ie(null),children:"×"})]}),v.jsx(l0,{onSubmit:J,placeholder:ce?"Message...":"Ask anything...",disabled:S,isRunning:ce,onCancel:B})]})]})}const Uj=Jw([{element:v.jsx(Gk,{}),children:[{path:"/",element:v.jsx(Vk,{})},{path:"/session/:id",element:v.jsx(Lj,{})},{path:"/room/:id",element:v.jsx($k,{})}]}]),rb=document.getElementById("root");rb&&BS.createRoot(rb).render(v.jsx(T.StrictMode,{children:v.jsx(fT,{router:Uj})}));