vibe-replay 0.0.13 → 0.0.14

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.
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
6
6
  <title>vibe-replay</title>
7
7
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
8
- <script type="module" crossorigin>(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&c(m)}).observe(document,{childList:!0,subtree:!0});function o(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function c(d){if(d.ep)return;d.ep=!0;const f=o(d);fetch(d.href,f)}})();function Vp(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var wc={exports:{}},ps={};/**
8
+ <script type="module" crossorigin>(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&c(m)}).observe(document,{childList:!0,subtree:!0});function o(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function c(d){if(d.ep)return;d.ep=!0;const f=o(d);fetch(d.href,f)}})();function Wp(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Tc={exports:{}},gs={};/**
9
9
  * @license React
10
10
  * react-jsx-runtime.production.js
11
11
  *
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * This source code is licensed under the MIT license found in the
15
15
  * LICENSE file in the root directory of this source tree.
16
- */var lp;function Hg(){if(lp)return ps;lp=1;var s=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(c,d,f){var m=null;if(f!==void 0&&(m=""+f),d.key!==void 0&&(m=""+d.key),"key"in d){f={};for(var g in d)g!=="key"&&(f[g]=d[g])}else f=d;return d=f.ref,{$$typeof:s,type:c,key:m,ref:d!==void 0?d:null,props:f}}return ps.Fragment=r,ps.jsx=o,ps.jsxs=o,ps}var sp;function $g(){return sp||(sp=1,wc.exports=Hg()),wc.exports}var l=$g(),Sc={exports:{}},we={};/**
16
+ */var op;function Yg(){if(op)return gs;op=1;var s=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(c,d,f){var m=null;if(f!==void 0&&(m=""+f),d.key!==void 0&&(m=""+d.key),"key"in d){f={};for(var x in d)x!=="key"&&(f[x]=d[x])}else f=d;return d=f.ref,{$$typeof:s,type:c,key:m,ref:d!==void 0?d:null,props:f}}return gs.Fragment=r,gs.jsx=o,gs.jsxs=o,gs}var cp;function Zg(){return cp||(cp=1,Tc.exports=Yg()),Tc.exports}var l=Zg(),Ac={exports:{}},je={};/**
17
17
  * @license React
18
18
  * react.production.js
19
19
  *
@@ -21,7 +21,7 @@
21
21
  *
22
22
  * This source code is licensed under the MIT license found in the
23
23
  * LICENSE file in the root directory of this source tree.
24
- */var rp;function Gg(){if(rp)return we;rp=1;var s=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),m=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),T=Symbol.iterator;function N(k){return k===null||typeof k!="object"?null:(k=T&&k[T]||k["@@iterator"],typeof k=="function"?k:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,R={};function A(k,O,B){this.props=k,this.context=O,this.refs=R,this.updater=B||w}A.prototype.isReactComponent={},A.prototype.setState=function(k,O){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,O,"setState")},A.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function E(){}E.prototype=A.prototype;function _(k,O,B){this.props=k,this.context=O,this.refs=R,this.updater=B||w}var D=_.prototype=new E;D.constructor=_,S(D,A.prototype),D.isPureReactComponent=!0;var $=Array.isArray;function ae(){}var Y={H:null,A:null,T:null,S:null},se=Object.prototype.hasOwnProperty;function te(k,O,B){var W=B.ref;return{$$typeof:s,type:k,key:O,ref:W!==void 0?W:null,props:B}}function Q(k,O){return te(k.type,O,k.props)}function le(k){return typeof k=="object"&&k!==null&&k.$$typeof===s}function oe(k){var O={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(B){return O[B]})}var ue=/\/+/g;function P(k,O){return typeof k=="object"&&k!==null&&k.key!=null?oe(""+k.key):O.toString(36)}function pe(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(ae,ae):(k.status="pending",k.then(function(O){k.status==="pending"&&(k.status="fulfilled",k.value=O)},function(O){k.status==="pending"&&(k.status="rejected",k.reason=O)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function z(k,O,B,W,F){var fe=typeof k;(fe==="undefined"||fe==="boolean")&&(k=null);var xe=!1;if(k===null)xe=!0;else switch(fe){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(k.$$typeof){case s:case r:xe=!0;break;case b:return xe=k._init,z(xe(k._payload),O,B,W,F)}}if(xe)return F=F(k),xe=W===""?"."+P(k,0):W,$(F)?(B="",xe!=null&&(B=xe.replace(ue,"$&/")+"/"),z(F,O,B,"",function(ge){return ge})):F!=null&&(le(F)&&(F=Q(F,B+(F.key==null||k&&k.key===F.key?"":(""+F.key).replace(ue,"$&/")+"/")+xe)),O.push(F)),1;xe=0;var De=W===""?".":W+":";if($(k))for(var J=0;J<k.length;J++)W=k[J],fe=De+P(W,J),xe+=z(W,O,B,fe,F);else if(J=N(k),typeof J=="function")for(k=J.call(k),J=0;!(W=k.next()).done;)W=W.value,fe=De+P(W,J++),xe+=z(W,O,B,fe,F);else if(fe==="object"){if(typeof k.then=="function")return z(pe(k),O,B,W,F);throw O=String(k),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}return xe}function ne(k,O,B){if(k==null)return k;var W=[],F=0;return z(k,W,"","",function(fe){return O.call(B,fe,F++)}),W}function ie(k){if(k._status===-1){var O=k._result;O=O(),O.then(function(B){(k._status===0||k._status===-1)&&(k._status=1,k._result=B)},function(B){(k._status===0||k._status===-1)&&(k._status=2,k._result=B)}),k._status===-1&&(k._status=0,k._result=O)}if(k._status===1)return k._result.default;throw k._result}var ee=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var O=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(O))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},re={map:ne,forEach:function(k,O,B){ne(k,function(){O.apply(this,arguments)},B)},count:function(k){var O=0;return ne(k,function(){O++}),O},toArray:function(k){return ne(k,function(O){return O})||[]},only:function(k){if(!le(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return we.Activity=j,we.Children=re,we.Component=A,we.Fragment=o,we.Profiler=d,we.PureComponent=_,we.StrictMode=c,we.Suspense=h,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,we.__COMPILER_RUNTIME={__proto__:null,c:function(k){return Y.H.useMemoCache(k)}},we.cache=function(k){return function(){return k.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(k,O,B){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var W=S({},k.props),F=k.key;if(O!=null)for(fe in O.key!==void 0&&(F=""+O.key),O)!se.call(O,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&O.ref===void 0||(W[fe]=O[fe]);var fe=arguments.length-2;if(fe===1)W.children=B;else if(1<fe){for(var xe=Array(fe),De=0;De<fe;De++)xe[De]=arguments[De+2];W.children=xe}return te(k.type,F,W)},we.createContext=function(k){return k={$$typeof:m,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:f,_context:k},k},we.createElement=function(k,O,B){var W,F={},fe=null;if(O!=null)for(W in O.key!==void 0&&(fe=""+O.key),O)se.call(O,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(F[W]=O[W]);var xe=arguments.length-2;if(xe===1)F.children=B;else if(1<xe){for(var De=Array(xe),J=0;J<xe;J++)De[J]=arguments[J+2];F.children=De}if(k&&k.defaultProps)for(W in xe=k.defaultProps,xe)F[W]===void 0&&(F[W]=xe[W]);return te(k,fe,F)},we.createRef=function(){return{current:null}},we.forwardRef=function(k){return{$$typeof:g,render:k}},we.isValidElement=le,we.lazy=function(k){return{$$typeof:b,_payload:{_status:-1,_result:k},_init:ie}},we.memo=function(k,O){return{$$typeof:x,type:k,compare:O===void 0?null:O}},we.startTransition=function(k){var O=Y.T,B={};Y.T=B;try{var W=k(),F=Y.S;F!==null&&F(B,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(ae,ee)}catch(fe){ee(fe)}finally{O!==null&&B.types!==null&&(O.types=B.types),Y.T=O}},we.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},we.use=function(k){return Y.H.use(k)},we.useActionState=function(k,O,B){return Y.H.useActionState(k,O,B)},we.useCallback=function(k,O){return Y.H.useCallback(k,O)},we.useContext=function(k){return Y.H.useContext(k)},we.useDebugValue=function(){},we.useDeferredValue=function(k,O){return Y.H.useDeferredValue(k,O)},we.useEffect=function(k,O){return Y.H.useEffect(k,O)},we.useEffectEvent=function(k){return Y.H.useEffectEvent(k)},we.useId=function(){return Y.H.useId()},we.useImperativeHandle=function(k,O,B){return Y.H.useImperativeHandle(k,O,B)},we.useInsertionEffect=function(k,O){return Y.H.useInsertionEffect(k,O)},we.useLayoutEffect=function(k,O){return Y.H.useLayoutEffect(k,O)},we.useMemo=function(k,O){return Y.H.useMemo(k,O)},we.useOptimistic=function(k,O){return Y.H.useOptimistic(k,O)},we.useReducer=function(k,O,B){return Y.H.useReducer(k,O,B)},we.useRef=function(k){return Y.H.useRef(k)},we.useState=function(k){return Y.H.useState(k)},we.useSyncExternalStore=function(k,O,B){return Y.H.useSyncExternalStore(k,O,B)},we.useTransition=function(){return Y.H.useTransition()},we.version="19.2.4",we}var ip;function Fc(){return ip||(ip=1,Sc.exports=Gg()),Sc.exports}var v=Fc();const qg=Vp(v);var Nc={exports:{}},hs={},kc={exports:{}},Ec={};/**
24
+ */var up;function Fg(){if(up)return je;up=1;var s=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),m=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),T=Symbol.iterator;function N(A){return A===null||typeof A!="object"?null:(A=T&&A[T]||A["@@iterator"],typeof A=="function"?A:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function E(A,O,D){this.props=A,this.context=O,this.refs=C,this.updater=D||j}E.prototype.isReactComponent={},E.prototype.setState=function(A,O){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,O,"setState")},E.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function k(){}k.prototype=E.prototype;function _(A,O,D){this.props=A,this.context=O,this.refs=C,this.updater=D||j}var z=_.prototype=new k;z.constructor=_,S(z,E.prototype),z.isPureReactComponent=!0;var U=Array.isArray;function J(){}var Z={H:null,A:null,T:null,S:null},re=Object.prototype.hasOwnProperty;function ae(A,O,D){var ee=D.ref;return{$$typeof:s,type:A,key:O,ref:ee!==void 0?ee:null,props:D}}function P(A,O){return ae(A.type,O,A.props)}function V(A){return typeof A=="object"&&A!==null&&A.$$typeof===s}function oe(A){var O={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(D){return O[D]})}var ce=/\/+/g;function ne(A,O){return typeof A=="object"&&A!==null&&A.key!=null?oe(""+A.key):O.toString(36)}function pe(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(J,J):(A.status="pending",A.then(function(O){A.status==="pending"&&(A.status="fulfilled",A.value=O)},function(O){A.status==="pending"&&(A.status="rejected",A.reason=O)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function B(A,O,D,ee,X){var de=typeof A;(de==="undefined"||de==="boolean")&&(A=null);var xe=!1;if(A===null)xe=!0;else switch(de){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(A.$$typeof){case s:case r:xe=!0;break;case v:return xe=A._init,B(xe(A._payload),O,D,ee,X)}}if(xe)return X=X(A),xe=ee===""?"."+ne(A,0):ee,U(X)?(D="",xe!=null&&(D=xe.replace(ce,"$&/")+"/"),B(X,O,D,"",function(mt){return mt})):X!=null&&(V(X)&&(X=P(X,D+(X.key==null||A&&A.key===X.key?"":(""+X.key).replace(ce,"$&/")+"/")+xe)),O.push(X)),1;xe=0;var Oe=ee===""?".":ee+":";if(U(A))for(var Te=0;Te<A.length;Te++)ee=A[Te],de=Oe+ne(ee,Te),xe+=B(ee,O,D,de,X);else if(Te=N(A),typeof Te=="function")for(A=Te.call(A),Te=0;!(ee=A.next()).done;)ee=ee.value,de=Oe+ne(ee,Te++),xe+=B(ee,O,D,de,X);else if(de==="object"){if(typeof A.then=="function")return B(pe(A),O,D,ee,X);throw O=String(A),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}return xe}function W(A,O,D){if(A==null)return A;var ee=[],X=0;return B(A,ee,"","",function(de){return O.call(D,de,X++)}),ee}function ie(A){if(A._status===-1){var O=A._result;O=O(),O.then(function(D){(A._status===0||A._status===-1)&&(A._status=1,A._result=D)},function(D){(A._status===0||A._status===-1)&&(A._status=2,A._result=D)}),A._status===-1&&(A._status=0,A._result=O)}if(A._status===1)return A._result.default;throw A._result}var le=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var O=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(O))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},se={map:W,forEach:function(A,O,D){W(A,function(){O.apply(this,arguments)},D)},count:function(A){var O=0;return W(A,function(){O++}),O},toArray:function(A){return W(A,function(O){return O})||[]},only:function(A){if(!V(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return je.Activity=w,je.Children=se,je.Component=E,je.Fragment=o,je.Profiler=d,je.PureComponent=_,je.StrictMode=c,je.Suspense=h,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,je.__COMPILER_RUNTIME={__proto__:null,c:function(A){return Z.H.useMemoCache(A)}},je.cache=function(A){return function(){return A.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(A,O,D){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var ee=S({},A.props),X=A.key;if(O!=null)for(de in O.key!==void 0&&(X=""+O.key),O)!re.call(O,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&O.ref===void 0||(ee[de]=O[de]);var de=arguments.length-2;if(de===1)ee.children=D;else if(1<de){for(var xe=Array(de),Oe=0;Oe<de;Oe++)xe[Oe]=arguments[Oe+2];ee.children=xe}return ae(A.type,X,ee)},je.createContext=function(A){return A={$$typeof:m,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:f,_context:A},A},je.createElement=function(A,O,D){var ee,X={},de=null;if(O!=null)for(ee in O.key!==void 0&&(de=""+O.key),O)re.call(O,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(X[ee]=O[ee]);var xe=arguments.length-2;if(xe===1)X.children=D;else if(1<xe){for(var Oe=Array(xe),Te=0;Te<xe;Te++)Oe[Te]=arguments[Te+2];X.children=Oe}if(A&&A.defaultProps)for(ee in xe=A.defaultProps,xe)X[ee]===void 0&&(X[ee]=xe[ee]);return ae(A,de,X)},je.createRef=function(){return{current:null}},je.forwardRef=function(A){return{$$typeof:x,render:A}},je.isValidElement=V,je.lazy=function(A){return{$$typeof:v,_payload:{_status:-1,_result:A},_init:ie}},je.memo=function(A,O){return{$$typeof:g,type:A,compare:O===void 0?null:O}},je.startTransition=function(A){var O=Z.T,D={};Z.T=D;try{var ee=A(),X=Z.S;X!==null&&X(D,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(J,le)}catch(de){le(de)}finally{O!==null&&D.types!==null&&(O.types=D.types),Z.T=O}},je.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},je.use=function(A){return Z.H.use(A)},je.useActionState=function(A,O,D){return Z.H.useActionState(A,O,D)},je.useCallback=function(A,O){return Z.H.useCallback(A,O)},je.useContext=function(A){return Z.H.useContext(A)},je.useDebugValue=function(){},je.useDeferredValue=function(A,O){return Z.H.useDeferredValue(A,O)},je.useEffect=function(A,O){return Z.H.useEffect(A,O)},je.useEffectEvent=function(A){return Z.H.useEffectEvent(A)},je.useId=function(){return Z.H.useId()},je.useImperativeHandle=function(A,O,D){return Z.H.useImperativeHandle(A,O,D)},je.useInsertionEffect=function(A,O){return Z.H.useInsertionEffect(A,O)},je.useLayoutEffect=function(A,O){return Z.H.useLayoutEffect(A,O)},je.useMemo=function(A,O){return Z.H.useMemo(A,O)},je.useOptimistic=function(A,O){return Z.H.useOptimistic(A,O)},je.useReducer=function(A,O,D){return Z.H.useReducer(A,O,D)},je.useRef=function(A){return Z.H.useRef(A)},je.useState=function(A){return Z.H.useState(A)},je.useSyncExternalStore=function(A,O,D){return Z.H.useSyncExternalStore(A,O,D)},je.useTransition=function(){return Z.H.useTransition()},je.version="19.2.4",je}var dp;function Ic(){return dp||(dp=1,Ac.exports=Fg()),Ac.exports}var y=Ic();const Xg=Wp(y);var Cc={exports:{}},bs={},Rc={exports:{}},_c={};/**
25
25
  * @license React
26
26
  * scheduler.production.js
27
27
  *
@@ -29,7 +29,7 @@
29
29
  *
30
30
  * This source code is licensed under the MIT license found in the
31
31
  * LICENSE file in the root directory of this source tree.
32
- */var op;function Yg(){return op||(op=1,(function(s){function r(z,ne){var ie=z.length;z.push(ne);e:for(;0<ie;){var ee=ie-1>>>1,re=z[ee];if(0<d(re,ne))z[ee]=ne,z[ie]=re,ie=ee;else break e}}function o(z){return z.length===0?null:z[0]}function c(z){if(z.length===0)return null;var ne=z[0],ie=z.pop();if(ie!==ne){z[0]=ie;e:for(var ee=0,re=z.length,k=re>>>1;ee<k;){var O=2*(ee+1)-1,B=z[O],W=O+1,F=z[W];if(0>d(B,ie))W<re&&0>d(F,B)?(z[ee]=F,z[W]=ie,ee=W):(z[ee]=B,z[O]=ie,ee=O);else if(W<re&&0>d(F,ie))z[ee]=F,z[W]=ie,ee=W;else break e}}return ne}function d(z,ne){var ie=z.sortIndex-ne.sortIndex;return ie!==0?ie:z.id-ne.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var m=Date,g=m.now();s.unstable_now=function(){return m.now()-g}}var h=[],x=[],b=1,j=null,T=3,N=!1,w=!1,S=!1,R=!1,A=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function D(z){for(var ne=o(x);ne!==null;){if(ne.callback===null)c(x);else if(ne.startTime<=z)c(x),ne.sortIndex=ne.expirationTime,r(h,ne);else break;ne=o(x)}}function $(z){if(S=!1,D(z),!w)if(o(h)!==null)w=!0,ae||(ae=!0,oe());else{var ne=o(x);ne!==null&&pe($,ne.startTime-z)}}var ae=!1,Y=-1,se=5,te=-1;function Q(){return R?!0:!(s.unstable_now()-te<se)}function le(){if(R=!1,ae){var z=s.unstable_now();te=z;var ne=!0;try{e:{w=!1,S&&(S=!1,E(Y),Y=-1),N=!0;var ie=T;try{t:{for(D(z),j=o(h);j!==null&&!(j.expirationTime>z&&Q());){var ee=j.callback;if(typeof ee=="function"){j.callback=null,T=j.priorityLevel;var re=ee(j.expirationTime<=z);if(z=s.unstable_now(),typeof re=="function"){j.callback=re,D(z),ne=!0;break t}j===o(h)&&c(h),D(z)}else c(h);j=o(h)}if(j!==null)ne=!0;else{var k=o(x);k!==null&&pe($,k.startTime-z),ne=!1}}break e}finally{j=null,T=ie,N=!1}ne=void 0}}finally{ne?oe():ae=!1}}}var oe;if(typeof _=="function")oe=function(){_(le)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,P=ue.port2;ue.port1.onmessage=le,oe=function(){P.postMessage(null)}}else oe=function(){A(le,0)};function pe(z,ne){Y=A(function(){z(s.unstable_now())},ne)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(z){z.callback=null},s.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):se=0<z?Math.floor(1e3/z):5},s.unstable_getCurrentPriorityLevel=function(){return T},s.unstable_next=function(z){switch(T){case 1:case 2:case 3:var ne=3;break;default:ne=T}var ie=T;T=ne;try{return z()}finally{T=ie}},s.unstable_requestPaint=function(){R=!0},s.unstable_runWithPriority=function(z,ne){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ie=T;T=z;try{return ne()}finally{T=ie}},s.unstable_scheduleCallback=function(z,ne,ie){var ee=s.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?ee+ie:ee):ie=ee,z){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=ie+re,z={id:b++,callback:ne,priorityLevel:z,startTime:ie,expirationTime:re,sortIndex:-1},ie>ee?(z.sortIndex=ie,r(x,z),o(h)===null&&z===o(x)&&(S?(E(Y),Y=-1):S=!0,pe($,ie-ee))):(z.sortIndex=re,r(h,z),w||N||(w=!0,ae||(ae=!0,oe()))),z},s.unstable_shouldYield=Q,s.unstable_wrapCallback=function(z){var ne=T;return function(){var ie=T;T=ne;try{return z.apply(this,arguments)}finally{T=ie}}}})(Ec)),Ec}var cp;function Zg(){return cp||(cp=1,kc.exports=Yg()),kc.exports}var Tc={exports:{}},Nt={};/**
32
+ */var fp;function Qg(){return fp||(fp=1,(function(s){function r(B,W){var ie=B.length;B.push(W);e:for(;0<ie;){var le=ie-1>>>1,se=B[le];if(0<d(se,W))B[le]=W,B[ie]=se,ie=le;else break e}}function o(B){return B.length===0?null:B[0]}function c(B){if(B.length===0)return null;var W=B[0],ie=B.pop();if(ie!==W){B[0]=ie;e:for(var le=0,se=B.length,A=se>>>1;le<A;){var O=2*(le+1)-1,D=B[O],ee=O+1,X=B[ee];if(0>d(D,ie))ee<se&&0>d(X,D)?(B[le]=X,B[ee]=ie,le=ee):(B[le]=D,B[O]=ie,le=O);else if(ee<se&&0>d(X,ie))B[le]=X,B[ee]=ie,le=ee;else break e}}return W}function d(B,W){var ie=B.sortIndex-W.sortIndex;return ie!==0?ie:B.id-W.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var m=Date,x=m.now();s.unstable_now=function(){return m.now()-x}}var h=[],g=[],v=1,w=null,T=3,N=!1,j=!1,S=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function z(B){for(var W=o(g);W!==null;){if(W.callback===null)c(g);else if(W.startTime<=B)c(g),W.sortIndex=W.expirationTime,r(h,W);else break;W=o(g)}}function U(B){if(S=!1,z(B),!j)if(o(h)!==null)j=!0,J||(J=!0,oe());else{var W=o(g);W!==null&&pe(U,W.startTime-B)}}var J=!1,Z=-1,re=5,ae=-1;function P(){return C?!0:!(s.unstable_now()-ae<re)}function V(){if(C=!1,J){var B=s.unstable_now();ae=B;var W=!0;try{e:{j=!1,S&&(S=!1,k(Z),Z=-1),N=!0;var ie=T;try{t:{for(z(B),w=o(h);w!==null&&!(w.expirationTime>B&&P());){var le=w.callback;if(typeof le=="function"){w.callback=null,T=w.priorityLevel;var se=le(w.expirationTime<=B);if(B=s.unstable_now(),typeof se=="function"){w.callback=se,z(B),W=!0;break t}w===o(h)&&c(h),z(B)}else c(h);w=o(h)}if(w!==null)W=!0;else{var A=o(g);A!==null&&pe(U,A.startTime-B),W=!1}}break e}finally{w=null,T=ie,N=!1}W=void 0}}finally{W?oe():J=!1}}}var oe;if(typeof _=="function")oe=function(){_(V)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,ne=ce.port2;ce.port1.onmessage=V,oe=function(){ne.postMessage(null)}}else oe=function(){E(V,0)};function pe(B,W){Z=E(function(){B(s.unstable_now())},W)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(B){B.callback=null},s.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"):re=0<B?Math.floor(1e3/B):5},s.unstable_getCurrentPriorityLevel=function(){return T},s.unstable_next=function(B){switch(T){case 1:case 2:case 3:var W=3;break;default:W=T}var ie=T;T=W;try{return B()}finally{T=ie}},s.unstable_requestPaint=function(){C=!0},s.unstable_runWithPriority=function(B,W){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ie=T;T=B;try{return W()}finally{T=ie}},s.unstable_scheduleCallback=function(B,W,ie){var le=s.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?le+ie:le):ie=le,B){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=ie+se,B={id:v++,callback:W,priorityLevel:B,startTime:ie,expirationTime:se,sortIndex:-1},ie>le?(B.sortIndex=ie,r(g,B),o(h)===null&&B===o(g)&&(S?(k(Z),Z=-1):S=!0,pe(U,ie-le))):(B.sortIndex=se,r(h,B),j||N||(j=!0,J||(J=!0,oe()))),B},s.unstable_shouldYield=P,s.unstable_wrapCallback=function(B){var W=T;return function(){var ie=T;T=W;try{return B.apply(this,arguments)}finally{T=ie}}}})(_c)),_c}var mp;function Vg(){return mp||(mp=1,Rc.exports=Qg()),Rc.exports}var Oc={exports:{}},At={};/**
33
33
  * @license React
34
34
  * react-dom.production.js
35
35
  *
@@ -37,7 +37,7 @@
37
37
  *
38
38
  * This source code is licensed under the MIT license found in the
39
39
  * LICENSE file in the root directory of this source tree.
40
- */var up;function Xg(){if(up)return Nt;up=1;var s=Fc();function r(h){var x="https://react.dev/errors/"+h;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)x+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+h+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var c={d:{f:o,r:function(){throw Error(r(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(h,x,b){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:j==null?null:""+j,children:h,containerInfo:x,implementation:b}}var m=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(h,x){if(h==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return Nt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,Nt.createPortal=function(h,x){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(r(299));return f(h,x,null,b)},Nt.flushSync=function(h){var x=m.T,b=c.p;try{if(m.T=null,c.p=2,h)return h()}finally{m.T=x,c.p=b,c.d.f()}},Nt.preconnect=function(h,x){typeof h=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,c.d.C(h,x))},Nt.prefetchDNS=function(h){typeof h=="string"&&c.d.D(h)},Nt.preinit=function(h,x){if(typeof h=="string"&&x&&typeof x.as=="string"){var b=x.as,j=g(b,x.crossOrigin),T=typeof x.integrity=="string"?x.integrity:void 0,N=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;b==="style"?c.d.S(h,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:j,integrity:T,fetchPriority:N}):b==="script"&&c.d.X(h,{crossOrigin:j,integrity:T,fetchPriority:N,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},Nt.preinitModule=function(h,x){if(typeof h=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var b=g(x.as,x.crossOrigin);c.d.M(h,{crossOrigin:b,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&c.d.M(h)},Nt.preload=function(h,x){if(typeof h=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var b=x.as,j=g(b,x.crossOrigin);c.d.L(h,b,{crossOrigin:j,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},Nt.preloadModule=function(h,x){if(typeof h=="string")if(x){var b=g(x.as,x.crossOrigin);c.d.m(h,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:b,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else c.d.m(h)},Nt.requestFormReset=function(h){c.d.r(h)},Nt.unstable_batchedUpdates=function(h,x){return h(x)},Nt.useFormState=function(h,x,b){return m.H.useFormState(h,x,b)},Nt.useFormStatus=function(){return m.H.useHostTransitionStatus()},Nt.version="19.2.4",Nt}var dp;function Fg(){if(dp)return Tc.exports;dp=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(r){console.error(r)}}return s(),Tc.exports=Xg(),Tc.exports}/**
40
+ */var pp;function Jg(){if(pp)return At;pp=1;var s=Ic();function r(h){var g="https://react.dev/errors/"+h;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)g+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var c={d:{f:o,r:function(){throw Error(r(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(h,g,v){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:w==null?null:""+w,children:h,containerInfo:g,implementation:v}}var m=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(h,g){if(h==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return At.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,At.createPortal=function(h,g){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(r(299));return f(h,g,null,v)},At.flushSync=function(h){var g=m.T,v=c.p;try{if(m.T=null,c.p=2,h)return h()}finally{m.T=g,c.p=v,c.d.f()}},At.preconnect=function(h,g){typeof h=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,c.d.C(h,g))},At.prefetchDNS=function(h){typeof h=="string"&&c.d.D(h)},At.preinit=function(h,g){if(typeof h=="string"&&g&&typeof g.as=="string"){var v=g.as,w=x(v,g.crossOrigin),T=typeof g.integrity=="string"?g.integrity:void 0,N=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;v==="style"?c.d.S(h,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:w,integrity:T,fetchPriority:N}):v==="script"&&c.d.X(h,{crossOrigin:w,integrity:T,fetchPriority:N,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},At.preinitModule=function(h,g){if(typeof h=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var v=x(g.as,g.crossOrigin);c.d.M(h,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&c.d.M(h)},At.preload=function(h,g){if(typeof h=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var v=g.as,w=x(v,g.crossOrigin);c.d.L(h,v,{crossOrigin:w,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},At.preloadModule=function(h,g){if(typeof h=="string")if(g){var v=x(g.as,g.crossOrigin);c.d.m(h,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else c.d.m(h)},At.requestFormReset=function(h){c.d.r(h)},At.unstable_batchedUpdates=function(h,g){return h(g)},At.useFormState=function(h,g,v){return m.H.useFormState(h,g,v)},At.useFormStatus=function(){return m.H.useHostTransitionStatus()},At.version="19.2.4",At}var hp;function Kg(){if(hp)return Oc.exports;hp=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(r){console.error(r)}}return s(),Oc.exports=Jg(),Oc.exports}/**
41
41
  * @license React
42
42
  * react-dom-client.production.js
43
43
  *
@@ -45,63 +45,63 @@
45
45
  *
46
46
  * This source code is licensed under the MIT license found in the
47
47
  * LICENSE file in the root directory of this source tree.
48
- */var fp;function Vg(){if(fp)return hs;fp=1;var s=Zg(),r=Fc(),o=Fg();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(f(e)!==e)throw Error(c(188))}function x(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(c(188));return t!==e?null:e}for(var n=e,a=t;;){var i=n.return;if(i===null)break;var u=i.alternate;if(u===null){if(a=i.return,a!==null){n=a;continue}break}if(i.child===u.child){for(u=i.child;u;){if(u===n)return h(i),e;if(u===a)return h(i),t;u=u.sibling}throw Error(c(188))}if(n.return!==a.return)n=i,a=u;else{for(var p=!1,y=i.child;y;){if(y===n){p=!0,n=i,a=u;break}if(y===a){p=!0,a=i,n=u;break}y=y.sibling}if(!p){for(y=u.child;y;){if(y===n){p=!0,n=u,a=i;break}if(y===a){p=!0,a=u,n=i;break}y=y.sibling}if(!p)throw Error(c(189))}}if(n.alternate!==a)throw Error(c(190))}if(n.tag!==3)throw Error(c(188));return n.stateNode.current===n?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var j=Object.assign,T=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),_=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),Q=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function oe(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var ue=Symbol.for("react.client.reference");function P(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case S:return"Fragment";case A:return"Profiler";case R:return"StrictMode";case $:return"Suspense";case ae:return"SuspenseList";case te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case _:return e.displayName||"Context";case E:return(e._context.displayName||"Context")+".Consumer";case D:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y:return t=e.displayName||null,t!==null?t:P(e.type)||"Memo";case se:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var pe=Array.isArray,z=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},ee=[],re=-1;function k(e){return{current:e}}function O(e){0>re||(e.current=ee[re],ee[re]=null,re--)}function B(e,t){re++,ee[re]=e.current,e.current=t}var W=k(null),F=k(null),fe=k(null),xe=k(null);function De(e,t){switch(B(fe,t),B(F,e),B(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Tm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Tm(t),e=Am(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}O(W),B(W,e)}function J(){O(W),O(F),O(fe)}function ge(e){e.memoizedState!==null&&B(xe,e);var t=W.current,n=Am(t,e.type);t!==n&&(B(F,e),B(W,n))}function Se(e){F.current===e&&(O(W),O(F)),xe.current===e&&(O(xe),us._currentValue=ie)}var $e,Je;function Ve(e){if($e===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);$e=t&&t[1]||"",Je=-1<n.stack.indexOf(`
48
+ */var xp;function Ig(){if(xp)return bs;xp=1;var s=Vg(),r=Ic(),o=Kg();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function x(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(f(e)!==e)throw Error(c(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(c(188));return t!==e?null:e}for(var n=e,a=t;;){var i=n.return;if(i===null)break;var u=i.alternate;if(u===null){if(a=i.return,a!==null){n=a;continue}break}if(i.child===u.child){for(u=i.child;u;){if(u===n)return h(i),e;if(u===a)return h(i),t;u=u.sibling}throw Error(c(188))}if(n.return!==a.return)n=i,a=u;else{for(var p=!1,b=i.child;b;){if(b===n){p=!0,n=i,a=u;break}if(b===a){p=!0,a=i,n=u;break}b=b.sibling}if(!p){for(b=u.child;b;){if(b===n){p=!0,n=u,a=i;break}if(b===a){p=!0,a=u,n=i;break}b=b.sibling}if(!p)throw Error(c(189))}}if(n.alternate!==a)throw Error(c(190))}if(n.tag!==3)throw Error(c(188));return n.stateNode.current===n?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var w=Object.assign,T=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),_=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),re=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function oe(e){return e===null||typeof e!="object"?null:(e=V&&e[V]||e["@@iterator"],typeof e=="function"?e:null)}var ce=Symbol.for("react.client.reference");function ne(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ce?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case S:return"Fragment";case E:return"Profiler";case C:return"StrictMode";case U:return"Suspense";case J:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case _:return e.displayName||"Context";case k:return(e._context.displayName||"Context")+".Consumer";case z:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return t=e.displayName||null,t!==null?t:ne(e.type)||"Memo";case re:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var pe=Array.isArray,B=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},le=[],se=-1;function A(e){return{current:e}}function O(e){0>se||(e.current=le[se],le[se]=null,se--)}function D(e,t){se++,le[se]=e.current,e.current=t}var ee=A(null),X=A(null),de=A(null),xe=A(null);function Oe(e,t){switch(D(de,t),D(X,e),D(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?_m(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=_m(t),e=Om(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}O(ee),D(ee,e)}function Te(){O(ee),O(X),O(de)}function mt(e){e.memoizedState!==null&&D(xe,e);var t=ee.current,n=Om(t,e.type);t!==n&&(D(X,e),D(ee,n))}function it(e){X.current===e&&(O(ee),O(X)),xe.current===e&&(O(xe),ms._currentValue=ie)}var te,ke;function we(e){if(te===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);te=t&&t[1]||"",ke=-1<n.stack.indexOf(`
49
49
  at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
50
- `+$e+e+Je}var Ct=!1;function ot(e,t){if(!e||Ct)return"";Ct=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(q){var G=q}Reflect.construct(e,[],K)}else{try{K.call()}catch(q){G=q}e.call(K.prototype)}}else{try{throw Error()}catch(q){G=q}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(q){if(q&&G&&typeof q.stack=="string")return[q.stack,G.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=a.DetermineComponentFrameRoot(),p=u[0],y=u[1];if(p&&y){var C=p.split(`
51
- `),H=y.split(`
52
- `);for(i=a=0;a<C.length&&!C[a].includes("DetermineComponentFrameRoot");)a++;for(;i<H.length&&!H[i].includes("DetermineComponentFrameRoot");)i++;if(a===C.length||i===H.length)for(a=C.length-1,i=H.length-1;1<=a&&0<=i&&C[a]!==H[i];)i--;for(;1<=a&&0<=i;a--,i--)if(C[a]!==H[i]){if(a!==1||i!==1)do if(a--,i--,0>i||C[a]!==H[i]){var Z=`
53
- `+C[a].replace(" at new "," at ");return e.displayName&&Z.includes("<anonymous>")&&(Z=Z.replace("<anonymous>",e.displayName)),Z}while(1<=a&&0<=i);break}}}finally{Ct=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Ve(n):""}function tn(e,t){switch(e.tag){case 26:case 27:case 5:return Ve(e.type);case 16:return Ve("Lazy");case 13:return e.child!==t&&t!==null?Ve("Suspense Fallback"):Ve("Suspense");case 19:return Ve("SuspenseList");case 0:case 15:return ot(e.type,!1);case 11:return ot(e.type.render,!1);case 1:return ot(e.type,!0);case 31:return Ve("Activity");default:return""}}function xn(e){try{var t="",n=null;do t+=tn(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
50
+ `+te+e+ke}var $e=!1;function Ie(e,t){if(!e||$e)return"";$e=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(Y){var q=Y}Reflect.construct(e,[],K)}else{try{K.call()}catch(Y){q=Y}e.call(K.prototype)}}else{try{throw Error()}catch(Y){q=Y}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(Y){if(Y&&q&&typeof Y.stack=="string")return[Y.stack,q.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=a.DetermineComponentFrameRoot(),p=u[0],b=u[1];if(p&&b){var R=p.split(`
51
+ `),G=b.split(`
52
+ `);for(i=a=0;a<R.length&&!R[a].includes("DetermineComponentFrameRoot");)a++;for(;i<G.length&&!G[i].includes("DetermineComponentFrameRoot");)i++;if(a===R.length||i===G.length)for(a=R.length-1,i=G.length-1;1<=a&&0<=i&&R[a]!==G[i];)i--;for(;1<=a&&0<=i;a--,i--)if(R[a]!==G[i]){if(a!==1||i!==1)do if(a--,i--,0>i||R[a]!==G[i]){var F=`
53
+ `+R[a].replace(" at new "," at ");return e.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",e.displayName)),F}while(1<=a&&0<=i);break}}}finally{$e=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?we(n):""}function xt(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we("Lazy");case 13:return e.child!==t&&t!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Ie(e.type,!1);case 11:return Ie(e.type.render,!1);case 1:return Ie(e.type,!0);case 31:return we("Activity");default:return""}}function ot(e){try{var t="",n=null;do t+=xt(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
54
54
  Error generating stack: `+a.message+`
55
- `+a.stack}}var gn=Object.prototype.hasOwnProperty,ct=s.unstable_scheduleCallback,X=s.unstable_cancelCallback,ve=s.unstable_shouldYield,Te=s.unstable_requestPaint,je=s.unstable_now,Ae=s.unstable_getCurrentPriorityLevel,Ee=s.unstable_ImmediatePriority,ce=s.unstable_UserBlockingPriority,ye=s.unstable_NormalPriority,pt=s.unstable_LowPriority,Pe=s.unstable_IdlePriority,dt=s.log,St=s.unstable_setDisableYieldValue,ht=null,Ye=null;function Et(e){if(typeof dt=="function"&&St(e),Ye&&typeof Ye.setStrictMode=="function")try{Ye.setStrictMode(ht,e)}catch{}}var xt=Math.clz32?Math.clz32:Ts,Ma=Math.log,Es=Math.LN2;function Ts(e){return e>>>=0,e===0?32:31-(Ma(e)/Es|0)|0}var ca=256,ua=262144,As=4194304;function da(e){var t=e&42;if(t!==0)return t;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 Cs(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var i=0,u=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var y=a&134217727;return y!==0?(a=y&~u,a!==0?i=da(a):(p&=y,p!==0?i=da(p):n||(n=y&~e,n!==0&&(i=da(n))))):(y=a&~u,y!==0?i=da(y):p!==0?i=da(p):n||(n=a&~e,n!==0&&(i=da(n)))),i===0?0:t!==0&&t!==i&&(t&u)===0&&(u=i&-i,n=t&-t,u>=n||u===32&&(n&4194048)!==0)?t:i}function Sl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Eh(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 iu(){var e=As;return As<<=1,(As&62914560)===0&&(As=4194304),e}function ci(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Nl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Th(e,t,n,a,i,u){var p=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var y=e.entanglements,C=e.expirationTimes,H=e.hiddenUpdates;for(n=p&~n;0<n;){var Z=31-xt(n),K=1<<Z;y[Z]=0,C[Z]=-1;var G=H[Z];if(G!==null)for(H[Z]=null,Z=0;Z<G.length;Z++){var q=G[Z];q!==null&&(q.lane&=-536870913)}n&=~K}a!==0&&ou(e,a,0),u!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=u&~(p&~t))}function ou(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-xt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function cu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-xt(n),i=1<<a;i&t|e[a]&t&&(e[a]|=t),n&=~i}}function uu(e,t){var n=t&-t;return n=(n&42)!==0?1:ui(n),(n&(e.suspendedLanes|t))!==0?0:n}function ui(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 di(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function du(){var e=ne.p;return e!==0?e:(e=window.event,e===void 0?32:Im(e.type))}function fu(e,t){var n=ne.p;try{return ne.p=e,t()}finally{ne.p=n}}var Bn=Math.random().toString(36).slice(2),gt="__reactFiber$"+Bn,Rt="__reactProps$"+Bn,za="__reactContainer$"+Bn,fi="__reactEvents$"+Bn,Ah="__reactListeners$"+Bn,Ch="__reactHandles$"+Bn,mu="__reactResources$"+Bn,kl="__reactMarker$"+Bn;function mi(e){delete e[gt],delete e[Rt],delete e[fi],delete e[Ah],delete e[Ch]}function Da(e){var t=e[gt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[za]||n[gt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Dm(e);e!==null;){if(n=e[gt])return n;e=Dm(e)}return t}e=n,n=e.parentNode}return null}function La(e){if(e=e[gt]||e[za]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function El(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function Ba(e){var t=e[mu];return t||(t=e[mu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ft(e){e[kl]=!0}var pu=new Set,hu={};function fa(e,t){Ua(e,t),Ua(e+"Capture",t)}function Ua(e,t){for(hu[e]=t,e=0;e<t.length;e++)pu.add(t[e])}var Rh=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]*$"),xu={},gu={};function _h(e){return gn.call(gu,e)?!0:gn.call(xu,e)?!1:Rh.test(e)?gu[e]=!0:(xu[e]=!0,!1)}function Rs(e,t,n){if(_h(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function _s(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function bn(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function Xt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Oh(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var i=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(p){n=""+p,u.call(this,p)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(p){n=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pi(e){if(!e._valueTracker){var t=bu(e)?"checked":"value";e._valueTracker=Oh(e,t,""+e[t])}}function yu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=bu(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Os(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 Mh=/[\n"\\]/g;function Ft(e){return e.replace(Mh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function hi(e,t,n,a,i,u,p,y){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Xt(t)):e.value!==""+Xt(t)&&(e.value=""+Xt(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?xi(e,p,Xt(t)):n!=null?xi(e,p,Xt(n)):a!=null&&e.removeAttribute("value"),i==null&&u!=null&&(e.defaultChecked=!!u),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.name=""+Xt(y):e.removeAttribute("name")}function vu(e,t,n,a,i,u,p,y){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){pi(e);return}n=n!=null?""+Xt(n):"",t=t!=null?""+Xt(t):n,y||t===e.value||(e.value=t),e.defaultValue=t}a=a??i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=y?e.checked:!!a,e.defaultChecked=!!a,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),pi(e)}function xi(e,t,n){t==="number"&&Os(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ha(e,t,n,a){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Xt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,a&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ju(e,t,n){if(t!=null&&(t=""+Xt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Xt(n):""}function wu(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(c(92));if(pe(a)){if(1<a.length)throw Error(c(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Xt(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),pi(e)}function $a(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zh=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 Su(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||zh.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Nu(e,t,n){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var i in t)a=t[i],t.hasOwnProperty(i)&&n[i]!==a&&Su(e,i,a)}else for(var u in t)t.hasOwnProperty(u)&&Su(e,u,t[u])}function gi(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 Dh=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"]]),Lh=/^[\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 Ms(e){return Lh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function yn(){}var bi=null;function yi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ga=null,qa=null;function ku(e){var t=La(e);if(t&&(e=t.stateNode)){var n=e[Rt]||null;e:switch(e=t.stateNode,t.type){case"input":if(hi(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Ft(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var i=a[Rt]||null;if(!i)throw Error(c(90));hi(a,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&yu(a)}break e;case"textarea":ju(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ha(e,!!n.multiple,t,!1)}}}var vi=!1;function Eu(e,t,n){if(vi)return e(t,n);vi=!0;try{var a=e(t);return a}finally{if(vi=!1,(Ga!==null||qa!==null)&&(vr(),Ga&&(t=Ga,e=qa,qa=Ga=null,ku(t),e)))for(t=0;t<e.length;t++)ku(e[t])}}function Tl(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Rt]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(c(231,t,typeof n));return n}var vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ji=!1;if(vn)try{var Al={};Object.defineProperty(Al,"passive",{get:function(){ji=!0}}),window.addEventListener("test",Al,Al),window.removeEventListener("test",Al,Al)}catch{ji=!1}var Un=null,wi=null,zs=null;function Tu(){if(zs)return zs;var e,t=wi,n=t.length,a,i="value"in Un?Un.value:Un.textContent,u=i.length;for(e=0;e<n&&t[e]===i[e];e++);var p=n-e;for(a=1;a<=p&&t[n-a]===i[u-a];a++);return zs=i.slice(e,1<a?1-a:void 0)}function Ds(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ls(){return!0}function Au(){return!1}function _t(e){function t(n,a,i,u,p){this._reactName=n,this._targetInst=i,this.type=a,this.nativeEvent=u,this.target=p,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(n=e[y],this[y]=n?n(u):u[y]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Ls:Au,this.isPropagationStopped=Au,this}return j(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ls)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ls)},persist:function(){},isPersistent:Ls}),t}var ma={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bs=_t(ma),Cl=j({},ma,{view:0,detail:0}),Bh=_t(Cl),Si,Ni,Rl,Us=j({},Cl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ei,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!==Rl&&(Rl&&e.type==="mousemove"?(Si=e.screenX-Rl.screenX,Ni=e.screenY-Rl.screenY):Ni=Si=0,Rl=e),Si)},movementY:function(e){return"movementY"in e?e.movementY:Ni}}),Cu=_t(Us),Uh=j({},Us,{dataTransfer:0}),Hh=_t(Uh),$h=j({},Cl,{relatedTarget:0}),ki=_t($h),Gh=j({},ma,{animationName:0,elapsedTime:0,pseudoElement:0}),qh=_t(Gh),Yh=j({},ma,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Zh=_t(Yh),Xh=j({},ma,{data:0}),Ru=_t(Xh),Fh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Vh={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"},Qh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Jh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Qh[e])?!!t[e]:!1}function Ei(){return Jh}var Kh=j({},Cl,{key:function(e){if(e.key){var t=Fh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Vh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ei,charCode:function(e){return e.type==="keypress"?Ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ih=_t(Kh),Wh=j({},Us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_u=_t(Wh),Ph=j({},Cl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ei}),ex=_t(Ph),tx=j({},ma,{propertyName:0,elapsedTime:0,pseudoElement:0}),nx=_t(tx),ax=j({},Us,{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}),lx=_t(ax),sx=j({},ma,{newState:0,oldState:0}),rx=_t(sx),ix=[9,13,27,32],Ti=vn&&"CompositionEvent"in window,_l=null;vn&&"documentMode"in document&&(_l=document.documentMode);var ox=vn&&"TextEvent"in window&&!_l,Ou=vn&&(!Ti||_l&&8<_l&&11>=_l),Mu=" ",zu=!1;function Du(e,t){switch(e){case"keyup":return ix.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ya=!1;function cx(e,t){switch(e){case"compositionend":return Lu(t);case"keypress":return t.which!==32?null:(zu=!0,Mu);case"textInput":return e=t.data,e===Mu&&zu?null:e;default:return null}}function ux(e,t){if(Ya)return e==="compositionend"||!Ti&&Du(e,t)?(e=Tu(),zs=wi=Un=null,Ya=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ou&&t.locale!=="ko"?null:t.data;default:return null}}var dx={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 Bu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!dx[e.type]:t==="textarea"}function Uu(e,t,n,a){Ga?qa?qa.push(a):qa=[a]:Ga=a,t=Tr(t,"onChange"),0<t.length&&(n=new Bs("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Ol=null,Ml=null;function fx(e){jm(e,0)}function Hs(e){var t=El(e);if(yu(t))return e}function Hu(e,t){if(e==="change")return t}var $u=!1;if(vn){var Ai;if(vn){var Ci="oninput"in document;if(!Ci){var Gu=document.createElement("div");Gu.setAttribute("oninput","return;"),Ci=typeof Gu.oninput=="function"}Ai=Ci}else Ai=!1;$u=Ai&&(!document.documentMode||9<document.documentMode)}function qu(){Ol&&(Ol.detachEvent("onpropertychange",Yu),Ml=Ol=null)}function Yu(e){if(e.propertyName==="value"&&Hs(Ml)){var t=[];Uu(t,Ml,e,yi(e)),Eu(fx,t)}}function mx(e,t,n){e==="focusin"?(qu(),Ol=t,Ml=n,Ol.attachEvent("onpropertychange",Yu)):e==="focusout"&&qu()}function px(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Hs(Ml)}function hx(e,t){if(e==="click")return Hs(t)}function xx(e,t){if(e==="input"||e==="change")return Hs(t)}function gx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bt=typeof Object.is=="function"?Object.is:gx;function zl(e,t){if(Bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var i=n[a];if(!gn.call(t,i)||!Bt(e[i],t[i]))return!1}return!0}function Zu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xu(e,t){var n=Zu(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Zu(n)}}function Fu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Os(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Os(e.document)}return t}function Ri(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var bx=vn&&"documentMode"in document&&11>=document.documentMode,Za=null,_i=null,Dl=null,Oi=!1;function Qu(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Oi||Za==null||Za!==Os(a)||(a=Za,"selectionStart"in a&&Ri(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Dl&&zl(Dl,a)||(Dl=a,a=Tr(_i,"onSelect"),0<a.length&&(t=new Bs("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Za)))}function pa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Xa={animationend:pa("Animation","AnimationEnd"),animationiteration:pa("Animation","AnimationIteration"),animationstart:pa("Animation","AnimationStart"),transitionrun:pa("Transition","TransitionRun"),transitionstart:pa("Transition","TransitionStart"),transitioncancel:pa("Transition","TransitionCancel"),transitionend:pa("Transition","TransitionEnd")},Mi={},Ju={};vn&&(Ju=document.createElement("div").style,"AnimationEvent"in window||(delete Xa.animationend.animation,delete Xa.animationiteration.animation,delete Xa.animationstart.animation),"TransitionEvent"in window||delete Xa.transitionend.transition);function ha(e){if(Mi[e])return Mi[e];if(!Xa[e])return e;var t=Xa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ju)return Mi[e]=t[n];return e}var Ku=ha("animationend"),Iu=ha("animationiteration"),Wu=ha("animationstart"),yx=ha("transitionrun"),vx=ha("transitionstart"),jx=ha("transitioncancel"),Pu=ha("transitionend"),ed=new Map,zi="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(" ");zi.push("scrollEnd");function nn(e,t){ed.set(e,t),fa(t,[e])}var $s=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=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(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Vt=[],Fa=0,Di=0;function Gs(){for(var e=Fa,t=Di=Fa=0;t<e;){var n=Vt[t];Vt[t++]=null;var a=Vt[t];Vt[t++]=null;var i=Vt[t];Vt[t++]=null;var u=Vt[t];if(Vt[t++]=null,a!==null&&i!==null){var p=a.pending;p===null?i.next=i:(i.next=p.next,p.next=i),a.pending=i}u!==0&&td(n,i,u)}}function qs(e,t,n,a){Vt[Fa++]=e,Vt[Fa++]=t,Vt[Fa++]=n,Vt[Fa++]=a,Di|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Li(e,t,n,a){return qs(e,t,n,a),Ys(e)}function xa(e,t){return qs(e,null,null,t),Ys(e)}function td(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var i=!1,u=e.return;u!==null;)u.childLanes|=n,a=u.alternate,a!==null&&(a.childLanes|=n),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(i=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,i&&t!==null&&(i=31-xt(n),e=u.hiddenUpdates,a=e[i],a===null?e[i]=[t]:a.push(t),t.lane=n|536870912),u):null}function Ys(e){if(50<as)throw as=0,Fo=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Va={};function wx(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ut(e,t,n,a){return new wx(e,t,n,a)}function Bi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jn(e,t){var n=e.alternate;return n===null?(n=Ut(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function nd(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Zs(e,t,n,a,i,u){var p=0;if(a=e,typeof e=="function")Bi(e)&&(p=1);else if(typeof e=="string")p=Tg(e,n,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case te:return e=Ut(31,n,t,i),e.elementType=te,e.lanes=u,e;case S:return ga(n.children,i,u,t);case R:p=8,i|=24;break;case A:return e=Ut(12,n,t,i|2),e.elementType=A,e.lanes=u,e;case $:return e=Ut(13,n,t,i),e.elementType=$,e.lanes=u,e;case ae:return e=Ut(19,n,t,i),e.elementType=ae,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _:p=10;break e;case E:p=9;break e;case D:p=11;break e;case Y:p=14;break e;case se:p=16,a=null;break e}p=29,n=Error(c(130,e===null?"null":typeof e,"")),a=null}return t=Ut(p,n,t,i),t.elementType=e,t.type=a,t.lanes=u,t}function ga(e,t,n,a){return e=Ut(7,e,a,t),e.lanes=n,e}function Ui(e,t,n){return e=Ut(6,e,null,t),e.lanes=n,e}function ad(e){var t=Ut(18,null,null,0);return t.stateNode=e,t}function Hi(e,t,n){return t=Ut(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ld=new WeakMap;function Qt(e,t){if(typeof e=="object"&&e!==null){var n=ld.get(e);return n!==void 0?n:(t={value:e,source:t,stack:xn(t)},ld.set(e,t),t)}return{value:e,source:t,stack:xn(t)}}var Qa=[],Ja=0,Xs=null,Ll=0,Jt=[],Kt=0,Hn=null,on=1,cn="";function wn(e,t){Qa[Ja++]=Ll,Qa[Ja++]=Xs,Xs=e,Ll=t}function sd(e,t,n){Jt[Kt++]=on,Jt[Kt++]=cn,Jt[Kt++]=Hn,Hn=e;var a=on;e=cn;var i=32-xt(a)-1;a&=~(1<<i),n+=1;var u=32-xt(t)+i;if(30<u){var p=i-i%5;u=(a&(1<<p)-1).toString(32),a>>=p,i-=p,on=1<<32-xt(t)+i|n<<i|a,cn=u+e}else on=1<<u|n<<i|a,cn=e}function $i(e){e.return!==null&&(wn(e,1),sd(e,1,0))}function Gi(e){for(;e===Xs;)Xs=Qa[--Ja],Qa[Ja]=null,Ll=Qa[--Ja],Qa[Ja]=null;for(;e===Hn;)Hn=Jt[--Kt],Jt[Kt]=null,cn=Jt[--Kt],Jt[Kt]=null,on=Jt[--Kt],Jt[Kt]=null}function rd(e,t){Jt[Kt++]=on,Jt[Kt++]=cn,Jt[Kt++]=Hn,on=t.id,cn=t.overflow,Hn=e}var bt=null,Ke=null,Me=!1,$n=null,It=!1,qi=Error(c(519));function Gn(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Bl(Qt(t,e)),qi}function id(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[gt]=e,t[Rt]=a,n){case"dialog":Re("cancel",t),Re("close",t);break;case"iframe":case"object":case"embed":Re("load",t);break;case"video":case"audio":for(n=0;n<ss.length;n++)Re(ss[n],t);break;case"source":Re("error",t);break;case"img":case"image":case"link":Re("error",t),Re("load",t);break;case"details":Re("toggle",t);break;case"input":Re("invalid",t),vu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Re("invalid",t);break;case"textarea":Re("invalid",t),wu(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||km(t.textContent,n)?(a.popover!=null&&(Re("beforetoggle",t),Re("toggle",t)),a.onScroll!=null&&Re("scroll",t),a.onScrollEnd!=null&&Re("scrollend",t),a.onClick!=null&&(t.onclick=yn),t=!0):t=!1,t||Gn(e,!0)}function od(e){for(bt=e.return;bt;)switch(bt.tag){case 5:case 31:case 13:It=!1;return;case 27:case 3:It=!0;return;default:bt=bt.return}}function Ka(e){if(e!==bt)return!1;if(!Me)return od(e),Me=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||ic(e.type,e.memoizedProps)),n=!n),n&&Ke&&Gn(e),od(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ke=zm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ke=zm(e)}else t===27?(t=Ke,ta(e.type)?(e=fc,fc=null,Ke=e):Ke=t):Ke=bt?Pt(e.stateNode.nextSibling):null;return!0}function ba(){Ke=bt=null,Me=!1}function Yi(){var e=$n;return e!==null&&(Dt===null?Dt=e:Dt.push.apply(Dt,e),$n=null),e}function Bl(e){$n===null?$n=[e]:$n.push(e)}var Zi=k(null),ya=null,Sn=null;function qn(e,t,n){B(Zi,t._currentValue),t._currentValue=n}function Nn(e){e._currentValue=Zi.current,O(Zi)}function Xi(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function Fi(e,t,n,a){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var u=i.dependencies;if(u!==null){var p=i.child;u=u.firstContext;e:for(;u!==null;){var y=u;u=i;for(var C=0;C<t.length;C++)if(y.context===t[C]){u.lanes|=n,y=u.alternate,y!==null&&(y.lanes|=n),Xi(u.return,n,e),a||(p=null);break e}u=y.next}}else if(i.tag===18){if(p=i.return,p===null)throw Error(c(341));p.lanes|=n,u=p.alternate,u!==null&&(u.lanes|=n),Xi(p,n,e),p=null}else p=i.child;if(p!==null)p.return=i;else for(p=i;p!==null;){if(p===e){p=null;break}if(i=p.sibling,i!==null){i.return=p.return,p=i;break}p=p.return}i=p}}function Ia(e,t,n,a){e=null;for(var i=t,u=!1;i!==null;){if(!u){if((i.flags&524288)!==0)u=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var p=i.alternate;if(p===null)throw Error(c(387));if(p=p.memoizedProps,p!==null){var y=i.type;Bt(i.pendingProps.value,p.value)||(e!==null?e.push(y):e=[y])}}else if(i===xe.current){if(p=i.alternate,p===null)throw Error(c(387));p.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(us):e=[us])}i=i.return}e!==null&&Fi(t,e,n,a),t.flags|=262144}function Fs(e){for(e=e.firstContext;e!==null;){if(!Bt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function va(e){ya=e,Sn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function yt(e){return cd(ya,e)}function Vs(e,t){return ya===null&&va(e),cd(e,t)}function cd(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Sn===null){if(e===null)throw Error(c(308));Sn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Sn=Sn.next=t;return n}var Sx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Nx=s.unstable_scheduleCallback,kx=s.unstable_NormalPriority,lt={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vi(){return{controller:new Sx,data:new Map,refCount:0}}function Ul(e){e.refCount--,e.refCount===0&&Nx(kx,function(){e.controller.abort()})}var Hl=null,Qi=0,Wa=0,Pa=null;function Ex(e,t){if(Hl===null){var n=Hl=[];Qi=0,Wa=Wo(),Pa={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Qi++,t.then(ud,ud),t}function ud(){if(--Qi===0&&Hl!==null){Pa!==null&&(Pa.status="fulfilled");var e=Hl;Hl=null,Wa=0,Pa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Tx(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(a.status="rejected",a.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),a}var dd=z.S;z.S=function(e,t){Jf=je(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ex(e,t),dd!==null&&dd(e,t)};var ja=k(null);function Ji(){var e=ja.current;return e!==null?e:Qe.pooledCache}function Qs(e,t){t===null?B(ja,ja.current):B(ja,t.pool)}function fd(){var e=Ji();return e===null?null:{parent:lt._currentValue,pool:e}}var el=Error(c(460)),Ki=Error(c(474)),Js=Error(c(542)),Ks={then:function(){}};function md(e){return e=e.status,e==="fulfilled"||e==="rejected"}function pd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(yn,yn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xd(e),e;default:if(typeof t.status=="string")t.then(yn,yn);else{if(e=Qe,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=a}},function(a){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xd(e),e}throw Sa=t,el}}function wa(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Sa=n,el):n}}var Sa=null;function hd(){if(Sa===null)throw Error(c(459));var e=Sa;return Sa=null,e}function xd(e){if(e===el||e===Js)throw Error(c(483))}var tl=null,$l=0;function Is(e){var t=$l;return $l+=1,tl===null&&(tl=[]),pd(tl,e,t)}function Gl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ws(e,t){throw t.$$typeof===T?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function gd(e){function t(L,M){if(e){var U=L.deletions;U===null?(L.deletions=[M],L.flags|=16):U.push(M)}}function n(L,M){if(!e)return null;for(;M!==null;)t(L,M),M=M.sibling;return null}function a(L){for(var M=new Map;L!==null;)L.key!==null?M.set(L.key,L):M.set(L.index,L),L=L.sibling;return M}function i(L,M){return L=jn(L,M),L.index=0,L.sibling=null,L}function u(L,M,U){return L.index=U,e?(U=L.alternate,U!==null?(U=U.index,U<M?(L.flags|=67108866,M):U):(L.flags|=67108866,M)):(L.flags|=1048576,M)}function p(L){return e&&L.alternate===null&&(L.flags|=67108866),L}function y(L,M,U,V){return M===null||M.tag!==6?(M=Ui(U,L.mode,V),M.return=L,M):(M=i(M,U),M.return=L,M)}function C(L,M,U,V){var he=U.type;return he===S?Z(L,M,U.props.children,V,U.key):M!==null&&(M.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===se&&wa(he)===M.type)?(M=i(M,U.props),Gl(M,U),M.return=L,M):(M=Zs(U.type,U.key,U.props,null,L.mode,V),Gl(M,U),M.return=L,M)}function H(L,M,U,V){return M===null||M.tag!==4||M.stateNode.containerInfo!==U.containerInfo||M.stateNode.implementation!==U.implementation?(M=Hi(U,L.mode,V),M.return=L,M):(M=i(M,U.children||[]),M.return=L,M)}function Z(L,M,U,V,he){return M===null||M.tag!==7?(M=ga(U,L.mode,V,he),M.return=L,M):(M=i(M,U),M.return=L,M)}function K(L,M,U){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Ui(""+M,L.mode,U),M.return=L,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case N:return U=Zs(M.type,M.key,M.props,null,L.mode,U),Gl(U,M),U.return=L,U;case w:return M=Hi(M,L.mode,U),M.return=L,M;case se:return M=wa(M),K(L,M,U)}if(pe(M)||oe(M))return M=ga(M,L.mode,U,null),M.return=L,M;if(typeof M.then=="function")return K(L,Is(M),U);if(M.$$typeof===_)return K(L,Vs(L,M),U);Ws(L,M)}return null}function G(L,M,U,V){var he=M!==null?M.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return he!==null?null:y(L,M,""+U,V);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case N:return U.key===he?C(L,M,U,V):null;case w:return U.key===he?H(L,M,U,V):null;case se:return U=wa(U),G(L,M,U,V)}if(pe(U)||oe(U))return he!==null?null:Z(L,M,U,V,null);if(typeof U.then=="function")return G(L,M,Is(U),V);if(U.$$typeof===_)return G(L,M,Vs(L,U),V);Ws(L,U)}return null}function q(L,M,U,V,he){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return L=L.get(U)||null,y(M,L,""+V,he);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case N:return L=L.get(V.key===null?U:V.key)||null,C(M,L,V,he);case w:return L=L.get(V.key===null?U:V.key)||null,H(M,L,V,he);case se:return V=wa(V),q(L,M,U,V,he)}if(pe(V)||oe(V))return L=L.get(U)||null,Z(M,L,V,he,null);if(typeof V.then=="function")return q(L,M,U,Is(V),he);if(V.$$typeof===_)return q(L,M,U,Vs(M,V),he);Ws(M,V)}return null}function de(L,M,U,V){for(var he=null,Le=null,me=M,ke=M=0,Oe=null;me!==null&&ke<U.length;ke++){me.index>ke?(Oe=me,me=null):Oe=me.sibling;var Be=G(L,me,U[ke],V);if(Be===null){me===null&&(me=Oe);break}e&&me&&Be.alternate===null&&t(L,me),M=u(Be,M,ke),Le===null?he=Be:Le.sibling=Be,Le=Be,me=Oe}if(ke===U.length)return n(L,me),Me&&wn(L,ke),he;if(me===null){for(;ke<U.length;ke++)me=K(L,U[ke],V),me!==null&&(M=u(me,M,ke),Le===null?he=me:Le.sibling=me,Le=me);return Me&&wn(L,ke),he}for(me=a(me);ke<U.length;ke++)Oe=q(me,L,ke,U[ke],V),Oe!==null&&(e&&Oe.alternate!==null&&me.delete(Oe.key===null?ke:Oe.key),M=u(Oe,M,ke),Le===null?he=Oe:Le.sibling=Oe,Le=Oe);return e&&me.forEach(function(ra){return t(L,ra)}),Me&&wn(L,ke),he}function be(L,M,U,V){if(U==null)throw Error(c(151));for(var he=null,Le=null,me=M,ke=M=0,Oe=null,Be=U.next();me!==null&&!Be.done;ke++,Be=U.next()){me.index>ke?(Oe=me,me=null):Oe=me.sibling;var ra=G(L,me,Be.value,V);if(ra===null){me===null&&(me=Oe);break}e&&me&&ra.alternate===null&&t(L,me),M=u(ra,M,ke),Le===null?he=ra:Le.sibling=ra,Le=ra,me=Oe}if(Be.done)return n(L,me),Me&&wn(L,ke),he;if(me===null){for(;!Be.done;ke++,Be=U.next())Be=K(L,Be.value,V),Be!==null&&(M=u(Be,M,ke),Le===null?he=Be:Le.sibling=Be,Le=Be);return Me&&wn(L,ke),he}for(me=a(me);!Be.done;ke++,Be=U.next())Be=q(me,L,ke,Be.value,V),Be!==null&&(e&&Be.alternate!==null&&me.delete(Be.key===null?ke:Be.key),M=u(Be,M,ke),Le===null?he=Be:Le.sibling=Be,Le=Be);return e&&me.forEach(function(Ug){return t(L,Ug)}),Me&&wn(L,ke),he}function Fe(L,M,U,V){if(typeof U=="object"&&U!==null&&U.type===S&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case N:e:{for(var he=U.key;M!==null;){if(M.key===he){if(he=U.type,he===S){if(M.tag===7){n(L,M.sibling),V=i(M,U.props.children),V.return=L,L=V;break e}}else if(M.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===se&&wa(he)===M.type){n(L,M.sibling),V=i(M,U.props),Gl(V,U),V.return=L,L=V;break e}n(L,M);break}else t(L,M);M=M.sibling}U.type===S?(V=ga(U.props.children,L.mode,V,U.key),V.return=L,L=V):(V=Zs(U.type,U.key,U.props,null,L.mode,V),Gl(V,U),V.return=L,L=V)}return p(L);case w:e:{for(he=U.key;M!==null;){if(M.key===he)if(M.tag===4&&M.stateNode.containerInfo===U.containerInfo&&M.stateNode.implementation===U.implementation){n(L,M.sibling),V=i(M,U.children||[]),V.return=L,L=V;break e}else{n(L,M);break}else t(L,M);M=M.sibling}V=Hi(U,L.mode,V),V.return=L,L=V}return p(L);case se:return U=wa(U),Fe(L,M,U,V)}if(pe(U))return de(L,M,U,V);if(oe(U)){if(he=oe(U),typeof he!="function")throw Error(c(150));return U=he.call(U),be(L,M,U,V)}if(typeof U.then=="function")return Fe(L,M,Is(U),V);if(U.$$typeof===_)return Fe(L,M,Vs(L,U),V);Ws(L,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,M!==null&&M.tag===6?(n(L,M.sibling),V=i(M,U),V.return=L,L=V):(n(L,M),V=Ui(U,L.mode,V),V.return=L,L=V),p(L)):n(L,M)}return function(L,M,U,V){try{$l=0;var he=Fe(L,M,U,V);return tl=null,he}catch(me){if(me===el||me===Js)throw me;var Le=Ut(29,me,null,L.mode);return Le.lanes=V,Le.return=L,Le}finally{}}}var Na=gd(!0),bd=gd(!1),Yn=!1;function Ii(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Zn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Xn(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(He&2)!==0){var i=a.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),a.pending=t,t=Ys(e),td(e,null,n),t}return qs(e,a,t,n),Ys(e)}function ql(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,cu(e,n)}}function Pi(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var i=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var p={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?i=u=p:u=u.next=p,n=n.next}while(n!==null);u===null?i=u=t:u=u.next=t}else i=u=t;n={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var eo=!1;function Yl(){if(eo){var e=Pa;if(e!==null)throw e}}function Zl(e,t,n,a){eo=!1;var i=e.updateQueue;Yn=!1;var u=i.firstBaseUpdate,p=i.lastBaseUpdate,y=i.shared.pending;if(y!==null){i.shared.pending=null;var C=y,H=C.next;C.next=null,p===null?u=H:p.next=H,p=C;var Z=e.alternate;Z!==null&&(Z=Z.updateQueue,y=Z.lastBaseUpdate,y!==p&&(y===null?Z.firstBaseUpdate=H:y.next=H,Z.lastBaseUpdate=C))}if(u!==null){var K=i.baseState;p=0,Z=H=C=null,y=u;do{var G=y.lane&-536870913,q=G!==y.lane;if(q?(_e&G)===G:(a&G)===G){G!==0&&G===Wa&&(eo=!0),Z!==null&&(Z=Z.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});e:{var de=e,be=y;G=t;var Fe=n;switch(be.tag){case 1:if(de=be.payload,typeof de=="function"){K=de.call(Fe,K,G);break e}K=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=be.payload,G=typeof de=="function"?de.call(Fe,K,G):de,G==null)break e;K=j({},K,G);break e;case 2:Yn=!0}}G=y.callback,G!==null&&(e.flags|=64,q&&(e.flags|=8192),q=i.callbacks,q===null?i.callbacks=[G]:q.push(G))}else q={lane:G,tag:y.tag,payload:y.payload,callback:y.callback,next:null},Z===null?(H=Z=q,C=K):Z=Z.next=q,p|=G;if(y=y.next,y===null){if(y=i.shared.pending,y===null)break;q=y,y=q.next,q.next=null,i.lastBaseUpdate=q,i.shared.pending=null}}while(!0);Z===null&&(C=K),i.baseState=C,i.firstBaseUpdate=H,i.lastBaseUpdate=Z,u===null&&(i.shared.lanes=0),Kn|=p,e.lanes=p,e.memoizedState=K}}function yd(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function vd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)yd(n[e],t)}var nl=k(null),Ps=k(0);function jd(e,t){e=Mn,B(Ps,e),B(nl,t),Mn=e|t.baseLanes}function to(){B(Ps,Mn),B(nl,nl.current)}function no(){Mn=Ps.current,O(nl),O(Ps)}var Ht=k(null),Wt=null;function Fn(e){var t=e.alternate;B(nt,nt.current&1),B(Ht,e),Wt===null&&(t===null||nl.current!==null||t.memoizedState!==null)&&(Wt=e)}function ao(e){B(nt,nt.current),B(Ht,e),Wt===null&&(Wt=e)}function wd(e){e.tag===22?(B(nt,nt.current),B(Ht,e),Wt===null&&(Wt=e)):Vn()}function Vn(){B(nt,nt.current),B(Ht,Ht.current)}function $t(e){O(Ht),Wt===e&&(Wt=null),O(nt)}var nt=k(0);function er(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||uc(n)||dc(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var kn=0,Ne=null,Ze=null,st=null,tr=!1,al=!1,ka=!1,nr=0,Xl=0,ll=null,Ax=0;function et(){throw Error(c(321))}function lo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Bt(e[n],t[n]))return!1;return!0}function so(e,t,n,a,i,u){return kn=u,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?sf:jo,ka=!1,u=n(a,i),ka=!1,al&&(u=Nd(t,n,a,i)),Sd(e),u}function Sd(e){z.H=Ql;var t=Ze!==null&&Ze.next!==null;if(kn=0,st=Ze=Ne=null,tr=!1,Xl=0,ll=null,t)throw Error(c(300));e===null||rt||(e=e.dependencies,e!==null&&Fs(e)&&(rt=!0))}function Nd(e,t,n,a){Ne=e;var i=0;do{if(al&&(ll=null),Xl=0,al=!1,25<=i)throw Error(c(301));if(i+=1,st=Ze=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}z.H=rf,u=t(n,a)}while(al);return u}function Cx(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?Fl(t):t,e=e.useState()[0],(Ze!==null?Ze.memoizedState:null)!==e&&(Ne.flags|=1024),t}function ro(){var e=nr!==0;return nr=0,e}function io(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function oo(e){if(tr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}tr=!1}kn=0,st=Ze=Ne=null,al=!1,Xl=nr=0,ll=null}function Tt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?Ne.memoizedState=st=e:st=st.next=e,st}function at(){if(Ze===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Ze.next;var t=st===null?Ne.memoizedState:st.next;if(t!==null)st=t,Ze=e;else{if(e===null)throw Ne.alternate===null?Error(c(467)):Error(c(310));Ze=e,e={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},st===null?Ne.memoizedState=st=e:st=st.next=e}return st}function ar(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Fl(e){var t=Xl;return Xl+=1,ll===null&&(ll=[]),e=pd(ll,e,t),t=Ne,(st===null?t.memoizedState:st.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?sf:jo),e}function lr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Fl(e);if(e.$$typeof===_)return yt(e)}throw Error(c(438,String(e)))}function co(e){var t=null,n=Ne.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Ne.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=ar(),Ne.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=Q;return t.index++,n}function En(e,t){return typeof t=="function"?t(e):t}function sr(e){var t=at();return uo(t,Ze,e)}function uo(e,t,n){var a=e.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=n;var i=e.baseQueue,u=a.pending;if(u!==null){if(i!==null){var p=i.next;i.next=u.next,u.next=p}t.baseQueue=i=u,a.pending=null}if(u=e.baseState,i===null)e.memoizedState=u;else{t=i.next;var y=p=null,C=null,H=t,Z=!1;do{var K=H.lane&-536870913;if(K!==H.lane?(_e&K)===K:(kn&K)===K){var G=H.revertLane;if(G===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),K===Wa&&(Z=!0);else if((kn&G)===G){H=H.next,G===Wa&&(Z=!0);continue}else K={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},C===null?(y=C=K,p=u):C=C.next=K,Ne.lanes|=G,Kn|=G;K=H.action,ka&&n(u,K),u=H.hasEagerState?H.eagerState:n(u,K)}else G={lane:K,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},C===null?(y=C=G,p=u):C=C.next=G,Ne.lanes|=K,Kn|=K;H=H.next}while(H!==null&&H!==t);if(C===null?p=u:C.next=y,!Bt(u,e.memoizedState)&&(rt=!0,Z&&(n=Pa,n!==null)))throw n;e.memoizedState=u,e.baseState=p,e.baseQueue=C,a.lastRenderedState=u}return i===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function fo(e){var t=at(),n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=e;var a=n.dispatch,i=n.pending,u=t.memoizedState;if(i!==null){n.pending=null;var p=i=i.next;do u=e(u,p.action),p=p.next;while(p!==i);Bt(u,t.memoizedState)||(rt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,a]}function kd(e,t,n){var a=Ne,i=at(),u=Me;if(u){if(n===void 0)throw Error(c(407));n=n()}else n=t();var p=!Bt((Ze||i).memoizedState,n);if(p&&(i.memoizedState=n,rt=!0),i=i.queue,ho(Ad.bind(null,a,i,e),[e]),i.getSnapshot!==t||p||st!==null&&st.memoizedState.tag&1){if(a.flags|=2048,sl(9,{destroy:void 0},Td.bind(null,a,i,n,t),null),Qe===null)throw Error(c(349));u||(kn&127)!==0||Ed(a,t,n)}return n}function Ed(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ne.updateQueue,t===null?(t=ar(),Ne.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Td(e,t,n,a){t.value=n,t.getSnapshot=a,Cd(t)&&Rd(e)}function Ad(e,t,n){return n(function(){Cd(t)&&Rd(e)})}function Cd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Bt(e,n)}catch{return!0}}function Rd(e){var t=xa(e,2);t!==null&&Lt(t,e,2)}function mo(e){var t=Tt();if(typeof e=="function"){var n=e;if(e=n(),ka){Et(!0);try{n()}finally{Et(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:En,lastRenderedState:e},t}function _d(e,t,n,a){return e.baseState=n,uo(e,Ze,typeof a=="function"?a:En)}function Rx(e,t,n,a,i){if(or(e))throw Error(c(485));if(e=t.action,e!==null){var u={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){u.listeners.push(p)}};z.T!==null?n(!0):u.isTransition=!1,a(u),n=t.pending,n===null?(u.next=t.pending=u,Od(t,u)):(u.next=n.next,t.pending=n.next=u)}}function Od(e,t){var n=t.action,a=t.payload,i=e.state;if(t.isTransition){var u=z.T,p={};z.T=p;try{var y=n(i,a),C=z.S;C!==null&&C(p,y),Md(e,t,y)}catch(H){po(e,t,H)}finally{u!==null&&p.types!==null&&(u.types=p.types),z.T=u}}else try{u=n(i,a),Md(e,t,u)}catch(H){po(e,t,H)}}function Md(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){zd(e,t,a)},function(a){return po(e,t,a)}):zd(e,t,n)}function zd(e,t,n){t.status="fulfilled",t.value=n,Dd(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Od(e,n)))}function po(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Dd(t),t=t.next;while(t!==a)}e.action=null}function Dd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ld(e,t){return t}function Bd(e,t){if(Me){var n=Qe.formState;if(n!==null){e:{var a=Ne;if(Me){if(Ke){t:{for(var i=Ke,u=It;i.nodeType!==8;){if(!u){i=null;break t}if(i=Pt(i.nextSibling),i===null){i=null;break t}}u=i.data,i=u==="F!"||u==="F"?i:null}if(i){Ke=Pt(i.nextSibling),a=i.data==="F!";break e}}Gn(a)}a=!1}a&&(t=n[0])}}return n=Tt(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ld,lastRenderedState:t},n.queue=a,n=nf.bind(null,Ne,a),a.dispatch=n,a=mo(!1),u=vo.bind(null,Ne,!1,a.queue),a=Tt(),i={state:t,dispatch:null,action:e,pending:null},a.queue=i,n=Rx.bind(null,Ne,i,u,n),i.dispatch=n,a.memoizedState=e,[t,n,!1]}function Ud(e){var t=at();return Hd(t,Ze,e)}function Hd(e,t,n){if(t=uo(e,t,Ld)[0],e=sr(En)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Fl(t)}catch(p){throw p===el?Js:p}else a=t;t=at();var i=t.queue,u=i.dispatch;return n!==t.memoizedState&&(Ne.flags|=2048,sl(9,{destroy:void 0},_x.bind(null,i,n),null)),[a,u,e]}function _x(e,t){e.action=t}function $d(e){var t=at(),n=Ze;if(n!==null)return Hd(t,n,e);at(),t=t.memoizedState,n=at();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function sl(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Ne.updateQueue,t===null&&(t=ar(),Ne.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Gd(){return at().memoizedState}function rr(e,t,n,a){var i=Tt();Ne.flags|=e,i.memoizedState=sl(1|t,{destroy:void 0},n,a===void 0?null:a)}function ir(e,t,n,a){var i=at();a=a===void 0?null:a;var u=i.memoizedState.inst;Ze!==null&&a!==null&&lo(a,Ze.memoizedState.deps)?i.memoizedState=sl(t,u,n,a):(Ne.flags|=e,i.memoizedState=sl(1|t,u,n,a))}function qd(e,t){rr(8390656,8,e,t)}function ho(e,t){ir(2048,8,e,t)}function Ox(e){Ne.flags|=4;var t=Ne.updateQueue;if(t===null)t=ar(),Ne.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Yd(e){var t=at().memoizedState;return Ox({ref:t,nextImpl:e}),function(){if((He&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function Zd(e,t){return ir(4,2,e,t)}function Xd(e,t){return ir(4,4,e,t)}function Fd(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Vd(e,t,n){n=n!=null?n.concat([e]):null,ir(4,4,Fd.bind(null,t,e),n)}function xo(){}function Qd(e,t){var n=at();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&lo(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Jd(e,t){var n=at();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&lo(t,a[1]))return a[0];if(a=e(),ka){Et(!0);try{e()}finally{Et(!1)}}return n.memoizedState=[a,t],a}function go(e,t,n){return n===void 0||(kn&1073741824)!==0&&(_e&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=If(),Ne.lanes|=e,Kn|=e,n)}function Kd(e,t,n,a){return Bt(n,t)?n:nl.current!==null?(e=go(e,n,a),Bt(e,t)||(rt=!0),e):(kn&42)===0||(kn&1073741824)!==0&&(_e&261930)===0?(rt=!0,e.memoizedState=n):(e=If(),Ne.lanes|=e,Kn|=e,t)}function Id(e,t,n,a,i){var u=ne.p;ne.p=u!==0&&8>u?u:8;var p=z.T,y={};z.T=y,vo(e,!1,t,n);try{var C=i(),H=z.S;if(H!==null&&H(y,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var Z=Tx(C,a);Vl(e,t,Z,Yt(e))}else Vl(e,t,a,Yt(e))}catch(K){Vl(e,t,{then:function(){},status:"rejected",reason:K},Yt())}finally{ne.p=u,p!==null&&y.types!==null&&(p.types=y.types),z.T=p}}function Mx(){}function bo(e,t,n,a){if(e.tag!==5)throw Error(c(476));var i=Wd(e).queue;Id(e,i,t,ie,n===null?Mx:function(){return Pd(e),n(a)})}function Wd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:En,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:En,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Pd(e){var t=Wd(e);t.next===null&&(t=e.alternate.memoizedState),Vl(e,t.next.queue,{},Yt())}function yo(){return yt(us)}function ef(){return at().memoizedState}function tf(){return at().memoizedState}function zx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Yt();e=Zn(n);var a=Xn(t,e,n);a!==null&&(Lt(a,t,n),ql(a,t,n)),t={cache:Vi()},e.payload=t;return}t=t.return}}function Dx(e,t,n){var a=Yt();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},or(e)?af(t,n):(n=Li(e,t,n,a),n!==null&&(Lt(n,e,a),lf(n,t,a)))}function nf(e,t,n){var a=Yt();Vl(e,t,n,a)}function Vl(e,t,n,a){var i={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(or(e))af(t,i);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var p=t.lastRenderedState,y=u(p,n);if(i.hasEagerState=!0,i.eagerState=y,Bt(y,p))return qs(e,t,i,0),Qe===null&&Gs(),!1}catch{}finally{}if(n=Li(e,t,i,a),n!==null)return Lt(n,e,a),lf(n,t,a),!0}return!1}function vo(e,t,n,a){if(a={lane:2,revertLane:Wo(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},or(e)){if(t)throw Error(c(479))}else t=Li(e,n,a,2),t!==null&&Lt(t,e,2)}function or(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function af(e,t){al=tr=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function lf(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,cu(e,n)}}var Ql={readContext:yt,use:lr,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};Ql.useEffectEvent=et;var sf={readContext:yt,use:lr,useCallback:function(e,t){return Tt().memoizedState=[e,t===void 0?null:t],e},useContext:yt,useEffect:qd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,rr(4194308,4,Fd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rr(4194308,4,e,t)},useInsertionEffect:function(e,t){rr(4,2,e,t)},useMemo:function(e,t){var n=Tt();t=t===void 0?null:t;var a=e();if(ka){Et(!0);try{e()}finally{Et(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Tt();if(n!==void 0){var i=n(t);if(ka){Et(!0);try{n(t)}finally{Et(!1)}}}else i=t;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=Dx.bind(null,Ne,e),[a.memoizedState,e]},useRef:function(e){var t=Tt();return e={current:e},t.memoizedState=e},useState:function(e){e=mo(e);var t=e.queue,n=nf.bind(null,Ne,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:xo,useDeferredValue:function(e,t){var n=Tt();return go(n,e,t)},useTransition:function(){var e=mo(!1);return e=Id.bind(null,Ne,e.queue,!0,!1),Tt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Ne,i=Tt();if(Me){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),Qe===null)throw Error(c(349));(_e&127)!==0||Ed(a,t,n)}i.memoizedState=n;var u={value:n,getSnapshot:t};return i.queue=u,qd(Ad.bind(null,a,u,e),[e]),a.flags|=2048,sl(9,{destroy:void 0},Td.bind(null,a,u,n,t),null),n},useId:function(){var e=Tt(),t=Qe.identifierPrefix;if(Me){var n=cn,a=on;n=(a&~(1<<32-xt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=nr++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Ax++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:yo,useFormState:Bd,useActionState:Bd,useOptimistic:function(e){var t=Tt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=vo.bind(null,Ne,!0,n),n.dispatch=t,[e,t]},useMemoCache:co,useCacheRefresh:function(){return Tt().memoizedState=zx.bind(null,Ne)},useEffectEvent:function(e){var t=Tt(),n={impl:e};return t.memoizedState=n,function(){if((He&2)!==0)throw Error(c(440));return n.impl.apply(void 0,arguments)}}},jo={readContext:yt,use:lr,useCallback:Qd,useContext:yt,useEffect:ho,useImperativeHandle:Vd,useInsertionEffect:Zd,useLayoutEffect:Xd,useMemo:Jd,useReducer:sr,useRef:Gd,useState:function(){return sr(En)},useDebugValue:xo,useDeferredValue:function(e,t){var n=at();return Kd(n,Ze.memoizedState,e,t)},useTransition:function(){var e=sr(En)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Fl(e),t]},useSyncExternalStore:kd,useId:ef,useHostTransitionStatus:yo,useFormState:Ud,useActionState:Ud,useOptimistic:function(e,t){var n=at();return _d(n,Ze,e,t)},useMemoCache:co,useCacheRefresh:tf};jo.useEffectEvent=Yd;var rf={readContext:yt,use:lr,useCallback:Qd,useContext:yt,useEffect:ho,useImperativeHandle:Vd,useInsertionEffect:Zd,useLayoutEffect:Xd,useMemo:Jd,useReducer:fo,useRef:Gd,useState:function(){return fo(En)},useDebugValue:xo,useDeferredValue:function(e,t){var n=at();return Ze===null?go(n,e,t):Kd(n,Ze.memoizedState,e,t)},useTransition:function(){var e=fo(En)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Fl(e),t]},useSyncExternalStore:kd,useId:ef,useHostTransitionStatus:yo,useFormState:$d,useActionState:$d,useOptimistic:function(e,t){var n=at();return Ze!==null?_d(n,Ze,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:co,useCacheRefresh:tf};rf.useEffectEvent=Yd;function wo(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:j({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var So={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Yt(),i=Zn(a);i.payload=t,n!=null&&(i.callback=n),t=Xn(e,i,a),t!==null&&(Lt(t,e,a),ql(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Yt(),i=Zn(a);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Xn(e,i,a),t!==null&&(Lt(t,e,a),ql(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Yt(),a=Zn(n);a.tag=2,t!=null&&(a.callback=t),t=Xn(e,a,n),t!==null&&(Lt(t,e,n),ql(t,e,n))}};function of(e,t,n,a,i,u,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,p):t.prototype&&t.prototype.isPureReactComponent?!zl(n,a)||!zl(i,u):!0}function cf(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&So.enqueueReplaceState(t,t.state,null)}function Ea(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=j({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function uf(e){$s(e)}function df(e){console.error(e)}function ff(e){$s(e)}function cr(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function mf(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function No(e,t,n){return n=Zn(n),n.tag=3,n.payload={element:null},n.callback=function(){cr(e,t)},n}function pf(e){return e=Zn(e),e.tag=3,e}function hf(e,t,n,a){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var u=a.value;e.payload=function(){return i(u)},e.callback=function(){mf(t,n,a)}}var p=n.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){mf(t,n,a),typeof i!="function"&&(In===null?In=new Set([this]):In.add(this));var y=a.stack;this.componentDidCatch(a.value,{componentStack:y!==null?y:""})})}function Lx(e,t,n,a,i){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Ia(t,n,i,!0),n=Ht.current,n!==null){switch(n.tag){case 31:case 13:return Wt===null?jr():n.alternate===null&&tt===0&&(tt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,a===Ks?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Jo(e,a,i)),!1;case 22:return n.flags|=65536,a===Ks?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),Jo(e,a,i)),!1}throw Error(c(435,n.tag))}return Jo(e,a,i),jr(),!1}if(Me)return t=Ht.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,a!==qi&&(e=Error(c(422),{cause:a}),Bl(Qt(e,n)))):(a!==qi&&(t=Error(c(423),{cause:a}),Bl(Qt(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,a=Qt(a,n),i=No(e.stateNode,a,i),Pi(e,i),tt!==4&&(tt=2)),!1;var u=Error(c(520),{cause:a});if(u=Qt(u,n),ns===null?ns=[u]:ns.push(u),tt!==4&&(tt=2),t===null)return!0;a=Qt(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=No(n.stateNode,a,e),Pi(n,e),!1;case 1:if(t=n.type,u=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(In===null||!In.has(u))))return n.flags|=65536,i&=-i,n.lanes|=i,i=pf(i),hf(i,e,n,a),Pi(n,i),!1}n=n.return}while(n!==null);return!1}var ko=Error(c(461)),rt=!1;function vt(e,t,n,a){t.child=e===null?bd(t,null,n,a):Na(t,e.child,n,a)}function xf(e,t,n,a,i){n=n.render;var u=t.ref;if("ref"in a){var p={};for(var y in a)y!=="ref"&&(p[y]=a[y])}else p=a;return va(t),a=so(e,t,n,p,u,i),y=ro(),e!==null&&!rt?(io(e,t,i),Tn(e,t,i)):(Me&&y&&$i(t),t.flags|=1,vt(e,t,a,i),t.child)}function gf(e,t,n,a,i){if(e===null){var u=n.type;return typeof u=="function"&&!Bi(u)&&u.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=u,bf(e,t,u,a,i)):(e=Zs(n.type,null,a,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Mo(e,i)){var p=u.memoizedProps;if(n=n.compare,n=n!==null?n:zl,n(p,a)&&e.ref===t.ref)return Tn(e,t,i)}return t.flags|=1,e=jn(u,a),e.ref=t.ref,e.return=t,t.child=e}function bf(e,t,n,a,i){if(e!==null){var u=e.memoizedProps;if(zl(u,a)&&e.ref===t.ref)if(rt=!1,t.pendingProps=a=u,Mo(e,i))(e.flags&131072)!==0&&(rt=!0);else return t.lanes=e.lanes,Tn(e,t,i)}return Eo(e,t,n,a,i)}function yf(e,t,n,a){var i=a.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|n:n,e!==null){for(a=t.child=e.child,i=0;a!==null;)i=i|a.lanes|a.childLanes,a=a.sibling;a=i&~u}else a=0,t.child=null;return vf(e,t,u,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Qs(t,u!==null?u.cachePool:null),u!==null?jd(t,u):to(),wd(t);else return a=t.lanes=536870912,vf(e,t,u!==null?u.baseLanes|n:n,n,a)}else u!==null?(Qs(t,u.cachePool),jd(t,u),Vn(),t.memoizedState=null):(e!==null&&Qs(t,null),to(),Vn());return vt(e,t,i,n),t.child}function Jl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function vf(e,t,n,a,i){var u=Ji();return u=u===null?null:{parent:lt._currentValue,pool:u},t.memoizedState={baseLanes:n,cachePool:u},e!==null&&Qs(t,null),to(),wd(t),e!==null&&Ia(e,t,a,!0),t.childLanes=i,null}function ur(e,t){return t=fr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function jf(e,t,n){return Na(t,e.child,null,n),e=ur(t,t.pendingProps),e.flags|=2,$t(t),t.memoizedState=null,e}function Bx(e,t,n){var a=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Me){if(a.mode==="hidden")return e=ur(t,a),t.lanes=536870912,Jl(null,e);if(ao(t),(e=Ke)?(e=Mm(e,It),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Hn!==null?{id:on,overflow:cn}:null,retryLane:536870912,hydrationErrors:null},n=ad(e),n.return=t,t.child=n,bt=t,Ke=null)):e=null,e===null)throw Gn(t);return t.lanes=536870912,null}return ur(t,a)}var u=e.memoizedState;if(u!==null){var p=u.dehydrated;if(ao(t),i)if(t.flags&256)t.flags&=-257,t=jf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(rt||Ia(e,t,n,!1),i=(n&e.childLanes)!==0,rt||i){if(a=Qe,a!==null&&(p=uu(a,n),p!==0&&p!==u.retryLane))throw u.retryLane=p,xa(e,p),Lt(a,e,p),ko;jr(),t=jf(e,t,n)}else e=u.treeContext,Ke=Pt(p.nextSibling),bt=t,Me=!0,$n=null,It=!1,e!==null&&rd(t,e),t=ur(t,a),t.flags|=4096;return t}return e=jn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function dr(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(c(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Eo(e,t,n,a,i){return va(t),n=so(e,t,n,a,void 0,i),a=ro(),e!==null&&!rt?(io(e,t,i),Tn(e,t,i)):(Me&&a&&$i(t),t.flags|=1,vt(e,t,n,i),t.child)}function wf(e,t,n,a,i,u){return va(t),t.updateQueue=null,n=Nd(t,a,n,i),Sd(e),a=ro(),e!==null&&!rt?(io(e,t,u),Tn(e,t,u)):(Me&&a&&$i(t),t.flags|=1,vt(e,t,n,u),t.child)}function Sf(e,t,n,a,i){if(va(t),t.stateNode===null){var u=Va,p=n.contextType;typeof p=="object"&&p!==null&&(u=yt(p)),u=new n(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=So,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},Ii(t),p=n.contextType,u.context=typeof p=="object"&&p!==null?yt(p):Va,u.state=t.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(wo(t,n,p,a),u.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(p=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),p!==u.state&&So.enqueueReplaceState(u,u.state,null),Zl(t,a,u,i),Yl(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){u=t.stateNode;var y=t.memoizedProps,C=Ea(n,y);u.props=C;var H=u.context,Z=n.contextType;p=Va,typeof Z=="object"&&Z!==null&&(p=yt(Z));var K=n.getDerivedStateFromProps;Z=typeof K=="function"||typeof u.getSnapshotBeforeUpdate=="function",y=t.pendingProps!==y,Z||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(y||H!==p)&&cf(t,u,a,p),Yn=!1;var G=t.memoizedState;u.state=G,Zl(t,a,u,i),Yl(),H=t.memoizedState,y||G!==H||Yn?(typeof K=="function"&&(wo(t,n,K,a),H=t.memoizedState),(C=Yn||of(t,n,C,a,G,H,p))?(Z||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=H),u.props=a,u.state=H,u.context=p,a=C):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,Wi(e,t),p=t.memoizedProps,Z=Ea(n,p),u.props=Z,K=t.pendingProps,G=u.context,H=n.contextType,C=Va,typeof H=="object"&&H!==null&&(C=yt(H)),y=n.getDerivedStateFromProps,(H=typeof y=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(p!==K||G!==C)&&cf(t,u,a,C),Yn=!1,G=t.memoizedState,u.state=G,Zl(t,a,u,i),Yl();var q=t.memoizedState;p!==K||G!==q||Yn||e!==null&&e.dependencies!==null&&Fs(e.dependencies)?(typeof y=="function"&&(wo(t,n,y,a),q=t.memoizedState),(Z=Yn||of(t,n,Z,a,G,q,C)||e!==null&&e.dependencies!==null&&Fs(e.dependencies))?(H||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,q,C),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,q,C)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||p===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=q),u.props=a,u.state=q,u.context=C,a=Z):(typeof u.componentDidUpdate!="function"||p===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),a=!1)}return u=a,dr(e,t),a=(t.flags&128)!==0,u||a?(u=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&a?(t.child=Na(t,e.child,null,i),t.child=Na(t,null,n,i)):vt(e,t,n,i),t.memoizedState=u.state,e=t.child):e=Tn(e,t,i),e}function Nf(e,t,n,a){return ba(),t.flags|=256,vt(e,t,n,a),t.child}var To={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ao(e){return{baseLanes:e,cachePool:fd()}}function Co(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=qt),e}function kf(e,t,n){var a=t.pendingProps,i=!1,u=(t.flags&128)!==0,p;if((p=u)||(p=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),p&&(i=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Me){if(i?Fn(t):Vn(),(e=Ke)?(e=Mm(e,It),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Hn!==null?{id:on,overflow:cn}:null,retryLane:536870912,hydrationErrors:null},n=ad(e),n.return=t,t.child=n,bt=t,Ke=null)):e=null,e===null)throw Gn(t);return dc(e)?t.lanes=32:t.lanes=536870912,null}var y=a.children;return a=a.fallback,i?(Vn(),i=t.mode,y=fr({mode:"hidden",children:y},i),a=ga(a,i,n,null),y.return=t,a.return=t,y.sibling=a,t.child=y,a=t.child,a.memoizedState=Ao(n),a.childLanes=Co(e,p,n),t.memoizedState=To,Jl(null,a)):(Fn(t),Ro(t,y))}var C=e.memoizedState;if(C!==null&&(y=C.dehydrated,y!==null)){if(u)t.flags&256?(Fn(t),t.flags&=-257,t=_o(e,t,n)):t.memoizedState!==null?(Vn(),t.child=e.child,t.flags|=128,t=null):(Vn(),y=a.fallback,i=t.mode,a=fr({mode:"visible",children:a.children},i),y=ga(y,i,n,null),y.flags|=2,a.return=t,y.return=t,a.sibling=y,t.child=a,Na(t,e.child,null,n),a=t.child,a.memoizedState=Ao(n),a.childLanes=Co(e,p,n),t.memoizedState=To,t=Jl(null,a));else if(Fn(t),dc(y)){if(p=y.nextSibling&&y.nextSibling.dataset,p)var H=p.dgst;p=H,a=Error(c(419)),a.stack="",a.digest=p,Bl({value:a,source:null,stack:null}),t=_o(e,t,n)}else if(rt||Ia(e,t,n,!1),p=(n&e.childLanes)!==0,rt||p){if(p=Qe,p!==null&&(a=uu(p,n),a!==0&&a!==C.retryLane))throw C.retryLane=a,xa(e,a),Lt(p,e,a),ko;uc(y)||jr(),t=_o(e,t,n)}else uc(y)?(t.flags|=192,t.child=e.child,t=null):(e=C.treeContext,Ke=Pt(y.nextSibling),bt=t,Me=!0,$n=null,It=!1,e!==null&&rd(t,e),t=Ro(t,a.children),t.flags|=4096);return t}return i?(Vn(),y=a.fallback,i=t.mode,C=e.child,H=C.sibling,a=jn(C,{mode:"hidden",children:a.children}),a.subtreeFlags=C.subtreeFlags&65011712,H!==null?y=jn(H,y):(y=ga(y,i,n,null),y.flags|=2),y.return=t,a.return=t,a.sibling=y,t.child=a,Jl(null,a),a=t.child,y=e.child.memoizedState,y===null?y=Ao(n):(i=y.cachePool,i!==null?(C=lt._currentValue,i=i.parent!==C?{parent:C,pool:C}:i):i=fd(),y={baseLanes:y.baseLanes|n,cachePool:i}),a.memoizedState=y,a.childLanes=Co(e,p,n),t.memoizedState=To,Jl(e.child,a)):(Fn(t),n=e.child,e=n.sibling,n=jn(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=n,t.memoizedState=null,n)}function Ro(e,t){return t=fr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function fr(e,t){return e=Ut(22,e,null,t),e.lanes=0,e}function _o(e,t,n){return Na(t,e.child,null,n),e=Ro(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ef(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Xi(e.return,t,n)}function Oo(e,t,n,a,i,u){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:i,treeForkCount:u}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=a,p.tail=n,p.tailMode=i,p.treeForkCount=u)}function Tf(e,t,n){var a=t.pendingProps,i=a.revealOrder,u=a.tail;a=a.children;var p=nt.current,y=(p&2)!==0;if(y?(p=p&1|2,t.flags|=128):p&=1,B(nt,p),vt(e,t,a,n),a=Me?Ll:0,!y&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ef(e,n,t);else if(e.tag===19)Ef(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&er(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Oo(t,!1,i,n,u,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&er(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Oo(t,!0,n,null,u,a);break;case"together":Oo(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Tn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ia(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,n=jn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=jn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Mo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Fs(e)))}function Ux(e,t,n){switch(t.tag){case 3:De(t,t.stateNode.containerInfo),qn(t,lt,e.memoizedState.cache),ba();break;case 27:case 5:ge(t);break;case 4:De(t,t.stateNode.containerInfo);break;case 10:qn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ao(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Fn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?kf(e,t,n):(Fn(t),e=Tn(e,t,n),e!==null?e.sibling:null);Fn(t);break;case 19:var i=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Ia(e,t,n,!1),a=(n&t.childLanes)!==0),i){if(a)return Tf(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(nt,nt.current),a)break;return null;case 22:return t.lanes=0,yf(e,t,n,t.pendingProps);case 24:qn(t,lt,e.memoizedState.cache)}return Tn(e,t,n)}function Af(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)rt=!0;else{if(!Mo(e,n)&&(t.flags&128)===0)return rt=!1,Ux(e,t,n);rt=(e.flags&131072)!==0}else rt=!1,Me&&(t.flags&1048576)!==0&&sd(t,Ll,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=wa(t.elementType),t.type=e,typeof e=="function")Bi(e)?(a=Ea(e,a),t.tag=1,t=Sf(null,t,e,a,n)):(t.tag=0,t=Eo(null,t,e,a,n));else{if(e!=null){var i=e.$$typeof;if(i===D){t.tag=11,t=xf(null,t,e,a,n);break e}else if(i===Y){t.tag=14,t=gf(null,t,e,a,n);break e}}throw t=P(e)||e,Error(c(306,t,""))}}return t;case 0:return Eo(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,i=Ea(a,t.pendingProps),Sf(e,t,a,i,n);case 3:e:{if(De(t,t.stateNode.containerInfo),e===null)throw Error(c(387));a=t.pendingProps;var u=t.memoizedState;i=u.element,Wi(e,t),Zl(t,a,null,n);var p=t.memoizedState;if(a=p.cache,qn(t,lt,a),a!==u.cache&&Fi(t,[lt],n,!0),Yl(),a=p.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Nf(e,t,a,n);break e}else if(a!==i){i=Qt(Error(c(424)),t),Bl(i),t=Nf(e,t,a,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ke=Pt(e.firstChild),bt=t,Me=!0,$n=null,It=!0,n=bd(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(ba(),a===i){t=Tn(e,t,n);break e}vt(e,t,a,n)}t=t.child}return t;case 26:return dr(e,t),e===null?(n=Hm(t.type,null,t.pendingProps,null))?t.memoizedState=n:Me||(n=t.type,e=t.pendingProps,a=Ar(fe.current).createElement(n),a[gt]=t,a[Rt]=e,jt(a,n,e),ft(a),t.stateNode=a):t.memoizedState=Hm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ge(t),e===null&&Me&&(a=t.stateNode=Lm(t.type,t.pendingProps,fe.current),bt=t,It=!0,i=Ke,ta(t.type)?(fc=i,Ke=Pt(a.firstChild)):Ke=i),vt(e,t,t.pendingProps.children,n),dr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Me&&((i=a=Ke)&&(a=pg(a,t.type,t.pendingProps,It),a!==null?(t.stateNode=a,bt=t,Ke=Pt(a.firstChild),It=!1,i=!0):i=!1),i||Gn(t)),ge(t),i=t.type,u=t.pendingProps,p=e!==null?e.memoizedProps:null,a=u.children,ic(i,u)?a=null:p!==null&&ic(i,p)&&(t.flags|=32),t.memoizedState!==null&&(i=so(e,t,Cx,null,null,n),us._currentValue=i),dr(e,t),vt(e,t,a,n),t.child;case 6:return e===null&&Me&&((e=n=Ke)&&(n=hg(n,t.pendingProps,It),n!==null?(t.stateNode=n,bt=t,Ke=null,e=!0):e=!1),e||Gn(t)),null;case 13:return kf(e,t,n);case 4:return De(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Na(t,null,a,n):vt(e,t,a,n),t.child;case 11:return xf(e,t,t.type,t.pendingProps,n);case 7:return vt(e,t,t.pendingProps,n),t.child;case 8:return vt(e,t,t.pendingProps.children,n),t.child;case 12:return vt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,qn(t,t.type,a.value),vt(e,t,a.children,n),t.child;case 9:return i=t.type._context,a=t.pendingProps.children,va(t),i=yt(i),a=a(i),t.flags|=1,vt(e,t,a,n),t.child;case 14:return gf(e,t,t.type,t.pendingProps,n);case 15:return bf(e,t,t.type,t.pendingProps,n);case 19:return Tf(e,t,n);case 31:return Bx(e,t,n);case 22:return yf(e,t,n,t.pendingProps);case 24:return va(t),a=yt(lt),e===null?(i=Ji(),i===null&&(i=Qe,u=Vi(),i.pooledCache=u,u.refCount++,u!==null&&(i.pooledCacheLanes|=n),i=u),t.memoizedState={parent:a,cache:i},Ii(t),qn(t,lt,i)):((e.lanes&n)!==0&&(Wi(e,t),Zl(t,null,null,n),Yl()),i=e.memoizedState,u=t.memoizedState,i.parent!==a?(i={parent:a,cache:a},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),qn(t,lt,a)):(a=u.cache,qn(t,lt,a),a!==i.cache&&Fi(t,[lt],n,!0))),vt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function An(e){e.flags|=4}function zo(e,t,n,a,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(tm())e.flags|=8192;else throw Sa=Ks,Ki}else e.flags&=-16777217}function Cf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Zm(t))if(tm())e.flags|=8192;else throw Sa=Ks,Ki}function mr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?iu():536870912,e.lanes|=t,cl|=t)}function Kl(e,t){if(!Me)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ie(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,a|=i.subtreeFlags&65011712,a|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,a|=i.subtreeFlags,a|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function Hx(e,t,n){var a=t.pendingProps;switch(Gi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(t),null;case 1:return Ie(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Nn(lt),J(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ka(t)?An(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Yi())),Ie(t),null;case 26:var i=t.type,u=t.memoizedState;return e===null?(An(t),u!==null?(Ie(t),Cf(t,u)):(Ie(t),zo(t,i,null,a,n))):u?u!==e.memoizedState?(An(t),Ie(t),Cf(t,u)):(Ie(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&An(t),Ie(t),zo(t,i,e,a,n)),null;case 27:if(Se(t),n=fe.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&An(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return Ie(t),null}e=W.current,Ka(t)?id(t):(e=Lm(i,a,n),t.stateNode=e,An(t))}return Ie(t),null;case 5:if(Se(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&An(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return Ie(t),null}if(u=W.current,Ka(t))id(t);else{var p=Ar(fe.current);switch(u){case 1:u=p.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:u=p.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":u=p.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":u=p.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":u=p.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?p.createElement("select",{is:a.is}):p.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?p.createElement(i,{is:a.is}):p.createElement(i)}}u[gt]=t,u[Rt]=a;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)u.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=u;e:switch(jt(u,i,a),i){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&An(t)}}return Ie(t),zo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&An(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(c(166));if(e=fe.current,Ka(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,i=bt,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[gt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||km(e.nodeValue,n)),e||Gn(t,!0)}else e=Ar(e).createTextNode(a),e[gt]=t,t.stateNode=e}return Ie(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ka(t),n!==null){if(e===null){if(!a)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[gt]=t}else ba(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ie(t),e=!1}else n=Yi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?($t(t),t):($t(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Ie(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ka(t),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(c(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(c(317));i[gt]=t}else ba(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ie(t),i=!1}else i=Yi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?($t(t),t):($t(t),null)}return $t(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==i&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),mr(t,t.updateQueue),Ie(t),null);case 4:return J(),e===null&&nc(t.stateNode.containerInfo),Ie(t),null;case 10:return Nn(t.type),Ie(t),null;case 19:if(O(nt),a=t.memoizedState,a===null)return Ie(t),null;if(i=(t.flags&128)!==0,u=a.rendering,u===null)if(i)Kl(a,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=er(e),u!==null){for(t.flags|=128,Kl(a,!1),e=u.updateQueue,t.updateQueue=e,mr(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)nd(n,e),n=n.sibling;return B(nt,nt.current&1|2),Me&&wn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&je()>br&&(t.flags|=128,i=!0,Kl(a,!1),t.lanes=4194304)}else{if(!i)if(e=er(u),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,mr(t,e),Kl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Me)return Ie(t),null}else 2*je()-a.renderingStartTime>br&&n!==536870912&&(t.flags|=128,i=!0,Kl(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=je(),e.sibling=null,n=nt.current,B(nt,i?n&1|2:n&1),Me&&wn(t,a.treeForkCount),e):(Ie(t),null);case 22:case 23:return $t(t),no(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),n=t.updateQueue,n!==null&&mr(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&O(ja),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Nn(lt),Ie(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function $x(e,t){switch(Gi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nn(lt),J(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Se(t),null;case 31:if(t.memoizedState!==null){if($t(t),t.alternate===null)throw Error(c(340));ba()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if($t(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));ba()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(nt),null;case 4:return J(),null;case 10:return Nn(t.type),null;case 22:case 23:return $t(t),no(),e!==null&&O(ja),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Nn(lt),null;case 25:return null;default:return null}}function Rf(e,t){switch(Gi(t),t.tag){case 3:Nn(lt),J();break;case 26:case 27:case 5:Se(t);break;case 4:J();break;case 31:t.memoizedState!==null&&$t(t);break;case 13:$t(t);break;case 19:O(nt);break;case 10:Nn(t.type);break;case 22:case 23:$t(t),no(),e!==null&&O(ja);break;case 24:Nn(lt)}}function Il(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&e)===e){a=void 0;var u=n.create,p=n.inst;a=u(),p.destroy=a}n=n.next}while(n!==i)}}catch(y){qe(t,t.return,y)}}function Qn(e,t,n){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var u=i.next;a=u;do{if((a.tag&e)===e){var p=a.inst,y=p.destroy;if(y!==void 0){p.destroy=void 0,i=t;var C=n,H=y;try{H()}catch(Z){qe(i,C,Z)}}}a=a.next}while(a!==u)}}catch(Z){qe(t,t.return,Z)}}function _f(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{vd(t,n)}catch(a){qe(e,e.return,a)}}}function Of(e,t,n){n.props=Ea(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){qe(e,t,a)}}function Wl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(i){qe(e,t,i)}}function un(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(i){qe(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){qe(e,t,i)}else n.current=null}function Mf(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(i){qe(e,e.return,i)}}function Do(e,t,n){try{var a=e.stateNode;og(a,e.type,n,t),a[Rt]=t}catch(i){qe(e,e.return,i)}}function zf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ta(e.type)||e.tag===4}function Lo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zf(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&&ta(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 Bo(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=yn));else if(a!==4&&(a===27&&ta(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Bo(e,t,n),e=e.sibling;e!==null;)Bo(e,t,n),e=e.sibling}function pr(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&ta(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(pr(e,t,n),e=e.sibling;e!==null;)pr(e,t,n),e=e.sibling}function Df(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);jt(t,a,n),t[gt]=e,t[Rt]=n}catch(u){qe(e,e.return,u)}}var Cn=!1,it=!1,Uo=!1,Lf=typeof WeakSet=="function"?WeakSet:Set,mt=null;function Gx(e,t){if(e=e.containerInfo,sc=Dr,e=Vu(e),Ri(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var i=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var p=0,y=-1,C=-1,H=0,Z=0,K=e,G=null;t:for(;;){for(var q;K!==n||i!==0&&K.nodeType!==3||(y=p+i),K!==u||a!==0&&K.nodeType!==3||(C=p+a),K.nodeType===3&&(p+=K.nodeValue.length),(q=K.firstChild)!==null;)G=K,K=q;for(;;){if(K===e)break t;if(G===n&&++H===i&&(y=p),G===u&&++Z===a&&(C=p),(q=K.nextSibling)!==null)break;K=G,G=K.parentNode}K=q}n=y===-1||C===-1?null:{start:y,end:C}}else n=null}n=n||{start:0,end:0}}else n=null;for(rc={focusedElem:e,selectionRange:n},Dr=!1,mt=t;mt!==null;)if(t=mt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,mt=e;else for(;mt!==null;){switch(t=mt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,n=t,i=u.memoizedProps,u=u.memoizedState,a=n.stateNode;try{var de=Ea(n.type,i);e=a.getSnapshotBeforeUpdate(de,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(be){qe(n,n.return,be)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)cc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":cc(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(c(163))}if(e=t.sibling,e!==null){e.return=t.return,mt=e;break}mt=t.return}}function Bf(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:_n(e,n),a&4&&Il(5,n);break;case 1:if(_n(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(p){qe(n,n.return,p)}else{var i=Ea(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){qe(n,n.return,p)}}a&64&&_f(n),a&512&&Wl(n,n.return);break;case 3:if(_n(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{vd(e,t)}catch(p){qe(n,n.return,p)}}break;case 27:t===null&&a&4&&Df(n);case 26:case 5:_n(e,n),t===null&&a&4&&Mf(n),a&512&&Wl(n,n.return);break;case 12:_n(e,n);break;case 31:_n(e,n),a&4&&$f(e,n);break;case 13:_n(e,n),a&4&&Gf(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Kx.bind(null,n),xg(e,n))));break;case 22:if(a=n.memoizedState!==null||Cn,!a){t=t!==null&&t.memoizedState!==null||it,i=Cn;var u=it;Cn=a,(it=t)&&!u?On(e,n,(n.subtreeFlags&8772)!==0):_n(e,n),Cn=i,it=u}break;case 30:break;default:_n(e,n)}}function Uf(e){var t=e.alternate;t!==null&&(e.alternate=null,Uf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&mi(t)),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 We=null,Ot=!1;function Rn(e,t,n){for(n=n.child;n!==null;)Hf(e,t,n),n=n.sibling}function Hf(e,t,n){if(Ye&&typeof Ye.onCommitFiberUnmount=="function")try{Ye.onCommitFiberUnmount(ht,n)}catch{}switch(n.tag){case 26:it||un(n,t),Rn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:it||un(n,t);var a=We,i=Ot;ta(n.type)&&(We=n.stateNode,Ot=!1),Rn(e,t,n),is(n.stateNode),We=a,Ot=i;break;case 5:it||un(n,t);case 6:if(a=We,i=Ot,We=null,Rn(e,t,n),We=a,Ot=i,We!==null)if(Ot)try{(We.nodeType===9?We.body:We.nodeName==="HTML"?We.ownerDocument.body:We).removeChild(n.stateNode)}catch(u){qe(n,t,u)}else try{We.removeChild(n.stateNode)}catch(u){qe(n,t,u)}break;case 18:We!==null&&(Ot?(e=We,_m(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),gl(e)):_m(We,n.stateNode));break;case 4:a=We,i=Ot,We=n.stateNode.containerInfo,Ot=!0,Rn(e,t,n),We=a,Ot=i;break;case 0:case 11:case 14:case 15:Qn(2,n,t),it||Qn(4,n,t),Rn(e,t,n);break;case 1:it||(un(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Of(n,t,a)),Rn(e,t,n);break;case 21:Rn(e,t,n);break;case 22:it=(a=it)||n.memoizedState!==null,Rn(e,t,n),it=a;break;default:Rn(e,t,n)}}function $f(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{gl(e)}catch(n){qe(t,t.return,n)}}}function Gf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{gl(e)}catch(n){qe(t,t.return,n)}}function qx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Lf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Lf),t;default:throw Error(c(435,e.tag))}}function hr(e,t){var n=qx(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var i=Ix.bind(null,e,a);a.then(i,i)}})}function Mt(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var i=n[a],u=e,p=t,y=p;e:for(;y!==null;){switch(y.tag){case 27:if(ta(y.type)){We=y.stateNode,Ot=!1;break e}break;case 5:We=y.stateNode,Ot=!1;break e;case 3:case 4:We=y.stateNode.containerInfo,Ot=!0;break e}y=y.return}if(We===null)throw Error(c(160));Hf(u,p,i),We=null,Ot=!1,u=i.alternate,u!==null&&(u.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)qf(t,e),t=t.sibling}var an=null;function qf(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Mt(t,e),zt(e),a&4&&(Qn(3,e,e.return),Il(3,e),Qn(5,e,e.return));break;case 1:Mt(t,e),zt(e),a&512&&(it||n===null||un(n,n.return)),a&64&&Cn&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var i=an;if(Mt(t,e),zt(e),a&512&&(it||n===null||un(n,n.return)),a&4){var u=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(a){case"title":u=i.getElementsByTagName("title")[0],(!u||u[kl]||u[gt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=i.createElement(a),i.head.insertBefore(u,i.querySelector("head > title"))),jt(u,a,n),u[gt]=e,ft(u),a=u;break e;case"link":var p=qm("link","href",i).get(a+(n.href||""));if(p){for(var y=0;y<p.length;y++)if(u=p[y],u.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&u.getAttribute("rel")===(n.rel==null?null:n.rel)&&u.getAttribute("title")===(n.title==null?null:n.title)&&u.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){p.splice(y,1);break t}}u=i.createElement(a),jt(u,a,n),i.head.appendChild(u);break;case"meta":if(p=qm("meta","content",i).get(a+(n.content||""))){for(y=0;y<p.length;y++)if(u=p[y],u.getAttribute("content")===(n.content==null?null:""+n.content)&&u.getAttribute("name")===(n.name==null?null:n.name)&&u.getAttribute("property")===(n.property==null?null:n.property)&&u.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&u.getAttribute("charset")===(n.charSet==null?null:n.charSet)){p.splice(y,1);break t}}u=i.createElement(a),jt(u,a,n),i.head.appendChild(u);break;default:throw Error(c(468,a))}u[gt]=e,ft(u),a=u}e.stateNode=a}else Ym(i,e.type,e.stateNode);else e.stateNode=Gm(i,a,e.memoizedProps);else u!==a?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,a===null?Ym(i,e.type,e.stateNode):Gm(i,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Do(e,e.memoizedProps,n.memoizedProps)}break;case 27:Mt(t,e),zt(e),a&512&&(it||n===null||un(n,n.return)),n!==null&&a&4&&Do(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Mt(t,e),zt(e),a&512&&(it||n===null||un(n,n.return)),e.flags&32){i=e.stateNode;try{$a(i,"")}catch(de){qe(e,e.return,de)}}a&4&&e.stateNode!=null&&(i=e.memoizedProps,Do(e,i,n!==null?n.memoizedProps:i)),a&1024&&(Uo=!0);break;case 6:if(Mt(t,e),zt(e),a&4){if(e.stateNode===null)throw Error(c(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(de){qe(e,e.return,de)}}break;case 3:if(_r=null,i=an,an=Cr(t.containerInfo),Mt(t,e),an=i,zt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{gl(t.containerInfo)}catch(de){qe(e,e.return,de)}Uo&&(Uo=!1,Yf(e));break;case 4:a=an,an=Cr(e.stateNode.containerInfo),Mt(t,e),zt(e),an=a;break;case 12:Mt(t,e),zt(e);break;case 31:Mt(t,e),zt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,hr(e,a)));break;case 13:Mt(t,e),zt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(gr=je()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,hr(e,a)));break;case 22:i=e.memoizedState!==null;var C=n!==null&&n.memoizedState!==null,H=Cn,Z=it;if(Cn=H||i,it=Z||C,Mt(t,e),it=Z,Cn=H,zt(e),a&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||C||Cn||it||Ta(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){C=n=t;try{if(u=C.stateNode,i)p=u.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{y=C.stateNode;var K=C.memoizedProps.style,G=K!=null&&K.hasOwnProperty("display")?K.display:null;y.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(de){qe(C,C.return,de)}}}else if(t.tag===6){if(n===null){C=t;try{C.stateNode.nodeValue=i?"":C.memoizedProps}catch(de){qe(C,C.return,de)}}}else if(t.tag===18){if(n===null){C=t;try{var q=C.stateNode;i?Om(q,!0):Om(C.stateNode,!1)}catch(de){qe(C,C.return,de)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,hr(e,n))));break;case 19:Mt(t,e),zt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,hr(e,a)));break;case 30:break;case 21:break;default:Mt(t,e),zt(e)}}function zt(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(zf(a)){n=a;break}a=a.return}if(n==null)throw Error(c(160));switch(n.tag){case 27:var i=n.stateNode,u=Lo(e);pr(e,u,i);break;case 5:var p=n.stateNode;n.flags&32&&($a(p,""),n.flags&=-33);var y=Lo(e);pr(e,y,p);break;case 3:case 4:var C=n.stateNode.containerInfo,H=Lo(e);Bo(e,H,C);break;default:throw Error(c(161))}}catch(Z){qe(e,e.return,Z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Yf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Yf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _n(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Bf(e,t.alternate,t),t=t.sibling}function Ta(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Qn(4,t,t.return),Ta(t);break;case 1:un(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Of(t,t.return,n),Ta(t);break;case 27:is(t.stateNode);case 26:case 5:un(t,t.return),Ta(t);break;case 22:t.memoizedState===null&&Ta(t);break;case 30:Ta(t);break;default:Ta(t)}e=e.sibling}}function On(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,i=e,u=t,p=u.flags;switch(u.tag){case 0:case 11:case 15:On(i,u,n),Il(4,u);break;case 1:if(On(i,u,n),a=u,i=a.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(H){qe(a,a.return,H)}if(a=u,i=a.updateQueue,i!==null){var y=a.stateNode;try{var C=i.shared.hiddenCallbacks;if(C!==null)for(i.shared.hiddenCallbacks=null,i=0;i<C.length;i++)yd(C[i],y)}catch(H){qe(a,a.return,H)}}n&&p&64&&_f(u),Wl(u,u.return);break;case 27:Df(u);case 26:case 5:On(i,u,n),n&&a===null&&p&4&&Mf(u),Wl(u,u.return);break;case 12:On(i,u,n);break;case 31:On(i,u,n),n&&p&4&&$f(i,u);break;case 13:On(i,u,n),n&&p&4&&Gf(i,u);break;case 22:u.memoizedState===null&&On(i,u,n),Wl(u,u.return);break;case 30:break;default:On(i,u,n)}t=t.sibling}}function Ho(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ul(n))}function $o(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ul(e))}function ln(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Zf(e,t,n,a),t=t.sibling}function Zf(e,t,n,a){var i=t.flags;switch(t.tag){case 0:case 11:case 15:ln(e,t,n,a),i&2048&&Il(9,t);break;case 1:ln(e,t,n,a);break;case 3:ln(e,t,n,a),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ul(e)));break;case 12:if(i&2048){ln(e,t,n,a),e=t.stateNode;try{var u=t.memoizedProps,p=u.id,y=u.onPostCommit;typeof y=="function"&&y(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){qe(t,t.return,C)}}else ln(e,t,n,a);break;case 31:ln(e,t,n,a);break;case 13:ln(e,t,n,a);break;case 23:break;case 22:u=t.stateNode,p=t.alternate,t.memoizedState!==null?u._visibility&2?ln(e,t,n,a):Pl(e,t):u._visibility&2?ln(e,t,n,a):(u._visibility|=2,rl(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),i&2048&&Ho(p,t);break;case 24:ln(e,t,n,a),i&2048&&$o(t.alternate,t);break;default:ln(e,t,n,a)}}function rl(e,t,n,a,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,p=t,y=n,C=a,H=p.flags;switch(p.tag){case 0:case 11:case 15:rl(u,p,y,C,i),Il(8,p);break;case 23:break;case 22:var Z=p.stateNode;p.memoizedState!==null?Z._visibility&2?rl(u,p,y,C,i):Pl(u,p):(Z._visibility|=2,rl(u,p,y,C,i)),i&&H&2048&&Ho(p.alternate,p);break;case 24:rl(u,p,y,C,i),i&&H&2048&&$o(p.alternate,p);break;default:rl(u,p,y,C,i)}t=t.sibling}}function Pl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,i=a.flags;switch(a.tag){case 22:Pl(n,a),i&2048&&Ho(a.alternate,a);break;case 24:Pl(n,a),i&2048&&$o(a.alternate,a);break;default:Pl(n,a)}t=t.sibling}}var es=8192;function il(e,t,n){if(e.subtreeFlags&es)for(e=e.child;e!==null;)Xf(e,t,n),e=e.sibling}function Xf(e,t,n){switch(e.tag){case 26:il(e,t,n),e.flags&es&&e.memoizedState!==null&&Ag(n,an,e.memoizedState,e.memoizedProps);break;case 5:il(e,t,n);break;case 3:case 4:var a=an;an=Cr(e.stateNode.containerInfo),il(e,t,n),an=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=es,es=16777216,il(e,t,n),es=a):il(e,t,n));break;default:il(e,t,n)}}function Ff(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ts(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];mt=a,Qf(a,e)}Ff(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vf(e),e=e.sibling}function Vf(e){switch(e.tag){case 0:case 11:case 15:ts(e),e.flags&2048&&Qn(9,e,e.return);break;case 3:ts(e);break;case 12:ts(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,xr(e)):ts(e);break;default:ts(e)}}function xr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];mt=a,Qf(a,e)}Ff(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Qn(8,t,t.return),xr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,xr(t));break;default:xr(t)}e=e.sibling}}function Qf(e,t){for(;mt!==null;){var n=mt;switch(n.tag){case 0:case 11:case 15:Qn(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Ul(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,mt=a;else e:for(n=e;mt!==null;){a=mt;var i=a.sibling,u=a.return;if(Uf(a),a===n){mt=null;break e}if(i!==null){i.return=u,mt=i;break e}mt=u}}}var Yx={getCacheForType:function(e){var t=yt(lt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return yt(lt).controller.signal}},Zx=typeof WeakMap=="function"?WeakMap:Map,He=0,Qe=null,Ce=null,_e=0,Ge=0,Gt=null,Jn=!1,ol=!1,Go=!1,Mn=0,tt=0,Kn=0,Aa=0,qo=0,qt=0,cl=0,ns=null,Dt=null,Yo=!1,gr=0,Jf=0,br=1/0,yr=null,In=null,ut=0,Wn=null,ul=null,zn=0,Zo=0,Xo=null,Kf=null,as=0,Fo=null;function Yt(){return(He&2)!==0&&_e!==0?_e&-_e:z.T!==null?Wo():du()}function If(){if(qt===0)if((_e&536870912)===0||Me){var e=ua;ua<<=1,(ua&3932160)===0&&(ua=262144),qt=e}else qt=536870912;return e=Ht.current,e!==null&&(e.flags|=32),qt}function Lt(e,t,n){(e===Qe&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)&&(dl(e,0),Pn(e,_e,qt,!1)),Nl(e,n),((He&2)===0||e!==Qe)&&(e===Qe&&((He&2)===0&&(Aa|=n),tt===4&&Pn(e,_e,qt,!1)),dn(e))}function Wf(e,t,n){if((He&6)!==0)throw Error(c(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Sl(e,t),i=a?Vx(e,t):Qo(e,t,!0),u=a;do{if(i===0){ol&&!a&&Pn(e,t,0,!1);break}else{if(n=e.current.alternate,u&&!Xx(n)){i=Qo(e,t,!1),u=!1;continue}if(i===2){if(u=t,e.errorRecoveryDisabledLanes&u)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var y=e;i=ns;var C=y.current.memoizedState.isDehydrated;if(C&&(dl(y,p).flags|=256),p=Qo(y,p,!1),p!==2){if(Go&&!C){y.errorRecoveryDisabledLanes|=u,Aa|=u,i=4;break e}u=Dt,Dt=i,u!==null&&(Dt===null?Dt=u:Dt.push.apply(Dt,u))}i=p}if(u=!1,i!==2)continue}}if(i===1){dl(e,0),Pn(e,t,0,!0);break}e:{switch(a=e,u=i,u){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Pn(a,t,qt,!Jn);break e;case 2:Dt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(i=gr+300-je(),10<i)){if(Pn(a,t,qt,!Jn),Cs(a,0,!0)!==0)break e;zn=t,a.timeoutHandle=Cm(Pf.bind(null,a,n,Dt,yr,Yo,t,qt,Aa,cl,Jn,u,"Throttled",-0,0),i);break e}Pf(a,n,Dt,yr,Yo,t,qt,Aa,cl,Jn,u,null,-0,0)}}break}while(!0);dn(e)}function Pf(e,t,n,a,i,u,p,y,C,H,Z,K,G,q){if(e.timeoutHandle=-1,K=t.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:yn},Xf(t,u,K);var de=(u&62914560)===u?gr-je():(u&4194048)===u?Jf-je():0;if(de=Cg(K,de),de!==null){zn=u,e.cancelPendingCommit=de(im.bind(null,e,t,u,n,a,i,p,y,C,Z,K,null,G,q)),Pn(e,u,p,!H);return}}im(e,t,u,n,a,i,p,y,C)}function Xx(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var i=n[a],u=i.getSnapshot;i=i.value;try{if(!Bt(u(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Pn(e,t,n,a){t&=~qo,t&=~Aa,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var i=t;0<i;){var u=31-xt(i),p=1<<u;a[u]=-1,i&=~p}n!==0&&ou(e,n,t)}function vr(){return(He&6)===0?(ls(0),!1):!0}function Vo(){if(Ce!==null){if(Ge===0)var e=Ce.return;else e=Ce,Sn=ya=null,oo(e),tl=null,$l=0,e=Ce;for(;e!==null;)Rf(e.alternate,e),e=e.return;Ce=null}}function dl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,dg(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),zn=0,Vo(),Qe=e,Ce=n=jn(e.current,null),_e=t,Ge=0,Gt=null,Jn=!1,ol=Sl(e,t),Go=!1,cl=qt=qo=Aa=Kn=tt=0,Dt=ns=null,Yo=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var i=31-xt(a),u=1<<i;t|=e[i],a&=~u}return Mn=t,Gs(),n}function em(e,t){Ne=null,z.H=Ql,t===el||t===Js?(t=hd(),Ge=3):t===Ki?(t=hd(),Ge=4):Ge=t===ko?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Gt=t,Ce===null&&(tt=1,cr(e,Qt(t,e.current)))}function tm(){var e=Ht.current;return e===null?!0:(_e&4194048)===_e?Wt===null:(_e&62914560)===_e||(_e&536870912)!==0?e===Wt:!1}function nm(){var e=z.H;return z.H=Ql,e===null?Ql:e}function am(){var e=z.A;return z.A=Yx,e}function jr(){tt=4,Jn||(_e&4194048)!==_e&&Ht.current!==null||(ol=!0),(Kn&134217727)===0&&(Aa&134217727)===0||Qe===null||Pn(Qe,_e,qt,!1)}function Qo(e,t,n){var a=He;He|=2;var i=nm(),u=am();(Qe!==e||_e!==t)&&(yr=null,dl(e,t)),t=!1;var p=tt;e:do try{if(Ge!==0&&Ce!==null){var y=Ce,C=Gt;switch(Ge){case 8:Vo(),p=6;break e;case 3:case 2:case 9:case 6:Ht.current===null&&(t=!0);var H=Ge;if(Ge=0,Gt=null,fl(e,y,C,H),n&&ol){p=0;break e}break;default:H=Ge,Ge=0,Gt=null,fl(e,y,C,H)}}Fx(),p=tt;break}catch(Z){em(e,Z)}while(!0);return t&&e.shellSuspendCounter++,Sn=ya=null,He=a,z.H=i,z.A=u,Ce===null&&(Qe=null,_e=0,Gs()),p}function Fx(){for(;Ce!==null;)lm(Ce)}function Vx(e,t){var n=He;He|=2;var a=nm(),i=am();Qe!==e||_e!==t?(yr=null,br=je()+500,dl(e,t)):ol=Sl(e,t);e:do try{if(Ge!==0&&Ce!==null){t=Ce;var u=Gt;t:switch(Ge){case 1:Ge=0,Gt=null,fl(e,t,u,1);break;case 2:case 9:if(md(u)){Ge=0,Gt=null,sm(t);break}t=function(){Ge!==2&&Ge!==9||Qe!==e||(Ge=7),dn(e)},u.then(t,t);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:md(u)?(Ge=0,Gt=null,sm(t)):(Ge=0,Gt=null,fl(e,t,u,7));break;case 5:var p=null;switch(Ce.tag){case 26:p=Ce.memoizedState;case 5:case 27:var y=Ce;if(p?Zm(p):y.stateNode.complete){Ge=0,Gt=null;var C=y.sibling;if(C!==null)Ce=C;else{var H=y.return;H!==null?(Ce=H,wr(H)):Ce=null}break t}}Ge=0,Gt=null,fl(e,t,u,5);break;case 6:Ge=0,Gt=null,fl(e,t,u,6);break;case 8:Vo(),tt=6;break e;default:throw Error(c(462))}}Qx();break}catch(Z){em(e,Z)}while(!0);return Sn=ya=null,z.H=a,z.A=i,He=n,Ce!==null?0:(Qe=null,_e=0,Gs(),tt)}function Qx(){for(;Ce!==null&&!ve();)lm(Ce)}function lm(e){var t=Af(e.alternate,e,Mn);e.memoizedProps=e.pendingProps,t===null?wr(e):Ce=t}function sm(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=wf(n,t,t.pendingProps,t.type,void 0,_e);break;case 11:t=wf(n,t,t.pendingProps,t.type.render,t.ref,_e);break;case 5:oo(t);default:Rf(n,t),t=Ce=nd(t,Mn),t=Af(n,t,Mn)}e.memoizedProps=e.pendingProps,t===null?wr(e):Ce=t}function fl(e,t,n,a){Sn=ya=null,oo(t),tl=null,$l=0;var i=t.return;try{if(Lx(e,i,t,n,_e)){tt=1,cr(e,Qt(n,e.current)),Ce=null;return}}catch(u){if(i!==null)throw Ce=i,u;tt=1,cr(e,Qt(n,e.current)),Ce=null;return}t.flags&32768?(Me||a===1?e=!0:ol||(_e&536870912)!==0?e=!1:(Jn=e=!0,(a===2||a===9||a===3||a===6)&&(a=Ht.current,a!==null&&a.tag===13&&(a.flags|=16384))),rm(t,e)):wr(t)}function wr(e){var t=e;do{if((t.flags&32768)!==0){rm(t,Jn);return}e=t.return;var n=Hx(t.alternate,t,Mn);if(n!==null){Ce=n;return}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);tt===0&&(tt=5)}function rm(e,t){do{var n=$x(e.alternate,e);if(n!==null){n.flags&=32767,Ce=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ce=e;return}Ce=e=n}while(e!==null);tt=6,Ce=null}function im(e,t,n,a,i,u,p,y,C){e.cancelPendingCommit=null;do Sr();while(ut!==0);if((He&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(u=t.lanes|t.childLanes,u|=Di,Th(e,n,u,p,y,C),e===Qe&&(Ce=Qe=null,_e=0),ul=t,Wn=e,zn=n,Zo=u,Xo=i,Kf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Wx(ye,function(){return fm(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=z.T,z.T=null,i=ne.p,ne.p=2,p=He,He|=4;try{Gx(e,t,n)}finally{He=p,ne.p=i,z.T=a}}ut=1,om(),cm(),um()}}function om(){if(ut===1){ut=0;var e=Wn,t=ul,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=z.T,z.T=null;var a=ne.p;ne.p=2;var i=He;He|=4;try{qf(t,e);var u=rc,p=Vu(e.containerInfo),y=u.focusedElem,C=u.selectionRange;if(p!==y&&y&&y.ownerDocument&&Fu(y.ownerDocument.documentElement,y)){if(C!==null&&Ri(y)){var H=C.start,Z=C.end;if(Z===void 0&&(Z=H),"selectionStart"in y)y.selectionStart=H,y.selectionEnd=Math.min(Z,y.value.length);else{var K=y.ownerDocument||document,G=K&&K.defaultView||window;if(G.getSelection){var q=G.getSelection(),de=y.textContent.length,be=Math.min(C.start,de),Fe=C.end===void 0?be:Math.min(C.end,de);!q.extend&&be>Fe&&(p=Fe,Fe=be,be=p);var L=Xu(y,be),M=Xu(y,Fe);if(L&&M&&(q.rangeCount!==1||q.anchorNode!==L.node||q.anchorOffset!==L.offset||q.focusNode!==M.node||q.focusOffset!==M.offset)){var U=K.createRange();U.setStart(L.node,L.offset),q.removeAllRanges(),be>Fe?(q.addRange(U),q.extend(M.node,M.offset)):(U.setEnd(M.node,M.offset),q.addRange(U))}}}}for(K=[],q=y;q=q.parentNode;)q.nodeType===1&&K.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<K.length;y++){var V=K[y];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Dr=!!sc,rc=sc=null}finally{He=i,ne.p=a,z.T=n}}e.current=t,ut=2}}function cm(){if(ut===2){ut=0;var e=Wn,t=ul,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=z.T,z.T=null;var a=ne.p;ne.p=2;var i=He;He|=4;try{Bf(e,t.alternate,t)}finally{He=i,ne.p=a,z.T=n}}ut=3}}function um(){if(ut===4||ut===3){ut=0,Te();var e=Wn,t=ul,n=zn,a=Kf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ut=5:(ut=0,ul=Wn=null,dm(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(In=null),di(n),t=t.stateNode,Ye&&typeof Ye.onCommitFiberRoot=="function")try{Ye.onCommitFiberRoot(ht,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=z.T,i=ne.p,ne.p=2,z.T=null;try{for(var u=e.onRecoverableError,p=0;p<a.length;p++){var y=a[p];u(y.value,{componentStack:y.stack})}}finally{z.T=t,ne.p=i}}(zn&3)!==0&&Sr(),dn(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===Fo?as++:(as=0,Fo=e):as=0,ls(0)}}function dm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ul(t)))}function Sr(){return om(),cm(),um(),fm()}function fm(){if(ut!==5)return!1;var e=Wn,t=Zo;Zo=0;var n=di(zn),a=z.T,i=ne.p;try{ne.p=32>n?32:n,z.T=null,n=Xo,Xo=null;var u=Wn,p=zn;if(ut=0,ul=Wn=null,zn=0,(He&6)!==0)throw Error(c(331));var y=He;if(He|=4,Vf(u.current),Zf(u,u.current,p,n),He=y,ls(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot=="function")try{Ye.onPostCommitFiberRoot(ht,u)}catch{}return!0}finally{ne.p=i,z.T=a,dm(e,t)}}function mm(e,t,n){t=Qt(n,t),t=No(e.stateNode,t,2),e=Xn(e,t,2),e!==null&&(Nl(e,2),dn(e))}function qe(e,t,n){if(e.tag===3)mm(e,e,n);else for(;t!==null;){if(t.tag===3){mm(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(In===null||!In.has(a))){e=Qt(n,e),n=pf(2),a=Xn(t,n,2),a!==null&&(hf(n,a,t,e),Nl(a,2),dn(a));break}}t=t.return}}function Jo(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new Zx;var i=new Set;a.set(t,i)}else i=a.get(t),i===void 0&&(i=new Set,a.set(t,i));i.has(n)||(Go=!0,i.add(n),e=Jx.bind(null,e,t,n),t.then(e,e))}function Jx(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Qe===e&&(_e&n)===n&&(tt===4||tt===3&&(_e&62914560)===_e&&300>je()-gr?(He&2)===0&&dl(e,0):qo|=n,cl===_e&&(cl=0)),dn(e)}function pm(e,t){t===0&&(t=iu()),e=xa(e,t),e!==null&&(Nl(e,t),dn(e))}function Kx(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),pm(e,n)}function Ix(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(c(314))}a!==null&&a.delete(t),pm(e,n)}function Wx(e,t){return ct(e,t)}var Nr=null,ml=null,Ko=!1,kr=!1,Io=!1,ea=0;function dn(e){e!==ml&&e.next===null&&(ml===null?Nr=ml=e:ml=ml.next=e),kr=!0,Ko||(Ko=!0,eg())}function ls(e,t){if(!Io&&kr){Io=!0;do for(var n=!1,a=Nr;a!==null;){if(e!==0){var i=a.pendingLanes;if(i===0)var u=0;else{var p=a.suspendedLanes,y=a.pingedLanes;u=(1<<31-xt(42|e)+1)-1,u&=i&~(p&~y),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,bm(a,u))}else u=_e,u=Cs(a,a===Qe?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Sl(a,u)||(n=!0,bm(a,u));a=a.next}while(n);Io=!1}}function Px(){hm()}function hm(){kr=Ko=!1;var e=0;ea!==0&&ug()&&(e=ea);for(var t=je(),n=null,a=Nr;a!==null;){var i=a.next,u=xm(a,t);u===0?(a.next=null,n===null?Nr=i:n.next=i,i===null&&(ml=n)):(n=a,(e!==0||(u&3)!==0)&&(kr=!0)),a=i}ut!==0&&ut!==5||ls(e),ea!==0&&(ea=0)}function xm(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,i=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var p=31-xt(u),y=1<<p,C=i[p];C===-1?((y&n)===0||(y&a)!==0)&&(i[p]=Eh(y,t)):C<=t&&(e.expiredLanes|=y),u&=~y}if(t=Qe,n=_e,n=Cs(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&X(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Sl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&X(a),di(n)){case 2:case 8:n=ce;break;case 32:n=ye;break;case 268435456:n=Pe;break;default:n=ye}return a=gm.bind(null,e),n=ct(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&X(a),e.callbackPriority=2,e.callbackNode=null,2}function gm(e,t){if(ut!==0&&ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Sr()&&e.callbackNode!==n)return null;var a=_e;return a=Cs(e,e===Qe?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Wf(e,a,t),xm(e,je()),e.callbackNode!=null&&e.callbackNode===n?gm.bind(null,e):null)}function bm(e,t){if(Sr())return null;Wf(e,t,!0)}function eg(){fg(function(){(He&6)!==0?ct(Ee,Px):hm()})}function Wo(){if(ea===0){var e=Wa;e===0&&(e=ca,ca<<=1,(ca&261888)===0&&(ca=256)),ea=e}return ea}function ym(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ms(""+e)}function vm(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function tg(e,t,n,a,i){if(t==="submit"&&n&&n.stateNode===i){var u=ym((i[Rt]||null).action),p=a.submitter;p&&(t=(t=p[Rt]||null)?ym(t.formAction):p.getAttribute("formAction"),t!==null&&(u=t,p=null));var y=new Bs("action","action",null,a,i);e.push({event:y,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(ea!==0){var C=p?vm(i,p):new FormData(i);bo(n,{pending:!0,data:C,method:i.method,action:u},null,C)}}else typeof u=="function"&&(y.preventDefault(),C=p?vm(i,p):new FormData(i),bo(n,{pending:!0,data:C,method:i.method,action:u},u,C))},currentTarget:i}]})}}for(var Po=0;Po<zi.length;Po++){var ec=zi[Po],ng=ec.toLowerCase(),ag=ec[0].toUpperCase()+ec.slice(1);nn(ng,"on"+ag)}nn(Ku,"onAnimationEnd"),nn(Iu,"onAnimationIteration"),nn(Wu,"onAnimationStart"),nn("dblclick","onDoubleClick"),nn("focusin","onFocus"),nn("focusout","onBlur"),nn(yx,"onTransitionRun"),nn(vx,"onTransitionStart"),nn(jx,"onTransitionCancel"),nn(Pu,"onTransitionEnd"),Ua("onMouseEnter",["mouseout","mouseover"]),Ua("onMouseLeave",["mouseout","mouseover"]),Ua("onPointerEnter",["pointerout","pointerover"]),Ua("onPointerLeave",["pointerout","pointerover"]),fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fa("onBeforeInput",["compositionend","keypress","textInput","paste"]),fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ss="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(" "),lg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ss));function jm(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],i=a.event;a=a.listeners;e:{var u=void 0;if(t)for(var p=a.length-1;0<=p;p--){var y=a[p],C=y.instance,H=y.currentTarget;if(y=y.listener,C!==u&&i.isPropagationStopped())break e;u=y,i.currentTarget=H;try{u(i)}catch(Z){$s(Z)}i.currentTarget=null,u=C}else for(p=0;p<a.length;p++){if(y=a[p],C=y.instance,H=y.currentTarget,y=y.listener,C!==u&&i.isPropagationStopped())break e;u=y,i.currentTarget=H;try{u(i)}catch(Z){$s(Z)}i.currentTarget=null,u=C}}}}function Re(e,t){var n=t[fi];n===void 0&&(n=t[fi]=new Set);var a=e+"__bubble";n.has(a)||(wm(t,e,2,!1),n.add(a))}function tc(e,t,n){var a=0;t&&(a|=4),wm(n,e,a,t)}var Er="_reactListening"+Math.random().toString(36).slice(2);function nc(e){if(!e[Er]){e[Er]=!0,pu.forEach(function(n){n!=="selectionchange"&&(lg.has(n)||tc(n,!1,e),tc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Er]||(t[Er]=!0,tc("selectionchange",!1,t))}}function wm(e,t,n,a){switch(Im(t)){case 2:var i=Og;break;case 8:i=Mg;break;default:i=gc}n=i.bind(null,t,n,e),i=void 0,!ji||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),a?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function ac(e,t,n,a,i){var u=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var p=a.tag;if(p===3||p===4){var y=a.stateNode.containerInfo;if(y===i)break;if(p===4)for(p=a.return;p!==null;){var C=p.tag;if((C===3||C===4)&&p.stateNode.containerInfo===i)return;p=p.return}for(;y!==null;){if(p=Da(y),p===null)return;if(C=p.tag,C===5||C===6||C===26||C===27){a=u=p;continue e}y=y.parentNode}}a=a.return}Eu(function(){var H=u,Z=yi(n),K=[];e:{var G=ed.get(e);if(G!==void 0){var q=Bs,de=e;switch(e){case"keypress":if(Ds(n)===0)break e;case"keydown":case"keyup":q=Ih;break;case"focusin":de="focus",q=ki;break;case"focusout":de="blur",q=ki;break;case"beforeblur":case"afterblur":q=ki;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=Cu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=Hh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=ex;break;case Ku:case Iu:case Wu:q=qh;break;case Pu:q=nx;break;case"scroll":case"scrollend":q=Bh;break;case"wheel":q=lx;break;case"copy":case"cut":case"paste":q=Zh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=_u;break;case"toggle":case"beforetoggle":q=rx}var be=(t&4)!==0,Fe=!be&&(e==="scroll"||e==="scrollend"),L=be?G!==null?G+"Capture":null:G;be=[];for(var M=H,U;M!==null;){var V=M;if(U=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||U===null||L===null||(V=Tl(M,L),V!=null&&be.push(rs(M,V,U))),Fe)break;M=M.return}0<be.length&&(G=new q(G,de,null,n,Z),K.push({event:G,listeners:be}))}}if((t&7)===0){e:{if(G=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",G&&n!==bi&&(de=n.relatedTarget||n.fromElement)&&(Da(de)||de[za]))break e;if((q||G)&&(G=Z.window===Z?Z:(G=Z.ownerDocument)?G.defaultView||G.parentWindow:window,q?(de=n.relatedTarget||n.toElement,q=H,de=de?Da(de):null,de!==null&&(Fe=f(de),be=de.tag,de!==Fe||be!==5&&be!==27&&be!==6)&&(de=null)):(q=null,de=H),q!==de)){if(be=Cu,V="onMouseLeave",L="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(be=_u,V="onPointerLeave",L="onPointerEnter",M="pointer"),Fe=q==null?G:El(q),U=de==null?G:El(de),G=new be(V,M+"leave",q,n,Z),G.target=Fe,G.relatedTarget=U,V=null,Da(Z)===H&&(be=new be(L,M+"enter",de,n,Z),be.target=U,be.relatedTarget=Fe,V=be),Fe=V,q&&de)t:{for(be=sg,L=q,M=de,U=0,V=L;V;V=be(V))U++;V=0;for(var he=M;he;he=be(he))V++;for(;0<U-V;)L=be(L),U--;for(;0<V-U;)M=be(M),V--;for(;U--;){if(L===M||M!==null&&L===M.alternate){be=L;break t}L=be(L),M=be(M)}be=null}else be=null;q!==null&&Sm(K,G,q,be,!1),de!==null&&Fe!==null&&Sm(K,Fe,de,be,!0)}}e:{if(G=H?El(H):window,q=G.nodeName&&G.nodeName.toLowerCase(),q==="select"||q==="input"&&G.type==="file")var Le=Hu;else if(Bu(G))if($u)Le=xx;else{Le=px;var me=mx}else q=G.nodeName,!q||q.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?H&&gi(H.elementType)&&(Le=Hu):Le=hx;if(Le&&(Le=Le(e,H))){Uu(K,Le,n,Z);break e}me&&me(e,G,H),e==="focusout"&&H&&G.type==="number"&&H.memoizedProps.value!=null&&xi(G,"number",G.value)}switch(me=H?El(H):window,e){case"focusin":(Bu(me)||me.contentEditable==="true")&&(Za=me,_i=H,Dl=null);break;case"focusout":Dl=_i=Za=null;break;case"mousedown":Oi=!0;break;case"contextmenu":case"mouseup":case"dragend":Oi=!1,Qu(K,n,Z);break;case"selectionchange":if(bx)break;case"keydown":case"keyup":Qu(K,n,Z)}var ke;if(Ti)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else Ya?Du(e,n)&&(Oe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Oe="onCompositionStart");Oe&&(Ou&&n.locale!=="ko"&&(Ya||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&Ya&&(ke=Tu()):(Un=Z,wi="value"in Un?Un.value:Un.textContent,Ya=!0)),me=Tr(H,Oe),0<me.length&&(Oe=new Ru(Oe,e,null,n,Z),K.push({event:Oe,listeners:me}),ke?Oe.data=ke:(ke=Lu(n),ke!==null&&(Oe.data=ke)))),(ke=ox?cx(e,n):ux(e,n))&&(Oe=Tr(H,"onBeforeInput"),0<Oe.length&&(me=new Ru("onBeforeInput","beforeinput",null,n,Z),K.push({event:me,listeners:Oe}),me.data=ke)),tg(K,e,H,n,Z)}jm(K,t)})}function rs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Tr(e,t){for(var n=t+"Capture",a=[];e!==null;){var i=e,u=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||u===null||(i=Tl(e,n),i!=null&&a.unshift(rs(e,i,u)),i=Tl(e,t),i!=null&&a.push(rs(e,i,u))),e.tag===3)return a;e=e.return}return[]}function sg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Sm(e,t,n,a,i){for(var u=t._reactName,p=[];n!==null&&n!==a;){var y=n,C=y.alternate,H=y.stateNode;if(y=y.tag,C!==null&&C===a)break;y!==5&&y!==26&&y!==27||H===null||(C=H,i?(H=Tl(n,u),H!=null&&p.unshift(rs(n,H,C))):i||(H=Tl(n,u),H!=null&&p.push(rs(n,H,C)))),n=n.return}p.length!==0&&e.push({event:t,listeners:p})}var rg=/\r\n?/g,ig=/\u0000|\uFFFD/g;function Nm(e){return(typeof e=="string"?e:""+e).replace(rg,`
56
- `).replace(ig,"")}function km(e,t){return t=Nm(t),Nm(e)===t}function Xe(e,t,n,a,i,u){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||$a(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&$a(e,""+a);break;case"className":_s(e,"class",a);break;case"tabIndex":_s(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":_s(e,n,a);break;case"style":Nu(e,a,u);break;case"data":if(t!=="object"){_s(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=Ms(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"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 u=="function"&&(n==="formAction"?(t!=="input"&&Xe(e,t,"name",i.name,i,null),Xe(e,t,"formEncType",i.formEncType,i,null),Xe(e,t,"formMethod",i.formMethod,i,null),Xe(e,t,"formTarget",i.formTarget,i,null)):(Xe(e,t,"encType",i.encType,i,null),Xe(e,t,"method",i.method,i,null),Xe(e,t,"target",i.target,i,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=Ms(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=yn);break;case"onScroll":a!=null&&Re("scroll",e);break;case"onScrollEnd":a!=null&&Re("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(c(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=Ms(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Re("beforetoggle",e),Re("toggle",e),Rs(e,"popover",a);break;case"xlinkActuate":bn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":bn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":bn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":bn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":bn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":bn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":bn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":bn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":bn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Rs(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Dh.get(n)||n,Rs(e,n,a))}}function lc(e,t,n,a,i,u){switch(n){case"style":Nu(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(c(60));e.innerHTML=n}}break;case"children":typeof a=="string"?$a(e,a):(typeof a=="number"||typeof a=="bigint")&&$a(e,""+a);break;case"onScroll":a!=null&&Re("scroll",e);break;case"onScrollEnd":a!=null&&Re("scrollend",e);break;case"onClick":a!=null&&(e.onclick=yn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!hu.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),u=e[Rt]||null,u=u!=null?u[n]:null,typeof u=="function"&&e.removeEventListener(t,u,i),typeof a=="function")){typeof u!="function"&&u!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,i);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):Rs(e,n,a)}}}function jt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",e),Re("load",e);var a=!1,i=!1,u;for(u in n)if(n.hasOwnProperty(u)){var p=n[u];if(p!=null)switch(u){case"src":a=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Xe(e,t,u,p,n,null)}}i&&Xe(e,t,"srcSet",n.srcSet,n,null),a&&Xe(e,t,"src",n.src,n,null);return;case"input":Re("invalid",e);var y=u=p=i=null,C=null,H=null;for(a in n)if(n.hasOwnProperty(a)){var Z=n[a];if(Z!=null)switch(a){case"name":i=Z;break;case"type":p=Z;break;case"checked":C=Z;break;case"defaultChecked":H=Z;break;case"value":u=Z;break;case"defaultValue":y=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(c(137,t));break;default:Xe(e,t,a,Z,n,null)}}vu(e,u,y,C,H,p,i,!1);return;case"select":Re("invalid",e),a=p=u=null;for(i in n)if(n.hasOwnProperty(i)&&(y=n[i],y!=null))switch(i){case"value":u=y;break;case"defaultValue":p=y;break;case"multiple":a=y;default:Xe(e,t,i,y,n,null)}t=u,n=p,e.multiple=!!a,t!=null?Ha(e,!!a,t,!1):n!=null&&Ha(e,!!a,n,!0);return;case"textarea":Re("invalid",e),u=i=a=null;for(p in n)if(n.hasOwnProperty(p)&&(y=n[p],y!=null))switch(p){case"value":a=y;break;case"defaultValue":i=y;break;case"children":u=y;break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(c(91));break;default:Xe(e,t,p,y,n,null)}wu(e,a,i,u);return;case"option":for(C in n)if(n.hasOwnProperty(C)&&(a=n[C],a!=null))switch(C){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Xe(e,t,C,a,n,null)}return;case"dialog":Re("beforetoggle",e),Re("toggle",e),Re("cancel",e),Re("close",e);break;case"iframe":case"object":Re("load",e);break;case"video":case"audio":for(a=0;a<ss.length;a++)Re(ss[a],e);break;case"image":Re("error",e),Re("load",e);break;case"details":Re("toggle",e);break;case"embed":case"source":case"link":Re("error",e),Re("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(H in n)if(n.hasOwnProperty(H)&&(a=n[H],a!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Xe(e,t,H,a,n,null)}return;default:if(gi(t)){for(Z in n)n.hasOwnProperty(Z)&&(a=n[Z],a!==void 0&&lc(e,t,Z,a,n,void 0));return}}for(y in n)n.hasOwnProperty(y)&&(a=n[y],a!=null&&Xe(e,t,y,a,n,null))}function og(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,u=null,p=null,y=null,C=null,H=null,Z=null;for(q in n){var K=n[q];if(n.hasOwnProperty(q)&&K!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":C=K;default:a.hasOwnProperty(q)||Xe(e,t,q,null,a,K)}}for(var G in a){var q=a[G];if(K=n[G],a.hasOwnProperty(G)&&(q!=null||K!=null))switch(G){case"type":u=q;break;case"name":i=q;break;case"checked":H=q;break;case"defaultChecked":Z=q;break;case"value":p=q;break;case"defaultValue":y=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(c(137,t));break;default:q!==K&&Xe(e,t,G,q,a,K)}}hi(e,p,y,C,H,Z,u,i);return;case"select":q=p=y=G=null;for(u in n)if(C=n[u],n.hasOwnProperty(u)&&C!=null)switch(u){case"value":break;case"multiple":q=C;default:a.hasOwnProperty(u)||Xe(e,t,u,null,a,C)}for(i in a)if(u=a[i],C=n[i],a.hasOwnProperty(i)&&(u!=null||C!=null))switch(i){case"value":G=u;break;case"defaultValue":y=u;break;case"multiple":p=u;default:u!==C&&Xe(e,t,i,u,a,C)}t=y,n=p,a=q,G!=null?Ha(e,!!n,G,!1):!!a!=!!n&&(t!=null?Ha(e,!!n,t,!0):Ha(e,!!n,n?[]:"",!1));return;case"textarea":q=G=null;for(y in n)if(i=n[y],n.hasOwnProperty(y)&&i!=null&&!a.hasOwnProperty(y))switch(y){case"value":break;case"children":break;default:Xe(e,t,y,null,a,i)}for(p in a)if(i=a[p],u=n[p],a.hasOwnProperty(p)&&(i!=null||u!=null))switch(p){case"value":G=i;break;case"defaultValue":q=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(c(91));break;default:i!==u&&Xe(e,t,p,i,a,u)}ju(e,G,q);return;case"option":for(var de in n)if(G=n[de],n.hasOwnProperty(de)&&G!=null&&!a.hasOwnProperty(de))switch(de){case"selected":e.selected=!1;break;default:Xe(e,t,de,null,a,G)}for(C in a)if(G=a[C],q=n[C],a.hasOwnProperty(C)&&G!==q&&(G!=null||q!=null))switch(C){case"selected":e.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:Xe(e,t,C,G,a,q)}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 be in n)G=n[be],n.hasOwnProperty(be)&&G!=null&&!a.hasOwnProperty(be)&&Xe(e,t,be,null,a,G);for(H in a)if(G=a[H],q=n[H],a.hasOwnProperty(H)&&G!==q&&(G!=null||q!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(c(137,t));break;default:Xe(e,t,H,G,a,q)}return;default:if(gi(t)){for(var Fe in n)G=n[Fe],n.hasOwnProperty(Fe)&&G!==void 0&&!a.hasOwnProperty(Fe)&&lc(e,t,Fe,void 0,a,G);for(Z in a)G=a[Z],q=n[Z],!a.hasOwnProperty(Z)||G===q||G===void 0&&q===void 0||lc(e,t,Z,G,a,q);return}}for(var L in n)G=n[L],n.hasOwnProperty(L)&&G!=null&&!a.hasOwnProperty(L)&&Xe(e,t,L,null,a,G);for(K in a)G=a[K],q=n[K],!a.hasOwnProperty(K)||G===q||G==null&&q==null||Xe(e,t,K,G,a,q)}function Em(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function cg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var i=n[a],u=i.transferSize,p=i.initiatorType,y=i.duration;if(u&&y&&Em(p)){for(p=0,y=i.responseEnd,a+=1;a<n.length;a++){var C=n[a],H=C.startTime;if(H>y)break;var Z=C.transferSize,K=C.initiatorType;Z&&Em(K)&&(C=C.responseEnd,p+=Z*(C<y?1:(y-H)/(C-H)))}if(--a,t+=8*(u+p)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var sc=null,rc=null;function Ar(e){return e.nodeType===9?e:e.ownerDocument}function Tm(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 Am(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function ic(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var oc=null;function ug(){var e=window.event;return e&&e.type==="popstate"?e===oc?!1:(oc=e,!0):(oc=null,!1)}var Cm=typeof setTimeout=="function"?setTimeout:void 0,dg=typeof clearTimeout=="function"?clearTimeout:void 0,Rm=typeof Promise=="function"?Promise:void 0,fg=typeof queueMicrotask=="function"?queueMicrotask:typeof Rm<"u"?function(e){return Rm.resolve(null).then(e).catch(mg)}:Cm;function mg(e){setTimeout(function(){throw e})}function ta(e){return e==="head"}function _m(e,t){var n=t,a=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(i),gl(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")is(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,is(n);for(var u=n.firstChild;u;){var p=u.nextSibling,y=u.nodeName;u[kl]||y==="SCRIPT"||y==="STYLE"||y==="LINK"&&u.rel.toLowerCase()==="stylesheet"||n.removeChild(u),u=p}}else n==="body"&&is(e.ownerDocument.body);n=i}while(n);gl(t)}function Om(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function cc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":cc(n),mi(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function pg(e,t,n,a){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[kl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Pt(e.nextSibling),e===null)break}return null}function hg(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Pt(e.nextSibling),e===null))return null;return e}function Mm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Pt(e.nextSibling),e===null))return null;return e}function uc(e){return e.data==="$?"||e.data==="$~"}function dc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function xg(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Pt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var fc=null;function zm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Pt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Dm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Lm(e,t,n){switch(t=Ar(n),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function is(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);mi(e)}var en=new Map,Bm=new Set;function Cr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Dn=ne.d;ne.d={f:gg,r:bg,D:yg,C:vg,L:jg,m:wg,X:Ng,S:Sg,M:kg};function gg(){var e=Dn.f(),t=vr();return e||t}function bg(e){var t=La(e);t!==null&&t.tag===5&&t.type==="form"?Pd(t):Dn.r(e)}var pl=typeof document>"u"?null:document;function Um(e,t,n){var a=pl;if(a&&typeof t=="string"&&t){var i=Ft(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),Bm.has(i)||(Bm.add(i),e={rel:e,crossOrigin:n,href:t},a.querySelector(i)===null&&(t=a.createElement("link"),jt(t,"link",e),ft(t),a.head.appendChild(t)))}}function yg(e){Dn.D(e),Um("dns-prefetch",e,null)}function vg(e,t){Dn.C(e,t),Um("preconnect",e,t)}function jg(e,t,n){Dn.L(e,t,n);var a=pl;if(a&&e&&t){var i='link[rel="preload"][as="'+Ft(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Ft(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Ft(n.imageSizes)+'"]')):i+='[href="'+Ft(e)+'"]';var u=i;switch(t){case"style":u=hl(e);break;case"script":u=xl(e)}en.has(u)||(e=j({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),en.set(u,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(os(u))||t==="script"&&a.querySelector(cs(u))||(t=a.createElement("link"),jt(t,"link",e),ft(t),a.head.appendChild(t)))}}function wg(e,t){Dn.m(e,t);var n=pl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Ft(a)+'"][href="'+Ft(e)+'"]',u=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=xl(e)}if(!en.has(u)&&(e=j({rel:"modulepreload",href:e},t),en.set(u,e),n.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(cs(u)))return}a=n.createElement("link"),jt(a,"link",e),ft(a),n.head.appendChild(a)}}}function Sg(e,t,n){Dn.S(e,t,n);var a=pl;if(a&&e){var i=Ba(a).hoistableStyles,u=hl(e);t=t||"default";var p=i.get(u);if(!p){var y={loading:0,preload:null};if(p=a.querySelector(os(u)))y.loading=5;else{e=j({rel:"stylesheet",href:e,"data-precedence":t},n),(n=en.get(u))&&mc(e,n);var C=p=a.createElement("link");ft(C),jt(C,"link",e),C._p=new Promise(function(H,Z){C.onload=H,C.onerror=Z}),C.addEventListener("load",function(){y.loading|=1}),C.addEventListener("error",function(){y.loading|=2}),y.loading|=4,Rr(p,t,a)}p={type:"stylesheet",instance:p,count:1,state:y},i.set(u,p)}}}function Ng(e,t){Dn.X(e,t);var n=pl;if(n&&e){var a=Ba(n).hoistableScripts,i=xl(e),u=a.get(i);u||(u=n.querySelector(cs(i)),u||(e=j({src:e,async:!0},t),(t=en.get(i))&&pc(e,t),u=n.createElement("script"),ft(u),jt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function kg(e,t){Dn.M(e,t);var n=pl;if(n&&e){var a=Ba(n).hoistableScripts,i=xl(e),u=a.get(i);u||(u=n.querySelector(cs(i)),u||(e=j({src:e,async:!0,type:"module"},t),(t=en.get(i))&&pc(e,t),u=n.createElement("script"),ft(u),jt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function Hm(e,t,n,a){var i=(i=fe.current)?Cr(i):null;if(!i)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=hl(n.href),n=Ba(i).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=hl(n.href);var u=Ba(i).hoistableStyles,p=u.get(e);if(p||(i=i.ownerDocument||i,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,p),(u=i.querySelector(os(e)))&&!u._p&&(p.instance=u,p.state.loading=5),en.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},en.set(e,n),u||Eg(i,e,n,p.state))),t&&a===null)throw Error(c(528,""));return p}if(t&&a!==null)throw Error(c(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=xl(n),n=Ba(i).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function hl(e){return'href="'+Ft(e)+'"'}function os(e){return'link[rel="stylesheet"]['+e+"]"}function $m(e){return j({},e,{"data-precedence":e.precedence,precedence:null})}function Eg(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),jt(t,"link",n),ft(t),e.head.appendChild(t))}function xl(e){return'[src="'+Ft(e)+'"]'}function cs(e){return"script[async]"+e}function Gm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Ft(n.href)+'"]');if(a)return t.instance=a,ft(a),a;var i=j({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ft(a),jt(a,"style",i),Rr(a,n.precedence,e),t.instance=a;case"stylesheet":i=hl(n.href);var u=e.querySelector(os(i));if(u)return t.state.loading|=4,t.instance=u,ft(u),u;a=$m(n),(i=en.get(i))&&mc(a,i),u=(e.ownerDocument||e).createElement("link"),ft(u);var p=u;return p._p=new Promise(function(y,C){p.onload=y,p.onerror=C}),jt(u,"link",a),t.state.loading|=4,Rr(u,n.precedence,e),t.instance=u;case"script":return u=xl(n.src),(i=e.querySelector(cs(u)))?(t.instance=i,ft(i),i):(a=n,(i=en.get(u))&&(a=j({},n),pc(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),ft(i),jt(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Rr(a,n.precedence,e));return t.instance}function Rr(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,u=i,p=0;p<a.length;p++){var y=a[p];if(y.dataset.precedence===t)u=y;else if(u!==i)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function mc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function pc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var _r=null;function qm(e,t,n){if(_r===null){var a=new Map,i=_r=new Map;i.set(n,a)}else i=_r,a=i.get(n),a||(a=new Map,i.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var u=n[i];if(!(u[kl]||u[gt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var p=u.getAttribute(t)||"";p=e+p;var y=a.get(p);y?y.push(u):a.set(p,[u])}}return a}function Ym(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Tg(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Zm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ag(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=hl(a.href),u=t.querySelector(os(i));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Or.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=u,ft(u);return}u=t.ownerDocument||t,a=$m(a),(i=en.get(i))&&mc(a,i),u=u.createElement("link"),ft(u);var p=u;p._p=new Promise(function(y,C){p.onload=y,p.onerror=C}),jt(u,"link",a),n.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Or.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var hc=0;function Cg(e,t){return e.stylesheets&&e.count===0&&zr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&zr(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&hc===0&&(hc=62500*cg());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&zr(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>hc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function Or(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)zr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Mr=null;function zr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Mr=new Map,t.forEach(Rg,e),Mr=null,Or.call(e))}function Rg(e,t){if(!(t.state.loading&4)){var n=Mr.get(e);if(n)var a=n.get(null);else{n=new Map,Mr.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<i.length;u++){var p=i[u];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(n.set(p.dataset.precedence,p),a=p)}a&&n.set(null,a)}i=t.instance,p=i.getAttribute("data-precedence"),u=n.get(p)||a,u===a&&n.set(null,i),n.set(p,i),this.count++,a=Or.bind(this),i.addEventListener("load",a),i.addEventListener("error",a),u?u.parentNode.insertBefore(i,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var us={$$typeof:_,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function _g(e,t,n,a,i,u,p,y,C){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=ci(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ci(0),this.hiddenUpdates=ci(null),this.identifierPrefix=a,this.onUncaughtError=i,this.onCaughtError=u,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function Xm(e,t,n,a,i,u,p,y,C,H,Z,K){return e=new _g(e,t,n,p,C,H,Z,K,y),t=1,u===!0&&(t|=24),u=Ut(3,null,null,t),e.current=u,u.stateNode=e,t=Vi(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:n,cache:t},Ii(u),e}function Fm(e){return e?(e=Va,e):Va}function Vm(e,t,n,a,i,u){i=Fm(i),a.context===null?a.context=i:a.pendingContext=i,a=Zn(t),a.payload={element:n},u=u===void 0?null:u,u!==null&&(a.callback=u),n=Xn(e,a,t),n!==null&&(Lt(n,e,t),ql(n,e,t))}function Qm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function xc(e,t){Qm(e,t),(e=e.alternate)&&Qm(e,t)}function Jm(e){if(e.tag===13||e.tag===31){var t=xa(e,67108864);t!==null&&Lt(t,e,67108864),xc(e,67108864)}}function Km(e){if(e.tag===13||e.tag===31){var t=Yt();t=ui(t);var n=xa(e,t);n!==null&&Lt(n,e,t),xc(e,t)}}var Dr=!0;function Og(e,t,n,a){var i=z.T;z.T=null;var u=ne.p;try{ne.p=2,gc(e,t,n,a)}finally{ne.p=u,z.T=i}}function Mg(e,t,n,a){var i=z.T;z.T=null;var u=ne.p;try{ne.p=8,gc(e,t,n,a)}finally{ne.p=u,z.T=i}}function gc(e,t,n,a){if(Dr){var i=bc(a);if(i===null)ac(e,t,a,Lr,n),Wm(e,a);else if(Dg(i,e,t,n,a))a.stopPropagation();else if(Wm(e,a),t&4&&-1<zg.indexOf(e)){for(;i!==null;){var u=La(i);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var p=da(u.pendingLanes);if(p!==0){var y=u;for(y.pendingLanes|=2,y.entangledLanes|=2;p;){var C=1<<31-xt(p);y.entanglements[1]|=C,p&=~C}dn(u),(He&6)===0&&(br=je()+500,ls(0))}}break;case 31:case 13:y=xa(u,2),y!==null&&Lt(y,u,2),vr(),xc(u,2)}if(u=bc(a),u===null&&ac(e,t,a,Lr,n),u===i)break;i=u}i!==null&&a.stopPropagation()}else ac(e,t,a,null,n)}}function bc(e){return e=yi(e),yc(e)}var Lr=null;function yc(e){if(Lr=null,e=Da(e),e!==null){var t=f(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=m(t),e!==null)return e;e=null}else if(n===31){if(e=g(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Lr=e,null}function Im(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(Ae()){case Ee:return 2;case ce:return 8;case ye:case pt:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var vc=!1,na=null,aa=null,la=null,ds=new Map,fs=new Map,sa=[],zg="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 Wm(e,t){switch(e){case"focusin":case"focusout":na=null;break;case"dragenter":case"dragleave":aa=null;break;case"mouseover":case"mouseout":la=null;break;case"pointerover":case"pointerout":ds.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fs.delete(t.pointerId)}}function ms(e,t,n,a,i,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:u,targetContainers:[i]},t!==null&&(t=La(t),t!==null&&Jm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Dg(e,t,n,a,i){switch(t){case"focusin":return na=ms(na,e,t,n,a,i),!0;case"dragenter":return aa=ms(aa,e,t,n,a,i),!0;case"mouseover":return la=ms(la,e,t,n,a,i),!0;case"pointerover":var u=i.pointerId;return ds.set(u,ms(ds.get(u)||null,e,t,n,a,i)),!0;case"gotpointercapture":return u=i.pointerId,fs.set(u,ms(fs.get(u)||null,e,t,n,a,i)),!0}return!1}function Pm(e){var t=Da(e.target);if(t!==null){var n=f(t);if(n!==null){if(t=n.tag,t===13){if(t=m(n),t!==null){e.blockedOn=t,fu(e.priority,function(){Km(n)});return}}else if(t===31){if(t=g(n),t!==null){e.blockedOn=t,fu(e.priority,function(){Km(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Br(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);bi=a,n.target.dispatchEvent(a),bi=null}else return t=La(n),t!==null&&Jm(t),e.blockedOn=n,!1;t.shift()}return!0}function ep(e,t,n){Br(e)&&n.delete(t)}function Lg(){vc=!1,na!==null&&Br(na)&&(na=null),aa!==null&&Br(aa)&&(aa=null),la!==null&&Br(la)&&(la=null),ds.forEach(ep),fs.forEach(ep)}function Ur(e,t){e.blockedOn===t&&(e.blockedOn=null,vc||(vc=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Lg)))}var Hr=null;function tp(e){Hr!==e&&(Hr=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Hr===e&&(Hr=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],i=e[t+2];if(typeof a!="function"){if(yc(a||n)===null)continue;break}var u=La(n);u!==null&&(e.splice(t,3),t-=3,bo(u,{pending:!0,data:i,method:n.method,action:a},a,i))}}))}function gl(e){function t(C){return Ur(C,e)}na!==null&&Ur(na,e),aa!==null&&Ur(aa,e),la!==null&&Ur(la,e),ds.forEach(t),fs.forEach(t);for(var n=0;n<sa.length;n++){var a=sa[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<sa.length&&(n=sa[0],n.blockedOn===null);)Pm(n),n.blockedOn===null&&sa.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var i=n[a],u=n[a+1],p=i[Rt]||null;if(typeof u=="function")p||tp(n);else if(p){var y=null;if(u&&u.hasAttribute("formAction")){if(i=u,p=u[Rt]||null)y=p.formAction;else if(yc(i)!==null)continue}else y=p.action;typeof y=="function"?n[a+1]=y:(n.splice(a,3),a-=3),tp(n)}}}function np(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(p){return i=p})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function jc(e){this._internalRoot=e}$r.prototype.render=jc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var n=t.current,a=Yt();Vm(n,a,e,t,null,null)},$r.prototype.unmount=jc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Vm(e.current,2,null,e,null,null),vr(),t[za]=null}};function $r(e){this._internalRoot=e}$r.prototype.unstable_scheduleHydration=function(e){if(e){var t=du();e={blockedOn:null,target:e,priority:t};for(var n=0;n<sa.length&&t!==0&&t<sa[n].priority;n++);sa.splice(n,0,e),n===0&&Pm(e)}};var ap=r.version;if(ap!=="19.2.4")throw Error(c(527,ap,"19.2.4"));ne.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=x(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Bg={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gr.isDisabled&&Gr.supportsFiber)try{ht=Gr.inject(Bg),Ye=Gr}catch{}}return hs.createRoot=function(e,t){if(!d(e))throw Error(c(299));var n=!1,a="",i=uf,u=df,p=ff;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=Xm(e,1,!1,null,null,n,a,null,i,u,p,np),e[za]=t.current,nc(e),new jc(t)},hs.hydrateRoot=function(e,t,n){if(!d(e))throw Error(c(299));var a=!1,i="",u=uf,p=df,y=ff,C=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(p=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError),n.formState!==void 0&&(C=n.formState)),t=Xm(e,1,!0,t,n??null,a,i,C,u,p,y,np),t.context=Fm(null),n=t.current,a=Yt(),a=ui(a),i=Zn(a),i.callback=null,Xn(n,i,a),n=a,t.current.lanes=n,Nl(t,n),dn(t),e[za]=t.current,nc(e),new $r(t)},hs.version="19.2.4",hs}var mp;function Qg(){if(mp)return Nc.exports;mp=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(r){console.error(r)}}return s(),Nc.exports=Vg(),Nc.exports}var Jg=Qg();const Kg=Vp(Jg),Ig=300*1e3;function jl(s){if(!s||typeof s!="object")return null;const r=s;return Array.isArray(r.sessions)?{sessions:r.sessions,cachedAt:typeof r.cachedAt=="string"?r.cachedAt:void 0}:null}function Vr(s,r=Ig){if(!s)return!1;const o=Date.now()-new Date(s).getTime();return Number.isFinite(o)&&o>=0&&o<r}function Qr(s){if(!s)return"just now";const r=Date.now()-new Date(s).getTime();if(!Number.isFinite(r)||r<0)return"just now";const o=Math.floor(r/6e4);if(o<1)return"just now";if(o<60)return`${o}m ago`;const c=Math.floor(o/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function Qp(s,r=Date.now()){if(!s)return"";const o=r-new Date(s).getTime();if(!Number.isFinite(o)||o<0)return"0m";const c=Math.floor(o/6e4);if(c<60)return`${c}m`;const d=Math.floor(c/60);return d<24?`${d}h`:`${Math.floor(d/24)}d`}function Jp(s){return new Date(s).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}function Wg(s){return s?`$${s.toFixed(2)}`:""}function Pg(s){const r=Math.round(s/1024);return r>=1024?`${(r/1024).toFixed(1)}MB`:`${r}KB`}function ws(s){const r=Date.now()-new Date(s).getTime(),o=Math.floor(r/6e4);if(o<1)return"just now";if(o<60)return`${o}m ago`;const c=Math.floor(o/60);if(c<24)return`${c}h ago`;const d=Math.floor(c/24);return d<30?`${d}d ago`:Jp(s)}function ia(s){const r=s.replace(/\/$/,"").split("/");return r[r.length-1]||s}const Vc=120;function Ln(s){return(s||"").replace(/\s+/g," ").trim().slice(0,Vc)}function Ss(s){let r=s;return r=r.replace(/<\/?[a-z][a-z0-9-]*>/gi,""),r=r.replace(/Caveat:\s*The messages below were generated by the user while running local commands\.[^.]*/g,""),r=r.replace(/DO NOT respond to these messages[^.]*/g,""),r=r.replace(/!\[AI Session:[^\]]*]\([^)]+\)/gi,""),r=r.replace(/###\s*AI Coding Session[^\n]*/gi,""),r=r.replace(/\d+\s+prompts?,\s+\d+\s+tools?,[^\n]*/gi,""),r=r.replace(/^\/\w+\s*/g,""),r=r.replace(/\s+/g," ").trim(),r}function Jr(s){const r=s.title?Ln(Ss(s.title)):"";if(r)return r;const o=[...s.prompts||[],s.firstPrompt];for(const c of o){const d=Ln(Ss(c||""));if(d)return d}return s.slug}function Dc(s){const r=Ln(s.title);if(r)return r;const o=Ln(s.firstMessage);if(o)return o;const c=Ln(s.messages?.[0]);return c||s.slug}function wl(s){const r=new URL(window.location.href);for(const[o,c]of Object.entries(s))c===null?r.searchParams.delete(o):r.searchParams.set(o,c);window.history.pushState({},"",r.toString()),window.dispatchEvent(new PopStateEvent("popstate"))}const eb={"claude-code":"bg-terminal-orange-subtle text-terminal-orange",cursor:"bg-terminal-blue-subtle text-terminal-blue"};function Kp(s){return s==="claude-code"?"Claude":s==="cursor"?"Cursor":s}function Ip(s){return eb[s]||"bg-terminal-surface text-terminal-dim"}function Ra(s){return s instanceof Error?s.message:typeof s=="string"?s:"Unknown error"}function tb(s){if(s.length<=26)return s;const o=s.split("/");if(o.length<=2)return s;const c=o[0],d=o.slice(-2).join("/"),f=`${c}/…/${d}`;if(f.length<=26)return f;const m=o[o.length-1];return`${c}/…/${m}`}function Wp(s){const r=new Map;for(const o of s)r.set(o,tb(o));return r}function yl({label:s,value:r,color:o}){const c=typeof r=="number";return l.jsxs("div",{className:"bg-terminal-surface rounded-xl px-3 py-3 shadow-layer-sm",children:[l.jsx("div",{className:`text-xl font-bold ${c?"tabular-nums":"truncate w-full"} ${o}`,title:typeof r=="string"?r:void 0,children:r}),l.jsx("div",{className:"text-terminal-dimmer text-[10px] font-sans font-medium uppercase tracking-widest mt-0.5",children:s})]})}function kt(s){return s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:s.toString()}function oa(s){if(!s)return"";const r=Math.floor(s/1e3);if(r<60)return`${r}s`;const o=Math.floor(r/60);return o<60?`${o}m ${r%60}s`:`${Math.floor(o/60)}h ${o%60}m`}function nb(s){if(s===0)return"0m";const r=Math.floor(s/6e4);if(r<60)return`${r}m`;const o=Math.floor(r/60),c=r%60;if(o<24)return c>0?`${o}h ${c}m`:`${o}h`;const d=Math.floor(o/24),f=o%24;return f>0?`${d}d ${f}h`:`${d}d`}function ab(){const[s,r]=v.useState([]),[o,c]=v.useState([]),[d,f]=v.useState(!0),[m,g]=v.useState(!0),[h,x]=v.useState(!0),[b,j]=v.useState(null),[T,N]=v.useState(null),[w,S]=v.useState(null),R=v.useRef(!1),A=v.useMemo(()=>s.some(_=>_.provider==="cursor"),[s]),E=v.useCallback(async()=>{f(!0),g(!0),x(!0),j(null);try{const[_,D]=await Promise.all([fetch("/api/sources/cached").then(Q=>Q.ok?Q.json():null).catch(()=>null),fetch("/api/sessions/cached").then(Q=>Q.ok?Q.json():null).catch(()=>null)]),$=jl(_),ae=jl(D);$?.sessions.length&&r($.sessions),ae?.sessions.length&&c(ae.sessions),($?.sessions.length||ae?.sessions.length)&&f(!1);const Y=Vr($?.cachedAt),se=Vr(ae?.cachedAt),te=[];Y&&g(!1),se&&x(!1),Y||te.push(new Promise(Q=>{N(0);const le=new EventSource("/api/sources/stream");le.onmessage=oe=>{try{const ue=JSON.parse(oe.data);ue.type==="progress"?N(ue.scanned):ue.type==="complete"?(r(ue.sessions),N(null),le.close(),Q()):ue.type==="error"&&($?.sessions.length||j(ue.message||"Failed to load sessions"),N(null),le.close(),Q())}catch{}},le.onerror=()=>{le.close(),N(null),fetch("/api/sources").then(oe=>{if(!oe.ok)throw new Error("Failed to load sources");return oe.json()}).then(oe=>r(oe.sessions)).catch(oe=>{$?.sessions.length||j(oe instanceof Error?oe.message:"Failed to load sessions")}).finally(()=>Q())}}).finally(()=>g(!1))),se||te.push(fetch("/api/sessions").then(Q=>{if(!Q.ok)throw new Error("Failed to load replays");return Q.json()}).then(Q=>c(Q)).catch(Q=>{ae?.sessions.length||j(Q instanceof Error?Q.message:"Failed to load replays")}).finally(()=>x(!1))),te.length>0&&await Promise.allSettled(te)}catch(_){j(_ instanceof Error?_.message:"Failed to load data")}finally{f(!1)}},[]);return v.useEffect(()=>{E()},[E]),v.useEffect(()=>{if(!m&&!A&&!R.current)return;let _=!1,D;const $=async()=>{const Y=await fetch("/api/sources/cached").then(te=>te.ok?te.json():null).catch(()=>null),se=jl(Y);!_&&se?.sessions.length&&r(se.sessions)},ae=async()=>{const Y=await fetch("/api/sources/enrichment-status").then(se=>se.ok?se.json():null).catch(()=>null);!Y||_||(S(Y),Y.running?(R.current=!0,await $()):R.current&&(R.current=!1,await $()))};return ae(),D=window.setInterval(()=>{ae()},2500),()=>{_=!0,D&&window.clearInterval(D)}},[A,m]),{sources:s,replays:o,loading:d,loadingSources:m,loadingReplays:h,error:b,scanProgress:T,enrichmentStatus:w}}function lb(s,r){let o=0,c=0,d=0;const f=new Map(s.map(A=>[A.slug,A]));for(const A of s)o+=A.promptCount??(A.prompts?.length||(A.firstPrompt?1:0)),c+=A.toolCallCount??0;for(const A of r){const E=f.get(A.slug),_=A.stats.toolCalls||0;E?E.toolCallCount==null?c+=_:_>E.toolCallCount&&(c+=_-E.toolCallCount):(o+=A.stats.userPrompts||0,c+=_),d+=A.stats.durationMs||0}const m=new Map;for(const A of s)m.set(A.provider,(m.get(A.provider)||0)+1);const g={"claude-code":"Claude Code",cursor:"Cursor"},h=[...m.entries()].map(([A,E])=>({provider:A,count:E,label:g[A]||A})).sort((A,E)=>E.count-A.count),x=new Set;for(const A of s)x.add(A.project);for(const A of r)x.add(A.project);const b=new Date,j=864e5,T=[];for(let A=29;A>=0;A--){const E=new Date(b.getTime()-A*j);E.setHours(0,0,0,0);const _=new Date(E.getTime()+j),D=E.toISOString().slice(0,10),$=E.toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"});let ae=0,Y=0;for(const se of s){const te=new Date(se.timestamp);te>=E&&te<_&&(se.provider==="cursor"?Y++:ae++)}T.push({date:D,label:$,claude:ae,cursor:Y})}const N=s.length,w=r.length,S=s.filter(A=>A.existingReplay).length,R=N>0?S/N*100:0;return{totalSessions:N,totalReplays:w,totalPrompts:o,totalToolCalls:c,totalDuration:d,providerBreakdown:h,projectCount:x.size,activityByDay:T,recentSources:[...s].sort((A,E)=>E.timestamp.localeCompare(A.timestamp)).slice(0,5),recentReplays:[...r].sort((A,E)=>E.startTime.localeCompare(A.startTime)).slice(0,5),publishedCount:r.filter(A=>A.gist?.gistId).length,replayConversionPct:R}}function qr({label:s,value:r,sub:o,color:c="green",icon:d}){const f={green:"text-terminal-green",blue:"text-terminal-blue",orange:"text-terminal-orange",purple:"text-terminal-purple"},m={green:"bg-terminal-green-subtle",blue:"bg-terminal-blue-subtle",orange:"bg-terminal-orange-subtle",purple:"bg-terminal-purple-subtle"};return l.jsx("div",{className:"bg-terminal-surface rounded-xl p-4 shadow-layer-sm hover:bg-terminal-surface-hover transition-colors duration-200",children:l.jsxs("div",{className:"flex items-start justify-between",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-sans text-terminal-dim uppercase tracking-wider",children:s}),l.jsx("p",{className:`text-2xl font-mono font-bold tabular-nums ${f[c]}`,children:r}),o&&l.jsx("p",{className:"text-xs font-mono text-terminal-dimmer",children:o})]}),l.jsx("div",{className:`w-9 h-9 rounded-lg flex items-center justify-center ${m[c]} opacity-70`,children:d})]})})}function sb({data:s}){const r=Math.max(...s.map(d=>d.claude+d.cursor),1),o=s.some(d=>d.claude>0||d.cursor>0),c=v.useMemo(()=>{const d=[];let f=-1;for(let m=0;m<s.length;m++){const g=new Date(s[m].date),h=g.getMonth();h!==f?(d.push({index:m,label:g.toLocaleDateString("en-US",{month:"short",day:"numeric"})}),f=h):g.getDay()===1&&m>0&&d.push({index:m,label:`${g.getDate()}`})}return d},[s]);return o?l.jsxs("div",{className:"flex flex-col h-full",children:[l.jsx("div",{className:"flex-1 flex items-stretch gap-px min-h-0",children:s.map(d=>{const f=d.claude+d.cursor,m=Math.max(f/r*100,f>0?4:0),g=f>0?d.claude/f*100:0,h=d.date===new Date().toISOString().slice(0,10);return l.jsxs("div",{className:"flex-1 flex flex-col justify-end h-full group relative",title:`${d.label}: ${d.claude} Claude, ${d.cursor} Cursor`,children:[l.jsx("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 hidden group-hover:block z-10",children:l.jsxs("div",{className:"bg-terminal-surface-2 border border-terminal-border-subtle rounded-lg px-2.5 py-1.5 shadow-layer-md whitespace-nowrap",children:[l.jsx("div",{className:"text-[10px] font-mono text-terminal-dim",children:d.label}),d.claude>0&&l.jsxs("div",{className:"text-[10px] font-mono text-terminal-orange",children:[d.claude," Claude"]}),d.cursor>0&&l.jsxs("div",{className:"text-[10px] font-mono text-terminal-blue",children:[d.cursor," Cursor"]})]})}),l.jsx("div",{className:`rounded-sm transition-all duration-200 ${h?"ring-1 ring-terminal-orange/30":""} ${f>0?"hover:opacity-80":""}`,style:{height:`${m}%`,minHeight:f>0?"3px":"0",background:f>0?`linear-gradient(to top, var(--orange) ${g}%, var(--blue) ${g}%)`:"transparent",opacity:f>0?.7:.1}})]},d.date)})}),l.jsx("div",{className:"flex items-center mt-1.5 relative h-4",children:c.map(d=>l.jsx("span",{className:"absolute text-[9px] font-mono text-terminal-dimmer",style:{left:`${d.index/s.length*100}%`},children:d.label},d.index))})]}):l.jsx("div",{className:"flex items-center justify-center h-full text-terminal-dimmer text-xs font-mono",children:"No activity in the last 30 days"})}function rb({breakdown:s}){const r=s.reduce((c,d)=>c+d.count,0),o={"claude-code":{bar:"bg-terminal-orange",text:"text-terminal-orange"},cursor:{bar:"bg-terminal-blue",text:"text-terminal-blue"}};return s.length===0?l.jsx("div",{className:"text-terminal-dimmer text-xs font-mono",children:"No provider data"}):l.jsx("div",{className:"space-y-3",children:s.map(c=>{const d=r>0?c.count/r*100:0,f=o[c.provider]||{bar:"bg-terminal-dim",text:"text-terminal-dim"};return l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:`text-xs font-sans font-medium ${f.text}`,children:c.label}),l.jsxs("span",{className:"text-xs font-mono text-terminal-dim tabular-nums",children:[c.count," (",Math.round(d),"%)"]})]}),l.jsx("div",{className:"h-1.5 rounded-full bg-terminal-surface-2 overflow-hidden",children:l.jsx("div",{className:`h-full rounded-full ${f.bar} transition-all duration-500`,style:{width:`${d}%`,opacity:.7}})})]},c.provider)})})}function Pp({provider:s}){return l.jsx("span",{className:`text-[10px] font-sans font-medium px-1.5 py-0.5 rounded-full uppercase tracking-wider ${Ip(s)}`,children:Kp(s)})}function ib({sessions:s,isLoading:r,onViewAll:o,onGenerate:c,onViewReplay:d,generatingSlug:f,generateErrorSlug:m}){return s.length===0?l.jsx("div",{className:"text-center py-6 text-terminal-dimmer text-xs font-mono",children:r?"Loading sessions...":"No sessions found. Start a coding session with Claude Code or Cursor."}):l.jsxs("div",{className:"space-y-1",children:[s.map(g=>{const h=!!g.existingReplay,x=f===g.slug,b=m===g.slug;return l.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-lg hover:bg-terminal-surface-hover transition-colors duration-200",children:[l.jsx(Pp,{provider:g.provider}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-sans text-terminal-text truncate",children:Jr(g)}),l.jsx("p",{className:"text-[11px] font-mono text-terminal-dimmer truncate",children:ia(g.project)})]}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[l.jsx("span",{className:"text-[11px] font-mono text-terminal-dimmer tabular-nums",children:ws(g.timestamp)}),h?l.jsxs("button",{onClick:()=>d(g.existingReplay),className:"h-6 px-2.5 text-[11px] font-sans font-semibold rounded-md bg-terminal-green-subtle text-terminal-green hover:bg-terminal-green-emphasis transition-all duration-200 flex items-center gap-1",children:[l.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"currentColor",children:l.jsx("polygon",{points:"4 2 14 8 4 14"})}),"View"]}):l.jsx("button",{onClick:()=>c(g),disabled:x,className:`h-6 px-2.5 text-[11px] font-sans font-semibold rounded-md transition-all duration-200 disabled:opacity-50 flex items-center gap-1 ${b?"bg-terminal-red-subtle text-terminal-red":"bg-terminal-blue-subtle text-terminal-blue hover:bg-terminal-blue-emphasis"}`,children:x?l.jsx("span",{className:"animate-pulse",children:"..."}):b?"Failed":l.jsxs(l.Fragment,{children:[l.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("path",{d:"M8 2v12M2 8h12"})}),"Generate"]})})]})]},`${g.provider}-${g.slug}`)}),l.jsx("button",{onClick:o,className:"w-full py-2 mt-1 text-xs font-sans font-semibold rounded-lg bg-terminal-surface-2 text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors",children:"View all sessions →"})]})}function ob({replays:s,isLoading:r,onViewAll:o,onOpen:c}){return s.length===0?l.jsx("div",{className:"text-center py-6 text-terminal-dimmer text-xs font-mono",children:r?"Loading replays...":"No replays yet. Generate one from the Sessions tab."}):l.jsxs("div",{className:"space-y-1",children:[s.map(d=>l.jsxs("button",{onClick:()=>c(d.slug),className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg hover:bg-terminal-surface-hover transition-colors duration-200 text-left group",children:[l.jsx(Pp,{provider:d.provider}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-sans text-terminal-text truncate group-hover:text-terminal-green transition-colors",children:Dc(d)}),l.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[l.jsxs("span",{className:"text-[11px] font-mono text-terminal-dimmer",children:[d.stats.userPrompts," prompts"]}),l.jsx("span",{className:"text-terminal-border text-[10px]",children:"·"}),l.jsxs("span",{className:"text-[11px] font-mono text-terminal-dimmer",children:[d.stats.toolCalls," tools"]}),d.stats.durationMs&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-terminal-border text-[10px]",children:"·"}),l.jsx("span",{className:"text-[11px] font-mono text-terminal-dimmer",children:oa(d.stats.durationMs)})]})]})]}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[d.gist?.gistId&&l.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded bg-terminal-purple-subtle text-terminal-purple",children:"published"}),l.jsx("span",{className:"text-[11px] font-mono text-terminal-dimmer tabular-nums",children:ws(d.startTime)})]})]},d.slug)),l.jsx("button",{onClick:o,className:"w-full py-2 mt-1 text-xs font-sans font-semibold rounded-lg bg-terminal-surface-2 text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors",children:"View all replays →"})]})}const pp=[{name:"gh",label:"GitHub CLI",purpose:"Publish replays as GitHub Gists"},{name:"claude",label:"Claude Code",purpose:"AI feedback via headless mode"},{name:"cursor",label:"Cursor CLI",purpose:"AI feedback via AI Studio"},{name:"opencode",label:"OpenCode",purpose:"AI feedback via headless mode"}];function cb(){const[s,r]=v.useState(()=>pp.map(o=>({...o,installed:!1,detail:"checking...",loading:!0})));return v.useEffect(()=>{let o=!1;for(const c of pp)fetch(`/api/system-checks?tool=${encodeURIComponent(c.name)}`).then(d=>d.ok?d.json():null).then(d=>{if(o)return;const f=d?.checks?.find(m=>m.name===c.name)||d?.checks?.[0];if(!f){r(m=>m.map(g=>g.name===c.name?{...g,installed:!1,detail:"check failed",loading:!1}:g));return}r(m=>m.map(g=>g.name===c.name?{...g,installed:!!f.installed,version:f.version,detail:f.detail,loading:!1}:g))}).catch(()=>{o||r(d=>d.map(f=>f.name===c.name?{...f,installed:!1,detail:"check failed",loading:!1}:f))});return()=>{o=!0}},[]),l.jsxs("div",{className:"bg-terminal-surface rounded-xl p-4 shadow-layer-sm",children:[l.jsx("h3",{className:"text-xs font-sans font-semibold text-terminal-text uppercase tracking-wider mb-3",children:"System"}),l.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-2",children:s.map(o=>l.jsxs("div",{className:"flex items-start gap-2.5 px-3 py-2.5 rounded-lg bg-terminal-bg",children:[l.jsx("div",{className:`w-2 h-2 mt-1 rounded-full shrink-0 ${o.loading?"bg-terminal-blue animate-pulse":o.installed?"bg-terminal-green":"bg-terminal-dim opacity-40"}`}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("span",{className:`text-xs font-sans font-medium ${o.loading?"text-terminal-dim":o.installed?"text-terminal-text":"text-terminal-dimmer"}`,children:o.label}),l.jsx("p",{className:"text-[10px] font-mono text-terminal-dimmer truncate",children:o.purpose}),o.loading?l.jsx("p",{className:"text-[10px] font-mono text-terminal-blue truncate animate-pulse",children:"checking..."}):o.installed?l.jsx("p",{className:"text-[10px] font-mono text-terminal-green truncate",children:o.detail||o.version||"ready"}):l.jsx("p",{className:"text-[10px] font-mono text-terminal-orange truncate",children:o.detail||"not found"})]})]},o.name))})]})}const ti=({c:s,children:r})=>l.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:s,children:r}),ub=()=>l.jsx(ti,{c:"text-terminal-green",children:l.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),db=()=>l.jsx(ti,{c:"text-terminal-blue",children:l.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})}),fb=()=>l.jsxs(ti,{c:"text-terminal-green",children:[l.jsx("polyline",{points:"4 17 10 11 4 5"}),l.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]}),mb=()=>l.jsx(ti,{c:"text-terminal-orange",children:l.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})});function pb({onNavigate:s}){const{sources:r,replays:o,loading:c,loadingSources:d,loadingReplays:f,error:m,scanProgress:g,enrichmentStatus:h}=ab(),x=v.useMemo(()=>lb(r,o),[r,o]),[b,j]=v.useState(null),[T,N]=v.useState(null),w=E=>{wl({view:null,session:E})},S=async E=>{j(E.slug),N(null);try{const _=Jr(E),D=await fetch("/api/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:E.provider,filePaths:E.filePaths,toolPaths:E.toolPaths,title:Ln(_)||void 0,sessionSlug:E.slug,sessionProject:E.project})}),$=await D.json();if(!D.ok)throw new Error($.error||"Generation failed");wl({view:null,session:$.slug})}catch(_){console.error("Generate error:",_),N(E.slug),setTimeout(()=>N(D=>D===E.slug?null:D),2e3)}finally{j(null)}};if(c&&r.length===0&&o.length===0)return l.jsx("div",{className:"flex-1 flex items-center justify-center",children:l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-terminal-green animate-pulse mx-auto"}),l.jsx("div",{className:"text-sm font-mono text-terminal-dim animate-pulse",children:"Loading dashboard..."}),l.jsx("div",{className:"text-xs font-mono text-terminal-dimmer",children:"Cursor history may take longer on large workspaces"})]})});if(m&&r.length===0&&o.length===0)return l.jsx("div",{className:"flex-1 flex items-center justify-center",children:l.jsx("div",{className:"text-center space-y-2",children:l.jsx("div",{className:"text-terminal-red font-mono text-sm",children:m})})});const A=r.every(E=>E.promptCount!=null)?`across ${x.projectCount} projects`:`${r.filter(E=>E.promptCount!=null).length} of ${r.length} scanned`;return l.jsx("div",{className:"flex-1 overflow-y-auto",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-4 md:px-6 py-6 space-y-6",children:[g!=null&&l.jsxs("div",{className:"flex items-center gap-2 px-1",children:[l.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-terminal-green animate-pulse"}),l.jsxs("span",{className:"text-xs font-mono text-terminal-dim",children:["Scanning... ",g," sessions"]})]}),h?.running&&h.total>0&&l.jsxs("div",{className:"flex items-center gap-2 px-1",children:[l.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-terminal-blue animate-pulse"}),l.jsxs("span",{className:"text-xs font-mono text-terminal-dim",children:["Enriching Cursor stats... ",h.processed,"/",h.total]})]}),l.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[l.jsx(qr,{label:"Sessions",value:x.totalSessions.toLocaleString(),sub:`${x.projectCount} project${x.projectCount!==1?"s":""}`,color:"green",icon:l.jsx(ub,{})}),l.jsx(qr,{label:"Replays",value:x.totalReplays.toLocaleString(),sub:x.publishedCount>0?`${x.publishedCount} published`:void 0,color:"blue",icon:l.jsx(db,{})}),l.jsx(qr,{label:"Turns",value:x.totalPrompts.toLocaleString(),sub:A,color:"green",icon:l.jsx(fb,{})}),l.jsx(qr,{label:"Tool Calls",value:x.totalToolCalls.toLocaleString(),sub:A,color:"orange",icon:l.jsx(mb,{})})]}),l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-3",children:[l.jsxs("div",{className:"lg:col-span-2 bg-terminal-surface rounded-xl p-4 shadow-layer-sm",children:[l.jsxs("div",{className:"flex items-center justify-between mb-3",children:[l.jsx("h3",{className:"text-xs font-sans font-semibold text-terminal-text uppercase tracking-wider",children:"Activity"}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"w-2 h-2 rounded-sm bg-terminal-orange opacity-70"}),l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:"Claude"})]}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"w-2 h-2 rounded-sm bg-terminal-blue opacity-70"}),l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:"Cursor"})]})]})]}),l.jsx("div",{className:"h-32",children:l.jsx(sb,{data:x.activityByDay})})]}),l.jsxs("div",{className:"bg-terminal-surface rounded-xl p-4 shadow-layer-sm space-y-4",children:[l.jsx("h3",{className:"text-xs font-sans font-semibold text-terminal-text uppercase tracking-wider",children:"Summary"}),l.jsx(rb,{breakdown:x.providerBreakdown}),l.jsxs("div",{className:"pt-2 border-t border-terminal-border-subtle space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-xs font-sans text-terminal-dim",children:"Replay coverage"}),l.jsxs("span",{className:"text-sm font-mono font-medium text-terminal-green tabular-nums",children:[Math.round(x.replayConversionPct),"%"]})]}),x.totalDuration>0&&l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-xs font-sans text-terminal-dim",children:"Total replay time"}),l.jsx("span",{className:"text-sm font-mono font-medium text-terminal-text tabular-nums",children:nb(x.totalDuration)})]})]})]})]}),l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[l.jsxs("div",{className:"bg-terminal-surface rounded-xl p-4 shadow-layer-sm",children:[l.jsxs("div",{className:"flex items-center justify-between mb-3",children:[l.jsx("h3",{className:"text-xs font-sans font-semibold text-terminal-text uppercase tracking-wider",children:"Recent Sessions"}),l.jsxs("span",{className:"text-[10px] font-mono text-terminal-dimmer tabular-nums",children:[x.totalSessions," total"]})]}),l.jsx(ib,{sessions:x.recentSources,isLoading:d,onViewAll:()=>s("sessions"),onGenerate:S,onViewReplay:w,generatingSlug:b,generateErrorSlug:T})]}),l.jsxs("div",{className:"bg-terminal-surface rounded-xl p-4 shadow-layer-sm",children:[l.jsxs("div",{className:"flex items-center justify-between mb-3",children:[l.jsx("h3",{className:"text-xs font-sans font-semibold text-terminal-text uppercase tracking-wider",children:"Recent Replays"}),l.jsxs("span",{className:"text-[10px] font-mono text-terminal-dimmer tabular-nums",children:[x.totalReplays," total"]})]}),l.jsx(ob,{replays:x.recentReplays,isLoading:f,onViewAll:()=>s("replays"),onOpen:w})]})]}),l.jsx(cb,{})]})})}const hb=()=>l.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:[l.jsx("circle",{cx:"8",cy:"3",r:"1.5"}),l.jsx("circle",{cx:"8",cy:"8",r:"1.5"}),l.jsx("circle",{cx:"8",cy:"13",r:"1.5"})]});function eh({provider:s}){return l.jsx("span",{className:`text-[10px] font-sans font-medium px-1.5 py-0.5 rounded-full uppercase tracking-wider ${Ip(s)}`,children:Kp(s)})}function xb({slug:s,title:r,fallbackTitle:o,onSave:c}){const d=Ln(r||o||s),[f,m]=v.useState(!1),[g,h]=v.useState(d),[x,b]=v.useState(!1),j=v.useRef(null);v.useEffect(()=>{h(d)},[d]),v.useEffect(()=>{f&&j.current?.focus()},[f]);const T=async()=>{if(!x){b(!0);try{await c(s,Ln(g))}finally{b(!1),m(!1)}}};return f?l.jsxs("div",{className:"min-w-0",children:[l.jsx("form",{onSubmit:N=>{N.preventDefault(),T()},className:"flex items-center gap-1.5 min-w-0",children:l.jsx("input",{ref:j,value:g,onChange:N=>h(N.target.value),onBlur:T,onKeyDown:N=>{N.key==="Escape"&&(h(d),m(!1))},className:"bg-terminal-surface-2 rounded px-2 py-0.5 text-sm font-sans text-terminal-text w-full outline-none ring-1 ring-terminal-border-subtle focus:ring-terminal-green/50 transition-shadow duration-200",placeholder:d,maxLength:Vc,disabled:x})}),l.jsxs("div",{className:"text-[11px] font-mono text-terminal-dimmer truncate mt-0.5",children:["slug: ",l.jsx("span",{className:"text-terminal-dim",children:s})]})]}):l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("button",{onClick:()=>m(!0),className:"group flex items-center gap-1 min-w-0 max-w-full text-left",title:"Click to edit title",children:[l.jsx("span",{className:"text-sm font-sans font-medium text-terminal-text truncate",children:d||s}),l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"shrink-0 text-terminal-dim opacity-0 group-hover:opacity-100 transition-opacity",children:l.jsx("path",{d:"M11.5 1.5l3 3-9 9H2.5v-3l9-9z"})})]}),l.jsxs("div",{className:"text-[11px] font-mono text-terminal-dimmer truncate mt-0.5",children:["slug: ",l.jsx("span",{className:"text-terminal-dim",children:s})]})]})}function gb({onArchive:s,isArchived:r}){const[o,c]=v.useState(!1),d=v.useRef(null);return v.useEffect(()=>{if(!o)return;const f=m=>{d.current&&!d.current.contains(m.target)&&c(!1)};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[o]),l.jsxs("div",{className:"relative",ref:d,children:[l.jsx("button",{onClick:()=>c(f=>!f),className:"h-7 w-7 flex items-center justify-center rounded-md bg-terminal-surface-2 text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors duration-200",title:"More actions",children:l.jsx(hb,{})}),o&&l.jsx("div",{className:"absolute right-0 top-full mt-1 z-50 min-w-[140px] rounded-lg bg-terminal-surface-2 border border-terminal-border shadow-layer-md py-1",children:l.jsxs("button",{onClick:()=>{s(),c(!1)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs font-sans text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors",children:[l.jsx("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:l.jsx("path",{d:"M2 4h12v2H2zM3 6v7h10V6M6.5 8h3"})}),r?"Unarchive":"Archive"]})})]})}function th({summary:s,onOpen:r,onTitleSave:o,onDelete:c,onPublishGist:d,onRegenerate:f,onArchive:m,ghAvailable:g,isPublishing:h,isDeleting:x,isRegenerating:b,isArchived:j}){const[T,N]=v.useState(!1),[w,S]=v.useState(!1),R=v.useRef(null);return v.useEffect(()=>{if(!w)return;const A=E=>{R.current&&!R.current.contains(E.target)&&(S(!1),N(!1))};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[w]),l.jsxs("div",{className:`bg-terminal-surface rounded-xl px-5 py-4 hover:bg-terminal-surface-hover transition-colors duration-200 ease-material space-y-2.5 shadow-layer-sm hover-lift ${j?"opacity-50":""}`,children:[l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsx("div",{className:"flex-1 flex items-center gap-2 min-w-0",children:o?l.jsx(xb,{slug:s.slug,title:s.title,fallbackTitle:Dc(s),onSave:o}):l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("span",{className:"text-sm font-sans font-medium text-terminal-text truncate block",children:Dc(s)}),l.jsxs("div",{className:"text-[11px] font-mono text-terminal-dimmer truncate mt-0.5",children:["slug: ",l.jsx("span",{className:"text-terminal-dim",children:s.slug})]})]})}),l.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[s.gist&&!s.gist.outdated&&l.jsxs("a",{href:s.gist.viewerUrl,target:"_blank",rel:"noopener noreferrer",className:"h-7 px-2.5 text-xs font-sans font-semibold rounded-md bg-terminal-purple-subtle text-terminal-purple hover:bg-terminal-purple-emphasis transition-all duration-200 ease-material flex items-center justify-center gap-1.5 shrink-0",title:"View on vibe-replay.com",children:[l.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("path",{d:"M6 3H3v10h10v-3M9 2h5v5M14 2L7 9"})}),"Synced"]}),s.gist?.outdated&&d&&l.jsx("button",{onClick:d,disabled:h,className:"h-7 px-2.5 text-xs font-sans font-semibold rounded-md bg-terminal-orange-subtle text-terminal-orange hover:bg-terminal-orange-emphasis transition-all duration-200 ease-material flex items-center justify-center gap-1.5 shrink-0 disabled:opacity-50",children:h?"Syncing...":"Out of sync"}),g&&d&&!s.gist?.gistId&&l.jsxs("button",{onClick:d,disabled:h,className:"h-7 px-2.5 text-xs font-sans font-semibold rounded-md bg-terminal-purple-subtle text-terminal-purple hover:bg-terminal-purple-emphasis transition-all duration-200 ease-material flex items-center justify-center gap-1.5 shrink-0 disabled:opacity-50",title:"Publish to Gist",children:[h?l.jsx("span",{className:"animate-pulse",children:"..."}):l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:l.jsx("path",{d:"M8 2v8M5 5l3-3 3 3M3 11v2h10v-2"})}),"Upload"]}),f&&l.jsxs("button",{onClick:f,disabled:b,className:"h-7 px-2.5 text-xs font-sans font-semibold rounded-md bg-terminal-blue-subtle text-terminal-blue hover:bg-terminal-blue-emphasis transition-all duration-200 ease-material flex items-center justify-center gap-1.5 shrink-0 disabled:opacity-50",title:"Redo",children:[b?l.jsx("span",{className:"animate-pulse",children:"..."}):l.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),l.jsx("path",{d:"M21 3v5h-5"}),l.jsx("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),l.jsx("path",{d:"M8 16H3v5"})]}),"Redo"]}),l.jsxs("button",{onClick:r,className:"h-7 px-2.5 text-xs font-sans font-semibold rounded-md bg-terminal-green-subtle text-terminal-green hover:bg-terminal-green-emphasis transition-all duration-200 ease-material flex items-center justify-center gap-1 shrink-0",children:[l.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"currentColor",children:l.jsx("polygon",{points:"4 2 14 8 4 14"})}),"View"]}),(c||m)&&l.jsxs("div",{className:"relative",ref:R,children:[l.jsx("button",{onClick:()=>{S(A=>!A),N(!1)},className:"h-7 w-7 flex items-center justify-center rounded-md bg-terminal-surface-2 text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors duration-200",title:"More actions",children:l.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:[l.jsx("circle",{cx:"8",cy:"3",r:"1.5"}),l.jsx("circle",{cx:"8",cy:"8",r:"1.5"}),l.jsx("circle",{cx:"8",cy:"13",r:"1.5"})]})}),w&&l.jsxs("div",{className:"absolute right-0 top-full mt-1 z-50 min-w-[140px] rounded-lg bg-terminal-surface-2 border border-terminal-border shadow-layer-md py-1",children:[m&&l.jsxs("button",{onClick:()=>{m(),S(!1)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs font-sans text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors",children:[l.jsx("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:l.jsx("path",{d:"M2 4h12v2H2zM3 6v7h10V6M6.5 8h3"})}),j?"Unarchive":"Archive"]}),c&&l.jsxs(l.Fragment,{children:[m&&l.jsx("div",{className:"mx-2 my-1 border-t border-terminal-border"}),T?l.jsxs("div",{className:"flex items-center gap-1 px-2 py-1",children:[l.jsx("button",{onClick:()=>{c(),N(!1),S(!1)},className:"h-6 px-2 text-xs font-sans rounded bg-terminal-red-subtle text-terminal-red hover:bg-terminal-red-emphasis transition-colors duration-200",children:"Confirm"}),l.jsx("button",{onClick:()=>N(!1),className:"h-6 px-2 text-xs font-sans rounded text-terminal-dim hover:text-terminal-text transition-colors",children:"Cancel"})]}):l.jsxs("button",{onClick:()=>N(!0),className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs font-sans text-terminal-red hover:bg-terminal-red-subtle transition-colors",children:[l.jsx("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:l.jsx("path",{d:"M3 4h10M5.5 4V3a1 1 0 011-1h3a1 1 0 011 1v1M6.5 7v4M9.5 7v4M4.5 4l.5 9a1 1 0 001 1h4a1 1 0 001-1l.5-9"})}),"Delete"]})]})]})]})]})]}),(s.messages||(s.firstMessage?[s.firstMessage]:[])).map(A=>Ss(A||"")).filter(A=>A.length>0).map((A,E)=>l.jsxs("div",{className:"flex gap-2 items-start",children:[l.jsx("span",{className:"text-xs text-terminal-green shrink-0 mt-px select-none",children:">"}),l.jsx("p",{className:"text-sm text-terminal-dim line-clamp-1 leading-relaxed",children:A})]},E)),l.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[l.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-mono tabular-nums px-1.5 py-0.5 rounded-md bg-terminal-surface-2 text-terminal-dim",children:[s.stats.userPrompts," prompts"]}),l.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-mono tabular-nums px-1.5 py-0.5 rounded-md bg-terminal-orange-subtle text-terminal-orange",children:[s.stats.toolCalls," tools"]}),s.stats.durationMs&&l.jsx("span",{className:"inline-flex items-center gap-1 text-xs font-mono tabular-nums px-1.5 py-0.5 rounded-md bg-terminal-surface-2 text-terminal-dim",children:oa(s.stats.durationMs)}),s.stats.costEstimate&&l.jsx("span",{className:"inline-flex items-center gap-1 text-xs font-mono tabular-nums px-1.5 py-0.5 rounded-md bg-terminal-green-subtle text-terminal-green",children:Wg(s.stats.costEstimate)}),s.hasAnnotations&&l.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-mono tabular-nums px-1.5 py-0.5 rounded-md bg-terminal-blue-subtle text-terminal-blue",children:[s.annotationCount," annotation",s.annotationCount!==1?"s":""]})]}),l.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono text-terminal-dimmer flex-wrap",children:[l.jsx(eh,{provider:s.provider}),l.jsx("span",{children:s.project}),l.jsx("span",{className:"text-terminal-border",children:"·"}),l.jsx("span",{children:Jp(s.startTime)}),s.model&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-terminal-border",children:"·"}),l.jsx("span",{children:s.model})]})]})]})}function hp(){const[s,r]=v.useState(""),[o,c]=v.useState(!1),[d,f]=v.useState(null),m=g=>{g.preventDefault();const h=s.trim();if(!h)return;if(c(!0),f(null),/^[a-f0-9]{20,40}$/.test(h)){window.location.search=`?gist=${h}`;return}const x=h.match(/gist\.github\.com\/[^/]+\/([a-f0-9]{20,40})/);if(x){window.location.search=`?gist=${x[1]}`;return}const b=h.match(/[?&]gist=([a-f0-9]{20,40})/);if(b){window.location.search=`?gist=${b[1]}`;return}try{new URL(h),window.location.search=`?url=${encodeURIComponent(h)}`}catch{f("Enter a valid URL or Gist ID"),c(!1)}};return l.jsxs("form",{onSubmit:m,className:"space-y-2",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{value:s,onChange:g=>{r(g.target.value),f(null)},placeholder:"Paste a Gist ID, Gist URL, or replay JSON URL...",className:"flex-1 bg-terminal-surface rounded-lg px-3 py-2.5 text-sm font-mono text-terminal-text placeholder:text-terminal-dimmer outline-none ring-1 ring-transparent focus:ring-terminal-green/40 transition-shadow duration-200 shadow-layer-sm",disabled:o}),l.jsx("button",{type:"submit",disabled:o||!s.trim(),className:"px-4 py-2 text-xs font-mono rounded-lg bg-terminal-green-subtle text-terminal-green hover:bg-terminal-green-emphasis transition-colors duration-200 disabled:opacity-40 font-medium",children:o?"Loading...":"Open"})]}),d&&l.jsx("div",{className:"text-xs font-mono text-terminal-red",children:d})]})}const wt="__all__";function bb(){const[s,r]=v.useState([]),[o,c]=v.useState(!0),[d,f]=v.useState(null),[m,g]=v.useState(!1),[h,x]=v.useState(null),[b,j]=v.useState(null),[T,N]=v.useState(null),[w,S]=v.useState(()=>Date.now()),[R,A]=v.useState(wt),[E,_]=v.useState(""),[D,$]=v.useState(null),[ae,Y]=v.useState(null),[se,te]=v.useState(null),[Q,le]=v.useState(""),oe=v.useRef(null),ue=v.useRef(!1),[P,pe]=v.useState(new Set),[z,ne]=v.useState(!1),[ie,ee]=v.useState(null),[re,k]=v.useState(null),[O,B]=v.useState(null),W=s.some(X=>X.provider==="cursor"),F=v.useCallback(async X=>{c(!0),f(null),j(null),g(!1),x(null);const ve=await fetch("/api/archived").then(ce=>ce.ok?ce.json():{slugs:[]}).catch(()=>({slugs:[]}));pe(new Set(ve.slugs));let Te=!1;const je=await fetch("/api/sources/cached").then(ce=>ce.ok?ce.json():null).catch(()=>null),Ae=jl(je),Ee=!X?.forceRefresh&&Vr(Ae?.cachedAt);if(Ae&&Ae.sessions.length>0&&(Te=!0,r(Ae.sessions),N(Ae.cachedAt??null),x(Ee?null:Ae.cachedAt??null),c(!1),g(!Ee)),Ee){g(!1),c(!1);return}try{const ce=await fetch("/api/sources");if(!ce.ok)throw new Error("Failed to load sessions");const ye=await ce.json();r(ye.sessions),N(new Date().toISOString()),x(null)}catch(ce){Te?j("Failed to refresh latest sessions. Showing cached data."):f(Ra(ce)||"Failed to load sessions")}finally{g(!1),c(!1)}},[]),fe=async X=>{const ve=P.has(X);pe(Te=>{const je=new Set(Te);return ve?je.delete(X):je.add(X),je});try{if(!(await fetch(`/api/archive/${X}`,{method:ve?"DELETE":"POST"})).ok)throw new Error("Archive toggle failed")}catch(Te){console.error("Archive toggle failed:",Ra(Te)),pe(je=>{const Ae=new Set(je);return ve?Ae.add(X):Ae.delete(X),Ae})}};v.useEffect(()=>{F(),fetch("/api/gh-status").then(X=>X.json()).then(X=>ee(X.available)).catch(()=>ee(!1))},[F]),v.useEffect(()=>{if(!o&&!W&&!ue.current)return;let X=!1,ve;const Te=async()=>{const Ae=await fetch("/api/sources/cached").then(ce=>ce.ok?ce.json():null).catch(()=>null),Ee=jl(Ae);!X&&Ee?.sessions.length&&r(Ee.sessions)},je=async()=>{const Ae=await fetch("/api/sources/enrichment-status").then(Ee=>Ee.ok?Ee.json():null).catch(()=>null);!Ae||X||(B(Ae),Ae.running?(ue.current=!0,await Te()):ue.current&&(ue.current=!1,await Te()))};return je(),ve=window.setInterval(()=>{je()},2500),()=>{X=!0,ve&&window.clearInterval(ve)}},[W,o]),v.useEffect(()=>{const X=window.setInterval(()=>S(Date.now()),3e4);return()=>window.clearInterval(X)},[]),v.useEffect(()=>{se&&oe.current?.focus()},[se]);const xe=async(X,ve)=>{if(!(await fetch(`/api/sessions/${encodeURIComponent(X)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:ve})})).ok)throw new Error("Failed to update title");r(je=>je.map(Ae=>Ae.slug===X&&Ae.replay?{...Ae,replay:{...Ae.replay,title:ve||void 0}}:Ae))},De=X=>{const ve=Jr(X);te({slug:X.slug,defaultTitle:ve}),le(ve)},J=async()=>{if(!se)return;const X=s.find(ve=>ve.slug===se.slug);if(X){te(null),$(X.slug),Y(null);try{const ve=await fetch("/api/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:X.provider,filePaths:X.filePaths,toolPaths:X.toolPaths,title:Ln(Q)||void 0,sessionSlug:X.slug,sessionProject:X.project})}),Te=await ve.json();if(!ve.ok)throw new Error(Te.error||"Generation failed");wl({view:null,session:Te.slug})}catch(ve){Y(Ra(ve))}finally{$(null)}}},ge=async X=>{k(X);try{const ve=await fetch(`/api/publish/gist?slug=${encodeURIComponent(X)}`,{method:"POST"});if(!ve.ok){const je=await ve.json().catch(()=>({}));throw new Error(je.error||"Publish failed")}const Te=await ve.json();r(je=>je.map(Ae=>Ae.slug===X&&Ae.replay?{...Ae,replay:{...Ae.replay,gist:{gistId:Te.gistId,viewerUrl:Te.viewerUrl,updatedAt:new Date().toISOString(),outdated:!1}}}:Ae))}catch(ve){console.error("Gist publish error:",Ra(ve))}finally{k(null)}},Se=async X=>{try{if(!(await fetch(`/api/sessions/${encodeURIComponent(X)}`,{method:"DELETE"})).ok)return;r(Te=>Te.map(je=>je.slug===X?{...je,replay:void 0,existingReplay:null}:je))}catch{}},$e=s.filter(X=>P.has(X.slug)).length,Je=z?s:s.filter(X=>!P.has(X.slug)),Ve=new Map;for(const X of Je)Ve.has(X.project)||Ve.set(X.project,[]),Ve.get(X.project)?.push(X);const Ct=[...Ve.entries()].sort((X,ve)=>{const Te=X[1][0]?.timestamp||"";return(ve[1][0]?.timestamp||"").localeCompare(Te)}),ot=Wp(Ct.map(([X])=>X)),tn=R===wt?Je:Ve.get(R)||[],xn=E?tn.filter(X=>X.slug.toLowerCase().includes(E.toLowerCase())||X.firstPrompt.toLowerCase().includes(E.toLowerCase())||(X.title||"").toLowerCase().includes(E.toLowerCase())||(X.gitBranch||"").toLowerCase().includes(E.toLowerCase())):tn,gn=T?Qp(T,w):null,ct=o&&s.length===0;return d&&s.length===0?l.jsx("div",{className:"flex-1 flex items-center justify-center",children:l.jsxs("div",{className:"text-center space-y-3",children:[l.jsx("div",{className:"text-terminal-red font-mono text-sm",children:d}),l.jsx("button",{onClick:()=>void F({forceRefresh:!0}),className:"px-3 py-1.5 text-xs font-mono rounded-md bg-terminal-surface text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors duration-200",children:"Retry"})]})}):s.length===0&&!ct?l.jsx("div",{className:"flex-1 flex items-center justify-center",children:l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"text-terminal-dim font-mono text-sm",children:"No AI sessions found"}),l.jsx("div",{className:"text-terminal-dimmer font-mono text-xs",children:"Start a coding session with Claude Code or Cursor, then come back here"})]})}):l.jsxs("div",{className:"flex flex-1 min-h-0",children:[l.jsxs("div",{className:"hidden md:flex w-60 shrink-0 flex-col border-r border-terminal-border-subtle bg-terminal-surface/20",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-terminal-border-subtle",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-[10px] font-sans text-terminal-dimmer uppercase tracking-widest font-semibold",children:"Projects"}),gn&&l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer tabular-nums",children:gn})]}),l.jsx("button",{onClick:()=>{F({forceRefresh:!0})},className:"p-1.5 rounded-md text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors duration-200",title:"Refresh",children:l.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[l.jsx("path",{d:"M2.5 8a5.5 5.5 0 019.3-4M13.5 8a5.5 5.5 0 01-9.3 4"}),l.jsx("path",{d:"M12.5 1v3h-3M3.5 15v-3h3"})]})})]}),l.jsxs("div",{className:"flex-1 overflow-y-auto p-2 space-y-0.5",children:[l.jsxs("button",{onClick:()=>A(wt),className:`w-full text-left px-3 py-2.5 text-xs font-sans rounded-lg transition-all duration-200 ease-material flex items-center justify-between ${R===wt?"bg-terminal-green-subtle text-terminal-green shadow-layer-sm":"text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface"}`,children:[l.jsx("span",{className:"font-medium",children:"All projects"}),l.jsx("span",{className:`tabular-nums px-1.5 py-0.5 rounded-md text-xs ${R===wt?"bg-terminal-green-emphasis text-terminal-green":"bg-terminal-surface text-terminal-dimmer"}`,children:s.length})]}),l.jsx("div",{className:"h-px bg-terminal-border-subtle mx-2 my-1.5"}),Ct.map(([X,ve])=>{const Te=ve.filter(ye=>ye.existingReplay).length,je=R===X,Ae=ot.get(X)||ia(X),Ee=ve[0]?.projectExists!==!1,ce=ve.some(ye=>ye.isGitRepo||ye.gitBranch);return l.jsxs("button",{onClick:()=>A(X),title:X,className:`w-full text-left px-3 py-2.5 rounded-lg transition-all duration-200 ease-material group ${je?"bg-terminal-green-subtle shadow-layer-sm":"hover:bg-terminal-surface"} ${Ee?"":"opacity-50"}`,children:[l.jsxs("div",{className:"flex items-center justify-between gap-1.5",children:[l.jsxs("span",{className:`text-xs font-sans truncate flex items-center gap-1.5 ${je?"text-terminal-green font-medium":Ee?"text-terminal-text group-hover:text-terminal-text":"text-terminal-dim"}`,children:[ce&&l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"currentColor",className:`shrink-0 ${je?"opacity-70":"opacity-40"}`,children:l.jsx("path",{fillRule:"evenodd",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})}),Ae]}),l.jsx("span",{className:`tabular-nums px-1.5 py-0.5 rounded-md text-xs shrink-0 ${je?"bg-terminal-green-emphasis text-terminal-green":"bg-terminal-surface text-terminal-dimmer"}`,children:ve.length})]}),l.jsxs("div",{className:"flex items-center gap-2 mt-1 ml-0.5",children:[l.jsx("span",{className:`text-xs font-mono truncate ${je?"text-terminal-dim":"text-terminal-dimmer"}`,children:ws(ve[0]?.timestamp||"")}),Te>0&&l.jsxs("span",{className:`text-xs font-mono ${je?"text-terminal-green":"text-terminal-dimmer"}`,children:[Te," ",Te===1?"replay":"replays"]})]})]},X)})]})]}),l.jsxs("div",{className:"flex-1 flex flex-col min-h-0 min-w-0",children:[l.jsx("div",{className:"md:hidden px-3 pt-3",children:l.jsxs("select",{value:R,onChange:X=>A(X.target.value),className:"w-full bg-terminal-surface rounded-lg px-3 py-2.5 text-sm font-sans text-terminal-text outline-none shadow-layer-sm",children:[l.jsxs("option",{value:wt,children:["All projects (",s.length,")"]}),Ct.map(([X,ve])=>l.jsxs("option",{value:X,children:[ot.get(X)||ia(X)," (",ve.length,")"]},X))]})}),l.jsxs("div",{className:"px-4 pt-4 pb-2 space-y-3 shrink-0",children:[l.jsxs("div",{className:"hidden md:flex items-center justify-between",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("h2",{className:"text-base font-sans text-terminal-text truncate font-semibold",children:R===wt?"All projects":ot.get(R)||ia(R)}),R!==wt&&l.jsx("span",{className:"text-xs font-mono text-terminal-dimmer truncate block mt-0.5",children:R})]}),l.jsxs("span",{className:"text-xs font-sans text-terminal-dim tabular-nums px-2 py-1 rounded-md bg-terminal-surface",children:[xn.length," session",xn.length!==1?"s":""]})]}),l.jsxs("div",{className:"flex gap-2 items-center",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsxs("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-terminal-dim",width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[l.jsx("circle",{cx:"7",cy:"7",r:"5"}),l.jsx("path",{d:"M11 11l3.5 3.5"})]}),l.jsx("input",{value:E,onChange:X=>_(X.target.value),placeholder:"Filter by branch, title, prompt...",className:"w-full bg-terminal-surface rounded-lg pl-9 pr-3 py-2.5 text-sm font-mono text-terminal-text placeholder:text-terminal-dimmer outline-none ring-1 ring-transparent focus:ring-terminal-green/40 transition-shadow duration-200 shadow-layer-sm"})]}),$e>0&&l.jsx("button",{onClick:()=>ne(!z),className:`shrink-0 px-2.5 py-2 text-xs font-mono rounded-lg transition-colors duration-200 ${z?"bg-terminal-orange-subtle text-terminal-orange":"bg-terminal-surface text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover"}`,title:z?"Hide archived":`View all (${$e} archived)`,children:z?"Active":"View all"})]})]}),(ct||m||h)&&l.jsx("div",{className:"mx-4 mb-2 flex items-center gap-2 rounded-lg px-3 py-2.5 text-xs font-mono bg-terminal-blue-subtle text-terminal-blue shrink-0 shadow-layer-sm",children:ct?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-blue animate-pulse"}),l.jsx("span",{children:"FETCHING SESSIONS..."})]}):m?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-blue animate-pulse"}),l.jsx("span",{children:"SCANNING LATEST SESSIONS..."}),h&&l.jsxs("span",{className:"text-terminal-dim",children:["Showing stale cache (",Qr(h),")"]})]}):h?l.jsxs("span",{children:["Showing stale cache (",Qr(h),")"]}):null}),O?.running&&O.total>0&&l.jsxs("div",{className:"mx-4 mb-2 flex items-center gap-2 rounded-lg px-3 py-2.5 text-xs font-mono bg-terminal-blue-subtle text-terminal-blue shrink-0 shadow-layer-sm",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-blue animate-pulse"}),l.jsxs("span",{children:["BACKFILLING CURSOR STATS... ",O.processed,"/",O.total]})]}),b&&l.jsxs("div",{className:"mx-4 mb-2 flex items-center gap-2 bg-terminal-orange-subtle rounded-lg px-3 py-2.5 text-xs font-mono text-terminal-orange shrink-0 shadow-layer-sm",children:[l.jsx("span",{children:b}),l.jsx("button",{onClick:()=>j(null),className:"ml-auto text-terminal-orange/60 hover:text-terminal-orange transition-colors",children:"×"})]}),ae&&l.jsxs("div",{className:"mx-4 mb-2 flex items-center gap-2 bg-terminal-red-subtle rounded-lg px-3 py-2.5 text-xs font-mono text-terminal-red shrink-0 shadow-layer-sm",children:[l.jsx("span",{children:ae}),l.jsx("button",{onClick:()=>Y(null),className:"ml-auto text-terminal-red/60 hover:text-terminal-red transition-colors",children:"×"})]}),se&&l.jsxs("div",{className:"mx-4 mb-2 bg-terminal-surface rounded-lg px-4 py-3.5 space-y-3 shrink-0 shadow-layer-md",children:[l.jsxs("div",{className:"text-xs font-mono text-terminal-dim",children:["Title for ",l.jsx("span",{className:"text-terminal-text",children:se.slug})]}),l.jsxs("form",{onSubmit:X=>{X.preventDefault(),J()},className:"flex gap-2",children:[l.jsx("input",{ref:oe,value:Q,onChange:X=>le(X.target.value),className:"flex-1 bg-terminal-bg rounded-lg px-3 py-2.5 text-sm font-mono text-terminal-text placeholder:text-terminal-dimmer outline-none ring-1 ring-terminal-border-subtle focus:ring-terminal-green/40 transition-shadow duration-200",placeholder:se.defaultTitle,maxLength:Vc,onKeyDown:X=>{X.key==="Escape"&&te(null)}}),l.jsx("button",{type:"submit",className:"px-4 py-2 text-xs font-mono rounded-lg bg-terminal-green-subtle text-terminal-green hover:bg-terminal-green-emphasis transition-colors duration-200 font-medium",children:"Generate"}),l.jsx("button",{type:"button",onClick:()=>te(null),className:"px-3 py-2 text-xs font-mono rounded-lg text-terminal-dim hover:text-terminal-text transition-colors",children:"Cancel"})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto",children:ct?l.jsx("div",{className:"text-center py-12 text-terminal-dim font-mono text-sm",children:"Fetching sessions..."}):xn.length===0?l.jsx("div",{className:"text-center py-12 text-terminal-dim font-mono text-sm",children:E?"No sessions match your filter":"No sessions in this project"}):l.jsx("div",{className:"space-y-2.5 px-4 py-3",children:xn.map(X=>{if(X.replay){const Ee=P.has(X.slug);return l.jsx(th,{summary:X.replay,onOpen:()=>wl({view:null,session:X.existingReplay}),onTitleSave:xe,onRegenerate:()=>De(X),isRegenerating:D===X.slug,onDelete:()=>Se(X.slug),onPublishGist:()=>ge(X.slug),onArchive:()=>fe(X.slug),ghAvailable:ie===!0,isPublishing:re===X.slug,isArchived:Ee},`${X.provider}-${X.slug}`)}const ve=(X.prompts||[]).map(Ee=>Ss(Ee)).filter(Ee=>Ee.length>0);if(ve.length===0&&X.firstPrompt){const Ee=Ss(X.firstPrompt);Ee&&ve.push(Ee)}const Te=X.gitBranch&&X.gitBranch!=="main"&&X.gitBranch!=="master"?X.gitBranch:void 0,je=Jr(X),Ae=P.has(X.slug);return l.jsxs("div",{className:`bg-terminal-surface rounded-xl px-5 py-4 hover:bg-terminal-surface-hover transition-colors duration-200 ease-material space-y-2.5 shadow-layer-sm hover-lift ${Ae?"opacity-50":""}`,children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0 space-y-0.5",children:[l.jsx("span",{className:"text-sm font-mono text-terminal-text truncate block",children:je}),l.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[l.jsxs("div",{className:"text-[11px] font-mono text-terminal-dimmer truncate",children:["slug: ",l.jsx("span",{className:"text-terminal-dim",children:X.slug})]}),Te&&l.jsxs("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded bg-terminal-surface-2 text-terminal-dim shrink-0 inline-flex items-center gap-0.5",children:[l.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[l.jsx("circle",{cx:"5",cy:"4",r:"2"}),l.jsx("circle",{cx:"11",cy:"12",r:"2"}),l.jsx("path",{d:"M5 6v4c0 1.1.9 2 2 2h2"})]}),Te]})]})]}),l.jsxs("div",{className:"flex flex-col items-end gap-1 shrink-0",children:[l.jsx("span",{className:"text-xs font-mono text-terminal-dimmer",children:ws(X.timestamp)}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("button",{onClick:()=>De(X),disabled:D===X.slug,className:"h-7 px-2.5 text-xs font-sans font-semibold rounded-md bg-terminal-blue-subtle text-terminal-blue hover:bg-terminal-blue-emphasis transition-all duration-200 ease-material flex items-center justify-center gap-1 disabled:opacity-50",children:D===X.slug?l.jsx("span",{className:"animate-pulse",children:"Generating..."}):l.jsxs(l.Fragment,{children:[l.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("path",{d:"M8 2v12M2 8h12"})}),"Generate"]})}),l.jsx(gb,{onArchive:()=>fe(X.slug),isArchived:Ae})]})]})]}),ve.map((Ee,ce)=>l.jsxs("div",{className:"flex gap-2 items-start",children:[l.jsx("span",{className:"text-xs text-terminal-green shrink-0 mt-px select-none",children:">"}),l.jsx("p",{className:"text-sm text-terminal-dim line-clamp-1 leading-relaxed",children:Ee})]},ce)),l.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[l.jsx(eh,{provider:X.provider}),R===wt&&l.jsx("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded-md bg-terminal-surface-2 text-terminal-dim",title:X.project,children:ot.get(X.project)||ia(X.project)}),l.jsx("span",{className:"text-xs font-mono tabular-nums px-1.5 py-0.5 rounded-md bg-terminal-surface-2 text-terminal-dimmer",children:Pg(X.fileSize)}),X.filePaths.length>1&&l.jsxs("span",{className:"text-xs font-mono tabular-nums px-1.5 py-0.5 rounded-md bg-terminal-surface-2 text-terminal-dimmer",children:[X.filePaths.length," parts"]}),X.hasSqlite&&l.jsx("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded-md bg-terminal-green-subtle text-terminal-green",children:"db"})]})]},`${X.provider}-${X.slug}`)})})})]})]})}function yb(){const[s,r]=v.useState([]),[o,c]=v.useState(!0),[d,f]=v.useState(!1),[m,g]=v.useState(!1),[h,x]=v.useState(null),[b,j]=v.useState(null),[T,N]=v.useState(()=>Date.now()),[w,S]=v.useState(null),[R,A]=v.useState(""),[E,_]=v.useState(null),[D,$]=v.useState(null),[ae,Y]=v.useState(null),[se,te]=v.useState(new Set),[Q,le]=v.useState(!1),[oe,ue]=v.useState(wt);v.useEffect(()=>{let J=!0;return(async()=>{c(!0),g(!1),x(null);const Se=await fetch("/api/archived").then(ot=>ot.ok?ot.json():{slugs:[]}).catch(()=>({slugs:[]}));J&&te(new Set(Se.slugs));let $e=!1;const Je=await fetch("/api/sessions/cached").then(ot=>ot.ok?ot.json():null).catch(()=>null),Ve=jl(Je),Ct=Vr(Ve?.cachedAt);if(J&&Ve&&($e=!0,r(Ve.sessions),f(!0),j(Ve.cachedAt??null),(Ve.sessions.length>0||Ct)&&(x(Ct?null:Ve.cachedAt??null),c(!1),g(!Ct))),Ct){J&&(g(!1),c(!1));return}try{const ot=await fetch("/api/sessions");if(!ot.ok)throw new Error("Failed to load sessions");const tn=await ot.json();if(!J)return;r(tn),f(!0),j(new Date().toISOString()),x(null)}catch{if(!J)return;$e||f(!1)}finally{J&&(g(!1),c(!1))}})(),fetch("/api/gh-status").then(Se=>Se.json()).then(Se=>S(Se.available)).catch(()=>S(!1)),()=>{J=!1}},[]),v.useEffect(()=>{const J=window.setInterval(()=>N(Date.now()),3e4);return()=>window.clearInterval(J)},[]);const P=async J=>{const ge=se.has(J);te(Se=>{const $e=new Set(Se);return ge?$e.delete(J):$e.add(J),$e});try{if(!(await fetch(`/api/archive/${J}`,{method:ge?"DELETE":"POST"})).ok)throw new Error("Archive toggle failed")}catch(Se){console.error("Archive toggle failed:",Ra(Se)),te($e=>{const Je=new Set($e);return ge?Je.add(J):Je.delete(J),Je})}},pe=async(J,ge)=>{if(!(await fetch(`/api/sessions/${encodeURIComponent(J)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:ge})})).ok)throw new Error("Failed to update title");r($e=>$e.map(Je=>Je.slug===J?{...Je,title:ge||void 0}:Je))},z=J=>{wl({view:null,session:J})},ne=async J=>{_(null);try{const ge=await fetch(`/api/sessions/${encodeURIComponent(J)}`,{method:"DELETE"});if(!ge.ok){const Se=await ge.json().catch(()=>({}));_(Se.error||"Failed to delete session");return}r(Se=>Se.filter($e=>$e.slug!==J))}catch{_("Failed to delete session")}},ie=async J=>{$(J);try{const ge=await fetch(`/api/publish/gist?slug=${encodeURIComponent(J)}`,{method:"POST"});if(!ge.ok){const $e=await ge.json().catch(()=>({}));throw new Error($e.error||"Publish failed")}const Se=await ge.json();r($e=>$e.map(Je=>Je.slug===J?{...Je,gist:{gistId:Se.gistId,viewerUrl:Se.viewerUrl,updatedAt:new Date().toISOString(),outdated:!1}}:Je))}catch(ge){console.error("Gist publish error:",Ra(ge))}finally{$(null)}},ee=async J=>{Y(J.slug);try{const ge=await fetch("/api/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:J.provider,sessionSlug:J.slug,sessionProject:J.project,sessionId:J.sessionId||void 0,title:J.title||void 0})}),Se=await ge.json();if(!ge.ok)throw new Error(Se.error||"Regeneration failed");wl({view:null,session:Se.slug})}catch(ge){console.error("Regenerate error:",Ra(ge))}finally{Y(null)}},re=s.filter(J=>se.has(J.slug)).length,k=Q?s:s.filter(J=>!se.has(J.slug)),O=new Map;for(const J of k)O.has(J.project)||O.set(J.project,[]),O.get(J.project)?.push(J);const B=[...O.entries()].sort((J,ge)=>{const Se=J[1][0]?.startTime||"";return(ge[1][0]?.startTime||"").localeCompare(Se)}),W=Wp(B.map(([J])=>J)),F=oe===wt?k:O.get(oe)||[],fe=R?F.filter(J=>(J.title||"").toLowerCase().includes(R.toLowerCase())||J.slug.toLowerCase().includes(R.toLowerCase())||J.project.toLowerCase().includes(R.toLowerCase())||J.provider.toLowerCase().includes(R.toLowerCase())||(J.firstMessage||"").toLowerCase().includes(R.toLowerCase())):F,xe=b?Qp(b,T):null,De=o&&s.length===0;return!De&&(!d||s.length===0)?l.jsx("div",{className:"flex-1 overflow-auto",children:l.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-6 space-y-6",children:[l.jsx(hp,{}),d&&s.length===0&&l.jsxs("div",{className:"text-center py-12 space-y-2",children:[l.jsx("div",{className:"text-terminal-dim font-mono text-sm",children:"No replays yet"}),l.jsx("div",{className:"text-terminal-dimmer font-mono text-xs",children:"Go to the Sessions tab to generate your first replay"})]}),!d&&l.jsx("div",{className:"text-center py-8 space-y-2",children:l.jsxs("div",{className:"text-terminal-dimmer font-mono text-xs",children:["Or run ",l.jsx("span",{className:"text-terminal-green",children:"npx vibe-replay"})," to create a replay from your AI coding sessions"]})})]})}):l.jsxs("div",{className:"flex flex-1 min-h-0",children:[l.jsxs("div",{className:"hidden md:flex w-60 shrink-0 flex-col border-r border-terminal-border-subtle bg-terminal-surface/20",children:[l.jsx("div",{className:"flex items-center justify-between px-4 py-3 border-b border-terminal-border-subtle",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-[10px] font-sans text-terminal-dimmer uppercase tracking-widest font-semibold",children:"Projects"}),xe&&l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer tabular-nums",children:xe})]})}),l.jsxs("div",{className:"flex-1 overflow-y-auto p-2 space-y-0.5",children:[l.jsxs("button",{onClick:()=>ue(wt),className:`w-full text-left px-3 py-2.5 text-xs font-mono rounded-lg transition-all duration-200 ease-material flex items-center justify-between ${oe===wt?"bg-terminal-green-subtle text-terminal-green shadow-layer-sm":"text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface"}`,children:[l.jsx("span",{className:"font-medium",children:"All replays"}),l.jsx("span",{className:`tabular-nums px-1.5 py-0.5 rounded-md text-xs ${oe===wt?"bg-terminal-green-emphasis text-terminal-green":"bg-terminal-surface text-terminal-dimmer"}`,children:k.length})]}),l.jsx("div",{className:"h-px bg-terminal-border-subtle mx-2 my-1.5"}),B.map(([J,ge])=>{const Se=oe===J,$e=W.get(J)||ia(J),Je=ge.filter(Ve=>Ve.gist?.gistId).length;return l.jsxs("button",{onClick:()=>ue(J),title:J,className:`w-full text-left px-3 py-2.5 rounded-lg transition-all duration-200 ease-material group ${Se?"bg-terminal-green-subtle shadow-layer-sm":"hover:bg-terminal-surface"}`,children:[l.jsxs("div",{className:"flex items-center justify-between gap-1.5",children:[l.jsx("span",{className:`text-xs font-mono truncate ${Se?"text-terminal-green font-medium":"text-terminal-text group-hover:text-terminal-text"}`,children:$e}),l.jsx("span",{className:`tabular-nums px-1.5 py-0.5 rounded-md text-xs shrink-0 ${Se?"bg-terminal-green-emphasis text-terminal-green":"bg-terminal-surface text-terminal-dimmer"}`,children:ge.length})]}),l.jsxs("div",{className:"flex items-center gap-2 mt-1 ml-0.5",children:[l.jsx("span",{className:`text-xs font-mono truncate ${Se?"text-terminal-dim":"text-terminal-dimmer"}`,children:ws(ge[0]?.startTime||"")}),Je>0&&l.jsxs("span",{className:`text-xs font-mono ${Se?"text-terminal-purple":"text-terminal-dimmer"}`,children:[Je," published"]})]})]},J)})]})]}),l.jsxs("div",{className:"flex-1 flex flex-col min-h-0 min-w-0",children:[l.jsx("div",{className:"md:hidden px-3 pt-3",children:l.jsxs("select",{value:oe,onChange:J=>ue(J.target.value),className:"w-full bg-terminal-surface rounded-lg px-3 py-2.5 text-sm font-mono text-terminal-text outline-none shadow-layer-sm",children:[l.jsxs("option",{value:wt,children:["All replays (",k.length,")"]}),B.map(([J,ge])=>l.jsxs("option",{value:J,children:[W.get(J)||ia(J)," (",ge.length,")"]},J))]})}),l.jsxs("div",{className:"px-4 pt-4 pb-2 space-y-3 shrink-0",children:[l.jsx(hp,{}),l.jsxs("div",{className:"hidden md:flex items-center gap-3",children:[l.jsxs("div",{className:"min-w-0 shrink-0",children:[l.jsx("h2",{className:"text-base font-mono text-terminal-text truncate font-semibold",children:oe===wt?"All replays":W.get(oe)||ia(oe)}),oe!==wt&&l.jsx("span",{className:"text-xs font-mono text-terminal-dimmer truncate block mt-0.5",children:oe})]}),l.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsxs("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-terminal-dim",width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[l.jsx("circle",{cx:"7",cy:"7",r:"5"}),l.jsx("path",{d:"M11 11l3.5 3.5"})]}),l.jsx("input",{value:R,onChange:J=>A(J.target.value),placeholder:"Filter replays...",className:"w-full bg-terminal-surface rounded-lg pl-9 pr-3 py-2.5 text-sm font-mono text-terminal-text placeholder:text-terminal-dimmer outline-none ring-1 ring-transparent focus:ring-terminal-green/40 transition-shadow duration-200 shadow-layer-sm"})]}),re>0&&l.jsx("button",{onClick:()=>le(!Q),className:`shrink-0 px-2.5 py-2 text-xs font-mono rounded-lg transition-colors duration-200 ${Q?"bg-terminal-orange-subtle text-terminal-orange":"bg-terminal-surface text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover"}`,title:Q?"Hide archived":`View all (${re} archived)`,children:Q?"Active":"View all"})]}),l.jsxs("span",{className:"text-xs font-mono text-terminal-dim tabular-nums px-2 py-1 rounded-md bg-terminal-surface shrink-0",children:[fe.length," replay",fe.length!==1?"s":""]})]}),l.jsxs("div",{className:"md:hidden flex gap-2 items-center",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsxs("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-terminal-dim",width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[l.jsx("circle",{cx:"7",cy:"7",r:"5"}),l.jsx("path",{d:"M11 11l3.5 3.5"})]}),l.jsx("input",{value:R,onChange:J=>A(J.target.value),placeholder:"Filter replays...",className:"w-full bg-terminal-surface rounded-lg pl-9 pr-3 py-2.5 text-sm font-mono text-terminal-text placeholder:text-terminal-dimmer outline-none ring-1 ring-transparent focus:ring-terminal-green/40 transition-shadow duration-200 shadow-layer-sm"})]}),re>0&&l.jsx("button",{onClick:()=>le(!Q),className:`shrink-0 px-2.5 py-2 text-xs font-mono rounded-lg transition-colors duration-200 ${Q?"bg-terminal-orange-subtle text-terminal-orange":"bg-terminal-surface text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover"}`,title:Q?"Hide archived":`View all (${re} archived)`,children:Q?"Active":"View all"})]})]}),(De||m||h)&&l.jsx("div",{className:"mx-4 mb-2 flex items-center gap-2 rounded-lg px-3 py-2.5 text-xs font-mono bg-terminal-blue-subtle text-terminal-blue shrink-0 shadow-layer-sm",children:De?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-blue animate-pulse"}),l.jsx("span",{children:"FETCHING REPLAYS..."})]}):m?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-blue animate-pulse"}),l.jsx("span",{children:"SCANNING LATEST REPLAYS..."}),h&&l.jsxs("span",{className:"text-terminal-dim",children:["Showing stale cache (",Qr(h),")"]})]}):h?l.jsxs("span",{children:["Showing stale cache (",Qr(h),")"]}):null}),E&&l.jsxs("div",{className:"mx-4 mb-2 flex items-center gap-2 bg-terminal-red-subtle rounded-lg px-3 py-2.5 text-xs font-mono text-terminal-red shrink-0 shadow-layer-sm",children:[l.jsx("span",{children:E}),l.jsx("button",{onClick:()=>_(null),className:"ml-auto text-terminal-red/60 hover:text-terminal-red transition-colors",children:"×"})]}),l.jsx("div",{className:"flex-1 overflow-y-auto",children:De?l.jsx("div",{className:"text-center py-12 text-terminal-dim font-mono text-sm",children:"Fetching replays..."}):fe.length===0?l.jsx("div",{className:"text-center py-12 text-terminal-dim font-mono text-sm",children:R?"No replays match your filter":"No replays in this project"}):l.jsx("div",{className:"space-y-2.5 px-4 py-3",children:fe.map(J=>{const ge=se.has(J.slug);return l.jsx(th,{summary:J,onOpen:()=>z(J.slug),onTitleSave:pe,onDelete:()=>ne(J.slug),onPublishGist:()=>ie(J.slug),onRegenerate:()=>ee(J),onArchive:()=>P(J.slug),ghAvailable:w===!0,isPublishing:D===J.slug,isRegenerating:ae===J.slug,isArchived:ge},J.slug)})})})]})]})}function vb(){const s=!!window.__VIBE_REPLAY_EDITOR__,[r,o]=v.useState(s?"home":"replays"),c=(d,f)=>l.jsx("button",{onClick:()=>o(d),className:`px-5 py-2 text-xs font-sans font-semibold rounded-lg transition-all duration-200 ease-material ${r===d?"bg-terminal-green-subtle text-terminal-green shadow-layer-sm":"text-terminal-dim hover:text-terminal-text"}`,children:f},d);return l.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[s&&l.jsx("div",{className:"shrink-0 px-5 py-3 border-b border-terminal-border-subtle bg-terminal-surface/30",children:l.jsxs("div",{className:"inline-flex items-center rounded-xl bg-terminal-surface p-0.5 shadow-layer-sm",children:[c("home","Home"),c("sessions","Sessions"),c("replays","Replays")]})}),r==="home"&&s?l.jsx(pb,{onNavigate:o}):r==="sessions"&&s?l.jsx(bb,{}):l.jsx(yb,{})]})}function jb(s,r,o,c){const d=new Date().toISOString(),f={id:crypto.randomUUID(),sceneIndex:r,body:o,author:"anonymous",createdAt:d,updatedAt:d,resolved:!1};return[...s,f]}function wb(s,r,o){return s.map(c=>c.id===r?{...c,body:o,updatedAt:new Date().toISOString()}:c)}function Sb(s,r){return s.filter(o=>o.id!==r)}function Nb(s){return new Set(s.map(r=>r.sceneIndex))}function kb(s){const r=new Map;for(const o of s)r.set(o.sceneIndex,(r.get(o.sceneIndex)||0)+1);return r}function Eb(s,r){return JSON.stringify(s)!==JSON.stringify(r)}function xp(s){return s.type==="tool-call"&&!s.diff&&!s.bashOutput}function nh(s,r){const o=s[r];if(!xp(o))return r;const c=o.toolName;let d=r;for(;d+1<s.length&&xp(s[d+1])&&s[d+1].toolName===c;)d++;return d}function xs(s,r){return(()=>{switch(s.type){case"user-prompt":return 1200;case"thinking":return 600;case"text-response":{const c=s.content.length;return Math.max(800,Math.min(c/40,5)*600)}case"tool-call":return s.diff?1200:s.bashOutput?900:400;case"compaction-summary":return 800;default:return 800}})()/r}function Tb(s){const r=[];for(let o=0;o<s.length;o++)s[o].type==="user-prompt"&&r.push(o);return r}function Ab(s,r){return s.find(o=>o>r)}function Cb(s,r){for(let o=s.length-1;o>=0;o--)if(s[o]<r)return s[o]}function Ac(s,r,o){let c=r+1;if(c>=s.length)return-1;if(o.promptsOnly){for(;c<s.length&&s[c].type!=="user-prompt"&&s[c].type!=="compaction-summary";)c++;return c>=s.length?-1:c}if(o.compactAssistant&&!(s[c].type==="user-prompt"||s[c].type==="compaction-summary")){let f=c;for(;f+1<s.length&&s[f+1].type!=="user-prompt"&&s[f+1].type!=="compaction-summary";)f++;return f}return nh(s,c)}function gp(s,r,o){let c=Math.max(0,r-1);if(r<=0)return 0;if(o.promptsOnly){for(;c>0&&s[c].type!=="user-prompt"&&s[c].type!=="compaction-summary";)c--;return c}if(o.compactAssistant){if(!(s[r].type==="user-prompt"||s[r].type==="compaction-summary")){let m=r;for(;m>0&&s[m-1].type!=="user-prompt"&&s[m-1].type!=="compaction-summary";)m--;return Math.max(0,m-1)}return Math.max(0,r-1)}const d=s[c];if(d.type==="tool-call"&&!d.diff&&!d.bashOutput){const f=d.toolName;for(;c>0&&s[c-1].type==="tool-call"&&!s[c-1].diff&&!s[c-1].bashOutput&&s[c-1].toolName===f;)c--}return c}const Rb="vibe-replay-annotations-";function Yr(s){return Rb+s}function fn(s){const r=new URLSearchParams(window.location.search).get("session");if(!r)return s;const o=s.includes("?")?"&":"?";return`${s}${o}slug=${encodeURIComponent(r)}`}function _b(s,r="embedded"){const o=s.meta.sessionId,c=r==="editor",d=!!window.__VIBE_REPLAY_DATA__||c,[f,m]=v.useState(()=>{const O=s.annotations??[];if(c)return O;try{const B=localStorage.getItem(Yr(o));if(B){const W=JSON.parse(B);if(W.length>0||O.length===0)return W}}catch{}return O}),[g,h]=v.useState(()=>s.annotations??[]),x=Eb(f,g),b=v.useRef(null);v.useEffect(()=>{if(c)return b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{fetch(fn("/api/annotations"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}).then(()=>{h(f)}).catch(()=>{})},1e3),()=>{b.current&&clearTimeout(b.current)};try{localStorage.setItem(Yr(o),JSON.stringify(f))}catch{}},[f,o,c]);const j=v.useMemo(()=>Nb(f),[f]),T=v.useMemo(()=>kb(f),[f]),N=v.useCallback((O,B)=>{m(W=>jb(W,O,B))},[]),w=v.useCallback((O,B)=>{m(W=>wb(W,O,B))},[]),S=v.useCallback(O=>{m(B=>Sb(B,O))},[]),R=v.useCallback(()=>{if(c)return;const O={...s,annotations:f},W=`window.__VIBE_REPLAY_DATA__ = ${JSON.stringify(O).replace(/<\//g,"<\\/")};`,F=document.getElementById("vibe-replay-data");if(F){const xe=F.textContent;F.textContent=W;const De=`<!DOCTYPE html>
57
- ${document.documentElement.outerHTML}`;F.textContent=xe,fe(De)}else{const xe=document.createElement("script");xe.id="vibe-replay-data",xe.textContent=W,document.head.appendChild(xe);const De=`<!DOCTYPE html>
58
- ${document.documentElement.outerHTML}`;document.head.removeChild(xe),fe(De)}function fe(xe){const De=new Blob([xe],{type:"text/html"}),J=URL.createObjectURL(De),ge=document.createElement("a");ge.href=J,ge.download=`${s.meta.slug||"replay"}.html`,document.body.appendChild(ge),ge.click(),document.body.removeChild(ge),URL.revokeObjectURL(J)}h(f);try{localStorage.removeItem(Yr(o))}catch{}},[s,f,o,c]),A=v.useCallback(()=>{const O={...s,annotations:f},B=JSON.stringify(O,null,2),W=new Blob([B],{type:"application/json"}),F=URL.createObjectURL(W),fe=document.createElement("a");fe.href=F,fe.download="replay.json",document.body.appendChild(fe),fe.click(),document.body.removeChild(fe),URL.revokeObjectURL(F),h(f);try{localStorage.removeItem(Yr(o))}catch{}},[s,f,o]),[E,_]=v.useState(!1),D=c?async()=>{_(!0);try{await fetch(fn("/api/annotations"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});const O=await fetch(fn("/api/publish/gist"),{method:"POST"}),B=await O.json();if(!O.ok)throw new Error(B.error||`Server error: ${O.status}`);return h(f),B}finally{_(!1)}}:null,[$,ae]=v.useState([]),[Y,se]=v.useState(null),[te,Q]=v.useState(!1),le=v.useRef(null),oe=v.useMemo(()=>Y&&$.find(O=>O.name===Y)||null,[Y,$]);v.useEffect(()=>{c&&fetch(fn("/api/feedback/detect")).then(O=>O.json()).then(O=>{if(!O.available)return;const B=Array.isArray(O.tools)?O.tools:O.tool?[O.tool]:[];ae(B);const W=O.defaultTool?.name||O.tool?.name||B[0]?.name||null;se(W)}).catch(()=>{})},[c]);const ue=c&&Y?async()=>{const O=new AbortController;le.current=O,Q(!0);try{await fetch(fn("/api/annotations"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f),signal:O.signal});const B=await fetch(fn("/api/feedback/generate"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolName:Y}),signal:O.signal}),W=await B.json();if(!B.ok)throw new Error(W.error||"AI Coach failed");return m(W.annotations),h(W.annotations),{score:W.score,itemCount:W.itemCount}}finally{le.current=null,Q(!1)}}:null,P=c?O=>{se(O)}:null,pe=c?()=>{le.current&&le.current.abort()}:null,[z,ne]=v.useState(!1),ie=c?async()=>{ne(!0);try{await fetch(fn("/api/annotations"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});const O=await fetch(fn("/api/export/html"),{method:"POST"}),B=await O.json();if(!O.ok)throw new Error(B.error||`Export failed: ${O.status}`);const{path:W}=B;return h(f),W}finally{ne(!1)}}:null,[ee,re]=v.useState(!1);return{annotations:f,annotatedScenes:j,annotationCounts:T,add:N,update:w,remove:S,hasUnsaved:x,canSaveHtml:d,downloadHtml:R,downloadJson:A,publishGist:D,exportHtml:ie,exportGithub:c?async()=>{re(!0);try{await fetch(fn("/api/annotations"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});const O=await fetch(fn("/api/export/github"),{method:"POST"}),B=await O.json();if(!O.ok)throw new Error(B.error||`Export failed: ${O.status}`);return h(f),B}finally{re(!1)}}:null,gistPublishing:E,htmlExporting:z,githubExporting:ee,aiCoachTool:oe,aiCoachTools:$,aiCoachToolName:Y,setAiCoachToolName:P,runAiCoach:ue,cancelAiCoach:pe,aiCoachRunning:te}}const bp={version:1,overlays:[]};function gs(s){const r=new URLSearchParams(window.location.search).get("session");if(!r)return s;const o=s.includes("?")?"&":"?";return`${s}${o}slug=${encodeURIComponent(r)}`}function Ob(s,r="embedded"){const o=r==="editor",[c,d]=v.useState(bp),[f,m]=v.useState(new Set),[g,h]=v.useState(!1),[x,b]=v.useState([]),[j,T]=v.useState(null),[N,w]=v.useState(!1),[S,R]=v.useState(!1),A=v.useRef(null),E=v.useRef(null),_=v.useRef(!1);v.useEffect(()=>{o&&fetch(gs("/api/overlays")).then(ee=>ee.json()).then(ee=>{ee&&Array.isArray(ee.overlays)&&d(ee)}).catch(()=>{}).finally(()=>{_.current=!0})},[o]),v.useEffect(()=>{o&&fetch(gs("/api/feedback/detect")).then(ee=>ee.json()).then(ee=>{if(!ee.available)return;const re=Array.isArray(ee.tools)?ee.tools:ee.tool?[ee.tool]:[];b(re);const k=ee.defaultTool?.name||ee.tool?.name||re[0]?.name||null;T(k)}).catch(()=>{})},[o]),v.useEffect(()=>{if(!(!o||!_.current))return E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{fetch(gs("/api/overlays"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}).catch(()=>{})},1e3),()=>{E.current&&clearTimeout(E.current)}},[c,o]);const D=v.useCallback(ee=>{const re=s.scenes[ee];if(!re||re.type!=="user-prompt"&&re.type!=="text-response")return null;if(g||f.has(ee))return re.content;const k=c.overlays.filter(B=>B.sceneIndex===ee);return k.length===0?re.content:k.reduce((B,W)=>B.updatedAt>W.updatedAt?B:W).modifiedValue},[s.scenes,c,f,g]),$=v.useMemo(()=>{if(c.overlays.length===0||g)return s;const ee=new Map;for(const k of c.overlays){const O=ee.get(k.sceneIndex);O?O.push(k):ee.set(k.sceneIndex,[k])}const re=new Map;for(const[k,O]of ee){const B=O.reduce((W,F)=>W.updatedAt>F.updatedAt?W:F);re.set(k,B.modifiedValue)}return re.size===0?s:{...s,scenes:s.scenes.map((k,O)=>{if(f.has(O))return k;const B=re.get(O);return B&&(k.type==="user-prompt"||k.type==="text-response")?{...k,content:B}:k})}},[s,c,f,g]),ae=v.useCallback(ee=>c.overlays.some(re=>re.sceneIndex===ee),[c]),Y=v.useCallback(ee=>c.overlays.filter(re=>re.sceneIndex===ee),[c]),se=v.useCallback(ee=>{d(ee)},[]),te=v.useCallback(ee=>{d(re=>({...re,overlays:re.overlays.filter(k=>k.id!==ee)}))},[]),Q=v.useCallback(ee=>{d(re=>({...re,overlays:re.overlays.filter(k=>k.sceneIndex!==ee)}))},[]),le=v.useCallback(()=>{d(bp)},[]),oe=v.useCallback((ee,re)=>{d(k=>({...k,overlays:k.overlays.map(O=>O.id===ee?{...O,modifiedValue:re,source:{type:"manual"},updatedAt:new Date().toISOString()}:O)}))},[]),ue=v.useCallback(ee=>{m(re=>{const k=new Set(re);return k.has(ee)?k.delete(ee):k.add(ee),k})},[]),P=v.useCallback(()=>{h(ee=>!ee)},[]),pe=v.useMemo(()=>o?ee=>T(ee):null,[o]),z=v.useMemo(()=>o?()=>{A.current&&A.current.abort()}:null,[o]),ne=v.useMemo(()=>o&&j?async ee=>{const re=new AbortController;A.current=re,w(!0);try{const k=await fetch(gs("/api/studio/translate"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolName:j,targetLang:ee.targetLang,sourceLang:ee.sourceLang}),signal:re.signal}),O=await k.json();if(!k.ok)throw new Error(O.error||"Translation failed");return O.overlays&&d(O.overlays),O.stats}finally{A.current=null,w(!1)}}:null,[o,j]),ie=v.useMemo(()=>o&&j?async ee=>{const re=new AbortController;A.current=re,R(!0);try{const k=await fetch(gs("/api/studio/tone"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolName:j,style:ee.style}),signal:re.signal}),O=await k.json();if(!k.ok)throw new Error(O.error||"Tone adjustment failed");return O.overlays&&d(O.overlays),O.stats}finally{A.current=null,R(!1)}}:null,[o,j]);return{overlays:c,effectiveSession:$,getEffectiveContent:D,hasOverlay:ae,getOverlays:Y,overlayCount:c.overlays.length,setOverlays:se,revertOverlay:te,revertSceneOverlays:Q,revertAll:le,updateOverlay:oe,showOriginal:f,toggleOriginal:ue,showAllOriginals:g,toggleAllOriginals:P,studioTools:x,studioToolName:j,setStudioToolName:pe,studioToolsAvailable:x.length>0,translating:N,toningDown:S,cancelStudio:z,runTranslate:ne,runTone:ie}}function Mb(s){const r=s;if(!r)return!1;const o=r.tagName;if(o==="INPUT"||o==="TEXTAREA"||o==="SELECT"||r.isContentEditable)return!0;const c=r.getAttribute("role");return c==="textbox"||c==="combobox"}function zb(s,r,o=!0){const[c,d]=v.useState("idle"),[f,m]=v.useState(-1),[g,h]=v.useState(1),[x,b]=v.useState(0),j=v.useRef(null),T=v.useRef(c),N=v.useRef(f),w=v.useRef(g),S=v.useRef(r);T.current=c,N.current=f,w.current=g,S.current=r;const R=v.useMemo(()=>Tb(s),[s]),A=v.useCallback(()=>{j.current&&(clearTimeout(j.current),j.current=null)},[]),E=v.useCallback(()=>{if(T.current!=="playing")return;const Q=Ac(s,N.current,S.current);if(Q===-1){d("ended"),m(s.length-1),b(s.length);return}m(Q),b(Q+1);const le=xs(s[Q],w.current);j.current=setTimeout(E,le)},[s]),_=v.useCallback(()=>{s.length!==0&&(T.current==="ended"&&(m(-1),b(0)),d("playing"),setTimeout(()=>{if(N.current<0){const Q=nh(s,0);m(Q),b(Q+1);const le=xs(s[Q],w.current);j.current=setTimeout(E,le)}else{const Q=s[N.current];if(Q){const le=xs(Q,w.current)/2;j.current=setTimeout(E,le)}}},50))},[s,E]),D=v.useCallback(()=>{A(),d("paused")},[A]),$=v.useCallback(()=>{T.current==="playing"?D():_()},[_,D]),ae=v.useCallback(Q=>{A();const le=Math.max(0,Math.min(Q,s.length-1));if(m(le),b(le+1),T.current==="playing"){const oe=xs(s[le],w.current);j.current=setTimeout(E,oe)}(T.current==="ended"||T.current==="idle")&&d("paused")},[s,A,E]),Y=v.useCallback(()=>{const Q=Ab(R,N.current);Q!==void 0&&ae(Q)},[R,ae]),se=v.useCallback(()=>{const Q=Cb(R,N.current);Q!==void 0&&ae(Q)},[R,ae]),te=v.useCallback(Q=>{if(h(Q),T.current==="playing"){A();const le=s[N.current];if(le){const oe=xs(le,Q);j.current=setTimeout(E,oe)}}},[s,A,E]);return v.useEffect(()=>A,[A]),v.useEffect(()=>{if(!o)return;const Q=le=>{if(!Mb(le.target))if(le.key===" "||le.key==="k")le.preventDefault(),$();else if(le.key==="ArrowDown"||le.key==="j"){T.current==="playing"&&D(),le.preventDefault();const oe=Ac(s,N.current,S.current);oe!==-1&&ae(oe)}else if(le.key==="ArrowUp"||le.key==="k"){T.current==="playing"&&D(),le.preventDefault();const oe=gp(s,N.current,S.current);ae(oe)}else le.key==="ArrowLeft"||le.key==="h"?(le.preventDefault(),window.dispatchEvent(new CustomEvent("vibe:toggle-expand",{detail:{action:"collapse"}}))):le.key==="Escape"?T.current==="playing"&&(le.preventDefault(),D()):le.key==="ArrowRight"||le.key==="l"?(le.preventDefault(),window.dispatchEvent(new CustomEvent("vibe:toggle-expand",{detail:{action:"expand"}}))):le.key==="n"?(le.preventDefault(),Y()):le.key==="p"?(le.preventDefault(),se()):le.key==="Home"?(le.preventDefault(),ae(0)):(le.key==="End"||le.key==="e")&&(le.preventDefault(),ae(s.length-1))};return window.addEventListener("keydown",Q),()=>window.removeEventListener("keydown",Q)},[o,$,ae,Y,se,s,D]),{state:c,currentIndex:f,visibleCount:x,speed:g,play:_,pause:D,togglePlayPause:$,seekTo:ae,changeSpeed:te,jumpToNextUserPrompt:Y,jumpToPrevUserPrompt:se,userPromptIndices:R,totalScenes:s.length,computeNextIndex:v.useCallback(Q=>Ac(s,Q,r),[s,r]),computePrevIndex:v.useCallback(Q=>gp(s,Q,r),[s,r])}}function Db(s){switch(s.displayMode){case"all":return{hideThinking:!1,collapseAllTools:!1,promptsOnly:!1,compactAssistant:!1};case"compact":return{hideThinking:!0,collapseAllTools:!0,promptsOnly:!1,compactAssistant:!0};case"custom":return{hideThinking:s.hideThinking,collapseAllTools:s.collapseAllTools,promptsOnly:s.promptsOnly,compactAssistant:!1}}}const Lc="vibe-replay-view-prefs",Cc={displayMode:"compact",hideThinking:!1,collapseAllTools:!1,promptsOnly:!1};function Lb(){try{const s=localStorage.getItem(Lc);if(s){const r=JSON.parse(s);return r.displayMode?{...Cc,...r}:{...Cc,...r,displayMode:"compact"}}}catch{}return Cc}function Bb(){const[s,r]=v.useState(Lb),o=v.useCallback((d,f)=>{r(m=>{const g={...m,[d]:f};return localStorage.setItem(Lc,JSON.stringify(g)),g})},[]),c=v.useCallback(d=>{r(f=>{const m=f[d];if(typeof m!="boolean")return f;const g={...f,[d]:!m};return localStorage.setItem(Lc,JSON.stringify(g)),g})},[]);return{prefs:s,updatePref:o,togglePref:c}}function yp({size:s=14}){return l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"})})}function Ub({className:s=""}){return l.jsxs("svg",{className:`animate-spin h-3.5 w-3.5 ${s}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function Hb({toolName:s}){return s==="claude"?l.jsxs("div",{className:"mt-2 text-xs font-mono text-terminal-dim leading-relaxed space-y-1",children:[l.jsxs("p",{children:["Runs"," ",l.jsx("code",{className:"px-1 py-0.5 rounded bg-terminal-surface-inset text-terminal-text",children:"claude -p"})," ","locally with your prompt piped to stdin. Uses your existing auth and token quota."]}),l.jsxs("p",{className:"text-terminal-dimmer",children:["Auth issues? Run"," ",l.jsx("code",{className:"px-1 py-0.5 rounded bg-terminal-surface-inset text-terminal-text",children:"claude"})," ","in your terminal to re-login."]})]}):s==="agent"?l.jsxs("div",{className:"mt-2 text-xs font-mono text-terminal-dim leading-relaxed space-y-1",children:[l.jsxs("p",{children:["Runs"," ",l.jsx("code",{className:"px-1 py-0.5 rounded bg-terminal-surface-inset text-terminal-text",children:"agent -p"})," ","locally with your prompt piped to stdin. Uses your Cursor subscription or API key."]}),l.jsxs("p",{className:"text-terminal-dimmer",children:["Auth issues? Check Cursor IDE settings or run"," ",l.jsx("code",{className:"px-1 py-0.5 rounded bg-terminal-surface-inset text-terminal-text",children:"agent"})," ","in your terminal."]})]}):s==="opencode"?l.jsxs("div",{className:"mt-2 text-xs font-mono text-terminal-dim leading-relaxed space-y-1",children:[l.jsxs("p",{children:["Runs"," ",l.jsx("code",{className:"px-1 py-0.5 rounded bg-terminal-surface-inset text-terminal-text",children:"opencode run"})," ","locally with your prompt piped to stdin. Uses your existing OpenCode configuration."]}),l.jsxs("p",{className:"text-terminal-dimmer",children:["Not working? Run"," ",l.jsx("code",{className:"px-1 py-0.5 rounded bg-terminal-surface-inset text-terminal-text",children:"opencode"})," ","in your terminal to verify setup."]})]}):l.jsxs("p",{className:"mt-2 text-xs font-mono text-terminal-dim leading-relaxed",children:["Runs ",l.jsx("span",{className:"text-terminal-text font-medium",children:s})," locally on your machine using your existing auth."]})}const $b=["English","Chinese (Simplified)","Chinese (Traditional)","Japanese","Korean","Spanish","French","German","Portuguese","Russian"],Gb=[{value:"professional",label:"Professional"},{value:"neutral",label:"Neutral"},{value:"friendly",label:"Friendly"}];function qb({annotationActions:s,overlayActions:r}){const{studioTools:o,studioToolName:c,setStudioToolName:d,studioToolsAvailable:f,translating:m,toningDown:g,cancelStudio:h,runTranslate:x,runTone:b,overlayCount:j,revertAll:T}=r,{runAiCoach:N,aiCoachRunning:w,cancelAiCoach:S,aiCoachTools:R,aiCoachToolName:A,setAiCoachToolName:E}=s,_=!!N,D=s.annotations.some(F=>F.author==="vibe-feedback"),[$,ae]=v.useState("English"),[Y,se]=v.useState("professional"),[te,Q]=v.useState(null),[le,oe]=v.useState(null),[ue,P]=v.useState(null),[pe,z]=v.useState(null),ne=w||m||g,ie=o.length>0?o:R,ee=c||A,re=v.useCallback(async()=>{if(N){Q(null),z(null);try{const F=await N();Q({type:"success",text:`Score ${F.score}/10 — ${F.itemCount} comment(s)`})}catch(F){if(F?.name==="AbortError")return;Q({type:"error",text:F?.message||"AI Coach failed"})}}},[N]),k=v.useCallback(async()=>{if(x){oe(null),z(null);try{const F=await x({targetLang:$});oe({type:"success",text:`${F.translated} message(s) translated, ${F.skipped} unchanged`})}catch(F){if(F?.name==="AbortError")return;oe({type:"error",text:F?.message||"Translation failed"})}}},[x,$]),O=v.useCallback(async()=>{if(b){P(null),z(null);try{const F=await b({style:Y});P({type:"success",text:`${F.adjusted} prompt(s) adjusted, ${F.skipped} unchanged`})}catch(F){if(F?.name==="AbortError")return;P({type:"error",text:F?.message||"Tone adjustment failed"})}}},[b,Y]),B=F=>r.overlays.overlays.some(fe=>fe.source.type===F),W=F=>{if(F==="coach"&&D){z("coach");return}if(F==="translate"&&B("translate")){z("translate");return}if(F==="tone"&&B("tone")){z("tone");return}F==="coach"?re():F==="translate"?k():O()};return!f&&R.length===0?l.jsxs("div",{className:"flex flex-col h-full",children:[l.jsxs("div",{className:"px-4 py-2.5 border-b border-terminal-border-subtle flex items-center gap-2",children:[l.jsx(yp,{size:12}),l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-text uppercase tracking-widest",children:"AI Studio"})]}),l.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-6 py-8 text-center",children:[l.jsx("div",{className:"w-10 h-10 rounded-xl bg-terminal-surface flex items-center justify-center mb-3",children:l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-terminal-dim",children:[l.jsx("circle",{cx:"12",cy:"12",r:"10"}),l.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),l.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),l.jsx("div",{className:"text-sm font-sans font-semibold text-terminal-text mb-1",children:"No AI tools detected"}),l.jsx("p",{className:"text-xs font-mono text-terminal-dim mb-4 leading-relaxed",children:"AI Studio requires a local CLI tool. Install one of the following:"}),l.jsx("div",{className:"w-full space-y-2 text-left",children:[{name:"Claude Code",cmd:"npm install -g @anthropic-ai/claude-code",rec:!0},{name:"Cursor CLI",cmd:'Bundled with Cursor IDE (run as "agent")'},{name:"OpenCode",cmd:"go install github.com/opencode-ai/opencode@latest"}].map(F=>l.jsxs("div",{className:"px-3 py-2 rounded-lg bg-terminal-surface border border-terminal-border-subtle",children:[l.jsxs("div",{className:"text-xs font-sans font-medium text-terminal-text flex items-center gap-1.5",children:[F.name,F.rec&&l.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded bg-terminal-green-subtle text-terminal-green",children:"recommended"})]}),l.jsx("div",{className:"text-xs font-mono text-terminal-dim mt-0.5 break-all",children:F.cmd})]},F.name))}),l.jsxs("p",{className:"mt-4 text-xs font-mono text-terminal-dimmer leading-relaxed text-center",children:["AI Studio runs the CLI tool in headless mode,"," ",l.jsx("span",{className:"text-terminal-green font-medium",children:"locally"})," on your machine."]})]})]}):l.jsxs("div",{className:"flex flex-col h-full",children:[l.jsxs("div",{className:"px-4 py-2.5 border-b border-terminal-border-subtle flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(yp,{size:12}),l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-text uppercase tracking-widest",children:"AI Studio"})]}),j>0&&l.jsxs("button",{onClick:T,className:"text-[10px] font-mono px-1.5 py-0.5 rounded bg-terminal-purple-subtle text-terminal-purple hover:bg-terminal-red-subtle hover:text-terminal-red transition-colors",children:["Revert All (",j,")"]})]}),l.jsxs("div",{className:"flex-1 overflow-y-auto",children:[l.jsxs("div",{className:"px-4 py-3 border-b border-terminal-border-subtle bg-terminal-surface/30",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-xs font-mono text-terminal-dim",children:"Tool"}),ie.length>1&&d?l.jsx("select",{value:ee||"",onChange:F=>{d(F.target.value),E&&E(F.target.value)},className:"bg-terminal-surface border border-terminal-border rounded-lg px-2 py-0.5 text-xs font-mono text-terminal-text outline-none cursor-pointer hover:border-terminal-purple/30 transition-colors",children:ie.map(F=>l.jsx("option",{value:F.name,children:F.name},F.name))}):l.jsx("span",{className:"text-xs font-mono font-medium text-terminal-text px-2 py-0.5 rounded-lg bg-terminal-surface border border-terminal-border",children:ee})]}),l.jsx(Hb,{toolName:ee})]}),l.jsxs("div",{className:"p-4 space-y-3",children:[_&&l.jsx(Rc,{title:"AI Coach",preview:l.jsxs("div",{className:"mt-2.5 rounded-lg bg-terminal-surface-inset border border-terminal-border overflow-hidden",children:[l.jsx("div",{className:"px-3 py-2.5 border-b border-terminal-border-subtle",children:l.jsx("div",{className:"text-xs font-mono text-terminal-green leading-relaxed",children:"Fix the login bug users reported"})}),l.jsxs("div",{className:"px-3 py-2 flex items-start gap-2",children:[l.jsx("span",{className:"text-xs shrink-0",children:"💬"}),l.jsx("span",{className:"text-xs font-mono text-terminal-blue leading-relaxed",children:"Be specific — which file? what error?"})]}),l.jsxs("div",{className:"px-3 py-2 border-t border-terminal-border-subtle flex items-center gap-2",children:[l.jsx("span",{className:"text-xs font-mono font-semibold text-terminal-orange",children:"6/10"}),l.jsxs("span",{className:"text-xs font-mono text-terminal-dimmer",children:["·"," 4 comments added inline"]})]})]}),description:"Score your prompting technique and get inline coaching comments.",running:w,disabled:ne,status:te,buttonLabel:D?"Re-run Coach":"Run Coach",runningLabel:"Analyzing...",onRun:()=>W("coach"),onCancel:S||void 0,showRerunConfirm:pe==="coach",rerunWarning:"Existing AI feedback will be replaced.",onConfirmRerun:()=>void re(),onCancelRerun:()=>z(null)}),x&&l.jsx(Rc,{title:"Translate",preview:l.jsxs("div",{className:"mt-2.5 rounded-lg bg-terminal-surface-inset border border-terminal-border overflow-hidden",children:[l.jsxs("div",{className:"px-3 py-2.5 space-y-1",children:[l.jsx("div",{className:"text-xs font-mono text-terminal-dim line-through opacity-60",children:"这个bug怎么修?"}),l.jsx("div",{className:"text-xs font-mono text-terminal-green",children:"How to fix this bug?"})]}),l.jsxs("div",{className:"px-3 py-2.5 border-t border-terminal-border-subtle space-y-1",children:[l.jsx("div",{className:"text-xs font-mono text-terminal-dim line-through opacity-60",children:"已写入。以后用中文问我..."}),l.jsx("div",{className:"text-xs font-mono text-terminal-blue",children:"Done. Ask me in Chinese..."})]})]}),description:"Translate all prompts and responses for sharing with international teams.",running:m,disabled:ne,status:le,buttonLabel:B("translate")?"Re-translate":"Translate All",runningLabel:"Translating...",onRun:()=>W("translate"),onCancel:h||void 0,showRerunConfirm:pe==="translate",rerunWarning:"Existing translations will be replaced.",onConfirmRerun:()=>void k(),onCancelRerun:()=>z(null),config:l.jsxs("div",{className:"flex items-center gap-2 mt-2.5",children:[l.jsx("span",{className:"text-xs font-mono text-terminal-dim shrink-0",children:"Target"}),l.jsx("select",{value:$,onChange:F=>ae(F.target.value),disabled:ne,className:"flex-1 bg-terminal-surface border border-terminal-border rounded px-2 py-1 text-xs font-mono text-terminal-text outline-none disabled:opacity-50",children:$b.map(F=>l.jsx("option",{value:F,children:F},F))})]})}),b&&l.jsx(Rc,{title:"Soften Tone",preview:l.jsxs("div",{className:"mt-2.5 rounded-lg bg-terminal-surface-inset border border-terminal-border overflow-hidden",children:[l.jsxs("div",{className:"px-3 py-2.5 space-y-1",children:[l.jsx("div",{className:"text-xs font-mono text-terminal-red line-through opacity-60",children:"this code is mass garbage, mass delete it"}),l.jsx("div",{className:"text-xs font-mono text-terminal-green",children:"Let's refactor this module for clarity"})]}),l.jsxs("div",{className:"px-3 py-2.5 border-t border-terminal-border-subtle space-y-1",children:[l.jsx("div",{className:"text-xs font-mono text-terminal-red line-through opacity-60",children:"are you stupid? I said fix the auth"}),l.jsx("div",{className:"text-xs font-mono text-terminal-green",children:"The auth issue is still present, could you revisit?"})]})]}),description:"Rewrite harsh or blunt prompts into professional, constructive language.",running:g,disabled:ne,status:ue,buttonLabel:B("tone")?"Re-adjust":"Soften All",runningLabel:"Adjusting...",onRun:()=>W("tone"),onCancel:h||void 0,showRerunConfirm:pe==="tone",rerunWarning:"Existing tone adjustments will be replaced.",onConfirmRerun:()=>void O(),onCancelRerun:()=>z(null),config:l.jsxs("div",{className:"flex items-center gap-2 mt-2.5",children:[l.jsx("span",{className:"text-xs font-mono text-terminal-dim shrink-0",children:"Style"}),l.jsx("select",{value:Y,onChange:F=>se(F.target.value),disabled:ne,className:"flex-1 bg-terminal-surface border border-terminal-border rounded px-2 py-1 text-xs font-mono text-terminal-text outline-none disabled:opacity-50",children:Gb.map(F=>l.jsx("option",{value:F.value,children:F.label},F.value))})]})})]})]})]})}function Rc({title:s,preview:r,description:o,running:c,disabled:d,status:f,buttonLabel:m,runningLabel:g,onRun:h,onCancel:x,showRerunConfirm:b,rerunWarning:j,onConfirmRerun:T,onCancelRerun:N,config:w}){return l.jsxs("div",{className:"rounded-xl border border-terminal-border-subtle bg-terminal-surface/30 overflow-hidden",children:[l.jsxs("div",{className:"px-4 py-3",children:[l.jsx("div",{className:"text-sm font-sans font-semibold text-terminal-text",children:s}),r,o&&l.jsx("div",{className:"text-xs font-mono text-terminal-dim mt-2 leading-relaxed",children:o}),w,l.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[l.jsx("button",{onClick:h,disabled:d,className:"px-3.5 py-1.5 text-xs font-mono rounded-lg bg-terminal-purple-subtle text-terminal-purple hover:bg-terminal-purple-emphasis transition-colors disabled:opacity-40 flex items-center gap-1.5",children:c?l.jsxs(l.Fragment,{children:[l.jsx(Ub,{className:"text-terminal-purple"}),g]}):m}),c&&x&&l.jsx("button",{onClick:x,className:"text-xs font-mono text-terminal-dim hover:text-terminal-text transition-colors",children:"Cancel"})]})]}),b&&!c&&l.jsx("div",{className:"px-4 pb-3",children:l.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono",children:[l.jsx("span",{className:"text-terminal-orange flex-1",children:j}),l.jsx("button",{onClick:N,className:"text-terminal-dim hover:text-terminal-text transition-colors",children:"Cancel"}),l.jsx("button",{onClick:T,className:"text-terminal-purple hover:text-terminal-text transition-colors font-medium",children:"Continue"})]})}),f&&l.jsx("div",{className:`px-4 pb-3 text-xs font-mono ${f.type==="success"?"text-terminal-green":"text-terminal-red"}`,children:f.text})]})}function Yb({open:s,onClose:r,annotationActions:o,overlayActions:c}){return v.useEffect(()=>{if(!s)return;const d=f=>{f.key==="Escape"&&(f.preventDefault(),r())};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[s,r]),l.jsxs("div",{className:`fixed inset-0 z-30 hidden md:block transition-opacity duration-300 ${s?"opacity-100":"opacity-0 pointer-events-none"}`,children:[l.jsx("div",{className:"absolute inset-0 bg-black/30",onClick:r}),l.jsxs("div",{className:`absolute top-0 right-0 bottom-0 w-96 bg-terminal-bg border-l border-terminal-border-subtle shadow-layer-xl flex flex-col transition-transform duration-300 ease-material-decel ${s?"translate-x-0":"translate-x-full"}`,onClick:d=>d.stopPropagation(),children:[l.jsx("button",{onClick:r,className:"absolute top-2 right-2 z-10 p-1 text-terminal-dim hover:text-terminal-text transition-colors",title:"Close AI Studio",children:"✕"}),l.jsx(qb,{annotationActions:o,overlayActions:c})]})]})}function Qc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Oa=Qc();function ah(s){Oa=s}var Ca={exec:()=>null};function ze(s,r=""){let o=typeof s=="string"?s:s.source,c={replace:(d,f)=>{let m=typeof f=="string"?f:f.source;return m=m.replace(At.caret,"$1"),o=o.replace(d,m),c},getRegex:()=>new RegExp(o,r)};return c}var Zb=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),At={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}>`)},Xb=/^(?:[ \t]*(?:\n|$))+/,Fb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Vb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ks=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Qb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Jc=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,lh=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,sh=ze(lh).replace(/bull/g,Jc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Jb=ze(lh).replace(/bull/g,Jc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Kc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Kb=/^[^\n]+/,Ic=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ib=ze(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ic).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Wb=ze(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Jc).getRegex(),ni="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Wc=/\x3C!--(?:-?>|[\s\S]*?(?:-->|$))/,Pb=ze("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Wc).replace("tag",ni).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),rh=ze(Kc).replace("hr",ks).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ni).getRegex(),ey=ze(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",rh).getRegex(),Pc={blockquote:ey,code:Fb,def:Ib,fences:Vb,heading:Qb,hr:ks,html:Pb,lheading:sh,list:Wb,newline:Xb,paragraph:rh,table:Ca,text:Kb},vp=ze("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ks).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ni).getRegex(),ty={...Pc,lheading:Jb,table:vp,paragraph:ze(Kc).replace("hr",ks).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",vp).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ni).getRegex()},ny={...Pc,html:ze(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Wc).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ca,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ze(Kc).replace("hr",ks).replace("heading",` *#{1,6} *[^
59
- ]`).replace("lheading",sh).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ay=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ly=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ih=/^( {2,}|\\)\n(?!\s*$)/,sy=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ai=/[\p{P}\p{S}]/u,eu=/[\s\p{P}\p{S}]/u,oh=/[^\s\p{P}\p{S}]/u,ry=ze(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,eu).getRegex(),ch=/(?!~)[\p{P}\p{S}]/u,iy=/(?!~)[\s\p{P}\p{S}]/u,oy=/(?:[^\s\p{P}\p{S}]|~)/u,uh=/(?![*_])[\p{P}\p{S}]/u,cy=/(?![*_])[\s\p{P}\p{S}]/u,uy=/(?:[^\s\p{P}\p{S}]|[*_])/u,dy=ze(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Zb?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),dh=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,fy=ze(dh,"u").replace(/punct/g,ai).getRegex(),my=ze(dh,"u").replace(/punct/g,ch).getRegex(),fh="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",py=ze(fh,"gu").replace(/notPunctSpace/g,oh).replace(/punctSpace/g,eu).replace(/punct/g,ai).getRegex(),hy=ze(fh,"gu").replace(/notPunctSpace/g,oy).replace(/punctSpace/g,iy).replace(/punct/g,ch).getRegex(),xy=ze("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,oh).replace(/punctSpace/g,eu).replace(/punct/g,ai).getRegex(),gy=ze(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,uh).getRegex(),by="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",yy=ze(by,"gu").replace(/notPunctSpace/g,uy).replace(/punctSpace/g,cy).replace(/punct/g,uh).getRegex(),vy=ze(/\\(punct)/,"gu").replace(/punct/g,ai).getRegex(),jy=ze(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),wy=ze(Wc).replace("(?:-->|$)","-->").getRegex(),Sy=ze("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",wy).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Kr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ny=ze(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Kr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),mh=ze(/^!?\[(label)\]\[(ref)\]/).replace("label",Kr).replace("ref",Ic).getRegex(),ph=ze(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ic).getRegex(),ky=ze("reflink|nolink(?!\\()","g").replace("reflink",mh).replace("nolink",ph).getRegex(),jp=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,tu={_backpedal:Ca,anyPunctuation:vy,autolink:jy,blockSkip:dy,br:ih,code:ly,del:Ca,delLDelim:Ca,delRDelim:Ca,emStrongLDelim:fy,emStrongRDelimAst:py,emStrongRDelimUnd:xy,escape:ay,link:Ny,nolink:ph,punctuation:ry,reflink:mh,reflinkSearch:ky,tag:Sy,text:sy,url:Ca},Ey={...tu,link:ze(/^!?\[(label)\]\((.*?)\)/).replace("label",Kr).getRegex(),reflink:ze(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Kr).getRegex()},Bc={...tu,emStrongRDelimAst:hy,emStrongLDelim:my,delLDelim:gy,delRDelim:yy,url:ze(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",jp).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ze(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",jp).getRegex()},Ty={...Bc,br:ze(ih).replace("{2,}","*").getRegex(),text:ze(Bc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Zr={normal:Pc,gfm:ty,pedantic:ny},bs={normal:tu,gfm:Bc,breaks:Ty,pedantic:Ey},Ay={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},wp=s=>Ay[s];function mn(s,r){if(r){if(At.escapeTest.test(s))return s.replace(At.escapeReplace,wp)}else if(At.escapeTestNoEncode.test(s))return s.replace(At.escapeReplaceNoEncode,wp);return s}function Sp(s){try{s=encodeURI(s).replace(At.percentDecode,"%")}catch{return null}return s}function Np(s,r){let o=s.replace(At.findPipe,(f,m,g)=>{let h=!1,x=m;for(;--x>=0&&g[x]==="\\";)h=!h;return h?"|":" |"}),c=o.split(At.splitPipe),d=0;if(c[0].trim()||c.shift(),c.length>0&&!c.at(-1)?.trim()&&c.pop(),r)if(c.length>r)c.splice(r);else for(;c.length<r;)c.push("");for(;d<c.length;d++)c[d]=c[d].trim().replace(At.slashPipe,"|");return c}function ys(s,r,o){let c=s.length;if(c===0)return"";let d=0;for(;d<c&&s.charAt(c-d-1)===r;)d++;return s.slice(0,c-d)}function Cy(s,r){if(s.indexOf(r[1])===-1)return-1;let o=0;for(let c=0;c<s.length;c++)if(s[c]==="\\")c++;else if(s[c]===r[0])o++;else if(s[c]===r[1]&&(o--,o<0))return c;return o>0?-2:-1}function Ry(s,r=0){let o=r,c="";for(let d of s)if(d===" "){let f=4-o%4;c+=" ".repeat(f),o+=f}else c+=d,o++;return c}function kp(s,r,o,c,d){let f=r.href,m=r.title||null,g=s[1].replace(d.other.outputLinkReplace,"$1");c.state.inLink=!0;let h={type:s[0].charAt(0)==="!"?"image":"link",raw:o,href:f,title:m,text:g,tokens:c.inlineTokens(g)};return c.state.inLink=!1,h}function _y(s,r,o){let c=s.match(o.other.indentCodeCompensation);if(c===null)return r;let d=c[1];return r.split(`
60
- `).map(f=>{let m=f.match(o.other.beginningSpace);if(m===null)return f;let[g]=m;return g.length>=d.length?f.slice(d.length):f}).join(`
61
- `)}var Ir=class{options;rules;lexer;constructor(s){this.options=s||Oa}space(s){let r=this.rules.block.newline.exec(s);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(s){let r=this.rules.block.code.exec(s);if(r){let o=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?o:ys(o,`
62
- `)}}}fences(s){let r=this.rules.block.fences.exec(s);if(r){let o=r[0],c=_y(o,r[3]||"",this.rules);return{type:"code",raw:o,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:c}}}heading(s){let r=this.rules.block.heading.exec(s);if(r){let o=r[2].trim();if(this.rules.other.endingHash.test(o)){let c=ys(o,"#");(this.options.pedantic||!c||this.rules.other.endingSpaceChar.test(c))&&(o=c.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(s){let r=this.rules.block.hr.exec(s);if(r)return{type:"hr",raw:ys(r[0],`
63
- `)}}blockquote(s){let r=this.rules.block.blockquote.exec(s);if(r){let o=ys(r[0],`
55
+ `+a.stack}}var pt=Object.prototype.hasOwnProperty,fn=s.unstable_scheduleCallback,ln=s.unstable_cancelCallback,Sn=s.unstable_shouldYield,Yn=s.unstable_requestPaint,$=s.unstable_now,ye=s.unstable_getCurrentPriorityLevel,De=s.unstable_ImmediatePriority,Ee=s.unstable_UserBlockingPriority,ve=s.unstable_NormalPriority,qe=s.unstable_LowPriority,tt=s.unstable_IdlePriority,nt=s.log,ue=s.unstable_setDisableYieldValue,be=null,Ye=null;function Ze(e){if(typeof nt=="function"&&ue(e),Ye&&typeof Ye.setStrictMode=="function")try{Ye.setStrictMode(be,e)}catch{}}var Ge=Math.clz32?Math.clz32:Tt,Et=Math.log,$t=Math.LN2;function Tt(e){return e>>>=0,e===0?32:31-(Et(e)/$t|0)|0}var sn=256,Zn=262144,Nn=4194304;function mn(e){var t=e&42;if(t!==0)return t;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 ba(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var i=0,u=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var b=a&134217727;return b!==0?(a=b&~u,a!==0?i=mn(a):(p&=b,p!==0?i=mn(p):n||(n=b&~e,n!==0&&(i=mn(n))))):(b=a&~u,b!==0?i=mn(b):p!==0?i=mn(p):n||(n=a&~e,n!==0&&(i=mn(n)))),i===0?0:t!==0&&t!==i&&(t&u)===0&&(u=i&-i,n=t&-t,u>=n||u===32&&(n&4194048)!==0)?t:i}function Fn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Cs(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 du(){var e=Nn;return Nn<<=1,(Nn&62914560)===0&&(Nn=4194304),e}function pi(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Tl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _h(e,t,n,a,i,u){var p=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var b=e.entanglements,R=e.expirationTimes,G=e.hiddenUpdates;for(n=p&~n;0<n;){var F=31-Ge(n),K=1<<F;b[F]=0,R[F]=-1;var q=G[F];if(q!==null)for(G[F]=null,F=0;F<q.length;F++){var Y=q[F];Y!==null&&(Y.lane&=-536870913)}n&=~K}a!==0&&fu(e,a,0),u!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=u&~(p&~t))}function fu(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Ge(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function mu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Ge(n),i=1<<a;i&t|e[a]&t&&(e[a]|=t),n&=~i}}function pu(e,t){var n=t&-t;return n=(n&42)!==0?1:hi(n),(n&(e.suspendedLanes|t))!==0?0:n}function hi(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 xi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function hu(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:tp(e.type))}function xu(e,t){var n=W.p;try{return W.p=e,t()}finally{W.p=n}}var Xn=Math.random().toString(36).slice(2),jt="__reactFiber$"+Xn,Ot="__reactProps$"+Xn,Ha="__reactContainer$"+Xn,gi="__reactEvents$"+Xn,Oh="__reactListeners$"+Xn,Mh="__reactHandles$"+Xn,gu="__reactResources$"+Xn,Al="__reactMarker$"+Xn;function bi(e){delete e[jt],delete e[Ot],delete e[gi],delete e[Oh],delete e[Mh]}function Ga(e){var t=e[jt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ha]||n[jt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=$m(e);e!==null;){if(n=e[jt])return n;e=$m(e)}return t}e=n,n=e.parentNode}return null}function qa(e){if(e=e[jt]||e[Ha]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Cl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function Ya(e){var t=e[gu];return t||(t=e[gu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gt(e){e[Al]=!0}var bu=new Set,yu={};function ya(e,t){Za(e,t),Za(e+"Capture",t)}function Za(e,t){for(yu[e]=t,e=0;e<t.length;e++)bu.add(t[e])}var zh=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]*$"),vu={},ju={};function Dh(e){return pt.call(ju,e)?!0:pt.call(vu,e)?!1:zh.test(e)?ju[e]=!0:(vu[e]=!0,!1)}function Rs(e,t,n){if(Dh(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function _s(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function kn(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function Vt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Lh(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var i=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(p){n=""+p,u.call(this,p)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(p){n=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yi(e){if(!e._valueTracker){var t=wu(e)?"checked":"value";e._valueTracker=Lh(e,t,""+e[t])}}function Su(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=wu(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Os(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 Bh=/[\n"\\]/g;function Jt(e){return e.replace(Bh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function vi(e,t,n,a,i,u,p,b){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Vt(t)):e.value!==""+Vt(t)&&(e.value=""+Vt(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?ji(e,p,Vt(t)):n!=null?ji(e,p,Vt(n)):a!=null&&e.removeAttribute("value"),i==null&&u!=null&&(e.defaultChecked=!!u),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Vt(b):e.removeAttribute("name")}function Nu(e,t,n,a,i,u,p,b){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){yi(e);return}n=n!=null?""+Vt(n):"",t=t!=null?""+Vt(t):n,b||t===e.value||(e.value=t),e.defaultValue=t}a=a??i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=b?e.checked:!!a,e.defaultChecked=!!a,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),yi(e)}function ji(e,t,n){t==="number"&&Os(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Fa(e,t,n,a){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Vt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,a&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ku(e,t,n){if(t!=null&&(t=""+Vt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Vt(n):""}function Eu(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(c(92));if(pe(a)){if(1<a.length)throw Error(c(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Vt(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),yi(e)}function Xa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Uh=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 Tu(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||Uh.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Au(e,t,n){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var i in t)a=t[i],t.hasOwnProperty(i)&&n[i]!==a&&Tu(e,i,a)}else for(var u in t)t.hasOwnProperty(u)&&Tu(e,u,t[u])}function wi(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 $h=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"]]),Hh=/^[\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 Ms(e){return Hh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function En(){}var Si=null;function Ni(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qa=null,Va=null;function Cu(e){var t=qa(e);if(t&&(e=t.stateNode)){var n=e[Ot]||null;e:switch(e=t.stateNode,t.type){case"input":if(vi(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Jt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var i=a[Ot]||null;if(!i)throw Error(c(90));vi(a,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Su(a)}break e;case"textarea":ku(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Fa(e,!!n.multiple,t,!1)}}}var ki=!1;function Ru(e,t,n){if(ki)return e(t,n);ki=!0;try{var a=e(t);return a}finally{if(ki=!1,(Qa!==null||Va!==null)&&(vr(),Qa&&(t=Qa,e=Va,Va=Qa=null,Cu(t),e)))for(t=0;t<e.length;t++)Cu(e[t])}}function Rl(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Ot]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(c(231,t,typeof n));return n}var Tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ei=!1;if(Tn)try{var _l={};Object.defineProperty(_l,"passive",{get:function(){Ei=!0}}),window.addEventListener("test",_l,_l),window.removeEventListener("test",_l,_l)}catch{Ei=!1}var Qn=null,Ti=null,zs=null;function _u(){if(zs)return zs;var e,t=Ti,n=t.length,a,i="value"in Qn?Qn.value:Qn.textContent,u=i.length;for(e=0;e<n&&t[e]===i[e];e++);var p=n-e;for(a=1;a<=p&&t[n-a]===i[u-a];a++);return zs=i.slice(e,1<a?1-a:void 0)}function Ds(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ls(){return!0}function Ou(){return!1}function Mt(e){function t(n,a,i,u,p){this._reactName=n,this._targetInst=i,this.type=a,this.nativeEvent=u,this.target=p,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(n=e[b],this[b]=n?n(u):u[b]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Ls:Ou,this.isPropagationStopped=Ou,this}return w(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ls)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ls)},persist:function(){},isPersistent:Ls}),t}var va={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bs=Mt(va),Ol=w({},va,{view:0,detail:0}),Gh=Mt(Ol),Ai,Ci,Ml,Us=w({},Ol,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_i,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!==Ml&&(Ml&&e.type==="mousemove"?(Ai=e.screenX-Ml.screenX,Ci=e.screenY-Ml.screenY):Ci=Ai=0,Ml=e),Ai)},movementY:function(e){return"movementY"in e?e.movementY:Ci}}),Mu=Mt(Us),qh=w({},Us,{dataTransfer:0}),Yh=Mt(qh),Zh=w({},Ol,{relatedTarget:0}),Ri=Mt(Zh),Fh=w({},va,{animationName:0,elapsedTime:0,pseudoElement:0}),Xh=Mt(Fh),Qh=w({},va,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Vh=Mt(Qh),Jh=w({},va,{data:0}),zu=Mt(Jh),Kh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ih={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"},Wh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ph(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wh[e])?!!t[e]:!1}function _i(){return Ph}var ex=w({},Ol,{key:function(e){if(e.key){var t=Kh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ih[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_i,charCode:function(e){return e.type==="keypress"?Ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),tx=Mt(ex),nx=w({},Us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Du=Mt(nx),ax=w({},Ol,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_i}),lx=Mt(ax),sx=w({},va,{propertyName:0,elapsedTime:0,pseudoElement:0}),rx=Mt(sx),ix=w({},Us,{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}),ox=Mt(ix),cx=w({},va,{newState:0,oldState:0}),ux=Mt(cx),dx=[9,13,27,32],Oi=Tn&&"CompositionEvent"in window,zl=null;Tn&&"documentMode"in document&&(zl=document.documentMode);var fx=Tn&&"TextEvent"in window&&!zl,Lu=Tn&&(!Oi||zl&&8<zl&&11>=zl),Bu=" ",Uu=!1;function $u(e,t){switch(e){case"keyup":return dx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ja=!1;function mx(e,t){switch(e){case"compositionend":return Hu(t);case"keypress":return t.which!==32?null:(Uu=!0,Bu);case"textInput":return e=t.data,e===Bu&&Uu?null:e;default:return null}}function px(e,t){if(Ja)return e==="compositionend"||!Oi&&$u(e,t)?(e=_u(),zs=Ti=Qn=null,Ja=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Lu&&t.locale!=="ko"?null:t.data;default:return null}}var hx={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 Gu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hx[e.type]:t==="textarea"}function qu(e,t,n,a){Qa?Va?Va.push(a):Va=[a]:Qa=a,t=Tr(t,"onChange"),0<t.length&&(n=new Bs("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Dl=null,Ll=null;function xx(e){km(e,0)}function $s(e){var t=Cl(e);if(Su(t))return e}function Yu(e,t){if(e==="change")return t}var Zu=!1;if(Tn){var Mi;if(Tn){var zi="oninput"in document;if(!zi){var Fu=document.createElement("div");Fu.setAttribute("oninput","return;"),zi=typeof Fu.oninput=="function"}Mi=zi}else Mi=!1;Zu=Mi&&(!document.documentMode||9<document.documentMode)}function Xu(){Dl&&(Dl.detachEvent("onpropertychange",Qu),Ll=Dl=null)}function Qu(e){if(e.propertyName==="value"&&$s(Ll)){var t=[];qu(t,Ll,e,Ni(e)),Ru(xx,t)}}function gx(e,t,n){e==="focusin"?(Xu(),Dl=t,Ll=n,Dl.attachEvent("onpropertychange",Qu)):e==="focusout"&&Xu()}function bx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $s(Ll)}function yx(e,t){if(e==="click")return $s(t)}function vx(e,t){if(e==="input"||e==="change")return $s(t)}function jx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ht=typeof Object.is=="function"?Object.is:jx;function Bl(e,t){if(Ht(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var i=n[a];if(!pt.call(t,i)||!Ht(e[i],t[i]))return!1}return!0}function Vu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ju(e,t){var n=Vu(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Vu(n)}}function Ku(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ku(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Iu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Os(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Os(e.document)}return t}function Di(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var wx=Tn&&"documentMode"in document&&11>=document.documentMode,Ka=null,Li=null,Ul=null,Bi=!1;function Wu(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Bi||Ka==null||Ka!==Os(a)||(a=Ka,"selectionStart"in a&&Di(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ul&&Bl(Ul,a)||(Ul=a,a=Tr(Li,"onSelect"),0<a.length&&(t=new Bs("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Ka)))}function ja(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ia={animationend:ja("Animation","AnimationEnd"),animationiteration:ja("Animation","AnimationIteration"),animationstart:ja("Animation","AnimationStart"),transitionrun:ja("Transition","TransitionRun"),transitionstart:ja("Transition","TransitionStart"),transitioncancel:ja("Transition","TransitionCancel"),transitionend:ja("Transition","TransitionEnd")},Ui={},Pu={};Tn&&(Pu=document.createElement("div").style,"AnimationEvent"in window||(delete Ia.animationend.animation,delete Ia.animationiteration.animation,delete Ia.animationstart.animation),"TransitionEvent"in window||delete Ia.transitionend.transition);function wa(e){if(Ui[e])return Ui[e];if(!Ia[e])return e;var t=Ia[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Pu)return Ui[e]=t[n];return e}var ed=wa("animationend"),td=wa("animationiteration"),nd=wa("animationstart"),Sx=wa("transitionrun"),Nx=wa("transitionstart"),kx=wa("transitioncancel"),ad=wa("transitionend"),ld=new Map,$i="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(" ");$i.push("scrollEnd");function rn(e,t){ld.set(e,t),ya(t,[e])}var Hs=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=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(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Kt=[],Wa=0,Hi=0;function Gs(){for(var e=Wa,t=Hi=Wa=0;t<e;){var n=Kt[t];Kt[t++]=null;var a=Kt[t];Kt[t++]=null;var i=Kt[t];Kt[t++]=null;var u=Kt[t];if(Kt[t++]=null,a!==null&&i!==null){var p=a.pending;p===null?i.next=i:(i.next=p.next,p.next=i),a.pending=i}u!==0&&sd(n,i,u)}}function qs(e,t,n,a){Kt[Wa++]=e,Kt[Wa++]=t,Kt[Wa++]=n,Kt[Wa++]=a,Hi|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Gi(e,t,n,a){return qs(e,t,n,a),Ys(e)}function Sa(e,t){return qs(e,null,null,t),Ys(e)}function sd(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var i=!1,u=e.return;u!==null;)u.childLanes|=n,a=u.alternate,a!==null&&(a.childLanes|=n),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(i=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,i&&t!==null&&(i=31-Ge(n),e=u.hiddenUpdates,a=e[i],a===null?e[i]=[t]:a.push(t),t.lane=n|536870912),u):null}function Ys(e){if(50<rs)throw rs=0,Io=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Pa={};function Ex(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gt(e,t,n,a){return new Ex(e,t,n,a)}function qi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function An(e,t){var n=e.alternate;return n===null?(n=Gt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function rd(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Zs(e,t,n,a,i,u){var p=0;if(a=e,typeof e=="function")qi(e)&&(p=1);else if(typeof e=="string")p=_g(e,n,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=Gt(31,n,t,i),e.elementType=ae,e.lanes=u,e;case S:return Na(n.children,i,u,t);case C:p=8,i|=24;break;case E:return e=Gt(12,n,t,i|2),e.elementType=E,e.lanes=u,e;case U:return e=Gt(13,n,t,i),e.elementType=U,e.lanes=u,e;case J:return e=Gt(19,n,t,i),e.elementType=J,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _:p=10;break e;case k:p=9;break e;case z:p=11;break e;case Z:p=14;break e;case re:p=16,a=null;break e}p=29,n=Error(c(130,e===null?"null":typeof e,"")),a=null}return t=Gt(p,n,t,i),t.elementType=e,t.type=a,t.lanes=u,t}function Na(e,t,n,a){return e=Gt(7,e,a,t),e.lanes=n,e}function Yi(e,t,n){return e=Gt(6,e,null,t),e.lanes=n,e}function id(e){var t=Gt(18,null,null,0);return t.stateNode=e,t}function Zi(e,t,n){return t=Gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var od=new WeakMap;function It(e,t){if(typeof e=="object"&&e!==null){var n=od.get(e);return n!==void 0?n:(t={value:e,source:t,stack:ot(t)},od.set(e,t),t)}return{value:e,source:t,stack:ot(t)}}var el=[],tl=0,Fs=null,$l=0,Wt=[],Pt=0,Vn=null,pn=1,hn="";function Cn(e,t){el[tl++]=$l,el[tl++]=Fs,Fs=e,$l=t}function cd(e,t,n){Wt[Pt++]=pn,Wt[Pt++]=hn,Wt[Pt++]=Vn,Vn=e;var a=pn;e=hn;var i=32-Ge(a)-1;a&=~(1<<i),n+=1;var u=32-Ge(t)+i;if(30<u){var p=i-i%5;u=(a&(1<<p)-1).toString(32),a>>=p,i-=p,pn=1<<32-Ge(t)+i|n<<i|a,hn=u+e}else pn=1<<u|n<<i|a,hn=e}function Fi(e){e.return!==null&&(Cn(e,1),cd(e,1,0))}function Xi(e){for(;e===Fs;)Fs=el[--tl],el[tl]=null,$l=el[--tl],el[tl]=null;for(;e===Vn;)Vn=Wt[--Pt],Wt[Pt]=null,hn=Wt[--Pt],Wt[Pt]=null,pn=Wt[--Pt],Wt[Pt]=null}function ud(e,t){Wt[Pt++]=pn,Wt[Pt++]=hn,Wt[Pt++]=Vn,pn=t.id,hn=t.overflow,Vn=e}var wt=null,We=null,Me=!1,Jn=null,en=!1,Qi=Error(c(519));function Kn(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Hl(It(t,e)),Qi}function dd(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[jt]=e,t[Ot]=a,n){case"dialog":Ce("cancel",t),Ce("close",t);break;case"iframe":case"object":case"embed":Ce("load",t);break;case"video":case"audio":for(n=0;n<os.length;n++)Ce(os[n],t);break;case"source":Ce("error",t);break;case"img":case"image":case"link":Ce("error",t),Ce("load",t);break;case"details":Ce("toggle",t);break;case"input":Ce("invalid",t),Nu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Ce("invalid",t);break;case"textarea":Ce("invalid",t),Eu(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Cm(t.textContent,n)?(a.popover!=null&&(Ce("beforetoggle",t),Ce("toggle",t)),a.onScroll!=null&&Ce("scroll",t),a.onScrollEnd!=null&&Ce("scrollend",t),a.onClick!=null&&(t.onclick=En),t=!0):t=!1,t||Kn(e,!0)}function fd(e){for(wt=e.return;wt;)switch(wt.tag){case 5:case 31:case 13:en=!1;return;case 27:case 3:en=!0;return;default:wt=wt.return}}function nl(e){if(e!==wt)return!1;if(!Me)return fd(e),Me=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||fc(e.type,e.memoizedProps)),n=!n),n&&We&&Kn(e),fd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));We=Um(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));We=Um(e)}else t===27?(t=We,ua(e.type)?(e=gc,gc=null,We=e):We=t):We=wt?nn(e.stateNode.nextSibling):null;return!0}function ka(){We=wt=null,Me=!1}function Vi(){var e=Jn;return e!==null&&(Bt===null?Bt=e:Bt.push.apply(Bt,e),Jn=null),e}function Hl(e){Jn===null?Jn=[e]:Jn.push(e)}var Ji=A(null),Ea=null,Rn=null;function In(e,t,n){D(Ji,t._currentValue),t._currentValue=n}function _n(e){e._currentValue=Ji.current,O(Ji)}function Ki(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function Ii(e,t,n,a){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var u=i.dependencies;if(u!==null){var p=i.child;u=u.firstContext;e:for(;u!==null;){var b=u;u=i;for(var R=0;R<t.length;R++)if(b.context===t[R]){u.lanes|=n,b=u.alternate,b!==null&&(b.lanes|=n),Ki(u.return,n,e),a||(p=null);break e}u=b.next}}else if(i.tag===18){if(p=i.return,p===null)throw Error(c(341));p.lanes|=n,u=p.alternate,u!==null&&(u.lanes|=n),Ki(p,n,e),p=null}else p=i.child;if(p!==null)p.return=i;else for(p=i;p!==null;){if(p===e){p=null;break}if(i=p.sibling,i!==null){i.return=p.return,p=i;break}p=p.return}i=p}}function al(e,t,n,a){e=null;for(var i=t,u=!1;i!==null;){if(!u){if((i.flags&524288)!==0)u=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var p=i.alternate;if(p===null)throw Error(c(387));if(p=p.memoizedProps,p!==null){var b=i.type;Ht(i.pendingProps.value,p.value)||(e!==null?e.push(b):e=[b])}}else if(i===xe.current){if(p=i.alternate,p===null)throw Error(c(387));p.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(ms):e=[ms])}i=i.return}e!==null&&Ii(t,e,n,a),t.flags|=262144}function Xs(e){for(e=e.firstContext;e!==null;){if(!Ht(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ta(e){Ea=e,Rn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function St(e){return md(Ea,e)}function Qs(e,t){return Ea===null&&Ta(e),md(e,t)}function md(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Rn===null){if(e===null)throw Error(c(308));Rn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Rn=Rn.next=t;return n}var Tx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Ax=s.unstable_scheduleCallback,Cx=s.unstable_NormalPriority,ct={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wi(){return{controller:new Tx,data:new Map,refCount:0}}function Gl(e){e.refCount--,e.refCount===0&&Ax(Cx,function(){e.controller.abort()})}var ql=null,Pi=0,ll=0,sl=null;function Rx(e,t){if(ql===null){var n=ql=[];Pi=0,ll=ac(),sl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Pi++,t.then(pd,pd),t}function pd(){if(--Pi===0&&ql!==null){sl!==null&&(sl.status="fulfilled");var e=ql;ql=null,ll=0,sl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function _x(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(a.status="rejected",a.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),a}var hd=B.S;B.S=function(e,t){Pf=$(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Rx(e,t),hd!==null&&hd(e,t)};var Aa=A(null);function eo(){var e=Aa.current;return e!==null?e:Ke.pooledCache}function Vs(e,t){t===null?D(Aa,Aa.current):D(Aa,t.pool)}function xd(){var e=eo();return e===null?null:{parent:ct._currentValue,pool:e}}var rl=Error(c(460)),to=Error(c(474)),Js=Error(c(542)),Ks={then:function(){}};function gd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function bd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(En,En),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vd(e),e;default:if(typeof t.status=="string")t.then(En,En);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=a}},function(a){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vd(e),e}throw Ra=t,rl}}function Ca(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ra=n,rl):n}}var Ra=null;function yd(){if(Ra===null)throw Error(c(459));var e=Ra;return Ra=null,e}function vd(e){if(e===rl||e===Js)throw Error(c(483))}var il=null,Yl=0;function Is(e){var t=Yl;return Yl+=1,il===null&&(il=[]),bd(il,e,t)}function Zl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ws(e,t){throw t.$$typeof===T?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function jd(e){function t(L,M){if(e){var H=L.deletions;H===null?(L.deletions=[M],L.flags|=16):H.push(M)}}function n(L,M){if(!e)return null;for(;M!==null;)t(L,M),M=M.sibling;return null}function a(L){for(var M=new Map;L!==null;)L.key!==null?M.set(L.key,L):M.set(L.index,L),L=L.sibling;return M}function i(L,M){return L=An(L,M),L.index=0,L.sibling=null,L}function u(L,M,H){return L.index=H,e?(H=L.alternate,H!==null?(H=H.index,H<M?(L.flags|=67108866,M):H):(L.flags|=67108866,M)):(L.flags|=1048576,M)}function p(L){return e&&L.alternate===null&&(L.flags|=67108866),L}function b(L,M,H,Q){return M===null||M.tag!==6?(M=Yi(H,L.mode,Q),M.return=L,M):(M=i(M,H),M.return=L,M)}function R(L,M,H,Q){var he=H.type;return he===S?F(L,M,H.props.children,Q,H.key):M!==null&&(M.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===re&&Ca(he)===M.type)?(M=i(M,H.props),Zl(M,H),M.return=L,M):(M=Zs(H.type,H.key,H.props,null,L.mode,Q),Zl(M,H),M.return=L,M)}function G(L,M,H,Q){return M===null||M.tag!==4||M.stateNode.containerInfo!==H.containerInfo||M.stateNode.implementation!==H.implementation?(M=Zi(H,L.mode,Q),M.return=L,M):(M=i(M,H.children||[]),M.return=L,M)}function F(L,M,H,Q,he){return M===null||M.tag!==7?(M=Na(H,L.mode,Q,he),M.return=L,M):(M=i(M,H),M.return=L,M)}function K(L,M,H){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Yi(""+M,L.mode,H),M.return=L,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case N:return H=Zs(M.type,M.key,M.props,null,L.mode,H),Zl(H,M),H.return=L,H;case j:return M=Zi(M,L.mode,H),M.return=L,M;case re:return M=Ca(M),K(L,M,H)}if(pe(M)||oe(M))return M=Na(M,L.mode,H,null),M.return=L,M;if(typeof M.then=="function")return K(L,Is(M),H);if(M.$$typeof===_)return K(L,Qs(L,M),H);Ws(L,M)}return null}function q(L,M,H,Q){var he=M!==null?M.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return he!==null?null:b(L,M,""+H,Q);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case N:return H.key===he?R(L,M,H,Q):null;case j:return H.key===he?G(L,M,H,Q):null;case re:return H=Ca(H),q(L,M,H,Q)}if(pe(H)||oe(H))return he!==null?null:F(L,M,H,Q,null);if(typeof H.then=="function")return q(L,M,Is(H),Q);if(H.$$typeof===_)return q(L,M,Qs(L,H),Q);Ws(L,H)}return null}function Y(L,M,H,Q,he){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return L=L.get(H)||null,b(M,L,""+Q,he);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case N:return L=L.get(Q.key===null?H:Q.key)||null,R(M,L,Q,he);case j:return L=L.get(Q.key===null?H:Q.key)||null,G(M,L,Q,he);case re:return Q=Ca(Q),Y(L,M,H,Q,he)}if(pe(Q)||oe(Q))return L=L.get(H)||null,F(M,L,Q,he,null);if(typeof Q.then=="function")return Y(L,M,H,Is(Q),he);if(Q.$$typeof===_)return Y(L,M,H,Qs(M,Q),he);Ws(M,Q)}return null}function fe(L,M,H,Q){for(var he=null,Le=null,me=M,Ne=M=0,_e=null;me!==null&&Ne<H.length;Ne++){me.index>Ne?(_e=me,me=null):_e=me.sibling;var Be=q(L,me,H[Ne],Q);if(Be===null){me===null&&(me=_e);break}e&&me&&Be.alternate===null&&t(L,me),M=u(Be,M,Ne),Le===null?he=Be:Le.sibling=Be,Le=Be,me=_e}if(Ne===H.length)return n(L,me),Me&&Cn(L,Ne),he;if(me===null){for(;Ne<H.length;Ne++)me=K(L,H[Ne],Q),me!==null&&(M=u(me,M,Ne),Le===null?he=me:Le.sibling=me,Le=me);return Me&&Cn(L,Ne),he}for(me=a(me);Ne<H.length;Ne++)_e=Y(me,L,Ne,H[Ne],Q),_e!==null&&(e&&_e.alternate!==null&&me.delete(_e.key===null?Ne:_e.key),M=u(_e,M,Ne),Le===null?he=_e:Le.sibling=_e,Le=_e);return e&&me.forEach(function(ha){return t(L,ha)}),Me&&Cn(L,Ne),he}function ge(L,M,H,Q){if(H==null)throw Error(c(151));for(var he=null,Le=null,me=M,Ne=M=0,_e=null,Be=H.next();me!==null&&!Be.done;Ne++,Be=H.next()){me.index>Ne?(_e=me,me=null):_e=me.sibling;var ha=q(L,me,Be.value,Q);if(ha===null){me===null&&(me=_e);break}e&&me&&ha.alternate===null&&t(L,me),M=u(ha,M,Ne),Le===null?he=ha:Le.sibling=ha,Le=ha,me=_e}if(Be.done)return n(L,me),Me&&Cn(L,Ne),he;if(me===null){for(;!Be.done;Ne++,Be=H.next())Be=K(L,Be.value,Q),Be!==null&&(M=u(Be,M,Ne),Le===null?he=Be:Le.sibling=Be,Le=Be);return Me&&Cn(L,Ne),he}for(me=a(me);!Be.done;Ne++,Be=H.next())Be=Y(me,L,Ne,Be.value,Q),Be!==null&&(e&&Be.alternate!==null&&me.delete(Be.key===null?Ne:Be.key),M=u(Be,M,Ne),Le===null?he=Be:Le.sibling=Be,Le=Be);return e&&me.forEach(function(qg){return t(L,qg)}),Me&&Cn(L,Ne),he}function Je(L,M,H,Q){if(typeof H=="object"&&H!==null&&H.type===S&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case N:e:{for(var he=H.key;M!==null;){if(M.key===he){if(he=H.type,he===S){if(M.tag===7){n(L,M.sibling),Q=i(M,H.props.children),Q.return=L,L=Q;break e}}else if(M.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===re&&Ca(he)===M.type){n(L,M.sibling),Q=i(M,H.props),Zl(Q,H),Q.return=L,L=Q;break e}n(L,M);break}else t(L,M);M=M.sibling}H.type===S?(Q=Na(H.props.children,L.mode,Q,H.key),Q.return=L,L=Q):(Q=Zs(H.type,H.key,H.props,null,L.mode,Q),Zl(Q,H),Q.return=L,L=Q)}return p(L);case j:e:{for(he=H.key;M!==null;){if(M.key===he)if(M.tag===4&&M.stateNode.containerInfo===H.containerInfo&&M.stateNode.implementation===H.implementation){n(L,M.sibling),Q=i(M,H.children||[]),Q.return=L,L=Q;break e}else{n(L,M);break}else t(L,M);M=M.sibling}Q=Zi(H,L.mode,Q),Q.return=L,L=Q}return p(L);case re:return H=Ca(H),Je(L,M,H,Q)}if(pe(H))return fe(L,M,H,Q);if(oe(H)){if(he=oe(H),typeof he!="function")throw Error(c(150));return H=he.call(H),ge(L,M,H,Q)}if(typeof H.then=="function")return Je(L,M,Is(H),Q);if(H.$$typeof===_)return Je(L,M,Qs(L,H),Q);Ws(L,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,M!==null&&M.tag===6?(n(L,M.sibling),Q=i(M,H),Q.return=L,L=Q):(n(L,M),Q=Yi(H,L.mode,Q),Q.return=L,L=Q),p(L)):n(L,M)}return function(L,M,H,Q){try{Yl=0;var he=Je(L,M,H,Q);return il=null,he}catch(me){if(me===rl||me===Js)throw me;var Le=Gt(29,me,null,L.mode);return Le.lanes=Q,Le.return=L,Le}finally{}}}var _a=jd(!0),wd=jd(!1),Wn=!1;function no(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Pn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ea(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(He&2)!==0){var i=a.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),a.pending=t,t=Ys(e),sd(e,null,n),t}return qs(e,a,t,n),Ys(e)}function Fl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,mu(e,n)}}function lo(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var i=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var p={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?i=u=p:u=u.next=p,n=n.next}while(n!==null);u===null?i=u=t:u=u.next=t}else i=u=t;n={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var so=!1;function Xl(){if(so){var e=sl;if(e!==null)throw e}}function Ql(e,t,n,a){so=!1;var i=e.updateQueue;Wn=!1;var u=i.firstBaseUpdate,p=i.lastBaseUpdate,b=i.shared.pending;if(b!==null){i.shared.pending=null;var R=b,G=R.next;R.next=null,p===null?u=G:p.next=G,p=R;var F=e.alternate;F!==null&&(F=F.updateQueue,b=F.lastBaseUpdate,b!==p&&(b===null?F.firstBaseUpdate=G:b.next=G,F.lastBaseUpdate=R))}if(u!==null){var K=i.baseState;p=0,F=G=R=null,b=u;do{var q=b.lane&-536870913,Y=q!==b.lane;if(Y?(Re&q)===q:(a&q)===q){q!==0&&q===ll&&(so=!0),F!==null&&(F=F.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var fe=e,ge=b;q=t;var Je=n;switch(ge.tag){case 1:if(fe=ge.payload,typeof fe=="function"){K=fe.call(Je,K,q);break e}K=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=ge.payload,q=typeof fe=="function"?fe.call(Je,K,q):fe,q==null)break e;K=w({},K,q);break e;case 2:Wn=!0}}q=b.callback,q!==null&&(e.flags|=64,Y&&(e.flags|=8192),Y=i.callbacks,Y===null?i.callbacks=[q]:Y.push(q))}else Y={lane:q,tag:b.tag,payload:b.payload,callback:b.callback,next:null},F===null?(G=F=Y,R=K):F=F.next=Y,p|=q;if(b=b.next,b===null){if(b=i.shared.pending,b===null)break;Y=b,b=Y.next,Y.next=null,i.lastBaseUpdate=Y,i.shared.pending=null}}while(!0);F===null&&(R=K),i.baseState=R,i.firstBaseUpdate=G,i.lastBaseUpdate=F,u===null&&(i.shared.lanes=0),sa|=p,e.lanes=p,e.memoizedState=K}}function Sd(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Nd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Sd(n[e],t)}var ol=A(null),Ps=A(0);function kd(e,t){e=Hn,D(Ps,e),D(ol,t),Hn=e|t.baseLanes}function ro(){D(Ps,Hn),D(ol,ol.current)}function io(){Hn=Ps.current,O(ol),O(Ps)}var qt=A(null),tn=null;function ta(e){var t=e.alternate;D(st,st.current&1),D(qt,e),tn===null&&(t===null||ol.current!==null||t.memoizedState!==null)&&(tn=e)}function oo(e){D(st,st.current),D(qt,e),tn===null&&(tn=e)}function Ed(e){e.tag===22?(D(st,st.current),D(qt,e),tn===null&&(tn=e)):na()}function na(){D(st,st.current),D(qt,qt.current)}function Yt(e){O(qt),tn===e&&(tn=null),O(st)}var st=A(0);function er(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||hc(n)||xc(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var On=0,Se=null,Qe=null,ut=null,tr=!1,cl=!1,Oa=!1,nr=0,Vl=0,ul=null,Ox=0;function at(){throw Error(c(321))}function co(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ht(e[n],t[n]))return!1;return!0}function uo(e,t,n,a,i,u){return On=u,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?uf:Eo,Oa=!1,u=n(a,i),Oa=!1,cl&&(u=Ad(t,n,a,i)),Td(e),u}function Td(e){B.H=Il;var t=Qe!==null&&Qe.next!==null;if(On=0,ut=Qe=Se=null,tr=!1,Vl=0,ul=null,t)throw Error(c(300));e===null||dt||(e=e.dependencies,e!==null&&Xs(e)&&(dt=!0))}function Ad(e,t,n,a){Se=e;var i=0;do{if(cl&&(ul=null),Vl=0,cl=!1,25<=i)throw Error(c(301));if(i+=1,ut=Qe=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}B.H=df,u=t(n,a)}while(cl);return u}function Mx(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?Jl(t):t,e=e.useState()[0],(Qe!==null?Qe.memoizedState:null)!==e&&(Se.flags|=1024),t}function fo(){var e=nr!==0;return nr=0,e}function mo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function po(e){if(tr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}tr=!1}On=0,ut=Qe=Se=null,cl=!1,Vl=nr=0,ul=null}function Rt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ut===null?Se.memoizedState=ut=e:ut=ut.next=e,ut}function rt(){if(Qe===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var t=ut===null?Se.memoizedState:ut.next;if(t!==null)ut=t,Qe=e;else{if(e===null)throw Se.alternate===null?Error(c(467)):Error(c(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},ut===null?Se.memoizedState=ut=e:ut=ut.next=e}return ut}function ar(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Jl(e){var t=Vl;return Vl+=1,ul===null&&(ul=[]),e=bd(ul,e,t),t=Se,(ut===null?t.memoizedState:ut.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?uf:Eo),e}function lr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Jl(e);if(e.$$typeof===_)return St(e)}throw Error(c(438,String(e)))}function ho(e){var t=null,n=Se.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Se.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=ar(),Se.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=P;return t.index++,n}function Mn(e,t){return typeof t=="function"?t(e):t}function sr(e){var t=rt();return xo(t,Qe,e)}function xo(e,t,n){var a=e.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=n;var i=e.baseQueue,u=a.pending;if(u!==null){if(i!==null){var p=i.next;i.next=u.next,u.next=p}t.baseQueue=i=u,a.pending=null}if(u=e.baseState,i===null)e.memoizedState=u;else{t=i.next;var b=p=null,R=null,G=t,F=!1;do{var K=G.lane&-536870913;if(K!==G.lane?(Re&K)===K:(On&K)===K){var q=G.revertLane;if(q===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),K===ll&&(F=!0);else if((On&q)===q){G=G.next,q===ll&&(F=!0);continue}else K={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},R===null?(b=R=K,p=u):R=R.next=K,Se.lanes|=q,sa|=q;K=G.action,Oa&&n(u,K),u=G.hasEagerState?G.eagerState:n(u,K)}else q={lane:K,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},R===null?(b=R=q,p=u):R=R.next=q,Se.lanes|=K,sa|=K;G=G.next}while(G!==null&&G!==t);if(R===null?p=u:R.next=b,!Ht(u,e.memoizedState)&&(dt=!0,F&&(n=sl,n!==null)))throw n;e.memoizedState=u,e.baseState=p,e.baseQueue=R,a.lastRenderedState=u}return i===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function go(e){var t=rt(),n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=e;var a=n.dispatch,i=n.pending,u=t.memoizedState;if(i!==null){n.pending=null;var p=i=i.next;do u=e(u,p.action),p=p.next;while(p!==i);Ht(u,t.memoizedState)||(dt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,a]}function Cd(e,t,n){var a=Se,i=rt(),u=Me;if(u){if(n===void 0)throw Error(c(407));n=n()}else n=t();var p=!Ht((Qe||i).memoizedState,n);if(p&&(i.memoizedState=n,dt=!0),i=i.queue,vo(Od.bind(null,a,i,e),[e]),i.getSnapshot!==t||p||ut!==null&&ut.memoizedState.tag&1){if(a.flags|=2048,dl(9,{destroy:void 0},_d.bind(null,a,i,n,t),null),Ke===null)throw Error(c(349));u||(On&127)!==0||Rd(a,t,n)}return n}function Rd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Se.updateQueue,t===null?(t=ar(),Se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function _d(e,t,n,a){t.value=n,t.getSnapshot=a,Md(t)&&zd(e)}function Od(e,t,n){return n(function(){Md(t)&&zd(e)})}function Md(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ht(e,n)}catch{return!0}}function zd(e){var t=Sa(e,2);t!==null&&Ut(t,e,2)}function bo(e){var t=Rt();if(typeof e=="function"){var n=e;if(e=n(),Oa){Ze(!0);try{n()}finally{Ze(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:e},t}function Dd(e,t,n,a){return e.baseState=n,xo(e,Qe,typeof a=="function"?a:Mn)}function zx(e,t,n,a,i){if(or(e))throw Error(c(485));if(e=t.action,e!==null){var u={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){u.listeners.push(p)}};B.T!==null?n(!0):u.isTransition=!1,a(u),n=t.pending,n===null?(u.next=t.pending=u,Ld(t,u)):(u.next=n.next,t.pending=n.next=u)}}function Ld(e,t){var n=t.action,a=t.payload,i=e.state;if(t.isTransition){var u=B.T,p={};B.T=p;try{var b=n(i,a),R=B.S;R!==null&&R(p,b),Bd(e,t,b)}catch(G){yo(e,t,G)}finally{u!==null&&p.types!==null&&(u.types=p.types),B.T=u}}else try{u=n(i,a),Bd(e,t,u)}catch(G){yo(e,t,G)}}function Bd(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Ud(e,t,a)},function(a){return yo(e,t,a)}):Ud(e,t,n)}function Ud(e,t,n){t.status="fulfilled",t.value=n,$d(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ld(e,n)))}function yo(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,$d(t),t=t.next;while(t!==a)}e.action=null}function $d(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Hd(e,t){return t}function Gd(e,t){if(Me){var n=Ke.formState;if(n!==null){e:{var a=Se;if(Me){if(We){t:{for(var i=We,u=en;i.nodeType!==8;){if(!u){i=null;break t}if(i=nn(i.nextSibling),i===null){i=null;break t}}u=i.data,i=u==="F!"||u==="F"?i:null}if(i){We=nn(i.nextSibling),a=i.data==="F!";break e}}Kn(a)}a=!1}a&&(t=n[0])}}return n=Rt(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hd,lastRenderedState:t},n.queue=a,n=rf.bind(null,Se,a),a.dispatch=n,a=bo(!1),u=ko.bind(null,Se,!1,a.queue),a=Rt(),i={state:t,dispatch:null,action:e,pending:null},a.queue=i,n=zx.bind(null,Se,i,u,n),i.dispatch=n,a.memoizedState=e,[t,n,!1]}function qd(e){var t=rt();return Yd(t,Qe,e)}function Yd(e,t,n){if(t=xo(e,t,Hd)[0],e=sr(Mn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Jl(t)}catch(p){throw p===rl?Js:p}else a=t;t=rt();var i=t.queue,u=i.dispatch;return n!==t.memoizedState&&(Se.flags|=2048,dl(9,{destroy:void 0},Dx.bind(null,i,n),null)),[a,u,e]}function Dx(e,t){e.action=t}function Zd(e){var t=rt(),n=Qe;if(n!==null)return Yd(t,n,e);rt(),t=t.memoizedState,n=rt();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function dl(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Se.updateQueue,t===null&&(t=ar(),Se.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Fd(){return rt().memoizedState}function rr(e,t,n,a){var i=Rt();Se.flags|=e,i.memoizedState=dl(1|t,{destroy:void 0},n,a===void 0?null:a)}function ir(e,t,n,a){var i=rt();a=a===void 0?null:a;var u=i.memoizedState.inst;Qe!==null&&a!==null&&co(a,Qe.memoizedState.deps)?i.memoizedState=dl(t,u,n,a):(Se.flags|=e,i.memoizedState=dl(1|t,u,n,a))}function Xd(e,t){rr(8390656,8,e,t)}function vo(e,t){ir(2048,8,e,t)}function Lx(e){Se.flags|=4;var t=Se.updateQueue;if(t===null)t=ar(),Se.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Qd(e){var t=rt().memoizedState;return Lx({ref:t,nextImpl:e}),function(){if((He&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function Vd(e,t){return ir(4,2,e,t)}function Jd(e,t){return ir(4,4,e,t)}function Kd(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Id(e,t,n){n=n!=null?n.concat([e]):null,ir(4,4,Kd.bind(null,t,e),n)}function jo(){}function Wd(e,t){var n=rt();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&co(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Pd(e,t){var n=rt();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&co(t,a[1]))return a[0];if(a=e(),Oa){Ze(!0);try{e()}finally{Ze(!1)}}return n.memoizedState=[a,t],a}function wo(e,t,n){return n===void 0||(On&1073741824)!==0&&(Re&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=tm(),Se.lanes|=e,sa|=e,n)}function ef(e,t,n,a){return Ht(n,t)?n:ol.current!==null?(e=wo(e,n,a),Ht(e,t)||(dt=!0),e):(On&42)===0||(On&1073741824)!==0&&(Re&261930)===0?(dt=!0,e.memoizedState=n):(e=tm(),Se.lanes|=e,sa|=e,t)}function tf(e,t,n,a,i){var u=W.p;W.p=u!==0&&8>u?u:8;var p=B.T,b={};B.T=b,ko(e,!1,t,n);try{var R=i(),G=B.S;if(G!==null&&G(b,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var F=_x(R,a);Kl(e,t,F,Xt(e))}else Kl(e,t,a,Xt(e))}catch(K){Kl(e,t,{then:function(){},status:"rejected",reason:K},Xt())}finally{W.p=u,p!==null&&b.types!==null&&(p.types=b.types),B.T=p}}function Bx(){}function So(e,t,n,a){if(e.tag!==5)throw Error(c(476));var i=nf(e).queue;tf(e,i,t,ie,n===null?Bx:function(){return af(e),n(a)})}function nf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function af(e){var t=nf(e);t.next===null&&(t=e.alternate.memoizedState),Kl(e,t.next.queue,{},Xt())}function No(){return St(ms)}function lf(){return rt().memoizedState}function sf(){return rt().memoizedState}function Ux(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Xt();e=Pn(n);var a=ea(t,e,n);a!==null&&(Ut(a,t,n),Fl(a,t,n)),t={cache:Wi()},e.payload=t;return}t=t.return}}function $x(e,t,n){var a=Xt();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},or(e)?of(t,n):(n=Gi(e,t,n,a),n!==null&&(Ut(n,e,a),cf(n,t,a)))}function rf(e,t,n){var a=Xt();Kl(e,t,n,a)}function Kl(e,t,n,a){var i={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(or(e))of(t,i);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var p=t.lastRenderedState,b=u(p,n);if(i.hasEagerState=!0,i.eagerState=b,Ht(b,p))return qs(e,t,i,0),Ke===null&&Gs(),!1}catch{}finally{}if(n=Gi(e,t,i,a),n!==null)return Ut(n,e,a),cf(n,t,a),!0}return!1}function ko(e,t,n,a){if(a={lane:2,revertLane:ac(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},or(e)){if(t)throw Error(c(479))}else t=Gi(e,n,a,2),t!==null&&Ut(t,e,2)}function or(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function of(e,t){cl=tr=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cf(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,mu(e,n)}}var Il={readContext:St,use:lr,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useLayoutEffect:at,useInsertionEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useSyncExternalStore:at,useId:at,useHostTransitionStatus:at,useFormState:at,useActionState:at,useOptimistic:at,useMemoCache:at,useCacheRefresh:at};Il.useEffectEvent=at;var uf={readContext:St,use:lr,useCallback:function(e,t){return Rt().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:Xd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,rr(4194308,4,Kd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rr(4194308,4,e,t)},useInsertionEffect:function(e,t){rr(4,2,e,t)},useMemo:function(e,t){var n=Rt();t=t===void 0?null:t;var a=e();if(Oa){Ze(!0);try{e()}finally{Ze(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Rt();if(n!==void 0){var i=n(t);if(Oa){Ze(!0);try{n(t)}finally{Ze(!1)}}}else i=t;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=$x.bind(null,Se,e),[a.memoizedState,e]},useRef:function(e){var t=Rt();return e={current:e},t.memoizedState=e},useState:function(e){e=bo(e);var t=e.queue,n=rf.bind(null,Se,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:jo,useDeferredValue:function(e,t){var n=Rt();return wo(n,e,t)},useTransition:function(){var e=bo(!1);return e=tf.bind(null,Se,e.queue,!0,!1),Rt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Se,i=Rt();if(Me){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),Ke===null)throw Error(c(349));(Re&127)!==0||Rd(a,t,n)}i.memoizedState=n;var u={value:n,getSnapshot:t};return i.queue=u,Xd(Od.bind(null,a,u,e),[e]),a.flags|=2048,dl(9,{destroy:void 0},_d.bind(null,a,u,n,t),null),n},useId:function(){var e=Rt(),t=Ke.identifierPrefix;if(Me){var n=hn,a=pn;n=(a&~(1<<32-Ge(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=nr++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Ox++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:No,useFormState:Gd,useActionState:Gd,useOptimistic:function(e){var t=Rt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ko.bind(null,Se,!0,n),n.dispatch=t,[e,t]},useMemoCache:ho,useCacheRefresh:function(){return Rt().memoizedState=Ux.bind(null,Se)},useEffectEvent:function(e){var t=Rt(),n={impl:e};return t.memoizedState=n,function(){if((He&2)!==0)throw Error(c(440));return n.impl.apply(void 0,arguments)}}},Eo={readContext:St,use:lr,useCallback:Wd,useContext:St,useEffect:vo,useImperativeHandle:Id,useInsertionEffect:Vd,useLayoutEffect:Jd,useMemo:Pd,useReducer:sr,useRef:Fd,useState:function(){return sr(Mn)},useDebugValue:jo,useDeferredValue:function(e,t){var n=rt();return ef(n,Qe.memoizedState,e,t)},useTransition:function(){var e=sr(Mn)[0],t=rt().memoizedState;return[typeof e=="boolean"?e:Jl(e),t]},useSyncExternalStore:Cd,useId:lf,useHostTransitionStatus:No,useFormState:qd,useActionState:qd,useOptimistic:function(e,t){var n=rt();return Dd(n,Qe,e,t)},useMemoCache:ho,useCacheRefresh:sf};Eo.useEffectEvent=Qd;var df={readContext:St,use:lr,useCallback:Wd,useContext:St,useEffect:vo,useImperativeHandle:Id,useInsertionEffect:Vd,useLayoutEffect:Jd,useMemo:Pd,useReducer:go,useRef:Fd,useState:function(){return go(Mn)},useDebugValue:jo,useDeferredValue:function(e,t){var n=rt();return Qe===null?wo(n,e,t):ef(n,Qe.memoizedState,e,t)},useTransition:function(){var e=go(Mn)[0],t=rt().memoizedState;return[typeof e=="boolean"?e:Jl(e),t]},useSyncExternalStore:Cd,useId:lf,useHostTransitionStatus:No,useFormState:Zd,useActionState:Zd,useOptimistic:function(e,t){var n=rt();return Qe!==null?Dd(n,Qe,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:ho,useCacheRefresh:sf};df.useEffectEvent=Qd;function To(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:w({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ao={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Xt(),i=Pn(a);i.payload=t,n!=null&&(i.callback=n),t=ea(e,i,a),t!==null&&(Ut(t,e,a),Fl(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Xt(),i=Pn(a);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=ea(e,i,a),t!==null&&(Ut(t,e,a),Fl(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Xt(),a=Pn(n);a.tag=2,t!=null&&(a.callback=t),t=ea(e,a,n),t!==null&&(Ut(t,e,n),Fl(t,e,n))}};function ff(e,t,n,a,i,u,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,p):t.prototype&&t.prototype.isPureReactComponent?!Bl(n,a)||!Bl(i,u):!0}function mf(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Ao.enqueueReplaceState(t,t.state,null)}function Ma(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=w({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function pf(e){Hs(e)}function hf(e){console.error(e)}function xf(e){Hs(e)}function cr(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function gf(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function Co(e,t,n){return n=Pn(n),n.tag=3,n.payload={element:null},n.callback=function(){cr(e,t)},n}function bf(e){return e=Pn(e),e.tag=3,e}function yf(e,t,n,a){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var u=a.value;e.payload=function(){return i(u)},e.callback=function(){gf(t,n,a)}}var p=n.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){gf(t,n,a),typeof i!="function"&&(ra===null?ra=new Set([this]):ra.add(this));var b=a.stack;this.componentDidCatch(a.value,{componentStack:b!==null?b:""})})}function Hx(e,t,n,a,i){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&al(t,n,i,!0),n=qt.current,n!==null){switch(n.tag){case 31:case 13:return tn===null?jr():n.alternate===null&&lt===0&&(lt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,a===Ks?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),ec(e,a,i)),!1;case 22:return n.flags|=65536,a===Ks?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),ec(e,a,i)),!1}throw Error(c(435,n.tag))}return ec(e,a,i),jr(),!1}if(Me)return t=qt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,a!==Qi&&(e=Error(c(422),{cause:a}),Hl(It(e,n)))):(a!==Qi&&(t=Error(c(423),{cause:a}),Hl(It(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,a=It(a,n),i=Co(e.stateNode,a,i),lo(e,i),lt!==4&&(lt=2)),!1;var u=Error(c(520),{cause:a});if(u=It(u,n),ss===null?ss=[u]:ss.push(u),lt!==4&&(lt=2),t===null)return!0;a=It(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Co(n.stateNode,a,e),lo(n,e),!1;case 1:if(t=n.type,u=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(ra===null||!ra.has(u))))return n.flags|=65536,i&=-i,n.lanes|=i,i=bf(i),yf(i,e,n,a),lo(n,i),!1}n=n.return}while(n!==null);return!1}var Ro=Error(c(461)),dt=!1;function Nt(e,t,n,a){t.child=e===null?wd(t,null,n,a):_a(t,e.child,n,a)}function vf(e,t,n,a,i){n=n.render;var u=t.ref;if("ref"in a){var p={};for(var b in a)b!=="ref"&&(p[b]=a[b])}else p=a;return Ta(t),a=uo(e,t,n,p,u,i),b=fo(),e!==null&&!dt?(mo(e,t,i),zn(e,t,i)):(Me&&b&&Fi(t),t.flags|=1,Nt(e,t,a,i),t.child)}function jf(e,t,n,a,i){if(e===null){var u=n.type;return typeof u=="function"&&!qi(u)&&u.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=u,wf(e,t,u,a,i)):(e=Zs(n.type,null,a,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Uo(e,i)){var p=u.memoizedProps;if(n=n.compare,n=n!==null?n:Bl,n(p,a)&&e.ref===t.ref)return zn(e,t,i)}return t.flags|=1,e=An(u,a),e.ref=t.ref,e.return=t,t.child=e}function wf(e,t,n,a,i){if(e!==null){var u=e.memoizedProps;if(Bl(u,a)&&e.ref===t.ref)if(dt=!1,t.pendingProps=a=u,Uo(e,i))(e.flags&131072)!==0&&(dt=!0);else return t.lanes=e.lanes,zn(e,t,i)}return _o(e,t,n,a,i)}function Sf(e,t,n,a){var i=a.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|n:n,e!==null){for(a=t.child=e.child,i=0;a!==null;)i=i|a.lanes|a.childLanes,a=a.sibling;a=i&~u}else a=0,t.child=null;return Nf(e,t,u,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Vs(t,u!==null?u.cachePool:null),u!==null?kd(t,u):ro(),Ed(t);else return a=t.lanes=536870912,Nf(e,t,u!==null?u.baseLanes|n:n,n,a)}else u!==null?(Vs(t,u.cachePool),kd(t,u),na(),t.memoizedState=null):(e!==null&&Vs(t,null),ro(),na());return Nt(e,t,i,n),t.child}function Wl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Nf(e,t,n,a,i){var u=eo();return u=u===null?null:{parent:ct._currentValue,pool:u},t.memoizedState={baseLanes:n,cachePool:u},e!==null&&Vs(t,null),ro(),Ed(t),e!==null&&al(e,t,a,!0),t.childLanes=i,null}function ur(e,t){return t=fr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function kf(e,t,n){return _a(t,e.child,null,n),e=ur(t,t.pendingProps),e.flags|=2,Yt(t),t.memoizedState=null,e}function Gx(e,t,n){var a=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Me){if(a.mode==="hidden")return e=ur(t,a),t.lanes=536870912,Wl(null,e);if(oo(t),(e=We)?(e=Bm(e,en),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Vn!==null?{id:pn,overflow:hn}:null,retryLane:536870912,hydrationErrors:null},n=id(e),n.return=t,t.child=n,wt=t,We=null)):e=null,e===null)throw Kn(t);return t.lanes=536870912,null}return ur(t,a)}var u=e.memoizedState;if(u!==null){var p=u.dehydrated;if(oo(t),i)if(t.flags&256)t.flags&=-257,t=kf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(dt||al(e,t,n,!1),i=(n&e.childLanes)!==0,dt||i){if(a=Ke,a!==null&&(p=pu(a,n),p!==0&&p!==u.retryLane))throw u.retryLane=p,Sa(e,p),Ut(a,e,p),Ro;jr(),t=kf(e,t,n)}else e=u.treeContext,We=nn(p.nextSibling),wt=t,Me=!0,Jn=null,en=!1,e!==null&&ud(t,e),t=ur(t,a),t.flags|=4096;return t}return e=An(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function dr(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(c(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function _o(e,t,n,a,i){return Ta(t),n=uo(e,t,n,a,void 0,i),a=fo(),e!==null&&!dt?(mo(e,t,i),zn(e,t,i)):(Me&&a&&Fi(t),t.flags|=1,Nt(e,t,n,i),t.child)}function Ef(e,t,n,a,i,u){return Ta(t),t.updateQueue=null,n=Ad(t,a,n,i),Td(e),a=fo(),e!==null&&!dt?(mo(e,t,u),zn(e,t,u)):(Me&&a&&Fi(t),t.flags|=1,Nt(e,t,n,u),t.child)}function Tf(e,t,n,a,i){if(Ta(t),t.stateNode===null){var u=Pa,p=n.contextType;typeof p=="object"&&p!==null&&(u=St(p)),u=new n(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Ao,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},no(t),p=n.contextType,u.context=typeof p=="object"&&p!==null?St(p):Pa,u.state=t.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(To(t,n,p,a),u.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(p=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),p!==u.state&&Ao.enqueueReplaceState(u,u.state,null),Ql(t,a,u,i),Xl(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){u=t.stateNode;var b=t.memoizedProps,R=Ma(n,b);u.props=R;var G=u.context,F=n.contextType;p=Pa,typeof F=="object"&&F!==null&&(p=St(F));var K=n.getDerivedStateFromProps;F=typeof K=="function"||typeof u.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,F||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(b||G!==p)&&mf(t,u,a,p),Wn=!1;var q=t.memoizedState;u.state=q,Ql(t,a,u,i),Xl(),G=t.memoizedState,b||q!==G||Wn?(typeof K=="function"&&(To(t,n,K,a),G=t.memoizedState),(R=Wn||ff(t,n,R,a,q,G,p))?(F||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=G),u.props=a,u.state=G,u.context=p,a=R):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,ao(e,t),p=t.memoizedProps,F=Ma(n,p),u.props=F,K=t.pendingProps,q=u.context,G=n.contextType,R=Pa,typeof G=="object"&&G!==null&&(R=St(G)),b=n.getDerivedStateFromProps,(G=typeof b=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(p!==K||q!==R)&&mf(t,u,a,R),Wn=!1,q=t.memoizedState,u.state=q,Ql(t,a,u,i),Xl();var Y=t.memoizedState;p!==K||q!==Y||Wn||e!==null&&e.dependencies!==null&&Xs(e.dependencies)?(typeof b=="function"&&(To(t,n,b,a),Y=t.memoizedState),(F=Wn||ff(t,n,F,a,q,Y,R)||e!==null&&e.dependencies!==null&&Xs(e.dependencies))?(G||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,Y,R),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,Y,R)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||p===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=Y),u.props=a,u.state=Y,u.context=R,a=F):(typeof u.componentDidUpdate!="function"||p===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),a=!1)}return u=a,dr(e,t),a=(t.flags&128)!==0,u||a?(u=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&a?(t.child=_a(t,e.child,null,i),t.child=_a(t,null,n,i)):Nt(e,t,n,i),t.memoizedState=u.state,e=t.child):e=zn(e,t,i),e}function Af(e,t,n,a){return ka(),t.flags|=256,Nt(e,t,n,a),t.child}var Oo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Mo(e){return{baseLanes:e,cachePool:xd()}}function zo(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Ft),e}function Cf(e,t,n){var a=t.pendingProps,i=!1,u=(t.flags&128)!==0,p;if((p=u)||(p=e!==null&&e.memoizedState===null?!1:(st.current&2)!==0),p&&(i=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Me){if(i?ta(t):na(),(e=We)?(e=Bm(e,en),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Vn!==null?{id:pn,overflow:hn}:null,retryLane:536870912,hydrationErrors:null},n=id(e),n.return=t,t.child=n,wt=t,We=null)):e=null,e===null)throw Kn(t);return xc(e)?t.lanes=32:t.lanes=536870912,null}var b=a.children;return a=a.fallback,i?(na(),i=t.mode,b=fr({mode:"hidden",children:b},i),a=Na(a,i,n,null),b.return=t,a.return=t,b.sibling=a,t.child=b,a=t.child,a.memoizedState=Mo(n),a.childLanes=zo(e,p,n),t.memoizedState=Oo,Wl(null,a)):(ta(t),Do(t,b))}var R=e.memoizedState;if(R!==null&&(b=R.dehydrated,b!==null)){if(u)t.flags&256?(ta(t),t.flags&=-257,t=Lo(e,t,n)):t.memoizedState!==null?(na(),t.child=e.child,t.flags|=128,t=null):(na(),b=a.fallback,i=t.mode,a=fr({mode:"visible",children:a.children},i),b=Na(b,i,n,null),b.flags|=2,a.return=t,b.return=t,a.sibling=b,t.child=a,_a(t,e.child,null,n),a=t.child,a.memoizedState=Mo(n),a.childLanes=zo(e,p,n),t.memoizedState=Oo,t=Wl(null,a));else if(ta(t),xc(b)){if(p=b.nextSibling&&b.nextSibling.dataset,p)var G=p.dgst;p=G,a=Error(c(419)),a.stack="",a.digest=p,Hl({value:a,source:null,stack:null}),t=Lo(e,t,n)}else if(dt||al(e,t,n,!1),p=(n&e.childLanes)!==0,dt||p){if(p=Ke,p!==null&&(a=pu(p,n),a!==0&&a!==R.retryLane))throw R.retryLane=a,Sa(e,a),Ut(p,e,a),Ro;hc(b)||jr(),t=Lo(e,t,n)}else hc(b)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,We=nn(b.nextSibling),wt=t,Me=!0,Jn=null,en=!1,e!==null&&ud(t,e),t=Do(t,a.children),t.flags|=4096);return t}return i?(na(),b=a.fallback,i=t.mode,R=e.child,G=R.sibling,a=An(R,{mode:"hidden",children:a.children}),a.subtreeFlags=R.subtreeFlags&65011712,G!==null?b=An(G,b):(b=Na(b,i,n,null),b.flags|=2),b.return=t,a.return=t,a.sibling=b,t.child=a,Wl(null,a),a=t.child,b=e.child.memoizedState,b===null?b=Mo(n):(i=b.cachePool,i!==null?(R=ct._currentValue,i=i.parent!==R?{parent:R,pool:R}:i):i=xd(),b={baseLanes:b.baseLanes|n,cachePool:i}),a.memoizedState=b,a.childLanes=zo(e,p,n),t.memoizedState=Oo,Wl(e.child,a)):(ta(t),n=e.child,e=n.sibling,n=An(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=n,t.memoizedState=null,n)}function Do(e,t){return t=fr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function fr(e,t){return e=Gt(22,e,null,t),e.lanes=0,e}function Lo(e,t,n){return _a(t,e.child,null,n),e=Do(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Rf(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Ki(e.return,t,n)}function Bo(e,t,n,a,i,u){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:i,treeForkCount:u}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=a,p.tail=n,p.tailMode=i,p.treeForkCount=u)}function _f(e,t,n){var a=t.pendingProps,i=a.revealOrder,u=a.tail;a=a.children;var p=st.current,b=(p&2)!==0;if(b?(p=p&1|2,t.flags|=128):p&=1,D(st,p),Nt(e,t,a,n),a=Me?$l:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rf(e,n,t);else if(e.tag===19)Rf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&er(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Bo(t,!1,i,n,u,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&er(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Bo(t,!0,n,null,u,a);break;case"together":Bo(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function zn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),sa|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(al(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,n=An(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=An(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Uo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Xs(e)))}function qx(e,t,n){switch(t.tag){case 3:Oe(t,t.stateNode.containerInfo),In(t,ct,e.memoizedState.cache),ka();break;case 27:case 5:mt(t);break;case 4:Oe(t,t.stateNode.containerInfo);break;case 10:In(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oo(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ta(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Cf(e,t,n):(ta(t),e=zn(e,t,n),e!==null?e.sibling:null);ta(t);break;case 19:var i=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(al(e,t,n,!1),a=(n&t.childLanes)!==0),i){if(a)return _f(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),D(st,st.current),a)break;return null;case 22:return t.lanes=0,Sf(e,t,n,t.pendingProps);case 24:In(t,ct,e.memoizedState.cache)}return zn(e,t,n)}function Of(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)dt=!0;else{if(!Uo(e,n)&&(t.flags&128)===0)return dt=!1,qx(e,t,n);dt=(e.flags&131072)!==0}else dt=!1,Me&&(t.flags&1048576)!==0&&cd(t,$l,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Ca(t.elementType),t.type=e,typeof e=="function")qi(e)?(a=Ma(e,a),t.tag=1,t=Tf(null,t,e,a,n)):(t.tag=0,t=_o(null,t,e,a,n));else{if(e!=null){var i=e.$$typeof;if(i===z){t.tag=11,t=vf(null,t,e,a,n);break e}else if(i===Z){t.tag=14,t=jf(null,t,e,a,n);break e}}throw t=ne(e)||e,Error(c(306,t,""))}}return t;case 0:return _o(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,i=Ma(a,t.pendingProps),Tf(e,t,a,i,n);case 3:e:{if(Oe(t,t.stateNode.containerInfo),e===null)throw Error(c(387));a=t.pendingProps;var u=t.memoizedState;i=u.element,ao(e,t),Ql(t,a,null,n);var p=t.memoizedState;if(a=p.cache,In(t,ct,a),a!==u.cache&&Ii(t,[ct],n,!0),Xl(),a=p.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Af(e,t,a,n);break e}else if(a!==i){i=It(Error(c(424)),t),Hl(i),t=Af(e,t,a,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(We=nn(e.firstChild),wt=t,Me=!0,Jn=null,en=!0,n=wd(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(ka(),a===i){t=zn(e,t,n);break e}Nt(e,t,a,n)}t=t.child}return t;case 26:return dr(e,t),e===null?(n=Ym(t.type,null,t.pendingProps,null))?t.memoizedState=n:Me||(n=t.type,e=t.pendingProps,a=Ar(de.current).createElement(n),a[jt]=t,a[Ot]=e,kt(a,n,e),gt(a),t.stateNode=a):t.memoizedState=Ym(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return mt(t),e===null&&Me&&(a=t.stateNode=Hm(t.type,t.pendingProps,de.current),wt=t,en=!0,i=We,ua(t.type)?(gc=i,We=nn(a.firstChild)):We=i),Nt(e,t,t.pendingProps.children,n),dr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Me&&((i=a=We)&&(a=bg(a,t.type,t.pendingProps,en),a!==null?(t.stateNode=a,wt=t,We=nn(a.firstChild),en=!1,i=!0):i=!1),i||Kn(t)),mt(t),i=t.type,u=t.pendingProps,p=e!==null?e.memoizedProps:null,a=u.children,fc(i,u)?a=null:p!==null&&fc(i,p)&&(t.flags|=32),t.memoizedState!==null&&(i=uo(e,t,Mx,null,null,n),ms._currentValue=i),dr(e,t),Nt(e,t,a,n),t.child;case 6:return e===null&&Me&&((e=n=We)&&(n=yg(n,t.pendingProps,en),n!==null?(t.stateNode=n,wt=t,We=null,e=!0):e=!1),e||Kn(t)),null;case 13:return Cf(e,t,n);case 4:return Oe(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=_a(t,null,a,n):Nt(e,t,a,n),t.child;case 11:return vf(e,t,t.type,t.pendingProps,n);case 7:return Nt(e,t,t.pendingProps,n),t.child;case 8:return Nt(e,t,t.pendingProps.children,n),t.child;case 12:return Nt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,In(t,t.type,a.value),Nt(e,t,a.children,n),t.child;case 9:return i=t.type._context,a=t.pendingProps.children,Ta(t),i=St(i),a=a(i),t.flags|=1,Nt(e,t,a,n),t.child;case 14:return jf(e,t,t.type,t.pendingProps,n);case 15:return wf(e,t,t.type,t.pendingProps,n);case 19:return _f(e,t,n);case 31:return Gx(e,t,n);case 22:return Sf(e,t,n,t.pendingProps);case 24:return Ta(t),a=St(ct),e===null?(i=eo(),i===null&&(i=Ke,u=Wi(),i.pooledCache=u,u.refCount++,u!==null&&(i.pooledCacheLanes|=n),i=u),t.memoizedState={parent:a,cache:i},no(t),In(t,ct,i)):((e.lanes&n)!==0&&(ao(e,t),Ql(t,null,null,n),Xl()),i=e.memoizedState,u=t.memoizedState,i.parent!==a?(i={parent:a,cache:a},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),In(t,ct,a)):(a=u.cache,In(t,ct,a),a!==i.cache&&Ii(t,[ct],n,!0))),Nt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function Dn(e){e.flags|=4}function $o(e,t,n,a,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(sm())e.flags|=8192;else throw Ra=Ks,to}else e.flags&=-16777217}function Mf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Vm(t))if(sm())e.flags|=8192;else throw Ra=Ks,to}function mr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?du():536870912,e.lanes|=t,hl|=t)}function Pl(e,t){if(!Me)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,a|=i.subtreeFlags&65011712,a|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,a|=i.subtreeFlags,a|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function Yx(e,t,n){var a=t.pendingProps;switch(Xi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(t),null;case 1:return Pe(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),_n(ct),Te(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(nl(t)?Dn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Vi())),Pe(t),null;case 26:var i=t.type,u=t.memoizedState;return e===null?(Dn(t),u!==null?(Pe(t),Mf(t,u)):(Pe(t),$o(t,i,null,a,n))):u?u!==e.memoizedState?(Dn(t),Pe(t),Mf(t,u)):(Pe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Dn(t),Pe(t),$o(t,i,e,a,n)),null;case 27:if(it(t),n=de.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Dn(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return Pe(t),null}e=ee.current,nl(t)?dd(t):(e=Hm(i,a,n),t.stateNode=e,Dn(t))}return Pe(t),null;case 5:if(it(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Dn(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return Pe(t),null}if(u=ee.current,nl(t))dd(t);else{var p=Ar(de.current);switch(u){case 1:u=p.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:u=p.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":u=p.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":u=p.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":u=p.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?p.createElement("select",{is:a.is}):p.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?p.createElement(i,{is:a.is}):p.createElement(i)}}u[jt]=t,u[Ot]=a;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)u.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=u;e:switch(kt(u,i,a),i){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Dn(t)}}return Pe(t),$o(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Dn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(c(166));if(e=de.current,nl(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,i=wt,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[jt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Cm(e.nodeValue,n)),e||Kn(t,!0)}else e=Ar(e).createTextNode(a),e[jt]=t,t.stateNode=e}return Pe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=nl(t),n!==null){if(e===null){if(!a)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[jt]=t}else ka(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),e=!1}else n=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Yt(t),t):(Yt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Pe(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=nl(t),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(c(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(c(317));i[jt]=t}else ka(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),i=!1}else i=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Yt(t),t):(Yt(t),null)}return Yt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==i&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),mr(t,t.updateQueue),Pe(t),null);case 4:return Te(),e===null&&ic(t.stateNode.containerInfo),Pe(t),null;case 10:return _n(t.type),Pe(t),null;case 19:if(O(st),a=t.memoizedState,a===null)return Pe(t),null;if(i=(t.flags&128)!==0,u=a.rendering,u===null)if(i)Pl(a,!1);else{if(lt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=er(e),u!==null){for(t.flags|=128,Pl(a,!1),e=u.updateQueue,t.updateQueue=e,mr(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)rd(n,e),n=n.sibling;return D(st,st.current&1|2),Me&&Cn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&$()>br&&(t.flags|=128,i=!0,Pl(a,!1),t.lanes=4194304)}else{if(!i)if(e=er(u),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,mr(t,e),Pl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Me)return Pe(t),null}else 2*$()-a.renderingStartTime>br&&n!==536870912&&(t.flags|=128,i=!0,Pl(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=$(),e.sibling=null,n=st.current,D(st,i?n&1|2:n&1),Me&&Cn(t,a.treeForkCount),e):(Pe(t),null);case 22:case 23:return Yt(t),io(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),n=t.updateQueue,n!==null&&mr(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&O(Aa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),_n(ct),Pe(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Zx(e,t){switch(Xi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _n(ct),Te(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return it(t),null;case 31:if(t.memoizedState!==null){if(Yt(t),t.alternate===null)throw Error(c(340));ka()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Yt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));ka()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(st),null;case 4:return Te(),null;case 10:return _n(t.type),null;case 22:case 23:return Yt(t),io(),e!==null&&O(Aa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return _n(ct),null;case 25:return null;default:return null}}function zf(e,t){switch(Xi(t),t.tag){case 3:_n(ct),Te();break;case 26:case 27:case 5:it(t);break;case 4:Te();break;case 31:t.memoizedState!==null&&Yt(t);break;case 13:Yt(t);break;case 19:O(st);break;case 10:_n(t.type);break;case 22:case 23:Yt(t),io(),e!==null&&O(Aa);break;case 24:_n(ct)}}function es(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&e)===e){a=void 0;var u=n.create,p=n.inst;a=u(),p.destroy=a}n=n.next}while(n!==i)}}catch(b){Xe(t,t.return,b)}}function aa(e,t,n){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var u=i.next;a=u;do{if((a.tag&e)===e){var p=a.inst,b=p.destroy;if(b!==void 0){p.destroy=void 0,i=t;var R=n,G=b;try{G()}catch(F){Xe(i,R,F)}}}a=a.next}while(a!==u)}}catch(F){Xe(t,t.return,F)}}function Df(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Nd(t,n)}catch(a){Xe(e,e.return,a)}}}function Lf(e,t,n){n.props=Ma(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Xe(e,t,a)}}function ts(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(i){Xe(e,t,i)}}function xn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(i){Xe(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Xe(e,t,i)}else n.current=null}function Bf(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(i){Xe(e,e.return,i)}}function Ho(e,t,n){try{var a=e.stateNode;fg(a,e.type,n,t),a[Ot]=t}catch(i){Xe(e,e.return,i)}}function Uf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ua(e.type)||e.tag===4}function Go(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Uf(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&&ua(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 qo(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=En));else if(a!==4&&(a===27&&ua(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(qo(e,t,n),e=e.sibling;e!==null;)qo(e,t,n),e=e.sibling}function pr(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&ua(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(pr(e,t,n),e=e.sibling;e!==null;)pr(e,t,n),e=e.sibling}function $f(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);kt(t,a,n),t[jt]=e,t[Ot]=n}catch(u){Xe(e,e.return,u)}}var Ln=!1,ft=!1,Yo=!1,Hf=typeof WeakSet=="function"?WeakSet:Set,bt=null;function Fx(e,t){if(e=e.containerInfo,uc=Dr,e=Iu(e),Di(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var i=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var p=0,b=-1,R=-1,G=0,F=0,K=e,q=null;t:for(;;){for(var Y;K!==n||i!==0&&K.nodeType!==3||(b=p+i),K!==u||a!==0&&K.nodeType!==3||(R=p+a),K.nodeType===3&&(p+=K.nodeValue.length),(Y=K.firstChild)!==null;)q=K,K=Y;for(;;){if(K===e)break t;if(q===n&&++G===i&&(b=p),q===u&&++F===a&&(R=p),(Y=K.nextSibling)!==null)break;K=q,q=K.parentNode}K=Y}n=b===-1||R===-1?null:{start:b,end:R}}else n=null}n=n||{start:0,end:0}}else n=null;for(dc={focusedElem:e,selectionRange:n},Dr=!1,bt=t;bt!==null;)if(t=bt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,bt=e;else for(;bt!==null;){switch(t=bt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,n=t,i=u.memoizedProps,u=u.memoizedState,a=n.stateNode;try{var fe=Ma(n.type,i);e=a.getSnapshotBeforeUpdate(fe,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(ge){Xe(n,n.return,ge)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)pc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":pc(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(c(163))}if(e=t.sibling,e!==null){e.return=t.return,bt=e;break}bt=t.return}}function Gf(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Un(e,n),a&4&&es(5,n);break;case 1:if(Un(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(p){Xe(n,n.return,p)}else{var i=Ma(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){Xe(n,n.return,p)}}a&64&&Df(n),a&512&&ts(n,n.return);break;case 3:if(Un(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Nd(e,t)}catch(p){Xe(n,n.return,p)}}break;case 27:t===null&&a&4&&$f(n);case 26:case 5:Un(e,n),t===null&&a&4&&Bf(n),a&512&&ts(n,n.return);break;case 12:Un(e,n);break;case 31:Un(e,n),a&4&&Zf(e,n);break;case 13:Un(e,n),a&4&&Ff(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=eg.bind(null,n),vg(e,n))));break;case 22:if(a=n.memoizedState!==null||Ln,!a){t=t!==null&&t.memoizedState!==null||ft,i=Ln;var u=ft;Ln=a,(ft=t)&&!u?$n(e,n,(n.subtreeFlags&8772)!==0):Un(e,n),Ln=i,ft=u}break;case 30:break;default:Un(e,n)}}function qf(e){var t=e.alternate;t!==null&&(e.alternate=null,qf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bi(t)),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 et=null,zt=!1;function Bn(e,t,n){for(n=n.child;n!==null;)Yf(e,t,n),n=n.sibling}function Yf(e,t,n){if(Ye&&typeof Ye.onCommitFiberUnmount=="function")try{Ye.onCommitFiberUnmount(be,n)}catch{}switch(n.tag){case 26:ft||xn(n,t),Bn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ft||xn(n,t);var a=et,i=zt;ua(n.type)&&(et=n.stateNode,zt=!1),Bn(e,t,n),us(n.stateNode),et=a,zt=i;break;case 5:ft||xn(n,t);case 6:if(a=et,i=zt,et=null,Bn(e,t,n),et=a,zt=i,et!==null)if(zt)try{(et.nodeType===9?et.body:et.nodeName==="HTML"?et.ownerDocument.body:et).removeChild(n.stateNode)}catch(u){Xe(n,t,u)}else try{et.removeChild(n.stateNode)}catch(u){Xe(n,t,u)}break;case 18:et!==null&&(zt?(e=et,Dm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Sl(e)):Dm(et,n.stateNode));break;case 4:a=et,i=zt,et=n.stateNode.containerInfo,zt=!0,Bn(e,t,n),et=a,zt=i;break;case 0:case 11:case 14:case 15:aa(2,n,t),ft||aa(4,n,t),Bn(e,t,n);break;case 1:ft||(xn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Lf(n,t,a)),Bn(e,t,n);break;case 21:Bn(e,t,n);break;case 22:ft=(a=ft)||n.memoizedState!==null,Bn(e,t,n),ft=a;break;default:Bn(e,t,n)}}function Zf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Sl(e)}catch(n){Xe(t,t.return,n)}}}function Ff(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Sl(e)}catch(n){Xe(t,t.return,n)}}function Xx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Hf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Hf),t;default:throw Error(c(435,e.tag))}}function hr(e,t){var n=Xx(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var i=tg.bind(null,e,a);a.then(i,i)}})}function Dt(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var i=n[a],u=e,p=t,b=p;e:for(;b!==null;){switch(b.tag){case 27:if(ua(b.type)){et=b.stateNode,zt=!1;break e}break;case 5:et=b.stateNode,zt=!1;break e;case 3:case 4:et=b.stateNode.containerInfo,zt=!0;break e}b=b.return}if(et===null)throw Error(c(160));Yf(u,p,i),et=null,zt=!1,u=i.alternate,u!==null&&(u.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Xf(t,e),t=t.sibling}var on=null;function Xf(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Dt(t,e),Lt(e),a&4&&(aa(3,e,e.return),es(3,e),aa(5,e,e.return));break;case 1:Dt(t,e),Lt(e),a&512&&(ft||n===null||xn(n,n.return)),a&64&&Ln&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var i=on;if(Dt(t,e),Lt(e),a&512&&(ft||n===null||xn(n,n.return)),a&4){var u=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(a){case"title":u=i.getElementsByTagName("title")[0],(!u||u[Al]||u[jt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=i.createElement(a),i.head.insertBefore(u,i.querySelector("head > title"))),kt(u,a,n),u[jt]=e,gt(u),a=u;break e;case"link":var p=Xm("link","href",i).get(a+(n.href||""));if(p){for(var b=0;b<p.length;b++)if(u=p[b],u.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&u.getAttribute("rel")===(n.rel==null?null:n.rel)&&u.getAttribute("title")===(n.title==null?null:n.title)&&u.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){p.splice(b,1);break t}}u=i.createElement(a),kt(u,a,n),i.head.appendChild(u);break;case"meta":if(p=Xm("meta","content",i).get(a+(n.content||""))){for(b=0;b<p.length;b++)if(u=p[b],u.getAttribute("content")===(n.content==null?null:""+n.content)&&u.getAttribute("name")===(n.name==null?null:n.name)&&u.getAttribute("property")===(n.property==null?null:n.property)&&u.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&u.getAttribute("charset")===(n.charSet==null?null:n.charSet)){p.splice(b,1);break t}}u=i.createElement(a),kt(u,a,n),i.head.appendChild(u);break;default:throw Error(c(468,a))}u[jt]=e,gt(u),a=u}e.stateNode=a}else Qm(i,e.type,e.stateNode);else e.stateNode=Fm(i,a,e.memoizedProps);else u!==a?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,a===null?Qm(i,e.type,e.stateNode):Fm(i,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Ho(e,e.memoizedProps,n.memoizedProps)}break;case 27:Dt(t,e),Lt(e),a&512&&(ft||n===null||xn(n,n.return)),n!==null&&a&4&&Ho(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Dt(t,e),Lt(e),a&512&&(ft||n===null||xn(n,n.return)),e.flags&32){i=e.stateNode;try{Xa(i,"")}catch(fe){Xe(e,e.return,fe)}}a&4&&e.stateNode!=null&&(i=e.memoizedProps,Ho(e,i,n!==null?n.memoizedProps:i)),a&1024&&(Yo=!0);break;case 6:if(Dt(t,e),Lt(e),a&4){if(e.stateNode===null)throw Error(c(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(fe){Xe(e,e.return,fe)}}break;case 3:if(_r=null,i=on,on=Cr(t.containerInfo),Dt(t,e),on=i,Lt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Sl(t.containerInfo)}catch(fe){Xe(e,e.return,fe)}Yo&&(Yo=!1,Qf(e));break;case 4:a=on,on=Cr(e.stateNode.containerInfo),Dt(t,e),Lt(e),on=a;break;case 12:Dt(t,e),Lt(e);break;case 31:Dt(t,e),Lt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,hr(e,a)));break;case 13:Dt(t,e),Lt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(gr=$()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,hr(e,a)));break;case 22:i=e.memoizedState!==null;var R=n!==null&&n.memoizedState!==null,G=Ln,F=ft;if(Ln=G||i,ft=F||R,Dt(t,e),ft=F,Ln=G,Lt(e),a&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||R||Ln||ft||za(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){R=n=t;try{if(u=R.stateNode,i)p=u.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{b=R.stateNode;var K=R.memoizedProps.style,q=K!=null&&K.hasOwnProperty("display")?K.display:null;b.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(fe){Xe(R,R.return,fe)}}}else if(t.tag===6){if(n===null){R=t;try{R.stateNode.nodeValue=i?"":R.memoizedProps}catch(fe){Xe(R,R.return,fe)}}}else if(t.tag===18){if(n===null){R=t;try{var Y=R.stateNode;i?Lm(Y,!0):Lm(R.stateNode,!1)}catch(fe){Xe(R,R.return,fe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,hr(e,n))));break;case 19:Dt(t,e),Lt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,hr(e,a)));break;case 30:break;case 21:break;default:Dt(t,e),Lt(e)}}function Lt(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Uf(a)){n=a;break}a=a.return}if(n==null)throw Error(c(160));switch(n.tag){case 27:var i=n.stateNode,u=Go(e);pr(e,u,i);break;case 5:var p=n.stateNode;n.flags&32&&(Xa(p,""),n.flags&=-33);var b=Go(e);pr(e,b,p);break;case 3:case 4:var R=n.stateNode.containerInfo,G=Go(e);qo(e,G,R);break;default:throw Error(c(161))}}catch(F){Xe(e,e.return,F)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Qf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Qf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Un(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Gf(e,t.alternate,t),t=t.sibling}function za(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:aa(4,t,t.return),za(t);break;case 1:xn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Lf(t,t.return,n),za(t);break;case 27:us(t.stateNode);case 26:case 5:xn(t,t.return),za(t);break;case 22:t.memoizedState===null&&za(t);break;case 30:za(t);break;default:za(t)}e=e.sibling}}function $n(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,i=e,u=t,p=u.flags;switch(u.tag){case 0:case 11:case 15:$n(i,u,n),es(4,u);break;case 1:if($n(i,u,n),a=u,i=a.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(G){Xe(a,a.return,G)}if(a=u,i=a.updateQueue,i!==null){var b=a.stateNode;try{var R=i.shared.hiddenCallbacks;if(R!==null)for(i.shared.hiddenCallbacks=null,i=0;i<R.length;i++)Sd(R[i],b)}catch(G){Xe(a,a.return,G)}}n&&p&64&&Df(u),ts(u,u.return);break;case 27:$f(u);case 26:case 5:$n(i,u,n),n&&a===null&&p&4&&Bf(u),ts(u,u.return);break;case 12:$n(i,u,n);break;case 31:$n(i,u,n),n&&p&4&&Zf(i,u);break;case 13:$n(i,u,n),n&&p&4&&Ff(i,u);break;case 22:u.memoizedState===null&&$n(i,u,n),ts(u,u.return);break;case 30:break;default:$n(i,u,n)}t=t.sibling}}function Zo(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Gl(n))}function Fo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Gl(e))}function cn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Vf(e,t,n,a),t=t.sibling}function Vf(e,t,n,a){var i=t.flags;switch(t.tag){case 0:case 11:case 15:cn(e,t,n,a),i&2048&&es(9,t);break;case 1:cn(e,t,n,a);break;case 3:cn(e,t,n,a),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Gl(e)));break;case 12:if(i&2048){cn(e,t,n,a),e=t.stateNode;try{var u=t.memoizedProps,p=u.id,b=u.onPostCommit;typeof b=="function"&&b(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){Xe(t,t.return,R)}}else cn(e,t,n,a);break;case 31:cn(e,t,n,a);break;case 13:cn(e,t,n,a);break;case 23:break;case 22:u=t.stateNode,p=t.alternate,t.memoizedState!==null?u._visibility&2?cn(e,t,n,a):ns(e,t):u._visibility&2?cn(e,t,n,a):(u._visibility|=2,fl(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),i&2048&&Zo(p,t);break;case 24:cn(e,t,n,a),i&2048&&Fo(t.alternate,t);break;default:cn(e,t,n,a)}}function fl(e,t,n,a,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,p=t,b=n,R=a,G=p.flags;switch(p.tag){case 0:case 11:case 15:fl(u,p,b,R,i),es(8,p);break;case 23:break;case 22:var F=p.stateNode;p.memoizedState!==null?F._visibility&2?fl(u,p,b,R,i):ns(u,p):(F._visibility|=2,fl(u,p,b,R,i)),i&&G&2048&&Zo(p.alternate,p);break;case 24:fl(u,p,b,R,i),i&&G&2048&&Fo(p.alternate,p);break;default:fl(u,p,b,R,i)}t=t.sibling}}function ns(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,i=a.flags;switch(a.tag){case 22:ns(n,a),i&2048&&Zo(a.alternate,a);break;case 24:ns(n,a),i&2048&&Fo(a.alternate,a);break;default:ns(n,a)}t=t.sibling}}var as=8192;function ml(e,t,n){if(e.subtreeFlags&as)for(e=e.child;e!==null;)Jf(e,t,n),e=e.sibling}function Jf(e,t,n){switch(e.tag){case 26:ml(e,t,n),e.flags&as&&e.memoizedState!==null&&Og(n,on,e.memoizedState,e.memoizedProps);break;case 5:ml(e,t,n);break;case 3:case 4:var a=on;on=Cr(e.stateNode.containerInfo),ml(e,t,n),on=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=as,as=16777216,ml(e,t,n),as=a):ml(e,t,n));break;default:ml(e,t,n)}}function Kf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ls(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];bt=a,Wf(a,e)}Kf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)If(e),e=e.sibling}function If(e){switch(e.tag){case 0:case 11:case 15:ls(e),e.flags&2048&&aa(9,e,e.return);break;case 3:ls(e);break;case 12:ls(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,xr(e)):ls(e);break;default:ls(e)}}function xr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];bt=a,Wf(a,e)}Kf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:aa(8,t,t.return),xr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,xr(t));break;default:xr(t)}e=e.sibling}}function Wf(e,t){for(;bt!==null;){var n=bt;switch(n.tag){case 0:case 11:case 15:aa(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Gl(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,bt=a;else e:for(n=e;bt!==null;){a=bt;var i=a.sibling,u=a.return;if(qf(a),a===n){bt=null;break e}if(i!==null){i.return=u,bt=i;break e}bt=u}}}var Qx={getCacheForType:function(e){var t=St(ct),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return St(ct).controller.signal}},Vx=typeof WeakMap=="function"?WeakMap:Map,He=0,Ke=null,Ae=null,Re=0,Fe=0,Zt=null,la=!1,pl=!1,Xo=!1,Hn=0,lt=0,sa=0,Da=0,Qo=0,Ft=0,hl=0,ss=null,Bt=null,Vo=!1,gr=0,Pf=0,br=1/0,yr=null,ra=null,ht=0,ia=null,xl=null,Gn=0,Jo=0,Ko=null,em=null,rs=0,Io=null;function Xt(){return(He&2)!==0&&Re!==0?Re&-Re:B.T!==null?ac():hu()}function tm(){if(Ft===0)if((Re&536870912)===0||Me){var e=Zn;Zn<<=1,(Zn&3932160)===0&&(Zn=262144),Ft=e}else Ft=536870912;return e=qt.current,e!==null&&(e.flags|=32),Ft}function Ut(e,t,n){(e===Ke&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)&&(gl(e,0),oa(e,Re,Ft,!1)),Tl(e,n),((He&2)===0||e!==Ke)&&(e===Ke&&((He&2)===0&&(Da|=n),lt===4&&oa(e,Re,Ft,!1)),gn(e))}function nm(e,t,n){if((He&6)!==0)throw Error(c(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Fn(e,t),i=a?Ix(e,t):Po(e,t,!0),u=a;do{if(i===0){pl&&!a&&oa(e,t,0,!1);break}else{if(n=e.current.alternate,u&&!Jx(n)){i=Po(e,t,!1),u=!1;continue}if(i===2){if(u=t,e.errorRecoveryDisabledLanes&u)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var b=e;i=ss;var R=b.current.memoizedState.isDehydrated;if(R&&(gl(b,p).flags|=256),p=Po(b,p,!1),p!==2){if(Xo&&!R){b.errorRecoveryDisabledLanes|=u,Da|=u,i=4;break e}u=Bt,Bt=i,u!==null&&(Bt===null?Bt=u:Bt.push.apply(Bt,u))}i=p}if(u=!1,i!==2)continue}}if(i===1){gl(e,0),oa(e,t,0,!0);break}e:{switch(a=e,u=i,u){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:oa(a,t,Ft,!la);break e;case 2:Bt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(i=gr+300-$(),10<i)){if(oa(a,t,Ft,!la),ba(a,0,!0)!==0)break e;Gn=t,a.timeoutHandle=Mm(am.bind(null,a,n,Bt,yr,Vo,t,Ft,Da,hl,la,u,"Throttled",-0,0),i);break e}am(a,n,Bt,yr,Vo,t,Ft,Da,hl,la,u,null,-0,0)}}break}while(!0);gn(e)}function am(e,t,n,a,i,u,p,b,R,G,F,K,q,Y){if(e.timeoutHandle=-1,K=t.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:En},Jf(t,u,K);var fe=(u&62914560)===u?gr-$():(u&4194048)===u?Pf-$():0;if(fe=Mg(K,fe),fe!==null){Gn=u,e.cancelPendingCommit=fe(dm.bind(null,e,t,u,n,a,i,p,b,R,F,K,null,q,Y)),oa(e,u,p,!G);return}}dm(e,t,u,n,a,i,p,b,R)}function Jx(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var i=n[a],u=i.getSnapshot;i=i.value;try{if(!Ht(u(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function oa(e,t,n,a){t&=~Qo,t&=~Da,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var i=t;0<i;){var u=31-Ge(i),p=1<<u;a[u]=-1,i&=~p}n!==0&&fu(e,n,t)}function vr(){return(He&6)===0?(is(0),!1):!0}function Wo(){if(Ae!==null){if(Fe===0)var e=Ae.return;else e=Ae,Rn=Ea=null,po(e),il=null,Yl=0,e=Ae;for(;e!==null;)zf(e.alternate,e),e=e.return;Ae=null}}function gl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,hg(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Gn=0,Wo(),Ke=e,Ae=n=An(e.current,null),Re=t,Fe=0,Zt=null,la=!1,pl=Fn(e,t),Xo=!1,hl=Ft=Qo=Da=sa=lt=0,Bt=ss=null,Vo=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var i=31-Ge(a),u=1<<i;t|=e[i],a&=~u}return Hn=t,Gs(),n}function lm(e,t){Se=null,B.H=Il,t===rl||t===Js?(t=yd(),Fe=3):t===to?(t=yd(),Fe=4):Fe=t===Ro?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Zt=t,Ae===null&&(lt=1,cr(e,It(t,e.current)))}function sm(){var e=qt.current;return e===null?!0:(Re&4194048)===Re?tn===null:(Re&62914560)===Re||(Re&536870912)!==0?e===tn:!1}function rm(){var e=B.H;return B.H=Il,e===null?Il:e}function im(){var e=B.A;return B.A=Qx,e}function jr(){lt=4,la||(Re&4194048)!==Re&&qt.current!==null||(pl=!0),(sa&134217727)===0&&(Da&134217727)===0||Ke===null||oa(Ke,Re,Ft,!1)}function Po(e,t,n){var a=He;He|=2;var i=rm(),u=im();(Ke!==e||Re!==t)&&(yr=null,gl(e,t)),t=!1;var p=lt;e:do try{if(Fe!==0&&Ae!==null){var b=Ae,R=Zt;switch(Fe){case 8:Wo(),p=6;break e;case 3:case 2:case 9:case 6:qt.current===null&&(t=!0);var G=Fe;if(Fe=0,Zt=null,bl(e,b,R,G),n&&pl){p=0;break e}break;default:G=Fe,Fe=0,Zt=null,bl(e,b,R,G)}}Kx(),p=lt;break}catch(F){lm(e,F)}while(!0);return t&&e.shellSuspendCounter++,Rn=Ea=null,He=a,B.H=i,B.A=u,Ae===null&&(Ke=null,Re=0,Gs()),p}function Kx(){for(;Ae!==null;)om(Ae)}function Ix(e,t){var n=He;He|=2;var a=rm(),i=im();Ke!==e||Re!==t?(yr=null,br=$()+500,gl(e,t)):pl=Fn(e,t);e:do try{if(Fe!==0&&Ae!==null){t=Ae;var u=Zt;t:switch(Fe){case 1:Fe=0,Zt=null,bl(e,t,u,1);break;case 2:case 9:if(gd(u)){Fe=0,Zt=null,cm(t);break}t=function(){Fe!==2&&Fe!==9||Ke!==e||(Fe=7),gn(e)},u.then(t,t);break e;case 3:Fe=7;break e;case 4:Fe=5;break e;case 7:gd(u)?(Fe=0,Zt=null,cm(t)):(Fe=0,Zt=null,bl(e,t,u,7));break;case 5:var p=null;switch(Ae.tag){case 26:p=Ae.memoizedState;case 5:case 27:var b=Ae;if(p?Vm(p):b.stateNode.complete){Fe=0,Zt=null;var R=b.sibling;if(R!==null)Ae=R;else{var G=b.return;G!==null?(Ae=G,wr(G)):Ae=null}break t}}Fe=0,Zt=null,bl(e,t,u,5);break;case 6:Fe=0,Zt=null,bl(e,t,u,6);break;case 8:Wo(),lt=6;break e;default:throw Error(c(462))}}Wx();break}catch(F){lm(e,F)}while(!0);return Rn=Ea=null,B.H=a,B.A=i,He=n,Ae!==null?0:(Ke=null,Re=0,Gs(),lt)}function Wx(){for(;Ae!==null&&!Sn();)om(Ae)}function om(e){var t=Of(e.alternate,e,Hn);e.memoizedProps=e.pendingProps,t===null?wr(e):Ae=t}function cm(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Ef(n,t,t.pendingProps,t.type,void 0,Re);break;case 11:t=Ef(n,t,t.pendingProps,t.type.render,t.ref,Re);break;case 5:po(t);default:zf(n,t),t=Ae=rd(t,Hn),t=Of(n,t,Hn)}e.memoizedProps=e.pendingProps,t===null?wr(e):Ae=t}function bl(e,t,n,a){Rn=Ea=null,po(t),il=null,Yl=0;var i=t.return;try{if(Hx(e,i,t,n,Re)){lt=1,cr(e,It(n,e.current)),Ae=null;return}}catch(u){if(i!==null)throw Ae=i,u;lt=1,cr(e,It(n,e.current)),Ae=null;return}t.flags&32768?(Me||a===1?e=!0:pl||(Re&536870912)!==0?e=!1:(la=e=!0,(a===2||a===9||a===3||a===6)&&(a=qt.current,a!==null&&a.tag===13&&(a.flags|=16384))),um(t,e)):wr(t)}function wr(e){var t=e;do{if((t.flags&32768)!==0){um(t,la);return}e=t.return;var n=Yx(t.alternate,t,Hn);if(n!==null){Ae=n;return}if(t=t.sibling,t!==null){Ae=t;return}Ae=t=e}while(t!==null);lt===0&&(lt=5)}function um(e,t){do{var n=Zx(e.alternate,e);if(n!==null){n.flags&=32767,Ae=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ae=e;return}Ae=e=n}while(e!==null);lt=6,Ae=null}function dm(e,t,n,a,i,u,p,b,R){e.cancelPendingCommit=null;do Sr();while(ht!==0);if((He&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(u=t.lanes|t.childLanes,u|=Hi,_h(e,n,u,p,b,R),e===Ke&&(Ae=Ke=null,Re=0),xl=t,ia=e,Gn=n,Jo=u,Ko=i,em=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ng(ve,function(){return xm(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=B.T,B.T=null,i=W.p,W.p=2,p=He,He|=4;try{Fx(e,t,n)}finally{He=p,W.p=i,B.T=a}}ht=1,fm(),mm(),pm()}}function fm(){if(ht===1){ht=0;var e=ia,t=xl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=B.T,B.T=null;var a=W.p;W.p=2;var i=He;He|=4;try{Xf(t,e);var u=dc,p=Iu(e.containerInfo),b=u.focusedElem,R=u.selectionRange;if(p!==b&&b&&b.ownerDocument&&Ku(b.ownerDocument.documentElement,b)){if(R!==null&&Di(b)){var G=R.start,F=R.end;if(F===void 0&&(F=G),"selectionStart"in b)b.selectionStart=G,b.selectionEnd=Math.min(F,b.value.length);else{var K=b.ownerDocument||document,q=K&&K.defaultView||window;if(q.getSelection){var Y=q.getSelection(),fe=b.textContent.length,ge=Math.min(R.start,fe),Je=R.end===void 0?ge:Math.min(R.end,fe);!Y.extend&&ge>Je&&(p=Je,Je=ge,ge=p);var L=Ju(b,ge),M=Ju(b,Je);if(L&&M&&(Y.rangeCount!==1||Y.anchorNode!==L.node||Y.anchorOffset!==L.offset||Y.focusNode!==M.node||Y.focusOffset!==M.offset)){var H=K.createRange();H.setStart(L.node,L.offset),Y.removeAllRanges(),ge>Je?(Y.addRange(H),Y.extend(M.node,M.offset)):(H.setEnd(M.node,M.offset),Y.addRange(H))}}}}for(K=[],Y=b;Y=Y.parentNode;)Y.nodeType===1&&K.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<K.length;b++){var Q=K[b];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}Dr=!!uc,dc=uc=null}finally{He=i,W.p=a,B.T=n}}e.current=t,ht=2}}function mm(){if(ht===2){ht=0;var e=ia,t=xl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=B.T,B.T=null;var a=W.p;W.p=2;var i=He;He|=4;try{Gf(e,t.alternate,t)}finally{He=i,W.p=a,B.T=n}}ht=3}}function pm(){if(ht===4||ht===3){ht=0,Yn();var e=ia,t=xl,n=Gn,a=em;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ht=5:(ht=0,xl=ia=null,hm(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ra=null),xi(n),t=t.stateNode,Ye&&typeof Ye.onCommitFiberRoot=="function")try{Ye.onCommitFiberRoot(be,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=B.T,i=W.p,W.p=2,B.T=null;try{for(var u=e.onRecoverableError,p=0;p<a.length;p++){var b=a[p];u(b.value,{componentStack:b.stack})}}finally{B.T=t,W.p=i}}(Gn&3)!==0&&Sr(),gn(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===Io?rs++:(rs=0,Io=e):rs=0,is(0)}}function hm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Gl(t)))}function Sr(){return fm(),mm(),pm(),xm()}function xm(){if(ht!==5)return!1;var e=ia,t=Jo;Jo=0;var n=xi(Gn),a=B.T,i=W.p;try{W.p=32>n?32:n,B.T=null,n=Ko,Ko=null;var u=ia,p=Gn;if(ht=0,xl=ia=null,Gn=0,(He&6)!==0)throw Error(c(331));var b=He;if(He|=4,If(u.current),Vf(u,u.current,p,n),He=b,is(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot=="function")try{Ye.onPostCommitFiberRoot(be,u)}catch{}return!0}finally{W.p=i,B.T=a,hm(e,t)}}function gm(e,t,n){t=It(n,t),t=Co(e.stateNode,t,2),e=ea(e,t,2),e!==null&&(Tl(e,2),gn(e))}function Xe(e,t,n){if(e.tag===3)gm(e,e,n);else for(;t!==null;){if(t.tag===3){gm(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ra===null||!ra.has(a))){e=It(n,e),n=bf(2),a=ea(t,n,2),a!==null&&(yf(n,a,t,e),Tl(a,2),gn(a));break}}t=t.return}}function ec(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new Vx;var i=new Set;a.set(t,i)}else i=a.get(t),i===void 0&&(i=new Set,a.set(t,i));i.has(n)||(Xo=!0,i.add(n),e=Px.bind(null,e,t,n),t.then(e,e))}function Px(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ke===e&&(Re&n)===n&&(lt===4||lt===3&&(Re&62914560)===Re&&300>$()-gr?(He&2)===0&&gl(e,0):Qo|=n,hl===Re&&(hl=0)),gn(e)}function bm(e,t){t===0&&(t=du()),e=Sa(e,t),e!==null&&(Tl(e,t),gn(e))}function eg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),bm(e,n)}function tg(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(c(314))}a!==null&&a.delete(t),bm(e,n)}function ng(e,t){return fn(e,t)}var Nr=null,yl=null,tc=!1,kr=!1,nc=!1,ca=0;function gn(e){e!==yl&&e.next===null&&(yl===null?Nr=yl=e:yl=yl.next=e),kr=!0,tc||(tc=!0,lg())}function is(e,t){if(!nc&&kr){nc=!0;do for(var n=!1,a=Nr;a!==null;){if(e!==0){var i=a.pendingLanes;if(i===0)var u=0;else{var p=a.suspendedLanes,b=a.pingedLanes;u=(1<<31-Ge(42|e)+1)-1,u&=i&~(p&~b),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,wm(a,u))}else u=Re,u=ba(a,a===Ke?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Fn(a,u)||(n=!0,wm(a,u));a=a.next}while(n);nc=!1}}function ag(){ym()}function ym(){kr=tc=!1;var e=0;ca!==0&&pg()&&(e=ca);for(var t=$(),n=null,a=Nr;a!==null;){var i=a.next,u=vm(a,t);u===0?(a.next=null,n===null?Nr=i:n.next=i,i===null&&(yl=n)):(n=a,(e!==0||(u&3)!==0)&&(kr=!0)),a=i}ht!==0&&ht!==5||is(e),ca!==0&&(ca=0)}function vm(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,i=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var p=31-Ge(u),b=1<<p,R=i[p];R===-1?((b&n)===0||(b&a)!==0)&&(i[p]=Cs(b,t)):R<=t&&(e.expiredLanes|=b),u&=~b}if(t=Ke,n=Re,n=ba(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&ln(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Fn(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&ln(a),xi(n)){case 2:case 8:n=Ee;break;case 32:n=ve;break;case 268435456:n=tt;break;default:n=ve}return a=jm.bind(null,e),n=fn(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&ln(a),e.callbackPriority=2,e.callbackNode=null,2}function jm(e,t){if(ht!==0&&ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Sr()&&e.callbackNode!==n)return null;var a=Re;return a=ba(e,e===Ke?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(nm(e,a,t),vm(e,$()),e.callbackNode!=null&&e.callbackNode===n?jm.bind(null,e):null)}function wm(e,t){if(Sr())return null;nm(e,t,!0)}function lg(){xg(function(){(He&6)!==0?fn(De,ag):ym()})}function ac(){if(ca===0){var e=ll;e===0&&(e=sn,sn<<=1,(sn&261888)===0&&(sn=256)),ca=e}return ca}function Sm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ms(""+e)}function Nm(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function sg(e,t,n,a,i){if(t==="submit"&&n&&n.stateNode===i){var u=Sm((i[Ot]||null).action),p=a.submitter;p&&(t=(t=p[Ot]||null)?Sm(t.formAction):p.getAttribute("formAction"),t!==null&&(u=t,p=null));var b=new Bs("action","action",null,a,i);e.push({event:b,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(ca!==0){var R=p?Nm(i,p):new FormData(i);So(n,{pending:!0,data:R,method:i.method,action:u},null,R)}}else typeof u=="function"&&(b.preventDefault(),R=p?Nm(i,p):new FormData(i),So(n,{pending:!0,data:R,method:i.method,action:u},u,R))},currentTarget:i}]})}}for(var lc=0;lc<$i.length;lc++){var sc=$i[lc],rg=sc.toLowerCase(),ig=sc[0].toUpperCase()+sc.slice(1);rn(rg,"on"+ig)}rn(ed,"onAnimationEnd"),rn(td,"onAnimationIteration"),rn(nd,"onAnimationStart"),rn("dblclick","onDoubleClick"),rn("focusin","onFocus"),rn("focusout","onBlur"),rn(Sx,"onTransitionRun"),rn(Nx,"onTransitionStart"),rn(kx,"onTransitionCancel"),rn(ad,"onTransitionEnd"),Za("onMouseEnter",["mouseout","mouseover"]),Za("onMouseLeave",["mouseout","mouseover"]),Za("onPointerEnter",["pointerout","pointerover"]),Za("onPointerLeave",["pointerout","pointerover"]),ya("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ya("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ya("onBeforeInput",["compositionend","keypress","textInput","paste"]),ya("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ya("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ya("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var os="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(" "),og=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(os));function km(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],i=a.event;a=a.listeners;e:{var u=void 0;if(t)for(var p=a.length-1;0<=p;p--){var b=a[p],R=b.instance,G=b.currentTarget;if(b=b.listener,R!==u&&i.isPropagationStopped())break e;u=b,i.currentTarget=G;try{u(i)}catch(F){Hs(F)}i.currentTarget=null,u=R}else for(p=0;p<a.length;p++){if(b=a[p],R=b.instance,G=b.currentTarget,b=b.listener,R!==u&&i.isPropagationStopped())break e;u=b,i.currentTarget=G;try{u(i)}catch(F){Hs(F)}i.currentTarget=null,u=R}}}}function Ce(e,t){var n=t[gi];n===void 0&&(n=t[gi]=new Set);var a=e+"__bubble";n.has(a)||(Em(t,e,2,!1),n.add(a))}function rc(e,t,n){var a=0;t&&(a|=4),Em(n,e,a,t)}var Er="_reactListening"+Math.random().toString(36).slice(2);function ic(e){if(!e[Er]){e[Er]=!0,bu.forEach(function(n){n!=="selectionchange"&&(og.has(n)||rc(n,!1,e),rc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Er]||(t[Er]=!0,rc("selectionchange",!1,t))}}function Em(e,t,n,a){switch(tp(t)){case 2:var i=Lg;break;case 8:i=Bg;break;default:i=wc}n=i.bind(null,t,n,e),i=void 0,!Ei||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),a?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function oc(e,t,n,a,i){var u=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var p=a.tag;if(p===3||p===4){var b=a.stateNode.containerInfo;if(b===i)break;if(p===4)for(p=a.return;p!==null;){var R=p.tag;if((R===3||R===4)&&p.stateNode.containerInfo===i)return;p=p.return}for(;b!==null;){if(p=Ga(b),p===null)return;if(R=p.tag,R===5||R===6||R===26||R===27){a=u=p;continue e}b=b.parentNode}}a=a.return}Ru(function(){var G=u,F=Ni(n),K=[];e:{var q=ld.get(e);if(q!==void 0){var Y=Bs,fe=e;switch(e){case"keypress":if(Ds(n)===0)break e;case"keydown":case"keyup":Y=tx;break;case"focusin":fe="focus",Y=Ri;break;case"focusout":fe="blur",Y=Ri;break;case"beforeblur":case"afterblur":Y=Ri;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=Mu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=Yh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=lx;break;case ed:case td:case nd:Y=Xh;break;case ad:Y=rx;break;case"scroll":case"scrollend":Y=Gh;break;case"wheel":Y=ox;break;case"copy":case"cut":case"paste":Y=Vh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=Du;break;case"toggle":case"beforetoggle":Y=ux}var ge=(t&4)!==0,Je=!ge&&(e==="scroll"||e==="scrollend"),L=ge?q!==null?q+"Capture":null:q;ge=[];for(var M=G,H;M!==null;){var Q=M;if(H=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||H===null||L===null||(Q=Rl(M,L),Q!=null&&ge.push(cs(M,Q,H))),Je)break;M=M.return}0<ge.length&&(q=new Y(q,fe,null,n,F),K.push({event:q,listeners:ge}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",q&&n!==Si&&(fe=n.relatedTarget||n.fromElement)&&(Ga(fe)||fe[Ha]))break e;if((Y||q)&&(q=F.window===F?F:(q=F.ownerDocument)?q.defaultView||q.parentWindow:window,Y?(fe=n.relatedTarget||n.toElement,Y=G,fe=fe?Ga(fe):null,fe!==null&&(Je=f(fe),ge=fe.tag,fe!==Je||ge!==5&&ge!==27&&ge!==6)&&(fe=null)):(Y=null,fe=G),Y!==fe)){if(ge=Mu,Q="onMouseLeave",L="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(ge=Du,Q="onPointerLeave",L="onPointerEnter",M="pointer"),Je=Y==null?q:Cl(Y),H=fe==null?q:Cl(fe),q=new ge(Q,M+"leave",Y,n,F),q.target=Je,q.relatedTarget=H,Q=null,Ga(F)===G&&(ge=new ge(L,M+"enter",fe,n,F),ge.target=H,ge.relatedTarget=Je,Q=ge),Je=Q,Y&&fe)t:{for(ge=cg,L=Y,M=fe,H=0,Q=L;Q;Q=ge(Q))H++;Q=0;for(var he=M;he;he=ge(he))Q++;for(;0<H-Q;)L=ge(L),H--;for(;0<Q-H;)M=ge(M),Q--;for(;H--;){if(L===M||M!==null&&L===M.alternate){ge=L;break t}L=ge(L),M=ge(M)}ge=null}else ge=null;Y!==null&&Tm(K,q,Y,ge,!1),fe!==null&&Je!==null&&Tm(K,Je,fe,ge,!0)}}e:{if(q=G?Cl(G):window,Y=q.nodeName&&q.nodeName.toLowerCase(),Y==="select"||Y==="input"&&q.type==="file")var Le=Yu;else if(Gu(q))if(Zu)Le=vx;else{Le=bx;var me=gx}else Y=q.nodeName,!Y||Y.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?G&&wi(G.elementType)&&(Le=Yu):Le=yx;if(Le&&(Le=Le(e,G))){qu(K,Le,n,F);break e}me&&me(e,q,G),e==="focusout"&&G&&q.type==="number"&&G.memoizedProps.value!=null&&ji(q,"number",q.value)}switch(me=G?Cl(G):window,e){case"focusin":(Gu(me)||me.contentEditable==="true")&&(Ka=me,Li=G,Ul=null);break;case"focusout":Ul=Li=Ka=null;break;case"mousedown":Bi=!0;break;case"contextmenu":case"mouseup":case"dragend":Bi=!1,Wu(K,n,F);break;case"selectionchange":if(wx)break;case"keydown":case"keyup":Wu(K,n,F)}var Ne;if(Oi)e:{switch(e){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else Ja?$u(e,n)&&(_e="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_e="onCompositionStart");_e&&(Lu&&n.locale!=="ko"&&(Ja||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&Ja&&(Ne=_u()):(Qn=F,Ti="value"in Qn?Qn.value:Qn.textContent,Ja=!0)),me=Tr(G,_e),0<me.length&&(_e=new zu(_e,e,null,n,F),K.push({event:_e,listeners:me}),Ne?_e.data=Ne:(Ne=Hu(n),Ne!==null&&(_e.data=Ne)))),(Ne=fx?mx(e,n):px(e,n))&&(_e=Tr(G,"onBeforeInput"),0<_e.length&&(me=new zu("onBeforeInput","beforeinput",null,n,F),K.push({event:me,listeners:_e}),me.data=Ne)),sg(K,e,G,n,F)}km(K,t)})}function cs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Tr(e,t){for(var n=t+"Capture",a=[];e!==null;){var i=e,u=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||u===null||(i=Rl(e,n),i!=null&&a.unshift(cs(e,i,u)),i=Rl(e,t),i!=null&&a.push(cs(e,i,u))),e.tag===3)return a;e=e.return}return[]}function cg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Tm(e,t,n,a,i){for(var u=t._reactName,p=[];n!==null&&n!==a;){var b=n,R=b.alternate,G=b.stateNode;if(b=b.tag,R!==null&&R===a)break;b!==5&&b!==26&&b!==27||G===null||(R=G,i?(G=Rl(n,u),G!=null&&p.unshift(cs(n,G,R))):i||(G=Rl(n,u),G!=null&&p.push(cs(n,G,R)))),n=n.return}p.length!==0&&e.push({event:t,listeners:p})}var ug=/\r\n?/g,dg=/\u0000|\uFFFD/g;function Am(e){return(typeof e=="string"?e:""+e).replace(ug,`
56
+ `).replace(dg,"")}function Cm(e,t){return t=Am(t),Am(e)===t}function Ve(e,t,n,a,i,u){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Xa(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Xa(e,""+a);break;case"className":_s(e,"class",a);break;case"tabIndex":_s(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":_s(e,n,a);break;case"style":Au(e,a,u);break;case"data":if(t!=="object"){_s(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=Ms(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"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 u=="function"&&(n==="formAction"?(t!=="input"&&Ve(e,t,"name",i.name,i,null),Ve(e,t,"formEncType",i.formEncType,i,null),Ve(e,t,"formMethod",i.formMethod,i,null),Ve(e,t,"formTarget",i.formTarget,i,null)):(Ve(e,t,"encType",i.encType,i,null),Ve(e,t,"method",i.method,i,null),Ve(e,t,"target",i.target,i,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=Ms(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=En);break;case"onScroll":a!=null&&Ce("scroll",e);break;case"onScrollEnd":a!=null&&Ce("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(c(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=Ms(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Ce("beforetoggle",e),Ce("toggle",e),Rs(e,"popover",a);break;case"xlinkActuate":kn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":kn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":kn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":kn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":kn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":kn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":kn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":kn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":kn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Rs(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=$h.get(n)||n,Rs(e,n,a))}}function cc(e,t,n,a,i,u){switch(n){case"style":Au(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(c(60));e.innerHTML=n}}break;case"children":typeof a=="string"?Xa(e,a):(typeof a=="number"||typeof a=="bigint")&&Xa(e,""+a);break;case"onScroll":a!=null&&Ce("scroll",e);break;case"onScrollEnd":a!=null&&Ce("scrollend",e);break;case"onClick":a!=null&&(e.onclick=En);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!yu.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),u=e[Ot]||null,u=u!=null?u[n]:null,typeof u=="function"&&e.removeEventListener(t,u,i),typeof a=="function")){typeof u!="function"&&u!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,i);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):Rs(e,n,a)}}}function kt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ce("error",e),Ce("load",e);var a=!1,i=!1,u;for(u in n)if(n.hasOwnProperty(u)){var p=n[u];if(p!=null)switch(u){case"src":a=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Ve(e,t,u,p,n,null)}}i&&Ve(e,t,"srcSet",n.srcSet,n,null),a&&Ve(e,t,"src",n.src,n,null);return;case"input":Ce("invalid",e);var b=u=p=i=null,R=null,G=null;for(a in n)if(n.hasOwnProperty(a)){var F=n[a];if(F!=null)switch(a){case"name":i=F;break;case"type":p=F;break;case"checked":R=F;break;case"defaultChecked":G=F;break;case"value":u=F;break;case"defaultValue":b=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(c(137,t));break;default:Ve(e,t,a,F,n,null)}}Nu(e,u,b,R,G,p,i,!1);return;case"select":Ce("invalid",e),a=p=u=null;for(i in n)if(n.hasOwnProperty(i)&&(b=n[i],b!=null))switch(i){case"value":u=b;break;case"defaultValue":p=b;break;case"multiple":a=b;default:Ve(e,t,i,b,n,null)}t=u,n=p,e.multiple=!!a,t!=null?Fa(e,!!a,t,!1):n!=null&&Fa(e,!!a,n,!0);return;case"textarea":Ce("invalid",e),u=i=a=null;for(p in n)if(n.hasOwnProperty(p)&&(b=n[p],b!=null))switch(p){case"value":a=b;break;case"defaultValue":i=b;break;case"children":u=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(c(91));break;default:Ve(e,t,p,b,n,null)}Eu(e,a,i,u);return;case"option":for(R in n)if(n.hasOwnProperty(R)&&(a=n[R],a!=null))switch(R){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Ve(e,t,R,a,n,null)}return;case"dialog":Ce("beforetoggle",e),Ce("toggle",e),Ce("cancel",e),Ce("close",e);break;case"iframe":case"object":Ce("load",e);break;case"video":case"audio":for(a=0;a<os.length;a++)Ce(os[a],e);break;case"image":Ce("error",e),Ce("load",e);break;case"details":Ce("toggle",e);break;case"embed":case"source":case"link":Ce("error",e),Ce("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(G in n)if(n.hasOwnProperty(G)&&(a=n[G],a!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Ve(e,t,G,a,n,null)}return;default:if(wi(t)){for(F in n)n.hasOwnProperty(F)&&(a=n[F],a!==void 0&&cc(e,t,F,a,n,void 0));return}}for(b in n)n.hasOwnProperty(b)&&(a=n[b],a!=null&&Ve(e,t,b,a,n,null))}function fg(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,u=null,p=null,b=null,R=null,G=null,F=null;for(Y in n){var K=n[Y];if(n.hasOwnProperty(Y)&&K!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":R=K;default:a.hasOwnProperty(Y)||Ve(e,t,Y,null,a,K)}}for(var q in a){var Y=a[q];if(K=n[q],a.hasOwnProperty(q)&&(Y!=null||K!=null))switch(q){case"type":u=Y;break;case"name":i=Y;break;case"checked":G=Y;break;case"defaultChecked":F=Y;break;case"value":p=Y;break;case"defaultValue":b=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(c(137,t));break;default:Y!==K&&Ve(e,t,q,Y,a,K)}}vi(e,p,b,R,G,F,u,i);return;case"select":Y=p=b=q=null;for(u in n)if(R=n[u],n.hasOwnProperty(u)&&R!=null)switch(u){case"value":break;case"multiple":Y=R;default:a.hasOwnProperty(u)||Ve(e,t,u,null,a,R)}for(i in a)if(u=a[i],R=n[i],a.hasOwnProperty(i)&&(u!=null||R!=null))switch(i){case"value":q=u;break;case"defaultValue":b=u;break;case"multiple":p=u;default:u!==R&&Ve(e,t,i,u,a,R)}t=b,n=p,a=Y,q!=null?Fa(e,!!n,q,!1):!!a!=!!n&&(t!=null?Fa(e,!!n,t,!0):Fa(e,!!n,n?[]:"",!1));return;case"textarea":Y=q=null;for(b in n)if(i=n[b],n.hasOwnProperty(b)&&i!=null&&!a.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Ve(e,t,b,null,a,i)}for(p in a)if(i=a[p],u=n[p],a.hasOwnProperty(p)&&(i!=null||u!=null))switch(p){case"value":q=i;break;case"defaultValue":Y=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(c(91));break;default:i!==u&&Ve(e,t,p,i,a,u)}ku(e,q,Y);return;case"option":for(var fe in n)if(q=n[fe],n.hasOwnProperty(fe)&&q!=null&&!a.hasOwnProperty(fe))switch(fe){case"selected":e.selected=!1;break;default:Ve(e,t,fe,null,a,q)}for(R in a)if(q=a[R],Y=n[R],a.hasOwnProperty(R)&&q!==Y&&(q!=null||Y!=null))switch(R){case"selected":e.selected=q&&typeof q!="function"&&typeof q!="symbol";break;default:Ve(e,t,R,q,a,Y)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ge in n)q=n[ge],n.hasOwnProperty(ge)&&q!=null&&!a.hasOwnProperty(ge)&&Ve(e,t,ge,null,a,q);for(G in a)if(q=a[G],Y=n[G],a.hasOwnProperty(G)&&q!==Y&&(q!=null||Y!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(c(137,t));break;default:Ve(e,t,G,q,a,Y)}return;default:if(wi(t)){for(var Je in n)q=n[Je],n.hasOwnProperty(Je)&&q!==void 0&&!a.hasOwnProperty(Je)&&cc(e,t,Je,void 0,a,q);for(F in a)q=a[F],Y=n[F],!a.hasOwnProperty(F)||q===Y||q===void 0&&Y===void 0||cc(e,t,F,q,a,Y);return}}for(var L in n)q=n[L],n.hasOwnProperty(L)&&q!=null&&!a.hasOwnProperty(L)&&Ve(e,t,L,null,a,q);for(K in a)q=a[K],Y=n[K],!a.hasOwnProperty(K)||q===Y||q==null&&Y==null||Ve(e,t,K,q,a,Y)}function Rm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function mg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var i=n[a],u=i.transferSize,p=i.initiatorType,b=i.duration;if(u&&b&&Rm(p)){for(p=0,b=i.responseEnd,a+=1;a<n.length;a++){var R=n[a],G=R.startTime;if(G>b)break;var F=R.transferSize,K=R.initiatorType;F&&Rm(K)&&(R=R.responseEnd,p+=F*(R<b?1:(b-G)/(R-G)))}if(--a,t+=8*(u+p)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var uc=null,dc=null;function Ar(e){return e.nodeType===9?e:e.ownerDocument}function _m(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 Om(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function fc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var mc=null;function pg(){var e=window.event;return e&&e.type==="popstate"?e===mc?!1:(mc=e,!0):(mc=null,!1)}var Mm=typeof setTimeout=="function"?setTimeout:void 0,hg=typeof clearTimeout=="function"?clearTimeout:void 0,zm=typeof Promise=="function"?Promise:void 0,xg=typeof queueMicrotask=="function"?queueMicrotask:typeof zm<"u"?function(e){return zm.resolve(null).then(e).catch(gg)}:Mm;function gg(e){setTimeout(function(){throw e})}function ua(e){return e==="head"}function Dm(e,t){var n=t,a=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(i),Sl(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")us(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,us(n);for(var u=n.firstChild;u;){var p=u.nextSibling,b=u.nodeName;u[Al]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&u.rel.toLowerCase()==="stylesheet"||n.removeChild(u),u=p}}else n==="body"&&us(e.ownerDocument.body);n=i}while(n);Sl(t)}function Lm(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function pc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":pc(n),bi(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function bg(e,t,n,a){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Al])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=nn(e.nextSibling),e===null)break}return null}function yg(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=nn(e.nextSibling),e===null))return null;return e}function Bm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=nn(e.nextSibling),e===null))return null;return e}function hc(e){return e.data==="$?"||e.data==="$~"}function xc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function vg(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function nn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var gc=null;function Um(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return nn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function $m(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Hm(e,t,n){switch(t=Ar(n),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function us(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bi(e)}var an=new Map,Gm=new Set;function Cr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var qn=W.d;W.d={f:jg,r:wg,D:Sg,C:Ng,L:kg,m:Eg,X:Ag,S:Tg,M:Cg};function jg(){var e=qn.f(),t=vr();return e||t}function wg(e){var t=qa(e);t!==null&&t.tag===5&&t.type==="form"?af(t):qn.r(e)}var vl=typeof document>"u"?null:document;function qm(e,t,n){var a=vl;if(a&&typeof t=="string"&&t){var i=Jt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),Gm.has(i)||(Gm.add(i),e={rel:e,crossOrigin:n,href:t},a.querySelector(i)===null&&(t=a.createElement("link"),kt(t,"link",e),gt(t),a.head.appendChild(t)))}}function Sg(e){qn.D(e),qm("dns-prefetch",e,null)}function Ng(e,t){qn.C(e,t),qm("preconnect",e,t)}function kg(e,t,n){qn.L(e,t,n);var a=vl;if(a&&e&&t){var i='link[rel="preload"][as="'+Jt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Jt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Jt(n.imageSizes)+'"]')):i+='[href="'+Jt(e)+'"]';var u=i;switch(t){case"style":u=jl(e);break;case"script":u=wl(e)}an.has(u)||(e=w({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),an.set(u,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(ds(u))||t==="script"&&a.querySelector(fs(u))||(t=a.createElement("link"),kt(t,"link",e),gt(t),a.head.appendChild(t)))}}function Eg(e,t){qn.m(e,t);var n=vl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Jt(a)+'"][href="'+Jt(e)+'"]',u=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=wl(e)}if(!an.has(u)&&(e=w({rel:"modulepreload",href:e},t),an.set(u,e),n.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(fs(u)))return}a=n.createElement("link"),kt(a,"link",e),gt(a),n.head.appendChild(a)}}}function Tg(e,t,n){qn.S(e,t,n);var a=vl;if(a&&e){var i=Ya(a).hoistableStyles,u=jl(e);t=t||"default";var p=i.get(u);if(!p){var b={loading:0,preload:null};if(p=a.querySelector(ds(u)))b.loading=5;else{e=w({rel:"stylesheet",href:e,"data-precedence":t},n),(n=an.get(u))&&bc(e,n);var R=p=a.createElement("link");gt(R),kt(R,"link",e),R._p=new Promise(function(G,F){R.onload=G,R.onerror=F}),R.addEventListener("load",function(){b.loading|=1}),R.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Rr(p,t,a)}p={type:"stylesheet",instance:p,count:1,state:b},i.set(u,p)}}}function Ag(e,t){qn.X(e,t);var n=vl;if(n&&e){var a=Ya(n).hoistableScripts,i=wl(e),u=a.get(i);u||(u=n.querySelector(fs(i)),u||(e=w({src:e,async:!0},t),(t=an.get(i))&&yc(e,t),u=n.createElement("script"),gt(u),kt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function Cg(e,t){qn.M(e,t);var n=vl;if(n&&e){var a=Ya(n).hoistableScripts,i=wl(e),u=a.get(i);u||(u=n.querySelector(fs(i)),u||(e=w({src:e,async:!0,type:"module"},t),(t=an.get(i))&&yc(e,t),u=n.createElement("script"),gt(u),kt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function Ym(e,t,n,a){var i=(i=de.current)?Cr(i):null;if(!i)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=jl(n.href),n=Ya(i).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=jl(n.href);var u=Ya(i).hoistableStyles,p=u.get(e);if(p||(i=i.ownerDocument||i,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,p),(u=i.querySelector(ds(e)))&&!u._p&&(p.instance=u,p.state.loading=5),an.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},an.set(e,n),u||Rg(i,e,n,p.state))),t&&a===null)throw Error(c(528,""));return p}if(t&&a!==null)throw Error(c(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=wl(n),n=Ya(i).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function jl(e){return'href="'+Jt(e)+'"'}function ds(e){return'link[rel="stylesheet"]['+e+"]"}function Zm(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function Rg(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),kt(t,"link",n),gt(t),e.head.appendChild(t))}function wl(e){return'[src="'+Jt(e)+'"]'}function fs(e){return"script[async]"+e}function Fm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Jt(n.href)+'"]');if(a)return t.instance=a,gt(a),a;var i=w({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),gt(a),kt(a,"style",i),Rr(a,n.precedence,e),t.instance=a;case"stylesheet":i=jl(n.href);var u=e.querySelector(ds(i));if(u)return t.state.loading|=4,t.instance=u,gt(u),u;a=Zm(n),(i=an.get(i))&&bc(a,i),u=(e.ownerDocument||e).createElement("link"),gt(u);var p=u;return p._p=new Promise(function(b,R){p.onload=b,p.onerror=R}),kt(u,"link",a),t.state.loading|=4,Rr(u,n.precedence,e),t.instance=u;case"script":return u=wl(n.src),(i=e.querySelector(fs(u)))?(t.instance=i,gt(i),i):(a=n,(i=an.get(u))&&(a=w({},n),yc(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),gt(i),kt(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Rr(a,n.precedence,e));return t.instance}function Rr(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,u=i,p=0;p<a.length;p++){var b=a[p];if(b.dataset.precedence===t)u=b;else if(u!==i)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function bc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function yc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var _r=null;function Xm(e,t,n){if(_r===null){var a=new Map,i=_r=new Map;i.set(n,a)}else i=_r,a=i.get(n),a||(a=new Map,i.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var u=n[i];if(!(u[Al]||u[jt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var p=u.getAttribute(t)||"";p=e+p;var b=a.get(p);b?b.push(u):a.set(p,[u])}}return a}function Qm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function _g(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Vm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Og(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=jl(a.href),u=t.querySelector(ds(i));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Or.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=u,gt(u);return}u=t.ownerDocument||t,a=Zm(a),(i=an.get(i))&&bc(a,i),u=u.createElement("link"),gt(u);var p=u;p._p=new Promise(function(b,R){p.onload=b,p.onerror=R}),kt(u,"link",a),n.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Or.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var vc=0;function Mg(e,t){return e.stylesheets&&e.count===0&&zr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&zr(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&vc===0&&(vc=62500*mg());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&zr(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>vc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function Or(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)zr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Mr=null;function zr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Mr=new Map,t.forEach(zg,e),Mr=null,Or.call(e))}function zg(e,t){if(!(t.state.loading&4)){var n=Mr.get(e);if(n)var a=n.get(null);else{n=new Map,Mr.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<i.length;u++){var p=i[u];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(n.set(p.dataset.precedence,p),a=p)}a&&n.set(null,a)}i=t.instance,p=i.getAttribute("data-precedence"),u=n.get(p)||a,u===a&&n.set(null,i),n.set(p,i),this.count++,a=Or.bind(this),i.addEventListener("load",a),i.addEventListener("error",a),u?u.parentNode.insertBefore(i,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ms={$$typeof:_,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function Dg(e,t,n,a,i,u,p,b,R){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=pi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pi(0),this.hiddenUpdates=pi(null),this.identifierPrefix=a,this.onUncaughtError=i,this.onCaughtError=u,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function Jm(e,t,n,a,i,u,p,b,R,G,F,K){return e=new Dg(e,t,n,p,R,G,F,K,b),t=1,u===!0&&(t|=24),u=Gt(3,null,null,t),e.current=u,u.stateNode=e,t=Wi(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:n,cache:t},no(u),e}function Km(e){return e?(e=Pa,e):Pa}function Im(e,t,n,a,i,u){i=Km(i),a.context===null?a.context=i:a.pendingContext=i,a=Pn(t),a.payload={element:n},u=u===void 0?null:u,u!==null&&(a.callback=u),n=ea(e,a,t),n!==null&&(Ut(n,e,t),Fl(n,e,t))}function Wm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function jc(e,t){Wm(e,t),(e=e.alternate)&&Wm(e,t)}function Pm(e){if(e.tag===13||e.tag===31){var t=Sa(e,67108864);t!==null&&Ut(t,e,67108864),jc(e,67108864)}}function ep(e){if(e.tag===13||e.tag===31){var t=Xt();t=hi(t);var n=Sa(e,t);n!==null&&Ut(n,e,t),jc(e,t)}}var Dr=!0;function Lg(e,t,n,a){var i=B.T;B.T=null;var u=W.p;try{W.p=2,wc(e,t,n,a)}finally{W.p=u,B.T=i}}function Bg(e,t,n,a){var i=B.T;B.T=null;var u=W.p;try{W.p=8,wc(e,t,n,a)}finally{W.p=u,B.T=i}}function wc(e,t,n,a){if(Dr){var i=Sc(a);if(i===null)oc(e,t,a,Lr,n),np(e,a);else if($g(i,e,t,n,a))a.stopPropagation();else if(np(e,a),t&4&&-1<Ug.indexOf(e)){for(;i!==null;){var u=qa(i);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var p=mn(u.pendingLanes);if(p!==0){var b=u;for(b.pendingLanes|=2,b.entangledLanes|=2;p;){var R=1<<31-Ge(p);b.entanglements[1]|=R,p&=~R}gn(u),(He&6)===0&&(br=$()+500,is(0))}}break;case 31:case 13:b=Sa(u,2),b!==null&&Ut(b,u,2),vr(),jc(u,2)}if(u=Sc(a),u===null&&oc(e,t,a,Lr,n),u===i)break;i=u}i!==null&&a.stopPropagation()}else oc(e,t,a,null,n)}}function Sc(e){return e=Ni(e),Nc(e)}var Lr=null;function Nc(e){if(Lr=null,e=Ga(e),e!==null){var t=f(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=m(t),e!==null)return e;e=null}else if(n===31){if(e=x(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Lr=e,null}function tp(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(ye()){case De:return 2;case Ee:return 8;case ve:case qe:return 32;case tt:return 268435456;default:return 32}default:return 32}}var kc=!1,da=null,fa=null,ma=null,ps=new Map,hs=new Map,pa=[],Ug="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 np(e,t){switch(e){case"focusin":case"focusout":da=null;break;case"dragenter":case"dragleave":fa=null;break;case"mouseover":case"mouseout":ma=null;break;case"pointerover":case"pointerout":ps.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":hs.delete(t.pointerId)}}function xs(e,t,n,a,i,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:u,targetContainers:[i]},t!==null&&(t=qa(t),t!==null&&Pm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function $g(e,t,n,a,i){switch(t){case"focusin":return da=xs(da,e,t,n,a,i),!0;case"dragenter":return fa=xs(fa,e,t,n,a,i),!0;case"mouseover":return ma=xs(ma,e,t,n,a,i),!0;case"pointerover":var u=i.pointerId;return ps.set(u,xs(ps.get(u)||null,e,t,n,a,i)),!0;case"gotpointercapture":return u=i.pointerId,hs.set(u,xs(hs.get(u)||null,e,t,n,a,i)),!0}return!1}function ap(e){var t=Ga(e.target);if(t!==null){var n=f(t);if(n!==null){if(t=n.tag,t===13){if(t=m(n),t!==null){e.blockedOn=t,xu(e.priority,function(){ep(n)});return}}else if(t===31){if(t=x(n),t!==null){e.blockedOn=t,xu(e.priority,function(){ep(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Br(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Si=a,n.target.dispatchEvent(a),Si=null}else return t=qa(n),t!==null&&Pm(t),e.blockedOn=n,!1;t.shift()}return!0}function lp(e,t,n){Br(e)&&n.delete(t)}function Hg(){kc=!1,da!==null&&Br(da)&&(da=null),fa!==null&&Br(fa)&&(fa=null),ma!==null&&Br(ma)&&(ma=null),ps.forEach(lp),hs.forEach(lp)}function Ur(e,t){e.blockedOn===t&&(e.blockedOn=null,kc||(kc=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Hg)))}var $r=null;function sp(e){$r!==e&&($r=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){$r===e&&($r=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],i=e[t+2];if(typeof a!="function"){if(Nc(a||n)===null)continue;break}var u=qa(n);u!==null&&(e.splice(t,3),t-=3,So(u,{pending:!0,data:i,method:n.method,action:a},a,i))}}))}function Sl(e){function t(R){return Ur(R,e)}da!==null&&Ur(da,e),fa!==null&&Ur(fa,e),ma!==null&&Ur(ma,e),ps.forEach(t),hs.forEach(t);for(var n=0;n<pa.length;n++){var a=pa[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<pa.length&&(n=pa[0],n.blockedOn===null);)ap(n),n.blockedOn===null&&pa.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var i=n[a],u=n[a+1],p=i[Ot]||null;if(typeof u=="function")p||sp(n);else if(p){var b=null;if(u&&u.hasAttribute("formAction")){if(i=u,p=u[Ot]||null)b=p.formAction;else if(Nc(i)!==null)continue}else b=p.action;typeof b=="function"?n[a+1]=b:(n.splice(a,3),a-=3),sp(n)}}}function rp(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(p){return i=p})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Ec(e){this._internalRoot=e}Hr.prototype.render=Ec.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var n=t.current,a=Xt();Im(n,a,e,t,null,null)},Hr.prototype.unmount=Ec.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Im(e.current,2,null,e,null,null),vr(),t[Ha]=null}};function Hr(e){this._internalRoot=e}Hr.prototype.unstable_scheduleHydration=function(e){if(e){var t=hu();e={blockedOn:null,target:e,priority:t};for(var n=0;n<pa.length&&t!==0&&t<pa[n].priority;n++);pa.splice(n,0,e),n===0&&ap(e)}};var ip=r.version;if(ip!=="19.2.4")throw Error(c(527,ip,"19.2.4"));W.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=g(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var Gg={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gr.isDisabled&&Gr.supportsFiber)try{be=Gr.inject(Gg),Ye=Gr}catch{}}return bs.createRoot=function(e,t){if(!d(e))throw Error(c(299));var n=!1,a="",i=pf,u=hf,p=xf;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=Jm(e,1,!1,null,null,n,a,null,i,u,p,rp),e[Ha]=t.current,ic(e),new Ec(t)},bs.hydrateRoot=function(e,t,n){if(!d(e))throw Error(c(299));var a=!1,i="",u=pf,p=hf,b=xf,R=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(p=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError),n.formState!==void 0&&(R=n.formState)),t=Jm(e,1,!0,t,n??null,a,i,R,u,p,b,rp),t.context=Km(null),n=t.current,a=Xt(),a=hi(a),i=Pn(a),i.callback=null,ea(n,i,a),n=a,t.current.lanes=n,Tl(t,n),gn(t),e[Ha]=t.current,ic(e),new Hr(t)},bs.version="19.2.4",bs}var gp;function Wg(){if(gp)return Cc.exports;gp=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(r){console.error(r)}}return s(),Cc.exports=Ig(),Cc.exports}var Pg=Wg();const eb=Wp(Pg),tb=300*1e3;function El(s){if(!s||typeof s!="object")return null;const r=s;return Array.isArray(r.sessions)?{sessions:r.sessions,cachedAt:typeof r.cachedAt=="string"?r.cachedAt:void 0}:null}function Vr(s,r=tb){if(!s)return!1;const o=Date.now()-new Date(s).getTime();return Number.isFinite(o)&&o>=0&&o<r}function Jr(s){if(!s)return"just now";const r=Date.now()-new Date(s).getTime();if(!Number.isFinite(r)||r<0)return"just now";const o=Math.floor(r/6e4);if(o<1)return"just now";if(o<60)return`${o}m ago`;const c=Math.floor(o/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function Pp(s,r=Date.now()){if(!s)return"";const o=r-new Date(s).getTime();if(!Number.isFinite(o)||o<0)return"0m";const c=Math.floor(o/6e4);if(c<60)return`${c}m`;const d=Math.floor(c/60);return d<24?`${d}h`:`${Math.floor(d/24)}d`}function eh(s){return new Date(s).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}function nb(s){return s?`$${s.toFixed(2)}`:""}function ab(s){const r=Math.round(s/1024);return r>=1024?`${(r/1024).toFixed(1)}MB`:`${r}KB`}function ks(s){const r=Date.now()-new Date(s).getTime(),o=Math.floor(r/6e4);if(o<1)return"just now";if(o<60)return`${o}m ago`;const c=Math.floor(o/60);if(c<24)return`${c}h ago`;const d=Math.floor(c/24);return d<30?`${d}d ago`:eh(s)}function xa(s){const r=s.replace(/\/$/,"").split("/");return r[r.length-1]||s}const Wc=120;function vn(s){return(s||"").replace(/\s+/g," ").trim().slice(0,Wc)}function lb(s){return s.startsWith("[Request interrupted by user")||s.startsWith("<command-name>")||s.startsWith("<command-message>")||s.startsWith("<local-command-caveat>")||s.startsWith("<local-command-stdout>")||s.startsWith("<task-notification>")||s.startsWith("<bash-input>")||s.startsWith("<bash-stdout>")}function Es(s){if(lb(s))return"";let r=s;return r=r.replace(/<\/?[a-z][a-z0-9-]*>/gi,""),r=r.replace(/Caveat:\s*The messages below were generated by the user while running local commands\.[^.]*/g,""),r=r.replace(/DO NOT respond to these messages[^.]*/g,""),r=r.replace(/!\[AI Session:[^\]]*]\([^)]+\)/gi,""),r=r.replace(/###\s*AI Coding Session[^\n]*/gi,""),r=r.replace(/\d+\s+prompts?,\s+\d+\s+tools?,[^\n]*/gi,""),r=r.replace(/^\/\w+\s*/g,""),r=r.replace(/\s+/g," ").trim(),r}function Kr(s){const r=s.title?vn(Es(s.title)):"";if(r)return r;if(s.replay?.title){const c=vn(s.replay.title);if(c)return c}const o=[...s.prompts||[],s.firstPrompt];for(const c of o){const d=vn(Es(c||""));if(d)return d}return s.slug}function Hc(s){const r=vn(s.title);if(r)return r;const o=vn(s.firstMessage);if(o)return o;const c=vn(s.messages?.[0]);return c||s.slug}function vt(s,r={}){const o=new URL(window.location.href),c=["tab","project","q","archived"];if(o.searchParams.get("view")==="dashboard"||!o.searchParams.has("session")&&!o.searchParams.has("gist")&&!o.searchParams.has("url")){const m={};c.forEach(x=>{const h=o.searchParams.get(x);h&&(m[x]=h)}),Object.keys(m).length>0?sessionStorage.setItem("vibe_dashboard_state",JSON.stringify(m)):sessionStorage.removeItem("vibe_dashboard_state")}if(s.session&&(c.forEach(m=>{s[m]===void 0&&o.searchParams.delete(m)}),s.view===void 0&&o.searchParams.delete("view")),s.view==="dashboard"||s.session===null&&!s.view){const m=sessionStorage.getItem("vibe_dashboard_state");if(m)try{const x=JSON.parse(m);Object.entries(x).forEach(([h,g])=>{s[h]===void 0&&!o.searchParams.has(h)&&o.searchParams.set(h,g)})}catch(x){console.error("Failed to restore dashboard state",x)}o.searchParams.delete("v"),o.searchParams.delete("s")}for(const[m,x]of Object.entries(s))x===null?o.searchParams.delete(m):o.searchParams.set(m,x);r.replace?window.history.replaceState({},"",o.toString()):window.history.pushState({},"",o.toString()),window.dispatchEvent(new PopStateEvent("popstate"))}const sb={"claude-code":"bg-terminal-orange-subtle text-terminal-orange",cursor:"bg-terminal-blue-subtle text-terminal-blue"};function th(s){return s==="claude-code"?"Claude":s==="cursor"?"Cursor":s}function nh(s){return sb[s]||"bg-terminal-surface text-terminal-dim"}function Ba(s){return s instanceof Error?s.message:typeof s=="string"?s:"Unknown error"}function rb(s){if(s.length<=26)return s;const o=s.split("/");if(o.length<=2)return s;const c=o[0],d=o.slice(-2).join("/"),f=`${c}/…/${d}`;if(f.length<=26)return f;const m=o[o.length-1];return`${c}/…/${m}`}function ah(s){const r=new Map;for(const o of s)r.set(o,rb(o));return r}function Nl({label:s,value:r,color:o}){const c=typeof r=="number";return l.jsxs("div",{className:"bg-terminal-surface rounded-xl px-3 py-3 shadow-layer-sm",children:[l.jsx("div",{className:`text-xl font-bold ${c?"tabular-nums":"truncate w-full"} ${o}`,title:typeof r=="string"?r:void 0,children:r}),l.jsx("div",{className:"text-terminal-dimmer text-[10px] font-sans font-medium uppercase tracking-widest mt-0.5",children:s})]})}function Ct(s){return s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:s.toString()}function ga(s){if(!s)return"";const r=Math.floor(s/1e3);if(r<60)return`${r}s`;const o=Math.floor(r/60);return o<60?`${o}m ${r%60}s`:`${Math.floor(o/60)}h ${o%60}m`}function ib(s){if(s===0)return"0m";const r=Math.floor(s/6e4);if(r<60)return`${r}m`;const o=Math.floor(r/60),c=r%60;if(o<24)return c>0?`${o}h ${c}m`:`${o}h`;const d=Math.floor(o/24),f=o%24;return f>0?`${d}d ${f}h`:`${d}d`}function ob(){const[s,r]=y.useState([]),[o,c]=y.useState([]),[d,f]=y.useState(!0),[m,x]=y.useState(!0),[h,g]=y.useState(!0),[v,w]=y.useState(null),[T,N]=y.useState(null),[j,S]=y.useState(null),C=y.useRef(!1),E=y.useMemo(()=>s.some(_=>_.provider==="cursor"),[s]),k=y.useCallback(async()=>{f(!0),x(!0),g(!0),w(null);try{const[_,z]=await Promise.all([fetch("/api/sources/cached").then(P=>P.ok?P.json():null).catch(()=>null),fetch("/api/sessions/cached").then(P=>P.ok?P.json():null).catch(()=>null)]),U=El(_),J=El(z);U?.sessions.length&&r(U.sessions),J?.sessions.length&&c(J.sessions),(U?.sessions.length||J?.sessions.length)&&f(!1);const Z=Vr(U?.cachedAt),re=Vr(J?.cachedAt),ae=[];Z&&x(!1),re&&g(!1),Z||ae.push(new Promise(P=>{N(0);const V=new EventSource("/api/sources/stream");V.onmessage=oe=>{try{const ce=JSON.parse(oe.data);ce.type==="progress"?N(ce.scanned):ce.type==="complete"?(r(ce.sessions),N(null),V.close(),P()):ce.type==="error"&&(U?.sessions.length||w(ce.message||"Failed to load sessions"),N(null),V.close(),P())}catch{}},V.onerror=()=>{V.close(),N(null),fetch("/api/sources").then(oe=>{if(!oe.ok)throw new Error("Failed to load sources");return oe.json()}).then(oe=>r(oe.sessions)).catch(oe=>{U?.sessions.length||w(oe instanceof Error?oe.message:"Failed to load sessions")}).finally(()=>P())}}).finally(()=>x(!1))),re||ae.push(fetch("/api/sessions").then(P=>{if(!P.ok)throw new Error("Failed to load replays");return P.json()}).then(P=>c(P)).catch(P=>{J?.sessions.length||w(P instanceof Error?P.message:"Failed to load replays")}).finally(()=>g(!1))),ae.length>0&&await Promise.allSettled(ae)}catch(_){w(_ instanceof Error?_.message:"Failed to load data")}finally{f(!1)}},[]);return y.useEffect(()=>{k()},[k]),y.useEffect(()=>{if(!m&&!E&&!C.current)return;let _=!1,z;const U=async()=>{const Z=await fetch("/api/sources/cached").then(ae=>ae.ok?ae.json():null).catch(()=>null),re=El(Z);!_&&re?.sessions.length&&r(re.sessions)},J=async()=>{const Z=await fetch("/api/sources/enrichment-status").then(re=>re.ok?re.json():null).catch(()=>null);!Z||_||(S(Z),Z.running?(C.current=!0,await U()):C.current&&(C.current=!1,await U()))};return J(),z=window.setInterval(()=>{J()},2500),()=>{_=!0,z&&window.clearInterval(z)}},[E,m]),{sources:s,replays:o,loading:d,loadingSources:m,loadingReplays:h,error:v,scanProgress:T,enrichmentStatus:j}}function cb(s,r){let o=0,c=0,d=0;const f=new Map(s.map(E=>[E.slug,E]));for(const E of s)o+=E.promptCount??(E.prompts?.length||(E.firstPrompt?1:0)),c+=E.toolCallCount??0;for(const E of r){const k=f.get(E.slug),_=E.stats.toolCalls||0;k?k.toolCallCount==null?c+=_:_>k.toolCallCount&&(c+=_-k.toolCallCount):(o+=E.stats.userPrompts||0,c+=_),d+=E.stats.durationMs||0}const m=new Map;for(const E of s)m.set(E.provider,(m.get(E.provider)||0)+1);const x={"claude-code":"Claude Code",cursor:"Cursor"},h=[...m.entries()].map(([E,k])=>({provider:E,count:k,label:x[E]||E})).sort((E,k)=>k.count-E.count),g=new Set;for(const E of s)g.add(E.project);for(const E of r)g.add(E.project);const v=new Date,w=864e5,T=[];for(let E=29;E>=0;E--){const k=new Date(v.getTime()-E*w);k.setHours(0,0,0,0);const _=new Date(k.getTime()+w),z=k.toISOString().slice(0,10),U=k.toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"});let J=0,Z=0;for(const re of s){const ae=new Date(re.timestamp);ae>=k&&ae<_&&(re.provider==="cursor"?Z++:J++)}T.push({date:z,label:U,claude:J,cursor:Z})}const N=s.length,j=r.length,S=s.filter(E=>E.existingReplay).length,C=N>0?S/N*100:0;return{totalSessions:N,totalReplays:j,totalPrompts:o,totalToolCalls:c,totalDuration:d,providerBreakdown:h,projectCount:g.size,activityByDay:T,recentSources:[...s].sort((E,k)=>k.timestamp.localeCompare(E.timestamp)).slice(0,5),recentReplays:[...r].sort((E,k)=>k.startTime.localeCompare(E.startTime)).slice(0,5),publishedCount:r.filter(E=>E.gist?.gistId).length,replayConversionPct:C}}function qr({label:s,value:r,sub:o,color:c="green",icon:d}){const f={green:"text-terminal-green",blue:"text-terminal-blue",orange:"text-terminal-orange",purple:"text-terminal-purple"},m={green:"bg-terminal-green/10",blue:"bg-terminal-blue/10",orange:"bg-terminal-orange/10",purple:"bg-terminal-purple/10"},x={green:"from-terminal-green/20 to-terminal-blue/10",blue:"from-terminal-blue/20 to-terminal-cyan/10",orange:"from-terminal-orange/20 to-terminal-red/10",purple:"from-terminal-purple/20 to-terminal-blue/10"};return l.jsxs("div",{className:"premium-card bg-terminal-surface rounded-xl p-5 shadow-layer-sm hover:bg-terminal-surface-hover transition-all duration-300 hover-lift group",children:[l.jsxs("div",{className:"flex items-start justify-between relative z-10",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("p",{className:"text-[10px] font-sans font-bold text-terminal-dim uppercase tracking-widest opacity-80 group-hover:opacity-100 transition-opacity",children:s}),l.jsx("p",{className:`text-3xl font-mono font-bold tabular-nums tracking-tight ${f[c]}`,children:r}),o&&l.jsxs("p",{className:"text-[11px] font-mono text-terminal-dimmer flex items-center gap-1.5",children:[l.jsx("span",{className:`w-1 h-1 rounded-full ${f[c]} opacity-50`}),o]})]}),l.jsx("div",{className:`w-11 h-11 rounded-xl flex items-center justify-center ${m[c]} border border-white/5 shadow-inner transition-transform duration-300 group-hover:scale-110 group-hover:rotate-3`,children:d})]}),l.jsx("div",{className:`absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 bg-gradient-to-br ${x[c]} blur-2xl -z-10 pointer-events-none`})]})}function ub(){return l.jsx("div",{className:"bg-terminal-surface rounded-xl p-5 shadow-layer-sm space-y-3",children:l.jsxs("div",{className:"flex justify-between",children:[l.jsxs("div",{className:"space-y-2 flex-1",children:[l.jsx("div",{className:"h-3 w-20 skeleton opacity-40"}),l.jsx("div",{className:"h-8 w-24 skeleton opacity-60"}),l.jsx("div",{className:"h-3 w-32 skeleton opacity-30"})]}),l.jsx("div",{className:"w-11 h-11 rounded-xl skeleton opacity-20"})]})})}function db({data:s}){const r=Math.max(...s.map(d=>d.claude+d.cursor),1),o=s.some(d=>d.claude>0||d.cursor>0),c=y.useMemo(()=>{const d=[];let f=-1;for(let m=0;m<s.length;m++){const x=new Date(s[m].date),h=x.getMonth();h!==f?(d.push({index:m,label:x.toLocaleDateString("en-US",{month:"short",day:"numeric"})}),f=h):x.getDay()===1&&m>0&&d.push({index:m,label:`${x.getDate()}`})}return d},[s]);return o?l.jsxs("div",{className:"flex flex-col h-full",children:[l.jsx("div",{className:"flex-1 flex items-stretch gap-px min-h-0",children:s.map(d=>{const f=d.claude+d.cursor,m=Math.max(f/r*100,f>0?4:0),x=f>0?d.claude/f*100:0,h=d.date===new Date().toISOString().slice(0,10);return l.jsxs("div",{className:"flex-1 flex flex-col justify-end h-full group relative",title:`${d.label}: ${d.claude} Claude, ${d.cursor} Cursor`,children:[l.jsx("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 hidden group-hover:block z-10",children:l.jsxs("div",{className:"bg-terminal-surface-2 border border-terminal-border-subtle rounded-lg px-2.5 py-1.5 shadow-layer-md whitespace-nowrap",children:[l.jsx("div",{className:"text-[10px] font-mono text-terminal-dim",children:d.label}),d.claude>0&&l.jsxs("div",{className:"text-[10px] font-mono text-terminal-orange",children:[d.claude," Claude"]}),d.cursor>0&&l.jsxs("div",{className:"text-[10px] font-mono text-terminal-blue",children:[d.cursor," Cursor"]})]})}),l.jsx("div",{className:`rounded-sm transition-all duration-200 ${h?"ring-1 ring-terminal-orange/30":""} ${f>0?"hover:opacity-80":""}`,style:{height:`${m}%`,minHeight:f>0?"4px":"0",background:f>0?`linear-gradient(to top, var(--orange) ${x}%, var(--blue) ${x}%)`:"transparent",opacity:f>0?.8:.05,boxShadow:f>0?`0 0 10px ${d.claude>d.cursor?"var(--orange-subtle)":"var(--blue-subtle)"}`:"none"}})]},d.date)})}),l.jsx("div",{className:"flex items-center mt-1.5 relative h-4",children:c.map(d=>l.jsx("span",{className:"absolute text-[9px] font-mono text-terminal-dimmer",style:{left:`${d.index/s.length*100}%`},children:d.label},d.index))})]}):l.jsx("div",{className:"flex items-center justify-center h-full text-terminal-dimmer text-xs font-mono",children:"No activity in the last 30 days"})}function fb({breakdown:s}){const r=s.reduce((c,d)=>c+d.count,0),o={"claude-code":{bar:"bg-terminal-orange",text:"text-terminal-orange"},cursor:{bar:"bg-terminal-blue",text:"text-terminal-blue"}};return s.length===0?l.jsx("div",{className:"text-terminal-dimmer text-xs font-mono",children:"No provider data"}):l.jsx("div",{className:"space-y-3",children:s.map(c=>{const d=r>0?c.count/r*100:0,f=o[c.provider]||{bar:"bg-terminal-dim",text:"text-terminal-dim"};return l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:`text-xs font-sans font-medium ${f.text}`,children:c.label}),l.jsxs("span",{className:"text-xs font-mono text-terminal-dim tabular-nums",children:[c.count," (",Math.round(d),"%)"]})]}),l.jsx("div",{className:"h-1.5 rounded-full bg-terminal-surface-2 overflow-hidden",children:l.jsx("div",{className:`h-full rounded-full ${f.bar} transition-all duration-500`,style:{width:`${d}%`,opacity:.7}})})]},c.provider)})})}function lh({provider:s}){return l.jsx("span",{className:`text-[10px] font-sans font-medium px-1.5 py-0.5 rounded-full uppercase tracking-wider ${nh(s)}`,children:th(s)})}function mb({sessions:s,isLoading:r,onViewAll:o,onGenerate:c,onViewReplay:d,generatingSlug:f,generateErrorSlug:m}){return s.length===0?l.jsx("div",{className:"text-center py-6 text-terminal-dimmer text-xs font-mono",children:r?"Loading sessions...":"No sessions found. Start a coding session with Claude Code or Cursor."}):l.jsxs("div",{className:"space-y-1",children:[s.map(x=>{const h=!!x.existingReplay,g=f===x.slug,v=m===x.slug;return l.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-lg hover:bg-terminal-surface-hover transition-colors duration-200",children:[l.jsx(lh,{provider:x.provider}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-sans text-terminal-text truncate",children:Kr(x)}),l.jsx("p",{className:"text-[11px] font-mono text-terminal-dimmer truncate",children:xa(x.project)})]}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[l.jsx("span",{className:"text-[11px] font-mono text-terminal-dimmer tabular-nums",children:ks(x.timestamp)}),h?l.jsxs("button",{onClick:()=>d(x.existingReplay),className:"h-6 px-2.5 text-[11px] font-sans font-semibold rounded-md bg-terminal-green-subtle text-terminal-green hover:bg-terminal-green-emphasis transition-all duration-200 flex items-center gap-1",children:[l.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"currentColor",children:l.jsx("polygon",{points:"4 2 14 8 4 14"})}),"View"]}):l.jsx("button",{onClick:()=>c(x),disabled:g,className:`h-6 px-2.5 text-[11px] font-sans font-semibold rounded-md transition-all duration-200 disabled:opacity-50 flex items-center gap-1 ${v?"bg-terminal-red-subtle text-terminal-red":"bg-terminal-blue-subtle text-terminal-blue hover:bg-terminal-blue-emphasis"}`,children:g?l.jsx("span",{className:"animate-pulse",children:"..."}):v?"Failed":l.jsxs(l.Fragment,{children:[l.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("path",{d:"M8 2v12M2 8h12"})}),"Generate"]})})]})]},`${x.provider}-${x.slug}`)}),l.jsx("button",{onClick:o,className:"w-full py-2 mt-1 text-xs font-sans font-semibold rounded-lg bg-terminal-surface-2 text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors",children:"View all sessions →"})]})}function pb({replays:s,isLoading:r,onViewAll:o,onOpen:c}){return s.length===0?l.jsx("div",{className:"text-center py-6 text-terminal-dimmer text-xs font-mono",children:r?"Loading replays...":"No replays yet. Generate one from the Sessions tab."}):l.jsxs("div",{className:"space-y-1",children:[s.map(d=>l.jsxs("button",{onClick:()=>c(d.slug),className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg hover:bg-terminal-surface-hover transition-colors duration-200 text-left group",children:[l.jsx(lh,{provider:d.provider}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-sans text-terminal-text truncate group-hover:text-terminal-green transition-colors",children:Hc(d)}),l.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[l.jsxs("span",{className:"text-[11px] font-mono text-terminal-dimmer",children:[d.stats.userPrompts," prompts"]}),l.jsx("span",{className:"text-terminal-border text-[10px]",children:"·"}),l.jsxs("span",{className:"text-[11px] font-mono text-terminal-dimmer",children:[d.stats.toolCalls," tools"]}),d.stats.durationMs&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-terminal-border text-[10px]",children:"·"}),l.jsx("span",{className:"text-[11px] font-mono text-terminal-dimmer",children:ga(d.stats.durationMs)})]})]})]}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[d.gist?.gistId&&l.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded bg-terminal-purple-subtle text-terminal-purple",children:"published"}),l.jsx("span",{className:"text-[11px] font-mono text-terminal-dimmer tabular-nums",children:ks(d.startTime)})]})]},d.slug)),l.jsx("button",{onClick:o,className:"w-full py-2 mt-1 text-xs font-sans font-semibold rounded-lg bg-terminal-surface-2 text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors",children:"View all replays →"})]})}const bp=[{name:"gh",label:"GitHub CLI",purpose:"Publish replays as GitHub Gists"},{name:"claude",label:"Claude Code",purpose:"AI feedback via headless mode"},{name:"cursor",label:"Cursor CLI",purpose:"AI feedback via AI Studio"},{name:"opencode",label:"OpenCode",purpose:"AI feedback via headless mode"}];function hb(){const[s,r]=y.useState(()=>bp.map(o=>({...o,installed:!1,detail:"checking...",loading:!0})));return y.useEffect(()=>{let o=!1;for(const c of bp)fetch(`/api/system-checks?tool=${encodeURIComponent(c.name)}`).then(d=>d.ok?d.json():null).then(d=>{if(o)return;const f=d?.checks?.find(m=>m.name===c.name)||d?.checks?.[0];if(!f){r(m=>m.map(x=>x.name===c.name?{...x,installed:!1,detail:"check failed",loading:!1}:x));return}r(m=>m.map(x=>x.name===c.name?{...x,installed:!!f.installed,version:f.version,detail:f.detail,loading:!1}:x))}).catch(()=>{o||r(d=>d.map(f=>f.name===c.name?{...f,installed:!1,detail:"check failed",loading:!1}:f))});return()=>{o=!0}},[]),l.jsxs("div",{className:"bg-terminal-surface rounded-xl p-4 shadow-layer-sm",children:[l.jsx("h3",{className:"text-xs font-sans font-semibold text-terminal-text uppercase tracking-wider mb-3",children:"System"}),l.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-2",children:s.map(o=>l.jsxs("div",{className:"flex items-start gap-2.5 px-3 py-2.5 rounded-lg bg-terminal-bg",children:[l.jsx("div",{className:`w-2 h-2 mt-1 rounded-full shrink-0 ${o.loading?"bg-terminal-blue animate-pulse":o.installed?"bg-terminal-green":"bg-terminal-dim opacity-40"}`}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("span",{className:`text-xs font-sans font-medium ${o.loading?"text-terminal-dim":o.installed?"text-terminal-text":"text-terminal-dimmer"}`,children:o.label}),l.jsx("p",{className:"text-[10px] font-mono text-terminal-dimmer truncate",children:o.purpose}),o.loading?l.jsx("p",{className:"text-[10px] font-mono text-terminal-blue truncate animate-pulse",children:"checking..."}):o.installed?l.jsx("p",{className:"text-[10px] font-mono text-terminal-green truncate",children:o.detail||o.version||"ready"}):l.jsx("p",{className:"text-[10px] font-mono text-terminal-orange truncate",children:o.detail||"not found"})]})]},o.name))})]})}const si=({c:s,children:r})=>l.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:s,children:r}),xb=()=>l.jsx(si,{c:"text-terminal-green",children:l.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),gb=()=>l.jsx(si,{c:"text-terminal-blue",children:l.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})}),bb=()=>l.jsxs(si,{c:"text-terminal-green",children:[l.jsx("polyline",{points:"4 17 10 11 4 5"}),l.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]}),yb=()=>l.jsx(si,{c:"text-terminal-orange",children:l.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})});function vb({onNavigate:s}){const{sources:r,replays:o,loading:c,loadingSources:d,loadingReplays:f,error:m,scanProgress:x,enrichmentStatus:h}=ob(),g=y.useMemo(()=>cb(r,o),[r,o]),[v,w]=y.useState(null),[T,N]=y.useState(null),j=k=>{vt({view:null,session:k})},S=async k=>{w(k.slug),N(null);try{const _=Kr(k),z=await fetch("/api/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:k.provider,filePaths:k.filePaths,toolPaths:k.toolPaths,title:vn(_)||void 0,sessionSlug:k.slug,sessionProject:k.project})}),U=await z.json();if(!z.ok)throw new Error(U.error||"Generation failed");vt({view:null,session:U.slug})}catch(_){console.error("Generate error:",_),N(k.slug),setTimeout(()=>N(z=>z===k.slug?null:z),2e3)}finally{w(null)}};if(c&&!r.length&&!o.length)return l.jsxs("div",{className:"flex-1 overflow-auto p-4 md:p-8 space-y-8 animate-in fade-in duration-500",children:[l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[...Array(4)].map((k,_)=>l.jsx(ub,{},_))}),l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[l.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[l.jsx("div",{className:"bg-terminal-surface rounded-xl p-6 h-[300px] skeleton opacity-10"}),l.jsx("div",{className:"bg-terminal-surface rounded-xl p-6 h-[400px] skeleton opacity-10"})]}),l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"bg-terminal-surface rounded-xl p-6 h-[250px] skeleton opacity-10"}),l.jsx("div",{className:"bg-terminal-surface rounded-xl p-6 h-[350px] skeleton opacity-10"})]})]})]});if(m&&r.length===0&&o.length===0)return l.jsx("div",{className:"flex-1 flex items-center justify-center",children:l.jsx("div",{className:"text-center space-y-2",children:l.jsx("div",{className:"text-terminal-red font-mono text-sm",children:m})})});const E=r.every(k=>k.promptCount!=null)?`across ${g.projectCount} projects`:`${r.filter(k=>k.promptCount!=null).length} of ${r.length} scanned`;return l.jsx("div",{className:"flex-1 overflow-y-auto",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-4 md:px-6 py-6 space-y-6",children:[x!=null&&l.jsxs("div",{className:"flex items-center gap-2 px-1",children:[l.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-terminal-green animate-pulse"}),l.jsxs("span",{className:"text-xs font-mono text-terminal-dim",children:["Scanning... ",x," sessions"]})]}),h?.running&&h.total>0&&l.jsxs("div",{className:"flex items-center gap-2 px-1",children:[l.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-terminal-blue animate-pulse"}),l.jsxs("span",{className:"text-xs font-mono text-terminal-dim",children:["Enriching Cursor stats... ",h.processed,"/",h.total]})]}),l.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[l.jsx(qr,{label:"Sessions",value:g.totalSessions.toLocaleString(),sub:`${g.projectCount} project${g.projectCount!==1?"s":""}`,color:"green",icon:l.jsx(xb,{})}),l.jsx(qr,{label:"Replays",value:g.totalReplays.toLocaleString(),sub:g.publishedCount>0?`${g.publishedCount} published`:void 0,color:"blue",icon:l.jsx(gb,{})}),l.jsx(qr,{label:"Turns",value:g.totalPrompts.toLocaleString(),sub:E,color:"green",icon:l.jsx(bb,{})}),l.jsx(qr,{label:"Tool Calls",value:g.totalToolCalls.toLocaleString(),sub:E,color:"orange",icon:l.jsx(yb,{})})]}),l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-3",children:[l.jsxs("div",{className:"lg:col-span-2 bg-terminal-surface rounded-xl p-4 shadow-layer-sm",children:[l.jsxs("div",{className:"flex items-center justify-between mb-3",children:[l.jsx("h3",{className:"text-xs font-sans font-semibold text-terminal-text uppercase tracking-wider",children:"Activity"}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"w-2 h-2 rounded-sm bg-terminal-orange opacity-70"}),l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:"Claude"})]}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"w-2 h-2 rounded-sm bg-terminal-blue opacity-70"}),l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:"Cursor"})]})]})]}),l.jsx("div",{className:"h-32",children:l.jsx(db,{data:g.activityByDay})})]}),l.jsxs("div",{className:"bg-terminal-surface rounded-xl p-4 shadow-layer-sm space-y-4",children:[l.jsx("h3",{className:"text-xs font-sans font-semibold text-terminal-text uppercase tracking-wider",children:"Summary"}),l.jsx(fb,{breakdown:g.providerBreakdown}),l.jsxs("div",{className:"pt-2 border-t border-terminal-border-subtle space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-xs font-sans text-terminal-dim",children:"Replay coverage"}),l.jsxs("span",{className:"text-sm font-mono font-medium text-terminal-green tabular-nums",children:[Math.round(g.replayConversionPct),"%"]})]}),g.totalDuration>0&&l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-xs font-sans text-terminal-dim",children:"Total replay time"}),l.jsx("span",{className:"text-sm font-mono font-medium text-terminal-text tabular-nums",children:ib(g.totalDuration)})]})]})]})]}),l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[l.jsxs("div",{className:"bg-terminal-surface rounded-xl p-4 shadow-layer-sm",children:[l.jsxs("div",{className:"flex items-center justify-between mb-3",children:[l.jsx("h3",{className:"text-xs font-sans font-semibold text-terminal-text uppercase tracking-wider",children:"Recent Sessions"}),l.jsxs("span",{className:"text-[10px] font-mono text-terminal-dimmer tabular-nums",children:[g.totalSessions," total"]})]}),l.jsx(mb,{sessions:g.recentSources,isLoading:d,onViewAll:()=>s("sessions"),onGenerate:S,onViewReplay:j,generatingSlug:v,generateErrorSlug:T})]}),l.jsxs("div",{className:"bg-terminal-surface rounded-xl p-4 shadow-layer-sm",children:[l.jsxs("div",{className:"flex items-center justify-between mb-3",children:[l.jsx("h3",{className:"text-xs font-sans font-semibold text-terminal-text uppercase tracking-wider",children:"Recent Replays"}),l.jsxs("span",{className:"text-[10px] font-mono text-terminal-dimmer tabular-nums",children:[g.totalReplays," total"]})]}),l.jsx(pb,{replays:g.recentReplays,isLoading:f,onViewAll:()=>s("replays"),onOpen:j})]})]}),l.jsx(hb,{})]})})}function Ir(){return new URLSearchParams(window.location.search).get("project")||yt}function Wr(){return new URLSearchParams(window.location.search).get("q")||""}function Pr(){return new URLSearchParams(window.location.search).get("archived")==="true"}const jb=()=>l.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:[l.jsx("circle",{cx:"8",cy:"3",r:"1.5"}),l.jsx("circle",{cx:"8",cy:"8",r:"1.5"}),l.jsx("circle",{cx:"8",cy:"13",r:"1.5"})]});function sh({provider:s}){return l.jsx("span",{className:`text-[10px] font-sans font-medium px-1.5 py-0.5 rounded-full uppercase tracking-wider ${nh(s)}`,children:th(s)})}function wb({slug:s,title:r,fallbackTitle:o,onSave:c}){const d=vn(r||o||s),[f,m]=y.useState(!1),[x,h]=y.useState(d),[g,v]=y.useState(!1),w=y.useRef(null);y.useEffect(()=>{h(d)},[d]),y.useEffect(()=>{f&&w.current?.focus()},[f]);const T=async()=>{if(!g){v(!0);try{await c(s,vn(x))}finally{v(!1),m(!1)}}};return f?l.jsxs("div",{className:"min-w-0",children:[l.jsx("form",{onSubmit:N=>{N.preventDefault(),T()},className:"flex items-center gap-1.5 min-w-0",children:l.jsx("input",{ref:w,value:x,onChange:N=>h(N.target.value),onBlur:T,onKeyDown:N=>{N.key==="Escape"&&(h(d),m(!1))},className:"bg-terminal-surface-2 rounded px-2 py-0.5 text-sm font-sans text-terminal-text w-full outline-none ring-1 ring-terminal-border-subtle focus:ring-terminal-green/50 transition-shadow duration-200",placeholder:d,maxLength:Wc,disabled:g})}),l.jsxs("div",{className:"text-[11px] font-mono text-terminal-dimmer truncate mt-0.5",children:["slug: ",l.jsx("span",{className:"text-terminal-dim",children:s})]})]}):l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("button",{onClick:()=>m(!0),className:"group flex items-center gap-1 min-w-0 max-w-full text-left",title:"Click to edit title",children:[l.jsx("span",{className:"text-sm font-sans font-medium text-terminal-text truncate",children:d||s}),l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"shrink-0 text-terminal-dim opacity-0 group-hover:opacity-100 transition-opacity",children:l.jsx("path",{d:"M11.5 1.5l3 3-9 9H2.5v-3l9-9z"})})]}),l.jsxs("div",{className:"text-[11px] font-mono text-terminal-dimmer truncate mt-0.5",children:["slug: ",l.jsx("span",{className:"text-terminal-dim",children:s})]})]})}function Sb({onArchive:s,isArchived:r}){const[o,c]=y.useState(!1),d=y.useRef(null);return y.useEffect(()=>{if(!o)return;const f=m=>{d.current&&!d.current.contains(m.target)&&c(!1)};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[o]),l.jsxs("div",{className:"relative",ref:d,children:[l.jsx("button",{onClick:f=>{f.stopPropagation(),c(m=>!m)},className:"h-7 w-7 flex items-center justify-center rounded-md bg-terminal-surface-2 text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors duration-200",title:"More actions",children:l.jsx(jb,{})}),o&&l.jsx("div",{className:"absolute right-0 top-full mt-1 z-50 min-w-[140px] rounded-lg bg-terminal-surface-2 border border-terminal-border shadow-layer-md py-1",children:l.jsxs("button",{onClick:f=>{f.stopPropagation(),s(),c(!1)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs font-sans text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors",children:[l.jsx("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:l.jsx("path",{d:"M2 4h12v2H2zM3 6v7h10V6M6.5 8h3"})}),r?"Unarchive":"Archive"]})})]})}function rh({summary:s,onOpen:r,onTitleSave:o,onDelete:c,onPublishGist:d,onRegenerate:f,onArchive:m,ghAvailable:x,isPublishing:h,isDeleting:g,isRegenerating:v,isArchived:w}){const[T,N]=y.useState(!1),[j,S]=y.useState(!1),C=y.useRef(null);return y.useEffect(()=>{if(!j)return;const E=k=>{C.current&&!C.current.contains(k.target)&&(S(!1),N(!1))};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[j]),l.jsxs("div",{onClick:r,className:`bg-terminal-surface rounded-xl px-5 py-5 hover:bg-terminal-surface-hover transition-all duration-300 ease-material space-y-3.5 shadow-layer-sm cursor-pointer hover-lift ${w?"opacity-50":""}`,children:[l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsx("div",{className:"flex-1 flex items-center gap-2 min-w-0",children:o?l.jsx("div",{className:"flex-1 min-w-0",onClick:E=>E.stopPropagation(),children:l.jsx(wb,{slug:s.slug,title:s.title,fallbackTitle:Hc(s),onSave:o})}):l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("span",{className:"text-sm font-sans font-medium text-terminal-text truncate block",children:Hc(s)}),l.jsxs("div",{className:"text-[11px] font-mono text-terminal-dimmer truncate mt-0.5",children:["slug: ",l.jsx("span",{className:"text-terminal-dim",children:s.slug})]})]})}),l.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[s.gist&&!s.gist.outdated&&l.jsxs("a",{href:s.gist.viewerUrl,target:"_blank",rel:"noopener noreferrer",onClick:E=>E.stopPropagation(),className:"h-7 px-2.5 text-xs font-sans font-semibold rounded-md bg-terminal-purple-subtle text-terminal-purple hover:bg-terminal-purple-emphasis transition-all duration-200 ease-material flex items-center justify-center gap-1.5 shrink-0",title:"View on vibe-replay.com",children:[l.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("path",{d:"M6 3H3v10h10v-3M9 2h5v5M14 2L7 9"})}),"Synced"]}),s.gist?.outdated&&d&&l.jsx("button",{onClick:E=>{E.stopPropagation(),d()},disabled:h,className:"h-7 px-2.5 text-xs font-sans font-semibold rounded-md bg-terminal-orange-subtle text-terminal-orange hover:bg-terminal-orange-emphasis transition-all duration-200 ease-material flex items-center justify-center gap-1.5 shrink-0 disabled:opacity-50",children:h?"Syncing...":"Out of sync"}),x&&d&&!s.gist?.gistId&&l.jsxs("button",{onClick:E=>{E.stopPropagation(),d()},disabled:h,className:"h-7 px-2.5 text-xs font-sans font-semibold rounded-md bg-terminal-purple-subtle text-terminal-purple hover:bg-terminal-purple-emphasis transition-all duration-200 ease-material flex items-center justify-center gap-1.5 shrink-0 disabled:opacity-50",title:"Publish to Gist",children:[h?l.jsx("span",{className:"animate-pulse",children:"..."}):l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:l.jsx("path",{d:"M8 2v8M5 5l3-3 3 3M3 11v2h10v-2"})}),"Upload"]}),f&&l.jsxs("button",{onClick:E=>{E.stopPropagation(),f()},disabled:v,className:"h-7 px-2.5 text-xs font-sans font-semibold rounded-md bg-terminal-blue-subtle text-terminal-blue hover:bg-terminal-blue-emphasis transition-all duration-200 ease-material flex items-center justify-center gap-1.5 shrink-0 disabled:opacity-50",title:"Redo",children:[v?l.jsx("span",{className:"animate-pulse",children:"..."}):l.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),l.jsx("path",{d:"M21 3v5h-5"}),l.jsx("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),l.jsx("path",{d:"M8 16H3v5"})]}),"Redo"]}),l.jsxs("button",{onClick:r,className:"h-7 px-2.5 text-xs font-sans font-semibold rounded-md bg-terminal-green-subtle text-terminal-green hover:bg-terminal-green-emphasis transition-all duration-200 ease-material flex items-center justify-center gap-1 shrink-0",children:[l.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"currentColor",children:l.jsx("polygon",{points:"4 2 14 8 4 14"})}),"View"]}),(c||m)&&l.jsxs("div",{className:"relative",ref:C,children:[l.jsx("button",{onClick:E=>{E.stopPropagation(),S(k=>!k),N(!1)},className:"h-7 w-7 flex items-center justify-center rounded-md bg-terminal-surface-2 text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors duration-200",title:"More actions",children:l.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:[l.jsx("circle",{cx:"8",cy:"3",r:"1.5"}),l.jsx("circle",{cx:"8",cy:"8",r:"1.5"}),l.jsx("circle",{cx:"8",cy:"13",r:"1.5"})]})}),j&&l.jsxs("div",{className:"absolute right-0 top-full mt-1 z-50 min-w-[140px] rounded-lg bg-terminal-surface-2 border border-terminal-border shadow-layer-md py-1",children:[m&&l.jsxs("button",{onClick:E=>{E.stopPropagation(),m(),S(!1)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs font-sans text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors",children:[l.jsx("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:l.jsx("path",{d:"M2 4h12v2H2zM3 6v7h10V6M6.5 8h3"})}),w?"Unarchive":"Archive"]}),c&&l.jsxs(l.Fragment,{children:[m&&l.jsx("div",{className:"mx-2 my-1 border-t border-terminal-border"}),T?l.jsxs("div",{className:"flex items-center gap-1 px-2 py-1",children:[l.jsx("button",{onClick:E=>{E.stopPropagation(),c(),N(!1),S(!1)},className:"h-6 px-2 text-xs font-sans rounded bg-terminal-red-subtle text-terminal-red hover:bg-terminal-red-emphasis transition-colors duration-200",children:"Confirm"}),l.jsx("button",{onClick:()=>N(!1),className:"h-6 px-2 text-xs font-sans rounded text-terminal-dim hover:text-terminal-text transition-colors",children:"Cancel"})]}):l.jsxs("button",{onClick:()=>N(!0),className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs font-sans text-terminal-red hover:bg-terminal-red-subtle transition-colors",children:[l.jsx("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:l.jsx("path",{d:"M3 4h10M5.5 4V3a1 1 0 011-1h3a1 1 0 011 1v1M6.5 7v4M9.5 7v4M4.5 4l.5 9a1 1 0 001 1h4a1 1 0 001-1l.5-9"})}),"Delete"]})]})]})]})]})]}),(s.messages||(s.firstMessage?[s.firstMessage]:[])).map(E=>Es(E||"")).filter(E=>E.length>0).map((E,k)=>l.jsxs("div",{className:"flex gap-2 items-start",children:[l.jsx("span",{className:"text-xs text-terminal-green shrink-0 mt-px select-none",children:">"}),l.jsx("p",{className:"text-sm text-terminal-dim line-clamp-1 leading-relaxed",children:E})]},k)),l.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[l.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-mono tabular-nums px-1.5 py-0.5 rounded-md bg-terminal-surface-2 text-terminal-dim",children:[s.stats.userPrompts," prompts"]}),l.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-mono tabular-nums px-1.5 py-0.5 rounded-md bg-terminal-orange-subtle text-terminal-orange",children:[s.stats.toolCalls," tools"]}),s.stats.durationMs&&l.jsx("span",{className:"inline-flex items-center gap-1 text-xs font-mono tabular-nums px-1.5 py-0.5 rounded-md bg-terminal-surface-2 text-terminal-dim",children:ga(s.stats.durationMs)}),s.stats.costEstimate&&l.jsx("span",{className:"inline-flex items-center gap-1 text-xs font-mono tabular-nums px-1.5 py-0.5 rounded-md bg-terminal-green-subtle text-terminal-green",children:nb(s.stats.costEstimate)}),s.hasAnnotations&&l.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-mono tabular-nums px-1.5 py-0.5 rounded-md bg-terminal-blue-subtle text-terminal-blue",children:[s.annotationCount," annotation",s.annotationCount!==1?"s":""]})]}),l.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono text-terminal-dimmer flex-wrap",children:[l.jsx(sh,{provider:s.provider}),l.jsx("span",{children:s.project}),l.jsx("span",{className:"text-terminal-border",children:"·"}),l.jsx("span",{children:eh(s.startTime)}),s.model&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-terminal-border",children:"·"}),l.jsx("span",{children:s.model})]})]})]})}function yp(){const[s,r]=y.useState(""),[o,c]=y.useState(!1),[d,f]=y.useState(null),m=x=>{x.preventDefault();const h=s.trim();if(!h)return;if(c(!0),f(null),/^[a-f0-9]{20,40}$/.test(h)){window.location.search=`?gist=${h}`;return}const g=h.match(/gist\.github\.com\/[^/]+\/([a-f0-9]{20,40})/);if(g){window.location.search=`?gist=${g[1]}`;return}const v=h.match(/[?&]gist=([a-f0-9]{20,40})/);if(v){window.location.search=`?gist=${v[1]}`;return}try{new URL(h),window.location.search=`?url=${encodeURIComponent(h)}`}catch{f("Enter a valid URL or Gist ID"),c(!1)}};return l.jsxs("form",{onSubmit:m,className:"space-y-2",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{value:s,onChange:x=>{r(x.target.value),f(null)},placeholder:"Paste a Gist ID, Gist URL, or replay JSON URL...",className:"flex-1 bg-terminal-surface rounded-lg px-3 py-2.5 text-sm font-mono text-terminal-text placeholder:text-terminal-dimmer outline-none ring-1 ring-transparent focus:ring-terminal-green/40 transition-shadow duration-200 shadow-layer-sm",disabled:o}),l.jsx("button",{type:"submit",disabled:o||!s.trim(),className:"px-4 py-2 text-xs font-mono rounded-lg bg-terminal-green-subtle text-terminal-green hover:bg-terminal-green-emphasis transition-colors duration-200 disabled:opacity-40 font-medium",children:o?"Loading...":"Open"})]}),d&&l.jsx("div",{className:"text-xs font-mono text-terminal-red",children:d})]})}const yt="__all__";function Nb(){const[s,r]=y.useState([]),[o,c]=y.useState(!0),[d,f]=y.useState(null),[m,x]=y.useState(!1),[h,g]=y.useState(null),[v,w]=y.useState(null),[T,N]=y.useState(null),[j,S]=y.useState(()=>Date.now()),[C,E]=y.useState(Ir()),[k,_]=y.useState(Wr()),[z,U]=y.useState(Pr());y.useEffect(()=>{const $=()=>{E(Ir()),_(Wr()),U(Pr())};return window.addEventListener("popstate",$),()=>window.removeEventListener("popstate",$)},[]);const J=$=>{E($),vt({project:$===yt?null:$})},Z=$=>{_($),vt({q:$||null},{replace:!0})},re=()=>{const $=!z;U($),vt({archived:$?"true":null})},[ae,P]=y.useState(null),[V,oe]=y.useState(null),[ce,ne]=y.useState(null),[pe,B]=y.useState(""),W=y.useRef(null),ie=y.useRef(!1),[le,se]=y.useState(new Set),[A,O]=y.useState(null),[D,ee]=y.useState(null),[X,de]=y.useState(null),xe=s.some($=>$.provider==="cursor"),Oe=y.useCallback(async $=>{c(!0),f(null),w(null),x(!1),g(null);const ye=await fetch("/api/archived").then(tt=>tt.ok?tt.json():{slugs:[]}).catch(()=>({slugs:[]}));se(new Set(ye.slugs));let De=!1;const Ee=await fetch("/api/sources/cached").then(tt=>tt.ok?tt.json():null).catch(()=>null),ve=El(Ee),qe=!$?.forceRefresh&&Vr(ve?.cachedAt);if(ve&&ve.sessions.length>0&&(De=!0,r(ve.sessions),N(ve.cachedAt??null),g(qe?null:ve.cachedAt??null),c(!1),x(!qe)),qe){x(!1),c(!1);return}try{const tt=await fetch("/api/sources");if(!tt.ok)throw new Error("Failed to load sessions");const nt=await tt.json();r(nt.sessions),N(new Date().toISOString()),g(null)}catch(tt){De?w("Failed to refresh latest sessions. Showing cached data."):f(Ba(tt)||"Failed to load sessions")}finally{x(!1),c(!1)}},[]),Te=async $=>{const ye=le.has($);se(De=>{const Ee=new Set(De);return ye?Ee.delete($):Ee.add($),Ee});try{if(!(await fetch(`/api/archive/${$}`,{method:ye?"DELETE":"POST"})).ok)throw new Error("Archive toggle failed")}catch(De){console.error("Archive toggle failed:",Ba(De)),se(Ee=>{const ve=new Set(Ee);return ye?ve.add($):ve.delete($),ve})}};y.useEffect(()=>{Oe(),fetch("/api/gh-status").then($=>$.json()).then($=>O($.available)).catch(()=>O(!1))},[Oe]),y.useEffect(()=>{if(!o&&!xe&&!ie.current)return;let $=!1,ye;const De=async()=>{const ve=await fetch("/api/sources/cached").then(tt=>tt.ok?tt.json():null).catch(()=>null),qe=El(ve);!$&&qe?.sessions.length&&r(qe.sessions)},Ee=async()=>{const ve=await fetch("/api/sources/enrichment-status").then(qe=>qe.ok?qe.json():null).catch(()=>null);!ve||$||(de(ve),ve.running?(ie.current=!0,await De()):ie.current&&(ie.current=!1,await De()))};return Ee(),ye=window.setInterval(()=>{Ee()},2500),()=>{$=!0,ye&&window.clearInterval(ye)}},[xe,o]),y.useEffect(()=>{const $=window.setInterval(()=>S(Date.now()),3e4);return()=>window.clearInterval($)},[]),y.useEffect(()=>{ce&&W.current?.focus()},[ce]);const mt=async($,ye)=>{if(!(await fetch(`/api/sessions/${encodeURIComponent($)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:ye})})).ok)throw new Error("Failed to update title");r(Ee=>Ee.map(ve=>ve.slug===$&&ve.replay?{...ve,replay:{...ve.replay,title:ye||void 0}}:ve))},it=$=>{const ye=Kr($);ne({slug:$.slug,defaultTitle:ye}),B(ye)},te=async()=>{if(!ce)return;const $=s.find(ye=>ye.slug===ce.slug);if($){ne(null),P($.slug),oe(null);try{const ye=await fetch("/api/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:$.provider,filePaths:$.filePaths,toolPaths:$.toolPaths,title:vn(pe)||void 0,sessionSlug:$.slug,sessionProject:$.project})}),De=await ye.json();if(!ye.ok)throw new Error(De.error||"Generation failed");vt({view:null,session:De.slug})}catch(ye){oe(Ba(ye))}finally{P(null)}}},ke=async $=>{ee($);try{const ye=await fetch(`/api/publish/gist?slug=${encodeURIComponent($)}`,{method:"POST"});if(!ye.ok){const Ee=await ye.json().catch(()=>({}));throw new Error(Ee.error||"Publish failed")}const De=await ye.json();r(Ee=>Ee.map(ve=>ve.slug===$&&ve.replay?{...ve,replay:{...ve.replay,gist:{gistId:De.gistId,viewerUrl:De.viewerUrl,updatedAt:new Date().toISOString(),outdated:!1}}}:ve))}catch(ye){console.error("Gist publish error:",Ba(ye))}finally{ee(null)}},we=async $=>{try{if(!(await fetch(`/api/sessions/${encodeURIComponent($)}`,{method:"DELETE"})).ok)return;r(De=>De.map(Ee=>Ee.slug===$?{...Ee,replay:void 0,existingReplay:null}:Ee))}catch{}},$e=s.filter($=>le.has($.slug)).length,Ie=z?s:s.filter($=>!le.has($.slug)),xt=new Map;for(const $ of Ie)xt.has($.project)||xt.set($.project,[]),xt.get($.project)?.push($);const ot=[...xt.entries()].sort(($,ye)=>{const De=$[1][0]?.timestamp||"";return(ye[1][0]?.timestamp||"").localeCompare(De)}),pt=ah(ot.map(([$])=>$)),fn=C===yt?Ie:xt.get(C)||[],ln=k?fn.filter($=>$.slug.toLowerCase().includes(k.toLowerCase())||$.firstPrompt.toLowerCase().includes(k.toLowerCase())||($.title||"").toLowerCase().includes(k.toLowerCase())||($.gitBranch||"").toLowerCase().includes(k.toLowerCase())):fn,Sn=T?Pp(T,j):null,Yn=o&&s.length===0;return d&&s.length===0?l.jsx("div",{className:"flex-1 flex items-center justify-center",children:l.jsxs("div",{className:"text-center space-y-3",children:[l.jsx("div",{className:"text-terminal-red font-mono text-sm",children:d}),l.jsx("button",{onClick:()=>void Oe({forceRefresh:!0}),className:"px-3 py-1.5 text-xs font-mono rounded-md bg-terminal-surface text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors duration-200",children:"Retry"})]})}):s.length===0&&!Yn?l.jsx("div",{className:"flex-1 flex items-center justify-center",children:l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"text-terminal-dim font-mono text-sm",children:"No AI sessions found"}),l.jsx("div",{className:"text-terminal-dimmer font-mono text-xs",children:"Start a coding session with Claude Code or Cursor, then come back here"})]})}):l.jsxs("div",{className:"flex flex-1 min-h-0",children:[l.jsxs("div",{className:"hidden md:flex w-60 shrink-0 flex-col border-r border-terminal-border-subtle bg-terminal-surface/20",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-terminal-border-subtle",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-[10px] font-sans text-terminal-dimmer uppercase tracking-widest font-semibold",children:"Projects"}),Sn&&l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer tabular-nums",children:Sn})]}),l.jsx("button",{onClick:()=>{Oe({forceRefresh:!0})},className:"p-1.5 rounded-md text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors duration-200",title:"Refresh",children:l.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[l.jsx("path",{d:"M2.5 8a5.5 5.5 0 019.3-4M13.5 8a5.5 5.5 0 01-9.3 4"}),l.jsx("path",{d:"M12.5 1v3h-3M3.5 15v-3h3"})]})})]}),l.jsxs("div",{className:"flex-1 overflow-y-auto p-2 space-y-0.5",children:[l.jsxs("button",{onClick:()=>J(yt),className:`w-full text-left px-3 py-2.5 text-xs font-sans rounded-lg transition-all duration-200 ease-material flex items-center justify-between ${C===yt?"bg-terminal-green-subtle text-terminal-green shadow-layer-sm":"text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface"}`,children:[l.jsx("span",{className:"font-medium",children:"All projects"}),l.jsx("span",{className:`tabular-nums px-1.5 py-0.5 rounded-md text-xs ${C===yt?"bg-terminal-green-emphasis text-terminal-green":"bg-terminal-surface text-terminal-dimmer"}`,children:s.length})]}),l.jsx("div",{className:"h-px bg-terminal-border-subtle mx-2 my-1.5"}),ot.map(([$,ye])=>{const De=ye.filter(nt=>nt.existingReplay).length,Ee=C===$,ve=pt.get($)||xa($),qe=ye[0]?.projectExists!==!1,tt=ye.some(nt=>nt.isGitRepo||nt.gitBranch);return l.jsxs("button",{onClick:()=>J($),title:$,className:`w-full text-left px-3 py-2.5 rounded-lg transition-all duration-200 ease-material group ${Ee?"bg-terminal-green-subtle shadow-layer-sm":"hover:bg-terminal-surface"} ${qe?"":"opacity-50"}`,children:[l.jsxs("div",{className:"flex items-center justify-between gap-1.5",children:[l.jsxs("span",{className:`text-xs font-sans truncate flex items-center gap-1.5 ${Ee?"text-terminal-green font-medium":qe?"text-terminal-text group-hover:text-terminal-text":"text-terminal-dim"}`,children:[tt&&l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"currentColor",className:`shrink-0 ${Ee?"opacity-70":"opacity-40"}`,children:l.jsx("path",{fillRule:"evenodd",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})}),ve]}),l.jsx("span",{className:`tabular-nums px-1.5 py-0.5 rounded-md text-xs shrink-0 ${Ee?"bg-terminal-green-emphasis text-terminal-green":"bg-terminal-surface text-terminal-dimmer"}`,children:ye.length})]}),l.jsxs("div",{className:"flex items-center gap-2 mt-1 ml-0.5",children:[l.jsx("span",{className:`text-xs font-mono truncate ${Ee?"text-terminal-dim":"text-terminal-dimmer"}`,children:ks(ye[0]?.timestamp||"")}),De>0&&l.jsxs("span",{className:`text-xs font-mono ${Ee?"text-terminal-green":"text-terminal-dimmer"}`,children:[De," ",De===1?"replay":"replays"]})]})]},$)})]})]}),l.jsxs("div",{className:"flex-1 flex flex-col min-h-0 min-w-0",children:[l.jsx("div",{className:"md:hidden px-3 pt-3",children:l.jsxs("select",{value:C,onChange:$=>J($.target.value),className:"w-full bg-terminal-surface rounded-lg px-3 py-2.5 text-sm font-sans text-terminal-text outline-none shadow-layer-sm",children:[l.jsxs("option",{value:yt,children:["All projects (",s.length,")"]}),ot.map(([$,ye])=>l.jsxs("option",{value:$,children:[pt.get($)||xa($)," (",ye.length,")"]},$))]})}),l.jsxs("div",{className:"px-4 pt-4 pb-2 space-y-3 shrink-0",children:[l.jsxs("div",{className:"hidden md:flex items-center justify-between",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("h2",{className:"text-base font-sans text-terminal-text truncate font-semibold",children:C===yt?"All projects":pt.get(C)||xa(C)}),C!==yt&&l.jsx("span",{className:"text-xs font-mono text-terminal-dimmer truncate block mt-0.5",children:C})]}),l.jsxs("span",{className:"text-xs font-sans text-terminal-dim tabular-nums px-2 py-1 rounded-md bg-terminal-surface",children:[ln.length," session",ln.length!==1?"s":""]})]}),l.jsxs("div",{className:"flex gap-2 items-center",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsxs("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-terminal-dim",width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[l.jsx("circle",{cx:"7",cy:"7",r:"5"}),l.jsx("path",{d:"M11 11l3.5 3.5"})]}),l.jsx("input",{value:k,onChange:$=>Z($.target.value),placeholder:"Filter by branch, title, prompt...",className:"w-full bg-terminal-surface rounded-lg pl-9 pr-3 py-2.5 text-sm font-mono text-terminal-text placeholder:text-terminal-dimmer outline-none ring-1 ring-transparent focus:ring-terminal-green/40 transition-shadow duration-200 shadow-layer-sm"})]}),$e>0&&l.jsx("button",{onClick:re,className:`shrink-0 px-2.5 py-2 text-xs font-mono rounded-lg transition-colors duration-200 ${z?"bg-terminal-orange-subtle text-terminal-orange":"bg-terminal-surface text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover"}`,title:z?"Hide archived":`View all (${$e} archived)`,children:z?"Active":"View all"})]})]}),(Yn||m||h)&&l.jsx("div",{className:"mx-4 mb-2 flex items-center gap-2 rounded-lg px-3 py-2.5 text-xs font-mono bg-terminal-blue-subtle text-terminal-blue shrink-0 shadow-layer-sm",children:Yn?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-blue animate-pulse"}),l.jsx("span",{children:"FETCHING SESSIONS..."})]}):m?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-blue animate-pulse"}),l.jsx("span",{children:"SCANNING LATEST SESSIONS..."}),h&&l.jsxs("span",{className:"text-terminal-dim",children:["Showing stale cache (",Jr(h),")"]})]}):h?l.jsxs("span",{children:["Showing stale cache (",Jr(h),")"]}):null}),X?.running&&X.total>0&&l.jsxs("div",{className:"mx-4 mb-2 flex items-center gap-2 rounded-lg px-3 py-2.5 text-xs font-mono bg-terminal-blue-subtle text-terminal-blue shrink-0 shadow-layer-sm",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-blue animate-pulse"}),l.jsxs("span",{children:["BACKFILLING CURSOR STATS... ",X.processed,"/",X.total]})]}),v&&l.jsxs("div",{className:"mx-4 mb-2 flex items-center gap-2 bg-terminal-orange-subtle rounded-lg px-3 py-2.5 text-xs font-mono text-terminal-orange shrink-0 shadow-layer-sm",children:[l.jsx("span",{children:v}),l.jsx("button",{onClick:()=>w(null),className:"ml-auto text-terminal-orange/60 hover:text-terminal-orange transition-colors",children:"×"})]}),V&&l.jsxs("div",{className:"mx-4 mb-2 flex items-center gap-2 bg-terminal-red-subtle rounded-lg px-3 py-2.5 text-xs font-mono text-terminal-red shrink-0 shadow-layer-sm",children:[l.jsx("span",{children:V}),l.jsx("button",{onClick:()=>oe(null),className:"ml-auto text-terminal-red/60 hover:text-terminal-red transition-colors",children:"×"})]}),ce&&l.jsxs("div",{className:"mx-4 mb-2 bg-terminal-surface rounded-lg px-4 py-3.5 space-y-3 shrink-0 shadow-layer-md",children:[l.jsxs("div",{className:"text-xs font-mono text-terminal-dim",children:["Title for ",l.jsx("span",{className:"text-terminal-text",children:ce.slug})]}),l.jsxs("form",{onSubmit:$=>{$.preventDefault(),te()},className:"flex gap-2",children:[l.jsx("input",{ref:W,value:pe,onChange:$=>B($.target.value),className:"flex-1 bg-terminal-bg rounded-lg px-3 py-2.5 text-sm font-mono text-terminal-text placeholder:text-terminal-dimmer outline-none ring-1 ring-terminal-border-subtle focus:ring-terminal-green/40 transition-shadow duration-200",placeholder:ce.defaultTitle,maxLength:Wc,onKeyDown:$=>{$.key==="Escape"&&ne(null)}}),l.jsx("button",{type:"submit",className:"px-4 py-2 text-xs font-mono rounded-lg bg-terminal-green-subtle text-terminal-green hover:bg-terminal-green-emphasis transition-colors duration-200 font-medium",children:"Generate"}),l.jsx("button",{type:"button",onClick:()=>ne(null),className:"px-3 py-2 text-xs font-mono rounded-lg text-terminal-dim hover:text-terminal-text transition-colors",children:"Cancel"})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto",children:Yn?l.jsx("div",{className:"text-center py-12 text-terminal-dim font-mono text-sm",children:"Fetching sessions..."}):ln.length===0?l.jsx("div",{className:"text-center py-12 text-terminal-dim font-mono text-sm",children:k?"No sessions match your filter":"No sessions in this project"}):l.jsx("div",{className:"space-y-2.5 px-4 py-3",children:ln.map($=>{if($.replay){const qe=le.has($.slug);return l.jsx(rh,{summary:$.replay,onOpen:()=>vt({view:null,session:$.existingReplay}),onTitleSave:mt,onRegenerate:()=>it($),isRegenerating:ae===$.slug,onDelete:()=>we($.slug),onPublishGist:()=>ke($.slug),onArchive:()=>Te($.slug),ghAvailable:A===!0,isPublishing:D===$.slug,isArchived:qe},`${$.provider}-${$.slug}`)}const ye=($.prompts||[]).map(qe=>Es(qe)).filter(qe=>qe.length>0);if(ye.length===0&&$.firstPrompt){const qe=Es($.firstPrompt);qe&&ye.push(qe)}const De=$.gitBranch&&$.gitBranch!=="main"&&$.gitBranch!=="master"?$.gitBranch:void 0,Ee=Kr($),ve=le.has($.slug);return l.jsxs("div",{onClick:()=>it($),className:`bg-terminal-surface rounded-xl px-5 py-4 hover:bg-terminal-surface-hover transition-all duration-300 ease-material space-y-2.5 shadow-layer-sm cursor-pointer hover-lift ${ve?"opacity-50":""}`,children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0 space-y-0.5",children:[l.jsx("span",{className:"text-sm font-mono text-terminal-text truncate block",children:Ee}),l.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[l.jsxs("div",{className:"text-[11px] font-mono text-terminal-dimmer truncate",children:["slug: ",l.jsx("span",{className:"text-terminal-dim",children:$.slug})]}),De&&l.jsxs("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded bg-terminal-surface-2 text-terminal-dim shrink-0 inline-flex items-center gap-0.5",children:[l.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[l.jsx("circle",{cx:"5",cy:"4",r:"2"}),l.jsx("circle",{cx:"11",cy:"12",r:"2"}),l.jsx("path",{d:"M5 6v4c0 1.1.9 2 2 2h2"})]}),De]})]})]}),l.jsxs("div",{className:"flex flex-col items-end gap-1 shrink-0",children:[l.jsx("span",{className:"text-xs font-mono text-terminal-dimmer",children:ks($.timestamp)}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("button",{onClick:qe=>{qe.stopPropagation(),it($)},disabled:ae===$.slug,className:"h-7 px-2.5 text-xs font-sans font-semibold rounded-md bg-terminal-blue-subtle text-terminal-blue hover:bg-terminal-blue-emphasis transition-all duration-200 ease-material flex items-center justify-center gap-1 disabled:opacity-50",children:ae===$.slug?l.jsx("span",{className:"animate-pulse",children:"Generating..."}):l.jsxs(l.Fragment,{children:[l.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("path",{d:"M8 2v12M2 8h12"})}),"Generate"]})}),l.jsx(Sb,{onArchive:()=>Te($.slug),isArchived:ve})]})]})]}),ye.map((qe,tt)=>l.jsxs("div",{className:"flex gap-2 items-start",children:[l.jsx("span",{className:"text-xs text-terminal-green shrink-0 mt-px select-none",children:">"}),l.jsx("p",{className:"text-sm text-terminal-dim line-clamp-1 leading-relaxed",children:qe})]},tt)),l.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[l.jsx(sh,{provider:$.provider}),C===yt&&l.jsx("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded-md bg-terminal-surface-2 text-terminal-dim",title:$.project,children:pt.get($.project)||xa($.project)}),l.jsx("span",{className:"text-xs font-mono tabular-nums px-1.5 py-0.5 rounded-md bg-terminal-surface-2 text-terminal-dimmer",children:ab($.fileSize)}),$.filePaths.length>1&&l.jsxs("span",{className:"text-xs font-mono tabular-nums px-1.5 py-0.5 rounded-md bg-terminal-surface-2 text-terminal-dimmer",children:[$.filePaths.length," parts"]}),$.hasSqlite&&l.jsx("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded-md bg-terminal-green-subtle text-terminal-green",children:"db"})]})]},`${$.provider}-${$.slug}`)})})})]})]})}function kb(){const[s,r]=y.useState([]),[o,c]=y.useState(!0),[d,f]=y.useState(!1),[m,x]=y.useState(!1),[h,g]=y.useState(null),[v,w]=y.useState(null),[T,N]=y.useState(()=>Date.now()),[j,S]=y.useState(null),[C,E]=y.useState(new Set),[k,_]=y.useState(null),[z,U]=y.useState(null),[J,Z]=y.useState(null),[re,ae]=y.useState(Wr()),[P,V]=y.useState(Ir()),[oe,ce]=y.useState(Pr());y.useEffect(()=>{const te=()=>{V(Ir()),ae(Wr()),ce(Pr())};return window.addEventListener("popstate",te),()=>window.removeEventListener("popstate",te)},[]);const ne=te=>{V(te),vt({project:te===yt?null:te})},pe=te=>{ae(te),vt({q:te||null},{replace:!0})},B=()=>{const te=!oe;ce(te),vt({archived:te?"true":null})};y.useEffect(()=>{let te=!0;return(async()=>{c(!0),x(!1),g(null);const we=await fetch("/api/archived").then(pt=>pt.ok?pt.json():{slugs:[]}).catch(()=>({slugs:[]}));te&&E(new Set(we.slugs));let $e=!1;const Ie=await fetch("/api/sessions/cached").then(pt=>pt.ok?pt.json():null).catch(()=>null),xt=El(Ie),ot=Vr(xt?.cachedAt);if(te&&xt&&($e=!0,r(xt.sessions),f(!0),w(xt.cachedAt??null),(xt.sessions.length>0||ot)&&(g(ot?null:xt.cachedAt??null),c(!1),x(!ot))),ot){te&&(x(!1),c(!1));return}try{const pt=await fetch("/api/sessions");if(!pt.ok)throw new Error("Failed to load sessions");const fn=await pt.json();if(!te)return;r(fn),f(!0),w(new Date().toISOString()),g(null)}catch{if(!te)return;$e||f(!1)}finally{te&&(x(!1),c(!1))}})(),fetch("/api/gh-status").then(we=>we.json()).then(we=>S(we.available)).catch(()=>S(!1)),()=>{te=!1}},[]),y.useEffect(()=>{const te=window.setInterval(()=>N(Date.now()),3e4);return()=>window.clearInterval(te)},[]);const W=async te=>{const ke=C.has(te);E(we=>{const $e=new Set(we);return ke?$e.delete(te):$e.add(te),$e});try{if(!(await fetch(`/api/archive/${te}`,{method:ke?"DELETE":"POST"})).ok)throw new Error("Archive toggle failed")}catch(we){console.error("Archive toggle failed:",Ba(we)),E($e=>{const Ie=new Set($e);return ke?Ie.add(te):Ie.delete(te),Ie})}},ie=async(te,ke)=>{if(!(await fetch(`/api/sessions/${encodeURIComponent(te)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:ke})})).ok)throw new Error("Failed to update title");r($e=>$e.map(Ie=>Ie.slug===te?{...Ie,title:ke||void 0}:Ie))},le=te=>{vt({view:null,session:te})},se=async te=>{_(null);try{const ke=await fetch(`/api/sessions/${encodeURIComponent(te)}`,{method:"DELETE"});if(!ke.ok){const we=await ke.json().catch(()=>({}));_(we.error||"Failed to delete session");return}r(we=>we.filter($e=>$e.slug!==te))}catch{_("Failed to delete session")}},A=async te=>{U(te);try{const ke=await fetch(`/api/publish/gist?slug=${encodeURIComponent(te)}`,{method:"POST"});if(!ke.ok){const $e=await ke.json().catch(()=>({}));throw new Error($e.error||"Publish failed")}const we=await ke.json();r($e=>$e.map(Ie=>Ie.slug===te?{...Ie,gist:{gistId:we.gistId,viewerUrl:we.viewerUrl,updatedAt:new Date().toISOString(),outdated:!1}}:Ie))}catch(ke){console.error("Gist publish error:",Ba(ke))}finally{U(null)}},O=async te=>{Z(te.slug);try{const ke=await fetch("/api/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:te.provider,sessionSlug:te.slug,sessionProject:te.project,sessionId:te.sessionId||void 0,title:te.title||void 0})}),we=await ke.json();if(!ke.ok)throw new Error(we.error||"Regeneration failed");vt({view:null,session:we.slug})}catch(ke){console.error("Regenerate error:",Ba(ke))}finally{Z(null)}},D=s.filter(te=>C.has(te.slug)).length,ee=oe?s:s.filter(te=>!C.has(te.slug)),X=new Map;for(const te of ee)X.has(te.project)||X.set(te.project,[]),X.get(te.project)?.push(te);const de=[...X.entries()].sort((te,ke)=>{const we=te[1][0]?.startTime||"";return(ke[1][0]?.startTime||"").localeCompare(we)}),xe=ah(de.map(([te])=>te)),Oe=P===yt?ee:X.get(P)||[],Te=re?Oe.filter(te=>(te.title||"").toLowerCase().includes(re.toLowerCase())||te.slug.toLowerCase().includes(re.toLowerCase())||te.project.toLowerCase().includes(re.toLowerCase())||te.provider.toLowerCase().includes(re.toLowerCase())||(te.firstMessage||"").toLowerCase().includes(re.toLowerCase())):Oe,mt=v?Pp(v,T):null,it=o&&s.length===0;return!it&&(!d||s.length===0)?l.jsx("div",{className:"flex-1 overflow-auto",children:l.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-6 space-y-6",children:[l.jsx(yp,{}),d&&s.length===0&&l.jsxs("div",{className:"text-center py-12 space-y-2",children:[l.jsx("div",{className:"text-terminal-dim font-mono text-sm",children:"No replays yet"}),l.jsx("div",{className:"text-terminal-dimmer font-mono text-xs",children:"Go to the Sessions tab to generate your first replay"})]}),!d&&l.jsx("div",{className:"text-center py-8 space-y-2",children:l.jsxs("div",{className:"text-terminal-dimmer font-mono text-xs",children:["Or run ",l.jsx("span",{className:"text-terminal-green",children:"npx vibe-replay"})," to create a replay from your AI coding sessions"]})})]})}):l.jsxs("div",{className:"flex flex-1 min-h-0",children:[l.jsxs("div",{className:"hidden md:flex w-60 shrink-0 flex-col border-r border-terminal-border-subtle bg-terminal-surface/20",children:[l.jsx("div",{className:"flex items-center justify-between px-4 py-3 border-b border-terminal-border-subtle",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-[10px] font-sans text-terminal-dimmer uppercase tracking-widest font-semibold",children:"Projects"}),mt&&l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer tabular-nums",children:mt})]})}),l.jsxs("div",{className:"flex-1 overflow-y-auto p-2 space-y-0.5",children:[l.jsxs("button",{onClick:()=>ne(yt),className:`w-full text-left px-3 py-2.5 text-xs font-mono rounded-lg transition-all duration-200 ease-material flex items-center justify-between ${P===yt?"bg-terminal-green-subtle text-terminal-green shadow-layer-sm":"text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface"}`,children:[l.jsx("span",{className:"font-medium",children:"All replays"}),l.jsx("span",{className:`tabular-nums px-1.5 py-0.5 rounded-md text-xs ${P===yt?"bg-terminal-green-emphasis text-terminal-green":"bg-terminal-surface text-terminal-dimmer"}`,children:ee.length})]}),l.jsx("div",{className:"h-px bg-terminal-border-subtle mx-2 my-1.5"}),de.map(([te,ke])=>{const we=P===te,$e=xe.get(te)||xa(te),Ie=ke.filter(xt=>xt.gist?.gistId).length;return l.jsxs("button",{onClick:()=>ne(te),title:te,className:`w-full text-left px-3 py-2.5 rounded-lg transition-all duration-200 ease-material group ${we?"bg-terminal-green-subtle shadow-layer-sm":"hover:bg-terminal-surface"}`,children:[l.jsxs("div",{className:"flex items-center justify-between gap-1.5",children:[l.jsx("span",{className:`text-xs font-mono truncate ${we?"text-terminal-green font-medium":"text-terminal-text group-hover:text-terminal-text"}`,children:$e}),l.jsx("span",{className:`tabular-nums px-1.5 py-0.5 rounded-md text-xs shrink-0 ${we?"bg-terminal-green-emphasis text-terminal-green":"bg-terminal-surface text-terminal-dimmer"}`,children:ke.length})]}),l.jsxs("div",{className:"flex items-center gap-2 mt-1 ml-0.5",children:[l.jsx("span",{className:`text-xs font-mono truncate ${we?"text-terminal-dim":"text-terminal-dimmer"}`,children:ks(ke[0]?.startTime||"")}),Ie>0&&l.jsxs("span",{className:`text-xs font-mono ${we?"text-terminal-purple":"text-terminal-dimmer"}`,children:[Ie," published"]})]})]},te)})]})]}),l.jsxs("div",{className:"flex-1 flex flex-col min-h-0 min-w-0",children:[l.jsx("div",{className:"md:hidden px-3 pt-3",children:l.jsxs("select",{value:P,onChange:te=>ne(te.target.value),className:"w-full bg-terminal-surface rounded-lg px-3 py-2.5 text-sm font-mono text-terminal-text outline-none shadow-layer-sm",children:[l.jsxs("option",{value:yt,children:["All replays (",ee.length,")"]}),de.map(([te,ke])=>l.jsxs("option",{value:te,children:[xe.get(te)||xa(te)," (",ke.length,")"]},te))]})}),l.jsxs("div",{className:"px-4 pt-4 pb-2 space-y-3 shrink-0",children:[l.jsx(yp,{}),l.jsxs("div",{className:"hidden md:flex items-center gap-3",children:[l.jsxs("div",{className:"min-w-0 shrink-0",children:[l.jsx("h2",{className:"text-base font-mono text-terminal-text truncate font-semibold",children:P===yt?"All replays":xe.get(P)||xa(P)}),P!==yt&&l.jsx("span",{className:"text-xs font-mono text-terminal-dimmer truncate block mt-0.5",children:P})]}),l.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsxs("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-terminal-dim",width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[l.jsx("circle",{cx:"7",cy:"7",r:"5"}),l.jsx("path",{d:"M11 11l3.5 3.5"})]}),l.jsx("input",{value:re,onChange:te=>pe(te.target.value),placeholder:"Filter replays...",className:"w-full bg-terminal-surface rounded-lg pl-9 pr-3 py-2.5 text-sm font-mono text-terminal-text placeholder:text-terminal-dimmer outline-none ring-1 ring-transparent focus:ring-terminal-green/40 transition-shadow duration-200 shadow-layer-sm"})]}),D>0&&l.jsx("button",{onClick:B,className:`shrink-0 px-2.5 py-2 text-xs font-mono rounded-lg transition-colors duration-200 ${oe?"bg-terminal-orange-subtle text-terminal-orange":"bg-terminal-surface text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover"}`,title:oe?"Hide archived":`View all (${D} archived)`,children:oe?"Active":"View all"})]}),l.jsxs("span",{className:"text-xs font-mono text-terminal-dim tabular-nums px-2 py-1 rounded-md bg-terminal-surface shrink-0",children:[Te.length," replay",Te.length!==1?"s":""]})]}),l.jsxs("div",{className:"md:hidden flex gap-2 items-center",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsxs("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-terminal-dim",width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[l.jsx("circle",{cx:"7",cy:"7",r:"5"}),l.jsx("path",{d:"M11 11l3.5 3.5"})]}),l.jsx("input",{value:re,onChange:te=>pe(te.target.value),placeholder:"Filter replays...",className:"w-full bg-terminal-surface rounded-lg pl-9 pr-3 py-2.5 text-sm font-mono text-terminal-text placeholder:text-terminal-dimmer outline-none ring-1 ring-transparent focus:ring-terminal-green/40 transition-shadow duration-200 shadow-layer-sm"})]}),D>0&&l.jsx("button",{onClick:B,className:`shrink-0 px-2.5 py-2 text-xs font-mono rounded-lg transition-colors duration-200 ${oe?"bg-terminal-orange-subtle text-terminal-orange":"bg-terminal-surface text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover"}`,title:oe?"Hide archived":`View all (${D} archived)`,children:oe?"Active":"View all"})]})]}),(it||m||h)&&l.jsx("div",{className:"mx-4 mb-2 flex items-center gap-2 rounded-lg px-3 py-2.5 text-xs font-mono bg-terminal-blue-subtle text-terminal-blue shrink-0 shadow-layer-sm",children:it?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-blue animate-pulse"}),l.jsx("span",{children:"FETCHING REPLAYS..."})]}):m?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-blue animate-pulse"}),l.jsx("span",{children:"SCANNING LATEST REPLAYS..."}),h&&l.jsxs("span",{className:"text-terminal-dim",children:["Showing stale cache (",Jr(h),")"]})]}):h?l.jsxs("span",{children:["Showing stale cache (",Jr(h),")"]}):null}),k&&l.jsxs("div",{className:"mx-4 mb-2 flex items-center gap-2 bg-terminal-red-subtle rounded-lg px-3 py-2.5 text-xs font-mono text-terminal-red shrink-0 shadow-layer-sm",children:[l.jsx("span",{children:k}),l.jsx("button",{onClick:()=>_(null),className:"ml-auto text-terminal-red/60 hover:text-terminal-red transition-colors",children:"×"})]}),l.jsx("div",{className:"flex-1 overflow-y-auto",children:it?l.jsx("div",{className:"text-center py-12 text-terminal-dim font-mono text-sm",children:"Fetching replays..."}):Te.length===0?l.jsx("div",{className:"text-center py-12 text-terminal-dim font-mono text-sm",children:re?"No replays match your filter":"No replays in this project"}):l.jsx("div",{className:"space-y-2.5 px-4 py-3",children:Te.map(te=>{const ke=C.has(te.slug);return l.jsx(rh,{summary:te,onOpen:()=>le(te.slug),onTitleSave:ie,onDelete:()=>se(te.slug),onPublishGist:()=>A(te.slug),onRegenerate:()=>O(te),onArchive:()=>W(te.slug),ghAvailable:j===!0,isPublishing:z===te.slug,isRegenerating:J===te.slug,isArchived:ke},te.slug)})})})]})]})}function Eb(){const s=!!window.__VIBE_REPLAY_EDITOR__,r=y.useCallback(()=>{const x=new URLSearchParams(window.location.search).get("tab");return x==="home"||x==="sessions"||x==="replays"?x:s?"home":"replays"},[s]),[o,c]=y.useState(r());y.useEffect(()=>{const m=()=>c(r());return window.addEventListener("popstate",m),()=>window.removeEventListener("popstate",m)},[r]);const d=m=>{c(m),vt({tab:m,project:null,q:null,archived:null})},f=(m,x)=>l.jsx("button",{onClick:()=>d(m),className:`px-5 py-2 text-xs font-sans font-semibold rounded-lg transition-all duration-200 ease-material ${o===m?"bg-terminal-green-subtle text-terminal-green shadow-layer-sm":"text-terminal-dim hover:text-terminal-text"}`,children:x},m);return l.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[s&&l.jsx("div",{className:"shrink-0 px-5 py-3 border-b border-terminal-border-subtle bg-terminal-surface/30",children:l.jsxs("div",{className:"inline-flex items-center rounded-xl bg-terminal-surface p-0.5 shadow-layer-sm",children:[f("home","Home"),f("sessions","Sessions"),f("replays","Replays")]})}),o==="home"&&s?l.jsx(vb,{onNavigate:d}):o==="sessions"&&s?l.jsx(Nb,{}):l.jsx(kb,{})]})}function Tb(s,r,o,c){const d=new Date().toISOString(),f={id:crypto.randomUUID(),sceneIndex:r,body:o,author:"anonymous",createdAt:d,updatedAt:d,resolved:!1};return[...s,f]}function Ab(s,r,o){return s.map(c=>c.id===r?{...c,body:o,updatedAt:new Date().toISOString()}:c)}function Cb(s,r){return s.filter(o=>o.id!==r)}function Rb(s){return new Set(s.map(r=>r.sceneIndex))}function _b(s){const r=new Map;for(const o of s)r.set(o.sceneIndex,(r.get(o.sceneIndex)||0)+1);return r}function Ob(s,r){return JSON.stringify(s)!==JSON.stringify(r)}function vp(s){return s.type==="tool-call"&&!s.diff&&!s.bashOutput}function ih(s,r){const o=s[r];if(!vp(o))return r;const c=o.toolName;let d=r;for(;d+1<s.length&&vp(s[d+1])&&s[d+1].toolName===c;)d++;return d}function ys(s,r){return(()=>{switch(s.type){case"user-prompt":return 1200;case"thinking":return 600;case"text-response":{const c=s.content.length;return Math.max(800,Math.min(c/40,5)*600)}case"tool-call":return s.diff?1200:s.bashOutput?900:400;case"compaction-summary":return 800;default:return 800}})()/r}function Mb(s){const r=[];for(let o=0;o<s.length;o++)s[o].type==="user-prompt"&&r.push(o);return r}function zb(s,r){return s.find(o=>o>r)}function Db(s,r){for(let o=s.length-1;o>=0;o--)if(s[o]<r)return s[o]}function Mc(s,r,o){let c=r+1;if(c>=s.length)return-1;if(o.promptsOnly){for(;c<s.length&&s[c].type!=="user-prompt"&&s[c].type!=="compaction-summary";)c++;return c>=s.length?-1:c}if(o.compactAssistant&&!(s[c].type==="user-prompt"||s[c].type==="compaction-summary")){let f=c;for(;f+1<s.length&&s[f+1].type!=="user-prompt"&&s[f+1].type!=="compaction-summary";)f++;return f}return ih(s,c)}function jp(s,r,o){let c=Math.max(0,r-1);if(r<=0)return 0;if(o.promptsOnly){for(;c>0&&s[c].type!=="user-prompt"&&s[c].type!=="compaction-summary";)c--;return c}if(o.compactAssistant){if(!(s[r].type==="user-prompt"||s[r].type==="compaction-summary")){let m=r;for(;m>0&&s[m-1].type!=="user-prompt"&&s[m-1].type!=="compaction-summary";)m--;return Math.max(0,m-1)}return Math.max(0,r-1)}const d=s[c];if(d.type==="tool-call"&&!d.diff&&!d.bashOutput){const f=d.toolName;for(;c>0&&s[c-1].type==="tool-call"&&!s[c-1].diff&&!s[c-1].bashOutput&&s[c-1].toolName===f;)c--}return c}const Lb="vibe-replay-annotations-";function Yr(s){return Lb+s}function bn(s){const r=new URLSearchParams(window.location.search).get("session");if(!r)return s;const o=s.includes("?")?"&":"?";return`${s}${o}slug=${encodeURIComponent(r)}`}function Bb(s,r="embedded"){const o=s.meta.sessionId,c=r==="editor",d=!!window.__VIBE_REPLAY_DATA__||c,[f,m]=y.useState(()=>{const O=s.annotations??[];if(c)return O;try{const D=localStorage.getItem(Yr(o));if(D){const ee=JSON.parse(D);if(ee.length>0||O.length===0)return ee}}catch{}return O}),[x,h]=y.useState(()=>s.annotations??[]),g=Ob(f,x),v=y.useRef(null);y.useEffect(()=>{if(c)return v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{fetch(bn("/api/annotations"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}).then(()=>{h(f)}).catch(()=>{})},1e3),()=>{v.current&&clearTimeout(v.current)};try{localStorage.setItem(Yr(o),JSON.stringify(f))}catch{}},[f,o,c]);const w=y.useMemo(()=>Rb(f),[f]),T=y.useMemo(()=>_b(f),[f]),N=y.useCallback((O,D)=>{m(ee=>Tb(ee,O,D))},[]),j=y.useCallback((O,D)=>{m(ee=>Ab(ee,O,D))},[]),S=y.useCallback(O=>{m(D=>Cb(D,O))},[]),C=y.useCallback(()=>{if(c)return;const O={...s,annotations:f},ee=`window.__VIBE_REPLAY_DATA__ = ${JSON.stringify(O).replace(/<\//g,"<\\/")};`,X=document.getElementById("vibe-replay-data");if(X){const xe=X.textContent;X.textContent=ee;const Oe=`<!DOCTYPE html>
57
+ ${document.documentElement.outerHTML}`;X.textContent=xe,de(Oe)}else{const xe=document.createElement("script");xe.id="vibe-replay-data",xe.textContent=ee,document.head.appendChild(xe);const Oe=`<!DOCTYPE html>
58
+ ${document.documentElement.outerHTML}`;document.head.removeChild(xe),de(Oe)}function de(xe){const Oe=new Blob([xe],{type:"text/html"}),Te=URL.createObjectURL(Oe),mt=document.createElement("a");mt.href=Te,mt.download=`${s.meta.slug||"replay"}.html`,document.body.appendChild(mt),mt.click(),document.body.removeChild(mt),URL.revokeObjectURL(Te)}h(f);try{localStorage.removeItem(Yr(o))}catch{}},[s,f,o,c]),E=y.useCallback(()=>{const O={...s,annotations:f},D=JSON.stringify(O,null,2),ee=new Blob([D],{type:"application/json"}),X=URL.createObjectURL(ee),de=document.createElement("a");de.href=X,de.download="replay.json",document.body.appendChild(de),de.click(),document.body.removeChild(de),URL.revokeObjectURL(X),h(f);try{localStorage.removeItem(Yr(o))}catch{}},[s,f,o]),[k,_]=y.useState(!1),z=c?async()=>{_(!0);try{await fetch(bn("/api/annotations"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});const O=await fetch(bn("/api/publish/gist"),{method:"POST"}),D=await O.json();if(!O.ok)throw new Error(D.error||`Server error: ${O.status}`);return h(f),D}finally{_(!1)}}:null,[U,J]=y.useState([]),[Z,re]=y.useState(null),[ae,P]=y.useState(!1),V=y.useRef(null),oe=y.useMemo(()=>Z&&U.find(O=>O.name===Z)||null,[Z,U]);y.useEffect(()=>{c&&fetch(bn("/api/feedback/detect")).then(O=>O.json()).then(O=>{if(!O.available)return;const D=Array.isArray(O.tools)?O.tools:O.tool?[O.tool]:[];J(D);const ee=O.defaultTool?.name||O.tool?.name||D[0]?.name||null;re(ee)}).catch(()=>{})},[c]);const ce=c&&Z?async()=>{const O=new AbortController;V.current=O,P(!0);try{await fetch(bn("/api/annotations"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f),signal:O.signal});const D=await fetch(bn("/api/feedback/generate"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolName:Z}),signal:O.signal}),ee=await D.json();if(!D.ok)throw new Error(ee.error||"AI Coach failed");return m(ee.annotations),h(ee.annotations),{score:ee.score,itemCount:ee.itemCount}}finally{V.current=null,P(!1)}}:null,ne=c?O=>{re(O)}:null,pe=c?()=>{V.current&&V.current.abort()}:null,[B,W]=y.useState(!1),ie=c?async()=>{W(!0);try{await fetch(bn("/api/annotations"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});const O=await fetch(bn("/api/export/html"),{method:"POST"}),D=await O.json();if(!O.ok)throw new Error(D.error||`Export failed: ${O.status}`);const{path:ee}=D;return h(f),ee}finally{W(!1)}}:null,[le,se]=y.useState(!1);return{annotations:f,annotatedScenes:w,annotationCounts:T,add:N,update:j,remove:S,hasUnsaved:g,canSaveHtml:d,downloadHtml:C,downloadJson:E,publishGist:z,exportHtml:ie,exportGithub:c?async()=>{se(!0);try{await fetch(bn("/api/annotations"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});const O=await fetch(bn("/api/export/github"),{method:"POST"}),D=await O.json();if(!O.ok)throw new Error(D.error||`Export failed: ${O.status}`);return h(f),D}finally{se(!1)}}:null,gistPublishing:k,htmlExporting:B,githubExporting:le,aiCoachTool:oe,aiCoachTools:U,aiCoachToolName:Z,setAiCoachToolName:ne,runAiCoach:ce,cancelAiCoach:pe,aiCoachRunning:ae}}const wp={version:1,overlays:[]};function vs(s){const r=new URLSearchParams(window.location.search).get("session");if(!r)return s;const o=s.includes("?")?"&":"?";return`${s}${o}slug=${encodeURIComponent(r)}`}function Ub(s,r="embedded"){const o=r==="editor",[c,d]=y.useState(wp),[f,m]=y.useState(new Set),[x,h]=y.useState(!1),[g,v]=y.useState([]),[w,T]=y.useState(null),[N,j]=y.useState(!1),[S,C]=y.useState(!1),E=y.useRef(null),k=y.useRef(null),_=y.useRef(!1);y.useEffect(()=>{o&&fetch(vs("/api/overlays")).then(le=>le.json()).then(le=>{le&&Array.isArray(le.overlays)&&d(le)}).catch(()=>{}).finally(()=>{_.current=!0})},[o]),y.useEffect(()=>{o&&fetch(vs("/api/feedback/detect")).then(le=>le.json()).then(le=>{if(!le.available)return;const se=Array.isArray(le.tools)?le.tools:le.tool?[le.tool]:[];v(se);const A=le.defaultTool?.name||le.tool?.name||se[0]?.name||null;T(A)}).catch(()=>{})},[o]),y.useEffect(()=>{if(!(!o||!_.current))return k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{fetch(vs("/api/overlays"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}).catch(()=>{})},1e3),()=>{k.current&&clearTimeout(k.current)}},[c,o]);const z=y.useCallback(le=>{const se=s.scenes[le];if(!se||se.type!=="user-prompt"&&se.type!=="text-response")return null;if(x||f.has(le))return se.content;const A=c.overlays.filter(D=>D.sceneIndex===le);return A.length===0?se.content:A.reduce((D,ee)=>D.updatedAt>ee.updatedAt?D:ee).modifiedValue},[s.scenes,c,f,x]),U=y.useMemo(()=>{if(c.overlays.length===0||x)return s;const le=new Map;for(const A of c.overlays){const O=le.get(A.sceneIndex);O?O.push(A):le.set(A.sceneIndex,[A])}const se=new Map;for(const[A,O]of le){const D=O.reduce((ee,X)=>ee.updatedAt>X.updatedAt?ee:X);se.set(A,D.modifiedValue)}return se.size===0?s:{...s,scenes:s.scenes.map((A,O)=>{if(f.has(O))return A;const D=se.get(O);return D&&(A.type==="user-prompt"||A.type==="text-response")?{...A,content:D}:A})}},[s,c,f,x]),J=y.useCallback(le=>c.overlays.some(se=>se.sceneIndex===le),[c]),Z=y.useCallback(le=>c.overlays.filter(se=>se.sceneIndex===le),[c]),re=y.useCallback(le=>{d(le)},[]),ae=y.useCallback(le=>{d(se=>({...se,overlays:se.overlays.filter(A=>A.id!==le)}))},[]),P=y.useCallback(le=>{d(se=>({...se,overlays:se.overlays.filter(A=>A.sceneIndex!==le)}))},[]),V=y.useCallback(()=>{d(wp)},[]),oe=y.useCallback((le,se)=>{d(A=>({...A,overlays:A.overlays.map(O=>O.id===le?{...O,modifiedValue:se,source:{type:"manual"},updatedAt:new Date().toISOString()}:O)}))},[]),ce=y.useCallback(le=>{m(se=>{const A=new Set(se);return A.has(le)?A.delete(le):A.add(le),A})},[]),ne=y.useCallback(()=>{h(le=>!le)},[]),pe=y.useMemo(()=>o?le=>T(le):null,[o]),B=y.useMemo(()=>o?()=>{E.current&&E.current.abort()}:null,[o]),W=y.useMemo(()=>o&&w?async le=>{const se=new AbortController;E.current=se,j(!0);try{const A=await fetch(vs("/api/studio/translate"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolName:w,targetLang:le.targetLang,sourceLang:le.sourceLang}),signal:se.signal}),O=await A.json();if(!A.ok)throw new Error(O.error||"Translation failed");return O.overlays&&d(O.overlays),O.stats}finally{E.current=null,j(!1)}}:null,[o,w]),ie=y.useMemo(()=>o&&w?async le=>{const se=new AbortController;E.current=se,C(!0);try{const A=await fetch(vs("/api/studio/tone"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolName:w,style:le.style}),signal:se.signal}),O=await A.json();if(!A.ok)throw new Error(O.error||"Tone adjustment failed");return O.overlays&&d(O.overlays),O.stats}finally{E.current=null,C(!1)}}:null,[o,w]);return{overlays:c,effectiveSession:U,getEffectiveContent:z,hasOverlay:J,getOverlays:Z,overlayCount:c.overlays.length,setOverlays:re,revertOverlay:ae,revertSceneOverlays:P,revertAll:V,updateOverlay:oe,showOriginal:f,toggleOriginal:ce,showAllOriginals:x,toggleAllOriginals:ne,studioTools:g,studioToolName:w,setStudioToolName:pe,studioToolsAvailable:g.length>0,translating:N,toningDown:S,cancelStudio:B,runTranslate:W,runTone:ie}}function $b(s){const r=s;if(!r)return!1;const o=r.tagName;if(o==="INPUT"||o==="TEXTAREA"||o==="SELECT"||r.isContentEditable)return!0;const c=r.getAttribute("role");return c==="textbox"||c==="combobox"}function Hb(s,r,o=!0){const[c,d]=y.useState("idle"),[f,m]=y.useState(-1),[x,h]=y.useState(1),[g,v]=y.useState(0),w=y.useRef(null),T=y.useRef(c),N=y.useRef(f),j=y.useRef(x),S=y.useRef(r);T.current=c,N.current=f,j.current=x,S.current=r;const C=y.useMemo(()=>Mb(s),[s]),E=y.useCallback(()=>{w.current&&(clearTimeout(w.current),w.current=null)},[]),k=y.useCallback(()=>{if(T.current!=="playing")return;const P=Mc(s,N.current,S.current);if(P===-1){d("ended"),m(s.length-1),v(s.length);return}m(P),v(P+1);const V=ys(s[P],j.current);w.current=setTimeout(k,V)},[s]),_=y.useCallback(()=>{s.length!==0&&(T.current==="ended"&&(m(-1),v(0)),d("playing"),setTimeout(()=>{if(N.current<0){const P=ih(s,0);m(P),v(P+1);const V=ys(s[P],j.current);w.current=setTimeout(k,V)}else{const P=s[N.current];if(P){const V=ys(P,j.current)/2;w.current=setTimeout(k,V)}}},50))},[s,k]),z=y.useCallback(()=>{E(),d("paused")},[E]),U=y.useCallback(()=>{T.current==="playing"?z():_()},[_,z]),J=y.useCallback(P=>{E();const V=Math.max(0,Math.min(P,s.length-1));if(m(V),v(V+1),T.current==="playing"){const oe=ys(s[V],j.current);w.current=setTimeout(k,oe)}(T.current==="ended"||T.current==="idle")&&d("paused")},[s,E,k]),Z=y.useCallback(()=>{const P=zb(C,N.current);P!==void 0&&J(P)},[C,J]),re=y.useCallback(()=>{const P=Db(C,N.current);P!==void 0&&J(P)},[C,J]),ae=y.useCallback(P=>{if(h(P),T.current==="playing"){E();const V=s[N.current];if(V){const oe=ys(V,P);w.current=setTimeout(k,oe)}}},[s,E,k]);return y.useEffect(()=>E,[E]),y.useEffect(()=>{if(!o)return;const P=V=>{if(!$b(V.target))if(V.key===" "||V.key==="k")V.preventDefault(),U();else if(V.key==="ArrowDown"||V.key==="j"){T.current==="playing"&&z(),V.preventDefault();const oe=Mc(s,N.current,S.current);oe!==-1&&J(oe)}else if(V.key==="ArrowUp"||V.key==="k"){T.current==="playing"&&z(),V.preventDefault();const oe=jp(s,N.current,S.current);J(oe)}else V.key==="ArrowLeft"||V.key==="h"?(V.preventDefault(),window.dispatchEvent(new CustomEvent("vibe:toggle-expand",{detail:{action:"collapse"}}))):V.key==="Escape"?T.current==="playing"&&(V.preventDefault(),z()):V.key==="ArrowRight"||V.key==="l"?(V.preventDefault(),window.dispatchEvent(new CustomEvent("vibe:toggle-expand",{detail:{action:"expand"}}))):V.key==="n"?(V.preventDefault(),Z()):V.key==="p"?(V.preventDefault(),re()):V.key==="Home"?(V.preventDefault(),J(0)):(V.key==="End"||V.key==="e")&&(V.preventDefault(),J(s.length-1))};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[o,U,J,Z,re,s,z]),{state:c,currentIndex:f,visibleCount:g,speed:x,play:_,pause:z,togglePlayPause:U,seekTo:J,changeSpeed:ae,jumpToNextUserPrompt:Z,jumpToPrevUserPrompt:re,userPromptIndices:C,totalScenes:s.length,computeNextIndex:y.useCallback(P=>Mc(s,P,r),[s,r]),computePrevIndex:y.useCallback(P=>jp(s,P,r),[s,r])}}function Gb(s){switch(s.displayMode){case"all":return{hideThinking:!1,collapseAllTools:!1,promptsOnly:!1,compactAssistant:!1};case"compact":return{hideThinking:!0,collapseAllTools:!0,promptsOnly:!1,compactAssistant:!0};case"custom":return{hideThinking:s.hideThinking,collapseAllTools:s.collapseAllTools,promptsOnly:s.promptsOnly,compactAssistant:!1}}}const Gc="vibe-replay-view-prefs",zc={displayMode:"compact",hideThinking:!1,collapseAllTools:!1,promptsOnly:!1};function qb(){try{const s=localStorage.getItem(Gc);if(s){const r=JSON.parse(s);return r.displayMode?{...zc,...r}:{...zc,...r,displayMode:"compact"}}}catch{}return zc}function Yb(){const[s,r]=y.useState(qb),o=y.useCallback((d,f)=>{r(m=>{const x={...m,[d]:f};return localStorage.setItem(Gc,JSON.stringify(x)),x})},[]),c=y.useCallback(d=>{r(f=>{const m=f[d];if(typeof m!="boolean")return f;const x={...f,[d]:!m};return localStorage.setItem(Gc,JSON.stringify(x)),x})},[]);return{prefs:s,updatePref:o,togglePref:c}}function Sp({size:s=14}){return l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"})})}function Zb({className:s=""}){return l.jsxs("svg",{className:`animate-spin h-3.5 w-3.5 ${s}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function Fb({toolName:s}){return s==="claude"?l.jsxs("div",{className:"mt-2 text-xs font-mono text-terminal-dim leading-relaxed space-y-1",children:[l.jsxs("p",{children:["Runs"," ",l.jsx("code",{className:"px-1 py-0.5 rounded bg-terminal-surface-inset text-terminal-text",children:"claude -p"})," ","locally with your prompt piped to stdin. Uses your existing auth and token quota."]}),l.jsxs("p",{className:"text-terminal-dimmer",children:["Auth issues? Run"," ",l.jsx("code",{className:"px-1 py-0.5 rounded bg-terminal-surface-inset text-terminal-text",children:"claude"})," ","in your terminal to re-login."]})]}):s==="agent"?l.jsxs("div",{className:"mt-2 text-xs font-mono text-terminal-dim leading-relaxed space-y-1",children:[l.jsxs("p",{children:["Runs"," ",l.jsx("code",{className:"px-1 py-0.5 rounded bg-terminal-surface-inset text-terminal-text",children:"agent -p"})," ","locally with your prompt piped to stdin. Uses your Cursor subscription or API key."]}),l.jsxs("p",{className:"text-terminal-dimmer",children:["Auth issues? Check Cursor IDE settings or run"," ",l.jsx("code",{className:"px-1 py-0.5 rounded bg-terminal-surface-inset text-terminal-text",children:"agent"})," ","in your terminal."]})]}):s==="opencode"?l.jsxs("div",{className:"mt-2 text-xs font-mono text-terminal-dim leading-relaxed space-y-1",children:[l.jsxs("p",{children:["Runs"," ",l.jsx("code",{className:"px-1 py-0.5 rounded bg-terminal-surface-inset text-terminal-text",children:"opencode run"})," ","locally with your prompt piped to stdin. Uses your existing OpenCode configuration."]}),l.jsxs("p",{className:"text-terminal-dimmer",children:["Not working? Run"," ",l.jsx("code",{className:"px-1 py-0.5 rounded bg-terminal-surface-inset text-terminal-text",children:"opencode"})," ","in your terminal to verify setup."]})]}):l.jsxs("p",{className:"mt-2 text-xs font-mono text-terminal-dim leading-relaxed",children:["Runs ",l.jsx("span",{className:"text-terminal-text font-medium",children:s})," locally on your machine using your existing auth."]})}const Xb=["English","Chinese (Simplified)","Chinese (Traditional)","Japanese","Korean","Spanish","French","German","Portuguese","Russian"],Qb=[{value:"professional",label:"Professional"},{value:"neutral",label:"Neutral"},{value:"friendly",label:"Friendly"}];function Vb({annotationActions:s,overlayActions:r}){const{studioTools:o,studioToolName:c,setStudioToolName:d,studioToolsAvailable:f,translating:m,toningDown:x,cancelStudio:h,runTranslate:g,runTone:v,overlayCount:w,revertAll:T}=r,{runAiCoach:N,aiCoachRunning:j,cancelAiCoach:S,aiCoachTools:C,aiCoachToolName:E,setAiCoachToolName:k}=s,_=!!N,z=s.annotations.some(X=>X.author==="vibe-feedback"),[U,J]=y.useState("English"),[Z,re]=y.useState("professional"),[ae,P]=y.useState(null),[V,oe]=y.useState(null),[ce,ne]=y.useState(null),[pe,B]=y.useState(null),W=j||m||x,ie=o.length>0?o:C,le=c||E,se=y.useCallback(async()=>{if(N){P(null),B(null);try{const X=await N();P({type:"success",text:`Score ${X.score}/10 — ${X.itemCount} comment(s)`})}catch(X){if(X?.name==="AbortError")return;P({type:"error",text:X?.message||"AI Coach failed"})}}},[N]),A=y.useCallback(async()=>{if(g){oe(null),B(null);try{const X=await g({targetLang:U});oe({type:"success",text:`${X.translated} message(s) translated, ${X.skipped} unchanged`})}catch(X){if(X?.name==="AbortError")return;oe({type:"error",text:X?.message||"Translation failed"})}}},[g,U]),O=y.useCallback(async()=>{if(v){ne(null),B(null);try{const X=await v({style:Z});ne({type:"success",text:`${X.adjusted} prompt(s) adjusted, ${X.skipped} unchanged`})}catch(X){if(X?.name==="AbortError")return;ne({type:"error",text:X?.message||"Tone adjustment failed"})}}},[v,Z]),D=X=>r.overlays.overlays.some(de=>de.source.type===X),ee=X=>{if(X==="coach"&&z){B("coach");return}if(X==="translate"&&D("translate")){B("translate");return}if(X==="tone"&&D("tone")){B("tone");return}X==="coach"?se():X==="translate"?A():O()};return!f&&C.length===0?l.jsxs("div",{className:"flex flex-col h-full",children:[l.jsxs("div",{className:"px-4 py-2.5 border-b border-terminal-border-subtle flex items-center gap-2",children:[l.jsx(Sp,{size:12}),l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-text uppercase tracking-widest",children:"AI Studio"})]}),l.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-6 py-8 text-center",children:[l.jsx("div",{className:"w-10 h-10 rounded-xl bg-terminal-surface flex items-center justify-center mb-3",children:l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-terminal-dim",children:[l.jsx("circle",{cx:"12",cy:"12",r:"10"}),l.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),l.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),l.jsx("div",{className:"text-sm font-sans font-semibold text-terminal-text mb-1",children:"No AI tools detected"}),l.jsx("p",{className:"text-xs font-mono text-terminal-dim mb-4 leading-relaxed",children:"AI Studio requires a local CLI tool. Install one of the following:"}),l.jsx("div",{className:"w-full space-y-2 text-left",children:[{name:"Claude Code",cmd:"npm install -g @anthropic-ai/claude-code",rec:!0},{name:"Cursor CLI",cmd:'Bundled with Cursor IDE (run as "agent")'},{name:"OpenCode",cmd:"go install github.com/opencode-ai/opencode@latest"}].map(X=>l.jsxs("div",{className:"px-3 py-2 rounded-lg bg-terminal-surface border border-terminal-border-subtle",children:[l.jsxs("div",{className:"text-xs font-sans font-medium text-terminal-text flex items-center gap-1.5",children:[X.name,X.rec&&l.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded bg-terminal-green-subtle text-terminal-green",children:"recommended"})]}),l.jsx("div",{className:"text-xs font-mono text-terminal-dim mt-0.5 break-all",children:X.cmd})]},X.name))}),l.jsxs("p",{className:"mt-4 text-xs font-mono text-terminal-dimmer leading-relaxed text-center",children:["AI Studio runs the CLI tool in headless mode,"," ",l.jsx("span",{className:"text-terminal-green font-medium",children:"locally"})," on your machine."]})]})]}):l.jsxs("div",{className:"flex flex-col h-full",children:[l.jsxs("div",{className:"px-4 py-2.5 border-b border-terminal-border-subtle flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Sp,{size:12}),l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-text uppercase tracking-widest",children:"AI Studio"})]}),w>0&&l.jsxs("button",{onClick:T,className:"text-[10px] font-mono px-1.5 py-0.5 rounded bg-terminal-purple-subtle text-terminal-purple hover:bg-terminal-red-subtle hover:text-terminal-red transition-colors",children:["Revert All (",w,")"]})]}),l.jsxs("div",{className:"flex-1 overflow-y-auto",children:[l.jsxs("div",{className:"px-4 py-3 border-b border-terminal-border-subtle bg-terminal-surface/30",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-xs font-mono text-terminal-dim",children:"Tool"}),ie.length>1&&d?l.jsx("select",{value:le||"",onChange:X=>{d(X.target.value),k&&k(X.target.value)},className:"bg-terminal-surface border border-terminal-border rounded-lg px-2 py-0.5 text-xs font-mono text-terminal-text outline-none cursor-pointer hover:border-terminal-purple/30 transition-colors",children:ie.map(X=>l.jsx("option",{value:X.name,children:X.name},X.name))}):l.jsx("span",{className:"text-xs font-mono font-medium text-terminal-text px-2 py-0.5 rounded-lg bg-terminal-surface border border-terminal-border",children:le})]}),l.jsx(Fb,{toolName:le})]}),l.jsxs("div",{className:"p-4 space-y-3",children:[_&&l.jsx(Dc,{title:"AI Coach",preview:l.jsxs("div",{className:"mt-2.5 rounded-lg bg-terminal-surface-inset border border-terminal-border overflow-hidden",children:[l.jsx("div",{className:"px-3 py-2.5 border-b border-terminal-border-subtle",children:l.jsx("div",{className:"text-xs font-mono text-terminal-green leading-relaxed",children:"Fix the login bug users reported"})}),l.jsxs("div",{className:"px-3 py-2 flex items-start gap-2",children:[l.jsx("span",{className:"text-xs shrink-0",children:"💬"}),l.jsx("span",{className:"text-xs font-mono text-terminal-blue leading-relaxed",children:"Be specific — which file? what error?"})]}),l.jsxs("div",{className:"px-3 py-2 border-t border-terminal-border-subtle flex items-center gap-2",children:[l.jsx("span",{className:"text-xs font-mono font-semibold text-terminal-orange",children:"6/10"}),l.jsxs("span",{className:"text-xs font-mono text-terminal-dimmer",children:["·"," 4 comments added inline"]})]})]}),description:"Score your prompting technique and get inline coaching comments.",running:j,disabled:W,status:ae,buttonLabel:z?"Re-run Coach":"Run Coach",runningLabel:"Analyzing...",onRun:()=>ee("coach"),onCancel:S||void 0,showRerunConfirm:pe==="coach",rerunWarning:"Existing AI feedback will be replaced.",onConfirmRerun:()=>void se(),onCancelRerun:()=>B(null)}),g&&l.jsx(Dc,{title:"Translate",preview:l.jsxs("div",{className:"mt-2.5 rounded-lg bg-terminal-surface-inset border border-terminal-border overflow-hidden",children:[l.jsxs("div",{className:"px-3 py-2.5 space-y-1",children:[l.jsx("div",{className:"text-xs font-mono text-terminal-dim line-through opacity-60",children:"这个bug怎么修?"}),l.jsx("div",{className:"text-xs font-mono text-terminal-green",children:"How to fix this bug?"})]}),l.jsxs("div",{className:"px-3 py-2.5 border-t border-terminal-border-subtle space-y-1",children:[l.jsx("div",{className:"text-xs font-mono text-terminal-dim line-through opacity-60",children:"已写入。以后用中文问我..."}),l.jsx("div",{className:"text-xs font-mono text-terminal-blue",children:"Done. Ask me in Chinese..."})]})]}),description:"Translate all prompts and responses for sharing with international teams.",running:m,disabled:W,status:V,buttonLabel:D("translate")?"Re-translate":"Translate All",runningLabel:"Translating...",onRun:()=>ee("translate"),onCancel:h||void 0,showRerunConfirm:pe==="translate",rerunWarning:"Existing translations will be replaced.",onConfirmRerun:()=>void A(),onCancelRerun:()=>B(null),config:l.jsxs("div",{className:"flex items-center gap-2 mt-2.5",children:[l.jsx("span",{className:"text-xs font-mono text-terminal-dim shrink-0",children:"Target"}),l.jsx("select",{value:U,onChange:X=>J(X.target.value),disabled:W,className:"flex-1 bg-terminal-surface border border-terminal-border rounded px-2 py-1 text-xs font-mono text-terminal-text outline-none disabled:opacity-50",children:Xb.map(X=>l.jsx("option",{value:X,children:X},X))})]})}),v&&l.jsx(Dc,{title:"Soften Tone",preview:l.jsxs("div",{className:"mt-2.5 rounded-lg bg-terminal-surface-inset border border-terminal-border overflow-hidden",children:[l.jsxs("div",{className:"px-3 py-2.5 space-y-1",children:[l.jsx("div",{className:"text-xs font-mono text-terminal-red line-through opacity-60",children:"this code is mass garbage, mass delete it"}),l.jsx("div",{className:"text-xs font-mono text-terminal-green",children:"Let's refactor this module for clarity"})]}),l.jsxs("div",{className:"px-3 py-2.5 border-t border-terminal-border-subtle space-y-1",children:[l.jsx("div",{className:"text-xs font-mono text-terminal-red line-through opacity-60",children:"are you stupid? I said fix the auth"}),l.jsx("div",{className:"text-xs font-mono text-terminal-green",children:"The auth issue is still present, could you revisit?"})]})]}),description:"Rewrite harsh or blunt prompts into professional, constructive language.",running:x,disabled:W,status:ce,buttonLabel:D("tone")?"Re-adjust":"Soften All",runningLabel:"Adjusting...",onRun:()=>ee("tone"),onCancel:h||void 0,showRerunConfirm:pe==="tone",rerunWarning:"Existing tone adjustments will be replaced.",onConfirmRerun:()=>void O(),onCancelRerun:()=>B(null),config:l.jsxs("div",{className:"flex items-center gap-2 mt-2.5",children:[l.jsx("span",{className:"text-xs font-mono text-terminal-dim shrink-0",children:"Style"}),l.jsx("select",{value:Z,onChange:X=>re(X.target.value),disabled:W,className:"flex-1 bg-terminal-surface border border-terminal-border rounded px-2 py-1 text-xs font-mono text-terminal-text outline-none disabled:opacity-50",children:Qb.map(X=>l.jsx("option",{value:X.value,children:X.label},X.value))})]})})]})]})]})}function Dc({title:s,preview:r,description:o,running:c,disabled:d,status:f,buttonLabel:m,runningLabel:x,onRun:h,onCancel:g,showRerunConfirm:v,rerunWarning:w,onConfirmRerun:T,onCancelRerun:N,config:j}){return l.jsxs("div",{className:"rounded-xl border border-terminal-border-subtle bg-terminal-surface/30 overflow-hidden",children:[l.jsxs("div",{className:"px-4 py-3",children:[l.jsx("div",{className:"text-sm font-sans font-semibold text-terminal-text",children:s}),r,o&&l.jsx("div",{className:"text-xs font-mono text-terminal-dim mt-2 leading-relaxed",children:o}),j,l.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[l.jsx("button",{onClick:h,disabled:d,className:"px-3.5 py-1.5 text-xs font-mono rounded-lg bg-terminal-purple-subtle text-terminal-purple hover:bg-terminal-purple-emphasis transition-colors disabled:opacity-40 flex items-center gap-1.5",children:c?l.jsxs(l.Fragment,{children:[l.jsx(Zb,{className:"text-terminal-purple"}),x]}):m}),c&&g&&l.jsx("button",{onClick:g,className:"text-xs font-mono text-terminal-dim hover:text-terminal-text transition-colors",children:"Cancel"})]})]}),v&&!c&&l.jsx("div",{className:"px-4 pb-3",children:l.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono",children:[l.jsx("span",{className:"text-terminal-orange flex-1",children:w}),l.jsx("button",{onClick:N,className:"text-terminal-dim hover:text-terminal-text transition-colors",children:"Cancel"}),l.jsx("button",{onClick:T,className:"text-terminal-purple hover:text-terminal-text transition-colors font-medium",children:"Continue"})]})}),f&&l.jsx("div",{className:`px-4 pb-3 text-xs font-mono ${f.type==="success"?"text-terminal-green":"text-terminal-red"}`,children:f.text})]})}function Jb({open:s,onClose:r,annotationActions:o,overlayActions:c}){return y.useEffect(()=>{if(!s)return;const d=f=>{f.key==="Escape"&&(f.preventDefault(),r())};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[s,r]),l.jsxs("div",{className:`fixed inset-0 z-30 hidden md:block transition-opacity duration-300 ${s?"opacity-100":"opacity-0 pointer-events-none"}`,children:[l.jsx("div",{className:"absolute inset-0 bg-black/30",onClick:r}),l.jsxs("div",{className:`absolute top-0 right-0 bottom-0 w-96 bg-terminal-bg border-l border-terminal-border-subtle shadow-layer-xl flex flex-col transition-transform duration-300 ease-material-decel ${s?"translate-x-0":"translate-x-full"}`,onClick:d=>d.stopPropagation(),children:[l.jsx("button",{onClick:r,className:"absolute top-2 right-2 z-10 p-1 text-terminal-dim hover:text-terminal-text transition-colors",title:"Close AI Studio",children:"✕"}),l.jsx(Vb,{annotationActions:o,overlayActions:c})]})]})}function Pc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var $a=Pc();function oh(s){$a=s}var La={exec:()=>null};function ze(s,r=""){let o=typeof s=="string"?s:s.source,c={replace:(d,f)=>{let m=typeof f=="string"?f:f.source;return m=m.replace(_t.caret,"$1"),o=o.replace(d,m),c},getRegex:()=>new RegExp(o,r)};return c}var Kb=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),_t={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}>`)},Ib=/^(?:[ \t]*(?:\n|$))+/,Wb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Pb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,As=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ey=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,eu=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ch=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,uh=ze(ch).replace(/bull/g,eu).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ty=ze(ch).replace(/bull/g,eu).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),tu=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ny=/^[^\n]+/,nu=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ay=ze(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",nu).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ly=ze(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,eu).getRegex(),ri="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",au=/\x3C!--(?:-?>|[\s\S]*?(?:-->|$))/,sy=ze("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",au).replace("tag",ri).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),dh=ze(tu).replace("hr",As).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ri).getRegex(),ry=ze(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",dh).getRegex(),lu={blockquote:ry,code:Wb,def:ay,fences:Pb,heading:ey,hr:As,html:sy,lheading:uh,list:ly,newline:Ib,paragraph:dh,table:La,text:ny},Np=ze("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",As).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ri).getRegex(),iy={...lu,lheading:ty,table:Np,paragraph:ze(tu).replace("hr",As).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Np).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ri).getRegex()},oy={...lu,html:ze(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",au).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:La,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ze(tu).replace("hr",As).replace("heading",` *#{1,6} *[^
59
+ ]`).replace("lheading",uh).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},cy=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,uy=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,fh=/^( {2,}|\\)\n(?!\s*$)/,dy=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ii=/[\p{P}\p{S}]/u,su=/[\s\p{P}\p{S}]/u,mh=/[^\s\p{P}\p{S}]/u,fy=ze(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,su).getRegex(),ph=/(?!~)[\p{P}\p{S}]/u,my=/(?!~)[\s\p{P}\p{S}]/u,py=/(?:[^\s\p{P}\p{S}]|~)/u,hh=/(?![*_])[\p{P}\p{S}]/u,hy=/(?![*_])[\s\p{P}\p{S}]/u,xy=/(?:[^\s\p{P}\p{S}]|[*_])/u,gy=ze(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Kb?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),xh=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,by=ze(xh,"u").replace(/punct/g,ii).getRegex(),yy=ze(xh,"u").replace(/punct/g,ph).getRegex(),gh="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",vy=ze(gh,"gu").replace(/notPunctSpace/g,mh).replace(/punctSpace/g,su).replace(/punct/g,ii).getRegex(),jy=ze(gh,"gu").replace(/notPunctSpace/g,py).replace(/punctSpace/g,my).replace(/punct/g,ph).getRegex(),wy=ze("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,mh).replace(/punctSpace/g,su).replace(/punct/g,ii).getRegex(),Sy=ze(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,hh).getRegex(),Ny="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",ky=ze(Ny,"gu").replace(/notPunctSpace/g,xy).replace(/punctSpace/g,hy).replace(/punct/g,hh).getRegex(),Ey=ze(/\\(punct)/,"gu").replace(/punct/g,ii).getRegex(),Ty=ze(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ay=ze(au).replace("(?:-->|$)","-->").getRegex(),Cy=ze("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ay).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ei=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ry=ze(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",ei).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),bh=ze(/^!?\[(label)\]\[(ref)\]/).replace("label",ei).replace("ref",nu).getRegex(),yh=ze(/^!?\[(ref)\](?:\[\])?/).replace("ref",nu).getRegex(),_y=ze("reflink|nolink(?!\\()","g").replace("reflink",bh).replace("nolink",yh).getRegex(),kp=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ru={_backpedal:La,anyPunctuation:Ey,autolink:Ty,blockSkip:gy,br:fh,code:uy,del:La,delLDelim:La,delRDelim:La,emStrongLDelim:by,emStrongRDelimAst:vy,emStrongRDelimUnd:wy,escape:cy,link:Ry,nolink:yh,punctuation:fy,reflink:bh,reflinkSearch:_y,tag:Cy,text:dy,url:La},Oy={...ru,link:ze(/^!?\[(label)\]\((.*?)\)/).replace("label",ei).getRegex(),reflink:ze(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ei).getRegex()},qc={...ru,emStrongRDelimAst:jy,emStrongLDelim:yy,delLDelim:Sy,delRDelim:ky,url:ze(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",kp).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ze(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",kp).getRegex()},My={...qc,br:ze(fh).replace("{2,}","*").getRegex(),text:ze(qc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Zr={normal:lu,gfm:iy,pedantic:oy},js={normal:ru,gfm:qc,breaks:My,pedantic:Oy},zy={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ep=s=>zy[s];function yn(s,r){if(r){if(_t.escapeTest.test(s))return s.replace(_t.escapeReplace,Ep)}else if(_t.escapeTestNoEncode.test(s))return s.replace(_t.escapeReplaceNoEncode,Ep);return s}function Tp(s){try{s=encodeURI(s).replace(_t.percentDecode,"%")}catch{return null}return s}function Ap(s,r){let o=s.replace(_t.findPipe,(f,m,x)=>{let h=!1,g=m;for(;--g>=0&&x[g]==="\\";)h=!h;return h?"|":" |"}),c=o.split(_t.splitPipe),d=0;if(c[0].trim()||c.shift(),c.length>0&&!c.at(-1)?.trim()&&c.pop(),r)if(c.length>r)c.splice(r);else for(;c.length<r;)c.push("");for(;d<c.length;d++)c[d]=c[d].trim().replace(_t.slashPipe,"|");return c}function ws(s,r,o){let c=s.length;if(c===0)return"";let d=0;for(;d<c&&s.charAt(c-d-1)===r;)d++;return s.slice(0,c-d)}function Dy(s,r){if(s.indexOf(r[1])===-1)return-1;let o=0;for(let c=0;c<s.length;c++)if(s[c]==="\\")c++;else if(s[c]===r[0])o++;else if(s[c]===r[1]&&(o--,o<0))return c;return o>0?-2:-1}function Ly(s,r=0){let o=r,c="";for(let d of s)if(d===" "){let f=4-o%4;c+=" ".repeat(f),o+=f}else c+=d,o++;return c}function Cp(s,r,o,c,d){let f=r.href,m=r.title||null,x=s[1].replace(d.other.outputLinkReplace,"$1");c.state.inLink=!0;let h={type:s[0].charAt(0)==="!"?"image":"link",raw:o,href:f,title:m,text:x,tokens:c.inlineTokens(x)};return c.state.inLink=!1,h}function By(s,r,o){let c=s.match(o.other.indentCodeCompensation);if(c===null)return r;let d=c[1];return r.split(`
60
+ `).map(f=>{let m=f.match(o.other.beginningSpace);if(m===null)return f;let[x]=m;return x.length>=d.length?f.slice(d.length):f}).join(`
61
+ `)}var ti=class{options;rules;lexer;constructor(s){this.options=s||$a}space(s){let r=this.rules.block.newline.exec(s);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(s){let r=this.rules.block.code.exec(s);if(r){let o=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?o:ws(o,`
62
+ `)}}}fences(s){let r=this.rules.block.fences.exec(s);if(r){let o=r[0],c=By(o,r[3]||"",this.rules);return{type:"code",raw:o,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:c}}}heading(s){let r=this.rules.block.heading.exec(s);if(r){let o=r[2].trim();if(this.rules.other.endingHash.test(o)){let c=ws(o,"#");(this.options.pedantic||!c||this.rules.other.endingSpaceChar.test(c))&&(o=c.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(s){let r=this.rules.block.hr.exec(s);if(r)return{type:"hr",raw:ws(r[0],`
63
+ `)}}blockquote(s){let r=this.rules.block.blockquote.exec(s);if(r){let o=ws(r[0],`
64
64
  `).split(`
65
- `),c="",d="",f=[];for(;o.length>0;){let m=!1,g=[],h;for(h=0;h<o.length;h++)if(this.rules.other.blockquoteStart.test(o[h]))g.push(o[h]),m=!0;else if(!m)g.push(o[h]);else break;o=o.slice(h);let x=g.join(`
66
- `),b=x.replace(this.rules.other.blockquoteSetextReplace,`
65
+ `),c="",d="",f=[];for(;o.length>0;){let m=!1,x=[],h;for(h=0;h<o.length;h++)if(this.rules.other.blockquoteStart.test(o[h]))x.push(o[h]),m=!0;else if(!m)x.push(o[h]);else break;o=o.slice(h);let g=x.join(`
66
+ `),v=g.replace(this.rules.other.blockquoteSetextReplace,`
67
67
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");c=c?`${c}
68
- ${x}`:x,d=d?`${d}
69
- ${b}`:b;let j=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(b,f,!0),this.lexer.state.top=j,o.length===0)break;let T=f.at(-1);if(T?.type==="code")break;if(T?.type==="blockquote"){let N=T,w=N.raw+`
68
+ ${g}`:g,d=d?`${d}
69
+ ${v}`:v;let w=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(v,f,!0),this.lexer.state.top=w,o.length===0)break;let T=f.at(-1);if(T?.type==="code")break;if(T?.type==="blockquote"){let N=T,j=N.raw+`
70
70
  `+o.join(`
71
- `),S=this.blockquote(w);f[f.length-1]=S,c=c.substring(0,c.length-N.raw.length)+S.raw,d=d.substring(0,d.length-N.text.length)+S.text;break}else if(T?.type==="list"){let N=T,w=N.raw+`
71
+ `),S=this.blockquote(j);f[f.length-1]=S,c=c.substring(0,c.length-N.raw.length)+S.raw,d=d.substring(0,d.length-N.text.length)+S.text;break}else if(T?.type==="list"){let N=T,j=N.raw+`
72
72
  `+o.join(`
73
- `),S=this.list(w);f[f.length-1]=S,c=c.substring(0,c.length-T.raw.length)+S.raw,d=d.substring(0,d.length-N.raw.length)+S.raw,o=w.substring(f.at(-1).raw.length).split(`
74
- `);continue}}return{type:"blockquote",raw:c,tokens:f,text:d}}}list(s){let r=this.rules.block.list.exec(s);if(r){let o=r[1].trim(),c=o.length>1,d={type:"list",raw:"",ordered:c,start:c?+o.slice(0,-1):"",loose:!1,items:[]};o=c?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=c?o:"[*+-]");let f=this.rules.other.listItemRegex(o),m=!1;for(;s;){let h=!1,x="",b="";if(!(r=f.exec(s))||this.rules.block.hr.test(s))break;x=r[0],s=s.substring(x.length);let j=Ry(r[2].split(`
73
+ `),S=this.list(j);f[f.length-1]=S,c=c.substring(0,c.length-T.raw.length)+S.raw,d=d.substring(0,d.length-N.raw.length)+S.raw,o=j.substring(f.at(-1).raw.length).split(`
74
+ `);continue}}return{type:"blockquote",raw:c,tokens:f,text:d}}}list(s){let r=this.rules.block.list.exec(s);if(r){let o=r[1].trim(),c=o.length>1,d={type:"list",raw:"",ordered:c,start:c?+o.slice(0,-1):"",loose:!1,items:[]};o=c?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=c?o:"[*+-]");let f=this.rules.other.listItemRegex(o),m=!1;for(;s;){let h=!1,g="",v="";if(!(r=f.exec(s))||this.rules.block.hr.test(s))break;g=r[0],s=s.substring(g.length);let w=Ly(r[2].split(`
75
75
  `,1)[0],r[1].length),T=s.split(`
76
- `,1)[0],N=!j.trim(),w=0;if(this.options.pedantic?(w=2,b=j.trimStart()):N?w=r[1].length+1:(w=j.search(this.rules.other.nonSpaceChar),w=w>4?1:w,b=j.slice(w),w+=r[1].length),N&&this.rules.other.blankLine.test(T)&&(x+=T+`
77
- `,s=s.substring(T.length+1),h=!0),!h){let S=this.rules.other.nextBulletRegex(w),R=this.rules.other.hrRegex(w),A=this.rules.other.fencesBeginRegex(w),E=this.rules.other.headingBeginRegex(w),_=this.rules.other.htmlBeginRegex(w),D=this.rules.other.blockquoteBeginRegex(w);for(;s;){let $=s.split(`
78
- `,1)[0],ae;if(T=$,this.options.pedantic?(T=T.replace(this.rules.other.listReplaceNesting," "),ae=T):ae=T.replace(this.rules.other.tabCharGlobal," "),A.test(T)||E.test(T)||_.test(T)||D.test(T)||S.test(T)||R.test(T))break;if(ae.search(this.rules.other.nonSpaceChar)>=w||!T.trim())b+=`
79
- `+ae.slice(w);else{if(N||j.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(j)||E.test(j)||R.test(j))break;b+=`
80
- `+T}N=!T.trim(),x+=$+`
81
- `,s=s.substring($.length+1),j=ae.slice(w)}}d.loose||(m?d.loose=!0:this.rules.other.doubleBlankLine.test(x)&&(m=!0)),d.items.push({type:"list_item",raw:x,task:!!this.options.gfm&&this.rules.other.listIsTask.test(b),loose:!1,text:b,tokens:[]}),d.raw+=x}let g=d.items.at(-1);if(g)g.raw=g.raw.trimEnd(),g.text=g.text.trimEnd();else return;d.raw=d.raw.trimEnd();for(let h of d.items){if(this.lexer.state.top=!1,h.tokens=this.lexer.blockTokens(h.text,[]),h.task){if(h.text=h.text.replace(this.rules.other.listReplaceTask,""),h.tokens[0]?.type==="text"||h.tokens[0]?.type==="paragraph"){h.tokens[0].raw=h.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),h.tokens[0].text=h.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let b=this.lexer.inlineQueue.length-1;b>=0;b--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[b].src)){this.lexer.inlineQueue[b].src=this.lexer.inlineQueue[b].src.replace(this.rules.other.listReplaceTask,"");break}}let x=this.rules.other.listTaskCheckbox.exec(h.raw);if(x){let b={type:"checkbox",raw:x[0]+" ",checked:x[0]!=="[ ]"};h.checked=b.checked,d.loose?h.tokens[0]&&["paragraph","text"].includes(h.tokens[0].type)&&"tokens"in h.tokens[0]&&h.tokens[0].tokens?(h.tokens[0].raw=b.raw+h.tokens[0].raw,h.tokens[0].text=b.raw+h.tokens[0].text,h.tokens[0].tokens.unshift(b)):h.tokens.unshift({type:"paragraph",raw:b.raw,text:b.raw,tokens:[b]}):h.tokens.unshift(b)}}if(!d.loose){let x=h.tokens.filter(j=>j.type==="space"),b=x.length>0&&x.some(j=>this.rules.other.anyLine.test(j.raw));d.loose=b}}if(d.loose)for(let h of d.items){h.loose=!0;for(let x of h.tokens)x.type==="text"&&(x.type="paragraph")}return d}}html(s){let r=this.rules.block.html.exec(s);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(s){let r=this.rules.block.def.exec(s);if(r){let o=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),c=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",d=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:o,raw:r[0],href:c,title:d}}}table(s){let r=this.rules.block.table.exec(s);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let o=Np(r[1]),c=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),d=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
82
- `):[],f={type:"table",raw:r[0],header:[],align:[],rows:[]};if(o.length===c.length){for(let m of c)this.rules.other.tableAlignRight.test(m)?f.align.push("right"):this.rules.other.tableAlignCenter.test(m)?f.align.push("center"):this.rules.other.tableAlignLeft.test(m)?f.align.push("left"):f.align.push(null);for(let m=0;m<o.length;m++)f.header.push({text:o[m],tokens:this.lexer.inline(o[m]),header:!0,align:f.align[m]});for(let m of d)f.rows.push(Np(m,f.header.length).map((g,h)=>({text:g,tokens:this.lexer.inline(g),header:!1,align:f.align[h]})));return f}}lheading(s){let r=this.rules.block.lheading.exec(s);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(s){let r=this.rules.block.paragraph.exec(s);if(r){let o=r[1].charAt(r[1].length-1)===`
83
- `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:o,tokens:this.lexer.inline(o)}}}text(s){let r=this.rules.block.text.exec(s);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(s){let r=this.rules.inline.escape.exec(s);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(s){let r=this.rules.inline.tag.exec(s);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(s){let r=this.rules.inline.link.exec(s);if(r){let o=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(o)){if(!this.rules.other.endAngleBracket.test(o))return;let f=ys(o.slice(0,-1),"\\");if((o.length-f.length)%2===0)return}else{let f=Cy(r[2],"()");if(f===-2)return;if(f>-1){let m=(r[0].indexOf("!")===0?5:4)+r[1].length+f;r[2]=r[2].substring(0,f),r[0]=r[0].substring(0,m).trim(),r[3]=""}}let c=r[2],d="";if(this.options.pedantic){let f=this.rules.other.pedanticHrefTitle.exec(c);f&&(c=f[1],d=f[3])}else d=r[3]?r[3].slice(1,-1):"";return c=c.trim(),this.rules.other.startAngleBracket.test(c)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(o)?c=c.slice(1):c=c.slice(1,-1)),kp(r,{href:c&&c.replace(this.rules.inline.anyPunctuation,"$1"),title:d&&d.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(s,r){let o;if((o=this.rules.inline.reflink.exec(s))||(o=this.rules.inline.nolink.exec(s))){let c=(o[2]||o[1]).replace(this.rules.other.multipleSpaceGlobal," "),d=r[c.toLowerCase()];if(!d){let f=o[0].charAt(0);return{type:"text",raw:f,text:f}}return kp(o,d,o[0],this.lexer,this.rules)}}emStrong(s,r,o=""){let c=this.rules.inline.emStrongLDelim.exec(s);if(!(!c||c[3]&&o.match(this.rules.other.unicodeAlphaNumeric))&&(!(c[1]||c[2])||!o||this.rules.inline.punctuation.exec(o))){let d=[...c[0]].length-1,f,m,g=d,h=0,x=c[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(x.lastIndex=0,r=r.slice(-1*s.length+d);(c=x.exec(r))!=null;){if(f=c[1]||c[2]||c[3]||c[4]||c[5]||c[6],!f)continue;if(m=[...f].length,c[3]||c[4]){g+=m;continue}else if((c[5]||c[6])&&d%3&&!((d+m)%3)){h+=m;continue}if(g-=m,g>0)continue;m=Math.min(m,m+g+h);let b=[...c[0]][0].length,j=s.slice(0,d+c.index+b+m);if(Math.min(d,m)%2){let N=j.slice(1,-1);return{type:"em",raw:j,text:N,tokens:this.lexer.inlineTokens(N)}}let T=j.slice(2,-2);return{type:"strong",raw:j,text:T,tokens:this.lexer.inlineTokens(T)}}}}codespan(s){let r=this.rules.inline.code.exec(s);if(r){let o=r[2].replace(this.rules.other.newLineCharGlobal," "),c=this.rules.other.nonSpaceChar.test(o),d=this.rules.other.startingSpaceChar.test(o)&&this.rules.other.endingSpaceChar.test(o);return c&&d&&(o=o.substring(1,o.length-1)),{type:"codespan",raw:r[0],text:o}}}br(s){let r=this.rules.inline.br.exec(s);if(r)return{type:"br",raw:r[0]}}del(s,r,o=""){let c=this.rules.inline.delLDelim.exec(s);if(c&&(!c[1]||!o||this.rules.inline.punctuation.exec(o))){let d=[...c[0]].length-1,f,m,g=d,h=this.rules.inline.delRDelim;for(h.lastIndex=0,r=r.slice(-1*s.length+d);(c=h.exec(r))!=null;){if(f=c[1]||c[2]||c[3]||c[4]||c[5]||c[6],!f||(m=[...f].length,m!==d))continue;if(c[3]||c[4]){g+=m;continue}if(g-=m,g>0)continue;m=Math.min(m,m+g);let x=[...c[0]][0].length,b=s.slice(0,d+c.index+x+m),j=b.slice(d,-d);return{type:"del",raw:b,text:j,tokens:this.lexer.inlineTokens(j)}}}}autolink(s){let r=this.rules.inline.autolink.exec(s);if(r){let o,c;return r[2]==="@"?(o=r[1],c="mailto:"+o):(o=r[1],c=o),{type:"link",raw:r[0],text:o,href:c,tokens:[{type:"text",raw:o,text:o}]}}}url(s){let r;if(r=this.rules.inline.url.exec(s)){let o,c;if(r[2]==="@")o=r[0],c="mailto:"+o;else{let d;do d=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(d!==r[0]);o=r[0],r[1]==="www."?c="http://"+r[0]:c=r[0]}return{type:"link",raw:r[0],text:o,href:c,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(s){let r=this.rules.inline.text.exec(s);if(r){let o=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:o}}}},sn=class Uc{tokens;options;state;inlineQueue;tokenizer;constructor(r){this.tokens=[],this.tokens.links=Object.create(null),this.options=r||Oa,this.options.tokenizer=this.options.tokenizer||new Ir,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let o={other:At,block:Zr.normal,inline:bs.normal};this.options.pedantic?(o.block=Zr.pedantic,o.inline=bs.pedantic):this.options.gfm&&(o.block=Zr.gfm,this.options.breaks?o.inline=bs.breaks:o.inline=bs.gfm),this.tokenizer.rules=o}static get rules(){return{block:Zr,inline:bs}}static lex(r,o){return new Uc(o).lex(r)}static lexInline(r,o){return new Uc(o).inlineTokens(r)}lex(r){r=r.replace(At.carriageReturn,`
84
- `),this.blockTokens(r,this.tokens);for(let o=0;o<this.inlineQueue.length;o++){let c=this.inlineQueue[o];this.inlineTokens(c.src,c.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(r,o=[],c=!1){for(this.options.pedantic&&(r=r.replace(At.tabCharGlobal," ").replace(At.spaceLine,""));r;){let d;if(this.options.extensions?.block?.some(m=>(d=m.call({lexer:this},r,o))?(r=r.substring(d.raw.length),o.push(d),!0):!1))continue;if(d=this.tokenizer.space(r)){r=r.substring(d.raw.length);let m=o.at(-1);d.raw.length===1&&m!==void 0?m.raw+=`
76
+ `,1)[0],N=!w.trim(),j=0;if(this.options.pedantic?(j=2,v=w.trimStart()):N?j=r[1].length+1:(j=w.search(this.rules.other.nonSpaceChar),j=j>4?1:j,v=w.slice(j),j+=r[1].length),N&&this.rules.other.blankLine.test(T)&&(g+=T+`
77
+ `,s=s.substring(T.length+1),h=!0),!h){let S=this.rules.other.nextBulletRegex(j),C=this.rules.other.hrRegex(j),E=this.rules.other.fencesBeginRegex(j),k=this.rules.other.headingBeginRegex(j),_=this.rules.other.htmlBeginRegex(j),z=this.rules.other.blockquoteBeginRegex(j);for(;s;){let U=s.split(`
78
+ `,1)[0],J;if(T=U,this.options.pedantic?(T=T.replace(this.rules.other.listReplaceNesting," "),J=T):J=T.replace(this.rules.other.tabCharGlobal," "),E.test(T)||k.test(T)||_.test(T)||z.test(T)||S.test(T)||C.test(T))break;if(J.search(this.rules.other.nonSpaceChar)>=j||!T.trim())v+=`
79
+ `+J.slice(j);else{if(N||w.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(w)||k.test(w)||C.test(w))break;v+=`
80
+ `+T}N=!T.trim(),g+=U+`
81
+ `,s=s.substring(U.length+1),w=J.slice(j)}}d.loose||(m?d.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(m=!0)),d.items.push({type:"list_item",raw:g,task:!!this.options.gfm&&this.rules.other.listIsTask.test(v),loose:!1,text:v,tokens:[]}),d.raw+=g}let x=d.items.at(-1);if(x)x.raw=x.raw.trimEnd(),x.text=x.text.trimEnd();else return;d.raw=d.raw.trimEnd();for(let h of d.items){if(this.lexer.state.top=!1,h.tokens=this.lexer.blockTokens(h.text,[]),h.task){if(h.text=h.text.replace(this.rules.other.listReplaceTask,""),h.tokens[0]?.type==="text"||h.tokens[0]?.type==="paragraph"){h.tokens[0].raw=h.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),h.tokens[0].text=h.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let v=this.lexer.inlineQueue.length-1;v>=0;v--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[v].src)){this.lexer.inlineQueue[v].src=this.lexer.inlineQueue[v].src.replace(this.rules.other.listReplaceTask,"");break}}let g=this.rules.other.listTaskCheckbox.exec(h.raw);if(g){let v={type:"checkbox",raw:g[0]+" ",checked:g[0]!=="[ ]"};h.checked=v.checked,d.loose?h.tokens[0]&&["paragraph","text"].includes(h.tokens[0].type)&&"tokens"in h.tokens[0]&&h.tokens[0].tokens?(h.tokens[0].raw=v.raw+h.tokens[0].raw,h.tokens[0].text=v.raw+h.tokens[0].text,h.tokens[0].tokens.unshift(v)):h.tokens.unshift({type:"paragraph",raw:v.raw,text:v.raw,tokens:[v]}):h.tokens.unshift(v)}}if(!d.loose){let g=h.tokens.filter(w=>w.type==="space"),v=g.length>0&&g.some(w=>this.rules.other.anyLine.test(w.raw));d.loose=v}}if(d.loose)for(let h of d.items){h.loose=!0;for(let g of h.tokens)g.type==="text"&&(g.type="paragraph")}return d}}html(s){let r=this.rules.block.html.exec(s);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(s){let r=this.rules.block.def.exec(s);if(r){let o=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),c=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",d=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:o,raw:r[0],href:c,title:d}}}table(s){let r=this.rules.block.table.exec(s);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let o=Ap(r[1]),c=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),d=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
82
+ `):[],f={type:"table",raw:r[0],header:[],align:[],rows:[]};if(o.length===c.length){for(let m of c)this.rules.other.tableAlignRight.test(m)?f.align.push("right"):this.rules.other.tableAlignCenter.test(m)?f.align.push("center"):this.rules.other.tableAlignLeft.test(m)?f.align.push("left"):f.align.push(null);for(let m=0;m<o.length;m++)f.header.push({text:o[m],tokens:this.lexer.inline(o[m]),header:!0,align:f.align[m]});for(let m of d)f.rows.push(Ap(m,f.header.length).map((x,h)=>({text:x,tokens:this.lexer.inline(x),header:!1,align:f.align[h]})));return f}}lheading(s){let r=this.rules.block.lheading.exec(s);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(s){let r=this.rules.block.paragraph.exec(s);if(r){let o=r[1].charAt(r[1].length-1)===`
83
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:o,tokens:this.lexer.inline(o)}}}text(s){let r=this.rules.block.text.exec(s);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(s){let r=this.rules.inline.escape.exec(s);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(s){let r=this.rules.inline.tag.exec(s);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(s){let r=this.rules.inline.link.exec(s);if(r){let o=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(o)){if(!this.rules.other.endAngleBracket.test(o))return;let f=ws(o.slice(0,-1),"\\");if((o.length-f.length)%2===0)return}else{let f=Dy(r[2],"()");if(f===-2)return;if(f>-1){let m=(r[0].indexOf("!")===0?5:4)+r[1].length+f;r[2]=r[2].substring(0,f),r[0]=r[0].substring(0,m).trim(),r[3]=""}}let c=r[2],d="";if(this.options.pedantic){let f=this.rules.other.pedanticHrefTitle.exec(c);f&&(c=f[1],d=f[3])}else d=r[3]?r[3].slice(1,-1):"";return c=c.trim(),this.rules.other.startAngleBracket.test(c)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(o)?c=c.slice(1):c=c.slice(1,-1)),Cp(r,{href:c&&c.replace(this.rules.inline.anyPunctuation,"$1"),title:d&&d.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(s,r){let o;if((o=this.rules.inline.reflink.exec(s))||(o=this.rules.inline.nolink.exec(s))){let c=(o[2]||o[1]).replace(this.rules.other.multipleSpaceGlobal," "),d=r[c.toLowerCase()];if(!d){let f=o[0].charAt(0);return{type:"text",raw:f,text:f}}return Cp(o,d,o[0],this.lexer,this.rules)}}emStrong(s,r,o=""){let c=this.rules.inline.emStrongLDelim.exec(s);if(!(!c||c[3]&&o.match(this.rules.other.unicodeAlphaNumeric))&&(!(c[1]||c[2])||!o||this.rules.inline.punctuation.exec(o))){let d=[...c[0]].length-1,f,m,x=d,h=0,g=c[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(g.lastIndex=0,r=r.slice(-1*s.length+d);(c=g.exec(r))!=null;){if(f=c[1]||c[2]||c[3]||c[4]||c[5]||c[6],!f)continue;if(m=[...f].length,c[3]||c[4]){x+=m;continue}else if((c[5]||c[6])&&d%3&&!((d+m)%3)){h+=m;continue}if(x-=m,x>0)continue;m=Math.min(m,m+x+h);let v=[...c[0]][0].length,w=s.slice(0,d+c.index+v+m);if(Math.min(d,m)%2){let N=w.slice(1,-1);return{type:"em",raw:w,text:N,tokens:this.lexer.inlineTokens(N)}}let T=w.slice(2,-2);return{type:"strong",raw:w,text:T,tokens:this.lexer.inlineTokens(T)}}}}codespan(s){let r=this.rules.inline.code.exec(s);if(r){let o=r[2].replace(this.rules.other.newLineCharGlobal," "),c=this.rules.other.nonSpaceChar.test(o),d=this.rules.other.startingSpaceChar.test(o)&&this.rules.other.endingSpaceChar.test(o);return c&&d&&(o=o.substring(1,o.length-1)),{type:"codespan",raw:r[0],text:o}}}br(s){let r=this.rules.inline.br.exec(s);if(r)return{type:"br",raw:r[0]}}del(s,r,o=""){let c=this.rules.inline.delLDelim.exec(s);if(c&&(!c[1]||!o||this.rules.inline.punctuation.exec(o))){let d=[...c[0]].length-1,f,m,x=d,h=this.rules.inline.delRDelim;for(h.lastIndex=0,r=r.slice(-1*s.length+d);(c=h.exec(r))!=null;){if(f=c[1]||c[2]||c[3]||c[4]||c[5]||c[6],!f||(m=[...f].length,m!==d))continue;if(c[3]||c[4]){x+=m;continue}if(x-=m,x>0)continue;m=Math.min(m,m+x);let g=[...c[0]][0].length,v=s.slice(0,d+c.index+g+m),w=v.slice(d,-d);return{type:"del",raw:v,text:w,tokens:this.lexer.inlineTokens(w)}}}}autolink(s){let r=this.rules.inline.autolink.exec(s);if(r){let o,c;return r[2]==="@"?(o=r[1],c="mailto:"+o):(o=r[1],c=o),{type:"link",raw:r[0],text:o,href:c,tokens:[{type:"text",raw:o,text:o}]}}}url(s){let r;if(r=this.rules.inline.url.exec(s)){let o,c;if(r[2]==="@")o=r[0],c="mailto:"+o;else{let d;do d=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(d!==r[0]);o=r[0],r[1]==="www."?c="http://"+r[0]:c=r[0]}return{type:"link",raw:r[0],text:o,href:c,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(s){let r=this.rules.inline.text.exec(s);if(r){let o=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:o}}}},un=class Yc{tokens;options;state;inlineQueue;tokenizer;constructor(r){this.tokens=[],this.tokens.links=Object.create(null),this.options=r||$a,this.options.tokenizer=this.options.tokenizer||new ti,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let o={other:_t,block:Zr.normal,inline:js.normal};this.options.pedantic?(o.block=Zr.pedantic,o.inline=js.pedantic):this.options.gfm&&(o.block=Zr.gfm,this.options.breaks?o.inline=js.breaks:o.inline=js.gfm),this.tokenizer.rules=o}static get rules(){return{block:Zr,inline:js}}static lex(r,o){return new Yc(o).lex(r)}static lexInline(r,o){return new Yc(o).inlineTokens(r)}lex(r){r=r.replace(_t.carriageReturn,`
84
+ `),this.blockTokens(r,this.tokens);for(let o=0;o<this.inlineQueue.length;o++){let c=this.inlineQueue[o];this.inlineTokens(c.src,c.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(r,o=[],c=!1){for(this.options.pedantic&&(r=r.replace(_t.tabCharGlobal," ").replace(_t.spaceLine,""));r;){let d;if(this.options.extensions?.block?.some(m=>(d=m.call({lexer:this},r,o))?(r=r.substring(d.raw.length),o.push(d),!0):!1))continue;if(d=this.tokenizer.space(r)){r=r.substring(d.raw.length);let m=o.at(-1);d.raw.length===1&&m!==void 0?m.raw+=`
85
85
  `:o.push(d);continue}if(d=this.tokenizer.code(r)){r=r.substring(d.raw.length);let m=o.at(-1);m?.type==="paragraph"||m?.type==="text"?(m.raw+=(m.raw.endsWith(`
86
86
  `)?"":`
87
87
  `)+d.raw,m.text+=`
88
88
  `+d.text,this.inlineQueue.at(-1).src=m.text):o.push(d);continue}if(d=this.tokenizer.fences(r)){r=r.substring(d.raw.length),o.push(d);continue}if(d=this.tokenizer.heading(r)){r=r.substring(d.raw.length),o.push(d);continue}if(d=this.tokenizer.hr(r)){r=r.substring(d.raw.length),o.push(d);continue}if(d=this.tokenizer.blockquote(r)){r=r.substring(d.raw.length),o.push(d);continue}if(d=this.tokenizer.list(r)){r=r.substring(d.raw.length),o.push(d);continue}if(d=this.tokenizer.html(r)){r=r.substring(d.raw.length),o.push(d);continue}if(d=this.tokenizer.def(r)){r=r.substring(d.raw.length);let m=o.at(-1);m?.type==="paragraph"||m?.type==="text"?(m.raw+=(m.raw.endsWith(`
89
89
  `)?"":`
90
90
  `)+d.raw,m.text+=`
91
- `+d.raw,this.inlineQueue.at(-1).src=m.text):this.tokens.links[d.tag]||(this.tokens.links[d.tag]={href:d.href,title:d.title},o.push(d));continue}if(d=this.tokenizer.table(r)){r=r.substring(d.raw.length),o.push(d);continue}if(d=this.tokenizer.lheading(r)){r=r.substring(d.raw.length),o.push(d);continue}let f=r;if(this.options.extensions?.startBlock){let m=1/0,g=r.slice(1),h;this.options.extensions.startBlock.forEach(x=>{h=x.call({lexer:this},g),typeof h=="number"&&h>=0&&(m=Math.min(m,h))}),m<1/0&&m>=0&&(f=r.substring(0,m+1))}if(this.state.top&&(d=this.tokenizer.paragraph(f))){let m=o.at(-1);c&&m?.type==="paragraph"?(m.raw+=(m.raw.endsWith(`
91
+ `+d.raw,this.inlineQueue.at(-1).src=m.text):this.tokens.links[d.tag]||(this.tokens.links[d.tag]={href:d.href,title:d.title},o.push(d));continue}if(d=this.tokenizer.table(r)){r=r.substring(d.raw.length),o.push(d);continue}if(d=this.tokenizer.lheading(r)){r=r.substring(d.raw.length),o.push(d);continue}let f=r;if(this.options.extensions?.startBlock){let m=1/0,x=r.slice(1),h;this.options.extensions.startBlock.forEach(g=>{h=g.call({lexer:this},x),typeof h=="number"&&h>=0&&(m=Math.min(m,h))}),m<1/0&&m>=0&&(f=r.substring(0,m+1))}if(this.state.top&&(d=this.tokenizer.paragraph(f))){let m=o.at(-1);c&&m?.type==="paragraph"?(m.raw+=(m.raw.endsWith(`
92
92
  `)?"":`
93
93
  `)+d.raw,m.text+=`
94
94
  `+d.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=m.text):o.push(d),c=f.length!==r.length,r=r.substring(d.raw.length);continue}if(d=this.tokenizer.text(r)){r=r.substring(d.raw.length);let m=o.at(-1);m?.type==="text"?(m.raw+=(m.raw.endsWith(`
95
95
  `)?"":`
96
96
  `)+d.raw,m.text+=`
97
- `+d.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=m.text):o.push(d);continue}if(r){let m="Infinite loop on byte: "+r.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return this.state.top=!0,o}inline(r,o=[]){return this.inlineQueue.push({src:r,tokens:o}),o}inlineTokens(r,o=[]){let c=r,d=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(d=this.tokenizer.rules.inline.reflinkSearch.exec(c))!=null;)h.includes(d[0].slice(d[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,d.index)+"["+"a".repeat(d[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(d=this.tokenizer.rules.inline.anyPunctuation.exec(c))!=null;)c=c.slice(0,d.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let f;for(;(d=this.tokenizer.rules.inline.blockSkip.exec(c))!=null;)f=d[2]?d[2].length:0,c=c.slice(0,d.index+f)+"["+"a".repeat(d[0].length-f-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);c=this.options.hooks?.emStrongMask?.call({lexer:this},c)??c;let m=!1,g="";for(;r;){m||(g=""),m=!1;let h;if(this.options.extensions?.inline?.some(b=>(h=b.call({lexer:this},r,o))?(r=r.substring(h.raw.length),o.push(h),!0):!1))continue;if(h=this.tokenizer.escape(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.tag(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.link(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.reflink(r,this.tokens.links)){r=r.substring(h.raw.length);let b=o.at(-1);h.type==="text"&&b?.type==="text"?(b.raw+=h.raw,b.text+=h.text):o.push(h);continue}if(h=this.tokenizer.emStrong(r,c,g)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.codespan(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.br(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.del(r,c,g)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.autolink(r)){r=r.substring(h.raw.length),o.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(r))){r=r.substring(h.raw.length),o.push(h);continue}let x=r;if(this.options.extensions?.startInline){let b=1/0,j=r.slice(1),T;this.options.extensions.startInline.forEach(N=>{T=N.call({lexer:this},j),typeof T=="number"&&T>=0&&(b=Math.min(b,T))}),b<1/0&&b>=0&&(x=r.substring(0,b+1))}if(h=this.tokenizer.inlineText(x)){r=r.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(g=h.raw.slice(-1)),m=!0;let b=o.at(-1);b?.type==="text"?(b.raw+=h.raw,b.text+=h.text):o.push(h);continue}if(r){let b="Infinite loop on byte: "+r.charCodeAt(0);if(this.options.silent){console.error(b);break}else throw new Error(b)}}return o}},Wr=class{options;parser;constructor(s){this.options=s||Oa}space(s){return""}code({text:s,lang:r,escaped:o}){let c=(r||"").match(At.notSpaceStart)?.[0],d=s.replace(At.endingNewline,"")+`
98
- `;return c?'<pre><code class="language-'+mn(c)+'">'+(o?d:mn(d,!0))+`</code></pre>
99
- `:"<pre><code>"+(o?d:mn(d,!0))+`</code></pre>
97
+ `+d.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=m.text):o.push(d);continue}if(r){let m="Infinite loop on byte: "+r.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return this.state.top=!0,o}inline(r,o=[]){return this.inlineQueue.push({src:r,tokens:o}),o}inlineTokens(r,o=[]){let c=r,d=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(d=this.tokenizer.rules.inline.reflinkSearch.exec(c))!=null;)h.includes(d[0].slice(d[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,d.index)+"["+"a".repeat(d[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(d=this.tokenizer.rules.inline.anyPunctuation.exec(c))!=null;)c=c.slice(0,d.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let f;for(;(d=this.tokenizer.rules.inline.blockSkip.exec(c))!=null;)f=d[2]?d[2].length:0,c=c.slice(0,d.index+f)+"["+"a".repeat(d[0].length-f-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);c=this.options.hooks?.emStrongMask?.call({lexer:this},c)??c;let m=!1,x="";for(;r;){m||(x=""),m=!1;let h;if(this.options.extensions?.inline?.some(v=>(h=v.call({lexer:this},r,o))?(r=r.substring(h.raw.length),o.push(h),!0):!1))continue;if(h=this.tokenizer.escape(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.tag(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.link(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.reflink(r,this.tokens.links)){r=r.substring(h.raw.length);let v=o.at(-1);h.type==="text"&&v?.type==="text"?(v.raw+=h.raw,v.text+=h.text):o.push(h);continue}if(h=this.tokenizer.emStrong(r,c,x)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.codespan(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.br(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.del(r,c,x)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.autolink(r)){r=r.substring(h.raw.length),o.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(r))){r=r.substring(h.raw.length),o.push(h);continue}let g=r;if(this.options.extensions?.startInline){let v=1/0,w=r.slice(1),T;this.options.extensions.startInline.forEach(N=>{T=N.call({lexer:this},w),typeof T=="number"&&T>=0&&(v=Math.min(v,T))}),v<1/0&&v>=0&&(g=r.substring(0,v+1))}if(h=this.tokenizer.inlineText(g)){r=r.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(x=h.raw.slice(-1)),m=!0;let v=o.at(-1);v?.type==="text"?(v.raw+=h.raw,v.text+=h.text):o.push(h);continue}if(r){let v="Infinite loop on byte: "+r.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return o}},ni=class{options;parser;constructor(s){this.options=s||$a}space(s){return""}code({text:s,lang:r,escaped:o}){let c=(r||"").match(_t.notSpaceStart)?.[0],d=s.replace(_t.endingNewline,"")+`
98
+ `;return c?'<pre><code class="language-'+yn(c)+'">'+(o?d:yn(d,!0))+`</code></pre>
99
+ `:"<pre><code>"+(o?d:yn(d,!0))+`</code></pre>
100
100
  `}blockquote({tokens:s}){return`<blockquote>
101
101
  ${this.parser.parse(s)}</blockquote>
102
102
  `}html({text:s}){return s}def(s){return""}heading({tokens:s,depth:r}){return`<h${r}>${this.parser.parseInline(s)}</h${r}>
103
103
  `}hr(s){return`<hr>
104
- `}list(s){let r=s.ordered,o=s.start,c="";for(let m=0;m<s.items.length;m++){let g=s.items[m];c+=this.listitem(g)}let d=r?"ol":"ul",f=r&&o!==1?' start="'+o+'"':"";return"<"+d+f+`>
104
+ `}list(s){let r=s.ordered,o=s.start,c="";for(let m=0;m<s.items.length;m++){let x=s.items[m];c+=this.listitem(x)}let d=r?"ol":"ul",f=r&&o!==1?' start="'+o+'"':"";return"<"+d+f+`>
105
105
  `+c+"</"+d+`>
106
106
  `}listitem(s){return`<li>${this.parser.parse(s.tokens)}</li>
107
107
  `}checkbox({checked:s}){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:s}){return`<p>${this.parser.parseInline(s)}</p>
@@ -112,19 +112,19 @@ ${this.parser.parse(s)}</blockquote>
112
112
  `}tablerow({text:s}){return`<tr>
113
113
  ${s}</tr>
114
114
  `}tablecell(s){let r=this.parser.parseInline(s.tokens),o=s.header?"th":"td";return(s.align?`<${o} align="${s.align}">`:`<${o}>`)+r+`</${o}>
115
- `}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${mn(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:r,tokens:o}){let c=this.parser.parseInline(o),d=Sp(s);if(d===null)return c;s=d;let f='<a href="'+s+'"';return r&&(f+=' title="'+mn(r)+'"'),f+=">"+c+"</a>",f}image({href:s,title:r,text:o,tokens:c}){c&&(o=this.parser.parseInline(c,this.parser.textRenderer));let d=Sp(s);if(d===null)return mn(o);s=d;let f=`<img src="${s}" alt="${mn(o)}"`;return r&&(f+=` title="${mn(r)}"`),f+=">",f}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:mn(s.text)}},nu=class{strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return""+s}image({text:s}){return""+s}br(){return""}checkbox({raw:s}){return s}},rn=class Hc{options;renderer;textRenderer;constructor(r){this.options=r||Oa,this.options.renderer=this.options.renderer||new Wr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new nu}static parse(r,o){return new Hc(o).parse(r)}static parseInline(r,o){return new Hc(o).parseInline(r)}parse(r){let o="";for(let c=0;c<r.length;c++){let d=r[c];if(this.options.extensions?.renderers?.[d.type]){let m=d,g=this.options.extensions.renderers[m.type].call({parser:this},m);if(g!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(m.type)){o+=g||"";continue}}let f=d;switch(f.type){case"space":{o+=this.renderer.space(f);break}case"hr":{o+=this.renderer.hr(f);break}case"heading":{o+=this.renderer.heading(f);break}case"code":{o+=this.renderer.code(f);break}case"table":{o+=this.renderer.table(f);break}case"blockquote":{o+=this.renderer.blockquote(f);break}case"list":{o+=this.renderer.list(f);break}case"checkbox":{o+=this.renderer.checkbox(f);break}case"html":{o+=this.renderer.html(f);break}case"def":{o+=this.renderer.def(f);break}case"paragraph":{o+=this.renderer.paragraph(f);break}case"text":{o+=this.renderer.text(f);break}default:{let m='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(m),"";throw new Error(m)}}}return o}parseInline(r,o=this.renderer){let c="";for(let d=0;d<r.length;d++){let f=r[d];if(this.options.extensions?.renderers?.[f.type]){let g=this.options.extensions.renderers[f.type].call({parser:this},f);if(g!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(f.type)){c+=g||"";continue}}let m=f;switch(m.type){case"escape":{c+=o.text(m);break}case"html":{c+=o.html(m);break}case"link":{c+=o.link(m);break}case"image":{c+=o.image(m);break}case"checkbox":{c+=o.checkbox(m);break}case"strong":{c+=o.strong(m);break}case"em":{c+=o.em(m);break}case"codespan":{c+=o.codespan(m);break}case"br":{c+=o.br(m);break}case"del":{c+=o.del(m);break}case"text":{c+=o.text(m);break}default:{let g='Token with "'+m.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw new Error(g)}}}return c}},js=class{options;block;constructor(s){this.options=s||Oa}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}emStrongMask(s){return s}provideLexer(){return this.block?sn.lex:sn.lexInline}provideParser(){return this.block?rn.parse:rn.parseInline}},Oy=class{defaults=Qc();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=rn;Renderer=Wr;TextRenderer=nu;Lexer=sn;Tokenizer=Ir;Hooks=js;constructor(...s){this.use(...s)}walkTokens(s,r){let o=[];for(let c of s)switch(o=o.concat(r.call(this,c)),c.type){case"table":{let d=c;for(let f of d.header)o=o.concat(this.walkTokens(f.tokens,r));for(let f of d.rows)for(let m of f)o=o.concat(this.walkTokens(m.tokens,r));break}case"list":{let d=c;o=o.concat(this.walkTokens(d.items,r));break}default:{let d=c;this.defaults.extensions?.childTokens?.[d.type]?this.defaults.extensions.childTokens[d.type].forEach(f=>{let m=d[f].flat(1/0);o=o.concat(this.walkTokens(m,r))}):d.tokens&&(o=o.concat(this.walkTokens(d.tokens,r)))}}return o}use(...s){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(o=>{let c={...o};if(c.async=this.defaults.async||c.async||!1,o.extensions&&(o.extensions.forEach(d=>{if(!d.name)throw new Error("extension name required");if("renderer"in d){let f=r.renderers[d.name];f?r.renderers[d.name]=function(...m){let g=d.renderer.apply(this,m);return g===!1&&(g=f.apply(this,m)),g}:r.renderers[d.name]=d.renderer}if("tokenizer"in d){if(!d.level||d.level!=="block"&&d.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let f=r[d.level];f?f.unshift(d.tokenizer):r[d.level]=[d.tokenizer],d.start&&(d.level==="block"?r.startBlock?r.startBlock.push(d.start):r.startBlock=[d.start]:d.level==="inline"&&(r.startInline?r.startInline.push(d.start):r.startInline=[d.start]))}"childTokens"in d&&d.childTokens&&(r.childTokens[d.name]=d.childTokens)}),c.extensions=r),o.renderer){let d=this.defaults.renderer||new Wr(this.defaults);for(let f in o.renderer){if(!(f in d))throw new Error(`renderer '${f}' does not exist`);if(["options","parser"].includes(f))continue;let m=f,g=o.renderer[m],h=d[m];d[m]=(...x)=>{let b=g.apply(d,x);return b===!1&&(b=h.apply(d,x)),b||""}}c.renderer=d}if(o.tokenizer){let d=this.defaults.tokenizer||new Ir(this.defaults);for(let f in o.tokenizer){if(!(f in d))throw new Error(`tokenizer '${f}' does not exist`);if(["options","rules","lexer"].includes(f))continue;let m=f,g=o.tokenizer[m],h=d[m];d[m]=(...x)=>{let b=g.apply(d,x);return b===!1&&(b=h.apply(d,x)),b}}c.tokenizer=d}if(o.hooks){let d=this.defaults.hooks||new js;for(let f in o.hooks){if(!(f in d))throw new Error(`hook '${f}' does not exist`);if(["options","block"].includes(f))continue;let m=f,g=o.hooks[m],h=d[m];js.passThroughHooks.has(f)?d[m]=x=>{if(this.defaults.async&&js.passThroughHooksRespectAsync.has(f))return(async()=>{let j=await g.call(d,x);return h.call(d,j)})();let b=g.call(d,x);return h.call(d,b)}:d[m]=(...x)=>{if(this.defaults.async)return(async()=>{let j=await g.apply(d,x);return j===!1&&(j=await h.apply(d,x)),j})();let b=g.apply(d,x);return b===!1&&(b=h.apply(d,x)),b}}c.hooks=d}if(o.walkTokens){let d=this.defaults.walkTokens,f=o.walkTokens;c.walkTokens=function(m){let g=[];return g.push(f.call(this,m)),d&&(g=g.concat(d.call(this,m))),g}}this.defaults={...this.defaults,...c}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,r){return sn.lex(s,r??this.defaults)}parser(s,r){return rn.parse(s,r??this.defaults)}parseMarkdown(s){return(r,o)=>{let c={...o},d={...this.defaults,...c},f=this.onError(!!d.silent,!!d.async);if(this.defaults.async===!0&&c.async===!1)return f(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return f(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return f(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(d.hooks&&(d.hooks.options=d,d.hooks.block=s),d.async)return(async()=>{let m=d.hooks?await d.hooks.preprocess(r):r,g=await(d.hooks?await d.hooks.provideLexer():s?sn.lex:sn.lexInline)(m,d),h=d.hooks?await d.hooks.processAllTokens(g):g;d.walkTokens&&await Promise.all(this.walkTokens(h,d.walkTokens));let x=await(d.hooks?await d.hooks.provideParser():s?rn.parse:rn.parseInline)(h,d);return d.hooks?await d.hooks.postprocess(x):x})().catch(f);try{d.hooks&&(r=d.hooks.preprocess(r));let m=(d.hooks?d.hooks.provideLexer():s?sn.lex:sn.lexInline)(r,d);d.hooks&&(m=d.hooks.processAllTokens(m)),d.walkTokens&&this.walkTokens(m,d.walkTokens);let g=(d.hooks?d.hooks.provideParser():s?rn.parse:rn.parseInline)(m,d);return d.hooks&&(g=d.hooks.postprocess(g)),g}catch(m){return f(m)}}}onError(s,r){return o=>{if(o.message+=`
116
- Please report this to https://github.com/markedjs/marked.`,s){let c="<p>An error occurred:</p><pre>"+mn(o.message+"",!0)+"</pre>";return r?Promise.resolve(c):c}if(r)return Promise.reject(o);throw o}}},_a=new Oy;function Ue(s,r){return _a.parse(s,r)}Ue.options=Ue.setOptions=function(s){return _a.setOptions(s),Ue.defaults=_a.defaults,ah(Ue.defaults),Ue};Ue.getDefaults=Qc;Ue.defaults=Oa;Ue.use=function(...s){return _a.use(...s),Ue.defaults=_a.defaults,ah(Ue.defaults),Ue};Ue.walkTokens=function(s,r){return _a.walkTokens(s,r)};Ue.parseInline=_a.parseInline;Ue.Parser=rn;Ue.parser=rn.parse;Ue.Renderer=Wr;Ue.TextRenderer=nu;Ue.Lexer=sn;Ue.lexer=sn.lex;Ue.Tokenizer=Ir;Ue.Hooks=js;Ue.parse=Ue;Ue.options;Ue.setOptions;Ue.use;Ue.walkTokens;Ue.parseInline;rn.parse;sn.lex;const My=new Set(["script","iframe","object","embed","style","link","meta"]),zy=new Set(["script","iframe","object","embed","link","meta"]);function au(s){const r=new DOMParser().parseFromString(s,"text/html");return lu(r.body,My),r.body.innerHTML}function Dy(s){const o=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;return o.tagName==="parsererror"||o.querySelector("parsererror")?"":(lu(o,zy),new XMLSerializer().serializeToString(o))}function lu(s,r){const o=[];for(const c of s.childNodes)if(c.nodeType===Node.ELEMENT_NODE){const d=c,f=d.tagName.toLowerCase();if(r.has(f)){o.push(c);continue}for(const m of Array.from(d.attributes)){m.name.toLowerCase().startsWith("on")&&d.removeAttribute(m.name);const g=m.value.trim().toLowerCase();(g.startsWith("javascript:")||g.startsWith("data:text/html"))&&d.removeAttribute(m.name)}lu(c,r)}for(const c of o)s.removeChild(c)}Ue.setOptions({breaks:!0,gfm:!0});function hh(s){switch(s.type){case"user-prompt":return{label:"You",text:(s.content.split(`
115
+ `}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${yn(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:r,tokens:o}){let c=this.parser.parseInline(o),d=Tp(s);if(d===null)return c;s=d;let f='<a href="'+s+'"';return r&&(f+=' title="'+yn(r)+'"'),f+=">"+c+"</a>",f}image({href:s,title:r,text:o,tokens:c}){c&&(o=this.parser.parseInline(c,this.parser.textRenderer));let d=Tp(s);if(d===null)return yn(o);s=d;let f=`<img src="${s}" alt="${yn(o)}"`;return r&&(f+=` title="${yn(r)}"`),f+=">",f}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:yn(s.text)}},iu=class{strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return""+s}image({text:s}){return""+s}br(){return""}checkbox({raw:s}){return s}},dn=class Zc{options;renderer;textRenderer;constructor(r){this.options=r||$a,this.options.renderer=this.options.renderer||new ni,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new iu}static parse(r,o){return new Zc(o).parse(r)}static parseInline(r,o){return new Zc(o).parseInline(r)}parse(r){let o="";for(let c=0;c<r.length;c++){let d=r[c];if(this.options.extensions?.renderers?.[d.type]){let m=d,x=this.options.extensions.renderers[m.type].call({parser:this},m);if(x!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(m.type)){o+=x||"";continue}}let f=d;switch(f.type){case"space":{o+=this.renderer.space(f);break}case"hr":{o+=this.renderer.hr(f);break}case"heading":{o+=this.renderer.heading(f);break}case"code":{o+=this.renderer.code(f);break}case"table":{o+=this.renderer.table(f);break}case"blockquote":{o+=this.renderer.blockquote(f);break}case"list":{o+=this.renderer.list(f);break}case"checkbox":{o+=this.renderer.checkbox(f);break}case"html":{o+=this.renderer.html(f);break}case"def":{o+=this.renderer.def(f);break}case"paragraph":{o+=this.renderer.paragraph(f);break}case"text":{o+=this.renderer.text(f);break}default:{let m='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(m),"";throw new Error(m)}}}return o}parseInline(r,o=this.renderer){let c="";for(let d=0;d<r.length;d++){let f=r[d];if(this.options.extensions?.renderers?.[f.type]){let x=this.options.extensions.renderers[f.type].call({parser:this},f);if(x!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(f.type)){c+=x||"";continue}}let m=f;switch(m.type){case"escape":{c+=o.text(m);break}case"html":{c+=o.html(m);break}case"link":{c+=o.link(m);break}case"image":{c+=o.image(m);break}case"checkbox":{c+=o.checkbox(m);break}case"strong":{c+=o.strong(m);break}case"em":{c+=o.em(m);break}case"codespan":{c+=o.codespan(m);break}case"br":{c+=o.br(m);break}case"del":{c+=o.del(m);break}case"text":{c+=o.text(m);break}default:{let x='Token with "'+m.type+'" type was not found.';if(this.options.silent)return console.error(x),"";throw new Error(x)}}}return c}},Ns=class{options;block;constructor(s){this.options=s||$a}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}emStrongMask(s){return s}provideLexer(){return this.block?un.lex:un.lexInline}provideParser(){return this.block?dn.parse:dn.parseInline}},Uy=class{defaults=Pc();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=dn;Renderer=ni;TextRenderer=iu;Lexer=un;Tokenizer=ti;Hooks=Ns;constructor(...s){this.use(...s)}walkTokens(s,r){let o=[];for(let c of s)switch(o=o.concat(r.call(this,c)),c.type){case"table":{let d=c;for(let f of d.header)o=o.concat(this.walkTokens(f.tokens,r));for(let f of d.rows)for(let m of f)o=o.concat(this.walkTokens(m.tokens,r));break}case"list":{let d=c;o=o.concat(this.walkTokens(d.items,r));break}default:{let d=c;this.defaults.extensions?.childTokens?.[d.type]?this.defaults.extensions.childTokens[d.type].forEach(f=>{let m=d[f].flat(1/0);o=o.concat(this.walkTokens(m,r))}):d.tokens&&(o=o.concat(this.walkTokens(d.tokens,r)))}}return o}use(...s){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(o=>{let c={...o};if(c.async=this.defaults.async||c.async||!1,o.extensions&&(o.extensions.forEach(d=>{if(!d.name)throw new Error("extension name required");if("renderer"in d){let f=r.renderers[d.name];f?r.renderers[d.name]=function(...m){let x=d.renderer.apply(this,m);return x===!1&&(x=f.apply(this,m)),x}:r.renderers[d.name]=d.renderer}if("tokenizer"in d){if(!d.level||d.level!=="block"&&d.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let f=r[d.level];f?f.unshift(d.tokenizer):r[d.level]=[d.tokenizer],d.start&&(d.level==="block"?r.startBlock?r.startBlock.push(d.start):r.startBlock=[d.start]:d.level==="inline"&&(r.startInline?r.startInline.push(d.start):r.startInline=[d.start]))}"childTokens"in d&&d.childTokens&&(r.childTokens[d.name]=d.childTokens)}),c.extensions=r),o.renderer){let d=this.defaults.renderer||new ni(this.defaults);for(let f in o.renderer){if(!(f in d))throw new Error(`renderer '${f}' does not exist`);if(["options","parser"].includes(f))continue;let m=f,x=o.renderer[m],h=d[m];d[m]=(...g)=>{let v=x.apply(d,g);return v===!1&&(v=h.apply(d,g)),v||""}}c.renderer=d}if(o.tokenizer){let d=this.defaults.tokenizer||new ti(this.defaults);for(let f in o.tokenizer){if(!(f in d))throw new Error(`tokenizer '${f}' does not exist`);if(["options","rules","lexer"].includes(f))continue;let m=f,x=o.tokenizer[m],h=d[m];d[m]=(...g)=>{let v=x.apply(d,g);return v===!1&&(v=h.apply(d,g)),v}}c.tokenizer=d}if(o.hooks){let d=this.defaults.hooks||new Ns;for(let f in o.hooks){if(!(f in d))throw new Error(`hook '${f}' does not exist`);if(["options","block"].includes(f))continue;let m=f,x=o.hooks[m],h=d[m];Ns.passThroughHooks.has(f)?d[m]=g=>{if(this.defaults.async&&Ns.passThroughHooksRespectAsync.has(f))return(async()=>{let w=await x.call(d,g);return h.call(d,w)})();let v=x.call(d,g);return h.call(d,v)}:d[m]=(...g)=>{if(this.defaults.async)return(async()=>{let w=await x.apply(d,g);return w===!1&&(w=await h.apply(d,g)),w})();let v=x.apply(d,g);return v===!1&&(v=h.apply(d,g)),v}}c.hooks=d}if(o.walkTokens){let d=this.defaults.walkTokens,f=o.walkTokens;c.walkTokens=function(m){let x=[];return x.push(f.call(this,m)),d&&(x=x.concat(d.call(this,m))),x}}this.defaults={...this.defaults,...c}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,r){return un.lex(s,r??this.defaults)}parser(s,r){return dn.parse(s,r??this.defaults)}parseMarkdown(s){return(r,o)=>{let c={...o},d={...this.defaults,...c},f=this.onError(!!d.silent,!!d.async);if(this.defaults.async===!0&&c.async===!1)return f(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return f(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return f(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(d.hooks&&(d.hooks.options=d,d.hooks.block=s),d.async)return(async()=>{let m=d.hooks?await d.hooks.preprocess(r):r,x=await(d.hooks?await d.hooks.provideLexer():s?un.lex:un.lexInline)(m,d),h=d.hooks?await d.hooks.processAllTokens(x):x;d.walkTokens&&await Promise.all(this.walkTokens(h,d.walkTokens));let g=await(d.hooks?await d.hooks.provideParser():s?dn.parse:dn.parseInline)(h,d);return d.hooks?await d.hooks.postprocess(g):g})().catch(f);try{d.hooks&&(r=d.hooks.preprocess(r));let m=(d.hooks?d.hooks.provideLexer():s?un.lex:un.lexInline)(r,d);d.hooks&&(m=d.hooks.processAllTokens(m)),d.walkTokens&&this.walkTokens(m,d.walkTokens);let x=(d.hooks?d.hooks.provideParser():s?dn.parse:dn.parseInline)(m,d);return d.hooks&&(x=d.hooks.postprocess(x)),x}catch(m){return f(m)}}}onError(s,r){return o=>{if(o.message+=`
116
+ Please report this to https://github.com/markedjs/marked.`,s){let c="<p>An error occurred:</p><pre>"+yn(o.message+"",!0)+"</pre>";return r?Promise.resolve(c):c}if(r)return Promise.reject(o);throw o}}},Ua=new Uy;function Ue(s,r){return Ua.parse(s,r)}Ue.options=Ue.setOptions=function(s){return Ua.setOptions(s),Ue.defaults=Ua.defaults,oh(Ue.defaults),Ue};Ue.getDefaults=Pc;Ue.defaults=$a;Ue.use=function(...s){return Ua.use(...s),Ue.defaults=Ua.defaults,oh(Ue.defaults),Ue};Ue.walkTokens=function(s,r){return Ua.walkTokens(s,r)};Ue.parseInline=Ua.parseInline;Ue.Parser=dn;Ue.parser=dn.parse;Ue.Renderer=ni;Ue.TextRenderer=iu;Ue.Lexer=un;Ue.lexer=un.lex;Ue.Tokenizer=ti;Ue.Hooks=Ns;Ue.parse=Ue;Ue.options;Ue.setOptions;Ue.use;Ue.walkTokens;Ue.parseInline;dn.parse;un.lex;const $y=new Set(["script","iframe","object","embed","style","link","meta"]),Hy=new Set(["script","iframe","object","embed","link","meta"]);function ou(s){const r=new DOMParser().parseFromString(s,"text/html");return cu(r.body,$y),r.body.innerHTML}function Gy(s){const o=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;return o.tagName==="parsererror"||o.querySelector("parsererror")?"":(cu(o,Hy),new XMLSerializer().serializeToString(o))}function cu(s,r){const o=[];for(const c of s.childNodes)if(c.nodeType===Node.ELEMENT_NODE){const d=c,f=d.tagName.toLowerCase();if(r.has(f)){o.push(c);continue}for(const m of Array.from(d.attributes)){m.name.toLowerCase().startsWith("on")&&d.removeAttribute(m.name);const x=m.value.trim().toLowerCase();(x.startsWith("javascript:")||x.startsWith("data:text/html"))&&d.removeAttribute(m.name)}cu(c,r)}for(const c of o)s.removeChild(c)}Ue.setOptions({breaks:!0,gfm:!0});function vh(s){switch(s.type){case"user-prompt":return{label:"You",text:(s.content.split(`
117
117
  `).find(o=>o.trim())||"").slice(0,100)};case"compaction-summary":return{label:"Compaction",text:s.content.slice(0,80)};case"thinking":return{label:"Thinking",text:s.content.slice(0,80)};case"text-response":return{label:"Response",text:(s.content.split(`
118
- `).find(o=>o.trim())||"").slice(0,100)};case"tool-call":return{label:s.toolName,text:s.diff?.filePath||s.bashOutput?.command||Object.values(s.input).filter(r=>typeof r=="string").join(", ").slice(0,80)||""}}}function xh(s){switch(s.type){case"user-prompt":return"text-terminal-green";case"compaction-summary":return"text-terminal-dim";case"thinking":return"text-terminal-purple";case"text-response":return"text-terminal-blue";case"tool-call":return"text-terminal-orange"}}function Ly({actions:s,scenes:r,currentIndex:o,onSeek:c,addingForScene:d,onClearAddingTarget:f,readOnly:m=!1}){const{annotations:g,add:h,update:x,remove:b}=s,[j,T]=v.useState(null),[N,w]=v.useState(""),[S,R]=v.useState(null),[A,E]=v.useState(""),_=v.useRef(null),D=v.useRef(null),$=v.useRef(null),ae=v.useRef(null),Y=d??j;v.useEffect(()=>{d!==null&&(w(""),T(null),setTimeout(()=>{ae.current?.scrollIntoView({behavior:"smooth",block:"nearest"}),_.current?.focus()},50))},[d]),v.useEffect(()=>{Y!==null&&_.current&&_.current.focus()},[Y]),v.useEffect(()=>{S&&D.current&&D.current.focus()},[S]);const se=v.useMemo(()=>[...g].sort((P,pe)=>P.sceneIndex-pe.sceneIndex),[g]);v.useEffect(()=>{if(!$.current||Y!==null)return;const P=$.current.querySelectorAll("[data-annotation-scene]");let pe=null,z=1/0;P.forEach(ne=>{const ie=Number(ne.getAttribute("data-annotation-scene")),ee=Math.abs(ie-o);ee<z&&(z=ee,pe=ne)}),pe&&z<=3&&pe.scrollIntoView({behavior:"smooth",block:"nearest"})},[o,Y]);const te=v.useCallback(()=>{T(null),w(""),f()},[f]),Q=v.useCallback(()=>{!N.trim()||Y===null||(h(Y,N.trim()),w(""),T(null),f())},[h,Y,N,f]),le=v.useCallback(()=>{!S||!A.trim()||(x(S,A.trim()),R(null),E(""))},[S,A,x]),oe=Y!==null&&r[Y]?hh(r[Y]):null,ue=Y!==null&&r[Y]?xh(r[Y]):"";return l.jsxs("div",{className:"flex flex-col h-full",children:[l.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-terminal-border-subtle",children:[l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-text uppercase tracking-widest",children:"Comments"}),l.jsxs("div",{className:"flex items-center gap-2",children:[m&&l.jsx("span",{className:"text-xs font-mono text-terminal-dimmer uppercase px-1.5 py-0.5 rounded bg-terminal-surface",children:"Read-only"}),l.jsx("span",{className:"text-xs font-mono text-terminal-dim",children:g.length})]})]}),l.jsxs("div",{ref:$,className:"flex-1 overflow-y-auto",children:[se.length===0&&Y===null&&l.jsxs("div",{className:"px-3 py-8 text-center",children:[l.jsx("div",{className:"text-terminal-dim text-xs font-mono mb-2",children:"No comments yet"}),!m&&l.jsx("div",{className:"text-terminal-dimmer text-xs font-mono",children:"Hover over any message and click the comment icon to add one"})]}),se.map(P=>l.jsx(By,{annotation:P,scene:r[P.sceneIndex],isCurrent:P.sceneIndex===o,isEditing:!m&&S===P.id,editBody:S===P.id?A:"",editTextareaRef:S===P.id?D:void 0,onSeek:()=>c(P.sceneIndex),onStartEdit:()=>{R(P.id),E(P.body)},onCancelEdit:()=>{R(null),E("")},onSaveEdit:le,onEditBodyChange:E,onDelete:()=>b(P.id),readOnly:m},P.id)),!m&&Y!==null&&l.jsxs("div",{ref:ae,className:"px-3 py-2.5 border-b border-terminal-border-subtle bg-terminal-blue-subtle",children:[oe&&l.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[l.jsx("span",{className:`text-xs font-mono font-semibold uppercase ${ue}`,children:oe.label}),l.jsx("span",{className:"text-xs font-mono text-terminal-dim truncate",children:oe.text})]}),l.jsx("textarea",{ref:_,value:N,onChange:P=>w(P.target.value),onKeyDown:P=>{P.key==="Enter"&&(P.metaKey||P.ctrlKey)&&(P.preventDefault(),Q()),P.key==="Escape"&&te()},placeholder:"Add a comment... (Markdown supported)",className:"w-full bg-terminal-surface rounded px-2 py-1.5 text-xs font-mono text-terminal-text placeholder-terminal-dimmer resize-none focus:outline-none ring-1 ring-terminal-border-subtle focus:ring-terminal-blue/40 transition-shadow duration-200",rows:3}),l.jsxs("div",{className:"flex items-center justify-between mt-1.5",children:[l.jsxs("span",{className:"text-xs font-mono text-terminal-dimmer",children:["⌘","+Enter to save"]}),l.jsxs("div",{className:"flex gap-1.5",children:[l.jsx("button",{onClick:te,className:"px-2 py-1 text-xs font-mono text-terminal-dim hover:text-terminal-text transition-colors",children:"Cancel"}),l.jsx("button",{onClick:Q,disabled:!N.trim(),className:"px-2 py-1 text-xs font-mono bg-terminal-blue-subtle text-terminal-blue rounded hover:bg-terminal-blue-emphasis transition-colors disabled:opacity-40",children:"Comment"})]})]})]})]})]})}const By=v.memo(function({annotation:r,scene:o,isCurrent:c,isEditing:d,editBody:f,editTextareaRef:m,onSeek:g,onStartEdit:h,onCancelEdit:x,onSaveEdit:b,onEditBodyChange:j,onDelete:T,readOnly:N=!1}){const[w,S]=v.useState(!1),R=o?hh(o):null,A=o?xh(o):"text-terminal-dim",E=v.useMemo(()=>{try{return new Date(r.createdAt).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return""}},[r.createdAt]),_=r.author==="vibe-feedback";return l.jsxs("div",{"data-annotation-scene":r.sceneIndex,className:`px-3 py-2 border-b border-terminal-border-subtle transition-colors ${_?c?"bg-terminal-purple/10 border-l-2 border-l-terminal-purple":"bg-terminal-purple/[0.03] hover:bg-terminal-purple/[0.06]":c?"bg-terminal-blue/10 border-l-2 border-l-terminal-blue":"hover:bg-terminal-surface/50"}`,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),children:[_&&l.jsx("div",{className:"flex items-center gap-1.5 mb-1",children:l.jsx("span",{className:"text-[10px] font-sans font-semibold uppercase tracking-widest text-terminal-purple px-2 py-0.5 rounded-full bg-terminal-purple-subtle",children:"AI Coach"})}),l.jsxs("button",{onClick:g,className:"flex items-center gap-1.5 mb-1 w-full text-left group/ref",children:[R&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:`text-xs font-mono font-semibold uppercase shrink-0 ${A}`,children:R.label}),l.jsx("span",{className:"text-xs font-mono text-terminal-dim truncate group-hover/ref:text-terminal-text transition-colors",children:R.text})]}),!R&&l.jsxs("span",{className:"text-xs font-mono text-terminal-dim",children:["Step ",r.sceneIndex+1]})]}),l.jsxs("div",{className:"flex items-start gap-1",children:[l.jsx("div",{className:"flex-1 min-w-0",children:d?l.jsxs("div",{children:[l.jsx("textarea",{ref:m,value:f,onChange:D=>j(D.target.value),onKeyDown:D=>{D.key==="Enter"&&(D.metaKey||D.ctrlKey)&&(D.preventDefault(),b()),D.key==="Escape"&&x()},className:"w-full bg-terminal-surface rounded px-2 py-1.5 text-xs font-mono text-terminal-text resize-none focus:outline-none ring-1 ring-terminal-border-subtle focus:ring-terminal-blue/40 transition-shadow duration-200",rows:3}),l.jsxs("div",{className:"flex justify-end gap-1.5 mt-1",children:[l.jsx("button",{onClick:x,className:"px-2 py-0.5 text-xs font-mono text-terminal-dim hover:text-terminal-text transition-colors",children:"Cancel"}),l.jsx("button",{onClick:b,className:"px-2 py-0.5 text-xs font-mono bg-terminal-blue-subtle text-terminal-blue rounded hover:bg-terminal-blue-emphasis transition-colors",children:"Save"})]})]}):l.jsx("div",{className:"prose-terminal text-xs text-terminal-text leading-relaxed",dangerouslySetInnerHTML:{__html:au(Ue.parse(r.body))}})}),!N&&w&&!d&&l.jsxs("div",{className:"flex gap-0.5 shrink-0 pt-0.5",children:[l.jsx("button",{onClick:h,className:"p-0.5 text-xs text-terminal-dim hover:text-terminal-blue transition-colors",title:"Edit",children:"✎"}),l.jsx("button",{onClick:T,className:"p-0.5 text-xs text-terminal-dim hover:text-terminal-red transition-colors",title:"Delete",children:"✕"})]})]}),l.jsx("div",{className:"text-xs font-mono text-terminal-dimmer mt-1",children:E})]})});function Uy({open:s,onClose:r,actions:o,scenes:c,currentIndex:d,onSeek:f,addingForScene:m,onClearAddingTarget:g,readOnly:h}){return v.useEffect(()=>{if(!s)return;const x=b=>{b.key==="Escape"&&(b.preventDefault(),r())};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[s,r]),l.jsxs("div",{className:`fixed inset-0 z-30 hidden md:block transition-opacity duration-300 ${s?"opacity-100":"opacity-0 pointer-events-none"}`,children:[l.jsx("div",{className:"absolute inset-0 bg-black/30",onClick:r}),l.jsxs("div",{className:`absolute top-0 right-0 bottom-0 w-80 bg-terminal-bg border-l border-terminal-border-subtle shadow-layer-xl flex flex-col transition-transform duration-300 ease-material-decel ${s?"translate-x-0":"translate-x-full"}`,onClick:x=>x.stopPropagation(),children:[l.jsx("button",{onClick:r,className:"absolute top-2 right-2 z-10 p-1 text-terminal-dim hover:text-terminal-text transition-colors",title:"Close comments",children:"✕"}),l.jsx(Ly,{actions:o,scenes:c,currentIndex:d,onSeek:f,addingForScene:m,onClearAddingTarget:g,readOnly:h})]})]})}const Hy=[1,5,10];function $y({state:s,speed:r,currentIndex:o,totalScenes:c,userPromptCount:d,currentTurn:f,onTogglePlayPause:m,onChangeSpeed:g,onPrevPrompt:h,onNextPrompt:x,onOpenSearch:b,onOpenOutline:j,onShowHelp:T}){const N=s==="playing",w=N?"⏸":"▶",S=N?"Pause":"Play",[R,A]=v.useState(null),E=v.useCallback($=>{A($),setTimeout(()=>A(null),300)},[]),_=$=>R===$?"scale-105":"",D="px-2.5 py-1.5 text-xs font-sans rounded-lg transition-all duration-200 ease-material";return l.jsxs("div",{className:"flex items-center justify-between px-4 md:px-5 py-2.5",children:[l.jsxs("div",{className:"flex items-center gap-1 md:gap-2",children:[l.jsxs("button",{onClick:()=>{E("play"),m()},className:`${D} bg-terminal-green-subtle text-terminal-green hover:bg-terminal-green-emphasis font-medium ${_("play")}`,title:"Play/Pause (Space)",children:[l.jsx("span",{children:w}),l.jsx("span",{className:"hidden sm:inline ml-1.5",children:S})]}),l.jsx("div",{className:"flex items-center rounded-lg bg-terminal-surface overflow-hidden",children:Hy.map($=>l.jsxs("button",{onClick:()=>{E(`speed-${$}`),g($)},className:`px-2.5 py-1.5 text-xs font-mono transition-all duration-200 ease-material ${r===$?"bg-terminal-green-subtle text-terminal-green font-medium":"text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover"} ${_(`speed-${$}`)}`,children:[$,"x"]},$))}),l.jsxs("div",{className:"flex items-center",children:[l.jsx("button",{onClick:()=>{E("prev"),h()},className:`${D} text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover ${_("prev")}`,title:"Previous turn (p)",children:"‹"}),l.jsxs("span",{className:"px-1.5 py-1.5 text-xs font-sans text-terminal-dim tabular-nums flex items-center gap-1",children:[l.jsx("span",{className:"hidden sm:inline",children:"Turn "}),l.jsx("span",{className:"font-mono",children:f}),l.jsx("span",{children:"/"}),l.jsx("span",{className:"font-mono",children:d})]}),l.jsx("button",{onClick:()=>{E("next"),x()},className:`${D} text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover ${_("next")}`,title:"Next turn (n)",children:"›"})]})]}),l.jsxs("button",{onClick:()=>{E("search"),b()},className:`h-8 flex-grow flex items-center gap-3 px-3 rounded-lg bg-terminal-surface/20 border border-terminal-border-subtle hover:border-terminal-blue/40 hover:bg-terminal-blue-subtle/20 group/search transition-all duration-200 max-w-sm ${_("search")}`,title:"Search (/ or Cmd+K)",children:[l.jsx("span",{className:"text-sm opacity-70 group-hover/search:opacity-100 transition-opacity",children:"🔍"}),l.jsx("span",{className:"text-[11px] font-sans font-medium text-terminal-dim group-hover/search:text-terminal-blue transition-colors",children:"Search..."}),l.jsx("div",{className:"flex items-center gap-1 ml-1 opacity-40 group-hover/search:opacity-80 transition-opacity",children:l.jsx("span",{className:"px-1 py-0.5 rounded bg-terminal-surface border border-terminal-border/50 text-[9px] font-mono font-bold text-terminal-text",children:"/"})})]}),l.jsxs("div",{className:"flex items-center gap-2 md:gap-4",children:[j&&l.jsx("button",{onClick:()=>{E("outline"),j()},className:`${D} md:hidden text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover ${_("outline")}`,title:"Outline",children:"☰"}),T&&l.jsxs("button",{onClick:()=>{E("help"),T()},className:`flex items-center gap-2.5 px-3 py-1.5 rounded-lg text-terminal-dimmer hover:text-terminal-text hover:bg-terminal-surface-hover group/help transition-all duration-200 ${_("help")}`,title:"Keyboard Shortcuts (?)",children:[l.jsx("div",{className:"flex items-center justify-center w-5 h-5 rounded border border-terminal-border-subtle/50 bg-terminal-surface group-hover/help:border-terminal-text group-hover/help:text-terminal-bg group-hover/help:bg-terminal-text transition-all duration-200",children:l.jsx("span",{className:"text-[11px] font-mono font-black",children:"?"})}),l.jsx("span",{className:"hidden lg:inline text-[10px] font-sans font-bold uppercase tracking-widest opacity-60 group-hover/help:opacity-100",children:"Press ? for help"})]})]}),l.jsxs("div",{className:"hidden sm:flex items-center gap-2 md:gap-3 text-xs text-terminal-dim font-mono shrink-0",children:[s==="paused"&&l.jsx("span",{className:"text-[10px] font-sans font-semibold uppercase tracking-widest text-terminal-orange",children:"Paused"}),l.jsxs("span",{className:"tabular-nums",children:[Math.max(0,o+1)," / ",c]})]})]})}const Ep=3,gh=v.memo(function({content:r}){const[o,c]=v.useState(!1),d=r.split(`
119
- `),f=d.length>Ep,m=f&&!o?d.slice(0,Ep).join(`
120
- `):r;return l.jsxs("div",{children:[l.jsxs("div",{className:`text-xs font-mono text-terminal-dimmer whitespace-pre-wrap leading-relaxed ${f&&!o?"max-h-[4.5em] overflow-hidden relative":""}`,children:[m,f&&!o&&l.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-8 bg-gradient-to-t from-terminal-bg to-transparent"})]}),f&&l.jsx("button",{onClick:()=>c(!o),className:"mt-1 text-xs font-mono text-terminal-dimmer hover:text-terminal-text transition-colors",children:o?"Show less":`Show full summary (${d.length} lines)`})]})}),Tp=600,bh=v.memo(function({content:r,isActive:o}){const c=r.length>Tp,[d,f]=v.useState(!1),m=c&&!d?`${r.slice(0,Tp)}...`:r,g=v.useMemo(()=>au(Ue.parse(m)),[m]);return l.jsxs("div",{children:[l.jsxs("div",{className:`prose-terminal text-sm text-terminal-text ${o?"typing-cursor":""} ${c&&!d?"max-h-[200px] overflow-hidden relative":""}`,children:[l.jsx("div",{dangerouslySetInnerHTML:{__html:g}}),c&&!d&&l.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-terminal-bg to-transparent"})]}),c&&l.jsx("button",{onClick:()=>f(!d),className:"mt-1 text-xs font-mono text-terminal-blue hover:text-terminal-text transition-colors",children:d?"Show less":`Show more (${r.length} chars)`})]})}),Gy=v.memo(function({content:r,isActive:o}){const[c,d]=v.useState(!1);return l.jsxs("div",{className:"ml-6",children:[l.jsxs("button",{onClick:()=>d(!c),className:"flex items-center gap-2 text-xs text-terminal-dim hover:text-terminal-text transition-colors duration-200 ease-material font-mono",children:[l.jsx("span",{className:`transition-transform ${c?"rotate-90":""}`,children:"▶"}),l.jsx("span",{className:o?"animate-pulse":"",children:"Thinking..."}),l.jsxs("span",{className:"text-terminal-purple",children:["(",r.length," chars)"]})]}),c&&l.jsx("div",{className:"mt-2 pl-5 text-xs text-terminal-dim font-mono whitespace-pre-wrap break-words border-l-2 border-terminal-purple/30 max-h-[300px] overflow-y-auto",children:r})]})}),qy=v.memo(function({command:r,stdout:o,isActive:c}){const[d,f]=v.useState(!0),m=o.trim().length>0;return l.jsxs("div",{className:"bg-terminal-surface rounded-xl overflow-hidden shadow-layer-sm",children:[l.jsxs("button",{onClick:()=>m&&f(!d),className:"w-full flex items-center gap-2 px-3 py-2 hover:bg-terminal-surface-hover transition-colors duration-200 ease-material text-left",children:[l.jsx("span",{className:"text-xs font-mono font-bold text-terminal-orange",children:"$"}),l.jsx("span",{className:"text-xs font-mono text-terminal-text truncate flex-1",children:r}),m&&l.jsx("span",{className:`text-xs text-terminal-dim transition-transform ${d?"rotate-90":""}`,children:"▶"})]}),d&&m&&l.jsx("div",{className:"px-3 py-2 max-h-[300px] overflow-y-auto",children:l.jsx("pre",{className:"text-xs font-mono text-terminal-dim whitespace-pre-wrap break-words",children:o})})]})});function hn(){}hn.prototype={diff:function(r,o){var c,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f=d.callback;typeof d=="function"&&(f=d,d={});var m=this;function g(D){return D=m.postProcess(D,d),f?(setTimeout(function(){f(D)},0),!0):D}r=this.castInput(r,d),o=this.castInput(o,d),r=this.removeEmpty(this.tokenize(r,d)),o=this.removeEmpty(this.tokenize(o,d));var h=o.length,x=r.length,b=1,j=h+x;d.maxEditLength!=null&&(j=Math.min(j,d.maxEditLength));var T=(c=d.timeout)!==null&&c!==void 0?c:1/0,N=Date.now()+T,w=[{oldPos:-1,lastComponent:void 0}],S=this.extractCommon(w[0],o,r,0,d);if(w[0].oldPos+1>=x&&S+1>=h)return g(Ap(m,w[0].lastComponent,o,r,m.useLongestToken));var R=-1/0,A=1/0;function E(){for(var D=Math.max(R,-b);D<=Math.min(A,b);D+=2){var $=void 0,ae=w[D-1],Y=w[D+1];ae&&(w[D-1]=void 0);var se=!1;if(Y){var te=Y.oldPos-D;se=Y&&0<=te&&te<h}var Q=ae&&ae.oldPos+1<x;if(!se&&!Q){w[D]=void 0;continue}if(!Q||se&&ae.oldPos<Y.oldPos?$=m.addToPath(Y,!0,!1,0,d):$=m.addToPath(ae,!1,!0,1,d),S=m.extractCommon($,o,r,D,d),$.oldPos+1>=x&&S+1>=h)return g(Ap(m,$.lastComponent,o,r,m.useLongestToken));w[D]=$,$.oldPos+1>=x&&(A=Math.min(A,D-1)),S+1>=h&&(R=Math.max(R,D+1))}b++}if(f)(function D(){setTimeout(function(){if(b>j||Date.now()>N)return f();E()||D()},0)})();else for(;b<=j&&Date.now()<=N;){var _=E();if(_)return _}},addToPath:function(r,o,c,d,f){var m=r.lastComponent;return m&&!f.oneChangePerToken&&m.added===o&&m.removed===c?{oldPos:r.oldPos+d,lastComponent:{count:m.count+1,added:o,removed:c,previousComponent:m.previousComponent}}:{oldPos:r.oldPos+d,lastComponent:{count:1,added:o,removed:c,previousComponent:m}}},extractCommon:function(r,o,c,d,f){for(var m=o.length,g=c.length,h=r.oldPos,x=h-d,b=0;x+1<m&&h+1<g&&this.equals(c[h+1],o[x+1],f);)x++,h++,b++,f.oneChangePerToken&&(r.lastComponent={count:1,previousComponent:r.lastComponent,added:!1,removed:!1});return b&&!f.oneChangePerToken&&(r.lastComponent={count:b,previousComponent:r.lastComponent,added:!1,removed:!1}),r.oldPos=h,x},equals:function(r,o,c){return c.comparator?c.comparator(r,o):r===o||c.ignoreCase&&r.toLowerCase()===o.toLowerCase()},removeEmpty:function(r){for(var o=[],c=0;c<r.length;c++)r[c]&&o.push(r[c]);return o},castInput:function(r){return r},tokenize:function(r){return Array.from(r)},join:function(r){return r.join("")},postProcess:function(r){return r}};function Ap(s,r,o,c,d){for(var f=[],m;r;)f.push(r),m=r.previousComponent,delete r.previousComponent,r=m;f.reverse();for(var g=0,h=f.length,x=0,b=0;g<h;g++){var j=f[g];if(j.removed)j.value=s.join(c.slice(b,b+j.count)),b+=j.count;else{if(!j.added&&d){var T=o.slice(x,x+j.count);T=T.map(function(N,w){var S=c[b+w];return S.length>N.length?S:N}),j.value=s.join(T)}else j.value=s.join(o.slice(x,x+j.count));x+=j.count,j.added||(b+=j.count)}}return f}function Cp(s,r){var o;for(o=0;o<s.length&&o<r.length;o++)if(s[o]!=r[o])return s.slice(0,o);return s.slice(0,o)}function Rp(s,r){var o;if(!s||!r||s[s.length-1]!=r[r.length-1])return"";for(o=0;o<s.length&&o<r.length;o++)if(s[s.length-(o+1)]!=r[r.length-(o+1)])return s.slice(-o);return s.slice(-o)}function $c(s,r,o){if(s.slice(0,r.length)!=r)throw Error("string ".concat(JSON.stringify(s)," doesn't start with prefix ").concat(JSON.stringify(r),"; this is a bug"));return o+s.slice(r.length)}function Gc(s,r,o){if(!r)return s+o;if(s.slice(-r.length)!=r)throw Error("string ".concat(JSON.stringify(s)," doesn't end with suffix ").concat(JSON.stringify(r),"; this is a bug"));return s.slice(0,-r.length)+o}function vs(s,r){return $c(s,r,"")}function Xr(s,r){return Gc(s,r,"")}function _p(s,r){return r.slice(0,Yy(s,r))}function Yy(s,r){var o=0;s.length>r.length&&(o=s.length-r.length);var c=r.length;s.length<r.length&&(c=s.length);var d=Array(c),f=0;d[0]=0;for(var m=1;m<c;m++){for(r[m]==r[f]?d[m]=d[f]:d[m]=f;f>0&&r[m]!=r[f];)f=d[f];r[m]==r[f]&&f++}f=0;for(var g=o;g<s.length;g++){for(;f>0&&s[g]!=r[f];)f=d[f];s[g]==r[f]&&f++}return f}var Pr="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",Zy=new RegExp("[".concat(Pr,"]+|\\s+|[^").concat(Pr,"]"),"ug"),li=new hn;li.equals=function(s,r,o){return o.ignoreCase&&(s=s.toLowerCase(),r=r.toLowerCase()),s.trim()===r.trim()};li.tokenize=function(s){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o;if(r.intlSegmenter){if(r.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');o=Array.from(r.intlSegmenter.segment(s),function(f){return f.segment})}else o=s.match(Zy)||[];var c=[],d=null;return o.forEach(function(f){/\s/.test(f)?d==null?c.push(f):c.push(c.pop()+f):/\s/.test(d)?c[c.length-1]==d?c.push(c.pop()+f):c.push(d+f):c.push(f),d=f}),c};li.join=function(s){return s.map(function(r,o){return o==0?r:r.replace(/^\s+/,"")}).join("")};li.postProcess=function(s,r){if(!s||r.oneChangePerToken)return s;var o=null,c=null,d=null;return s.forEach(function(f){f.added?c=f:f.removed?d=f:((c||d)&&Op(o,d,c,f),o=f,c=null,d=null)}),(c||d)&&Op(o,d,c,null),s};function Op(s,r,o,c){if(r&&o){var d=r.value.match(/^\s*/)[0],f=r.value.match(/\s*$/)[0],m=o.value.match(/^\s*/)[0],g=o.value.match(/\s*$/)[0];if(s){var h=Cp(d,m);s.value=Gc(s.value,m,h),r.value=vs(r.value,h),o.value=vs(o.value,h)}if(c){var x=Rp(f,g);c.value=$c(c.value,g,x),r.value=Xr(r.value,x),o.value=Xr(o.value,x)}}else if(o)s&&(o.value=o.value.replace(/^\s*/,"")),c&&(c.value=c.value.replace(/^\s*/,""));else if(s&&c){var b=c.value.match(/^\s*/)[0],j=r.value.match(/^\s*/)[0],T=r.value.match(/\s*$/)[0],N=Cp(b,j);r.value=vs(r.value,N);var w=Rp(vs(b,N),T);r.value=Xr(r.value,w),c.value=$c(c.value,b,w),s.value=Gc(s.value,b,b.slice(0,b.length-w.length))}else if(c){var S=c.value.match(/^\s*/)[0],R=r.value.match(/\s*$/)[0],A=_p(R,S);r.value=Xr(r.value,A)}else if(s){var E=s.value.match(/\s*$/)[0],_=r.value.match(/^\s*/)[0],D=_p(E,_);r.value=vs(r.value,D)}}var Xy=new hn;Xy.tokenize=function(s){var r=new RegExp("(\\r?\\n)|[".concat(Pr,"]+|[^\\S\\n\\r]+|[^").concat(Pr,"]"),"ug");return s.match(r)||[]};var si=new hn;si.tokenize=function(s,r){r.stripTrailingCr&&(s=s.replace(/\r\n/g,`
121
- `));var o=[],c=s.split(/(\n|\r\n)/);c[c.length-1]||c.pop();for(var d=0;d<c.length;d++){var f=c[d];d%2&&!r.newlineIsToken?o[o.length-1]+=f:o.push(f)}return o};si.equals=function(s,r,o){return o.ignoreWhitespace?((!o.newlineIsToken||!s.includes(`
118
+ `).find(o=>o.trim())||"").slice(0,100)};case"tool-call":return{label:s.toolName,text:s.diff?.filePath||s.bashOutput?.command||Object.values(s.input).filter(r=>typeof r=="string").join(", ").slice(0,80)||""}}}function jh(s){switch(s.type){case"user-prompt":return"text-terminal-green";case"compaction-summary":return"text-terminal-dim";case"thinking":return"text-terminal-purple";case"text-response":return"text-terminal-blue";case"tool-call":return"text-terminal-orange"}}function qy({actions:s,scenes:r,currentIndex:o,onSeek:c,addingForScene:d,onClearAddingTarget:f,readOnly:m=!1}){const{annotations:x,add:h,update:g,remove:v}=s,[w,T]=y.useState(null),[N,j]=y.useState(""),[S,C]=y.useState(null),[E,k]=y.useState(""),_=y.useRef(null),z=y.useRef(null),U=y.useRef(null),J=y.useRef(null),Z=d??w;y.useEffect(()=>{d!==null&&(j(""),T(null),setTimeout(()=>{J.current?.scrollIntoView({behavior:"smooth",block:"nearest"}),_.current?.focus()},50))},[d]),y.useEffect(()=>{Z!==null&&_.current&&_.current.focus()},[Z]),y.useEffect(()=>{S&&z.current&&z.current.focus()},[S]);const re=y.useMemo(()=>[...x].sort((ne,pe)=>ne.sceneIndex-pe.sceneIndex),[x]);y.useEffect(()=>{if(!U.current||Z!==null)return;const ne=U.current.querySelectorAll("[data-annotation-scene]");let pe=null,B=1/0;ne.forEach(W=>{const ie=Number(W.getAttribute("data-annotation-scene")),le=Math.abs(ie-o);le<B&&(B=le,pe=W)}),pe&&B<=3&&pe.scrollIntoView({behavior:"smooth",block:"nearest"})},[o,Z]);const ae=y.useCallback(()=>{T(null),j(""),f()},[f]),P=y.useCallback(()=>{!N.trim()||Z===null||(h(Z,N.trim()),j(""),T(null),f())},[h,Z,N,f]),V=y.useCallback(()=>{!S||!E.trim()||(g(S,E.trim()),C(null),k(""))},[S,E,g]),oe=Z!==null&&r[Z]?vh(r[Z]):null,ce=Z!==null&&r[Z]?jh(r[Z]):"";return l.jsxs("div",{className:"flex flex-col h-full",children:[l.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-terminal-border-subtle",children:[l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-text uppercase tracking-widest",children:"Comments"}),l.jsxs("div",{className:"flex items-center gap-2",children:[m&&l.jsx("span",{className:"text-xs font-mono text-terminal-dimmer uppercase px-1.5 py-0.5 rounded bg-terminal-surface",children:"Read-only"}),l.jsx("span",{className:"text-xs font-mono text-terminal-dim",children:x.length})]})]}),l.jsxs("div",{ref:U,className:"flex-1 overflow-y-auto",children:[re.length===0&&Z===null&&l.jsxs("div",{className:"px-3 py-8 text-center",children:[l.jsx("div",{className:"text-terminal-dim text-xs font-mono mb-2",children:"No comments yet"}),!m&&l.jsx("div",{className:"text-terminal-dimmer text-xs font-mono",children:"Hover over any message and click the comment icon to add one"})]}),re.map(ne=>l.jsx(Yy,{annotation:ne,scene:r[ne.sceneIndex],isCurrent:ne.sceneIndex===o,isEditing:!m&&S===ne.id,editBody:S===ne.id?E:"",editTextareaRef:S===ne.id?z:void 0,onSeek:()=>c(ne.sceneIndex),onStartEdit:()=>{C(ne.id),k(ne.body)},onCancelEdit:()=>{C(null),k("")},onSaveEdit:V,onEditBodyChange:k,onDelete:()=>v(ne.id),readOnly:m},ne.id)),!m&&Z!==null&&l.jsxs("div",{ref:J,className:"px-3 py-2.5 border-b border-terminal-border-subtle bg-terminal-blue-subtle",children:[oe&&l.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[l.jsx("span",{className:`text-xs font-mono font-semibold uppercase ${ce}`,children:oe.label}),l.jsx("span",{className:"text-xs font-mono text-terminal-dim truncate",children:oe.text})]}),l.jsx("textarea",{ref:_,value:N,onChange:ne=>j(ne.target.value),onKeyDown:ne=>{ne.key==="Enter"&&(ne.metaKey||ne.ctrlKey)&&(ne.preventDefault(),P()),ne.key==="Escape"&&ae()},placeholder:"Add a comment... (Markdown supported)",className:"w-full bg-terminal-surface rounded px-2 py-1.5 text-xs font-mono text-terminal-text placeholder-terminal-dimmer resize-none focus:outline-none ring-1 ring-terminal-border-subtle focus:ring-terminal-blue/40 transition-shadow duration-200",rows:3}),l.jsxs("div",{className:"flex items-center justify-between mt-1.5",children:[l.jsxs("span",{className:"text-xs font-mono text-terminal-dimmer",children:["⌘","+Enter to save"]}),l.jsxs("div",{className:"flex gap-1.5",children:[l.jsx("button",{onClick:ae,className:"px-2 py-1 text-xs font-mono text-terminal-dim hover:text-terminal-text transition-colors",children:"Cancel"}),l.jsx("button",{onClick:P,disabled:!N.trim(),className:"px-2 py-1 text-xs font-mono bg-terminal-blue-subtle text-terminal-blue rounded hover:bg-terminal-blue-emphasis transition-colors disabled:opacity-40",children:"Comment"})]})]})]})]})]})}const Yy=y.memo(function({annotation:r,scene:o,isCurrent:c,isEditing:d,editBody:f,editTextareaRef:m,onSeek:x,onStartEdit:h,onCancelEdit:g,onSaveEdit:v,onEditBodyChange:w,onDelete:T,readOnly:N=!1}){const[j,S]=y.useState(!1),C=o?vh(o):null,E=o?jh(o):"text-terminal-dim",k=y.useMemo(()=>{try{return new Date(r.createdAt).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return""}},[r.createdAt]),_=r.author==="vibe-feedback";return l.jsxs("div",{"data-annotation-scene":r.sceneIndex,className:`px-3 py-2 border-b border-terminal-border-subtle transition-colors ${_?c?"bg-terminal-purple/10 border-l-2 border-l-terminal-purple":"bg-terminal-purple/[0.03] hover:bg-terminal-purple/[0.06]":c?"bg-terminal-blue/10 border-l-2 border-l-terminal-blue":"hover:bg-terminal-surface/50"}`,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),children:[_&&l.jsx("div",{className:"flex items-center gap-1.5 mb-1",children:l.jsx("span",{className:"text-[10px] font-sans font-semibold uppercase tracking-widest text-terminal-purple px-2 py-0.5 rounded-full bg-terminal-purple-subtle",children:"AI Coach"})}),l.jsxs("button",{onClick:x,className:"flex items-center gap-1.5 mb-1 w-full text-left group/ref",children:[C&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:`text-xs font-mono font-semibold uppercase shrink-0 ${E}`,children:C.label}),l.jsx("span",{className:"text-xs font-mono text-terminal-dim truncate group-hover/ref:text-terminal-text transition-colors",children:C.text})]}),!C&&l.jsxs("span",{className:"text-xs font-mono text-terminal-dim",children:["Step ",r.sceneIndex+1]})]}),l.jsxs("div",{className:"flex items-start gap-1",children:[l.jsx("div",{className:"flex-1 min-w-0",children:d?l.jsxs("div",{children:[l.jsx("textarea",{ref:m,value:f,onChange:z=>w(z.target.value),onKeyDown:z=>{z.key==="Enter"&&(z.metaKey||z.ctrlKey)&&(z.preventDefault(),v()),z.key==="Escape"&&g()},className:"w-full bg-terminal-surface rounded px-2 py-1.5 text-xs font-mono text-terminal-text resize-none focus:outline-none ring-1 ring-terminal-border-subtle focus:ring-terminal-blue/40 transition-shadow duration-200",rows:3}),l.jsxs("div",{className:"flex justify-end gap-1.5 mt-1",children:[l.jsx("button",{onClick:g,className:"px-2 py-0.5 text-xs font-mono text-terminal-dim hover:text-terminal-text transition-colors",children:"Cancel"}),l.jsx("button",{onClick:v,className:"px-2 py-0.5 text-xs font-mono bg-terminal-blue-subtle text-terminal-blue rounded hover:bg-terminal-blue-emphasis transition-colors",children:"Save"})]})]}):l.jsx("div",{className:"prose-terminal text-xs text-terminal-text leading-relaxed",dangerouslySetInnerHTML:{__html:ou(Ue.parse(r.body))}})}),!N&&j&&!d&&l.jsxs("div",{className:"flex gap-0.5 shrink-0 pt-0.5",children:[l.jsx("button",{onClick:h,className:"p-0.5 text-xs text-terminal-dim hover:text-terminal-blue transition-colors",title:"Edit",children:"✎"}),l.jsx("button",{onClick:T,className:"p-0.5 text-xs text-terminal-dim hover:text-terminal-red transition-colors",title:"Delete",children:"✕"})]})]}),l.jsx("div",{className:"text-xs font-mono text-terminal-dimmer mt-1",children:k})]})});function Zy({open:s,onClose:r,actions:o,scenes:c,currentIndex:d,onSeek:f,addingForScene:m,onClearAddingTarget:x,readOnly:h}){return y.useEffect(()=>{if(!s)return;const g=v=>{v.key==="Escape"&&(v.preventDefault(),r())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[s,r]),l.jsxs("div",{className:`fixed inset-0 z-30 hidden md:block transition-opacity duration-300 ${s?"opacity-100":"opacity-0 pointer-events-none"}`,children:[l.jsx("div",{className:"absolute inset-0 bg-black/30",onClick:r}),l.jsxs("div",{className:`absolute top-0 right-0 bottom-0 w-80 bg-terminal-bg border-l border-terminal-border-subtle shadow-layer-xl flex flex-col transition-transform duration-300 ease-material-decel ${s?"translate-x-0":"translate-x-full"}`,onClick:g=>g.stopPropagation(),children:[l.jsx("button",{onClick:r,className:"absolute top-2 right-2 z-10 p-1 text-terminal-dim hover:text-terminal-text transition-colors",title:"Close comments",children:"✕"}),l.jsx(qy,{actions:o,scenes:c,currentIndex:d,onSeek:f,addingForScene:m,onClearAddingTarget:x,readOnly:h})]})]})}const Fy=[1,5,10];function Xy({state:s,speed:r,currentIndex:o,totalScenes:c,userPromptCount:d,currentTurn:f,onTogglePlayPause:m,onChangeSpeed:x,onPrevPrompt:h,onNextPrompt:g,onOpenSearch:v,onOpenOutline:w,onShowHelp:T}){const N=s==="playing",j=N?"⏸":"▶",S=N?"Pause":"Play",[C,E]=y.useState(null),k=y.useCallback(U=>{E(U),setTimeout(()=>E(null),300)},[]),_=U=>C===U?"scale-105":"",z="px-2.5 py-1.5 text-xs font-sans rounded-lg transition-all duration-200 ease-material";return l.jsxs("div",{className:"flex items-center justify-between px-4 md:px-5 py-2.5",children:[l.jsxs("div",{className:"flex items-center gap-1 md:gap-2",children:[l.jsxs("button",{onClick:()=>{k("play"),m()},className:`${z} bg-terminal-green-subtle text-terminal-green hover:bg-terminal-green-emphasis font-medium ${_("play")}`,title:"Play/Pause (Space)",children:[l.jsx("span",{children:j}),l.jsx("span",{className:"hidden sm:inline ml-1.5",children:S})]}),l.jsx("div",{className:"flex items-center rounded-lg bg-terminal-surface overflow-hidden",children:Fy.map(U=>l.jsxs("button",{onClick:()=>{k(`speed-${U}`),x(U)},className:`px-2.5 py-1.5 text-xs font-mono transition-all duration-200 ease-material ${r===U?"bg-terminal-green-subtle text-terminal-green font-medium":"text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover"} ${_(`speed-${U}`)}`,children:[U,"x"]},U))}),l.jsxs("div",{className:"flex items-center",children:[l.jsx("button",{onClick:()=>{k("prev"),h()},className:`${z} text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover ${_("prev")}`,title:"Previous turn (p)",children:"‹"}),l.jsxs("span",{className:"px-1.5 py-1.5 text-xs font-sans text-terminal-dim tabular-nums flex items-center gap-1",children:[l.jsx("span",{className:"hidden sm:inline",children:"Turn "}),l.jsx("span",{className:"font-mono",children:f}),l.jsx("span",{children:"/"}),l.jsx("span",{className:"font-mono",children:d})]}),l.jsx("button",{onClick:()=>{k("next"),g()},className:`${z} text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover ${_("next")}`,title:"Next turn (n)",children:"›"})]})]}),l.jsxs("button",{onClick:()=>{k("search"),v()},className:`h-8 flex-grow flex items-center gap-3 px-3 rounded-lg bg-terminal-surface/20 border border-terminal-border-subtle hover:border-terminal-blue/40 hover:bg-terminal-blue-subtle/20 group/search transition-all duration-200 max-w-sm ${_("search")}`,title:"Search (/ or Cmd+K)",children:[l.jsx("span",{className:"text-sm opacity-70 group-hover/search:opacity-100 transition-opacity",children:"🔍"}),l.jsx("span",{className:"text-[11px] font-sans font-medium text-terminal-dim group-hover/search:text-terminal-blue transition-colors",children:"Search..."}),l.jsx("div",{className:"flex items-center gap-1 ml-1 opacity-40 group-hover/search:opacity-80 transition-opacity",children:l.jsx("span",{className:"px-1 py-0.5 rounded bg-terminal-surface border border-terminal-border/50 text-[9px] font-mono font-bold text-terminal-text",children:"/"})})]}),l.jsxs("div",{className:"flex items-center gap-2 md:gap-4",children:[w&&l.jsx("button",{onClick:()=>{k("outline"),w()},className:`${z} md:hidden text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover ${_("outline")}`,title:"Outline",children:"☰"}),T&&l.jsxs("button",{onClick:()=>{k("help"),T()},className:`flex items-center gap-2.5 px-3 py-1.5 rounded-lg text-terminal-dimmer hover:text-terminal-text hover:bg-terminal-surface-hover group/help transition-all duration-200 ${_("help")}`,title:"Keyboard Shortcuts (?)",children:[l.jsx("div",{className:"flex items-center justify-center w-5 h-5 rounded border border-terminal-border-subtle/50 bg-terminal-surface group-hover/help:border-terminal-text group-hover/help:text-terminal-bg group-hover/help:bg-terminal-text transition-all duration-200",children:l.jsx("span",{className:"text-[11px] font-mono font-black",children:"?"})}),l.jsx("span",{className:"hidden lg:inline text-[10px] font-sans font-bold uppercase tracking-widest opacity-60 group-hover/help:opacity-100",children:"Press ? for help"})]})]}),l.jsxs("div",{className:"hidden sm:flex items-center gap-2 md:gap-3 text-xs text-terminal-dim font-mono shrink-0",children:[s==="paused"&&l.jsx("span",{className:"text-[10px] font-sans font-semibold uppercase tracking-widest text-terminal-orange",children:"Paused"}),l.jsxs("span",{className:"tabular-nums",children:[Math.max(0,o+1)," / ",c]})]})]})}const Rp=3,wh=y.memo(function({content:r,isActive:o}){const[c,d]=y.useState(!1),f=r.split(`
119
+ `),m=f.length>Rp;y.useEffect(()=>{if(!o)return;const h=g=>{const v=g.detail;v.action==="expand"?d(!0):v.action==="collapse"&&d(!1)};return window.addEventListener("vibe:toggle-expand",h),()=>window.removeEventListener("vibe:toggle-expand",h)},[o]);const x=m&&!c?f.slice(0,Rp).join(`
120
+ `):r;return l.jsxs("div",{children:[l.jsxs("div",{className:`text-xs font-mono text-terminal-dimmer whitespace-pre-wrap leading-relaxed ${m&&!c?"max-h-[4.5em] overflow-hidden relative":""}`,children:[x,m&&!c&&l.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-8 bg-gradient-to-t from-terminal-surface to-transparent pointer-events-none"})]}),m&&l.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),d(!c)},className:"mt-1 text-xs font-mono text-terminal-dim hover:text-terminal-text transition-colors cursor-pointer",children:c?"Show less":`Show full summary (${f.length} lines)`})]})}),_p=600,Sh=y.memo(function({content:r,isActive:o}){const c=r.length>_p,[d,f]=y.useState(!1),m=c&&!d?`${r.slice(0,_p)}...`:r,x=y.useMemo(()=>ou(Ue.parse(m)),[m]);return l.jsxs("div",{children:[l.jsxs("div",{className:`prose-terminal text-sm text-terminal-text ${o?"typing-cursor":""} ${c&&!d?"max-h-[200px] overflow-hidden relative":""}`,children:[l.jsx("div",{dangerouslySetInnerHTML:{__html:x}}),c&&!d&&l.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-terminal-bg to-transparent"})]}),c&&l.jsx("button",{onClick:()=>f(!d),className:"mt-1 text-xs font-mono text-terminal-blue hover:text-terminal-text transition-colors",children:d?"Show less":`Show more (${r.length} chars)`})]})}),Qy=y.memo(function({content:r,isActive:o}){const[c,d]=y.useState(!1);return l.jsxs("div",{className:"ml-6",children:[l.jsxs("button",{onClick:()=>d(!c),className:"flex items-center gap-2 text-xs text-terminal-dim hover:text-terminal-text transition-colors duration-200 ease-material font-mono",children:[l.jsx("span",{className:`transition-transform ${c?"rotate-90":""}`,children:"▶"}),l.jsx("span",{className:o?"animate-pulse":"",children:"Thinking..."}),l.jsxs("span",{className:"text-terminal-purple",children:["(",r.length," chars)"]})]}),c&&l.jsx("div",{className:"mt-2 pl-5 text-xs text-terminal-dim font-mono whitespace-pre-wrap break-words border-l-2 border-terminal-purple/30 max-h-[300px] overflow-y-auto",children:r})]})}),Vy=y.memo(function({command:r,stdout:o,isActive:c}){const[d,f]=y.useState(!0),m=o.trim().length>0;return l.jsxs("div",{className:"bg-terminal-surface rounded-xl overflow-hidden shadow-layer-sm",children:[l.jsxs("button",{onClick:()=>m&&f(!d),className:"w-full flex items-center gap-2 px-3 py-2 hover:bg-terminal-surface-hover transition-colors duration-200 ease-material text-left",children:[l.jsx("span",{className:"text-xs font-mono font-bold text-terminal-orange",children:"$"}),l.jsx("span",{className:"text-xs font-mono text-terminal-text truncate flex-1",children:r}),m&&l.jsx("span",{className:`text-xs text-terminal-dim transition-transform ${d?"rotate-90":""}`,children:"▶"})]}),d&&m&&l.jsx("div",{className:"px-3 py-2 max-h-[300px] overflow-y-auto",children:l.jsx("pre",{className:"text-xs font-mono text-terminal-dim whitespace-pre-wrap break-words",children:o})})]})});function wn(){}wn.prototype={diff:function(r,o){var c,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f=d.callback;typeof d=="function"&&(f=d,d={});var m=this;function x(z){return z=m.postProcess(z,d),f?(setTimeout(function(){f(z)},0),!0):z}r=this.castInput(r,d),o=this.castInput(o,d),r=this.removeEmpty(this.tokenize(r,d)),o=this.removeEmpty(this.tokenize(o,d));var h=o.length,g=r.length,v=1,w=h+g;d.maxEditLength!=null&&(w=Math.min(w,d.maxEditLength));var T=(c=d.timeout)!==null&&c!==void 0?c:1/0,N=Date.now()+T,j=[{oldPos:-1,lastComponent:void 0}],S=this.extractCommon(j[0],o,r,0,d);if(j[0].oldPos+1>=g&&S+1>=h)return x(Op(m,j[0].lastComponent,o,r,m.useLongestToken));var C=-1/0,E=1/0;function k(){for(var z=Math.max(C,-v);z<=Math.min(E,v);z+=2){var U=void 0,J=j[z-1],Z=j[z+1];J&&(j[z-1]=void 0);var re=!1;if(Z){var ae=Z.oldPos-z;re=Z&&0<=ae&&ae<h}var P=J&&J.oldPos+1<g;if(!re&&!P){j[z]=void 0;continue}if(!P||re&&J.oldPos<Z.oldPos?U=m.addToPath(Z,!0,!1,0,d):U=m.addToPath(J,!1,!0,1,d),S=m.extractCommon(U,o,r,z,d),U.oldPos+1>=g&&S+1>=h)return x(Op(m,U.lastComponent,o,r,m.useLongestToken));j[z]=U,U.oldPos+1>=g&&(E=Math.min(E,z-1)),S+1>=h&&(C=Math.max(C,z+1))}v++}if(f)(function z(){setTimeout(function(){if(v>w||Date.now()>N)return f();k()||z()},0)})();else for(;v<=w&&Date.now()<=N;){var _=k();if(_)return _}},addToPath:function(r,o,c,d,f){var m=r.lastComponent;return m&&!f.oneChangePerToken&&m.added===o&&m.removed===c?{oldPos:r.oldPos+d,lastComponent:{count:m.count+1,added:o,removed:c,previousComponent:m.previousComponent}}:{oldPos:r.oldPos+d,lastComponent:{count:1,added:o,removed:c,previousComponent:m}}},extractCommon:function(r,o,c,d,f){for(var m=o.length,x=c.length,h=r.oldPos,g=h-d,v=0;g+1<m&&h+1<x&&this.equals(c[h+1],o[g+1],f);)g++,h++,v++,f.oneChangePerToken&&(r.lastComponent={count:1,previousComponent:r.lastComponent,added:!1,removed:!1});return v&&!f.oneChangePerToken&&(r.lastComponent={count:v,previousComponent:r.lastComponent,added:!1,removed:!1}),r.oldPos=h,g},equals:function(r,o,c){return c.comparator?c.comparator(r,o):r===o||c.ignoreCase&&r.toLowerCase()===o.toLowerCase()},removeEmpty:function(r){for(var o=[],c=0;c<r.length;c++)r[c]&&o.push(r[c]);return o},castInput:function(r){return r},tokenize:function(r){return Array.from(r)},join:function(r){return r.join("")},postProcess:function(r){return r}};function Op(s,r,o,c,d){for(var f=[],m;r;)f.push(r),m=r.previousComponent,delete r.previousComponent,r=m;f.reverse();for(var x=0,h=f.length,g=0,v=0;x<h;x++){var w=f[x];if(w.removed)w.value=s.join(c.slice(v,v+w.count)),v+=w.count;else{if(!w.added&&d){var T=o.slice(g,g+w.count);T=T.map(function(N,j){var S=c[v+j];return S.length>N.length?S:N}),w.value=s.join(T)}else w.value=s.join(o.slice(g,g+w.count));g+=w.count,w.added||(v+=w.count)}}return f}function Mp(s,r){var o;for(o=0;o<s.length&&o<r.length;o++)if(s[o]!=r[o])return s.slice(0,o);return s.slice(0,o)}function zp(s,r){var o;if(!s||!r||s[s.length-1]!=r[r.length-1])return"";for(o=0;o<s.length&&o<r.length;o++)if(s[s.length-(o+1)]!=r[r.length-(o+1)])return s.slice(-o);return s.slice(-o)}function Fc(s,r,o){if(s.slice(0,r.length)!=r)throw Error("string ".concat(JSON.stringify(s)," doesn't start with prefix ").concat(JSON.stringify(r),"; this is a bug"));return o+s.slice(r.length)}function Xc(s,r,o){if(!r)return s+o;if(s.slice(-r.length)!=r)throw Error("string ".concat(JSON.stringify(s)," doesn't end with suffix ").concat(JSON.stringify(r),"; this is a bug"));return s.slice(0,-r.length)+o}function Ss(s,r){return Fc(s,r,"")}function Fr(s,r){return Xc(s,r,"")}function Dp(s,r){return r.slice(0,Jy(s,r))}function Jy(s,r){var o=0;s.length>r.length&&(o=s.length-r.length);var c=r.length;s.length<r.length&&(c=s.length);var d=Array(c),f=0;d[0]=0;for(var m=1;m<c;m++){for(r[m]==r[f]?d[m]=d[f]:d[m]=f;f>0&&r[m]!=r[f];)f=d[f];r[m]==r[f]&&f++}f=0;for(var x=o;x<s.length;x++){for(;f>0&&s[x]!=r[f];)f=d[f];s[x]==r[f]&&f++}return f}var ai="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",Ky=new RegExp("[".concat(ai,"]+|\\s+|[^").concat(ai,"]"),"ug"),oi=new wn;oi.equals=function(s,r,o){return o.ignoreCase&&(s=s.toLowerCase(),r=r.toLowerCase()),s.trim()===r.trim()};oi.tokenize=function(s){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o;if(r.intlSegmenter){if(r.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');o=Array.from(r.intlSegmenter.segment(s),function(f){return f.segment})}else o=s.match(Ky)||[];var c=[],d=null;return o.forEach(function(f){/\s/.test(f)?d==null?c.push(f):c.push(c.pop()+f):/\s/.test(d)?c[c.length-1]==d?c.push(c.pop()+f):c.push(d+f):c.push(f),d=f}),c};oi.join=function(s){return s.map(function(r,o){return o==0?r:r.replace(/^\s+/,"")}).join("")};oi.postProcess=function(s,r){if(!s||r.oneChangePerToken)return s;var o=null,c=null,d=null;return s.forEach(function(f){f.added?c=f:f.removed?d=f:((c||d)&&Lp(o,d,c,f),o=f,c=null,d=null)}),(c||d)&&Lp(o,d,c,null),s};function Lp(s,r,o,c){if(r&&o){var d=r.value.match(/^\s*/)[0],f=r.value.match(/\s*$/)[0],m=o.value.match(/^\s*/)[0],x=o.value.match(/\s*$/)[0];if(s){var h=Mp(d,m);s.value=Xc(s.value,m,h),r.value=Ss(r.value,h),o.value=Ss(o.value,h)}if(c){var g=zp(f,x);c.value=Fc(c.value,x,g),r.value=Fr(r.value,g),o.value=Fr(o.value,g)}}else if(o)s&&(o.value=o.value.replace(/^\s*/,"")),c&&(c.value=c.value.replace(/^\s*/,""));else if(s&&c){var v=c.value.match(/^\s*/)[0],w=r.value.match(/^\s*/)[0],T=r.value.match(/\s*$/)[0],N=Mp(v,w);r.value=Ss(r.value,N);var j=zp(Ss(v,N),T);r.value=Fr(r.value,j),c.value=Fc(c.value,v,j),s.value=Xc(s.value,v,v.slice(0,v.length-j.length))}else if(c){var S=c.value.match(/^\s*/)[0],C=r.value.match(/\s*$/)[0],E=Dp(C,S);r.value=Fr(r.value,E)}else if(s){var k=s.value.match(/\s*$/)[0],_=r.value.match(/^\s*/)[0],z=Dp(k,_);r.value=Ss(r.value,z)}}var Iy=new wn;Iy.tokenize=function(s){var r=new RegExp("(\\r?\\n)|[".concat(ai,"]+|[^\\S\\n\\r]+|[^").concat(ai,"]"),"ug");return s.match(r)||[]};var ci=new wn;ci.tokenize=function(s,r){r.stripTrailingCr&&(s=s.replace(/\r\n/g,`
121
+ `));var o=[],c=s.split(/(\n|\r\n)/);c[c.length-1]||c.pop();for(var d=0;d<c.length;d++){var f=c[d];d%2&&!r.newlineIsToken?o[o.length-1]+=f:o.push(f)}return o};ci.equals=function(s,r,o){return o.ignoreWhitespace?((!o.newlineIsToken||!s.includes(`
122
122
  `))&&(s=s.trim()),(!o.newlineIsToken||!r.includes(`
123
123
  `))&&(r=r.trim())):o.ignoreNewlineAtEof&&!o.newlineIsToken&&(s.endsWith(`
124
124
  `)&&(s=s.slice(0,-1)),r.endsWith(`
125
- `)&&(r=r.slice(0,-1))),hn.prototype.equals.call(this,s,r,o)};function Fy(s,r,o){return si.diff(s,r,o)}var Vy=new hn;Vy.tokenize=function(s){return s.split(/(\S.+?[.!?])(?=\s+|$)/)};var Qy=new hn;Qy.tokenize=function(s){return s.split(/([{}:;,]|\s+)/)};function qc(s){"@babel/helpers - typeof";return qc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},qc(s)}var Ns=new hn;Ns.useLongestToken=!0;Ns.tokenize=si.tokenize;Ns.castInput=function(s,r){var o=r.undefinedReplacement,c=r.stringifyReplacer,d=c===void 0?function(f,m){return typeof m>"u"?o:m}:c;return typeof s=="string"?s:JSON.stringify(Yc(s,null,null,d),d," ")};Ns.equals=function(s,r,o){return hn.prototype.equals.call(Ns,s.replace(/,([\r\n])/g,"$1"),r.replace(/,([\r\n])/g,"$1"),o)};function Yc(s,r,o,c,d){r=r||[],o=o||[],c&&(s=c(d,s));var f;for(f=0;f<r.length;f+=1)if(r[f]===s)return o[f];var m;if(Object.prototype.toString.call(s)==="[object Array]"){for(r.push(s),m=new Array(s.length),o.push(m),f=0;f<s.length;f+=1)m[f]=Yc(s[f],r,o,c,d);return r.pop(),o.pop(),m}if(s&&s.toJSON&&(s=s.toJSON()),qc(s)==="object"&&s!==null){r.push(s),m={},o.push(m);var g=[],h;for(h in s)Object.prototype.hasOwnProperty.call(s,h)&&g.push(h);for(g.sort(),f=0;f<g.length;f+=1)h=g[f],m[h]=Yc(s[h],r,o,c,h);r.pop(),o.pop()}else m=s;return m}var Zc=new hn;Zc.tokenize=function(s){return s.slice()};Zc.join=Zc.removeEmpty=function(s){return s};function yh(s){var r,o,c="";if(typeof s=="string"||typeof s=="number")c+=s;else if(typeof s=="object")if(Array.isArray(s)){var d=s.length;for(r=0;r<d;r++)s[r]&&(o=yh(s[r]))&&(c&&(c+=" "),c+=o)}else for(o in s)s[o]&&(c&&(c+=" "),c+=o);return c}function vh(){for(var s,r,o=0,c="",d=arguments.length;o<d;o++)(s=arguments[o])&&(r=yh(s))&&(c&&(c+=" "),c+=r);return c}var Jy=Object.create,ri=Object.defineProperty,Ky=Object.defineProperties,Iy=Object.getOwnPropertyDescriptor,Wy=Object.getOwnPropertyDescriptors,jh=Object.getOwnPropertyNames,ei=Object.getOwnPropertySymbols,Py=Object.getPrototypeOf,su=Object.prototype.hasOwnProperty,wh=Object.prototype.propertyIsEnumerable,Mp=(s,r,o)=>r in s?ri(s,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):s[r]=o,pn=(s,r)=>{for(var o in r||(r={}))su.call(r,o)&&Mp(s,o,r[o]);if(ei)for(var o of ei(r))wh.call(r,o)&&Mp(s,o,r[o]);return s},ii=(s,r)=>Ky(s,Wy(r)),Sh=(s,r)=>{var o={};for(var c in s)su.call(s,c)&&r.indexOf(c)<0&&(o[c]=s[c]);if(s!=null&&ei)for(var c of ei(s))r.indexOf(c)<0&&wh.call(s,c)&&(o[c]=s[c]);return o},e0=(s,r)=>function(){return r||(0,s[jh(s)[0]])((r={exports:{}}).exports,r),r.exports},t0=(s,r)=>{for(var o in r)ri(s,o,{get:r[o],enumerable:!0})},n0=(s,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let d of jh(r))!su.call(s,d)&&d!==o&&ri(s,d,{get:()=>r[d],enumerable:!(c=Iy(r,d))||c.enumerable});return s},a0=(s,r,o)=>(o=s!=null?Jy(Py(s)):{},n0(!s||!s.__esModule?ri(o,"default",{value:s,enumerable:!0}):o,s)),l0=e0({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(s,r){var o=(function(){var c=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,d=0,f={},m={util:{encode:function w(S){return S instanceof g?new g(S.type,w(S.content),S.alias):Array.isArray(S)?S.map(w):S.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(w){return Object.prototype.toString.call(w).slice(8,-1)},objId:function(w){return w.__id||Object.defineProperty(w,"__id",{value:++d}),w.__id},clone:function w(S,R){R=R||{};var A,E;switch(m.util.type(S)){case"Object":if(E=m.util.objId(S),R[E])return R[E];A={},R[E]=A;for(var _ in S)S.hasOwnProperty(_)&&(A[_]=w(S[_],R));return A;case"Array":return E=m.util.objId(S),R[E]?R[E]:(A=[],R[E]=A,S.forEach(function(D,$){A[$]=w(D,R)}),A);default:return S}},getLanguage:function(w){for(;w;){var S=c.exec(w.className);if(S)return S[1].toLowerCase();w=w.parentElement}return"none"},setLanguage:function(w,S){w.className=w.className.replace(RegExp(c,"gi"),""),w.classList.add("language-"+S)},isActive:function(w,S,R){for(var A="no-"+S;w;){var E=w.classList;if(E.contains(S))return!0;if(E.contains(A))return!1;w=w.parentElement}return!!R}},languages:{plain:f,plaintext:f,text:f,txt:f,extend:function(w,S){var R=m.util.clone(m.languages[w]);for(var A in S)R[A]=S[A];return R},insertBefore:function(w,S,R,A){A=A||m.languages;var E=A[w],_={};for(var D in E)if(E.hasOwnProperty(D)){if(D==S)for(var $ in R)R.hasOwnProperty($)&&(_[$]=R[$]);R.hasOwnProperty(D)||(_[D]=E[D])}var ae=A[w];return A[w]=_,m.languages.DFS(m.languages,function(Y,se){se===ae&&Y!=w&&(this[Y]=_)}),_},DFS:function w(S,R,A,E){E=E||{};var _=m.util.objId;for(var D in S)if(S.hasOwnProperty(D)){R.call(S,D,S[D],A||D);var $=S[D],ae=m.util.type($);ae==="Object"&&!E[_($)]?(E[_($)]=!0,w($,R,null,E)):ae==="Array"&&!E[_($)]&&(E[_($)]=!0,w($,R,D,E))}}},plugins:{},highlight:function(w,S,R){var A={code:w,grammar:S,language:R};if(m.hooks.run("before-tokenize",A),!A.grammar)throw new Error('The language "'+A.language+'" has no grammar.');return A.tokens=m.tokenize(A.code,A.grammar),m.hooks.run("after-tokenize",A),g.stringify(m.util.encode(A.tokens),A.language)},tokenize:function(w,S){var R=S.rest;if(R){for(var A in R)S[A]=R[A];delete S.rest}var E=new b;return j(E,E.head,w),x(w,E,S,E.head,0),N(E)},hooks:{all:{},add:function(w,S){var R=m.hooks.all;R[w]=R[w]||[],R[w].push(S)},run:function(w,S){var R=m.hooks.all[w];if(!(!R||!R.length))for(var A=0,E;E=R[A++];)E(S)}},Token:g};function g(w,S,R,A){this.type=w,this.content=S,this.alias=R,this.length=(A||"").length|0}g.stringify=function w(S,R){if(typeof S=="string")return S;if(Array.isArray(S)){var A="";return S.forEach(function(ae){A+=w(ae,R)}),A}var E={type:S.type,content:w(S.content,R),tag:"span",classes:["token",S.type],attributes:{},language:R},_=S.alias;_&&(Array.isArray(_)?Array.prototype.push.apply(E.classes,_):E.classes.push(_)),m.hooks.run("wrap",E);var D="";for(var $ in E.attributes)D+=" "+$+'="'+(E.attributes[$]||"").replace(/"/g,"&quot;")+'"';return"<"+E.tag+' class="'+E.classes.join(" ")+'"'+D+">"+E.content+"</"+E.tag+">"};function h(w,S,R,A){w.lastIndex=S;var E=w.exec(R);if(E&&A&&E[1]){var _=E[1].length;E.index+=_,E[0]=E[0].slice(_)}return E}function x(w,S,R,A,E,_){for(var D in R)if(!(!R.hasOwnProperty(D)||!R[D])){var $=R[D];$=Array.isArray($)?$:[$];for(var ae=0;ae<$.length;++ae){if(_&&_.cause==D+","+ae)return;var Y=$[ae],se=Y.inside,te=!!Y.lookbehind,Q=!!Y.greedy,le=Y.alias;if(Q&&!Y.pattern.global){var oe=Y.pattern.toString().match(/[imsuy]*$/)[0];Y.pattern=RegExp(Y.pattern.source,oe+"g")}for(var ue=Y.pattern||Y,P=A.next,pe=E;P!==S.tail&&!(_&&pe>=_.reach);pe+=P.value.length,P=P.next){var z=P.value;if(S.length>w.length)return;if(!(z instanceof g)){var ne=1,ie;if(Q){if(ie=h(ue,pe,w,te),!ie||ie.index>=w.length)break;var O=ie.index,ee=ie.index+ie[0].length,re=pe;for(re+=P.value.length;O>=re;)P=P.next,re+=P.value.length;if(re-=P.value.length,pe=re,P.value instanceof g)continue;for(var k=P;k!==S.tail&&(re<ee||typeof k.value=="string");k=k.next)ne++,re+=k.value.length;ne--,z=w.slice(pe,re),ie.index-=pe}else if(ie=h(ue,0,z,te),!ie)continue;var O=ie.index,B=ie[0],W=z.slice(0,O),F=z.slice(O+B.length),fe=pe+z.length;_&&fe>_.reach&&(_.reach=fe);var xe=P.prev;W&&(xe=j(S,xe,W),pe+=W.length),T(S,xe,ne);var De=new g(D,se?m.tokenize(B,se):B,le,B);if(P=j(S,xe,De),F&&j(S,P,F),ne>1){var J={cause:D+","+ae,reach:fe};x(w,S,R,P.prev,pe,J),_&&J.reach>_.reach&&(_.reach=J.reach)}}}}}}function b(){var w={value:null,prev:null,next:null},S={value:null,prev:w,next:null};w.next=S,this.head=w,this.tail=S,this.length=0}function j(w,S,R){var A=S.next,E={value:R,prev:S,next:A};return S.next=E,A.prev=E,w.length++,E}function T(w,S,R){for(var A=S.next,E=0;E<R&&A!==w.tail;E++)A=A.next;S.next=A,A.prev=S,w.length-=E}function N(w){for(var S=[],R=w.head.next;R!==w.tail;)S.push(R.value),R=R.next;return S}return m})();r.exports=o,o.default=o}}),I=a0(l0());I.languages.markup={comment:{pattern:/\x3C!--(?:(?!\x3C!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|\x3C!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},I.languages.markup.tag.inside["attr-value"].inside.entity=I.languages.markup.entity,I.languages.markup.doctype.inside["internal-subset"].inside=I.languages.markup,I.hooks.add("wrap",function(s){s.type==="entity"&&(s.attributes.title=s.content.replace(/&amp;/,"&"))}),Object.defineProperty(I.languages.markup.tag,"addInlined",{value:function(s,c){var o={},o=(o["language-"+c]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:I.languages[c]},o.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}}),c=(o["language-"+c]={pattern:/[\s\S]+/,inside:I.languages[c]},{});c[s]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:o},I.languages.insertBefore("markup","cdata",c)}}),Object.defineProperty(I.languages.markup.tag,"addAttribute",{value:function(s,r){I.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+s+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:I.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),I.languages.html=I.languages.markup,I.languages.mathml=I.languages.markup,I.languages.svg=I.languages.markup,I.languages.xml=I.languages.extend("markup",{}),I.languages.ssml=I.languages.xml,I.languages.atom=I.languages.xml,I.languages.rss=I.languages.xml,(function(s){var r={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},o=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,c="(?:[^\\\\-]|"+o.source+")",c=RegExp(c+"-"+c),d={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};s.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:c,inside:{escape:o,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":r,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:o}},"special-escape":r,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":d}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:o,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":d}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(I),I.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},I.languages.javascript=I.languages.extend("clike",{"class-name":[I.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),I.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,I.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:I.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:I.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:I.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:I.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:I.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),I.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:I.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),I.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),I.languages.markup&&(I.languages.markup.tag.addInlined("script","javascript"),I.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),I.languages.js=I.languages.javascript,I.languages.actionscript=I.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),I.languages.actionscript["class-name"].alias="function",delete I.languages.actionscript.parameter,delete I.languages.actionscript["literal-property"],I.languages.markup&&I.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:I.languages.markup}}),(function(s){var r=/#(?!\{).+/,o={pattern:/#\{[^}]+\}/,alias:"variable"};s.languages.coffeescript=s.languages.extend("javascript",{comment:r,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:o}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),s.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:r,interpolation:o}}}),s.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:s.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:o}}]}),s.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete s.languages.coffeescript["template-string"],s.languages.coffee=s.languages.coffeescript})(I),(function(s){var r=s.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(r,"addSupport",{value:function(o,c){(o=typeof o=="string"?[o]:o).forEach(function(d){var f=function(j){j.inside||(j.inside={}),j.inside.rest=c},m="doc-comment";if(g=s.languages[d]){var g,h=g[m];if((h=h||(g=s.languages.insertBefore(d,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[m])instanceof RegExp&&(h=g[m]={pattern:h}),Array.isArray(h))for(var x=0,b=h.length;x<b;x++)h[x]instanceof RegExp&&(h[x]={pattern:h[x]}),f(h[x]);else f(h)}})}}),r.addSupport(["java","javascript","php"],r)})(I),(function(s){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,r=(s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+r.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css,s.languages.markup);r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(I),(function(s){var r=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,r=(s.languages.css.selector={pattern:s.languages.css.selector.pattern,lookbehind:!0,inside:r={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+r.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[r,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},s.languages.css.atrule.inside["selector-function-argument"].inside=r,s.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),o={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};s.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:o,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:o})})(I),(function(s){var r=/[*&][^\s[\]{},]+/,o=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,c="(?:"+o.source+"(?:[ ]+"+r.source+")?|"+r.source+"(?:[ ]+"+o.source+")?)",d=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),f=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function m(g,h){h=(h||"").replace(/m/g,"")+"m";var x=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return c}).replace(/<<value>>/g,function(){return g});return RegExp(x,h)}s.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return c})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return c}).replace(/<<key>>/g,function(){return"(?:"+d+"|"+f+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:m(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:m(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:m(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:m(f),lookbehind:!0,greedy:!0},number:{pattern:m(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:o,important:r,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},s.languages.yml=s.languages.yaml})(I),(function(s){var r=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function o(x){return x=x.replace(/<inner>/g,function(){return r}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+x+")")}var c=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,d=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return c}),f=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,m=(s.languages.markdown=s.languages.extend("markup",{}),s.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:s.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+d+f+"(?:"+d+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+d+f+")(?:"+d+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(c),inside:s.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+d+")"+f+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+d+"$"),inside:{"table-header":{pattern:RegExp(c),alias:"important",inside:s.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:o(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:o(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:o(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:o(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(x){["url","bold","italic","strike","code-snippet"].forEach(function(b){x!==b&&(s.languages.markdown[x].inside.content.inside[b]=s.languages.markdown[b])})}),s.hooks.add("after-tokenize",function(x){x.language!=="markdown"&&x.language!=="md"||(function b(j){if(j&&typeof j!="string")for(var T=0,N=j.length;T<N;T++){var w,S=j[T];S.type!=="code"?b(S.content):(w=S.content[1],S=S.content[3],w&&S&&w.type==="code-language"&&S.type==="code-block"&&typeof w.content=="string"&&(w=w.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),w="language-"+(w=(/[a-z][\w-]*/i.exec(w)||[""])[0].toLowerCase()),S.alias?typeof S.alias=="string"?S.alias=[S.alias,w]:S.alias.push(w):S.alias=[w]))}})(x.tokens)}),s.hooks.add("wrap",function(x){if(x.type==="code-block"){for(var b="",j=0,T=x.classes.length;j<T;j++){var N=x.classes[j],N=/language-(.+)/.exec(N);if(N){b=N[1];break}}var w,S=s.languages[b];S?x.content=s.highlight((function(R){return R=R.replace(m,""),R=R.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(A,E){var _;return(E=E.toLowerCase())[0]==="#"?(_=E[1]==="x"?parseInt(E.slice(2),16):Number(E.slice(1)),h(_)):g[E]||A})})(x.content),S,b):b&&b!=="none"&&s.plugins.autoloader&&(w="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),x.attributes.id=w,s.plugins.autoloader.loadLanguages(b,function(){var R=document.getElementById(w);R&&(R.innerHTML=s.highlight(R.textContent,s.languages[b],b))}))}}),RegExp(s.languages.markup.tag.pattern.source,"gi")),g={amp:"&",lt:"<",gt:">",quot:'"'},h=String.fromCodePoint||String.fromCharCode;s.languages.md=s.languages.markdown})(I),I.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:I.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},I.hooks.add("after-tokenize",function(s){if(s.language==="graphql")for(var r=s.tokens.filter(function(w){return typeof w!="string"&&w.type!=="comment"&&w.type!=="scalar"}),o=0;o<r.length;){var c=r[o++];if(c.type==="keyword"&&c.content==="mutation"){var d=[];if(j(["definition-mutation","punctuation"])&&b(1).content==="("){o+=2;var f=T(/^\($/,/^\)$/);if(f===-1)continue;for(;o<f;o++){var m=b(0);m.type==="variable"&&(N(m,"variable-input"),d.push(m.content))}o=f+1}if(j(["punctuation","property-query"])&&b(0).content==="{"&&(o++,N(b(0),"property-mutation"),0<d.length)){var g=T(/^\{$/,/^\}$/);if(g!==-1)for(var h=o;h<g;h++){var x=r[h];x.type==="variable"&&0<=d.indexOf(x.content)&&N(x,"variable-input")}}}}function b(w){return r[o+w]}function j(w,S){S=S||0;for(var R=0;R<w.length;R++){var A=b(R+S);if(!A||A.type!==w[R])return}return 1}function T(w,S){for(var R=1,A=o;A<r.length;A++){var E=r[A],_=E.content;if(E.type==="punctuation"&&typeof _=="string"){if(w.test(_))R++;else if(S.test(_)&&--R===0)return A}}return-1}function N(w,S){var R=w.alias;R?Array.isArray(R)||(w.alias=R=[R]):w.alias=R=[],R.push(S)}}),I.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},(function(s){var r=s.languages.javascript["template-string"],o=r.pattern.source,c=r.inside.interpolation,d=c.inside["interpolation-punctuation"],f=c.pattern.source;function m(j,T){if(s.languages[j])return{pattern:RegExp("((?:"+T+")\\s*)"+o),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:j}}}}function g(j,T,N){return j={code:j,grammar:T,language:N},s.hooks.run("before-tokenize",j),j.tokens=s.tokenize(j.code,j.grammar),s.hooks.run("after-tokenize",j),j.tokens}function h(j,T,N){var R=s.tokenize(j,{interpolation:{pattern:RegExp(f),lookbehind:!0}}),w=0,S={},R=g(R.map(function(E){if(typeof E=="string")return E;for(var _,D,E=E.content;j.indexOf((D=w++,_="___"+N.toUpperCase()+"_"+D+"___"))!==-1;);return S[_]=E,_}).join(""),T,N),A=Object.keys(S);return w=0,(function E(_){for(var D=0;D<_.length;D++){if(w>=A.length)return;var $,ae,Y,se,te,Q,le,oe=_[D];typeof oe=="string"||typeof oe.content=="string"?($=A[w],(le=(Q=typeof oe=="string"?oe:oe.content).indexOf($))!==-1&&(++w,ae=Q.substring(0,le),te=S[$],Y=void 0,(se={})["interpolation-punctuation"]=d,(se=s.tokenize(te,se)).length===3&&((Y=[1,1]).push.apply(Y,g(se[1],s.languages.javascript,"javascript")),se.splice.apply(se,Y)),Y=new s.Token("interpolation",se,c.alias,te),se=Q.substring(le+$.length),te=[],ae&&te.push(ae),te.push(Y),se&&(E(Q=[se]),te.push.apply(te,Q)),typeof oe=="string"?(_.splice.apply(_,[D,1].concat(te)),D+=te.length-1):oe.content=te)):(le=oe.content,Array.isArray(le)?E(le):E([le]))}})(R),new s.Token(N,R,"language-"+N,j)}s.languages.javascript["template-string"]=[m("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),m("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),m("svg",/\bsvg/.source),m("markdown",/\b(?:markdown|md)/.source),m("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),m("sql",/\bsql/.source),r].filter(Boolean);var x={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function b(j){return typeof j=="string"?j:Array.isArray(j)?j.map(b).join(""):b(j.content)}s.hooks.add("after-tokenize",function(j){j.language in x&&(function T(N){for(var w=0,S=N.length;w<S;w++){var R,A,E,_=N[w];typeof _!="string"&&(R=_.content,Array.isArray(R)?_.type==="template-string"?(_=R[1],R.length===3&&typeof _!="string"&&_.type==="embedded-code"&&(A=b(_),_=_.alias,_=Array.isArray(_)?_[0]:_,E=s.languages[_])&&(R[1]=h(A,E,_))):T(R):typeof R!="string"&&T([R]))}})(j.tokens)})})(I),(function(s){s.languages.typescript=s.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),s.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete s.languages.typescript.parameter,delete s.languages.typescript["literal-property"];var r=s.languages.extend("typescript",{});delete r["class-name"],s.languages.typescript["class-name"].inside=r,s.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:r}}}}),s.languages.ts=s.languages.typescript})(I),(function(s){var r=s.languages.javascript,o=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,c="(@(?:arg|argument|param|property)\\s+(?:"+o+"\\s+)?)";s.languages.jsdoc=s.languages.extend("javadoclike",{parameter:{pattern:RegExp(c+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),s.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(c+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:r,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return o})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+o),lookbehind:!0,inside:{string:r.string,number:r.number,boolean:r.boolean,keyword:s.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:r,alias:"language-javascript"}}}}),s.languages.javadoclike.addSupport("javascript",s.languages.jsdoc)})(I),(function(s){s.languages.flow=s.languages.extend("javascript",{}),s.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),s.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete s.languages.flow.parameter,s.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(s.languages.flow.keyword)||(s.languages.flow.keyword=[s.languages.flow.keyword]),s.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})})(I),I.languages.n4js=I.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),I.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),I.languages.n4jsd=I.languages.n4js,(function(s){function r(m,g){return RegExp(m.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),g)}s.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+s.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),s.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+s.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),s.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),s.languages.insertBefore("javascript","keyword",{imports:{pattern:r(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:s.languages.javascript},exports:{pattern:r(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:s.languages.javascript}}),s.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),s.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),s.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:r(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var o=["function","function-variable","method","method-variable","property-access"],c=0;c<o.length;c++){var f=o[c],d=s.languages.javascript[f],f=(d=s.util.type(d)==="RegExp"?s.languages.javascript[f]={pattern:d}:d).inside||{};(d.inside=f)["maybe-class-name"]=/^[A-Z][\s\S]*/}})(I),(function(s){var r=s.util.clone(s.languages.javascript),o=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,c=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,d=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function f(h,x){return h=h.replace(/<S>/g,function(){return o}).replace(/<BRACES>/g,function(){return c}).replace(/<SPREAD>/g,function(){return d}),RegExp(h,x)}d=f(d).source,s.languages.jsx=s.languages.extend("markup",r),s.languages.jsx.tag.pattern=f(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),s.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,s.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,s.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,s.languages.jsx.tag.inside.comment=r.comment,s.languages.insertBefore("inside","attr-name",{spread:{pattern:f(/<SPREAD>/.source),inside:s.languages.jsx}},s.languages.jsx.tag),s.languages.insertBefore("inside","special-attr",{script:{pattern:f(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:s.languages.jsx}}},s.languages.jsx.tag);function m(h){for(var x=[],b=0;b<h.length;b++){var j=h[b],T=!1;typeof j!="string"&&(j.type==="tag"&&j.content[0]&&j.content[0].type==="tag"?j.content[0].content[0].content==="</"?0<x.length&&x[x.length-1].tagName===g(j.content[0].content[1])&&x.pop():j.content[j.content.length-1].content!=="/>"&&x.push({tagName:g(j.content[0].content[1]),openedBraces:0}):0<x.length&&j.type==="punctuation"&&j.content==="{"?x[x.length-1].openedBraces++:0<x.length&&0<x[x.length-1].openedBraces&&j.type==="punctuation"&&j.content==="}"?x[x.length-1].openedBraces--:T=!0),(T||typeof j=="string")&&0<x.length&&x[x.length-1].openedBraces===0&&(T=g(j),b<h.length-1&&(typeof h[b+1]=="string"||h[b+1].type==="plain-text")&&(T+=g(h[b+1]),h.splice(b+1,1)),0<b&&(typeof h[b-1]=="string"||h[b-1].type==="plain-text")&&(T=g(h[b-1])+T,h.splice(b-1,1),b--),h[b]=new s.Token("plain-text",T,null,T)),j.content&&typeof j.content!="string"&&m(j.content)}}var g=function(h){return h?typeof h=="string"?h:typeof h.content=="string"?h.content:h.content.map(g).join(""):""};s.hooks.add("after-tokenize",function(h){h.language!=="jsx"&&h.language!=="tsx"||m(h.tokens)})})(I),(function(s){var r=s.util.clone(s.languages.typescript),r=(s.languages.tsx=s.languages.extend("jsx",r),delete s.languages.tsx.parameter,delete s.languages.tsx["literal-property"],s.languages.tsx.tag);r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(I),I.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},I.languages.swift["string-literal"].forEach(function(s){s.inside.interpolation.inside=I.languages.swift}),(function(s){s.languages.kotlin=s.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete s.languages.kotlin["class-name"];var r={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:s.languages.kotlin}};s.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:r},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:r},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete s.languages.kotlin.string,s.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),s.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),s.languages.kt=s.languages.kotlin,s.languages.kts=s.languages.kotlin})(I),I.languages.c=I.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),I.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),I.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},I.languages.c.string],char:I.languages.c.char,comment:I.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:I.languages.c}}}}),I.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete I.languages.c.boolean,I.languages.objectivec=I.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete I.languages.objectivec["class-name"],I.languages.objc=I.languages.objectivec,I.languages.reason=I.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),I.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete I.languages.reason.function,(function(s){for(var r=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,o=0;o<2;o++)r=r.replace(/<self>/g,function(){return r});r=r.replace(/<self>/g,function(){return/[^\s\S]/.source}),s.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+r),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},s.languages.rust["closure-params"].inside.rest=s.languages.rust,s.languages.rust.attribute.inside.string=s.languages.rust.string})(I),I.languages.go=I.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),I.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete I.languages.go["class-name"],(function(s){var r=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,o=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return r.source});s.languages.cpp=s.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return r.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:r,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),s.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return o})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),s.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s.languages.cpp}}}}),s.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),s.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:s.languages.extend("cpp",{})}}),s.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},s.languages.cpp["base-clause"])})(I),I.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},I.languages.python["string-interpolation"].inside.interpolation.inside.rest=I.languages.python,I.languages.py=I.languages.python,I.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},I.languages.webmanifest=I.languages.json;var Xc={};t0(Xc,{dracula:()=>r0,duotoneDark:()=>o0,duotoneLight:()=>u0,github:()=>f0,gruvboxMaterialDark:()=>G0,gruvboxMaterialLight:()=>Y0,jettwaveDark:()=>M0,jettwaveLight:()=>D0,nightOwl:()=>p0,nightOwlLight:()=>x0,oceanicNext:()=>b0,okaidia:()=>v0,oneDark:()=>B0,oneLight:()=>H0,palenight:()=>w0,shadesOfPurple:()=>N0,synthwave84:()=>E0,ultramin:()=>A0,vsDark:()=>Nh,vsLight:()=>_0});var s0={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},r0=s0,i0={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},o0=i0,c0={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},u0=c0,d0={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},f0=d0,m0={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},p0=m0,h0={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},x0=h0,Zt={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},g0={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:Zt.keyword}},{types:["attr-value"],style:{color:Zt.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:Zt.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:Zt.primitive}},{types:["boolean"],style:{color:Zt.boolean}},{types:["tag"],style:{color:Zt.tag}},{types:["string"],style:{color:Zt.string}},{types:["punctuation"],style:{color:Zt.string}},{types:["selector","char","builtin","inserted"],style:{color:Zt.char}},{types:["function"],style:{color:Zt.function}},{types:["operator","entity","url","variable"],style:{color:Zt.variable}},{types:["keyword"],style:{color:Zt.keyword}},{types:["atrule","class-name"],style:{color:Zt.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},b0=g0,y0={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},v0=y0,j0={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},w0=j0,S0={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},N0=S0,k0={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},E0=k0,T0={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},A0=T0,C0={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},Nh=C0,R0={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},_0=R0,O0={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},M0=O0,z0={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},D0=z0,L0={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},B0=L0,U0={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},H0=U0,$0={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},G0=$0,q0={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},Y0=q0,Z0=s=>v.useCallback(r=>{var o=r,{className:c,style:d,line:f}=o,m=Sh(o,["className","style","line"]);const g=ii(pn({},m),{className:vh("token-line",c)});return typeof s=="object"&&"plain"in s&&(g.style=s.plain),typeof d=="object"&&(g.style=pn(pn({},g.style||{}),d)),g},[s]),X0=s=>{const r=v.useCallback(({types:o,empty:c})=>{if(s!=null){{if(o.length===1&&o[0]==="plain")return c!=null?{display:"inline-block"}:void 0;if(o.length===1&&c!=null)return s[o[0]]}return Object.assign(c!=null?{display:"inline-block"}:{},...o.map(d=>s[d]))}},[s]);return v.useCallback(o=>{var c=o,{token:d,className:f,style:m}=c,g=Sh(c,["token","className","style"]);const h=ii(pn({},g),{className:vh("token",...d.types,f),children:d.content,style:r(d)});return m!=null&&(h.style=pn(pn({},h.style||{}),m)),h},[r])},F0=/\r\n|\r|\n/,zp=s=>{s.length===0?s.push({types:["plain"],content:`
125
+ `)&&(r=r.slice(0,-1))),wn.prototype.equals.call(this,s,r,o)};function Wy(s,r,o){return ci.diff(s,r,o)}var Py=new wn;Py.tokenize=function(s){return s.split(/(\S.+?[.!?])(?=\s+|$)/)};var e0=new wn;e0.tokenize=function(s){return s.split(/([{}:;,]|\s+)/)};function Qc(s){"@babel/helpers - typeof";return Qc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Qc(s)}var Ts=new wn;Ts.useLongestToken=!0;Ts.tokenize=ci.tokenize;Ts.castInput=function(s,r){var o=r.undefinedReplacement,c=r.stringifyReplacer,d=c===void 0?function(f,m){return typeof m>"u"?o:m}:c;return typeof s=="string"?s:JSON.stringify(Vc(s,null,null,d),d," ")};Ts.equals=function(s,r,o){return wn.prototype.equals.call(Ts,s.replace(/,([\r\n])/g,"$1"),r.replace(/,([\r\n])/g,"$1"),o)};function Vc(s,r,o,c,d){r=r||[],o=o||[],c&&(s=c(d,s));var f;for(f=0;f<r.length;f+=1)if(r[f]===s)return o[f];var m;if(Object.prototype.toString.call(s)==="[object Array]"){for(r.push(s),m=new Array(s.length),o.push(m),f=0;f<s.length;f+=1)m[f]=Vc(s[f],r,o,c,d);return r.pop(),o.pop(),m}if(s&&s.toJSON&&(s=s.toJSON()),Qc(s)==="object"&&s!==null){r.push(s),m={},o.push(m);var x=[],h;for(h in s)Object.prototype.hasOwnProperty.call(s,h)&&x.push(h);for(x.sort(),f=0;f<x.length;f+=1)h=x[f],m[h]=Vc(s[h],r,o,c,h);r.pop(),o.pop()}else m=s;return m}var Jc=new wn;Jc.tokenize=function(s){return s.slice()};Jc.join=Jc.removeEmpty=function(s){return s};function Nh(s){var r,o,c="";if(typeof s=="string"||typeof s=="number")c+=s;else if(typeof s=="object")if(Array.isArray(s)){var d=s.length;for(r=0;r<d;r++)s[r]&&(o=Nh(s[r]))&&(c&&(c+=" "),c+=o)}else for(o in s)s[o]&&(c&&(c+=" "),c+=o);return c}function kh(){for(var s,r,o=0,c="",d=arguments.length;o<d;o++)(s=arguments[o])&&(r=Nh(s))&&(c&&(c+=" "),c+=r);return c}var t0=Object.create,ui=Object.defineProperty,n0=Object.defineProperties,a0=Object.getOwnPropertyDescriptor,l0=Object.getOwnPropertyDescriptors,Eh=Object.getOwnPropertyNames,li=Object.getOwnPropertySymbols,s0=Object.getPrototypeOf,uu=Object.prototype.hasOwnProperty,Th=Object.prototype.propertyIsEnumerable,Bp=(s,r,o)=>r in s?ui(s,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):s[r]=o,jn=(s,r)=>{for(var o in r||(r={}))uu.call(r,o)&&Bp(s,o,r[o]);if(li)for(var o of li(r))Th.call(r,o)&&Bp(s,o,r[o]);return s},di=(s,r)=>n0(s,l0(r)),Ah=(s,r)=>{var o={};for(var c in s)uu.call(s,c)&&r.indexOf(c)<0&&(o[c]=s[c]);if(s!=null&&li)for(var c of li(s))r.indexOf(c)<0&&Th.call(s,c)&&(o[c]=s[c]);return o},r0=(s,r)=>function(){return r||(0,s[Eh(s)[0]])((r={exports:{}}).exports,r),r.exports},i0=(s,r)=>{for(var o in r)ui(s,o,{get:r[o],enumerable:!0})},o0=(s,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let d of Eh(r))!uu.call(s,d)&&d!==o&&ui(s,d,{get:()=>r[d],enumerable:!(c=a0(r,d))||c.enumerable});return s},c0=(s,r,o)=>(o=s!=null?t0(s0(s)):{},o0(!s||!s.__esModule?ui(o,"default",{value:s,enumerable:!0}):o,s)),u0=r0({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(s,r){var o=(function(){var c=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,d=0,f={},m={util:{encode:function j(S){return S instanceof x?new x(S.type,j(S.content),S.alias):Array.isArray(S)?S.map(j):S.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(j){return Object.prototype.toString.call(j).slice(8,-1)},objId:function(j){return j.__id||Object.defineProperty(j,"__id",{value:++d}),j.__id},clone:function j(S,C){C=C||{};var E,k;switch(m.util.type(S)){case"Object":if(k=m.util.objId(S),C[k])return C[k];E={},C[k]=E;for(var _ in S)S.hasOwnProperty(_)&&(E[_]=j(S[_],C));return E;case"Array":return k=m.util.objId(S),C[k]?C[k]:(E=[],C[k]=E,S.forEach(function(z,U){E[U]=j(z,C)}),E);default:return S}},getLanguage:function(j){for(;j;){var S=c.exec(j.className);if(S)return S[1].toLowerCase();j=j.parentElement}return"none"},setLanguage:function(j,S){j.className=j.className.replace(RegExp(c,"gi"),""),j.classList.add("language-"+S)},isActive:function(j,S,C){for(var E="no-"+S;j;){var k=j.classList;if(k.contains(S))return!0;if(k.contains(E))return!1;j=j.parentElement}return!!C}},languages:{plain:f,plaintext:f,text:f,txt:f,extend:function(j,S){var C=m.util.clone(m.languages[j]);for(var E in S)C[E]=S[E];return C},insertBefore:function(j,S,C,E){E=E||m.languages;var k=E[j],_={};for(var z in k)if(k.hasOwnProperty(z)){if(z==S)for(var U in C)C.hasOwnProperty(U)&&(_[U]=C[U]);C.hasOwnProperty(z)||(_[z]=k[z])}var J=E[j];return E[j]=_,m.languages.DFS(m.languages,function(Z,re){re===J&&Z!=j&&(this[Z]=_)}),_},DFS:function j(S,C,E,k){k=k||{};var _=m.util.objId;for(var z in S)if(S.hasOwnProperty(z)){C.call(S,z,S[z],E||z);var U=S[z],J=m.util.type(U);J==="Object"&&!k[_(U)]?(k[_(U)]=!0,j(U,C,null,k)):J==="Array"&&!k[_(U)]&&(k[_(U)]=!0,j(U,C,z,k))}}},plugins:{},highlight:function(j,S,C){var E={code:j,grammar:S,language:C};if(m.hooks.run("before-tokenize",E),!E.grammar)throw new Error('The language "'+E.language+'" has no grammar.');return E.tokens=m.tokenize(E.code,E.grammar),m.hooks.run("after-tokenize",E),x.stringify(m.util.encode(E.tokens),E.language)},tokenize:function(j,S){var C=S.rest;if(C){for(var E in C)S[E]=C[E];delete S.rest}var k=new v;return w(k,k.head,j),g(j,k,S,k.head,0),N(k)},hooks:{all:{},add:function(j,S){var C=m.hooks.all;C[j]=C[j]||[],C[j].push(S)},run:function(j,S){var C=m.hooks.all[j];if(!(!C||!C.length))for(var E=0,k;k=C[E++];)k(S)}},Token:x};function x(j,S,C,E){this.type=j,this.content=S,this.alias=C,this.length=(E||"").length|0}x.stringify=function j(S,C){if(typeof S=="string")return S;if(Array.isArray(S)){var E="";return S.forEach(function(J){E+=j(J,C)}),E}var k={type:S.type,content:j(S.content,C),tag:"span",classes:["token",S.type],attributes:{},language:C},_=S.alias;_&&(Array.isArray(_)?Array.prototype.push.apply(k.classes,_):k.classes.push(_)),m.hooks.run("wrap",k);var z="";for(var U in k.attributes)z+=" "+U+'="'+(k.attributes[U]||"").replace(/"/g,"&quot;")+'"';return"<"+k.tag+' class="'+k.classes.join(" ")+'"'+z+">"+k.content+"</"+k.tag+">"};function h(j,S,C,E){j.lastIndex=S;var k=j.exec(C);if(k&&E&&k[1]){var _=k[1].length;k.index+=_,k[0]=k[0].slice(_)}return k}function g(j,S,C,E,k,_){for(var z in C)if(!(!C.hasOwnProperty(z)||!C[z])){var U=C[z];U=Array.isArray(U)?U:[U];for(var J=0;J<U.length;++J){if(_&&_.cause==z+","+J)return;var Z=U[J],re=Z.inside,ae=!!Z.lookbehind,P=!!Z.greedy,V=Z.alias;if(P&&!Z.pattern.global){var oe=Z.pattern.toString().match(/[imsuy]*$/)[0];Z.pattern=RegExp(Z.pattern.source,oe+"g")}for(var ce=Z.pattern||Z,ne=E.next,pe=k;ne!==S.tail&&!(_&&pe>=_.reach);pe+=ne.value.length,ne=ne.next){var B=ne.value;if(S.length>j.length)return;if(!(B instanceof x)){var W=1,ie;if(P){if(ie=h(ce,pe,j,ae),!ie||ie.index>=j.length)break;var O=ie.index,le=ie.index+ie[0].length,se=pe;for(se+=ne.value.length;O>=se;)ne=ne.next,se+=ne.value.length;if(se-=ne.value.length,pe=se,ne.value instanceof x)continue;for(var A=ne;A!==S.tail&&(se<le||typeof A.value=="string");A=A.next)W++,se+=A.value.length;W--,B=j.slice(pe,se),ie.index-=pe}else if(ie=h(ce,0,B,ae),!ie)continue;var O=ie.index,D=ie[0],ee=B.slice(0,O),X=B.slice(O+D.length),de=pe+B.length;_&&de>_.reach&&(_.reach=de);var xe=ne.prev;ee&&(xe=w(S,xe,ee),pe+=ee.length),T(S,xe,W);var Oe=new x(z,re?m.tokenize(D,re):D,V,D);if(ne=w(S,xe,Oe),X&&w(S,ne,X),W>1){var Te={cause:z+","+J,reach:de};g(j,S,C,ne.prev,pe,Te),_&&Te.reach>_.reach&&(_.reach=Te.reach)}}}}}}function v(){var j={value:null,prev:null,next:null},S={value:null,prev:j,next:null};j.next=S,this.head=j,this.tail=S,this.length=0}function w(j,S,C){var E=S.next,k={value:C,prev:S,next:E};return S.next=k,E.prev=k,j.length++,k}function T(j,S,C){for(var E=S.next,k=0;k<C&&E!==j.tail;k++)E=E.next;S.next=E,E.prev=S,j.length-=k}function N(j){for(var S=[],C=j.head.next;C!==j.tail;)S.push(C.value),C=C.next;return S}return m})();r.exports=o,o.default=o}}),I=c0(u0());I.languages.markup={comment:{pattern:/\x3C!--(?:(?!\x3C!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|\x3C!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},I.languages.markup.tag.inside["attr-value"].inside.entity=I.languages.markup.entity,I.languages.markup.doctype.inside["internal-subset"].inside=I.languages.markup,I.hooks.add("wrap",function(s){s.type==="entity"&&(s.attributes.title=s.content.replace(/&amp;/,"&"))}),Object.defineProperty(I.languages.markup.tag,"addInlined",{value:function(s,c){var o={},o=(o["language-"+c]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:I.languages[c]},o.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}}),c=(o["language-"+c]={pattern:/[\s\S]+/,inside:I.languages[c]},{});c[s]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:o},I.languages.insertBefore("markup","cdata",c)}}),Object.defineProperty(I.languages.markup.tag,"addAttribute",{value:function(s,r){I.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+s+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:I.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),I.languages.html=I.languages.markup,I.languages.mathml=I.languages.markup,I.languages.svg=I.languages.markup,I.languages.xml=I.languages.extend("markup",{}),I.languages.ssml=I.languages.xml,I.languages.atom=I.languages.xml,I.languages.rss=I.languages.xml,(function(s){var r={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},o=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,c="(?:[^\\\\-]|"+o.source+")",c=RegExp(c+"-"+c),d={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};s.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:c,inside:{escape:o,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":r,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:o}},"special-escape":r,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":d}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:o,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":d}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(I),I.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},I.languages.javascript=I.languages.extend("clike",{"class-name":[I.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),I.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,I.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:I.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:I.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:I.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:I.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:I.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),I.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:I.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),I.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),I.languages.markup&&(I.languages.markup.tag.addInlined("script","javascript"),I.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),I.languages.js=I.languages.javascript,I.languages.actionscript=I.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),I.languages.actionscript["class-name"].alias="function",delete I.languages.actionscript.parameter,delete I.languages.actionscript["literal-property"],I.languages.markup&&I.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:I.languages.markup}}),(function(s){var r=/#(?!\{).+/,o={pattern:/#\{[^}]+\}/,alias:"variable"};s.languages.coffeescript=s.languages.extend("javascript",{comment:r,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:o}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),s.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:r,interpolation:o}}}),s.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:s.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:o}}]}),s.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete s.languages.coffeescript["template-string"],s.languages.coffee=s.languages.coffeescript})(I),(function(s){var r=s.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(r,"addSupport",{value:function(o,c){(o=typeof o=="string"?[o]:o).forEach(function(d){var f=function(w){w.inside||(w.inside={}),w.inside.rest=c},m="doc-comment";if(x=s.languages[d]){var x,h=x[m];if((h=h||(x=s.languages.insertBefore(d,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[m])instanceof RegExp&&(h=x[m]={pattern:h}),Array.isArray(h))for(var g=0,v=h.length;g<v;g++)h[g]instanceof RegExp&&(h[g]={pattern:h[g]}),f(h[g]);else f(h)}})}}),r.addSupport(["java","javascript","php"],r)})(I),(function(s){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,r=(s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+r.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css,s.languages.markup);r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(I),(function(s){var r=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,r=(s.languages.css.selector={pattern:s.languages.css.selector.pattern,lookbehind:!0,inside:r={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+r.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[r,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},s.languages.css.atrule.inside["selector-function-argument"].inside=r,s.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),o={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};s.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:o,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:o})})(I),(function(s){var r=/[*&][^\s[\]{},]+/,o=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,c="(?:"+o.source+"(?:[ ]+"+r.source+")?|"+r.source+"(?:[ ]+"+o.source+")?)",d=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),f=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function m(x,h){h=(h||"").replace(/m/g,"")+"m";var g=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return c}).replace(/<<value>>/g,function(){return x});return RegExp(g,h)}s.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return c})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return c}).replace(/<<key>>/g,function(){return"(?:"+d+"|"+f+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:m(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:m(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:m(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:m(f),lookbehind:!0,greedy:!0},number:{pattern:m(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:o,important:r,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},s.languages.yml=s.languages.yaml})(I),(function(s){var r=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function o(g){return g=g.replace(/<inner>/g,function(){return r}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+g+")")}var c=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,d=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return c}),f=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,m=(s.languages.markdown=s.languages.extend("markup",{}),s.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:s.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+d+f+"(?:"+d+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+d+f+")(?:"+d+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(c),inside:s.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+d+")"+f+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+d+"$"),inside:{"table-header":{pattern:RegExp(c),alias:"important",inside:s.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:o(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:o(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:o(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:o(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(g){["url","bold","italic","strike","code-snippet"].forEach(function(v){g!==v&&(s.languages.markdown[g].inside.content.inside[v]=s.languages.markdown[v])})}),s.hooks.add("after-tokenize",function(g){g.language!=="markdown"&&g.language!=="md"||(function v(w){if(w&&typeof w!="string")for(var T=0,N=w.length;T<N;T++){var j,S=w[T];S.type!=="code"?v(S.content):(j=S.content[1],S=S.content[3],j&&S&&j.type==="code-language"&&S.type==="code-block"&&typeof j.content=="string"&&(j=j.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),j="language-"+(j=(/[a-z][\w-]*/i.exec(j)||[""])[0].toLowerCase()),S.alias?typeof S.alias=="string"?S.alias=[S.alias,j]:S.alias.push(j):S.alias=[j]))}})(g.tokens)}),s.hooks.add("wrap",function(g){if(g.type==="code-block"){for(var v="",w=0,T=g.classes.length;w<T;w++){var N=g.classes[w],N=/language-(.+)/.exec(N);if(N){v=N[1];break}}var j,S=s.languages[v];S?g.content=s.highlight((function(C){return C=C.replace(m,""),C=C.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(E,k){var _;return(k=k.toLowerCase())[0]==="#"?(_=k[1]==="x"?parseInt(k.slice(2),16):Number(k.slice(1)),h(_)):x[k]||E})})(g.content),S,v):v&&v!=="none"&&s.plugins.autoloader&&(j="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),g.attributes.id=j,s.plugins.autoloader.loadLanguages(v,function(){var C=document.getElementById(j);C&&(C.innerHTML=s.highlight(C.textContent,s.languages[v],v))}))}}),RegExp(s.languages.markup.tag.pattern.source,"gi")),x={amp:"&",lt:"<",gt:">",quot:'"'},h=String.fromCodePoint||String.fromCharCode;s.languages.md=s.languages.markdown})(I),I.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:I.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},I.hooks.add("after-tokenize",function(s){if(s.language==="graphql")for(var r=s.tokens.filter(function(j){return typeof j!="string"&&j.type!=="comment"&&j.type!=="scalar"}),o=0;o<r.length;){var c=r[o++];if(c.type==="keyword"&&c.content==="mutation"){var d=[];if(w(["definition-mutation","punctuation"])&&v(1).content==="("){o+=2;var f=T(/^\($/,/^\)$/);if(f===-1)continue;for(;o<f;o++){var m=v(0);m.type==="variable"&&(N(m,"variable-input"),d.push(m.content))}o=f+1}if(w(["punctuation","property-query"])&&v(0).content==="{"&&(o++,N(v(0),"property-mutation"),0<d.length)){var x=T(/^\{$/,/^\}$/);if(x!==-1)for(var h=o;h<x;h++){var g=r[h];g.type==="variable"&&0<=d.indexOf(g.content)&&N(g,"variable-input")}}}}function v(j){return r[o+j]}function w(j,S){S=S||0;for(var C=0;C<j.length;C++){var E=v(C+S);if(!E||E.type!==j[C])return}return 1}function T(j,S){for(var C=1,E=o;E<r.length;E++){var k=r[E],_=k.content;if(k.type==="punctuation"&&typeof _=="string"){if(j.test(_))C++;else if(S.test(_)&&--C===0)return E}}return-1}function N(j,S){var C=j.alias;C?Array.isArray(C)||(j.alias=C=[C]):j.alias=C=[],C.push(S)}}),I.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},(function(s){var r=s.languages.javascript["template-string"],o=r.pattern.source,c=r.inside.interpolation,d=c.inside["interpolation-punctuation"],f=c.pattern.source;function m(w,T){if(s.languages[w])return{pattern:RegExp("((?:"+T+")\\s*)"+o),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:w}}}}function x(w,T,N){return w={code:w,grammar:T,language:N},s.hooks.run("before-tokenize",w),w.tokens=s.tokenize(w.code,w.grammar),s.hooks.run("after-tokenize",w),w.tokens}function h(w,T,N){var C=s.tokenize(w,{interpolation:{pattern:RegExp(f),lookbehind:!0}}),j=0,S={},C=x(C.map(function(k){if(typeof k=="string")return k;for(var _,z,k=k.content;w.indexOf((z=j++,_="___"+N.toUpperCase()+"_"+z+"___"))!==-1;);return S[_]=k,_}).join(""),T,N),E=Object.keys(S);return j=0,(function k(_){for(var z=0;z<_.length;z++){if(j>=E.length)return;var U,J,Z,re,ae,P,V,oe=_[z];typeof oe=="string"||typeof oe.content=="string"?(U=E[j],(V=(P=typeof oe=="string"?oe:oe.content).indexOf(U))!==-1&&(++j,J=P.substring(0,V),ae=S[U],Z=void 0,(re={})["interpolation-punctuation"]=d,(re=s.tokenize(ae,re)).length===3&&((Z=[1,1]).push.apply(Z,x(re[1],s.languages.javascript,"javascript")),re.splice.apply(re,Z)),Z=new s.Token("interpolation",re,c.alias,ae),re=P.substring(V+U.length),ae=[],J&&ae.push(J),ae.push(Z),re&&(k(P=[re]),ae.push.apply(ae,P)),typeof oe=="string"?(_.splice.apply(_,[z,1].concat(ae)),z+=ae.length-1):oe.content=ae)):(V=oe.content,Array.isArray(V)?k(V):k([V]))}})(C),new s.Token(N,C,"language-"+N,w)}s.languages.javascript["template-string"]=[m("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),m("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),m("svg",/\bsvg/.source),m("markdown",/\b(?:markdown|md)/.source),m("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),m("sql",/\bsql/.source),r].filter(Boolean);var g={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function v(w){return typeof w=="string"?w:Array.isArray(w)?w.map(v).join(""):v(w.content)}s.hooks.add("after-tokenize",function(w){w.language in g&&(function T(N){for(var j=0,S=N.length;j<S;j++){var C,E,k,_=N[j];typeof _!="string"&&(C=_.content,Array.isArray(C)?_.type==="template-string"?(_=C[1],C.length===3&&typeof _!="string"&&_.type==="embedded-code"&&(E=v(_),_=_.alias,_=Array.isArray(_)?_[0]:_,k=s.languages[_])&&(C[1]=h(E,k,_))):T(C):typeof C!="string"&&T([C]))}})(w.tokens)})})(I),(function(s){s.languages.typescript=s.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),s.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete s.languages.typescript.parameter,delete s.languages.typescript["literal-property"];var r=s.languages.extend("typescript",{});delete r["class-name"],s.languages.typescript["class-name"].inside=r,s.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:r}}}}),s.languages.ts=s.languages.typescript})(I),(function(s){var r=s.languages.javascript,o=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,c="(@(?:arg|argument|param|property)\\s+(?:"+o+"\\s+)?)";s.languages.jsdoc=s.languages.extend("javadoclike",{parameter:{pattern:RegExp(c+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),s.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(c+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:r,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return o})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+o),lookbehind:!0,inside:{string:r.string,number:r.number,boolean:r.boolean,keyword:s.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:r,alias:"language-javascript"}}}}),s.languages.javadoclike.addSupport("javascript",s.languages.jsdoc)})(I),(function(s){s.languages.flow=s.languages.extend("javascript",{}),s.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),s.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete s.languages.flow.parameter,s.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(s.languages.flow.keyword)||(s.languages.flow.keyword=[s.languages.flow.keyword]),s.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})})(I),I.languages.n4js=I.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),I.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),I.languages.n4jsd=I.languages.n4js,(function(s){function r(m,x){return RegExp(m.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),x)}s.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+s.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),s.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+s.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),s.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),s.languages.insertBefore("javascript","keyword",{imports:{pattern:r(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:s.languages.javascript},exports:{pattern:r(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:s.languages.javascript}}),s.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),s.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),s.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:r(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var o=["function","function-variable","method","method-variable","property-access"],c=0;c<o.length;c++){var f=o[c],d=s.languages.javascript[f],f=(d=s.util.type(d)==="RegExp"?s.languages.javascript[f]={pattern:d}:d).inside||{};(d.inside=f)["maybe-class-name"]=/^[A-Z][\s\S]*/}})(I),(function(s){var r=s.util.clone(s.languages.javascript),o=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,c=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,d=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function f(h,g){return h=h.replace(/<S>/g,function(){return o}).replace(/<BRACES>/g,function(){return c}).replace(/<SPREAD>/g,function(){return d}),RegExp(h,g)}d=f(d).source,s.languages.jsx=s.languages.extend("markup",r),s.languages.jsx.tag.pattern=f(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),s.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,s.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,s.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,s.languages.jsx.tag.inside.comment=r.comment,s.languages.insertBefore("inside","attr-name",{spread:{pattern:f(/<SPREAD>/.source),inside:s.languages.jsx}},s.languages.jsx.tag),s.languages.insertBefore("inside","special-attr",{script:{pattern:f(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:s.languages.jsx}}},s.languages.jsx.tag);function m(h){for(var g=[],v=0;v<h.length;v++){var w=h[v],T=!1;typeof w!="string"&&(w.type==="tag"&&w.content[0]&&w.content[0].type==="tag"?w.content[0].content[0].content==="</"?0<g.length&&g[g.length-1].tagName===x(w.content[0].content[1])&&g.pop():w.content[w.content.length-1].content!=="/>"&&g.push({tagName:x(w.content[0].content[1]),openedBraces:0}):0<g.length&&w.type==="punctuation"&&w.content==="{"?g[g.length-1].openedBraces++:0<g.length&&0<g[g.length-1].openedBraces&&w.type==="punctuation"&&w.content==="}"?g[g.length-1].openedBraces--:T=!0),(T||typeof w=="string")&&0<g.length&&g[g.length-1].openedBraces===0&&(T=x(w),v<h.length-1&&(typeof h[v+1]=="string"||h[v+1].type==="plain-text")&&(T+=x(h[v+1]),h.splice(v+1,1)),0<v&&(typeof h[v-1]=="string"||h[v-1].type==="plain-text")&&(T=x(h[v-1])+T,h.splice(v-1,1),v--),h[v]=new s.Token("plain-text",T,null,T)),w.content&&typeof w.content!="string"&&m(w.content)}}var x=function(h){return h?typeof h=="string"?h:typeof h.content=="string"?h.content:h.content.map(x).join(""):""};s.hooks.add("after-tokenize",function(h){h.language!=="jsx"&&h.language!=="tsx"||m(h.tokens)})})(I),(function(s){var r=s.util.clone(s.languages.typescript),r=(s.languages.tsx=s.languages.extend("jsx",r),delete s.languages.tsx.parameter,delete s.languages.tsx["literal-property"],s.languages.tsx.tag);r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(I),I.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},I.languages.swift["string-literal"].forEach(function(s){s.inside.interpolation.inside=I.languages.swift}),(function(s){s.languages.kotlin=s.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete s.languages.kotlin["class-name"];var r={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:s.languages.kotlin}};s.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:r},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:r},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete s.languages.kotlin.string,s.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),s.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),s.languages.kt=s.languages.kotlin,s.languages.kts=s.languages.kotlin})(I),I.languages.c=I.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),I.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),I.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},I.languages.c.string],char:I.languages.c.char,comment:I.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:I.languages.c}}}}),I.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete I.languages.c.boolean,I.languages.objectivec=I.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete I.languages.objectivec["class-name"],I.languages.objc=I.languages.objectivec,I.languages.reason=I.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),I.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete I.languages.reason.function,(function(s){for(var r=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,o=0;o<2;o++)r=r.replace(/<self>/g,function(){return r});r=r.replace(/<self>/g,function(){return/[^\s\S]/.source}),s.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+r),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},s.languages.rust["closure-params"].inside.rest=s.languages.rust,s.languages.rust.attribute.inside.string=s.languages.rust.string})(I),I.languages.go=I.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),I.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete I.languages.go["class-name"],(function(s){var r=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,o=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return r.source});s.languages.cpp=s.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return r.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:r,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),s.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return o})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),s.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s.languages.cpp}}}}),s.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),s.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:s.languages.extend("cpp",{})}}),s.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},s.languages.cpp["base-clause"])})(I),I.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},I.languages.python["string-interpolation"].inside.interpolation.inside.rest=I.languages.python,I.languages.py=I.languages.python,I.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},I.languages.webmanifest=I.languages.json;var Kc={};i0(Kc,{dracula:()=>f0,duotoneDark:()=>p0,duotoneLight:()=>x0,github:()=>b0,gruvboxMaterialDark:()=>Q0,gruvboxMaterialLight:()=>J0,jettwaveDark:()=>$0,jettwaveLight:()=>G0,nightOwl:()=>v0,nightOwlLight:()=>w0,oceanicNext:()=>N0,okaidia:()=>E0,oneDark:()=>Y0,oneLight:()=>F0,palenight:()=>A0,shadesOfPurple:()=>R0,synthwave84:()=>O0,ultramin:()=>z0,vsDark:()=>Ch,vsLight:()=>B0});var d0={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},f0=d0,m0={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},p0=m0,h0={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},x0=h0,g0={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},b0=g0,y0={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},v0=y0,j0={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},w0=j0,Qt={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},S0={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:Qt.keyword}},{types:["attr-value"],style:{color:Qt.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:Qt.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:Qt.primitive}},{types:["boolean"],style:{color:Qt.boolean}},{types:["tag"],style:{color:Qt.tag}},{types:["string"],style:{color:Qt.string}},{types:["punctuation"],style:{color:Qt.string}},{types:["selector","char","builtin","inserted"],style:{color:Qt.char}},{types:["function"],style:{color:Qt.function}},{types:["operator","entity","url","variable"],style:{color:Qt.variable}},{types:["keyword"],style:{color:Qt.keyword}},{types:["atrule","class-name"],style:{color:Qt.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},N0=S0,k0={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},E0=k0,T0={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},A0=T0,C0={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},R0=C0,_0={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},O0=_0,M0={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},z0=M0,D0={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},Ch=D0,L0={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},B0=L0,U0={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},$0=U0,H0={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},G0=H0,q0={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},Y0=q0,Z0={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},F0=Z0,X0={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},Q0=X0,V0={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},J0=V0,K0=s=>y.useCallback(r=>{var o=r,{className:c,style:d,line:f}=o,m=Ah(o,["className","style","line"]);const x=di(jn({},m),{className:kh("token-line",c)});return typeof s=="object"&&"plain"in s&&(x.style=s.plain),typeof d=="object"&&(x.style=jn(jn({},x.style||{}),d)),x},[s]),I0=s=>{const r=y.useCallback(({types:o,empty:c})=>{if(s!=null){{if(o.length===1&&o[0]==="plain")return c!=null?{display:"inline-block"}:void 0;if(o.length===1&&c!=null)return s[o[0]]}return Object.assign(c!=null?{display:"inline-block"}:{},...o.map(d=>s[d]))}},[s]);return y.useCallback(o=>{var c=o,{token:d,className:f,style:m}=c,x=Ah(c,["token","className","style"]);const h=di(jn({},x),{className:kh("token",...d.types,f),children:d.content,style:r(d)});return m!=null&&(h.style=jn(jn({},h.style||{}),m)),h},[r])},W0=/\r\n|\r|\n/,Up=s=>{s.length===0?s.push({types:["plain"],content:`
126
126
  `,empty:!0}):s.length===1&&s[0].content===""&&(s[0].content=`
127
- `,s[0].empty=!0)},Dp=(s,r)=>{const o=s.length;return o>0&&s[o-1]===r?s:s.concat(r)},V0=s=>{const r=[[]],o=[s],c=[0],d=[s.length];let f=0,m=0,g=[];const h=[g];for(;m>-1;){for(;(f=c[m]++)<d[m];){let x,b=r[m];const T=o[m][f];if(typeof T=="string"?(b=m>0?b:["plain"],x=T):(b=Dp(b,T.type),T.alias&&(b=Dp(b,T.alias)),x=T.content),typeof x!="string"){m++,r.push(b),o.push(x),c.push(0),d.push(x.length);continue}const N=x.split(F0),w=N.length;g.push({types:b,content:N[0]});for(let S=1;S<w;S++)zp(g),h.push(g=[]),g.push({types:b,content:N[S]})}m--,r.pop(),o.pop(),c.pop(),d.pop()}return zp(g),h},Lp=V0,Q0=({prism:s,code:r,grammar:o,language:c})=>v.useMemo(()=>{if(o==null)return Lp([r]);const d={code:r,grammar:o,language:c,tokens:[]};return s.hooks.run("before-tokenize",d),d.tokens=s.tokenize(r,o),s.hooks.run("after-tokenize",d),Lp(d.tokens)},[r,o,c,s]),J0=(s,r)=>{const{plain:o}=s,c=s.styles.reduce((d,f)=>{const{languages:m,style:g}=f;return m&&!m.includes(r)||f.types.forEach(h=>{const x=pn(pn({},d[h]),g);d[h]=x}),d},{});return c.root=o,c.plain=ii(pn({},o),{backgroundColor:void 0}),c},K0=J0,I0=({children:s,language:r,code:o,theme:c,prism:d})=>{const f=r.toLowerCase(),m=K0(c,f),g=Z0(m),h=X0(m),x=d.languages[f],b=Q0({prism:d,language:f,code:o,grammar:x});return s({tokens:b,className:`prism-code language-${f}`,style:m!=null?m.root:{},getLineProps:g,getTokenProps:h})},W0=s=>v.createElement(I0,ii(pn({},s),{prism:s.prism||I,theme:s.theme||Nh,code:s.code,language:s.language}));/*! Bundled license information:
127
+ `,s[0].empty=!0)},$p=(s,r)=>{const o=s.length;return o>0&&s[o-1]===r?s:s.concat(r)},P0=s=>{const r=[[]],o=[s],c=[0],d=[s.length];let f=0,m=0,x=[];const h=[x];for(;m>-1;){for(;(f=c[m]++)<d[m];){let g,v=r[m];const T=o[m][f];if(typeof T=="string"?(v=m>0?v:["plain"],g=T):(v=$p(v,T.type),T.alias&&(v=$p(v,T.alias)),g=T.content),typeof g!="string"){m++,r.push(v),o.push(g),c.push(0),d.push(g.length);continue}const N=g.split(W0),j=N.length;x.push({types:v,content:N[0]});for(let S=1;S<j;S++)Up(x),h.push(x=[]),x.push({types:v,content:N[S]})}m--,r.pop(),o.pop(),c.pop(),d.pop()}return Up(x),h},Hp=P0,ev=({prism:s,code:r,grammar:o,language:c})=>y.useMemo(()=>{if(o==null)return Hp([r]);const d={code:r,grammar:o,language:c,tokens:[]};return s.hooks.run("before-tokenize",d),d.tokens=s.tokenize(r,o),s.hooks.run("after-tokenize",d),Hp(d.tokens)},[r,o,c,s]),tv=(s,r)=>{const{plain:o}=s,c=s.styles.reduce((d,f)=>{const{languages:m,style:x}=f;return m&&!m.includes(r)||f.types.forEach(h=>{const g=jn(jn({},d[h]),x);d[h]=g}),d},{});return c.root=o,c.plain=di(jn({},o),{backgroundColor:void 0}),c},nv=tv,av=({children:s,language:r,code:o,theme:c,prism:d})=>{const f=r.toLowerCase(),m=nv(c,f),x=K0(m),h=I0(m),g=d.languages[f],v=ev({prism:d,language:f,code:o,grammar:g});return s({tokens:v,className:`prism-code language-${f}`,style:m!=null?m.root:{},getLineProps:x,getTokenProps:h})},lv=s=>y.createElement(av,di(jn({},s),{prism:s.prism||I,theme:s.theme||Ch,code:s.code,language:s.language}));/*! Bundled license information:
128
128
 
129
129
  prismjs/prism.js:
130
130
  (**
@@ -135,17 +135,17 @@ prismjs/prism.js:
135
135
  * @namespace
136
136
  * @public
137
137
  *)
138
- */const P0=s=>{const r=new MutationObserver(s);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},ev=()=>document.documentElement.classList.contains("dark");function tv(s,r){if(!s&&r)return r.split(`
139
- `).map(d=>({type:"add",content:d}));const o=Fy(s,r),c=[];for(const d of o){const f=d.value.replace(/\n$/,"").split(`
140
- `),m=d.added?"add":d.removed?"remove":"context";for(const g of f)c.push({type:m,content:g})}return c}function nv(s){const r=s.split(".").pop()?.toLowerCase()||"";return{ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",py:"python",rs:"rust",go:"go",rb:"ruby",java:"java",css:"css",html:"html",json:"json",md:"markdown",yaml:"yaml",yml:"yaml",toml:"toml",sh:"bash",zsh:"bash",bash:"bash"}[r]||"text"}const av=v.memo(function({toolName:r,filePath:o,oldContent:c,newContent:d,isActive:f}){const m=v.useMemo(()=>tv(c,d),[c,d]),g=nv(o),h=v.useSyncExternalStore(P0,ev),x=!c;return l.jsxs("div",{className:"bg-terminal-surface rounded-xl overflow-hidden shadow-layer-sm",children:[l.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-terminal-surface",children:[l.jsx("span",{className:"text-xs font-mono font-bold text-terminal-orange",children:r}),l.jsx("span",{className:"text-xs font-mono text-terminal-blue truncate",children:o}),x&&l.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-terminal-green/20 text-terminal-green",children:"new"})]}),l.jsx("div",{className:"overflow-x-auto max-h-[400px] overflow-y-auto",children:l.jsx(W0,{theme:h?Xc.nightOwl:Xc.nightOwlLight,code:m.map(b=>b.content).join(`
141
- `),language:g,children:({tokens:b,getLineProps:j,getTokenProps:T})=>l.jsx("pre",{className:"text-xs font-mono !bg-transparent !m-0 p-0",children:b.map((N,w)=>{const S=m[w];if(!S)return null;const R=S.type==="add"?"bg-green-100 dark:bg-green-900/30":S.type==="remove"?"bg-red-100 dark:bg-red-900/30":"",A=S.type==="add"?"+":S.type==="remove"?"-":" ",E=S.type==="add"?"text-terminal-green":S.type==="remove"?"text-terminal-red":"text-terminal-dim";return l.jsxs("div",{...j({line:N}),className:`flex ${R} px-3 leading-5`,children:[l.jsx("span",{className:`select-none w-4 shrink-0 ${E}`,children:A}),l.jsx("span",{children:N.map((_,D)=>l.jsx("span",{...T({token:_})},D))})]},w)})})})})]})});function Bp(s){switch(s){case"Read":return"📄";case"Write":return"✏️";case"Edit":return"✂️";case"Bash":return"$";case"Glob":return"🔍";case"Grep":return"🔎";case"Agent":return"🤖";default:return"⚙️"}}const lv=v.memo(function({scene:r,isActive:o,forceCollapse:c}){const[d,f]=v.useState(!1);return c?l.jsxs("div",{className:"flex items-center gap-2 px-3 py-1 text-xs font-mono text-terminal-dim",children:[l.jsx("span",{children:Bp(r.toolName)}),l.jsx("span",{className:"text-terminal-orange font-bold",children:r.toolName}),l.jsx("span",{className:"truncate",children:Up(r.toolName,r.input)})]}):r.bashOutput?l.jsx(qy,{command:r.bashOutput.command,stdout:r.bashOutput.stdout,isActive:o}):r.diff?l.jsx(av,{toolName:r.toolName,filePath:r.diff.filePath,oldContent:r.diff.oldContent,newContent:r.diff.newContent,isActive:o}):l.jsx("div",{children:l.jsxs("div",{className:"bg-terminal-surface rounded-xl overflow-hidden shadow-layer-sm",children:[l.jsxs("button",{onClick:()=>f(!d),className:"w-full flex items-center gap-2 px-3 py-2 bg-terminal-surface hover:bg-terminal-surface-hover transition-colors duration-200 ease-material text-left",children:[l.jsx("span",{className:"text-xs font-mono",children:Bp(r.toolName)}),l.jsx("span",{className:"text-xs font-mono font-bold text-terminal-orange",children:r.toolName}),l.jsx("span",{className:"text-xs text-terminal-dim font-mono truncate flex-1",children:Up(r.toolName,r.input)}),l.jsx("span",{className:`text-xs text-terminal-dim transition-transform ${d?"rotate-90":""}`,children:"▶"})]}),d&&l.jsxs("div",{className:"border-t border-terminal-border-subtle",children:[l.jsxs("div",{className:"px-3 py-2",children:[l.jsx("div",{className:"text-xs text-terminal-dim font-mono mb-1",children:"Input:"}),l.jsx("pre",{className:"text-xs text-terminal-text font-mono whitespace-pre-wrap break-words max-h-[200px] overflow-y-auto",children:JSON.stringify(r.input,null,2)})]}),r.result&&l.jsxs("div",{className:"px-3 py-2 border-t border-terminal-border-subtle",children:[l.jsx("div",{className:"text-xs text-terminal-dim font-mono mb-1",children:"Result:"}),l.jsx("pre",{className:"text-xs text-terminal-text font-mono whitespace-pre-wrap break-words max-h-[200px] overflow-y-auto",children:r.result})]}),r.images&&r.images.length>0&&l.jsx("div",{className:"px-3 py-2 border-t border-terminal-border-subtle",children:l.jsx("div",{className:"flex gap-2 flex-wrap",children:r.images.map((m,g)=>l.jsx("img",{src:m,alt:`Screenshot ${g+1}`,className:"max-w-[400px] max-h-[300px] rounded-md object-contain"},g))})})]})]})})});function Up(s,r){switch(s){case"Read":return r.file_path||"";case"Glob":return r.pattern||"";case"Grep":return`/${r.pattern||""}/ ${r.path||""}`;case"Agent":return r.description||"";case"Write":return r.file_path||"";case"Edit":return r.file_path||"";case"WebSearch":return r.query||"";case"WebFetch":return r.url||"";default:return Object.values(r).filter(o=>typeof o=="string").join(" ").slice(0,80)}}const Hp=8,sv=900,rv=v.memo(function({content:r,images:o,isActive:c}){const[d,f]=v.useState(!1);v.useEffect(()=>{const x=b=>{if(!c)return;const j=b.detail;j.action==="expand"?f(!0):j.action==="collapse"&&f(!1)};return window.addEventListener("vibe:toggle-expand",x),()=>window.removeEventListener("vibe:toggle-expand",x)},[c]);const m=v.useMemo(()=>r.split(`
142
- `),[r]),g=m.length>Hp||r.length>sv,h=v.useMemo(()=>!g||d?r:m.slice(0,Hp).join(`
143
- `),[r,d,g,m]);return l.jsxs("div",{children:[l.jsxs("div",{className:`text-terminal-green font-mono text-sm whitespace-pre-wrap break-words ${c?"typing-cursor":""}`,children:[h,g&&!d&&l.jsx("span",{className:"text-terminal-dim",children:`
144
- ...`})]}),g&&l.jsxs("button",{onClick:()=>f(x=>!x),className:"mt-1 text-xs font-mono text-terminal-dim hover:text-terminal-green transition-colors duration-200 ease-material flex items-center gap-1.5",children:[c&&l.jsx("span",{className:"text-secondary-text font-bold opacity-70",children:d?"[←]":"[→]"}),l.jsx("span",{children:d?"Show less":`Show more (${m.length} lines)`})]}),o&&o.length>0&&l.jsx("div",{className:"flex gap-2 mt-2 flex-wrap",children:o.map((x,b)=>l.jsx("img",{src:x,alt:`Attachment ${b+1}`,className:"max-w-[300px] max-h-[200px] rounded-md object-contain"},b))})]})});function Fr(s){if(!s)return"";try{return new Date(s).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return""}}function iv({scenes:s,visibleCount:r,currentIndex:o,effectivePrefs:c,focusIndex:d,annotatedScenes:f,annotationCounts:m,onComment:g,onSeek:h,state:x,overlayActions:b}){const j=v.useMemo(()=>{const w=[];let S=null,R=0;for(let A=0;A<s.length;A++){const E=s[A];if(E.type==="user-prompt"||E.type==="compaction-summary"){S&&S.scenes.length>0&&w.push(S);const _=E.type==="compaction-summary"?"compaction":"user";_==="user"&&R++,w.push({type:_,timestamp:E.timestamp,scenes:[{scene:E,index:A}],turnNumber:_==="user"?R:void 0}),S=null}else(!S||S.type!=="assistant")&&(S&&S.scenes.length>0&&w.push(S),S={type:"assistant",timestamp:E.timestamp,scenes:[]}),S.scenes.push({scene:E,index:A})}return S&&S.scenes.length>0&&w.push(S),w},[s]),T=v.useMemo(()=>c.promptsOnly?j.filter(w=>(w.type==="user"||w.type==="compaction")&&w.scenes[0].index<r):j.filter(w=>w.scenes[0].index<r),[j,r,c.promptsOnly]),N=v.useMemo(()=>{for(let w=T.length-1;w>=0;w--)if(T[w].scenes.some(S=>S.index<=o))return w;return T.length-1},[T,o]);return l.jsxs("div",{className:"max-w-4xl mx-auto space-y-5 pb-6",children:[T.map((w,S)=>l.jsx(ov,{forceRender:Math.abs(S-N)<=5,children:l.jsx(cv,{group:w,currentIndex:o,visibleCount:r,effectivePrefs:c,focusIndex:d,annotatedScenes:f,annotationCounts:m,onComment:g,overlayActions:b})},S)),x==="paused"&&r<s.length&&l.jsx("div",{className:"pt-4 pb-12 flex items-center justify-center animate-in fade-in slide-in-from-bottom-2 duration-700 ease-out select-none",children:l.jsxs("div",{className:"group/pause relative flex items-center gap-8 px-4 py-2 bg-transparent backdrop-blur-sm",children:[l.jsx("div",{className:"absolute inset-0 bg-terminal-orange/5 opacity-0 group-hover/pause:opacity-100 transition-opacity duration-700 blur-2xl -z-10"}),l.jsxs("div",{className:"flex items-center gap-2.5 pr-8 border-r border-terminal-border/20",children:[l.jsxs("div",{className:"relative flex h-2 w-2",children:[l.jsx("div",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-terminal-orange opacity-40"}),l.jsx("div",{className:"relative inline-flex rounded-full h-2 w-2 bg-terminal-orange/80 shadow-[0_0_8px_rgba(251,146,60,0.5)]"})]}),l.jsx("span",{className:"text-[10px] font-sans font-black text-terminal-orange uppercase tracking-[.25em] drop-shadow-sm",children:"Paused"})]}),l.jsxs("div",{className:"flex items-center gap-8",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"flex items-center gap-1.5 px-2 py-0.5 rounded bg-terminal-surface-hover/80 border border-terminal-border-subtle/50 text-terminal-text shadow-sm",children:l.jsx("span",{className:"text-[11px] font-mono font-bold",children:"↓"})}),l.jsx("span",{className:"text-[10px] font-sans font-bold text-terminal-dim uppercase tracking-widest opacity-80",children:"Explore"})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"flex items-center gap-1.5 px-2 py-0.5 rounded bg-terminal-surface-hover/80 border border-terminal-border-subtle/50 text-terminal-text shadow-sm",children:l.jsx("span",{className:"text-[9px] font-mono font-black tracking-tight",children:"SPACE"})}),l.jsx("span",{className:"text-[10px] font-sans font-bold text-terminal-dim uppercase tracking-widest opacity-80",children:"Resume"})]})]})]})}),r>=s.length&&l.jsxs("div",{className:"pt-12 pb-24 flex flex-col items-center justify-center animate-in fade-in zoom-in-95 duration-1000 ease-out select-none",children:[l.jsx("div",{className:"h-px w-8 bg-terminal-border-subtle mb-6"}),l.jsxs("div",{className:"flex flex-col items-center gap-1",children:[l.jsx("div",{className:"text-[10px] font-mono font-bold text-terminal-dimmer uppercase tracking-[0.3em]",children:"the end"}),l.jsx("div",{className:"text-[9px] font-mono text-terminal-border uppercase tracking-widest mt-1",children:"session replay complete"})]}),l.jsxs("div",{className:"mt-8 flex flex-col items-center gap-6",children:[l.jsxs("button",{onClick:()=>h?.(0),className:"group flex items-center gap-2.5 px-3.5 py-1.5 rounded-full bg-terminal-surface/30 border border-terminal-border-subtle text-terminal-dimmer hover:text-terminal-green hover:border-terminal-green/30 hover:bg-terminal-green/5 transition-all duration-300",children:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform duration-300 group-hover:-translate-y-0.5",children:l.jsx("path",{d:"m18 15-6-6-6 6"})}),l.jsx("span",{className:"text-[10px] font-mono font-bold uppercase tracking-widest transition-colors",children:"Back to Top"}),l.jsxs("span",{className:"text-[9px] font-mono font-bold opacity-0 group-hover:opacity-60 transition-opacity",children:[" ","[Home]"]})]}),l.jsxs("div",{className:"flex items-center gap-3 opacity-20",children:[l.jsx("div",{className:"w-1 h-1 rounded-full bg-terminal-green"}),l.jsx("div",{className:"w-1 h-1 rounded-full bg-terminal-blue"}),l.jsx("div",{className:"w-1 h-1 rounded-full bg-terminal-orange"})]})]})]})]})}const ov=v.memo(function({children:r,forceRender:o}){const c=v.useRef(null),[d,f]=v.useState(!1),m=v.useRef(0);v.useEffect(()=>{const h=c.current;if(!h)return;const x=new IntersectionObserver(([b])=>{f(b.isIntersecting),b.isIntersecting&&h.offsetHeight>0&&(m.current=h.offsetHeight)},{rootMargin:"800px 0px"});return x.observe(h),()=>x.disconnect()},[]);const g=d||o;return v.useEffect(()=>{g&&c.current&&c.current.offsetHeight>0&&(m.current=c.current.offsetHeight)}),l.jsx("div",{ref:c,style:!g&&m.current>0?{minHeight:m.current}:void 0,children:g?r:null})}),cv=v.memo(function({group:r,currentIndex:o,visibleCount:c,effectivePrefs:d,focusIndex:f,annotatedScenes:m,annotationCounts:g,onComment:h,overlayActions:x}){const[b,j]=v.useState(!1),T=v.useMemo(()=>r.scenes.filter(D=>D.index<c),[r.scenes,c]),N=T.some(({index:D})=>D===o),w=typeof f=="number"&&T.some(({index:D})=>D===f),S=T[0]?.index;if(T.length===0)return null;const R=r.type==="user"&&g?.get(S)||0,A=r.type==="user"&&h&&(R>0||b)?l.jsxs("button",{onClick:D=>{D.stopPropagation(),h(S)},className:`absolute right-0 top-3 z-10 flex items-center gap-1 px-1.5 py-1 rounded-md text-xs font-mono transition-all duration-150 ${R>0?"bg-terminal-blue text-terminal-bg shadow-layer-sm":"text-terminal-dim hover:text-terminal-blue hover:bg-terminal-blue-subtle opacity-0 group-hover:opacity-100"}`,title:R>0?`${R} comment${R>1?"s":""}`:"Add comment",children:["💬",R>0&&l.jsx("span",{children:R})]}):null;if(r.type==="user")return l.jsxs("div",{id:`scene-${S}`,"data-scene-index":S,className:`group relative rounded-2xl px-5 py-4 transition-all duration-200 ease-material ml-4 md:ml-12 border ${w?"scene-nav-focused bg-terminal-green-emphasis border-terminal-green shadow-layer-lg":N?"bg-terminal-green-subtle border-terminal-green/30 shadow-layer-sm":"bg-terminal-surface border-terminal-border-subtle shadow-sm"}`,onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),children:[A,l.jsxs("div",{className:"flex items-center gap-2 mb-2.5",children:[l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-green uppercase tracking-widest",children:"You"}),r.timestamp&&l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:Fr(r.timestamp)}),l.jsx("div",{className:"flex-1"}),w?l.jsx("span",{className:"text-[10px] font-sans font-medium uppercase tracking-widest px-2 py-0.5 rounded-full bg-terminal-green text-terminal-bg",children:"Jump Target"}):N&&l.jsx("span",{className:"text-[10px] font-sans font-medium uppercase tracking-widest px-2 py-0.5 rounded-full bg-terminal-green-subtle text-terminal-green border border-terminal-green/20",children:"Focused"}),r.turnNumber!==void 0&&l.jsxs("span",{className:"text-[10px] font-mono text-terminal-dimmer font-bold",children:["#",String(r.turnNumber).padStart(2,"0")]})]}),l.jsx("div",{className:"text-left",children:T.map(({scene:D,index:$})=>{const ae=x?.getOverlays($)??[],Y=x?.getEffectiveContent($),se=x?.showOriginal.has($);return l.jsxs("div",{className:"scene-enter",children:[l.jsx(oi,{scene:D,isActive:$===o,collapseTools:d.collapseAllTools,effectiveContent:Y??void 0}),ae.length>0&&l.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[ae.map(te=>l.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded bg-terminal-purple-subtle text-terminal-purple",children:te.source.type==="translate"?"Translated":te.source.type==="tone"?"Softened":"Modified"},te.id)),l.jsx("button",{onClick:()=>x?.toggleOriginal($),className:"text-[10px] font-mono text-terminal-dim hover:text-terminal-text transition-colors",children:se?"Show modified":"Show original"}),l.jsx("button",{onClick:()=>x?.revertSceneOverlays($),className:"text-[10px] font-mono text-terminal-dim hover:text-terminal-red transition-colors",children:"Revert"})]})]},$)})})]});if(r.type==="compaction"){const D=T[0]?.scene;return!D||D.type!=="compaction-summary"?null:l.jsxs("div",{id:`scene-${S}`,"data-scene-index":S,className:`group relative rounded-xl px-5 py-3.5 transition-all duration-200 ease-material ${w?"scene-nav-focused bg-terminal-surface border-l-2 border-terminal-dim shadow-layer-sm":N?"bg-terminal-surface border-l-2 border-terminal-dim shadow-layer-sm":"bg-terminal-surface/50"}`,children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-dim uppercase tracking-widest",children:"Context Compaction"}),r.timestamp&&l.jsx("span",{className:"text-xs font-mono text-terminal-dimmer",children:Fr(r.timestamp)})]}),l.jsx(gh,{content:D.content,isActive:S===o})]})}const E=d.hideThinking?T.filter(D=>D.scene.type!=="thinking"):T;if(E.length===0)return null;const _=d.hideThinking?r.scenes.filter(D=>D.scene.type!=="thinking"):r.scenes;return d.compactAssistant?l.jsx(dv,{allScenes:_,filteredScenes:E,firstIndex:S,currentIndex:o,groupHasCurrent:N,groupHasFocusedTarget:w,timestamp:r.timestamp,annotationCounts:g,onComment:h,overlayActions:x}):l.jsxs("div",{id:`scene-${S}`,"data-scene-index":S,className:`relative rounded-xl px-5 py-4 transition-all duration-200 ease-material ${w?"scene-nav-focused bg-terminal-blue-subtle border-l-2 border-terminal-blue shadow-layer-lg":N?"bg-terminal-blue-subtle border-l-2 border-terminal-blue shadow-layer-sm":"bg-terminal-surface shadow-layer-sm"}`,children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-blue uppercase tracking-widest",children:"Assistant"}),r.timestamp&&l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:Fr(r.timestamp)}),l.jsx("div",{className:"flex-1"}),w?l.jsx("span",{className:"text-[10px] font-sans font-medium uppercase tracking-widest px-2 py-0.5 rounded-full bg-terminal-blue-emphasis text-terminal-blue",children:"Jump Target"}):N&&l.jsx("span",{className:"text-[10px] font-sans font-medium uppercase tracking-widest px-2 py-0.5 rounded-full bg-terminal-blue-subtle text-terminal-blue",children:"Focused"}),r.turnNumber!==void 0&&l.jsxs("span",{className:"text-[10px] font-mono text-terminal-dimmer font-bold",children:["#",String(r.turnNumber).padStart(2,"0")]})]}),l.jsx("div",{className:"space-y-2",children:l.jsx(fv,{scenes:E,currentIndex:o,collapseTools:d.collapseAllTools,annotationCounts:g,onComment:h,overlayActions:x})})]})});function uv(s){if(s.startsWith("mcp__")){const r=s.split("__");return r[r.length-1]}return s}function dv({allScenes:s,filteredScenes:r,firstIndex:o,currentIndex:c,groupHasCurrent:d,groupHasFocusedTarget:f,timestamp:m,annotationCounts:g,onComment:h,overlayActions:x}){const[b,j]=v.useState(!1);v.useEffect(()=>{const E=_=>{if(!d)return;const D=_.detail;D.action==="expand"?j(!0):D.action==="collapse"&&j(!1)};return window.addEventListener("vibe:toggle-expand",E),()=>window.removeEventListener("vibe:toggle-expand",E)},[d]);const T=v.useMemo(()=>{const E={},_=new Set;let D=0,$=0,ae=0;for(const{scene:Y}of s)if(Y.type==="tool-call"){ae++;const se=uv(Y.toolName);if(E[se]=(E[se]||0)+1,Y.toolName==="Bash"&&Y.input?.command){const te=Y.input.command.trim().split(/[\s|;&]/)[0];te&&_.add(te)}}else Y.type==="text-response"?D++:Y.type==="thinking"&&$++;return{totalTools:ae,toolBreakdown:E,responses:D,thinking:$,bashCommands:[..._]}},[s]),N=v.useMemo(()=>{for(let E=s.length-1;E>=0;E--)if(s[E].scene.type==="text-response")return s[E];return null},[s]),w=v.useMemo(()=>{const E=["Read","Write","Edit","Bash","Glob","Grep","Agent"],_=Object.entries(T.toolBreakdown);return _.sort((D,$)=>{const ae=E.indexOf(D[0]),Y=E.indexOf($[0]),se=ae>=0?ae:100,te=Y>=0?Y:100;return se-te}),_},[T.toolBreakdown]),S=v.useMemo(()=>g?s.reduce((E,{index:_})=>E+(g.get(_)||0),0):0,[s,g]),[R,A]=v.useState(!1);return l.jsxs("div",{id:`scene-${o}`,"data-scene-index":o,className:`group relative rounded-xl px-5 py-4 transition-all duration-200 ease-material ${f?"scene-nav-focused bg-terminal-blue-subtle border-l-2 border-terminal-blue shadow-layer-lg":d?"bg-terminal-blue-subtle border-l-2 border-terminal-blue shadow-layer-sm":"bg-terminal-surface shadow-layer-sm"}`,onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),children:[h&&(S>0||R)&&!b&&l.jsxs("button",{onClick:E=>{E.stopPropagation(),h(o)},className:`absolute right-3 top-3 z-10 flex items-center gap-1 px-1.5 py-1 rounded-md text-xs font-mono transition-all duration-150 ${S>0?"bg-terminal-blue text-terminal-bg shadow-layer-sm":"text-terminal-dim hover:text-terminal-blue hover:bg-terminal-blue-subtle opacity-0 group-hover:opacity-100"}`,title:S>0?`${S} comment${S>1?"s":""}`:"Add comment",children:["💬",S>0&&l.jsx("span",{children:S})]}),l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-blue uppercase tracking-widest",children:"Assistant"}),m&&l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:Fr(m)}),l.jsx("div",{className:"flex-1"}),f?l.jsx("span",{className:"text-[10px] font-sans font-medium uppercase tracking-widest px-2 py-0.5 rounded-full bg-terminal-blue-emphasis text-terminal-blue",children:"Jump Target"}):d&&l.jsx("span",{className:"text-[10px] font-sans font-medium uppercase tracking-widest px-2 py-0.5 rounded-full bg-terminal-blue-subtle text-terminal-blue",children:"Focused"})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 mb-3 text-[11px] font-mono",children:[T.responses>0&&l.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-terminal-blue-subtle text-terminal-blue",children:[T.responses," response",T.responses>1?"s":""]}),T.totalTools>0&&l.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-terminal-orange-subtle text-terminal-orange",children:[T.totalTools," tool",T.totalTools>1?"s":""]}),T.thinking>0&&l.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-terminal-purple-subtle text-terminal-purple",children:[T.thinking," thinking"]}),w.length>0&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-terminal-border mx-0.5",children:"|"}),w.map(([E,_])=>l.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded bg-terminal-surface-hover text-terminal-dim",children:[l.jsx("span",{className:"text-terminal-orange",children:E}),E==="Bash"&&T.bashCommands.length>0&&l.jsxs("span",{className:"text-terminal-dimmer",children:["(",T.bashCommands.slice(0,4).join(", "),T.bashCommands.length>4?", ...":"",")"]}),l.jsx("span",{children:_})]},E))]})]}),N&&!b&&l.jsx("div",{className:"mb-2",children:l.jsx(bh,{content:x?.getEffectiveContent(N.index)??N.scene.content,isActive:N.index===c})}),b&&l.jsx("div",{className:"space-y-2 mb-2",children:r.map(({scene:E,index:_})=>{const D=g?.get(_)||0,$=E.type==="text-response"?x?.getEffectiveContent(_)??void 0:void 0;return l.jsxs("div",{"data-scene-index":_,className:`group/scene relative scene-enter ${h?"pr-7":""}`,children:[l.jsx(oi,{scene:E,isActive:_===c,collapseTools:!1,effectiveContent:$}),h&&l.jsxs("button",{onClick:ae=>{ae.stopPropagation(),h(_)},className:`absolute right-0 top-1 z-10 flex items-center gap-0.5 px-1.5 py-0.5 rounded-md text-xs font-mono transition-all duration-150 ${D>0?"bg-terminal-blue text-terminal-bg shadow-layer-sm":"text-terminal-dim hover:text-terminal-blue hover:bg-terminal-blue-subtle opacity-0 group-hover/scene:opacity-100"}`,title:D>0?`${D} comment${D>1?"s":""}`:"Add comment",children:["💬",D>0&&l.jsx("span",{children:D})]})]},_)})}),l.jsxs("button",{onClick:()=>j(!b),className:"text-xs font-mono text-terminal-dim hover:text-terminal-blue transition-colors flex items-center gap-1.5",children:[d&&l.jsx("span",{className:"text-secondary-text font-bold opacity-70",children:b?"[←]":"[→]"}),l.jsx("span",{children:b?"Collapse":"Show all details"})]})]})}function fv({scenes:s,currentIndex:r,collapseTools:o,annotationCounts:c,onComment:d,overlayActions:f}){const m=[];let g=[];for(const h of s){const x=g[g.length-1];x&&x.scene.type==="tool-call"&&h.scene.type==="tool-call"&&x.scene.toolName===h.scene.toolName&&!h.scene.diff&&!h.scene.bashOutput&&!x.scene.diff&&!x.scene.bashOutput?g.push(h):(g.length>0&&m.push(g),g=[h])}return g.length>0&&m.push(g),l.jsx(l.Fragment,{children:m.map(h=>{if(h.length<=1){const{scene:b,index:j}=h[0],T=c?.get(j)||0,N=b.type==="text-response"?f?.getEffectiveContent(j):void 0,w=b.type==="text-response"?f?.getOverlays(j)??[]:[];return l.jsxs("div",{"data-scene-index":j,className:`group/scene relative scene-enter ${d?"pr-7":""}`,children:[l.jsx(oi,{scene:b,isActive:j===r,collapseTools:o,effectiveContent:N??void 0}),w.length>0&&l.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[w.map(S=>l.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded bg-terminal-purple-subtle text-terminal-purple",children:S.source.type==="translate"?"Translated":S.source.type==="tone"?"Softened":"Modified"},S.id)),l.jsx("button",{onClick:()=>f?.toggleOriginal(j),className:"text-[10px] font-mono text-terminal-dim hover:text-terminal-text transition-colors",children:f?.showOriginal.has(j)?"Show modified":"Show original"}),l.jsx("button",{onClick:()=>f?.revertSceneOverlays(j),className:"text-[10px] font-mono text-terminal-dim hover:text-terminal-red transition-colors",children:"Revert"})]}),d&&l.jsxs("button",{onClick:S=>{S.stopPropagation(),d(j)},className:`absolute right-0 top-1 z-10 flex items-center gap-0.5 px-1.5 py-0.5 rounded-md text-xs font-mono transition-all duration-150 ${T>0?"bg-terminal-blue text-terminal-bg shadow-layer-sm":"text-terminal-dim hover:text-terminal-blue hover:bg-terminal-blue-subtle opacity-0 group-hover/scene:opacity-100"}`,title:T>0?`${T} comment${T>1?"s":""}`:"Add comment",children:["💬",T>0&&l.jsx("span",{children:T})]})]},j)}const x=h[0].scene.toolName;return l.jsx(mv,{batch:h,toolName:x,currentIndex:r,collapseTools:o,annotationCounts:c,onComment:d},h[0].index)})})}function mv({batch:s,toolName:r,currentIndex:o,collapseTools:c,annotationCounts:d,onComment:f}){const[m,g]=v.useState(!1),h=d?s.reduce((b,{index:j})=>b+(d.get(j)||0),0):0,x=s.map(({scene:b})=>b.type==="tool-call"?pv(b.toolName,b.input):"");return l.jsxs("div",{"data-scene-index":s[0].index,className:`group/batch relative ${f?"pr-7":""}`,children:[l.jsxs("button",{onClick:()=>g(!m),className:"w-full flex items-center gap-2 px-3.5 py-2.5 text-xs font-mono text-terminal-dim rounded-xl bg-terminal-surface hover:bg-terminal-surface-hover transition-all duration-200 ease-material cursor-pointer text-left shadow-layer-sm",children:[l.jsx("span",{className:`transition-transform text-xs ${m?"rotate-90":""}`,children:"▶"}),l.jsx("span",{className:"text-terminal-orange font-semibold",children:r}),l.jsxs("span",{className:"text-terminal-dimmer",children:[s.length," call",s.length>1?"s":""]}),!m&&l.jsxs("span",{className:"truncate text-terminal-dimmer ml-1",children:[x.filter(Boolean).slice(0,3).join(", "),x.filter(Boolean).length>3&&"..."]})]}),f&&!m&&l.jsxs("button",{onClick:b=>{b.stopPropagation(),f(s[0].index)},className:`absolute right-0 top-1 z-10 flex items-center gap-0.5 px-1.5 py-0.5 rounded-md text-xs font-mono transition-all duration-150 ${h>0?"bg-terminal-blue text-terminal-bg shadow-layer-sm":"text-terminal-dim hover:text-terminal-blue hover:bg-terminal-blue-subtle opacity-0 group-hover/batch:opacity-100"}`,title:h>0?`${h} comment${h>1?"s":""}`:"Add comment",children:["💬",h>0&&l.jsx("span",{children:h})]}),m&&l.jsx("div",{className:"mt-1 ml-4 space-y-2 pl-4",children:s.map(({scene:b,index:j})=>{const T=d?.get(j)||0;return l.jsxs("div",{"data-scene-index":j,className:`group/scene relative scene-enter ${f?"pr-7":""}`,children:[l.jsx(oi,{scene:b,isActive:j===o,collapseTools:c}),f&&l.jsxs("button",{onClick:N=>{N.stopPropagation(),f(j)},className:`absolute right-0 top-1 z-10 flex items-center gap-0.5 px-1.5 py-0.5 rounded-md text-xs font-mono transition-all duration-150 ${T>0?"bg-terminal-blue text-terminal-bg shadow-layer-sm":"text-terminal-dim hover:text-terminal-blue hover:bg-terminal-blue-subtle opacity-0 group-hover/scene:opacity-100"}`,title:T>0?`${T} comment${T>1?"s":""}`:"Add comment",children:["💬",T>0&&l.jsx("span",{children:T})]})]},j)})})]})}function pv(s,r){switch(s){case"Read":return r.file_path||"";case"Glob":return r.pattern||"";case"Grep":return r.pattern||"";case"Agent":return r.description||"";default:return""}}const oi=v.memo(function({scene:r,isActive:o,collapseTools:c,effectiveContent:d}){switch(r.type){case"user-prompt":return l.jsx(rv,{content:d??r.content,images:r.images,isActive:o});case"compaction-summary":return l.jsx(gh,{content:r.content,isActive:o});case"thinking":return l.jsx(Gy,{content:r.content,isActive:o});case"text-response":return l.jsx(bh,{content:d??r.content,isActive:o});case"tool-call":return l.jsx(lv,{scene:r,isActive:o,forceCollapse:c})}});function _c(s){const r=new URLSearchParams(window.location.search).get("session");if(!r)return s;const o=s.includes("?")?"&":"?";return`${s}${o}slug=${encodeURIComponent(r)}`}function $p({title:s,color:r}){return l.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[l.jsx("span",{className:`text-[10px] font-sans font-semibold uppercase tracking-widest ${r}`,children:s}),l.jsx("div",{className:"flex-1 h-px bg-terminal-border-subtle"})]})}function Gp({text:s,label:r}){const[o,c]=v.useState(!1);return l.jsx("button",{onClick:async()=>{await navigator.clipboard.writeText(s),c(!0),setTimeout(()=>c(!1),2e3)},className:"text-[10px] font-mono text-terminal-dim hover:text-terminal-text transition-colors px-1.5 py-0.5 rounded bg-terminal-surface hover:bg-terminal-surface-hover border border-terminal-border-subtle",title:"Copy to clipboard",children:o?"Copied!":r||"Copy"})}function hv(s){try{const r=Date.now()-new Date(s).getTime(),o=Math.floor(r/6e4);if(o<1)return"just now";if(o<60)return`${o}m ago`;const c=Math.floor(o/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return""}}function qp({label:s,path:r}){return l.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono text-terminal-dim",children:[l.jsx("span",{className:"text-terminal-dimmer w-8 shrink-0",children:s}),l.jsx("span",{className:"text-terminal-text truncate",children:r})]})}function xv({actions:s,viewerMode:r,readOnly:o,session:c}){const{hasUnsaved:d,canSaveHtml:f,downloadHtml:m,downloadJson:g,publishGist:h,exportHtml:x,exportGithub:b,gistPublishing:j,htmlExporting:T,githubExporting:N}=s,w=r==="editor",[S,R]=v.useState(null),[A,E]=v.useState(null),[_,D]=v.useState(null),[$,ae]=v.useState(null),[Y,se]=v.useState(!1),[te,Q]=v.useState(null),[le,oe]=v.useState(!1),[ue,P]=v.useState(null),[pe,z]=v.useState("preview");v.useEffect(()=>{w&&(h&&(fetch(_c("/api/gh-status")).then(B=>B.json()).then(B=>D(B.available??!1)).catch(()=>D(!1)),se(!0),fetch(_c("/api/gist-info")).then(B=>B.json()).then(B=>{B.gist&&ae(B.gist)}).catch(()=>{}).finally(()=>se(!1))),b&&fetch(_c("/api/export/github/status")).then(B=>B.json()).then(B=>{B.exists&&Q({svgContent:B.svgContent,markdown:B.markdown,svgPath:B.svgPath,mdPath:B.mdPath,replayUrl:B.replayUrl})}).catch(()=>{}))},[w,h,b]);const ne=v.useCallback(async()=>{if(h){E(null);try{const B=await h();ae({gistId:B.gistId,gistUrl:B.gistUrl,viewerUrl:B.viewerUrl,updatedAt:new Date().toISOString()}),E({type:"success",text:"Published successfully!"})}catch(B){E({type:"error",text:B.message})}}},[h]),ie=v.useCallback(async()=>{if(b){P(null),oe(!0);try{const B=await b();await navigator.clipboard.writeText(B.markdown),Q({svgContent:B.svgContent,markdown:B.markdown,svgPath:B.svgPath,mdPath:B.mdPath,replayUrl:B.replayUrl,warnings:B.warnings})}catch(B){P(B.message)}finally{oe(!1)}}},[b]),ee=v.useMemo(()=>{if(!te?.markdown)return"";const B=te.markdown.replace(/!\[[^\]]*\]\([^)]*\.svg\)\n*/g,"");return au(Ue.parse(B))},[te?.markdown]),re=v.useMemo(()=>te?.svgContent?Dy(te.svgContent):"",[te?.svgContent]);if(o)return l.jsx("div",{className:"p-6 text-center text-xs font-mono text-terminal-dim",children:"Export is not available in read-only mode"});const k=_===!1,O="px-4 py-2 text-xs font-mono rounded-lg transition-colors text-center disabled:opacity-50 shrink-0";return l.jsx("div",{className:"flex-1 overflow-y-auto",children:l.jsxs("div",{className:"p-6 max-w-3xl mx-auto",children:[c&&l.jsxs("div",{className:"flex items-center gap-2.5 mb-5",children:[l.jsx("h2",{className:"text-sm font-mono font-semibold text-terminal-text truncate",children:c.meta.title||c.meta.slug}),c.meta.provider&&l.jsx("span",{className:"shrink-0 text-[10px] font-mono text-terminal-dimmer px-1.5 py-0.5 rounded bg-terminal-surface border border-terminal-border-subtle",children:c.meta.provider})]}),d&&l.jsx("div",{className:"text-xs font-mono text-terminal-orange text-center mb-5 px-3 py-2 rounded-lg bg-terminal-orange-subtle border border-terminal-orange/20",children:"You have unsaved annotation changes"}),w&&h&&l.jsxs("div",{className:"mb-8",children:[l.jsx($p,{title:"Share",color:"text-terminal-purple"}),l.jsx("div",{className:"bg-terminal-surface rounded-2xl border border-terminal-border-subtle shadow-layer-sm overflow-hidden",children:l.jsxs("div",{className:"p-5",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx("span",{className:"text-sm font-mono font-semibold text-terminal-purple",children:"GitHub Gist"}),l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-mono text-terminal-dim px-1.5 py-0.5 rounded-full bg-terminal-surface-hover border border-terminal-border-subtle",children:[l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("circle",{cx:"12",cy:"12",r:"10"}),l.jsx("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),l.jsx("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]}),"Public"]})]}),l.jsx("p",{className:"text-[11px] font-mono text-terminal-dim leading-relaxed",children:"Publish as a public GitHub Gist. Anyone with the link can view the interactive replay on vibe-replay.com."})]}),$&&l.jsxs("div",{className:"mt-4 space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-mono font-semibold text-terminal-green px-2 py-0.5 rounded-full bg-terminal-green-subtle",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-green"}),"Published"]}),l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:hv($.updatedAt)})]}),l.jsxs("div",{className:"flex items-center gap-2 bg-terminal-bg rounded-lg px-3 py-2 border border-terminal-border-subtle",children:[l.jsx("a",{href:$.viewerUrl,target:"_blank",rel:"noopener noreferrer",className:"flex-1 text-xs font-mono text-terminal-blue hover:text-terminal-text transition-colors truncate",children:$.viewerUrl}),l.jsx(Gp,{text:$.viewerUrl})]}),l.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono text-terminal-dim",children:[l.jsx("span",{children:"Gist:"}),l.jsx("a",{href:$.gistUrl,target:"_blank",rel:"noopener noreferrer",className:"text-terminal-dim hover:text-terminal-text transition-colors truncate",children:$.gistUrl})]})]}),Y&&!$&&l.jsx("div",{className:"mt-4 text-[11px] font-mono text-terminal-dimmer animate-pulse",children:"Checking publish status..."}),l.jsx("div",{className:"mt-4 flex items-center gap-3",children:k?l.jsxs("div",{className:"flex-1 text-xs font-mono text-terminal-orange px-3 py-2 rounded-lg bg-terminal-orange-subtle/50 border border-terminal-orange/10",children:["Requires"," ",l.jsx("a",{href:"https://cli.github.com/",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"gh CLI"})," ","— install then run"," ",l.jsx("span",{className:"text-terminal-text font-semibold",children:"gh auth login"})]}):_===null?l.jsx("div",{className:"text-[11px] font-mono text-terminal-dimmer animate-pulse",children:"Checking gh CLI..."}):l.jsxs(l.Fragment,{children:[l.jsx("button",{onClick:ne,disabled:j,className:`${O} ${$?"bg-terminal-surface-hover text-terminal-purple hover:bg-terminal-purple-subtle border border-terminal-border":"bg-terminal-purple-subtle text-terminal-purple hover:bg-[rgba(168,85,247,0.25)] border border-[rgba(168,85,247,0.2)]"}`,children:j?"Publishing...":$?"Update Gist":"Publish to Gist"}),A&&l.jsx("span",{className:`text-[11px] font-mono ${A.type==="success"?"text-terminal-green":"text-terminal-red"}`,children:A.text})]})})]})})]}),l.jsxs("div",{children:[l.jsx($p,{title:"Export",color:"text-terminal-green"}),l.jsxs("div",{className:"space-y-4",children:[w&&b&&l.jsxs(l.Fragment,{children:[te?.svgContent&&l.jsxs("div",{className:"bg-terminal-surface rounded-2xl border border-terminal-border-subtle shadow-layer-sm overflow-hidden",children:[l.jsx("div",{className:"px-5 py-3 flex items-center justify-between border-b border-terminal-border-subtle",children:l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-mono font-semibold text-terminal-orange",children:"Animated SVG"}),l.jsx("p",{className:"text-[10px] font-mono text-terminal-dim mt-0.5",children:"Embed in READMEs, PRs, or anywhere that renders SVG."})]})}),l.jsx("div",{className:"bg-white p-1 [&>svg]:w-full [&>svg]:h-auto [&>svg]:max-h-52 [&>svg]:block",dangerouslySetInnerHTML:{__html:re}}),l.jsxs("div",{className:"px-5 py-3 space-y-1.5 border-t border-terminal-border-subtle",children:[l.jsx(qp,{label:"File",path:te.svgPath}),te.replayUrl&&l.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono text-terminal-dim",children:[l.jsx("span",{className:"text-terminal-dimmer w-8 shrink-0",children:"Link"}),l.jsx("a",{href:te.replayUrl,target:"_blank",rel:"noopener noreferrer",className:"text-terminal-blue hover:text-terminal-text transition-colors truncate",children:te.replayUrl})]}),l.jsxs("p",{className:"text-[10px] font-mono text-terminal-dimmer leading-relaxed pt-1",children:["Usage:"," ",l.jsx("span",{className:"text-terminal-text",children:"![Session](./session-preview.svg)"})]})]})]}),te?.markdown&&l.jsxs("div",{className:"bg-terminal-surface rounded-2xl border border-terminal-border-subtle shadow-layer-sm overflow-hidden",children:[l.jsxs("div",{className:"px-5 py-3 flex items-center justify-between border-b border-terminal-border-subtle",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-mono font-semibold text-terminal-orange",children:"Markdown Summary"}),l.jsx("p",{className:"text-[10px] font-mono text-terminal-dim mt-0.5",children:"Paste into GitHub PRs, issues, or README files."})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Gp,{text:te.markdown,label:"Copy MD"}),l.jsxs("div",{className:"flex items-center h-6 rounded-md overflow-hidden bg-terminal-bg border border-terminal-border-subtle",children:[l.jsx("button",{onClick:()=>z("preview"),className:`h-full px-2.5 text-[10px] font-mono transition-colors ${pe==="preview"?"bg-terminal-orange-subtle text-terminal-orange":"text-terminal-dim hover:text-terminal-text"}`,children:"Preview"}),l.jsx("button",{onClick:()=>z("source"),className:`h-full px-2.5 text-[10px] font-mono transition-colors ${pe==="source"?"bg-terminal-orange-subtle text-terminal-orange":"text-terminal-dim hover:text-terminal-text"}`,children:"Source"})]})]})]}),l.jsx("div",{className:"p-4",children:pe==="preview"?l.jsx("div",{className:"prose-terminal text-xs leading-relaxed bg-terminal-bg rounded-lg border border-terminal-border-subtle p-4 overflow-x-auto",dangerouslySetInnerHTML:{__html:ee}}):l.jsx("pre",{className:"bg-terminal-bg rounded-lg border border-terminal-border-subtle p-3 text-[11px] font-mono text-terminal-dim leading-relaxed overflow-x-auto max-h-72 overflow-y-auto whitespace-pre-wrap",children:te.markdown})}),l.jsx("div",{className:"px-5 py-3 space-y-1.5 border-t border-terminal-border-subtle",children:l.jsx(qp,{label:"File",path:te.mdPath})}),te.warnings&&te.warnings.length>0&&l.jsxs("div",{className:"mx-5 mb-4 text-[11px] font-mono text-terminal-orange px-3 py-2 rounded-lg bg-terminal-orange-subtle/50 border border-terminal-orange/10",children:[l.jsx("div",{className:"font-semibold mb-1",children:"Security warnings"}),te.warnings.map((B,W)=>l.jsx("div",{className:"text-terminal-dim",children:B},W))]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("button",{onClick:ie,disabled:le||N,className:`${O} ${te?"bg-terminal-surface-hover text-terminal-orange hover:bg-terminal-orange-subtle border border-terminal-border":"bg-terminal-orange-subtle text-terminal-orange hover:bg-terminal-orange-emphasis border border-terminal-orange/20"}`,children:le||N?"Generating...":te?"Regenerate SVG + Markdown":"Generate SVG + Markdown"}),ue&&l.jsx("span",{className:"text-[11px] font-mono text-terminal-red",children:ue}),!te&&l.jsx("span",{className:"text-[11px] font-mono text-terminal-dim",children:"Creates an animated SVG preview and a Markdown summary for GitHub"})]})]}),w&&x&&l.jsxs("div",{className:"bg-terminal-surface rounded-2xl border border-terminal-border-subtle shadow-layer-sm p-5",children:[l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-sm font-mono font-semibold text-terminal-green mb-1",children:"HTML Replay"}),l.jsx("p",{className:"text-[11px] font-mono text-terminal-dim leading-relaxed",children:"Self-contained HTML file with zero external requests. Includes all scenes, metadata, and annotations. Share via email, Slack, or host on any static server."})]}),l.jsx("button",{onClick:async()=>{R(null);try{const B=await x();R({type:"success",text:B})}catch(B){R({type:"error",text:B.message})}},disabled:T,className:`${O} bg-terminal-green-subtle text-terminal-green hover:bg-terminal-green-emphasis border border-terminal-green/20`,children:T?"Exporting...":"Export HTML"})]}),S&&l.jsx("div",{className:`mt-3 text-[11px] font-mono ${S.type==="success"?"text-terminal-green":"text-terminal-red"}`,children:S.type==="success"?l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-green shrink-0"}),"Saved to ",S.text]}):S.text})]}),!w&&f&&l.jsx("div",{className:"bg-terminal-surface rounded-2xl border border-terminal-border-subtle shadow-layer-sm p-5",children:l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-sm font-mono font-semibold text-terminal-green mb-1",children:"Save HTML"}),l.jsx("p",{className:"text-[11px] font-mono text-terminal-dim leading-relaxed",children:"Download a self-contained HTML replay file with your comments included."})]}),l.jsx("button",{onClick:m,className:`${O} bg-terminal-green-subtle text-terminal-green hover:bg-terminal-green-emphasis border border-terminal-green/20`,children:"Download HTML"})]})}),l.jsx("div",{className:"bg-terminal-surface rounded-2xl border border-terminal-border-subtle shadow-layer-sm p-5",children:l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-sm font-mono font-semibold text-terminal-blue mb-1",children:"JSON Data"}),l.jsx("p",{className:"text-[11px] font-mono text-terminal-dim leading-relaxed",children:"Raw replay data including all scenes, metadata, and annotations. Useful for backup, re-import, or programmatic analysis."})]}),l.jsx("button",{onClick:g,className:`${O} bg-terminal-blue-subtle text-terminal-blue hover:bg-terminal-blue-emphasis border border-terminal-blue/20`,children:"Download JSON"})]})})]})]})]})})}const gv=[{title:"Playback",items:[{key:"Space",label:"Play / Pause"},{key:"↑ / ↓",label:"Step Back / Forward"},{key:"Home",label:"Reset to Start"},{key:"End / e",label:"Jump to End"}]},{title:"Navigation",items:[{key:"n / p",label:"Next / Prev Turn"},{key:"← / →",label:"Collapse / Expand Item"}]},{title:"Global",items:[{key:"?",label:"Show Keyboard Shortcuts"},{key:"⌘ K",label:"Open Search"},{key:"Esc",label:"Close Modal / Search"}]}];function bv({open:s,onClose:r}){const o=v.useCallback(c=>{(c.key==="Escape"||c.key==="?")&&r()},[r]);return v.useEffect(()=>{if(s)return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[s,o]),s?l.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4 bg-black/60 backdrop-blur-md animate-in fade-in duration-300",onClick:r,children:l.jsxs("div",{className:"w-full max-w-lg bg-terminal-bg border border-terminal-border-subtle rounded-2xl shadow-layer-xl overflow-hidden animate-in zoom-in-95 duration-200",onClick:c=>c.stopPropagation(),children:[l.jsxs("div",{className:"px-6 py-5 border-b border-terminal-border-subtle flex items-center justify-between",children:[l.jsx("h2",{className:"text-sm font-sans font-bold uppercase tracking-[0.2em] text-terminal-text",children:"Keyboard Shortcuts"}),l.jsx("button",{onClick:r,className:"text-terminal-dimmer hover:text-terminal-red transition-colors",children:l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),l.jsx("div",{className:"px-6 py-4 grid grid-cols-1 gap-8",children:gv.map(c=>l.jsxs("div",{className:"space-y-3.5",children:[l.jsx("h3",{className:"text-[10px] font-sans font-bold text-terminal-dimmer uppercase tracking-[0.15em] pl-1",children:c.title}),l.jsx("div",{className:"grid grid-cols-1 gap-2.5",children:c.items.map(d=>l.jsxs("div",{className:"flex items-center justify-between group",children:[l.jsx("span",{className:"text-xs font-sans font-medium text-terminal-dim group-hover:text-terminal-text transition-colors",children:d.label}),l.jsx("kbd",{className:"min-w-[40px] px-2 py-1 flex items-center justify-center text-[11px] font-mono font-bold text-terminal-text bg-terminal-surface border border-terminal-border-subtle rounded-lg shadow-layer-sm",children:d.key})]},d.key))})]},c.title))}),l.jsx("div",{className:"px-6 py-4 bg-terminal-surface/30 border-t border-terminal-border-subtle",children:l.jsxs("p",{className:"text-[10px] font-sans font-medium text-terminal-dimmer text-center uppercase tracking-wider",children:["Press ",l.jsx("span",{className:"text-terminal-text font-mono font-bold",children:"?"})," to toggle this menu anytime"]})})]})}):null}function yv({session:s,onStart:r}){const{meta:o,scenes:c}=s,d=v.useMemo(()=>{const b=c.find(j=>j.type==="user-prompt");return!b||b.type!=="user-prompt"?null:b.content.length>300?`${b.content.slice(0,300)}...`:b.content},[c]),f=v.useMemo(()=>{const b=new Map;let j=0;const T=new Set;for(const N of c)N.type==="tool-call"&&(b.set(N.toolName,(b.get(N.toolName)||0)+1),N.diff&&!T.has(N.diff.filePath)&&(T.add(N.diff.filePath),j++));return{toolCounts:b,filesModified:j}},[c]),m=oa(o.stats.durationMs),g=o.title||o.project,h=v.useRef(!1),x=v.useRef(0);return v.useEffect(()=>{const b=N=>{h.current||N.deltaY>0&&(h.current=!0,r(!1))},j=N=>{x.current=N.touches[0].clientY},T=N=>{if(h.current)return;x.current-N.touches[0].clientY>15&&(h.current=!0,r(!1))};return window.addEventListener("wheel",b,{passive:!0}),window.addEventListener("touchstart",j,{passive:!0}),window.addEventListener("touchmove",T,{passive:!0}),()=>{window.removeEventListener("wheel",b),window.removeEventListener("touchstart",j),window.removeEventListener("touchmove",T)}},[r]),v.useEffect(()=>{const b=j=>{(j.key===" "||j.key==="Enter"||j.key==="ArrowDown"||j.key==="ArrowRight")&&(j.preventDefault(),r())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[r]),l.jsxs("div",{className:"flex-1 flex flex-col items-center overflow-y-auto relative",children:[l.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-terminal-green-subtle via-transparent to-transparent"}),l.jsx("div",{className:"absolute inset-0 bg-dot-grid"})]}),l.jsx("div",{className:"flex-1 min-h-0"}),l.jsxs("div",{className:"max-w-2xl w-full px-8 text-center space-y-6 md:space-y-10 z-10 shrink-0",children:[l.jsxs("div",{className:"space-y-4 md:space-y-5",children:[l.jsx("a",{href:"https://vibe-replay.com",target:"_blank",rel:"noopener noreferrer",className:"inline-block text-sm font-sans font-semibold uppercase tracking-widest hover:opacity-80 transition-opacity bg-gradient-to-r from-[#3fb950] to-[#79b8ff] bg-clip-text text-transparent",children:"vibe-replay"}),l.jsx("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-sans font-bold text-terminal-text leading-[1.15] tracking-tight",children:g}),o.title&&o.project!==o.title&&l.jsx("div",{className:"text-sm font-mono text-terminal-dim",children:o.project})]}),l.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 max-w-lg mx-auto",children:[l.jsx(bl,{label:"Turns",value:o.stats.userPrompts,color:"text-terminal-green"}),l.jsx(bl,{label:"Tool Calls",value:o.stats.toolCalls,color:"text-terminal-orange"}),m?l.jsx(bl,{label:"Duration",value:m,color:"text-terminal-text"}):l.jsx(bl,{label:"Files",value:f.filesModified,color:"text-terminal-blue"}),o.stats.costEstimate!==void 0?l.jsx(bl,{label:"Cost",value:`$${o.stats.costEstimate<.01?o.stats.costEstimate.toFixed(4):o.stats.costEstimate.toFixed(2)}`,color:"text-terminal-green"}):l.jsx(bl,{label:"Scenes",value:o.stats.sceneCount,color:"text-terminal-text"})]}),l.jsxs("div",{className:"flex items-center justify-center gap-3 text-xs font-mono text-terminal-dimmer",children:[o.model&&l.jsx("span",{children:o.model}),o.model&&l.jsx("span",{className:"text-terminal-border",children:"|"}),l.jsx("span",{children:o.provider})]}),l.jsxs("button",{onClick:()=>r(),className:"group inline-flex items-center gap-3 px-10 py-4 rounded-xl bg-terminal-green-subtle hover:bg-terminal-green-emphasis transition-all duration-200 ease-material shadow-layer-md hover:shadow-layer-lg hover:-translate-y-0.5 landing-pulse",children:[l.jsx("span",{className:"text-xl text-terminal-green group-hover:scale-110 transition-transform duration-200",children:"▶"}),l.jsx("span",{className:"text-base font-sans font-semibold text-terminal-green tracking-wide",children:"Start Replay"})]})]}),d&&l.jsx("div",{className:"w-full px-8 mt-8 md:mt-12 pb-6 z-10 shrink-0",children:l.jsxs("div",{onClick:()=>r(),className:"max-w-2xl mx-auto cursor-pointer group",children:[l.jsx("div",{className:"text-xs font-sans text-terminal-dimmer uppercase tracking-widest mb-3 text-center font-medium",children:"First message"}),l.jsxs("div",{className:"rounded-xl bg-terminal-green-subtle px-5 py-4 group-hover:bg-terminal-green-emphasis transition-all duration-200 ease-material shadow-layer-sm hover-lift",children:[l.jsx("div",{className:"text-xs font-sans font-semibold text-terminal-green uppercase tracking-widest mb-2",children:"You"}),l.jsx("div",{className:"text-sm font-mono text-terminal-dim line-clamp-3 whitespace-pre-wrap leading-relaxed",children:d})]}),l.jsxs("div",{className:"text-center mt-4 text-terminal-dimmer text-xs font-mono animate-bounce uppercase tracking-wider",children:["↓"," press down or scroll to explore"]})]})}),l.jsx("div",{className:"px-8 py-5 z-10 shrink-0",children:l.jsxs("a",{href:"https://vibe-replay.com/explore",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-xs font-sans font-medium text-terminal-dim hover:text-terminal-text transition-colors",children:["Explore more replays",l.jsx("span",{className:"text-terminal-green",children:"→"})]})}),l.jsx("div",{className:"flex-1 min-h-0"})]})}function bl({label:s,value:r,color:o}){return l.jsxs("div",{className:"bg-terminal-surface rounded-xl px-3 py-3 shadow-layer-sm",children:[l.jsx("div",{className:`text-xl font-bold font-mono tabular-nums ${o}`,children:r}),l.jsx("div",{className:"text-[10px] font-sans text-terminal-dimmer uppercase tracking-widest font-medium mt-0.5",children:s})]})}function Yp({scenes:s,currentIndex:r,onSeek:o,overlayActions:c}){const d=v.useMemo(()=>{const m=[];let g=null,h=0;return s.forEach((x,b)=>{if(x.type==="user-prompt"){g&&(g.endIndex=b-1,m.push(g)),h++;const T=c?.getEffectiveContent(b)??x.content;g={kind:"turn",turnNumber:h,promptIndex:b,prompt:T.replace(/\n/g," ").slice(0,120),toolCalls:0,toolNames:[],thinkingBlocks:0,textBlocks:0,endIndex:b}}else x.type==="compaction-summary"?(g&&(g.endIndex=b-1,m.push(g),g=null),m.push({kind:"compaction",promptIndex:b,preview:x.content.replace(/\n/g," ").slice(0,80)})):g&&(g.endIndex=b,x.type==="tool-call"?(g.toolCalls++,g.toolNames.includes(x.toolName)||g.toolNames.push(x.toolName)):x.type==="thinking"?g.thinkingBlocks++:x.type==="text-response"&&g.textBlocks++)}),g&&m.push(g),m},[s,c?.getEffectiveContent]),f=v.useMemo(()=>{for(let m=d.length-1;m>=0;m--)if(r>=d[m].promptIndex)return m;return-1},[d,r]);return l.jsx("div",{className:"flex flex-col gap-1 p-3.5 overflow-y-auto",children:d.map((m,g)=>{const h=g===f,x=g<f;return m.kind==="compaction"?l.jsx("button",{onClick:()=>o(m.promptIndex),className:`text-left px-3 py-2 rounded-lg transition-all duration-200 ease-material ${h?"bg-terminal-surface border-l-2 border-terminal-dim shadow-layer-sm":"hover:bg-terminal-surface-hover text-terminal-dimmer hover:text-terminal-dim"}`,children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-xs font-mono text-terminal-dimmer shrink-0",children:"⟳"}),l.jsx("span",{className:"text-xs font-mono text-terminal-dimmer italic truncate",children:"Context compacted"})]})},`c-${m.promptIndex}`):l.jsxs("button",{onClick:()=>o(m.promptIndex),className:`group text-left px-3 py-2.5 rounded-xl transition-all duration-200 ease-material ${h?"bg-terminal-green-subtle border-l-2 border-terminal-green shadow-layer-sm":x?"hover:bg-terminal-surface-hover text-terminal-dim hover:text-terminal-text":"hover:bg-terminal-surface-hover"}`,children:[l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx("span",{className:`text-xs font-mono font-semibold shrink-0 mt-px tabular-nums ${h?"text-terminal-green":"text-terminal-dim"}`,children:String(m.turnNumber).padStart(2,"0")}),l.jsx("span",{className:"text-sm font-mono leading-snug line-clamp-2 text-terminal-text",children:m.prompt})]}),l.jsxs("div",{className:"flex items-center gap-2 mt-1.5 ml-6 flex-wrap",children:[m.toolCalls>0&&l.jsxs("span",{className:"text-[10px] font-mono px-1.5 py-px rounded-full bg-terminal-orange-subtle text-terminal-orange",children:[m.toolCalls," tool",m.toolCalls>1?"s":""]}),m.textBlocks>0&&l.jsxs("span",{className:"text-[10px] font-mono px-1.5 py-px rounded-full bg-terminal-blue-subtle text-terminal-blue",children:[m.textBlocks," resp"]}),m.thinkingBlocks>0&&l.jsx("span",{className:"text-[10px] font-mono px-1.5 py-px rounded-full bg-terminal-purple-subtle text-terminal-purple",children:"think"})]}),h&&m.toolNames.length>0&&l.jsx("div",{className:"mt-1.5 ml-6 text-xs font-mono text-terminal-dim truncate",children:m.toolNames.join(", ")})]},`t-${m.promptIndex}`)})})}function vv(s){switch(s.type){case"user-prompt":return s.content;case"compaction-summary":return s.content;case"thinking":return s.content;case"text-response":return s.content;case"tool-call":return[s.toolName,JSON.stringify(s.input),s.result||"",s.bashOutput?.command||"",s.bashOutput?.stdout||""].join(" ");default:return""}}function jv(s,r){const o=s.toLowerCase().indexOf(r.toLowerCase());if(o===-1)return s.slice(0,120);const c=Math.max(0,o-40),d=Math.min(s.length,o+r.length+60);return(c>0?"...":"")+s.slice(c,d)+(d<s.length?"...":"")}const wv={"user-prompt":"User","compaction-summary":"Compaction",thinking:"Thinking","text-response":"Response","tool-call":"Tool"},Sv={"user-prompt":"text-terminal-green","compaction-summary":"text-terminal-dim",thinking:"text-terminal-purple","text-response":"text-terminal-blue","tool-call":"text-terminal-orange"};function Nv({scenes:s,open:r,onClose:o,onSeek:c}){const[d,f]=v.useState(""),[m,g]=v.useState(0),h=v.useRef(null),x=v.useRef(null);v.useEffect(()=>{r&&(f(""),g(0),setTimeout(()=>h.current?.focus(),50))},[r]);const b=v.useMemo(()=>{if(d.length<2)return[];const N=d.toLowerCase(),w=[];for(let S=0;S<s.length;S++){const R=s[S],A=vv(R);if(A.toLowerCase().includes(N)&&w.push({sceneIndex:S,type:R.type,snippet:jv(A,d),toolName:R.type==="tool-call"?R.toolName:void 0}),w.length>=50)break}return w},[s,d]);v.useEffect(()=>g(0),[]),v.useEffect(()=>{if(!x.current)return;x.current.children[m]?.scrollIntoView({block:"nearest"})},[m]);const j=v.useCallback(N=>{const w=b[N];w&&(c(w.sceneIndex),o())},[b,c,o]),T=v.useCallback(N=>{N.key==="ArrowDown"?(N.preventDefault(),g(w=>Math.min(w+1,b.length-1))):N.key==="ArrowUp"?(N.preventDefault(),g(w=>Math.max(w-1,0))):N.key==="Enter"?(N.preventDefault(),j(m)):N.key==="Escape"&&o()},[b.length,m,j,o]);return r?l.jsxs("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-[8vh] sm:pt-[15vh]",onClick:o,children:[l.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),l.jsxs("div",{className:"relative w-full max-w-xl mx-3 sm:mx-0 bg-terminal-bg border border-terminal-border-subtle rounded-2xl shadow-layer-xl overflow-hidden",onClick:N=>N.stopPropagation(),onKeyDown:T,children:[l.jsxs("div",{className:"flex items-center gap-3 px-5 py-3.5 border-b border-terminal-border-subtle",children:[l.jsx("span",{className:"text-terminal-dim text-sm",children:"🔍"}),l.jsx("input",{ref:h,type:"text",value:d,onChange:N=>f(N.target.value),placeholder:"Search scenes...",className:"flex-1 bg-transparent text-sm font-sans font-medium text-terminal-text placeholder-terminal-dim outline-none"}),l.jsx("kbd",{className:"text-[10px] font-mono text-terminal-dimmer bg-terminal-surface px-2 py-0.5 rounded-md",children:"ESC"})]}),l.jsx("div",{ref:x,className:"max-h-[50vh] overflow-y-auto",children:d.length<2?l.jsx("div",{className:"px-4 py-8 text-center text-xs font-sans font-medium text-terminal-dim",children:"Type at least 2 characters to search"}):b.length===0?l.jsxs("div",{className:"px-4 py-8 text-center text-xs font-sans font-medium text-terminal-dim",children:['No results for "',d,'"']}):b.map((N,w)=>l.jsxs("button",{onClick:()=>j(w),className:`w-full text-left px-4 py-2.5 flex items-start gap-3 transition-colors ${w===m?"bg-terminal-green/10":"hover:bg-terminal-surface/50"}`,children:[l.jsx("span",{className:`text-[10px] font-sans font-bold uppercase shrink-0 mt-0.5 tracking-wider ${Sv[N.type]||"text-terminal-dim"}`,children:N.toolName||wv[N.type]||N.type}),l.jsx("span",{className:"text-xs font-mono text-terminal-text line-clamp-2 break-words",children:kv(N.snippet,d)}),l.jsxs("span",{className:"text-xs font-mono text-terminal-dimmer shrink-0 mt-0.5",children:["#",N.sceneIndex]})]},N.sceneIndex))}),b.length>0&&l.jsxs("div",{className:"px-4 py-2 border-t border-terminal-border-subtle text-[10px] font-sans font-bold uppercase tracking-wider text-terminal-dimmer flex gap-4",children:[l.jsxs("span",{children:[b.length," result",b.length!==1?"s":""]}),l.jsx("span",{children:"↑↓ navigate"}),l.jsx("span",{children:"↵ select"})]})]})]}):null}function kv(s,r){if(!r)return s;const o=[],c=s.toLowerCase(),d=r.toLowerCase();let f=0,m=c.indexOf(d);for(;m!==-1;)m>f&&o.push(s.slice(f,m)),o.push(l.jsx("mark",{className:"bg-terminal-green/30 text-terminal-green rounded-sm px-0.5",children:s.slice(m,m+r.length)},m)),f=m+r.length,m=c.indexOf(d,f);return f<s.length&&o.push(s.slice(f)),o}function Ev(s){const r=s.toLowerCase();return/\b(test|jest|vitest|pytest|cargo\s+test|mocha|spec)\b/.test(r)?"test":/\b(build|compile|tsc|webpack|vite\s+build|rollup)\b/.test(r)?"build":r.trimStart().startsWith("git ")?"git":/\b(lint|biome|eslint|prettier|format)\b/.test(r)?"lint":"other"}function kh(s){const[r,o]=v.useState(null),c=v.useRef(null),d=v.useCallback(m=>{const g=c.current;if(!g||s<=1)return;const h=g.getBoundingClientRect(),x=(m.clientX-h.left)/h.width,b=Math.round(x*(s-1));o(Math.max(0,Math.min(s-1,b)))},[s]),f=v.useCallback(()=>o(null),[]);return{hovered:r,ref:c,onMouseMove:d,onMouseLeave:f}}function Tv(s){const r=[...s.dataSourceInfo?.notes||[]];return s.provider==="cursor"&&(s.dataSource==="sqlite"||s.dataSource==="global-state")&&r.unshift("Some Cursor metrics are estimates and may be incomplete for this session."),s.stats.tokenUsage||r.push("Token and cost metrics may be unavailable."),[...new Set(r)]}function Zp({session:s}){const{meta:r,scenes:o}=s,c=v.useMemo(()=>Tv(r),[r]),d=v.useMemo(()=>{const g=[];let h=0,x=0;const b=new Map,j=ue=>{let P=b.get(ue);return P||(P={path:ue,editCount:0,readCount:0,linesAdded:0,linesRemoved:0,turnEdits:new Map},b.set(ue,P)),P},T=new Map,N=new Map;let w=0,S=0,R=0,A=0;const E=()=>{if(g.length>0){const ue=g[g.length-1];ue.toolCount=h,ue.errorCount=x}};for(let ue=0;ue<o.length;ue++){const P=o[ue];switch(P.type){case"user-prompt":{E(),h=0,x=0,R+=P.content.length;const pe=P.content.split(`
145
- `).find(z=>z.trim())||"";g.push({index:g.length+1,text:pe.slice(0,120),sceneIndex:ue,toolCount:0,errorCount:0});break}case"thinking":w+=P.content.length;break;case"text-response":S+=P.content.length;break;case"tool-call":{h++;const pe=P.toolName;if(T.set(pe,(T.get(pe)||0)+1),pe==="Read"){const z=P.input?.file_path;z&&j(z).readCount++}else if(pe==="Edit"||pe==="Write"){if(P.diff){const z=j(P.diff.filePath);z.editCount++;const ne=g.length;z.turnEdits.set(ne,(z.turnEdits.get(ne)||0)+1);const ie=P.diff.oldContent?P.diff.oldContent.split(`
146
- `).length:0,ee=P.diff.newContent?P.diff.newContent.split(`
147
- `).length:0;z.linesAdded+=Math.max(0,ee-ie),z.linesRemoved+=Math.max(0,ie-ee)}}else if(pe==="Bash"){if(P.bashOutput){const z=Ev(P.bashOutput.command);N.set(z,(N.get(z)||0)+1)}if(P.isError)x++,A++;else if(!("isError"in P)){const z=P.result?.slice(0,500).toLowerCase()||"";/\b(error|fail|exception|errno)\b/.test(z)&&(x++,A++)}}break}}}E();const _=[...b.values()],D=_.filter(ue=>ue.editCount>0).sort((ue,P)=>P.editCount-ue.editCount),$=_.filter(ue=>ue.editCount===0&&ue.readCount>0).sort((ue,P)=>P.readCount-ue.readCount),ae=[...T.entries()].sort((ue,P)=>P[1]-ue[1]).slice(0,8),Y=[...N.entries()].sort((ue,P)=>P[1]-ue[1]),se=[...T.values()].reduce((ue,P)=>ue+P,0),te=(T.get("Read")||0)+(T.get("Grep")||0)+(T.get("Glob")||0),Q=(T.get("Edit")||0)+(T.get("Write")||0),le=T.get("Bash")||0,oe={read:te,write:Q,execute:le,other:se-te-Q-le};return{totalScenes:o.length,userPrompts:r.stats.userPrompts,toolCalls:r.stats.toolCalls,thinkingChars:w,responseChars:S,promptChars:R,durationMs:r.stats.durationMs,tokenUsage:r.stats.tokenUsage,costEstimate:r.stats.costEstimate,turns:g,editedFiles:D,readOnlyFiles:$,topTools:ae,bashCats:Y,activityDist:oe,totalTools:se,totalBashErrors:A}},[o,r]),f=r.stats.turnStats&&r.stats.turnStats.length>1,m=v.useMemo(()=>d.turns.map(g=>g.text.slice(0,60)+(g.text.length>60?"…":"")),[d.turns]);return l.jsx("div",{className:"flex-1 overflow-y-auto",children:l.jsxs("div",{className:"p-6 space-y-6 max-w-4xl mx-auto",children:[l.jsxs("div",{className:"flex items-center gap-2.5",children:[l.jsx("h2",{className:"text-sm font-mono font-semibold text-terminal-text truncate",children:r.title||r.slug}),r.provider&&l.jsx("span",{className:"shrink-0 text-[10px] font-mono text-terminal-dimmer px-1.5 py-0.5 rounded bg-terminal-surface border border-terminal-border-subtle",children:r.provider})]}),c.length>0&&l.jsxs("div",{className:"rounded border border-terminal-orange/40 bg-terminal-orange/10 px-3 py-2",children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-orange uppercase tracking-widest mb-1",children:"Data Quality"}),l.jsx("div",{className:"space-y-0.5",children:c.slice(0,4).map(g=>l.jsx("div",{className:"text-xs font-mono text-terminal-dim",children:g},g))})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-3",children:"Overview"}),l.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[l.jsx(yl,{label:"Turns",value:d.userPrompts,color:"text-terminal-green"}),l.jsx(yl,{label:"Tool Calls",value:d.toolCalls,color:"text-terminal-orange"}),l.jsx(yl,{label:"Files Modified",value:d.editedFiles.length,color:"text-terminal-blue"}),l.jsx(yl,{label:"Scenes",value:d.totalScenes,color:"text-terminal-text"})]}),l.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 mt-3 text-xs font-mono text-terminal-dim",children:[r.model&&l.jsxs("div",{children:["Model: ",l.jsx("span",{className:"text-terminal-text font-semibold",children:r.model})]}),d.durationMs&&l.jsxs("div",{children:["Duration:"," ",l.jsx("span",{className:"text-terminal-text",children:oa(d.durationMs)})]}),d.costEstimate!==void 0&&l.jsxs("div",{children:["Cost:"," ",l.jsxs("span",{className:"text-terminal-green",children:["$",d.costEstimate<.01?d.costEstimate.toFixed(4):d.costEstimate.toFixed(2)]}),l.jsx("span",{className:"text-terminal-dimmer",children:" (est.)"})]}),d.tokenUsage&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:["In:"," ",l.jsx("span",{className:"text-terminal-blue",children:kt(d.tokenUsage.inputTokens)})," / ","Out:"," ",l.jsx("span",{className:"text-terminal-green",children:kt(d.tokenUsage.outputTokens)})]}),l.jsxs("div",{children:["Cache:"," ",l.jsx("span",{className:"text-terminal-purple",children:kt(d.tokenUsage.cacheReadTokens)})," ","read /"," ",l.jsx("span",{className:"text-terminal-orange",children:kt(d.tokenUsage.cacheCreationTokens)})," ","created"]})]})]})]}),f&&l.jsxs("div",{className:"space-y-5",children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest",children:"Per-Turn Metrics"}),l.jsx(Av,{turnStats:r.stats.turnStats,costEstimate:r.stats.costEstimate,turnLabels:m}),l.jsx(Rv,{turnStats:r.stats.turnStats,contextLimit:r.contextLimit,turnLabels:m}),r.stats.turnStats.some(g=>g.durationMs)&&l.jsx(_v,{turnStats:r.stats.turnStats,turnLabels:m})]}),r.tokenUsageByModel&&Object.keys(r.tokenUsageByModel).length>1&&l.jsx(Ov,{tokenUsageByModel:r.tokenUsageByModel}),r.prLinks&&r.prLinks.length>0&&l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-2",children:"Pull Requests"}),l.jsx("div",{className:"space-y-1",children:r.prLinks.map(g=>l.jsxs("a",{href:g.prUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-xs font-mono text-terminal-blue hover:underline px-2 py-1 rounded hover:bg-terminal-surface-hover transition-colors",children:[l.jsxs("span",{className:"text-terminal-green",children:["#",g.prNumber]}),g.prRepository&&l.jsx("span",{className:"text-terminal-dimmer truncate",children:g.prRepository})]},g.prUrl))})]}),d.turns.length>0&&l.jsx(Mv,{turns:d.turns,turnStats:r.stats.turnStats}),(d.editedFiles.length>0||d.readOnlyFiles.length>0)&&l.jsx(Dv,{editedFiles:d.editedFiles,readOnlyFiles:d.readOnlyFiles}),d.totalTools>0&&l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-2",children:"Activity Distribution"}),l.jsx("div",{className:"space-y-1.5",children:[["Read/Search",d.activityDist.read,"--blue"],["Write/Edit",d.activityDist.write,"--green"],["Execute",d.activityDist.execute,"--purple"],["Other",d.activityDist.other,"--dim"]].filter(([,g])=>g>0).map(([g,h,x])=>l.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono",children:[l.jsx("span",{className:"text-terminal-text shrink-0 w-24 text-right",children:g}),l.jsx("div",{className:"flex-1 h-2 rounded-full bg-terminal-surface overflow-hidden",children:l.jsx("div",{className:"h-full rounded-full",style:{width:`${h/d.totalTools*100}%`,backgroundColor:`var(${x})`}})}),l.jsxs("span",{className:"text-terminal-dim shrink-0 w-16 text-right tabular-nums",children:[h," (",Math.round(h/d.totalTools*100),"%)"]})]},g))})]}),d.bashCats.length>1&&l.jsxs("div",{children:[l.jsxs("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-2",children:["Bash Commands",d.totalBashErrors>0&&l.jsxs("span",{className:"text-terminal-red ml-2 normal-case tracking-normal",children:[d.totalBashErrors," error",d.totalBashErrors!==1?"s":""]})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:d.bashCats.map(([g,h])=>l.jsxs("span",{className:"text-xs font-mono text-terminal-dim bg-terminal-surface rounded px-2 py-1",children:[g," ",l.jsx("span",{className:"text-terminal-text tabular-nums",children:h})]},g))})]}),d.topTools.length>0&&l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-2",children:"Top Tools"}),l.jsx("div",{className:"space-y-1.5",children:d.topTools.map(([g,h])=>l.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono",children:[l.jsx("span",{className:"text-terminal-text shrink-0 w-24 text-right truncate",children:g}),l.jsx("div",{className:"flex-1 h-2 rounded-full bg-terminal-surface overflow-hidden",children:l.jsx("div",{className:"h-full rounded-full bg-terminal-orange",style:{width:`${h/d.topTools[0][1]*100}%`}})}),l.jsx("span",{className:"text-terminal-dim shrink-0 w-6 text-right tabular-nums",children:h})]},g))})]})]})})}function ru({children:s,visible:r,x:o}){if(!r)return null;const c=o>.7;return l.jsx("div",{className:"absolute top-1 pointer-events-none z-10",style:{left:c?void 0:`${o*100}%`,right:c?`${(1-o)*100}%`:void 0},children:l.jsx("div",{className:`bg-terminal-surface border border-terminal-border-subtle rounded px-2 py-1 text-[10px] font-mono text-terminal-text shadow-md whitespace-nowrap ${c?"text-right":""}`,children:s})})}function Av({turnStats:s,costEstimate:r,turnLabels:o}){const c=[];let d=0;for(const S of s)d+=S.tokenUsage?.outputTokens||0,c.push(d);const f=c.length,{hovered:m,ref:g,onMouseMove:h,onMouseLeave:x}=kh(f);if(d===0)return null;const b=c[c.length-1],j=60,T=100,N=c.map((S,R)=>{const A=f===1?T/2:R/(f-1)*T,E=j-S/b*(j-6)-3;return`${A},${E}`}),w=m!==null?f===1?.5:m/(f-1):0;return l.jsxs("div",{children:[l.jsxs("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-1",children:["Token Burn",r?" & Cost":""]}),l.jsxs("div",{className:"relative",children:[l.jsxs("svg",{ref:g,viewBox:`0 0 ${T} ${j}`,preserveAspectRatio:"none",className:"w-full h-20",onMouseMove:h,onMouseLeave:x,children:[l.jsx("polygon",{points:`0,${j} ${N.join(" ")} ${T},${j}`,style:{fill:"var(--green-subtle)"}}),l.jsx("polyline",{points:N.join(" "),fill:"none",style:{stroke:"var(--green)"},strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"}),m!==null&&l.jsx("line",{x1:w*T,y1:"0",x2:w*T,y2:j,stroke:"var(--dim)",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke",opacity:"0.5"})]}),l.jsx(ru,{visible:m!==null,x:w,children:m!==null&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-terminal-green",children:["Turn ",m+1]}),o?.[m]&&l.jsx("div",{className:"text-terminal-dim truncate max-w-[200px]",children:o[m]}),l.jsxs("div",{children:["cumulative: ",kt(c[m])," tokens"]}),s[m]?.tokenUsage&&l.jsxs("div",{className:"text-terminal-dimmer",children:["this turn: +",kt(s[m].tokenUsage.outputTokens)," out"]})]})})]}),l.jsxs("div",{className:"flex justify-between text-[10px] font-mono text-terminal-dimmer mt-0.5",children:[l.jsx("span",{children:"Turn 1"}),l.jsxs("span",{children:[kt(b)," tokens",r?` ($${r<1?r.toFixed(2):r.toFixed(0)})`:""]}),l.jsxs("span",{children:["Turn ",f]})]}),s.some(S=>S.tokenUsage?.cacheReadTokens)&&l.jsx(Cv,{turnStats:s})]})}function Cv({turnStats:s}){const r=s.map(m=>{const g=m.tokenUsage;if(!g)return 0;const h=(g.cacheReadTokens||0)+(g.inputTokens||0);return h>0?g.cacheReadTokens/h:0}),o=24,c=100,d=r.map((m,g)=>{const h=r.length===1?c/2:g/(r.length-1)*c,x=o-m*(o-4)-2;return`${h},${x}`}),f=r.reduce((m,g)=>m+g,0)/r.length;return l.jsxs("div",{className:"mt-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:"Cache Hit Rate"}),l.jsxs("span",{className:"text-[10px] font-mono text-terminal-purple",children:["avg ",Math.round(f*100),"%"]})]}),l.jsx("svg",{viewBox:`0 0 ${c} ${o}`,preserveAspectRatio:"none",className:"w-full h-6",children:l.jsx("polyline",{points:d.join(" "),fill:"none",style:{stroke:"var(--purple)"},strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})})]})}function Rv({turnStats:s,contextLimit:r,turnLabels:o}){const c=s.map(A=>A.contextTokens||0),d=c.length,{hovered:f,ref:m,onMouseMove:g,onMouseLeave:h}=kh(d);if(!c.some(A=>A>0))return null;const x=Math.max(...c),b=r?Math.max(x,r):x,j=60,T=100,N=c.map((A,E)=>{const _=d===1?T/2:E/(d-1)*T,D=j-A/b*(j-6)-3;return`${_},${D}`}),w=r?j-r/b*(j-6)-3:void 0,S=[];for(let A=0;A<c.length-1;A++){const E=c[A],_=c[A+1];E>0&&_>0&&_<E*.5&&S.push(A)}const R=f!==null?d===1?.5:f/(d-1):0;return l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-1",children:"Context Window Usage"}),l.jsxs("div",{className:"relative",children:[l.jsxs("svg",{ref:m,viewBox:`0 0 ${T} ${j}`,preserveAspectRatio:"none",className:"w-full h-20",onMouseMove:g,onMouseLeave:h,children:[w!==void 0&&l.jsx("line",{x1:"0",y1:w,x2:T,y2:w,style:{stroke:"var(--red)"},strokeWidth:"0.5",strokeDasharray:"2,2",vectorEffect:"non-scaling-stroke",opacity:"0.5"}),l.jsx("polygon",{points:`0,${j} ${N.join(" ")} ${T},${j}`,style:{fill:"var(--cyan-subtle)"}}),l.jsx("polyline",{points:N.join(" "),fill:"none",style:{stroke:"var(--cyan)"},strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"}),S.map(A=>{const E=d===1?T/2:A/(d-1)*T;return l.jsx("line",{x1:E,y1:"0",x2:E,y2:j,style:{stroke:"var(--red)"},strokeWidth:"1",strokeDasharray:"2,1",vectorEffect:"non-scaling-stroke",opacity:"0.6"},A)}),f!==null&&l.jsx("line",{x1:R*T,y1:"0",x2:R*T,y2:j,stroke:"var(--dim)",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke",opacity:"0.5"})]}),l.jsx(ru,{visible:f!==null,x:R,children:f!==null&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-terminal-cyan",style:{color:"var(--cyan)"},children:["Turn ",f+1]}),o?.[f]&&l.jsx("div",{className:"text-terminal-dim truncate max-w-[200px]",children:o[f]}),l.jsxs("div",{children:[kt(c[f])," tokens"]}),r&&l.jsxs("div",{className:"text-terminal-dimmer",children:[Math.round(c[f]/r*100),"% of limit"]})]})})]}),l.jsxs("div",{className:"flex justify-between text-[10px] font-mono text-terminal-dimmer mt-0.5",children:[l.jsx("span",{children:"Turn 1"}),l.jsxs("span",{children:["peak ",kt(x),r?` / ${kt(r)} limit`:""]}),l.jsxs("span",{children:["Turn ",d]})]}),S.length>0&&l.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[l.jsx("span",{className:"inline-block w-3 border-t border-dashed",style:{borderColor:"var(--red)"}}),l.jsxs("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:[S.length," compaction",S.length!==1?"s":""]})]})]})}function _v({turnStats:s,turnLabels:r}){const o=s.map(g=>g.durationMs||0),c=Math.max(...o,1),d=o.some(g=>g>0),[f,m]=v.useState(null);return d?l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-1",children:"Turn Duration"}),l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"flex items-end gap-px h-16",onMouseLeave:()=>m(null),children:o.map((g,h)=>{const x=g>0?Math.max(g/c*100,4):0;return l.jsx("div",{className:"flex-1 rounded-t-sm cursor-default",style:{height:`${x}%`,backgroundColor:g>0?"var(--blue)":"var(--surface)",opacity:f===h?1:g>0?.5+g/c*.5:.2},onMouseEnter:()=>m(h)},h)})}),l.jsx(ru,{visible:f!==null,x:f!==null?o.length===1?.5:f/(o.length-1):0,children:f!==null&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-terminal-blue",children:["Turn ",f+1]}),r?.[f]&&l.jsx("div",{className:"text-terminal-dim truncate max-w-[200px]",children:r[f]}),l.jsx("div",{children:o[f]>0?oa(o[f]):"no data"})]})})]}),l.jsxs("div",{className:"flex justify-between text-[10px] font-mono text-terminal-dimmer mt-0.5",children:[l.jsx("span",{children:"Turn 1"}),l.jsxs("span",{children:["max ",oa(c)]}),l.jsxs("span",{children:["Turn ",o.length]})]})]}):null}function Ov({tokenUsageByModel:s}){const r=Object.entries(s).sort((d,f)=>f[1].outputTokens-d[1].outputTokens),o=r.reduce((d,[,f])=>d+f.outputTokens,0);if(o===0)return null;const c=["--green","--blue","--purple","--orange","--red"];return l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-2",children:"Model Breakdown"}),l.jsx("div",{className:"flex h-3 rounded-full overflow-hidden gap-px",children:r.map(([d,f],m)=>{const g=f.outputTokens/o*100;return l.jsx("div",{style:{width:`${g}%`,minWidth:g>2?void 0:"3px",backgroundColor:`var(${c[m%c.length]})`,opacity:.7},title:`${d}: ${kt(f.outputTokens)} output tokens`},d)})}),l.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:r.map(([d,f],m)=>l.jsxs("div",{className:"flex items-center gap-1 text-[10px] font-mono text-terminal-dimmer",children:[l.jsx("div",{className:"w-2 h-2 rounded-sm",style:{backgroundColor:`var(${c[m%c.length]})`,opacity:.7}}),l.jsxs("span",{children:[d," ",kt(f.outputTokens)," (",Math.round(f.outputTokens/o*100),"%)"]})]},d))})]})}const Oc=20;function Mv({turns:s,turnStats:r}){const[o,c]=v.useState(!1),{rows:d,compactionAfter:f}=v.useMemo(()=>{const N=Math.max(...s.map(_=>_.toolCount),1),w=Math.max(...r?.map(_=>_.durationMs||0)||[0],1),S=Math.max(...r?.map(_=>_.contextTokens||0)||[0],1),R=Math.max(...r?.map(_=>_.tokenUsage?.outputTokens||0)||[0],1),A=new Set;if(r)for(let _=0;_<r.length-1;_++){const D=r[_]?.contextTokens||0,$=r[_+1]?.contextTokens||0;D>0&&$>0&&$<D*.5&&A.add(_)}return{rows:s.map((_,D)=>{const $=r?.[D];return{..._,durationMs:$?.durationMs,contextTokens:$?.contextTokens,outputTokens:$?.tokenUsage?.outputTokens,toolRatio:_.toolCount/N,durationRatio:($?.durationMs||0)/w,contextRatio:($?.contextTokens||0)/S,outputRatio:($?.tokenUsage?.outputTokens||0)/R}}),compactionAfter:A}},[s,r]),m=r&&r.length>0,g=m&&r.some(N=>N.durationMs),h=m&&r.some(N=>N.contextTokens),x=m&&r.some(N=>N.tokenUsage),b=3+(g?1:0)+(h?1:0)+(x?1:0),j=d.length>Oc,T=j&&!o?d.slice(0,Oc):d;return l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-2",children:"Per-Turn Breakdown"}),l.jsx("div",{className:"overflow-x-auto rounded border border-terminal-border-subtle",children:l.jsxs("table",{className:"w-full text-[11px] font-mono border-collapse",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-terminal-dimmer text-left",children:[l.jsx("th",{className:"px-2 py-1.5 font-semibold w-7",children:"#"}),l.jsx("th",{className:"px-2 py-1.5 font-semibold",children:"Prompt"}),l.jsx("th",{className:"px-2 py-1.5 font-semibold text-right w-14",children:"Tools"}),g&&l.jsx("th",{className:"px-2 py-1.5 font-semibold text-right w-16",children:"Duration"}),h&&l.jsx("th",{className:"px-2 py-1.5 font-semibold text-right w-16",children:"Context"}),x&&l.jsx("th",{className:"px-2 py-1.5 font-semibold text-right w-14",children:"Output"})]})}),l.jsx("tbody",{children:T.map((N,w)=>l.jsx(zv,{row:N,hasDuration:!!g,hasContext:!!h,hasTokens:!!x,colCount:b,showCompaction:f.has(w)},N.sceneIndex))}),j&&l.jsx("tfoot",{children:l.jsx("tr",{children:l.jsx("td",{colSpan:b,children:l.jsx("button",{type:"button",className:"w-full py-1.5 text-[11px] font-mono text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors",onClick:()=>c(!o),children:o?"▴ Collapse":`▾ Show all ${d.length} turns (${d.length-Oc} more)`})})})})]})})]})}function zv({row:s,hasDuration:r,hasContext:o,hasTokens:c,colCount:d,showCompaction:f}){return l.jsxs(l.Fragment,{children:[l.jsxs("tr",{className:"border-t border-terminal-border-subtle hover:bg-terminal-surface-hover transition-colors",children:[l.jsx("td",{className:"px-2 py-1 text-terminal-green tabular-nums",children:String(s.index).padStart(2,"0")}),l.jsx("td",{className:"px-2 py-1 text-terminal-text max-w-0",children:l.jsxs("div",{className:"truncate",title:s.text,children:[s.text,s.errorCount>0&&l.jsxs("span",{className:"text-terminal-red ml-1.5",children:[s.errorCount," err"]})]})}),l.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:l.jsx(vl,{value:s.toolCount,ratio:s.toolRatio,color:"--orange"})}),r&&l.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:l.jsx(vl,{value:s.durationMs?oa(s.durationMs):"—",ratio:s.durationRatio,color:"--blue"})}),o&&l.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:l.jsx(vl,{value:s.contextTokens?kt(s.contextTokens):"—",ratio:s.contextRatio,color:"--cyan"})}),c&&l.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:l.jsx(vl,{value:s.outputTokens?kt(s.outputTokens):"—",ratio:s.outputRatio,color:"--green"})})]}),f&&l.jsx("tr",{children:l.jsx("td",{colSpan:d,className:"px-0 py-0",children:l.jsxs("div",{className:"flex items-center gap-2 px-2 py-0.5 bg-terminal-red/5",children:[l.jsx("div",{className:"flex-1 border-t border-dashed border-terminal-red/40"}),l.jsx("span",{className:"text-[10px] font-mono text-terminal-red/70 shrink-0",children:"context compacted"}),l.jsx("div",{className:"flex-1 border-t border-dashed border-terminal-red/40"})]})})})]})}function vl({value:s,ratio:r,color:o}){return l.jsx("span",{className:"inline-block w-full px-1 py-0.5 rounded-sm text-terminal-text",style:{backgroundColor:r>0?`color-mix(in srgb, var(${o}) ${Math.round(r*40)}%, transparent)`:void 0},children:s})}const Mc=20;function Dv({editedFiles:s,readOnlyFiles:r}){const[o,c]=v.useState(!1),d=v.useMemo(()=>[...s,...r],[s,r]),f=v.useMemo(()=>Math.max(...d.map(N=>N.editCount),1),[d]),m=v.useMemo(()=>Math.max(...d.map(N=>N.readCount),1),[d]),g=v.useMemo(()=>Math.max(...d.map(N=>N.linesAdded+N.linesRemoved),1),[d]),h=d.some(N=>N.linesAdded>0||N.linesRemoved>0),x=d.some(N=>N.turnEdits.size>0),b=d.length>Mc,j=b&&!o?d.slice(0,Mc):d,T=3+(h?1:0)+(x?1:0);return l.jsxs("div",{children:[l.jsxs("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-2",children:["File Impact",l.jsxs("span",{className:"normal-case tracking-normal ml-1.5",children:["(",s.length," modified",r.length>0&&`, ${r.length} read-only`,")"]})]}),l.jsx("div",{className:"overflow-x-auto rounded border border-terminal-border-subtle",children:l.jsxs("table",{className:"w-full text-[11px] font-mono border-collapse",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-terminal-dimmer text-left",children:[l.jsx("th",{className:"px-2 py-1.5 font-semibold",children:"File"}),l.jsx("th",{className:"px-2 py-1.5 font-semibold text-right w-14",children:"Edits"}),l.jsx("th",{className:"px-2 py-1.5 font-semibold text-right w-14",children:"Reads"}),h&&l.jsx("th",{className:"px-2 py-1.5 font-semibold text-right w-20",children:"+/−"}),x&&l.jsx("th",{className:"px-2 py-1.5 font-semibold text-right w-14",children:"Turns"})]})}),l.jsx("tbody",{children:j.map(N=>{const w=N.path.split("/").pop()||N.path,S=N.editCount>0;return l.jsxs("tr",{className:"border-t border-terminal-border-subtle hover:bg-terminal-surface-hover transition-colors",children:[l.jsx("td",{className:"px-2 py-1 max-w-0",children:l.jsxs("div",{className:`truncate ${S?"text-terminal-text":"text-terminal-dimmer"}`,title:N.path,children:[w,l.jsx("span",{className:"text-terminal-dimmer ml-1",children:N.path.slice(0,N.path.length-w.length-1)})]})}),l.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:N.editCount>0?l.jsx(vl,{value:N.editCount,ratio:N.editCount/f,color:"--orange"}):l.jsx("span",{className:"text-terminal-dimmer",children:"—"})}),l.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:N.readCount>0?l.jsx(vl,{value:N.readCount,ratio:N.readCount/m,color:"--blue"}):l.jsx("span",{className:"text-terminal-dimmer",children:"—"})}),h&&l.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:N.linesAdded>0||N.linesRemoved>0?l.jsxs("span",{className:"inline-block w-full px-1 py-0.5 rounded-sm",style:{backgroundColor:`color-mix(in srgb, var(--green) ${Math.round((N.linesAdded+N.linesRemoved)/g*30)}%, transparent)`},children:[l.jsxs("span",{className:"text-terminal-green",children:["+",N.linesAdded]}),l.jsx("span",{className:"text-terminal-dimmer",children:"/"}),l.jsxs("span",{className:"text-terminal-red",children:["−",N.linesRemoved]})]}):l.jsx("span",{className:"text-terminal-dimmer",children:"—"})}),x&&l.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:N.turnEdits.size>0?l.jsx("span",{className:"text-terminal-dim",children:N.turnEdits.size}):l.jsx("span",{className:"text-terminal-dimmer",children:"—"})})]},N.path)})}),b&&l.jsx("tfoot",{children:l.jsx("tr",{children:l.jsx("td",{colSpan:T,children:l.jsx("button",{type:"button",className:"w-full py-1.5 text-[11px] font-mono text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors",onClick:()=>c(!o),children:o?"▴ Collapse":`▾ Show all ${d.length} files (${d.length-Mc} more)`})})})})]})})]})}function Lv(s){switch(s){case"user-prompt":return"#3fb950";case"compaction-summary":return"#666666";case"thinking":return"#b392f0";case"text-response":return"#79b8ff";case"tool-call":return"#d29922"}}function Bv({scenes:s,currentIndex:r,onSeek:o,annotatedScenes:c}){const d=v.useMemo(()=>{if(s.length<=200)return s.map((T,N)=>({startIndex:N,endIndex:N,type:T.type}));const b=s.length/200,j=[];for(let T=0;T<200;T++){const N=Math.floor(T*b),w=Math.floor((T+1)*b)-1,S={"user-prompt":4,"compaction-summary":1,"tool-call":3,"text-response":2,thinking:1};let R=s[N].type,A=S[R];for(let E=N+1;E<=w&&E<s.length;E++){const _=S[s[E].type];_>A&&(R=s[E].type,A=_)}j.push({startIndex:N,endIndex:w,type:R})}return j},[s]),f=s.length>0?(r+1)/s.length*100:0,m=v.useRef(null),g=v.useCallback(x=>{const b=m.current;if(!b)return;const j=b.getBoundingClientRect(),T=x.clientX-j.left,N=Math.max(0,Math.min(1,T/j.width)),w=Math.floor(N*s.length);o(w)},[s.length,o]),h=v.useMemo(()=>{if(!c||c.size===0)return[];const x=[];return c.forEach(b=>{b>=0&&b<s.length&&x.push((b+.5)/s.length*100)}),x},[c,s.length]);return s.length===0?null:l.jsxs("div",{className:"px-4 pt-3 pb-1 cursor-pointer",onClick:g,children:[h.length>0&&l.jsx("div",{className:"relative h-2 mb-0.5",children:h.map((x,b)=>l.jsx("div",{className:"absolute w-1.5 h-1.5 rounded-full bg-terminal-blue shadow-layer-sm",style:{left:`${x}%`,top:"50%",transform:"translate(-50%, -50%)"}},b))}),l.jsxs("div",{ref:m,className:"relative flex h-2 rounded-full overflow-hidden bg-terminal-surface-2",children:[d.map((x,b)=>l.jsx("div",{className:"flex-1 transition-opacity duration-150",style:{backgroundColor:Lv(x.type),opacity:x.startIndex<=r?1:.15}},b)),l.jsx("div",{className:"absolute top-0 bottom-0 w-0.5 bg-white shadow-layer-sm transition-[left] duration-150 ease-material",style:{left:`${f}%`}})]})]})}const Uv=[{key:"replay",label:"Replay"},{key:"summary",label:"Insights"},{key:"export",label:"Export"}];function Hv({activeView:s,onChangeView:r,className:o="",rightContent:c,hiddenTabs:d}){return l.jsxs("div",{className:`flex items-center justify-between border-b border-terminal-border-subtle bg-terminal-bg shrink-0 ${o}`,children:[l.jsx("div",{className:"flex bg-terminal-surface/30",children:Uv.filter(f=>!d?.includes(f.key)).map(({key:f,label:m})=>l.jsx("button",{onClick:()=>r(f),className:`px-4 py-2 text-[11px] font-sans font-semibold uppercase tracking-widest transition-colors ${s===f?"text-terminal-green border-b-2 border-terminal-green bg-terminal-surface/50":"text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover"}`,children:m},f))}),c&&l.jsx("div",{className:"pr-4 py-1.5 flex items-center",children:c})]})}function $v(s){s.classList.remove("jump-target-flash"),s.offsetWidth,s.classList.add("jump-target-flash"),window.setTimeout(()=>{s.classList.remove("jump-target-flash")},900)}function Gv({session:s,viewPrefs:r,viewerMode:o="embedded"}){const c=o==="readonly",[d,f]=v.useState(!1),[m,g]=v.useState(void 0),[h,x]=v.useState(0),[b,j]=v.useState("replay"),[T,N]=v.useState(!1),[w,S]=v.useState(!1),[R,A]=v.useState(null),[E,_]=v.useState(!0),D=_b(s,o),$=Ob(s,o),{effectiveSession:ae}=$,{annotations:Y}=D,se=Db(r),{state:te,currentIndex:Q,visibleCount:le,speed:oe,play:ue,pause:P,togglePlayPause:pe,seekTo:z,changeSpeed:ne,totalScenes:ie,userPromptIndices:ee,computeNextIndex:re}=zb(s.scenes,se,d),k=v.useRef(null),[O,B]=v.useState("outline"),[W,F]=v.useState(!1),[fe,xe]=v.useState(!1),[De,J]=v.useState(!1),ge=v.useRef(null),Se=v.useRef(null),$e=v.useRef(!1),[Je,Ve]=v.useState(!1);v.useEffect(()=>{const ce=ye=>{(ye.metaKey||ye.ctrlKey)&&ye.key==="k"?(ye.preventDefault(),F(pt=>!pt)):ye.key==="/"?ye.target instanceof HTMLInputElement||ye.target instanceof HTMLTextAreaElement||(ye.preventDefault(),F(!0)):ye.key==="?"?Ve(pt=>!pt):ye.key==="Escape"&&(Je?Ve(!1):W&&F(!1))};return window.addEventListener("keydown",ce),()=>window.removeEventListener("keydown",ce)},[W,Je]);const Ct=ee.filter(ce=>ce<=Q).length||0,ot=ee.length,tn=v.useMemo(()=>ee.length>=2?ee[1]:Math.min(15,s.scenes.length-1),[ee,s.scenes.length]),xn=v.useCallback((ce=!0)=>{f(!0),ce?setTimeout(ue,300):setTimeout(()=>z(tn),100)},[ue,z,tn]),gn=v.useRef(r.displayMode);v.useEffect(()=>{gn.current!==r.displayMode&&(gn.current=r.displayMode,d||(f(!0),setTimeout(()=>z(tn),100)))},[r.displayMode,d,z,tn]);const ct=v.useCallback(ce=>{const ye=Math.max(0,Math.min(ce,s.scenes.length-1));P(),ge.current=ye,x(pt=>pt+1),g(ye),Se.current&&clearTimeout(Se.current),Se.current=setTimeout(()=>g(void 0),2500),z(ye)},[P,z,s.scenes.length]),X=v.useCallback(()=>{const ce=ee.find(ye=>ye>Q);ce!==void 0&&ct(ce)},[ee,Q,ct]),ve=v.useCallback(()=>{const ce=[...ee].reverse().find(ye=>ye<Q);ce!==void 0&&ct(ce)},[ee,Q,ct]),Te=v.useRef(!1);v.useEffect(()=>{te==="playing"&&J(!1)},[te]),v.useEffect(()=>{if(!k.current||Q<0||ge.current!==null)return;if($e.current){$e.current=!1;return}const ce=k.current;Te.current=!0;const ye=Pe=>{const dt=s.scenes;if(Pe<0||Pe>=dt.length||dt[Pe].type==="user-prompt"||dt[Pe].type==="compaction-summary")return Pe;let St=Pe;for(;St>0&&dt[St-1].type!=="user-prompt"&&dt[St-1].type!=="compaction-summary";)St--;return St},pt=Pe=>{const dt=ce.querySelector(`[data-scene-index="${Pe}"]`);if(dt)return dt;const St=ye(Pe);return ce.querySelector(`[data-scene-index="${St}"]`)};requestAnimationFrame(()=>{const Pe=pt(Q);if(Pe)if(te==="playing")Pe.scrollIntoView({behavior:"smooth",block:"center"});else{const dt=ce.getBoundingClientRect(),Ye=Pe.getBoundingClientRect().top-dt.top+ce.scrollTop-dt.height*.3;ce.scrollTo({top:Math.max(0,Ye),behavior:"smooth"})}else te==="playing"&&ce.scrollTo({top:ce.scrollHeight,behavior:"smooth"});setTimeout(()=>{Te.current=!1},400)})},[Q,te,s.scenes]),v.useEffect(()=>{const ce=k.current;if(!ce)return;const ye=()=>{Te.current||(J(!0),te==="playing"&&P())};return ce.addEventListener("wheel",ye,{passive:!0}),ce.addEventListener("touchmove",ye,{passive:!0}),()=>{ce.removeEventListener("wheel",ye),ce.removeEventListener("touchmove",ye)}},[te,P]),v.useEffect(()=>{const ce=k.current;if(!ce)return;let ye=!1;const pt=()=>{if(te!=="paused"||ye||Q>=s.scenes.length-1||Te.current||ge.current!==null)return;if(ce.scrollHeight-ce.scrollTop-ce.clientHeight<80){ye=!0,$e.current=!0;const Et=re(Q);Et!==-1&&z(Et),setTimeout(()=>{ye=!1},150)}},Pe=Ye=>{Ye.deltaY>0&&pt()};let dt=0;const St=Ye=>{dt=Ye.touches[0].clientY},ht=Ye=>{dt-Ye.changedTouches[0].clientY>20&&pt()};return ce.addEventListener("scroll",pt,{passive:!0}),ce.addEventListener("wheel",Pe,{passive:!0}),ce.addEventListener("touchstart",St,{passive:!0}),ce.addEventListener("touchend",ht,{passive:!0}),()=>{ce.removeEventListener("scroll",pt),ce.removeEventListener("wheel",Pe),ce.removeEventListener("touchstart",St),ce.removeEventListener("touchend",ht)}},[te,Q,s.scenes.length,z,re]),v.useEffect(()=>{const ce=ge.current,ye=k.current;if(ce===null||!ye||Q!==ce)return;let pt=!1,Pe=0;const dt=ht=>{const Ye=ye.querySelector(`[data-scene-index="${ht}"]`);if(Ye)return Ye;const Et=Array.from(ye.querySelectorAll("[data-scene-index]"));let xt=null,Ma=1/0;for(const Es of Et){const Ts=Es.getAttribute("data-scene-index");if(!Ts)continue;const ca=parseInt(Ts,10);if(ca<=ht){const ua=ht-ca;ua<Ma&&(Ma=ua,xt=Es)}}return xt},St=()=>{if(pt)return;const ht=dt(ce);if(ht){Te.current=!0;const Ye=ye.getBoundingClientRect(),Ma=ht.getBoundingClientRect().top-Ye.top+ye.scrollTop-Ye.height*.3;ye.scrollTo({top:Math.max(0,Ma),behavior:"smooth"}),$v(ht),setTimeout(()=>{Te.current=!1},450),ge.current=null;return}Pe+=1,Pe<12?setTimeout(St,80):ge.current=null};return requestAnimationFrame(St),()=>{pt=!0}},[Q]),v.useEffect(()=>()=>{Se.current&&clearTimeout(Se.current)},[]);const je=o==="editor",Ae=v.useMemo(()=>Y.some(ce=>ce.author==="vibe-feedback"),[Y]);if(!d)return l.jsx(yv,{session:ae,onStart:xn});const{meta:Ee}=s;return l.jsxs("div",{className:"flex flex-1 min-h-0 relative",children:[l.jsxs("div",{className:"flex flex-col flex-1 min-h-0 min-w-0",children:[l.jsx(Hv,{activeView:b,onChangeView:j,hiddenTabs:c?["export"]:void 0,rightContent:b==="replay"?l.jsxs("div",{className:"flex items-center gap-3",children:[$.overlayCount>0&&l.jsxs("button",{onClick:()=>$.toggleAllOriginals(),className:"flex items-center gap-2 text-xs font-mono text-terminal-dim",title:$.showAllOriginals?"Showing originals — click to show modified":"Showing modified — click to show originals",children:[l.jsx("span",{className:"hidden sm:inline",children:$.showAllOriginals?"Original":"Modified"}),l.jsx("span",{className:`relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors duration-200 ${$.showAllOriginals?"bg-terminal-surface border border-terminal-border":"bg-terminal-purple brightness-75"}`,children:l.jsx("span",{className:`inline-block h-3.5 w-3.5 rounded-full bg-white shadow-sm transition-transform duration-200 ${$.showAllOriginals?"translate-x-[3px]":"translate-x-[17px]"}`})})]}),l.jsxs("button",{onClick:()=>N(!0),className:"flex items-center gap-1.5 text-xs font-mono font-semibold text-terminal-text hover:text-terminal-green transition-colors",title:"Open comments",children:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-terminal-dim",children:l.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),l.jsx("span",{className:"hidden sm:inline",children:"Comments"}),D.annotations.length>0&&l.jsx("span",{className:"ml-0.5 px-1 py-0.5 rounded bg-terminal-black text-[10px] text-terminal-text border border-terminal-border tabular-nums leading-none",children:D.annotations.length})]}),je&&l.jsxs("button",{onClick:()=>S(!0),className:"pl-2 pr-3 py-1 text-[10px] sm:text-[11px] font-mono rounded bg-[rgba(168,85,247,0.1)] hover:bg-[rgba(168,85,247,0.2)] border border-[rgba(168,85,247,0.3)] hover:border-[rgba(168,85,247,0.5)] text-terminal-purple transition-all flex items-center gap-1.5 relative overflow-hidden group shadow-sm",children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/5 to-transparent -translate-x-full group-hover:translate-x-full transition-transform duration-1000"}),l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-[#c084fc]",children:l.jsx("path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"})}),l.jsx("span",{className:"font-semibold tracking-wide",children:"AI Studio"}),(Ae||$.overlayCount>0)&&l.jsxs("span",{className:"relative flex h-1.5 w-1.5",children:[l.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-terminal-purple opacity-75"}),l.jsx("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5 bg-terminal-purple"})]})]})]}):void 0}),l.jsxs("div",{className:"flex flex-1 min-h-0 min-w-0 w-full",children:[b==="replay"&&l.jsxs("div",{className:"flex flex-1 min-h-0 min-w-0 w-full relative",children:[E&&l.jsxs("div",{className:"hidden md:flex w-64 shrink-0 flex-col border-r border-terminal-border-subtle bg-terminal-bg shadow-layer-sm",children:[l.jsxs("div",{className:"flex-1 overflow-y-auto min-h-0",children:[l.jsxs("div",{className:"px-3 py-2 border-b border-terminal-border-subtle flex items-center justify-between group/side",children:[l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest",children:"Outline"}),l.jsx("button",{onClick:()=>_(!1),className:"p-1 rounded hover:bg-terminal-surface text-terminal-dimmer hover:text-terminal-text transition-colors",title:"Hide Sidebar",children:l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}),l.jsx("line",{x1:"9",x2:"9",y1:"3",y2:"21"})]})})]}),l.jsx(Yp,{scenes:s.scenes,currentIndex:Q,onSeek:ct,overlayActions:$})]}),l.jsxs("div",{className:"shrink-0 border-t border-terminal-border-subtle overflow-y-auto max-h-[35%]",children:[l.jsx("div",{className:"px-3 py-2 border-b border-terminal-border-subtle",children:l.jsx("button",{onClick:()=>j("summary"),className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest hover:text-terminal-green transition-colors",title:"Open Insights view",children:"Stats"})}),l.jsxs("div",{className:"p-3",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[l.jsx(yl,{label:"Turns",value:Ee.stats.userPrompts,color:"text-terminal-green"}),l.jsx(yl,{label:"Tools",value:Ee.stats.toolCalls,color:"text-terminal-orange"})]}),l.jsxs("div",{className:"mt-2 text-xs font-mono text-terminal-dim space-y-0.5",children:[Ee.model&&l.jsx("div",{children:l.jsx("span",{className:"text-terminal-text",children:Ee.model})}),Ee.stats.durationMs&&l.jsxs("div",{children:[oa(Ee.stats.durationMs),Ee.stats.costEstimate!==void 0&&l.jsxs("span",{children:[" / ",l.jsxs("span",{className:"text-terminal-green",children:["$",Ee.stats.costEstimate<.01?Ee.stats.costEstimate.toFixed(4):Ee.stats.costEstimate.toFixed(2)]})]})]}),Ee.stats.tokenUsage&&l.jsxs("div",{children:[kt(Ee.stats.tokenUsage.inputTokens)," in /"," ",kt(Ee.stats.tokenUsage.outputTokens)," out"]})]})]})]})]}),l.jsxs("div",{className:"flex flex-col flex-1 min-h-0 min-w-0 relative",children:[!E&&l.jsx("button",{onClick:()=>_(!0),className:"absolute left-0 top-1/2 -translate-y-1/2 z-20 group/expand px-1.5 py-4 bg-terminal-surface/80 backdrop-blur-md border border-l-0 border-terminal-border-subtle rounded-r-xl text-terminal-dim hover:text-terminal-green transition-all shadow-layer-md animate-in slide-in-from-left-2 duration-300",title:"Show Sidebar",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("polyline",{points:"9 18 15 12 9 6"})})}),l.jsx("div",{ref:k,className:"flex-1 overflow-y-auto px-5 py-5 pb-10 overscroll-contain",children:l.jsx(iv,{scenes:s.scenes,visibleCount:le,currentIndex:Q,effectivePrefs:se,focusIndex:m,annotatedScenes:D.annotatedScenes,annotationCounts:D.annotationCounts,onSeek:ct,state:te,overlayActions:$,onComment:c?void 0:ce=>{N(!0),A(ce)}})}),l.jsx(Nv,{scenes:ae.scenes,open:W,onClose:()=>F(!1),onSeek:ce=>{ct(ce),F(!1)}})]})]}),b==="summary"&&l.jsx(Zp,{session:ae}),b==="export"&&l.jsx(xv,{actions:D,viewerMode:o,readOnly:c,session:ae})]}),b==="replay"&&l.jsxs("div",{className:"shrink-0 border-t border-terminal-border-subtle bg-terminal-surface/80 backdrop-blur-md sticky bottom-0 safe-bottom shadow-layer-lg",children:[l.jsx(Bv,{scenes:s.scenes,currentIndex:Q,onSeek:ct,annotatedScenes:D.annotatedScenes}),l.jsx($y,{state:te,speed:oe,currentIndex:Q,totalScenes:ie,userPromptCount:ot,currentTurn:Ct,onTogglePlayPause:pe,onChangeSpeed:ne,onPrevPrompt:ve,onNextPrompt:X,onOpenSearch:()=>F(!0),onOpenOutline:()=>xe(!0),onShowHelp:()=>Ve(!0)})]})]}),l.jsx(Uy,{open:T,onClose:()=>N(!1),actions:D,scenes:ae.scenes,currentIndex:Q,onSeek:ct,addingForScene:R,onClearAddingTarget:()=>A(null),readOnly:c}),l.jsx(Yb,{open:w,onClose:()=>S(!1),annotationActions:D,overlayActions:$}),l.jsxs("div",{className:`fixed inset-0 z-40 md:hidden transition-opacity duration-300 ${fe?"opacity-100":"opacity-0 pointer-events-none"}`,onClick:()=>xe(!1),children:[l.jsx("div",{className:"absolute inset-0 bg-black/40"}),l.jsxs("div",{className:`absolute bottom-0 left-0 right-0 h-[65vh] bg-terminal-bg border-t border-terminal-border-subtle rounded-t-2xl flex flex-col transition-transform duration-300 ease-material-decel safe-bottom shadow-layer-xl ${fe?"translate-y-0":"translate-y-full"}`,onClick:ce=>ce.stopPropagation(),children:[l.jsx("div",{className:"flex justify-center py-2.5 shrink-0",children:l.jsx("div",{className:"w-10 h-1 rounded-full bg-terminal-border"})}),l.jsxs("div",{className:"flex border-b border-terminal-border-subtle shrink-0",children:[l.jsx("button",{onClick:()=>B("outline"),className:`flex-1 px-3 py-2.5 text-[10px] font-sans font-semibold uppercase tracking-widest transition-colors ${O==="outline"?"text-terminal-green border-b-2 border-terminal-green":"text-terminal-dim hover:text-terminal-text"}`,children:"Outline"}),l.jsx("button",{onClick:()=>B("stats"),className:`flex-1 px-3 py-2.5 text-[10px] font-sans font-semibold uppercase tracking-widest transition-colors ${O==="stats"?"text-terminal-green border-b-2 border-terminal-green":"text-terminal-dim hover:text-terminal-text"}`,children:"Stats"})]}),l.jsx("div",{className:"flex-1 overflow-y-auto overscroll-contain",children:O==="outline"?l.jsx(Yp,{scenes:s.scenes,currentIndex:Q,onSeek:ce=>{ct(ce),xe(!1)},overlayActions:$}):l.jsx(Zp,{session:ae})})]})]}),l.jsx(bv,{open:Je,onClose:()=>Ve(!1)})]})}function qv(){const[s,r]=v.useState({status:"loading"}),o=v.useCallback(()=>{r({status:"loading"}),Zv().then(c=>{r(c==="dashboard"?{status:"dashboard"}:{status:"ready",session:c.session,mode:c.mode,gistOwner:c.gistOwner})},c=>r({status:"error",message:String(c.message||c)}))},[]);return v.useEffect(()=>{o();const c=()=>o();return window.addEventListener("popstate",c),()=>window.removeEventListener("popstate",c)},[o]),s}function Yv(){return!!window.__VIBE_REPLAY_EDITOR__}async function Zv(){if(window.__VIBE_REPLAY_DATA__)return{session:window.__VIBE_REPLAY_DATA__,mode:"embedded"};if(Yv()){const d=new URLSearchParams(window.location.search);if(d.get("view")==="dashboard")return"dashboard";const f=d.get("session");if(f){const m=await fetch(`/api/session?slug=${encodeURIComponent(f)}`);if(!m.ok)throw new Error(`Session not found: ${f}`);return{session:await m.json(),mode:"editor"}}return"dashboard"}const s=new URLSearchParams(window.location.search),r=s.get("gist");if(r){if(!/^[a-f0-9]{20,40}$/.test(r))throw new Error("Invalid gist ID");const{rawUrl:d,owner:f}=await Fv(r),m=await Xp(d);return Xv(r).catch(()=>{}),{session:m,mode:"readonly",gistOwner:f}}const o=s.get("url");if(o)return{session:await Xp(o),mode:"readonly"};const c=s.get("file");if(c){const d=await fetch(c);if(!d.ok)throw new Error(`Failed to load file: ${d.status}`);return{session:await d.json(),mode:"embedded"}}return"dashboard"}async function Xp(s){const r=await fetch(s);if(!r.ok)throw new Error(`Failed to fetch: ${r.status} ${r.statusText}`);const o=await r.text();if(o.trimStart().startsWith("{"))return JSON.parse(o);throw new Error("URL must point to a vibe-replay JSON replay file")}async function Xv(s){await fetch("https://vibe-replay.com/api/replays",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({gist_id:s})})}async function Fv(s){const r=await fetch(`https://api.github.com/gists/${s}`);if(!r.ok)throw new Error(`Gist not found: ${r.status}`);const o=await r.json(),c=o.files,d=Object.values(c).find(m=>m.filename.endsWith(".json"));if(!d)throw new Error("No JSON file found in gist");const f=o.owner?.login;return{rawUrl:d.raw_url,owner:f}}function Vv(){const[s,r]=v.useState(()=>{const d=new URLSearchParams(window.location.search).get("theme");if(d==="light"||d==="dark")return d;const f=localStorage.getItem("vibe-replay-theme");return f==="light"||f==="dark"?f:"dark"});v.useEffect(()=>{const c=document.documentElement;c.classList.add("theme-transition"),c.classList.toggle("dark",s==="dark"),c.classList.toggle("light",s==="light"),localStorage.setItem("vibe-replay-theme",s);const d=setTimeout(()=>c.classList.remove("theme-transition"),300);return()=>clearTimeout(d)},[s]);const o=v.useCallback(()=>{r(c=>c==="dark"?"light":"dark")},[]);return{theme:s,toggleTheme:o}}function zc(s){const r=new URL(window.location.href);for(const[o,c]of Object.entries(s))c===null?r.searchParams.delete(o):r.searchParams.set(o,c);window.history.pushState({},"",r.toString()),window.dispatchEvent(new PopStateEvent("popstate"))}function Fp(){const s=v.useRef(null);return v.useEffect(()=>{const r=s.current;if(!r)return;r.innerHTML="";const o=document.createElement("a");o.className="github-button",o.href="https://github.com/tuo-lei/vibe-replay",o.setAttribute("data-color-scheme","no-preference: dark; light: dark; dark: dark;"),o.setAttribute("data-icon","octicon-star"),o.setAttribute("data-size","large"),o.setAttribute("data-show-count","true"),o.textContent="Star",r.appendChild(o);const c=document.createElement("script");return c.src="https://buttons.github.io/buttons.js",c.async=!0,r.appendChild(c),()=>{r.innerHTML=""}},[]),l.jsx("div",{ref:s,className:"flex items-center"})}function Qv(){const s=qv(),{theme:r,toggleTheme:o}=Vv(),{prefs:c,updatePref:d,togglePref:f}=Bb(),m=s.status==="ready"?s.session:null,g=s.status==="ready"?s.mode:"embedded",h=s.status==="ready"?s.gistOwner:void 0,x=g==="editor",b=v.useMemo(()=>m?.scenes.some(R=>R.type==="thinking")??!1,[m]),[j,T]=v.useState(!1),N=v.useRef(null);if(v.useEffect(()=>{c.displayMode!=="custom"&&T(!1)},[c.displayMode]),v.useEffect(()=>{if(!j)return;const R=A=>{N.current&&!N.current.contains(A.target)&&T(!1)};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[j]),s.status==="loading")return l.jsx("div",{className:"h-screen bg-terminal-bg flex items-center justify-center",children:l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"text-terminal-green font-sans font-bold text-sm animate-pulse",children:"LOADING SESSION..."}),l.jsx("div",{className:"text-terminal-dimmer font-mono text-xs",children:"Preparing replay data"})]})});if(s.status==="error")return l.jsx("div",{className:"h-screen bg-terminal-bg flex items-center justify-center",children:l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"text-terminal-red font-mono text-sm",children:s.message}),l.jsx("div",{className:"text-terminal-dim font-mono text-xs",children:"Use ?gist=<id> or ?url=<replay-json-url> or embed via CLI"})]})});if(s.status==="dashboard")return l.jsxs("div",{className:"h-screen bg-terminal-bg flex flex-col overflow-hidden",children:[l.jsxs("header",{className:"border-b border-terminal-border-subtle px-4 md:px-5 py-2.5 md:py-3 flex items-center justify-between shrink-0 bg-terminal-surface/30 backdrop-blur-sm safe-top",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("button",{onClick:()=>zc({view:null,session:null}),className:"text-sm font-sans font-bold bg-gradient-to-r from-[#3fb950] to-[#79b8ff] bg-clip-text text-transparent hover:opacity-80 transition-opacity",children:"vibe-replay"}),l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-sans font-medium px-2 py-0.5 rounded-full bg-terminal-green-subtle text-terminal-green uppercase tracking-wider",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-green animate-pulse"}),"Local"]}),l.jsx("span",{className:"text-terminal-border/40 text-sm select-none",children:"|"}),l.jsx("span",{className:"text-sm font-sans font-medium text-terminal-text",children:"Dashboard"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Fp,{}),l.jsx("button",{onClick:o,className:"h-7 w-7 flex items-center justify-center rounded-md bg-terminal-surface text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover text-xs transition-colors",children:r==="dark"?"☾":"☀"})]})]}),l.jsx(vb,{})]});const{meta:w}=m,S=x&&new URLSearchParams(window.location.search).has("session");return l.jsxs("div",{className:"h-screen bg-terminal-bg flex flex-col overflow-hidden",children:[l.jsxs("header",{className:"relative z-30 border-b border-terminal-border-subtle px-4 md:px-5 py-2.5 md:py-3 flex items-center justify-between shrink-0 bg-terminal-surface/30 backdrop-blur-sm safe-top",children:[l.jsxs("div",{className:"flex items-center gap-2 md:gap-3 min-w-0",children:[l.jsx("a",{href:"https://vibe-replay.com",target:"_blank",rel:"noopener noreferrer",className:"text-sm font-sans font-bold shrink-0 hover:opacity-80 transition-opacity bg-gradient-to-r from-[#3fb950] to-[#79b8ff] bg-clip-text text-transparent",children:"vibe-replay"}),x&&l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-sans font-medium px-2 py-0.5 rounded-full bg-terminal-green-subtle text-terminal-green uppercase tracking-wider",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-green animate-pulse"}),"Local"]}),S&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-terminal-border/40 text-sm select-none",children:"|"}),l.jsxs("button",{onClick:()=>zc({view:"dashboard",session:null}),className:"flex items-center gap-0.5 text-sm font-sans font-medium text-terminal-dim hover:text-terminal-text transition-colors",children:[l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M10 3L5 8l5 5"})}),"Dashboard"]})]}),w.title&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"hidden md:inline text-terminal-border/40 text-sm select-none",children:"|"}),l.jsx("span",{className:"hidden md:inline text-terminal-text text-xs font-sans font-medium truncate max-w-[300px]",title:w.project,children:w.title})]}),l.jsx("div",{className:"hidden sm:flex items-center gap-1.5 text-xs font-mono text-terminal-dim",children:h&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-terminal-border",children:"·"}),l.jsxs("a",{href:`https://github.com/${h}`,target:"_blank",rel:"noopener noreferrer",className:"text-terminal-dim hover:text-terminal-text transition-colors",children:["@",h]})]})})]}),l.jsxs("div",{className:"flex items-center gap-1.5 md:gap-2 shrink-0",children:[x&&!S&&l.jsxs("button",{onClick:()=>zc({view:"dashboard"}),className:"h-7 px-2.5 flex items-center gap-1.5 rounded-md bg-terminal-surface text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover text-xs font-sans font-medium transition-colors",title:"All replays",children:[l.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[l.jsx("rect",{x:"1",y:"1",width:"6",height:"6",rx:"1"}),l.jsx("rect",{x:"9",y:"1",width:"6",height:"6",rx:"1"}),l.jsx("rect",{x:"1",y:"9",width:"6",height:"6",rx:"1"}),l.jsx("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1"})]}),l.jsx("span",{className:"hidden sm:inline",children:"Dashboard"})]}),l.jsxs("div",{ref:N,className:"relative flex items-center",children:[l.jsxs("div",{className:"flex items-center h-7 rounded-md overflow-hidden bg-terminal-surface",children:[l.jsx("button",{onClick:()=>d("displayMode","all"),className:`h-full px-2.5 text-xs font-mono transition-colors ${c.displayMode==="all"?"bg-terminal-green-subtle text-terminal-green":"text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover"}`,children:"All"}),l.jsx("button",{onClick:()=>d("displayMode","compact"),className:`h-full px-2.5 text-xs font-mono transition-colors ${c.displayMode==="compact"?"bg-terminal-green-subtle text-terminal-green":"text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover"}`,children:"Compact"}),l.jsx("button",{onClick:()=>{d("displayMode","custom"),T(R=>c.displayMode==="custom"?!R:!0)},className:`h-full px-2.5 text-xs font-mono transition-colors ${c.displayMode==="custom"?"bg-terminal-green-subtle text-terminal-green":"text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover"}`,children:"Custom"})]}),j&&c.displayMode==="custom"&&l.jsxs("div",{className:"absolute right-0 top-full mt-2 w-40 bg-terminal-surface border border-terminal-border-subtle rounded-xl shadow-layer-xl z-50 py-1.5 backdrop-blur-md",children:[l.jsxs("button",{onClick:()=>f("promptsOnly"),className:"w-full text-left px-3 py-1.5 text-xs font-mono text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface/50 transition-colors flex items-center gap-2",children:[l.jsx("span",{className:`w-3.5 h-3.5 rounded flex items-center justify-center text-[10px] ${c.promptsOnly?"bg-terminal-green-subtle text-terminal-green":"bg-terminal-bg"}`,children:c.promptsOnly?"✓":""}),"Prompts Only"]}),l.jsxs("button",{onClick:()=>f("collapseAllTools"),className:"w-full text-left px-3 py-1.5 text-xs font-mono text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface/50 transition-colors flex items-center gap-2",children:[l.jsx("span",{className:`w-3.5 h-3.5 rounded flex items-center justify-center text-[10px] ${c.collapseAllTools?"bg-terminal-orange-subtle text-terminal-orange":"bg-terminal-bg"}`,children:c.collapseAllTools?"✓":""}),"Tools Collapsed"]}),b&&l.jsxs("button",{onClick:()=>f("hideThinking"),className:"w-full text-left px-3 py-1.5 text-xs font-mono text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface/50 transition-colors flex items-center gap-2",children:[l.jsx("span",{className:`w-3.5 h-3.5 rounded flex items-center justify-center text-[10px] ${c.hideThinking?"bg-terminal-purple-subtle text-terminal-purple":"bg-terminal-bg"}`,children:c.hideThinking?"✓":""}),"Thinking Hidden"]})]})]}),l.jsx(Fp,{}),l.jsx("button",{onClick:o,className:"h-7 w-7 flex items-center justify-center rounded-md bg-terminal-surface text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover text-xs transition-colors",title:r==="dark"?"Light mode":"Dark mode",children:r==="dark"?"☾":"☀"})]})]}),l.jsx(Gv,{session:m,viewPrefs:c,viewerMode:g})]})}Kg.createRoot(document.getElementById("root")).render(l.jsx(qg.StrictMode,{children:l.jsx(Qv,{})}));</script>
148
- <style rel="stylesheet" crossorigin>*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-sans);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{scrollbar-width:thin;scrollbar-color:var(--border) var(--bg)}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:var(--bg)}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}.tabular-nums{font-variant-numeric:tabular-nums}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-3{top:.75rem}.top-full{top:100%}.-z-10{z-index:-10}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[60\]{z-index:60}.\!m-0{margin:0!important}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-5{margin-left:1.25rem;margin-right:1.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-1\.5{margin-top:.375rem;margin-bottom:.375rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.mt-px{margin-top:1px}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[65vh\]{height:65vh}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-72{max-height:18rem}.max-h-\[200px\]{max-height:200px}.max-h-\[300px\]{max-height:300px}.max-h-\[35\%\]{max-height:35%}.max-h-\[4\.5em\]{max-height:4.5em}.max-h-\[400px\]{max-height:400px}.max-h-\[50vh\]{max-height:50vh}.min-h-0{min-height:0px}.min-h-screen{min-height:100vh}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[140px\]{min-width:140px}.min-w-\[40px\]{min-width:40px}.max-w-0{max-width:0px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-\[200px\]{max-width:200px}.max-w-\[300px\]{max-width:300px}.max-w-\[400px\]{max-width:400px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[17px\]{--tw-translate-x: 17px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[3px\]{--tw-translate-x: 3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-px{gap:1px}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-3\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.875rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.875rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.rounded-t-sm{border-top-left-radius:.125rem;border-top-right-radius:.125rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[rgba\(168\,85\,247\,0\.2\)\]{border-color:#a855f733}.border-\[rgba\(168\,85\,247\,0\.3\)\]{border-color:#a855f74d}.border-terminal-blue{border-color:var(--blue)}.border-terminal-border{border-color:var(--border)}.border-terminal-border-subtle{border-color:var(--border-subtle)}.border-terminal-dim{border-color:var(--dim)}.border-terminal-green{border-color:var(--green)}.border-l-terminal-blue{border-left-color:var(--blue)}.border-l-terminal-purple{border-left-color:var(--purple)}.\!bg-transparent{background-color:transparent!important}.bg-\[rgba\(168\,85\,247\,0\.1\)\]{background-color:#a855f71a}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-terminal-bg{background-color:var(--bg)}.bg-terminal-blue{background-color:var(--blue)}.bg-terminal-blue-emphasis{background-color:var(--blue-emphasis)}.bg-terminal-blue-subtle{background-color:var(--blue-subtle)}.bg-terminal-border{background-color:var(--border)}.bg-terminal-border-subtle{background-color:var(--border-subtle)}.bg-terminal-dim{background-color:var(--dim)}.bg-terminal-green{background-color:var(--green)}.bg-terminal-green-emphasis{background-color:var(--green-emphasis)}.bg-terminal-green-subtle{background-color:var(--green-subtle)}.bg-terminal-orange{background-color:var(--orange)}.bg-terminal-orange-subtle{background-color:var(--orange-subtle)}.bg-terminal-purple{background-color:var(--purple)}.bg-terminal-purple-subtle{background-color:var(--purple-subtle)}.bg-terminal-red-subtle{background-color:var(--red-subtle)}.bg-terminal-surface{background-color:var(--surface)}.bg-terminal-surface-2{background-color:var(--surface-2)}.bg-terminal-surface-hover{background-color:var(--surface-hover)}.bg-terminal-surface-inset{background-color:var(--surface-inset)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-\[\#3fb950\]{--tw-gradient-from: #3fb950 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 185 80 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-terminal-bg{--tw-gradient-from: var(--bg) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-terminal-green-subtle{--tw-gradient-from: var(--green-subtle) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-transparent{--tw-gradient-from: transparent var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-transparent{--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), transparent var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-white\/5{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(255 255 255 / .05) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-\[\#79b8ff\]{--tw-gradient-to: #79b8ff var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-px{padding-top:1px;padding-bottom:1px}.pb-1{padding-bottom:.25rem}.pb-10{padding-bottom:2.5rem}.pb-12{padding-bottom:3rem}.pb-2{padding-bottom:.5rem}.pb-24{padding-bottom:6rem}.pb-3{padding-bottom:.75rem}.pb-6{padding-bottom:1.5rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pl-9{padding-left:2.25rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-7{padding-right:1.75rem}.pr-8{padding-right:2rem}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.pt-12{padding-top:3rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-\[8vh\]{padding-top:8vh}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.normal-case{text-transform:none}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-5{line-height:1.25rem}.leading-\[1\.15\]{line-height:1.15}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-\[\.25em\]{letter-spacing:.25em}.tracking-\[0\.15em\]{letter-spacing:.15em}.tracking-\[0\.2em\]{letter-spacing:.2em}.tracking-\[0\.3em\]{letter-spacing:.3em}.tracking-normal{letter-spacing:0em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[\#c084fc\]{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-terminal-bg{color:var(--bg)}.text-terminal-blue{color:var(--blue)}.text-terminal-border{color:var(--border)}.text-terminal-dim{color:var(--dim)}.text-terminal-dimmer{color:var(--dimmer)}.text-terminal-green{color:var(--green)}.text-terminal-orange{color:var(--orange)}.text-terminal-purple{color:var(--purple)}.text-terminal-red{color:var(--red)}.text-terminal-text{color:var(--text)}.text-transparent{color:transparent}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.placeholder-terminal-dim::-moz-placeholder{color:var(--dim)}.placeholder-terminal-dim::placeholder{color:var(--dim)}.placeholder-terminal-dimmer::-moz-placeholder{color:var(--dimmer)}.placeholder-terminal-dimmer::placeholder{color:var(--dimmer)}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.shadow-\[0_0_8px_rgba\(251\,146\,60\,0\.5\)\]{--tw-shadow: 0 0 8px rgba(251,146,60,.5);--tw-shadow-colored: 0 0 8px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-layer-lg{--tw-shadow: var(--shadow-lg);--tw-shadow-colored: var(--shadow-lg);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-layer-md{--tw-shadow: var(--shadow-md);--tw-shadow-colored: var(--shadow-md);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-layer-sm{--tw-shadow: var(--shadow-sm);--tw-shadow-colored: var(--shadow-sm);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-layer-xl{--tw-shadow: var(--shadow-xl);--tw-shadow-colored: var(--shadow-xl);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-terminal-border-subtle{--tw-ring-color: var(--border-subtle)}.ring-transparent{--tw-ring-color: transparent}.blur-2xl{--tw-blur: blur(40px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.brightness-75{--tw-brightness: brightness(.75);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[left\]{transition-property:left;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-1000{transition-duration:1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.ease-material{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-material-decel,.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}:root{--font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif}:root,.dark{--bg: #0d1117;--surface: #161b22;--surface-hover: #21262d;--surface-2: #1c2129;--surface-inset: #010409;--border: #30363d;--border-subtle: rgba(48, 54, 61, .5);--text: #c9d1d9;--dim: #8b949e;--dimmer: #7d8590;--green: #3fb950;--green-subtle: rgba(63, 185, 80, .15);--green-emphasis: rgba(63, 185, 80, .25);--blue: #79b8ff;--blue-subtle: rgba(121, 184, 255, .15);--blue-emphasis: rgba(121, 184, 255, .25);--orange: #d29922;--orange-subtle: rgba(210, 153, 34, .15);--orange-emphasis: rgba(210, 153, 34, .25);--red: #f85149;--red-subtle: rgba(248, 81, 73, .15);--red-emphasis: rgba(248, 81, 73, .25);--purple: #b392f0;--purple-subtle: rgba(179, 146, 240, .15);--purple-emphasis: rgba(179, 146, 240, .25);--cyan: #56d4dd;--cyan-subtle: rgba(86, 212, 221, .15);--shadow-color: 215 28% 4%;--shadow-sm: 0 1px 2px hsl(var(--shadow-color) / .5);--shadow-md: 0 1px 2px hsl(var(--shadow-color) / .4), 0 4px 8px hsl(var(--shadow-color) / .3);--shadow-lg: 0 1px 3px hsl(var(--shadow-color) / .4), 0 4px 8px hsl(var(--shadow-color) / .3), 0 12px 24px hsl(var(--shadow-color) / .25);--shadow-xl: 0 2px 4px hsl(var(--shadow-color) / .4), 0 8px 16px hsl(var(--shadow-color) / .3), 0 24px 48px hsl(var(--shadow-color) / .25)}.light{--bg: #ffffff;--surface: #f6f8fa;--surface-hover: #e6edf3;--surface-2: #ebeef1;--surface-inset: #f0f2f5;--border: #d0d7de;--border-subtle: rgba(208, 215, 222, .5);--text: #24292f;--dim: #57606a;--dimmer: #697078;--green: #1a7f37;--green-subtle: rgba(26, 127, 55, .1);--green-emphasis: rgba(26, 127, 55, .2);--blue: #0969da;--blue-subtle: rgba(9, 105, 218, .1);--blue-emphasis: rgba(9, 105, 218, .2);--orange: #9a6700;--orange-subtle: rgba(154, 103, 0, .1);--orange-emphasis: rgba(154, 103, 0, .2);--red: #cf222e;--red-subtle: rgba(207, 34, 46, .1);--red-emphasis: rgba(207, 34, 46, .2);--purple: #8250df;--purple-subtle: rgba(130, 80, 223, .1);--purple-emphasis: rgba(130, 80, 223, .2);--cyan: #0e7c86;--cyan-subtle: rgba(14, 124, 134, .1);--shadow-color: 220 10% 50%;--shadow-sm: 0 1px 2px hsl(var(--shadow-color) / .1);--shadow-md: 0 1px 2px hsl(var(--shadow-color) / .08), 0 4px 8px hsl(var(--shadow-color) / .06);--shadow-lg: 0 1px 3px hsl(var(--shadow-color) / .08), 0 4px 8px hsl(var(--shadow-color) / .06), 0 12px 24px hsl(var(--shadow-color) / .05);--shadow-xl: 0 2px 4px hsl(var(--shadow-color) / .08), 0 8px 16px hsl(var(--shadow-color) / .06), 0 24px 48px hsl(var(--shadow-color) / .05)}html.theme-transition,html.theme-transition *,html.theme-transition *:before,html.theme-transition *:after{transition:background-color .25s ease,border-color .25s ease,color .25s ease}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}button,[role=button]{-webkit-tap-highlight-color:transparent}:focus:not(:focus-visible){outline:none}:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:4px}@supports (padding: env(safe-area-inset-top)){.safe-top{padding-top:env(safe-area-inset-top)}.safe-bottom{padding-bottom:env(safe-area-inset-bottom)}}@keyframes blink{0%,to{opacity:1}50%{opacity:0}}.typing-cursor:after{content:"█";animation:blink 1s step-end infinite;color:var(--green)}@keyframes fade-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.scene-enter{animation:fade-in .3s cubic-bezier(.4,0,.2,1)}@keyframes pulse-border{0%,to{border-color:#d299224d}50%{border-color:#d2992299}}.pause-overlay{animation:pulse-border 2s ease-in-out infinite}@keyframes jump-target-flash{0%{box-shadow:0 0 #3fb95000;outline-color:#3fb95000}30%{box-shadow:0 0 0 3px #3fb95040;outline-color:#3fb95099}to{box-shadow:0 0 #3fb95000;outline-color:#3fb95000}}.jump-target-flash{outline:1px solid transparent;animation:jump-target-flash .85s ease-out}@keyframes nav-focus-pulse{0%,to{transform:translateY(0)}50%{transform:translateY(-1px)}}.scene-nav-focused{animation:nav-focus-pulse .9s ease-in-out 2}@keyframes landing-glow{0%,to{box-shadow:0 0 #3fb95000}50%{box-shadow:0 0 20px 2px #3fb95026}}.landing-pulse{animation:landing-glow 2.5s ease-in-out infinite}.hover-lift{transition:transform .2s cubic-bezier(.4,0,.2,1),box-shadow .2s cubic-bezier(.4,0,.2,1)}.hover-lift:hover{transform:translateY(-1px)}.bg-dot-grid{background-image:radial-gradient(circle,var(--border) .5px,transparent .5px);background-size:24px 24px;opacity:.03}.minimap-item{transition:background-color .2s cubic-bezier(.4,0,.2,1),border-color .2s cubic-bezier(.4,0,.2,1)}.prose-terminal{line-height:1.6}.prose-terminal p{margin:.5em 0}.prose-terminal code{background:var(--surface);padding:.15em .4em;border-radius:4px;font-size:.9em}.prose-terminal pre{background:var(--surface);padding:.75em 1em;border-radius:6px;overflow-x:auto;margin:.5em 0}.prose-terminal pre code{background:none;padding:0}.prose-terminal ul,.prose-terminal ol{padding-left:1.5em;margin:.5em 0}.prose-terminal li{margin:.25em 0}.prose-terminal h1,.prose-terminal h2,.prose-terminal h3{margin:.75em 0 .5em;font-weight:600}.prose-terminal blockquote{border-left:3px solid var(--border);padding-left:1em;color:var(--dim);margin:.5em 0}.prose-terminal a{color:var(--blue);text-decoration:underline}.prose-terminal table{border-collapse:collapse;margin:.5em 0}.prose-terminal th,.prose-terminal td{border:1px solid var(--border);padding:.4em .8em}.placeholder\:text-terminal-dimmer::-moz-placeholder{color:var(--dimmer)}.placeholder\:text-terminal-dimmer::placeholder{color:var(--dimmer)}.hover\:-translate-y-0\.5:hover{--tw-translate-y: -.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-\[rgba\(168\,85\,247\,0\.5\)\]:hover{border-color:#a855f780}.hover\:bg-\[rgba\(168\,85\,247\,0\.2\)\]:hover{background-color:#a855f733}.hover\:bg-\[rgba\(168\,85\,247\,0\.25\)\]:hover{background-color:#a855f740}.hover\:bg-terminal-blue-emphasis:hover{background-color:var(--blue-emphasis)}.hover\:bg-terminal-blue-subtle:hover{background-color:var(--blue-subtle)}.hover\:bg-terminal-green-emphasis:hover{background-color:var(--green-emphasis)}.hover\:bg-terminal-orange-emphasis:hover{background-color:var(--orange-emphasis)}.hover\:bg-terminal-orange-subtle:hover{background-color:var(--orange-subtle)}.hover\:bg-terminal-purple-emphasis:hover{background-color:var(--purple-emphasis)}.hover\:bg-terminal-purple-subtle:hover{background-color:var(--purple-subtle)}.hover\:bg-terminal-red-emphasis:hover{background-color:var(--red-emphasis)}.hover\:bg-terminal-red-subtle:hover{background-color:var(--red-subtle)}.hover\:bg-terminal-surface:hover{background-color:var(--surface)}.hover\:bg-terminal-surface-hover:hover{background-color:var(--surface-hover)}.hover\:text-terminal-blue:hover{color:var(--blue)}.hover\:text-terminal-dim:hover{color:var(--dim)}.hover\:text-terminal-green:hover{color:var(--green)}.hover\:text-terminal-orange:hover{color:var(--orange)}.hover\:text-terminal-red:hover{color:var(--red)}.hover\:text-terminal-text:hover{color:var(--text)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-layer-lg:hover{--tw-shadow: var(--shadow-lg);--tw-shadow-colored: var(--shadow-lg);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:block{display:block}.group:hover .group-hover\:-translate-y-0\.5{--tw-translate-y: -.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group\/help:hover .group-hover\/help\:border-terminal-text{border-color:var(--text)}.group\/help:hover .group-hover\/help\:bg-terminal-text{background-color:var(--text)}.group:hover .group-hover\:bg-terminal-green-emphasis{background-color:var(--green-emphasis)}.group\/help:hover .group-hover\/help\:text-terminal-bg{color:var(--bg)}.group\/ref:hover .group-hover\/ref\:text-terminal-text{color:var(--text)}.group\/search:hover .group-hover\/search\:text-terminal-blue{color:var(--blue)}.group:hover .group-hover\:text-terminal-green{color:var(--green)}.group:hover .group-hover\:text-terminal-text{color:var(--text)}.group\/batch:hover .group-hover\/batch\:opacity-100,.group\/help:hover .group-hover\/help\:opacity-100,.group\/pause:hover .group-hover\/pause\:opacity-100,.group\/scene:hover .group-hover\/scene\:opacity-100,.group\/search:hover .group-hover\/search\:opacity-100{opacity:1}.group\/search:hover .group-hover\/search\:opacity-80{opacity:.8}.group:hover .group-hover\:opacity-100{opacity:1}.group:hover .group-hover\:opacity-60{opacity:.6}.dark\:bg-green-900\/30:is(.dark *){background-color:#14532d4d}.dark\:bg-red-900\/30:is(.dark *){background-color:#7f1d1d4d}@media(min-width:640px){.sm\:mx-0{margin-left:0;margin-right:0}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:pt-\[15vh\]{padding-top:15vh}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-\[11px\]{font-size:11px}}@media(min-width:768px){.md\:ml-12{margin-left:3rem}.md\:mt-12{margin-top:3rem}.md\:block{display:block}.md\:inline{display:inline}.md\:flex{display:flex}.md\:hidden{display:none}.md\:gap-2{gap:.5rem}.md\:gap-3{gap:.75rem}.md\:gap-4{gap:1rem}.md\:space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.md\:space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.md\:px-5{padding-left:1.25rem;padding-right:1.25rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-3{padding-top:.75rem;padding-bottom:.75rem}.md\:text-5xl{font-size:3rem;line-height:1}}@media(min-width:1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:inline{display:inline}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\[\&\>svg\]\:block>svg{display:block}.\[\&\>svg\]\:h-auto>svg{height:auto}.\[\&\>svg\]\:max-h-52>svg{max-height:13rem}.\[\&\>svg\]\:w-full>svg{width:100%}</style>
138
+ */const sv=s=>{const r=new MutationObserver(s);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},rv=()=>document.documentElement.classList.contains("dark");function iv(s,r){if(!s&&r)return r.split(`
139
+ `).map(d=>({type:"add",content:d}));const o=Wy(s,r),c=[];for(const d of o){const f=d.value.replace(/\n$/,"").split(`
140
+ `),m=d.added?"add":d.removed?"remove":"context";for(const x of f)c.push({type:m,content:x})}return c}function ov(s){const r=s.split(".").pop()?.toLowerCase()||"";return{ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",py:"python",rs:"rust",go:"go",rb:"ruby",java:"java",css:"css",html:"html",json:"json",md:"markdown",yaml:"yaml",yml:"yaml",toml:"toml",sh:"bash",zsh:"bash",bash:"bash"}[r]||"text"}const cv=y.memo(function({toolName:r,filePath:o,oldContent:c,newContent:d,isActive:f}){const m=y.useMemo(()=>iv(c,d),[c,d]),x=ov(o),h=y.useSyncExternalStore(sv,rv),g=!c;return l.jsxs("div",{className:"bg-terminal-surface rounded-xl overflow-hidden shadow-layer-sm",children:[l.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-terminal-surface",children:[l.jsx("span",{className:"text-xs font-mono font-bold text-terminal-orange",children:r}),l.jsx("span",{className:"text-xs font-mono text-terminal-blue truncate",children:o}),g&&l.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-terminal-green/20 text-terminal-green",children:"new"})]}),l.jsx("div",{className:"overflow-x-auto max-h-[400px] overflow-y-auto",children:l.jsx(lv,{theme:h?Kc.nightOwl:Kc.nightOwlLight,code:m.map(v=>v.content).join(`
141
+ `),language:x,children:({tokens:v,getLineProps:w,getTokenProps:T})=>l.jsx("pre",{className:"text-xs font-mono !bg-transparent !m-0 p-0",children:v.map((N,j)=>{const S=m[j];if(!S)return null;const C=S.type==="add"?"bg-green-100 dark:bg-green-900/30":S.type==="remove"?"bg-red-100 dark:bg-red-900/30":"",E=S.type==="add"?"+":S.type==="remove"?"-":" ",k=S.type==="add"?"text-terminal-green":S.type==="remove"?"text-terminal-red":"text-terminal-dim";return l.jsxs("div",{...w({line:N}),className:`flex ${C} px-3 leading-5`,children:[l.jsx("span",{className:`select-none w-4 shrink-0 ${k}`,children:E}),l.jsx("span",{children:N.map((_,z)=>l.jsx("span",{...T({token:_})},z))})]},j)})})})})]})});function Gp(s){switch(s){case"Read":return"📄";case"Write":return"✏️";case"Edit":return"✂️";case"Bash":return"$";case"Glob":return"🔍";case"Grep":return"🔎";case"Agent":return"🤖";default:return"⚙️"}}const uv=y.memo(function({scene:r,isActive:o,forceCollapse:c}){const[d,f]=y.useState(!1);return c?l.jsxs("div",{className:"flex items-center gap-2 px-3 py-1 text-xs font-mono text-terminal-dim",children:[l.jsx("span",{children:Gp(r.toolName)}),l.jsx("span",{className:"text-terminal-orange font-bold",children:r.toolName}),l.jsx("span",{className:"truncate",children:qp(r.toolName,r.input)})]}):r.bashOutput?l.jsx(Vy,{command:r.bashOutput.command,stdout:r.bashOutput.stdout,isActive:o}):r.diff?l.jsx(cv,{toolName:r.toolName,filePath:r.diff.filePath,oldContent:r.diff.oldContent,newContent:r.diff.newContent,isActive:o}):l.jsx("div",{children:l.jsxs("div",{className:"bg-terminal-surface rounded-xl overflow-hidden shadow-layer-sm",children:[l.jsxs("button",{onClick:()=>f(!d),className:"w-full flex items-center gap-2 px-3 py-2 bg-terminal-surface hover:bg-terminal-surface-hover transition-colors duration-200 ease-material text-left",children:[l.jsx("span",{className:"text-xs font-mono",children:Gp(r.toolName)}),l.jsx("span",{className:"text-xs font-mono font-bold text-terminal-orange",children:r.toolName}),l.jsx("span",{className:"text-xs text-terminal-dim font-mono truncate flex-1",children:qp(r.toolName,r.input)}),l.jsx("span",{className:`text-xs text-terminal-dim transition-transform ${d?"rotate-90":""}`,children:"▶"})]}),d&&l.jsxs("div",{className:"border-t border-terminal-border-subtle",children:[l.jsxs("div",{className:"px-3 py-2",children:[l.jsx("div",{className:"text-xs text-terminal-dim font-mono mb-1",children:"Input:"}),l.jsx("pre",{className:"text-xs text-terminal-text font-mono whitespace-pre-wrap break-words max-h-[200px] overflow-y-auto",children:JSON.stringify(r.input,null,2)})]}),r.result&&l.jsxs("div",{className:"px-3 py-2 border-t border-terminal-border-subtle",children:[l.jsx("div",{className:"text-xs text-terminal-dim font-mono mb-1",children:"Result:"}),l.jsx("pre",{className:"text-xs text-terminal-text font-mono whitespace-pre-wrap break-words max-h-[200px] overflow-y-auto",children:r.result})]}),r.images&&r.images.length>0&&l.jsx("div",{className:"px-3 py-2 border-t border-terminal-border-subtle",children:l.jsx("div",{className:"flex gap-2 flex-wrap",children:r.images.map((m,x)=>l.jsx("img",{src:m,alt:`Screenshot ${x+1}`,className:"max-w-[400px] max-h-[300px] rounded-md object-contain"},x))})})]})]})})});function qp(s,r){switch(s){case"Read":return r.file_path||"";case"Glob":return r.pattern||"";case"Grep":return`/${r.pattern||""}/ ${r.path||""}`;case"Agent":return r.description||"";case"Write":return r.file_path||"";case"Edit":return r.file_path||"";case"WebSearch":return r.query||"";case"WebFetch":return r.url||"";default:return Object.values(r).filter(o=>typeof o=="string").join(" ").slice(0,80)}}const Yp=8,dv=900,fv=y.memo(function({content:r,images:o,isActive:c}){const[d,f]=y.useState(!1);y.useEffect(()=>{const g=v=>{if(!c)return;const w=v.detail;w.action==="expand"?f(!0):w.action==="collapse"&&f(!1)};return window.addEventListener("vibe:toggle-expand",g),()=>window.removeEventListener("vibe:toggle-expand",g)},[c]);const m=y.useMemo(()=>r.split(`
142
+ `),[r]),x=m.length>Yp||r.length>dv,h=y.useMemo(()=>!x||d?r:m.slice(0,Yp).join(`
143
+ `),[r,d,x,m]);return l.jsxs("div",{children:[l.jsxs("div",{className:`text-terminal-green font-mono text-sm whitespace-pre-wrap break-words ${c?"typing-cursor":""}`,children:[h,x&&!d&&l.jsx("span",{className:"text-terminal-dim",children:`
144
+ ...`})]}),x&&l.jsxs("button",{onClick:()=>f(g=>!g),className:"mt-1 text-xs font-mono text-terminal-dim hover:text-terminal-green transition-colors duration-200 ease-material flex items-center gap-1.5",children:[c&&l.jsx("span",{className:"text-secondary-text font-bold opacity-70",children:d?"[←]":"[→]"}),l.jsx("span",{children:d?"Show less":`Show more (${m.length} lines)`})]}),o&&o.length>0&&l.jsx("div",{className:"flex gap-2 mt-2 flex-wrap",children:o.map((g,v)=>l.jsx("img",{src:g,alt:`Attachment ${v+1}`,className:"max-w-[300px] max-h-[200px] rounded-md object-contain"},v))})]})});function Qr(s){if(!s)return"";try{return new Date(s).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return""}}function mv({scenes:s,visibleCount:r,currentIndex:o,effectivePrefs:c,focusIndex:d,annotatedScenes:f,annotationCounts:m,onComment:x,onSeek:h,state:g,overlayActions:v}){const w=y.useMemo(()=>{const j=[];let S=null,C=0;for(let E=0;E<s.length;E++){const k=s[E];if(k.type==="user-prompt"||k.type==="compaction-summary"){S&&S.scenes.length>0&&j.push(S);const _=k.type==="compaction-summary"?"compaction":"user";_==="user"&&C++,j.push({type:_,timestamp:k.timestamp,scenes:[{scene:k,index:E}],turnNumber:_==="user"?C:void 0}),S=null}else(!S||S.type!=="assistant")&&(S&&S.scenes.length>0&&j.push(S),S={type:"assistant",timestamp:k.timestamp,scenes:[]}),S.scenes.push({scene:k,index:E})}return S&&S.scenes.length>0&&j.push(S),j},[s]),T=y.useMemo(()=>c.promptsOnly?w.filter(j=>(j.type==="user"||j.type==="compaction")&&j.scenes[0].index<r):w.filter(j=>j.scenes[0].index<r),[w,r,c.promptsOnly]),N=y.useMemo(()=>{for(let j=T.length-1;j>=0;j--)if(T[j].scenes.some(S=>S.index<=o))return j;return T.length-1},[T,o]);return l.jsxs("div",{className:"max-w-4xl mx-auto space-y-5 pb-6",children:[T.map((j,S)=>l.jsx(pv,{forceRender:S>=N-15&&S<=N+5,children:l.jsx(hv,{group:j,currentIndex:o,visibleCount:r,effectivePrefs:c,focusIndex:d,annotatedScenes:f,annotationCounts:m,onComment:x,overlayActions:v})},S)),g==="paused"&&r<s.length&&l.jsx("div",{className:"pt-4 pb-12 flex items-center justify-center animate-in fade-in slide-in-from-bottom-2 duration-700 ease-out select-none",children:l.jsxs("div",{className:"group/pause relative flex items-center gap-8 px-4 py-2 bg-transparent backdrop-blur-sm",children:[l.jsx("div",{className:"absolute inset-0 bg-terminal-orange/5 opacity-0 group-hover/pause:opacity-100 transition-opacity duration-700 blur-2xl -z-10"}),l.jsxs("div",{className:"flex items-center gap-2.5 pr-8 border-r border-terminal-border/20",children:[l.jsxs("div",{className:"relative flex h-2 w-2",children:[l.jsx("div",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-terminal-orange opacity-40"}),l.jsx("div",{className:"relative inline-flex rounded-full h-2 w-2 bg-terminal-orange/80 shadow-[0_0_8px_rgba(251,146,60,0.5)]"})]}),l.jsx("span",{className:"text-[10px] font-sans font-black text-terminal-orange uppercase tracking-[.25em] drop-shadow-sm",children:"Paused"})]}),l.jsxs("div",{className:"flex items-center gap-8",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"flex items-center gap-1.5 px-2 py-0.5 rounded bg-terminal-surface-hover/80 border border-terminal-border-subtle/50 text-terminal-text shadow-sm",children:l.jsx("span",{className:"text-[11px] font-mono font-bold",children:"↓"})}),l.jsx("span",{className:"text-[10px] font-sans font-bold text-terminal-dim uppercase tracking-widest opacity-80",children:"Explore"})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"flex items-center gap-1.5 px-2 py-0.5 rounded bg-terminal-surface-hover/80 border border-terminal-border-subtle/50 text-terminal-text shadow-sm",children:l.jsx("span",{className:"text-[9px] font-mono font-black tracking-tight",children:"SPACE"})}),l.jsx("span",{className:"text-[10px] font-sans font-bold text-terminal-dim uppercase tracking-widest opacity-80",children:"Resume"})]})]})]})}),r>=s.length&&l.jsxs("div",{className:"pt-12 pb-24 flex flex-col items-center justify-center animate-in fade-in zoom-in-95 duration-1000 ease-out select-none",children:[l.jsx("div",{className:"h-px w-8 bg-terminal-border-subtle mb-6"}),l.jsxs("div",{className:"flex flex-col items-center gap-1",children:[l.jsx("div",{className:"text-[10px] font-mono font-bold text-terminal-dimmer uppercase tracking-[0.3em]",children:"the end"}),l.jsx("div",{className:"text-[9px] font-mono text-terminal-border uppercase tracking-widest mt-1",children:"session replay complete"})]}),l.jsxs("div",{className:"mt-8 flex flex-col items-center gap-6",children:[l.jsxs("button",{onClick:()=>h?.(0),className:"group flex items-center gap-2.5 px-3.5 py-1.5 rounded-full bg-terminal-surface/30 border border-terminal-border-subtle text-terminal-dimmer hover:text-terminal-green hover:border-terminal-green/30 hover:bg-terminal-green/5 transition-all duration-300",children:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform duration-300 group-hover:-translate-y-0.5",children:l.jsx("path",{d:"m18 15-6-6-6 6"})}),l.jsx("span",{className:"text-[10px] font-mono font-bold uppercase tracking-widest transition-colors",children:"Back to Top"}),l.jsxs("span",{className:"text-[9px] font-mono font-bold opacity-0 group-hover:opacity-60 transition-opacity",children:[" ","[Home]"]})]}),l.jsxs("div",{className:"flex items-center gap-3 opacity-20",children:[l.jsx("div",{className:"w-1 h-1 rounded-full bg-terminal-green"}),l.jsx("div",{className:"w-1 h-1 rounded-full bg-terminal-blue"}),l.jsx("div",{className:"w-1 h-1 rounded-full bg-terminal-orange"})]})]})]})]})}const pv=y.memo(function({children:r,forceRender:o}){const c=y.useRef(null),[d,f]=y.useState(!1),m=y.useRef(0);y.useEffect(()=>{const h=c.current;if(!h)return;const g=new IntersectionObserver(([v])=>{f(v.isIntersecting),v.isIntersecting&&h.offsetHeight>0&&(m.current=h.offsetHeight)},{rootMargin:"800px 0px"});return g.observe(h),()=>g.disconnect()},[]);const x=d||o;return y.useEffect(()=>{x&&c.current&&c.current.offsetHeight>0&&(m.current=c.current.offsetHeight)}),l.jsx("div",{ref:c,style:!x&&m.current>0?{minHeight:m.current}:void 0,children:x?r:null})}),hv=y.memo(function({group:r,currentIndex:o,visibleCount:c,effectivePrefs:d,focusIndex:f,annotatedScenes:m,annotationCounts:x,onComment:h,overlayActions:g}){const[v,w]=y.useState(!1),T=y.useMemo(()=>r.scenes.filter(z=>z.index<c),[r.scenes,c]),N=T.some(({index:z})=>z===o),j=typeof f=="number"&&T.some(({index:z})=>z===f),S=T[0]?.index;if(T.length===0)return null;const C=r.type==="user"&&x?.get(S)||0,E=r.type==="user"&&h&&(C>0||v)?l.jsxs("button",{onClick:z=>{z.stopPropagation(),h(S)},className:`absolute right-0 top-3 z-10 flex items-center gap-1 px-1.5 py-1 rounded-md text-xs font-mono transition-all duration-150 ${C>0?"bg-terminal-blue text-terminal-bg shadow-layer-sm":"text-terminal-dim hover:text-terminal-blue hover:bg-terminal-blue-subtle opacity-0 group-hover:opacity-100"}`,title:C>0?`${C} comment${C>1?"s":""}`:"Add comment",children:["💬",C>0&&l.jsx("span",{children:C})]}):null;if(r.type==="user")return l.jsxs("div",{id:`scene-${S}`,"data-scene-index":S,className:`group relative rounded-2xl px-5 py-4 transition-all duration-200 ease-material ml-4 md:ml-12 border ${j?"scene-nav-focused bg-terminal-green-emphasis border-terminal-green shadow-layer-lg":N?"bg-terminal-green-subtle border-terminal-green/30 shadow-layer-sm":"bg-terminal-surface border-terminal-border-subtle shadow-sm"}`,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:[E,l.jsxs("div",{className:"flex items-center gap-2 mb-2.5",children:[l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-green uppercase tracking-widest",children:"You"}),r.timestamp&&l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:Qr(r.timestamp)}),l.jsx("div",{className:"flex-1"}),j?l.jsx("span",{className:"text-[10px] font-sans font-medium uppercase tracking-widest px-2 py-0.5 rounded-full bg-terminal-green text-terminal-bg",children:"Jump Target"}):N&&l.jsx("span",{className:"text-[10px] font-sans font-medium uppercase tracking-widest px-2 py-0.5 rounded-full bg-terminal-green-subtle text-terminal-green border border-terminal-green/20",children:"Focused"}),r.turnNumber!==void 0&&l.jsxs("span",{className:"text-[10px] font-mono text-terminal-dimmer font-bold",children:["#",String(r.turnNumber).padStart(2,"0")]})]}),l.jsx("div",{className:"text-left",children:T.map(({scene:z,index:U})=>{const J=g?.getOverlays(U)??[],Z=g?.getEffectiveContent(U),re=g?.showOriginal.has(U);return l.jsxs("div",{className:"scene-enter",children:[l.jsx(fi,{scene:z,isActive:U===o,collapseTools:d.collapseAllTools,effectiveContent:Z??void 0}),J.length>0&&l.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[J.map(ae=>l.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded bg-terminal-purple-subtle text-terminal-purple",children:ae.source.type==="translate"?"Translated":ae.source.type==="tone"?"Softened":"Modified"},ae.id)),l.jsx("button",{onClick:()=>g?.toggleOriginal(U),className:"text-[10px] font-mono text-terminal-dim hover:text-terminal-text transition-colors",children:re?"Show modified":"Show original"}),l.jsx("button",{onClick:()=>g?.revertSceneOverlays(U),className:"text-[10px] font-mono text-terminal-dim hover:text-terminal-red transition-colors",children:"Revert"})]})]},U)})})]});if(r.type==="compaction"){const z=T[0]?.scene;return!z||z.type!=="compaction-summary"?null:l.jsxs("div",{id:`scene-${S}`,"data-scene-index":S,className:`group relative rounded-xl px-5 py-3.5 transition-all duration-200 ease-material ${j?"scene-nav-focused bg-terminal-surface border-l-2 border-terminal-dim shadow-layer-sm":N?"bg-terminal-surface border-l-2 border-terminal-dim shadow-layer-sm":"bg-terminal-surface/50"}`,children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-dim uppercase tracking-widest",children:"Context Compaction"}),r.timestamp&&l.jsx("span",{className:"text-xs font-mono text-terminal-dimmer",children:Qr(r.timestamp)})]}),l.jsx(wh,{content:z.content,isActive:S===o})]})}const k=d.hideThinking?T.filter(z=>z.scene.type!=="thinking"):T;if(k.length===0)return null;const _=d.hideThinking?r.scenes.filter(z=>z.scene.type!=="thinking"):r.scenes;return d.compactAssistant?l.jsx(gv,{allScenes:_,filteredScenes:k,firstIndex:S,currentIndex:o,groupHasCurrent:N,groupHasFocusedTarget:j,timestamp:r.timestamp,annotationCounts:x,onComment:h,overlayActions:g}):l.jsxs("div",{id:`scene-${S}`,"data-scene-index":S,className:`relative rounded-xl px-5 py-4 transition-all duration-200 ease-material ${j?"scene-nav-focused bg-terminal-blue-subtle border-l-2 border-terminal-blue shadow-layer-lg":N?"bg-terminal-blue-subtle border-l-2 border-terminal-blue shadow-layer-sm":"bg-terminal-surface shadow-layer-sm"}`,children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-blue uppercase tracking-widest",children:"Assistant"}),r.timestamp&&l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:Qr(r.timestamp)}),l.jsx("div",{className:"flex-1"}),j?l.jsx("span",{className:"text-[10px] font-sans font-medium uppercase tracking-widest px-2 py-0.5 rounded-full bg-terminal-blue-emphasis text-terminal-blue",children:"Jump Target"}):N&&l.jsx("span",{className:"text-[10px] font-sans font-medium uppercase tracking-widest px-2 py-0.5 rounded-full bg-terminal-blue-subtle text-terminal-blue",children:"Focused"}),r.turnNumber!==void 0&&l.jsxs("span",{className:"text-[10px] font-mono text-terminal-dimmer font-bold",children:["#",String(r.turnNumber).padStart(2,"0")]})]}),l.jsx("div",{className:"space-y-2",children:l.jsx(bv,{scenes:k,currentIndex:o,collapseTools:d.collapseAllTools,annotationCounts:x,onComment:h,overlayActions:g})})]})});function xv(s){if(s.startsWith("mcp__")){const r=s.split("__");return r[r.length-1]}return s}function gv({allScenes:s,filteredScenes:r,firstIndex:o,currentIndex:c,groupHasCurrent:d,groupHasFocusedTarget:f,timestamp:m,annotationCounts:x,onComment:h,overlayActions:g}){const[v,w]=y.useState(!1);y.useEffect(()=>{const k=_=>{if(!d)return;const z=_.detail;z.action==="expand"?w(!0):z.action==="collapse"&&w(!1)};return window.addEventListener("vibe:toggle-expand",k),()=>window.removeEventListener("vibe:toggle-expand",k)},[d]);const T=y.useMemo(()=>{const k={},_=new Set;let z=0,U=0,J=0;for(const{scene:Z}of s)if(Z.type==="tool-call"){J++;const re=xv(Z.toolName);if(k[re]=(k[re]||0)+1,Z.toolName==="Bash"&&Z.input?.command){const ae=Z.input.command.trim().split(/[\s|;&]/)[0];ae&&_.add(ae)}}else Z.type==="text-response"?z++:Z.type==="thinking"&&U++;return{totalTools:J,toolBreakdown:k,responses:z,thinking:U,bashCommands:[..._]}},[s]),N=y.useMemo(()=>{for(let k=s.length-1;k>=0;k--)if(s[k].scene.type==="text-response")return s[k];return null},[s]),j=y.useMemo(()=>{const k=["Read","Write","Edit","Bash","Glob","Grep","Agent"],_=Object.entries(T.toolBreakdown);return _.sort((z,U)=>{const J=k.indexOf(z[0]),Z=k.indexOf(U[0]),re=J>=0?J:100,ae=Z>=0?Z:100;return re-ae}),_},[T.toolBreakdown]),S=y.useMemo(()=>x?s.reduce((k,{index:_})=>k+(x.get(_)||0),0):0,[s,x]),[C,E]=y.useState(!1);return l.jsxs("div",{id:`scene-${o}`,"data-scene-index":o,className:`group relative rounded-xl px-5 py-4 transition-all duration-200 ease-material ${f?"scene-nav-focused bg-terminal-blue-subtle border-l-2 border-terminal-blue shadow-layer-lg":d?"bg-terminal-blue-subtle border-l-2 border-terminal-blue shadow-layer-sm":"bg-terminal-surface shadow-layer-sm"}`,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),children:[h&&(S>0||C)&&!v&&l.jsxs("button",{onClick:k=>{k.stopPropagation(),h(o)},className:`absolute right-3 top-3 z-10 flex items-center gap-1 px-1.5 py-1 rounded-md text-xs font-mono transition-all duration-150 ${S>0?"bg-terminal-blue text-terminal-bg shadow-layer-sm":"text-terminal-dim hover:text-terminal-blue hover:bg-terminal-blue-subtle opacity-0 group-hover:opacity-100"}`,title:S>0?`${S} comment${S>1?"s":""}`:"Add comment",children:["💬",S>0&&l.jsx("span",{children:S})]}),l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-blue uppercase tracking-widest",children:"Assistant"}),m&&l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:Qr(m)}),l.jsx("div",{className:"flex-1"}),f?l.jsx("span",{className:"text-[10px] font-sans font-medium uppercase tracking-widest px-2 py-0.5 rounded-full bg-terminal-blue-emphasis text-terminal-blue",children:"Jump Target"}):d&&l.jsx("span",{className:"text-[10px] font-sans font-medium uppercase tracking-widest px-2 py-0.5 rounded-full bg-terminal-blue-subtle text-terminal-blue",children:"Focused"})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 mb-3 text-[11px] font-mono",children:[T.responses>0&&l.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-terminal-blue-subtle text-terminal-blue",children:[T.responses," response",T.responses>1?"s":""]}),T.totalTools>0&&l.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-terminal-orange-subtle text-terminal-orange",children:[T.totalTools," tool",T.totalTools>1?"s":""]}),T.thinking>0&&l.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-terminal-purple-subtle text-terminal-purple",children:[T.thinking," thinking"]}),j.length>0&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-terminal-border mx-0.5",children:"|"}),j.map(([k,_])=>l.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded bg-terminal-surface-hover text-terminal-dim",children:[l.jsx("span",{className:"text-terminal-orange",children:k}),k==="Bash"&&T.bashCommands.length>0&&l.jsxs("span",{className:"text-terminal-dimmer",children:["(",T.bashCommands.slice(0,4).join(", "),T.bashCommands.length>4?", ...":"",")"]}),l.jsx("span",{children:_})]},k))]})]}),N&&!v&&l.jsx("div",{className:"mb-2",children:l.jsx(Sh,{content:g?.getEffectiveContent(N.index)??N.scene.content,isActive:N.index===c})}),v&&l.jsx("div",{className:"space-y-2 mb-2",children:r.map(({scene:k,index:_})=>{const z=x?.get(_)||0,U=k.type==="text-response"?g?.getEffectiveContent(_)??void 0:void 0;return l.jsxs("div",{"data-scene-index":_,className:`group/scene relative scene-enter ${h?"pr-7":""}`,children:[l.jsx(fi,{scene:k,isActive:_===c,collapseTools:!1,effectiveContent:U}),h&&l.jsxs("button",{onClick:J=>{J.stopPropagation(),h(_)},className:`absolute right-0 top-1 z-10 flex items-center gap-0.5 px-1.5 py-0.5 rounded-md text-xs font-mono transition-all duration-150 ${z>0?"bg-terminal-blue text-terminal-bg shadow-layer-sm":"text-terminal-dim hover:text-terminal-blue hover:bg-terminal-blue-subtle opacity-0 group-hover/scene:opacity-100"}`,title:z>0?`${z} comment${z>1?"s":""}`:"Add comment",children:["💬",z>0&&l.jsx("span",{children:z})]})]},_)})}),l.jsxs("button",{onClick:()=>w(!v),className:"text-xs font-mono text-terminal-dim hover:text-terminal-blue transition-colors flex items-center gap-1.5",children:[d&&l.jsx("span",{className:"text-secondary-text font-bold opacity-70",children:v?"[←]":"[→]"}),l.jsx("span",{children:v?"Collapse":"Show all details"})]})]})}function bv({scenes:s,currentIndex:r,collapseTools:o,annotationCounts:c,onComment:d,overlayActions:f}){const m=[];let x=[];for(const h of s){const g=x[x.length-1];g&&g.scene.type==="tool-call"&&h.scene.type==="tool-call"&&g.scene.toolName===h.scene.toolName&&!h.scene.diff&&!h.scene.bashOutput&&!g.scene.diff&&!g.scene.bashOutput?x.push(h):(x.length>0&&m.push(x),x=[h])}return x.length>0&&m.push(x),l.jsx(l.Fragment,{children:m.map(h=>{if(h.length<=1){const{scene:v,index:w}=h[0],T=c?.get(w)||0,N=v.type==="text-response"?f?.getEffectiveContent(w):void 0,j=v.type==="text-response"?f?.getOverlays(w)??[]:[];return l.jsxs("div",{"data-scene-index":w,className:`group/scene relative scene-enter ${d?"pr-7":""}`,children:[l.jsx(fi,{scene:v,isActive:w===r,collapseTools:o,effectiveContent:N??void 0}),j.length>0&&l.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[j.map(S=>l.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded bg-terminal-purple-subtle text-terminal-purple",children:S.source.type==="translate"?"Translated":S.source.type==="tone"?"Softened":"Modified"},S.id)),l.jsx("button",{onClick:()=>f?.toggleOriginal(w),className:"text-[10px] font-mono text-terminal-dim hover:text-terminal-text transition-colors",children:f?.showOriginal.has(w)?"Show modified":"Show original"}),l.jsx("button",{onClick:()=>f?.revertSceneOverlays(w),className:"text-[10px] font-mono text-terminal-dim hover:text-terminal-red transition-colors",children:"Revert"})]}),d&&l.jsxs("button",{onClick:S=>{S.stopPropagation(),d(w)},className:`absolute right-0 top-1 z-10 flex items-center gap-0.5 px-1.5 py-0.5 rounded-md text-xs font-mono transition-all duration-150 ${T>0?"bg-terminal-blue text-terminal-bg shadow-layer-sm":"text-terminal-dim hover:text-terminal-blue hover:bg-terminal-blue-subtle opacity-0 group-hover/scene:opacity-100"}`,title:T>0?`${T} comment${T>1?"s":""}`:"Add comment",children:["💬",T>0&&l.jsx("span",{children:T})]})]},w)}const g=h[0].scene.toolName;return l.jsx(yv,{batch:h,toolName:g,currentIndex:r,collapseTools:o,annotationCounts:c,onComment:d},h[0].index)})})}function yv({batch:s,toolName:r,currentIndex:o,collapseTools:c,annotationCounts:d,onComment:f}){const[m,x]=y.useState(!1),h=d?s.reduce((v,{index:w})=>v+(d.get(w)||0),0):0,g=s.map(({scene:v})=>v.type==="tool-call"?vv(v.toolName,v.input):"");return l.jsxs("div",{"data-scene-index":s[0].index,className:`group/batch relative ${f?"pr-7":""}`,children:[l.jsxs("button",{onClick:()=>x(!m),className:"w-full flex items-center gap-2 px-3.5 py-2.5 text-xs font-mono text-terminal-dim rounded-xl bg-terminal-surface hover:bg-terminal-surface-hover transition-all duration-200 ease-material cursor-pointer text-left shadow-layer-sm",children:[l.jsx("span",{className:`transition-transform text-xs ${m?"rotate-90":""}`,children:"▶"}),l.jsx("span",{className:"text-terminal-orange font-semibold",children:r}),l.jsxs("span",{className:"text-terminal-dimmer",children:[s.length," call",s.length>1?"s":""]}),!m&&l.jsxs("span",{className:"truncate text-terminal-dimmer ml-1",children:[g.filter(Boolean).slice(0,3).join(", "),g.filter(Boolean).length>3&&"..."]})]}),f&&!m&&l.jsxs("button",{onClick:v=>{v.stopPropagation(),f(s[0].index)},className:`absolute right-0 top-1 z-10 flex items-center gap-0.5 px-1.5 py-0.5 rounded-md text-xs font-mono transition-all duration-150 ${h>0?"bg-terminal-blue text-terminal-bg shadow-layer-sm":"text-terminal-dim hover:text-terminal-blue hover:bg-terminal-blue-subtle opacity-0 group-hover/batch:opacity-100"}`,title:h>0?`${h} comment${h>1?"s":""}`:"Add comment",children:["💬",h>0&&l.jsx("span",{children:h})]}),m&&l.jsx("div",{className:"mt-1 ml-4 space-y-2 pl-4",children:s.map(({scene:v,index:w})=>{const T=d?.get(w)||0;return l.jsxs("div",{"data-scene-index":w,className:`group/scene relative scene-enter ${f?"pr-7":""}`,children:[l.jsx(fi,{scene:v,isActive:w===o,collapseTools:c}),f&&l.jsxs("button",{onClick:N=>{N.stopPropagation(),f(w)},className:`absolute right-0 top-1 z-10 flex items-center gap-0.5 px-1.5 py-0.5 rounded-md text-xs font-mono transition-all duration-150 ${T>0?"bg-terminal-blue text-terminal-bg shadow-layer-sm":"text-terminal-dim hover:text-terminal-blue hover:bg-terminal-blue-subtle opacity-0 group-hover/scene:opacity-100"}`,title:T>0?`${T} comment${T>1?"s":""}`:"Add comment",children:["💬",T>0&&l.jsx("span",{children:T})]})]},w)})})]})}function vv(s,r){switch(s){case"Read":return r.file_path||"";case"Glob":return r.pattern||"";case"Grep":return r.pattern||"";case"Agent":return r.description||"";default:return""}}const fi=y.memo(function({scene:r,isActive:o,collapseTools:c,effectiveContent:d}){switch(r.type){case"user-prompt":return l.jsx(fv,{content:d??r.content,images:r.images,isActive:o});case"compaction-summary":return l.jsx(wh,{content:r.content,isActive:o});case"thinking":return l.jsx(Qy,{content:r.content,isActive:o});case"text-response":return l.jsx(Sh,{content:d??r.content,isActive:o});case"tool-call":return l.jsx(uv,{scene:r,isActive:o,forceCollapse:c})}}),jv=8;function Lc(s){const r=new URLSearchParams(window.location.search).get("session");if(!r)return s;const o=s.includes("?")?"&":"?";return`${s}${o}slug=${encodeURIComponent(r)}`}function Zp({title:s,color:r}){return l.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[l.jsx("span",{className:`text-[10px] font-sans font-semibold uppercase tracking-widest ${r}`,children:s}),l.jsx("div",{className:"flex-1 h-px bg-terminal-border-subtle"})]})}function Fp({text:s,label:r}){const[o,c]=y.useState(!1);return l.jsx("button",{onClick:async()=>{await navigator.clipboard.writeText(s),c(!0),setTimeout(()=>c(!1),2e3)},className:"text-[10px] font-mono text-terminal-dim hover:text-terminal-text transition-colors px-1.5 py-0.5 rounded bg-terminal-surface hover:bg-terminal-surface-hover border border-terminal-border-subtle",title:"Copy to clipboard",children:o?"Copied!":r||"Copy"})}function Xr(s){try{const r=Date.now()-new Date(s).getTime(),o=Math.floor(r/6e4);if(o<1)return"just now";if(o<60)return`${o}m ago`;const c=Math.floor(o/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return""}}function Xp(s,r=!1){const o=r?Math.round(s*.75):s;if(o<1024)return`${o} B`;const c=o/1024;return c<1024?`${c.toFixed(1)} KB`:`${(c/1024).toFixed(1)} MB`}function Bc({label:s,path:r}){return l.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono text-terminal-dim",children:[l.jsx("span",{className:"text-terminal-dimmer w-8 shrink-0",children:s}),l.jsx("span",{className:"text-terminal-text truncate",children:r})]})}function wv({actions:s,viewerMode:r,readOnly:o,session:c}){const{hasUnsaved:d,canSaveHtml:f,downloadHtml:m,downloadJson:x,publishGist:h,exportHtml:g,exportGithub:v,gistPublishing:w,htmlExporting:T,githubExporting:N}=s,j=r==="editor",[S,C]=y.useState(null),[E,k]=y.useState(null),[_,z]=y.useState(null),[U,J]=y.useState(null),[Z,re]=y.useState(!1),[ae,P]=y.useState(null),[V,oe]=y.useState(!1),[ce,ne]=y.useState(null),[pe,B]=y.useState("preview");y.useEffect(()=>{j&&(h&&(fetch(Lc("/api/gh-status")).then(D=>D.json()).then(D=>z(D.available??!1)).catch(()=>z(!1)),re(!0),fetch(Lc("/api/gist-info")).then(D=>D.json()).then(D=>{D.gist&&J(D.gist)}).catch(()=>{}).finally(()=>re(!1))),v&&fetch(Lc("/api/export/github/status")).then(D=>D.json()).then(D=>{D.exists&&P({svgContent:D.svgContent,markdown:D.markdown,svgPath:D.svgPath,mdPath:D.mdPath,gifContent:D.gifContent??null,gifPath:D.gifPath??null,gifGeneratedAt:D.gifGeneratedAt,svgGeneratedAt:D.svgGeneratedAt,mdGeneratedAt:D.mdGeneratedAt,replayUrl:D.replayUrl})}).catch(()=>{}))},[j,h,v]);const W=y.useCallback(async()=>{if(h){k(null);try{const D=await h();J({gistId:D.gistId,gistUrl:D.gistUrl,viewerUrl:D.viewerUrl,updatedAt:new Date().toISOString()}),k({type:"success",text:"Published successfully!"})}catch(D){k({type:"error",text:D.message})}}},[h]),ie=y.useCallback(async()=>{if(v){ne(null),oe(!0);try{const D=await v();await navigator.clipboard.writeText(D.markdown),P({svgContent:D.svgContent,markdown:D.markdown,svgPath:D.svgPath,mdPath:D.mdPath,gifContent:D.gifContent??null,gifPath:D.gifPath??null,gifGeneratedAt:D.gifGeneratedAt,svgGeneratedAt:D.svgGeneratedAt,mdGeneratedAt:D.mdGeneratedAt,replayUrl:D.replayUrl,warnings:D.warnings})}catch(D){ne(D.message)}finally{oe(!1)}}},[v]),le=y.useMemo(()=>{if(!ae?.markdown)return"";const D=ae.markdown.replace(/\[?!\[[^\]]*\]\([^)]*\.(?:svg|gif)\)\]?(?:\([^)]*\))?\n*/g,"");return ou(Ue.parse(D))},[ae?.markdown]),se=y.useMemo(()=>ae?.svgContent?Gy(ae.svgContent):"",[ae?.svgContent]);if(o)return l.jsx("div",{className:"p-6 text-center text-xs font-mono text-terminal-dim",children:"Export is not available in read-only mode"});const A=_===!1,O="px-4 py-2 text-xs font-mono rounded-lg transition-colors text-center disabled:opacity-50 shrink-0";return l.jsx("div",{className:"flex-1 overflow-y-auto",children:l.jsxs("div",{className:"p-6 max-w-3xl mx-auto",children:[c&&l.jsxs("div",{className:"flex items-center gap-2.5 mb-5",children:[l.jsx("h2",{className:"text-sm font-mono font-semibold text-terminal-text truncate",children:c.meta.title||c.meta.slug}),c.meta.provider&&l.jsx("span",{className:"shrink-0 text-[10px] font-mono text-terminal-dimmer px-1.5 py-0.5 rounded bg-terminal-surface border border-terminal-border-subtle",children:c.meta.provider})]}),d&&l.jsx("div",{className:"text-xs font-mono text-terminal-orange text-center mb-5 px-3 py-2 rounded-lg bg-terminal-orange-subtle border border-terminal-orange/20",children:"You have unsaved annotation changes"}),j&&h&&l.jsxs("div",{className:"mb-8",children:[l.jsx(Zp,{title:"Share",color:"text-terminal-purple"}),l.jsx("div",{className:"bg-terminal-surface rounded-2xl border border-terminal-border-subtle shadow-layer-sm overflow-hidden",children:l.jsxs("div",{className:"p-5",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx("span",{className:"text-sm font-mono font-semibold text-terminal-purple",children:"GitHub Gist"}),l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-mono text-terminal-dim px-1.5 py-0.5 rounded-full bg-terminal-surface-hover border border-terminal-border-subtle",children:[l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("circle",{cx:"12",cy:"12",r:"10"}),l.jsx("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),l.jsx("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]}),"Public"]})]}),l.jsx("p",{className:"text-[11px] font-mono text-terminal-dim leading-relaxed",children:"Publish as a public GitHub Gist. Anyone with the link can view the interactive replay on vibe-replay.com."})]}),U&&l.jsxs("div",{className:"mt-4 space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-mono font-semibold text-terminal-green px-2 py-0.5 rounded-full bg-terminal-green-subtle",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-green"}),"Published"]}),l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:Xr(U.updatedAt)})]}),l.jsxs("div",{className:"flex items-center gap-2 bg-terminal-bg rounded-lg px-3 py-2 border border-terminal-border-subtle",children:[l.jsx("a",{href:U.viewerUrl,target:"_blank",rel:"noopener noreferrer",className:"flex-1 text-xs font-mono text-terminal-blue hover:text-terminal-text transition-colors truncate",children:U.viewerUrl}),l.jsx(Fp,{text:U.viewerUrl})]}),l.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono text-terminal-dim",children:[l.jsx("span",{children:"Gist:"}),l.jsx("a",{href:U.gistUrl,target:"_blank",rel:"noopener noreferrer",className:"text-terminal-dim hover:text-terminal-text transition-colors truncate",children:U.gistUrl})]})]}),Z&&!U&&l.jsx("div",{className:"mt-4 text-[11px] font-mono text-terminal-dimmer animate-pulse",children:"Checking publish status..."}),l.jsx("div",{className:"mt-4 flex items-center gap-3",children:A?l.jsxs("div",{className:"flex-1 text-xs font-mono text-terminal-orange px-3 py-2 rounded-lg bg-terminal-orange-subtle/50 border border-terminal-orange/10",children:["Requires"," ",l.jsx("a",{href:"https://cli.github.com/",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"gh CLI"})," ","— install then run"," ",l.jsx("span",{className:"text-terminal-text font-semibold",children:"gh auth login"})]}):_===null?l.jsx("div",{className:"text-[11px] font-mono text-terminal-dimmer animate-pulse",children:"Checking gh CLI..."}):l.jsxs(l.Fragment,{children:[l.jsx("button",{onClick:W,disabled:w,className:`${O} ${U?"bg-terminal-surface-hover text-terminal-purple hover:bg-terminal-purple-subtle border border-terminal-border":"bg-terminal-purple-subtle text-terminal-purple hover:bg-[rgba(168,85,247,0.25)] border border-[rgba(168,85,247,0.2)]"}`,children:w?"Publishing...":U?"Update Gist":"Publish to Gist"}),E&&l.jsx("span",{className:`text-[11px] font-mono ${E.type==="success"?"text-terminal-green":"text-terminal-red"}`,children:E.text})]})})]})})]}),l.jsxs("div",{children:[l.jsx(Zp,{title:"Export",color:"text-terminal-green"}),l.jsxs("div",{className:"space-y-4",children:[j&&v&&l.jsxs(l.Fragment,{children:[ae?.gifContent&&l.jsxs("div",{className:"bg-terminal-surface rounded-2xl border border-terminal-border-subtle shadow-layer-sm overflow-hidden",children:[l.jsxs("div",{className:"px-5 py-3 flex items-center justify-between border-b border-terminal-border-subtle",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-mono font-semibold text-terminal-green",children:"Animated GIF"}),l.jsx("p",{className:"text-[10px] font-mono text-terminal-dim mt-0.5",children:"Works everywhere: GitHub PRs, issues, READMEs, Slack, Discord. Shows up to 8 turns."})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[ae.gifGeneratedAt&&l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:Xr(ae.gifGeneratedAt)}),l.jsx("button",{onClick:ie,disabled:V||N,className:"text-[11px] font-mono text-terminal-dim hover:text-terminal-green transition-colors px-1.5 py-0.5 rounded bg-terminal-bg hover:bg-terminal-surface-hover border border-terminal-border-subtle",title:"Regenerate all exports",children:V||N?l.jsx("span",{className:"animate-pulse",children:"..."}):l.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),l.jsx("path",{d:"M21 3v5h-5"}),l.jsx("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),l.jsx("path",{d:"M8 16H3v5"})]})})]})]}),l.jsx("div",{className:"bg-terminal-bg p-2 flex justify-center border-y border-terminal-border-subtle",children:l.jsx("img",{src:`data:image/gif;base64,${ae.gifContent}`,alt:"Session preview GIF",className:"w-full h-auto block"})}),l.jsxs("div",{className:"px-5 py-3 space-y-1.5 border-t border-terminal-border-subtle",children:[ae.gifPath&&l.jsx(Bc,{label:"File",path:`${ae.gifPath} (${Xp(ae.gifContent?.length??0,!0)})`}),l.jsxs("p",{className:"text-[10px] font-mono text-terminal-dimmer leading-relaxed pt-1",children:["Usage:"," ",l.jsx("span",{className:"text-terminal-text",children:"![Session](./session-preview.gif)"})]})]})]}),ae?.svgContent&&l.jsxs("div",{className:"bg-terminal-surface rounded-2xl border border-terminal-border-subtle shadow-layer-sm overflow-hidden",children:[l.jsxs("div",{className:"px-5 py-3 flex items-center justify-between border-b border-terminal-border-subtle",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-mono font-semibold text-terminal-orange",children:"Animated SVG"}),l.jsxs("p",{className:"text-[10px] font-mono text-terminal-dim mt-0.5",children:["Embed in READMEs, PRs, or anywhere that renders SVG. Shows up to"," ",jv," turns."]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[ae.svgGeneratedAt&&l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:Xr(ae.svgGeneratedAt)}),l.jsx("button",{onClick:ie,disabled:V||N,className:"text-[11px] font-mono text-terminal-dim hover:text-terminal-orange transition-colors px-1.5 py-0.5 rounded bg-terminal-bg hover:bg-terminal-surface-hover border border-terminal-border-subtle",title:"Regenerate all exports",children:V||N?l.jsx("span",{className:"animate-pulse",children:"..."}):l.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),l.jsx("path",{d:"M21 3v5h-5"}),l.jsx("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),l.jsx("path",{d:"M8 16H3v5"})]})})]})]}),l.jsx("div",{className:"bg-terminal-bg p-2 border-y border-terminal-border-subtle [&>svg]:w-full [&>svg]:h-auto [&>svg]:block",dangerouslySetInnerHTML:{__html:se}}),l.jsxs("div",{className:"px-5 py-3 space-y-1.5 border-t border-terminal-border-subtle",children:[l.jsx(Bc,{label:"File",path:`${ae.svgPath} (${Xp(ae.svgContent?.length??0)})`}),ae.replayUrl&&l.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono text-terminal-dim",children:[l.jsx("span",{className:"text-terminal-dimmer w-8 shrink-0",children:"Link"}),l.jsx("a",{href:ae.replayUrl,target:"_blank",rel:"noopener noreferrer",className:"text-terminal-blue hover:text-terminal-text transition-colors truncate",children:ae.replayUrl})]}),l.jsxs("p",{className:"text-[10px] font-mono text-terminal-dimmer leading-relaxed pt-1",children:["Usage:"," ",l.jsx("span",{className:"text-terminal-text",children:"![Session](./session-preview.svg)"})]})]})]}),ae?.markdown&&l.jsxs("div",{className:"bg-terminal-surface rounded-2xl border border-terminal-border-subtle shadow-layer-sm overflow-hidden",children:[l.jsxs("div",{className:"px-5 py-3 flex items-center justify-between border-b border-terminal-border-subtle",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-mono font-semibold text-terminal-orange",children:"Markdown Summary"}),l.jsx("p",{className:"text-[10px] font-mono text-terminal-dim mt-0.5",children:"Paste into GitHub PRs, issues, or README files."})]}),ae.mdGeneratedAt&&l.jsx("span",{className:"text-[10px] font-mono text-terminal-dimmer self-start mt-0.5",children:Xr(ae.mdGeneratedAt)})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Fp,{text:ae.markdown,label:"Copy MD"}),l.jsxs("div",{className:"flex items-center h-6 rounded-md overflow-hidden bg-terminal-bg border border-terminal-border-subtle",children:[l.jsx("button",{onClick:()=>B("preview"),className:`h-full px-2.5 text-[10px] font-mono transition-colors ${pe==="preview"?"bg-terminal-orange-subtle text-terminal-orange":"text-terminal-dim hover:text-terminal-text"}`,children:"Preview"}),l.jsx("button",{onClick:()=>B("source"),className:`h-full px-2.5 text-[10px] font-mono transition-colors ${pe==="source"?"bg-terminal-orange-subtle text-terminal-orange":"text-terminal-dim hover:text-terminal-text"}`,children:"Source"})]})]})]}),l.jsx("div",{className:"p-4",children:pe==="preview"?l.jsx("div",{className:"prose-terminal text-xs leading-relaxed bg-terminal-bg rounded-lg border border-terminal-border-subtle p-4 overflow-x-auto",dangerouslySetInnerHTML:{__html:le}}):l.jsx("pre",{className:"bg-terminal-bg rounded-lg border border-terminal-border-subtle p-3 text-[11px] font-mono text-terminal-dim leading-relaxed overflow-x-auto max-h-72 overflow-y-auto whitespace-pre-wrap",children:ae.markdown})}),l.jsx("div",{className:"px-5 py-3 space-y-1.5 border-t border-terminal-border-subtle",children:l.jsx(Bc,{label:"File",path:ae.mdPath})}),ae.warnings&&ae.warnings.length>0&&l.jsxs("div",{className:"mx-5 mb-4 text-[11px] font-mono text-terminal-orange px-3 py-2 rounded-lg bg-terminal-orange-subtle/50 border border-terminal-orange/10",children:[l.jsx("div",{className:"font-semibold mb-1",children:"Security warnings"}),ae.warnings.map((D,ee)=>l.jsx("div",{className:"text-terminal-dim",children:D},ee))]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("button",{onClick:ie,disabled:V||N,className:`${O} ${ae?"bg-terminal-surface-hover text-terminal-orange hover:bg-terminal-orange-subtle border border-terminal-border":"bg-terminal-orange-subtle text-terminal-orange hover:bg-terminal-orange-emphasis border border-terminal-orange/20"}`,children:V||N?"Generating...":ae?"Regenerate GIF + SVG + Markdown":"Generate GIF + SVG + Markdown"}),ce&&l.jsx("span",{className:"text-[11px] font-mono text-terminal-red",children:ce}),!ae&&l.jsx("span",{className:"text-[11px] font-mono text-terminal-dim",children:"For GitHub PRs, READMEs, websites, email, Slack, and more. Shows up to 8 turns."})]})]}),j&&g&&l.jsxs("div",{className:"bg-terminal-surface rounded-2xl border border-terminal-border-subtle shadow-layer-sm p-5",children:[l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-sm font-mono font-semibold text-terminal-green mb-1",children:"HTML Replay"}),l.jsx("p",{className:"text-[11px] font-mono text-terminal-dim leading-relaxed",children:"Self-contained HTML file with zero external requests. Includes all scenes, metadata, and annotations. Share via email, Slack, or host on any static server."})]}),l.jsx("button",{onClick:async()=>{C(null);try{const D=await g();C({type:"success",text:D})}catch(D){C({type:"error",text:D.message})}},disabled:T,className:`${O} bg-terminal-green-subtle text-terminal-green hover:bg-terminal-green-emphasis border border-terminal-green/20`,children:T?"Exporting...":"Export HTML"})]}),S&&l.jsx("div",{className:`mt-3 text-[11px] font-mono ${S.type==="success"?"text-terminal-green":"text-terminal-red"}`,children:S.type==="success"?l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-green shrink-0"}),"Saved to ",S.text]}):S.text})]}),!j&&f&&l.jsx("div",{className:"bg-terminal-surface rounded-2xl border border-terminal-border-subtle shadow-layer-sm p-5",children:l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-sm font-mono font-semibold text-terminal-green mb-1",children:"Save HTML"}),l.jsx("p",{className:"text-[11px] font-mono text-terminal-dim leading-relaxed",children:"Download a self-contained HTML replay file with your comments included."})]}),l.jsx("button",{onClick:m,className:`${O} bg-terminal-green-subtle text-terminal-green hover:bg-terminal-green-emphasis border border-terminal-green/20`,children:"Download HTML"})]})}),l.jsx("div",{className:"bg-terminal-surface rounded-2xl border border-terminal-border-subtle shadow-layer-sm p-5",children:l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-sm font-mono font-semibold text-terminal-blue mb-1",children:"JSON Data"}),l.jsx("p",{className:"text-[11px] font-mono text-terminal-dim leading-relaxed",children:"Raw replay data including all scenes, metadata, and annotations. Useful for backup, re-import, or programmatic analysis."})]}),l.jsx("button",{onClick:x,className:`${O} bg-terminal-blue-subtle text-terminal-blue hover:bg-terminal-blue-emphasis border border-terminal-blue/20`,children:"Download JSON"})]})})]})]})]})})}const Sv=[{title:"Playback",items:[{key:"Space",label:"Play / Pause"},{key:"↑ / ↓",label:"Step Back / Forward"},{key:"Home",label:"Reset to Start"},{key:"End / e",label:"Jump to End"}]},{title:"Navigation",items:[{key:"n / p",label:"Next / Prev Turn"},{key:"← / →",label:"Collapse / Expand Item"}]},{title:"Global",items:[{key:"?",label:"Show Keyboard Shortcuts"},{key:"⌘ K",label:"Open Search"},{key:"Esc",label:"Close Modal / Search"}]}];function Nv({open:s,onClose:r}){const o=y.useCallback(c=>{(c.key==="Escape"||c.key==="?")&&r()},[r]);return y.useEffect(()=>{if(s)return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[s,o]),s?l.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4 bg-black/60 backdrop-blur-md animate-in fade-in duration-300",onClick:r,children:l.jsxs("div",{className:"w-full max-w-lg bg-terminal-bg border border-terminal-border-subtle rounded-2xl shadow-layer-xl overflow-hidden animate-in zoom-in-95 duration-200",onClick:c=>c.stopPropagation(),children:[l.jsxs("div",{className:"px-6 py-5 border-b border-terminal-border-subtle flex items-center justify-between",children:[l.jsx("h2",{className:"text-sm font-sans font-bold uppercase tracking-[0.2em] text-terminal-text",children:"Keyboard Shortcuts"}),l.jsx("button",{onClick:r,className:"text-terminal-dimmer hover:text-terminal-red transition-colors",children:l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),l.jsx("div",{className:"px-6 py-4 grid grid-cols-1 gap-8",children:Sv.map(c=>l.jsxs("div",{className:"space-y-3.5",children:[l.jsx("h3",{className:"text-[10px] font-sans font-bold text-terminal-dimmer uppercase tracking-[0.15em] pl-1",children:c.title}),l.jsx("div",{className:"grid grid-cols-1 gap-2.5",children:c.items.map(d=>l.jsxs("div",{className:"flex items-center justify-between group",children:[l.jsx("span",{className:"text-xs font-sans font-medium text-terminal-dim group-hover:text-terminal-text transition-colors",children:d.label}),l.jsx("kbd",{className:"min-w-[40px] px-2 py-1 flex items-center justify-center text-[11px] font-mono font-bold text-terminal-text bg-terminal-surface border border-terminal-border-subtle rounded-lg shadow-layer-sm",children:d.key})]},d.key))})]},c.title))}),l.jsx("div",{className:"px-6 py-4 bg-terminal-surface/30 border-t border-terminal-border-subtle",children:l.jsxs("p",{className:"text-[10px] font-sans font-medium text-terminal-dimmer text-center uppercase tracking-wider",children:["Press ",l.jsx("span",{className:"text-terminal-text font-mono font-bold",children:"?"})," to toggle this menu anytime"]})})]})}):null}function kv(s){return s==="claude-code"?"Claude Code":s==="cursor"?"Cursor":s}function Ev({session:s,onStart:r,onViewInsights:o}){const{meta:c,scenes:d}=s,f=y.useMemo(()=>{const N=d.find(U=>U.type==="user-prompt");if(!N||N.type!=="user-prompt")return null;const j=N.content,S={};let C=0,E=0,k="",_=0;for(const U of d){if(U.type==="user-prompt"){if(_++,_>1)break;continue}if(_===1)if(U.type==="tool-call"){E++;const J=U.toolName.replace(/^mcp__.*__/,"");S[J]=(S[J]||0)+1}else U.type==="text-response"&&(C++,k=U.content)}const z=Object.entries(S).sort((U,J)=>J[1]-U[1]);return{prompt:j,responses:C,totalTools:E,toolEntries:z,lastResponse:k}},[d]),m=y.useMemo(()=>{const N=new Set;for(const j of d)j.type==="tool-call"&&j.diff&&N.add(j.diff.filePath);return N.size},[d]),x=ga(c.stats.durationMs),h=c.title||c.project,g=kv(c.provider),v=y.useMemo(()=>{const N=[];if(x&&N.push({value:x,label:"Duration",color:"text-terminal-text"}),N.push({value:String(c.stats.userPrompts),label:"Turns",color:"text-terminal-green"}),m>0&&N.push({value:String(m),label:"Files",color:"text-terminal-blue"}),c.stats.costEstimate!==void 0){const j=c.stats.costEstimate;N.push({value:`$${j<.01?j.toFixed(4):j.toFixed(2)}`,label:"Cost",color:"text-terminal-orange"})}return N.length<3&&c.stats.toolCalls>0&&N.push({value:String(c.stats.toolCalls),label:"Tool Calls",color:"text-terminal-orange"}),N},[x,m,c.stats]),w=y.useRef(!1),T=y.useRef(0);return y.useEffect(()=>{const N=C=>{w.current||C.deltaY>0&&(w.current=!0,r(!1))},j=C=>{T.current=C.touches[0].clientY},S=C=>{if(w.current)return;T.current-C.touches[0].clientY>15&&(w.current=!0,r(!1))};return window.addEventListener("wheel",N,{passive:!0}),window.addEventListener("touchstart",j,{passive:!0}),window.addEventListener("touchmove",S,{passive:!0}),()=>{window.removeEventListener("wheel",N),window.removeEventListener("touchstart",j),window.removeEventListener("touchmove",S)}},[r]),y.useEffect(()=>{const N=j=>{(j.key===" "||j.key==="Enter"||j.key==="ArrowDown"||j.key==="ArrowRight")&&(j.preventDefault(),r())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[r]),l.jsxs("div",{className:"flex-1 flex flex-col items-center overflow-y-auto relative",children:[l.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-terminal-green-subtle via-transparent to-transparent"}),l.jsx("div",{className:"absolute inset-0 bg-dot-grid"})]}),l.jsx("div",{className:"flex-1 min-h-0"}),l.jsxs("div",{className:"max-w-2xl w-full px-6 md:px-8 text-center space-y-5 md:space-y-7 z-10 shrink-0",children:[l.jsxs("div",{className:"space-y-3",children:[l.jsx("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-sans font-bold text-terminal-text leading-[1.15] tracking-tight",children:h}),l.jsxs("p",{className:"text-sm font-sans text-terminal-dim",children:["A ",g," session replay by ",l.jsx("a",{href:"https://vibe-replay.com",target:"_blank",rel:"noopener noreferrer",className:"font-bold bg-gradient-to-r from-terminal-green to-terminal-blue bg-clip-text text-transparent hover:opacity-80 transition-opacity",children:"vibe-replay"})]})]}),f&&l.jsxs("button",{type:"button",onClick:()=>r(),className:"w-full text-left appearance-none bg-transparent border-none p-0 cursor-pointer space-y-3",children:[l.jsxs("div",{className:"rounded-2xl px-5 py-4 ml-4 md:ml-12 bg-terminal-green-subtle border border-terminal-green/30 shadow-layer-sm hover:bg-terminal-green-emphasis transition-all duration-200 ease-material",children:[l.jsx("div",{className:"flex items-center gap-2 mb-2.5",children:l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-green uppercase tracking-widest",children:"You"})}),l.jsx("div",{className:"text-terminal-green font-mono text-sm whitespace-pre-wrap break-words line-clamp-3",children:f.prompt})]}),l.jsxs("div",{className:"rounded-xl px-5 py-4 bg-terminal-surface shadow-layer-sm",children:[l.jsx("div",{className:"flex items-center gap-2 mb-2.5",children:l.jsx("span",{className:"text-[10px] font-sans font-semibold text-secondary-text uppercase tracking-widest",children:"Assistant"})}),l.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 mb-3 text-[11px] font-mono",children:[f.responses>0&&l.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-terminal-blue-subtle text-terminal-blue",children:[f.responses," response",f.responses>1?"s":""]}),f.totalTools>0&&l.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-terminal-orange-subtle text-terminal-orange",children:[f.totalTools," tool",f.totalTools>1?"s":""]}),f.toolEntries.length>0&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-terminal-border mx-0.5",children:"|"}),f.toolEntries.map(([N,j])=>l.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded bg-terminal-surface-hover text-terminal-dim",children:[l.jsx("span",{className:"text-terminal-orange",children:N}),l.jsx("span",{children:j})]},N))]})]}),f.lastResponse&&l.jsx("div",{className:"text-sm font-mono text-terminal-dim whitespace-pre-wrap break-words line-clamp-2 leading-relaxed",children:f.lastResponse})]}),c.stats.userPrompts>1&&l.jsx("div",{className:"text-center",children:l.jsxs("span",{className:"text-[11px] font-sans text-terminal-dimmer",children:["and ",c.stats.userPrompts-1," more turn",c.stats.userPrompts-1!==1?"s":""," ","→"]})})]}),l.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 max-w-lg mx-auto",children:v.map(N=>l.jsxs("div",{className:"bg-terminal-surface rounded-xl px-3 py-3 shadow-layer-sm",children:[l.jsx("div",{className:`text-xl font-bold font-mono tabular-nums ${N.color}`,children:N.value}),l.jsx("div",{className:"text-[10px] font-sans text-terminal-dimmer uppercase tracking-widest font-medium mt-0.5",children:N.label})]},N.label))}),l.jsxs("div",{className:"flex items-center justify-center gap-3 flex-wrap",children:[l.jsxs("button",{type:"button",onClick:()=>r(),className:"group inline-flex items-center gap-3 px-10 py-4 rounded-xl bg-terminal-green-subtle hover:bg-terminal-green-emphasis transition-all duration-200 ease-material shadow-layer-md hover:shadow-layer-lg hover:-translate-y-0.5 landing-pulse",children:[l.jsx("span",{className:"text-xl text-terminal-green group-hover:scale-110 transition-transform duration-200",children:"▶"}),l.jsx("span",{className:"text-base font-sans font-semibold text-terminal-green tracking-wide",children:"Watch Replay"})]}),o&&l.jsxs("button",{type:"button",onClick:o,className:"group inline-flex items-center gap-2 px-6 py-4 rounded-xl bg-terminal-surface hover:bg-terminal-surface-hover transition-all duration-200 ease-material shadow-layer-sm hover:shadow-layer-md border border-terminal-border/40 hover:border-terminal-border",children:[l.jsxs("svg",{"aria-hidden":"true",className:"w-4 h-4 text-terminal-blue group-hover:scale-110 transition-transform duration-200",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",x2:"18",y1:"20",y2:"10"}),l.jsx("line",{x1:"12",x2:"12",y1:"20",y2:"4"}),l.jsx("line",{x1:"6",x2:"6",y1:"20",y2:"14"})]}),l.jsx("span",{className:"text-sm font-sans font-semibold text-terminal-dim group-hover:text-terminal-text tracking-wide",children:"View Insights"})]})]})]}),l.jsxs("button",{type:"button",onClick:()=>r(!1),className:"mt-8 md:mt-10 mb-6 z-10 shrink-0 flex flex-col items-center gap-2 group cursor-pointer",children:[l.jsx("span",{className:"text-xs font-sans font-medium text-terminal-dim group-hover:text-terminal-text transition-colors",children:"or scroll down"}),l.jsx("svg",{"aria-hidden":"true",className:"w-6 h-6 text-terminal-green animate-bounce group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M6 9l6 6 6-6"})})]}),l.jsx("div",{className:"flex-1 min-h-0"})]})}function Qp({scenes:s,currentIndex:r,onSeek:o,overlayActions:c}){const d=y.useMemo(()=>{const m=[];let x=null,h=0;return s.forEach((g,v)=>{if(g.type==="user-prompt"){x&&(x.endIndex=v-1,m.push(x)),h++;const T=c?.getEffectiveContent(v)??g.content;x={kind:"turn",turnNumber:h,promptIndex:v,prompt:T.replace(/\n/g," ").slice(0,120),toolCalls:0,toolNames:[],thinkingBlocks:0,textBlocks:0,endIndex:v}}else g.type==="compaction-summary"?(x&&(x.endIndex=v-1,m.push(x),x=null),m.push({kind:"compaction",promptIndex:v,preview:g.content.replace(/\n/g," ").slice(0,80)})):x&&(x.endIndex=v,g.type==="tool-call"?(x.toolCalls++,x.toolNames.includes(g.toolName)||x.toolNames.push(g.toolName)):g.type==="thinking"?x.thinkingBlocks++:g.type==="text-response"&&x.textBlocks++)}),x&&m.push(x),m},[s,c?.getEffectiveContent]),f=y.useMemo(()=>{for(let m=d.length-1;m>=0;m--)if(r>=d[m].promptIndex)return m;return-1},[d,r]);return l.jsx("div",{className:"flex flex-col gap-1 p-3.5 overflow-y-auto",children:d.map((m,x)=>{const h=x===f,g=x<f;return m.kind==="compaction"?l.jsx("button",{onClick:()=>o(m.promptIndex),className:`text-left px-3 py-2 rounded-lg transition-all duration-200 ease-material ${h?"bg-terminal-surface border-l-2 border-terminal-dim shadow-layer-sm":"hover:bg-terminal-surface-hover text-terminal-dimmer hover:text-terminal-dim"}`,children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-xs font-mono text-terminal-dimmer shrink-0",children:"⟳"}),l.jsx("span",{className:"text-xs font-mono text-terminal-dimmer italic truncate",children:"Context compacted"})]})},`c-${m.promptIndex}`):l.jsxs("button",{onClick:()=>o(m.promptIndex),className:`group text-left px-3 py-2.5 rounded-xl transition-all duration-200 ease-material ${h?"bg-terminal-green-subtle border-l-2 border-terminal-green shadow-layer-sm":g?"hover:bg-terminal-surface-hover text-terminal-dim hover:text-terminal-text":"hover:bg-terminal-surface-hover"}`,children:[l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx("span",{className:`text-xs font-mono font-semibold shrink-0 mt-px tabular-nums ${h?"text-terminal-green":"text-terminal-dim"}`,children:String(m.turnNumber).padStart(2,"0")}),l.jsx("span",{className:"text-sm font-mono leading-snug line-clamp-2 text-terminal-text",children:m.prompt})]}),l.jsxs("div",{className:"flex items-center gap-2 mt-1.5 ml-6 flex-wrap",children:[m.toolCalls>0&&l.jsxs("span",{className:"text-[10px] font-mono px-1.5 py-px rounded-full bg-terminal-orange-subtle text-terminal-orange",children:[m.toolCalls," tool",m.toolCalls>1?"s":""]}),m.textBlocks>0&&l.jsxs("span",{className:"text-[10px] font-mono px-1.5 py-px rounded-full bg-terminal-blue-subtle text-terminal-blue",children:[m.textBlocks," resp"]}),m.thinkingBlocks>0&&l.jsx("span",{className:"text-[10px] font-mono px-1.5 py-px rounded-full bg-terminal-purple-subtle text-terminal-purple",children:"think"})]}),h&&m.toolNames.length>0&&l.jsx("div",{className:"mt-1.5 ml-6 text-xs font-mono text-terminal-dim truncate",children:m.toolNames.join(", ")})]},`t-${m.promptIndex}`)})})}function Tv(s){switch(s.type){case"user-prompt":return s.content;case"compaction-summary":return s.content;case"thinking":return s.content;case"text-response":return s.content;case"tool-call":return[s.toolName,JSON.stringify(s.input),s.result||"",s.bashOutput?.command||"",s.bashOutput?.stdout||""].join(" ");default:return""}}function Av(s,r){const o=s.toLowerCase().indexOf(r.toLowerCase());if(o===-1)return s.slice(0,120);const c=Math.max(0,o-40),d=Math.min(s.length,o+r.length+60);return(c>0?"...":"")+s.slice(c,d)+(d<s.length?"...":"")}const Cv={"user-prompt":"User","compaction-summary":"Compaction",thinking:"Thinking","text-response":"Response","tool-call":"Tool"},Rv={"user-prompt":"text-terminal-green","compaction-summary":"text-terminal-dim",thinking:"text-terminal-purple","text-response":"text-terminal-blue","tool-call":"text-terminal-orange"};function _v({scenes:s,open:r,onClose:o,onSeek:c}){const[d,f]=y.useState(""),[m,x]=y.useState(0),h=y.useRef(null),g=y.useRef(null);y.useEffect(()=>{r&&(f(""),x(0),setTimeout(()=>h.current?.focus(),50))},[r]);const v=y.useMemo(()=>{if(d.length<2)return[];const N=d.toLowerCase(),j=[];for(let S=0;S<s.length;S++){const C=s[S],E=Tv(C);if(E.toLowerCase().includes(N)&&j.push({sceneIndex:S,type:C.type,snippet:Av(E,d),toolName:C.type==="tool-call"?C.toolName:void 0}),j.length>=50)break}return j},[s,d]);y.useEffect(()=>x(0),[]),y.useEffect(()=>{if(!g.current)return;g.current.children[m]?.scrollIntoView({block:"nearest"})},[m]);const w=y.useCallback(N=>{const j=v[N];j&&(c(j.sceneIndex),o())},[v,c,o]),T=y.useCallback(N=>{N.key==="ArrowDown"?(N.preventDefault(),x(j=>Math.min(j+1,v.length-1))):N.key==="ArrowUp"?(N.preventDefault(),x(j=>Math.max(j-1,0))):N.key==="Enter"?(N.preventDefault(),w(m)):N.key==="Escape"&&o()},[v.length,m,w,o]);return r?l.jsxs("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-[8vh] sm:pt-[15vh]",onClick:o,children:[l.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),l.jsxs("div",{className:"relative w-full max-w-xl mx-3 sm:mx-0 bg-terminal-bg border border-terminal-border-subtle rounded-2xl shadow-layer-xl overflow-hidden",onClick:N=>N.stopPropagation(),onKeyDown:T,children:[l.jsxs("div",{className:"flex items-center gap-3 px-5 py-3.5 border-b border-terminal-border-subtle",children:[l.jsx("span",{className:"text-terminal-dim text-sm",children:"🔍"}),l.jsx("input",{ref:h,type:"text",value:d,onChange:N=>f(N.target.value),placeholder:"Search scenes...",className:"flex-1 bg-transparent text-sm font-sans font-medium text-terminal-text placeholder-terminal-dim outline-none"}),l.jsx("kbd",{className:"text-[10px] font-mono text-terminal-dimmer bg-terminal-surface px-2 py-0.5 rounded-md",children:"ESC"})]}),l.jsx("div",{ref:g,className:"max-h-[50vh] overflow-y-auto",children:d.length<2?l.jsx("div",{className:"px-4 py-8 text-center text-xs font-sans font-medium text-terminal-dim",children:"Type at least 2 characters to search"}):v.length===0?l.jsxs("div",{className:"px-4 py-8 text-center text-xs font-sans font-medium text-terminal-dim",children:['No results for "',d,'"']}):v.map((N,j)=>l.jsxs("button",{onClick:()=>w(j),className:`w-full text-left px-4 py-2.5 flex items-start gap-3 transition-colors ${j===m?"bg-terminal-green/10":"hover:bg-terminal-surface/50"}`,children:[l.jsx("span",{className:`text-[10px] font-sans font-bold uppercase shrink-0 mt-0.5 tracking-wider ${Rv[N.type]||"text-terminal-dim"}`,children:N.toolName||Cv[N.type]||N.type}),l.jsx("span",{className:"text-xs font-mono text-terminal-text line-clamp-2 break-words",children:Ov(N.snippet,d)}),l.jsxs("span",{className:"text-xs font-mono text-terminal-dimmer shrink-0 mt-0.5",children:["#",N.sceneIndex]})]},N.sceneIndex))}),v.length>0&&l.jsxs("div",{className:"px-4 py-2 border-t border-terminal-border-subtle text-[10px] font-sans font-bold uppercase tracking-wider text-terminal-dimmer flex gap-4",children:[l.jsxs("span",{children:[v.length," result",v.length!==1?"s":""]}),l.jsx("span",{children:"↑↓ navigate"}),l.jsx("span",{children:"↵ select"})]})]})]}):null}function Ov(s,r){if(!r)return s;const o=[],c=s.toLowerCase(),d=r.toLowerCase();let f=0,m=c.indexOf(d);for(;m!==-1;)m>f&&o.push(s.slice(f,m)),o.push(l.jsx("mark",{className:"bg-terminal-green/30 text-terminal-green rounded-sm px-0.5",children:s.slice(m,m+r.length)},m)),f=m+r.length,m=c.indexOf(d,f);return f<s.length&&o.push(s.slice(f)),o}function Mv(s){const r=s.toLowerCase();return/\b(test|jest|vitest|pytest|cargo\s+test|mocha|spec)\b/.test(r)?"test":/\b(build|compile|tsc|webpack|vite\s+build|rollup)\b/.test(r)?"build":r.trimStart().startsWith("git ")?"git":/\b(lint|biome|eslint|prettier|format)\b/.test(r)?"lint":"other"}function Rh(s){const[r,o]=y.useState(null),c=y.useRef(null),d=y.useCallback(m=>{const x=c.current;if(!x||s<=1)return;const h=x.getBoundingClientRect(),g=(m.clientX-h.left)/h.width,v=Math.round(g*(s-1));o(Math.max(0,Math.min(s-1,v)))},[s]),f=y.useCallback(()=>o(null),[]);return{hovered:r,ref:c,onMouseMove:d,onMouseLeave:f}}function zv(s){const r=[...s.dataSourceInfo?.notes||[]];return s.provider==="cursor"&&(s.dataSource==="sqlite"||s.dataSource==="global-state")&&r.unshift("Some Cursor metrics are estimates and may be incomplete for this session."),s.stats.tokenUsage||r.push("Token and cost metrics may be unavailable."),[...new Set(r)]}function Vp({session:s}){const{meta:r,scenes:o}=s,c=y.useMemo(()=>zv(r),[r]),d=y.useMemo(()=>{const x=[];let h=0,g=0;const v=new Map,w=ce=>{let ne=v.get(ce);return ne||(ne={path:ce,editCount:0,readCount:0,linesAdded:0,linesRemoved:0,turnEdits:new Map},v.set(ce,ne)),ne},T=new Map,N=new Map;let j=0,S=0,C=0,E=0;const k=()=>{if(x.length>0){const ce=x[x.length-1];ce.toolCount=h,ce.errorCount=g}};for(let ce=0;ce<o.length;ce++){const ne=o[ce];switch(ne.type){case"user-prompt":{k(),h=0,g=0,C+=ne.content.length;const pe=ne.content.split(`
145
+ `).find(B=>B.trim())||"";x.push({index:x.length+1,text:pe.slice(0,120),sceneIndex:ce,toolCount:0,errorCount:0});break}case"thinking":j+=ne.content.length;break;case"text-response":S+=ne.content.length;break;case"tool-call":{h++;const pe=ne.toolName;if(T.set(pe,(T.get(pe)||0)+1),pe==="Read"){const B=ne.input?.file_path;B&&w(B).readCount++}else if(pe==="Edit"||pe==="Write"){if(ne.diff){const B=w(ne.diff.filePath);B.editCount++;const W=x.length;B.turnEdits.set(W,(B.turnEdits.get(W)||0)+1);const ie=ne.diff.oldContent?ne.diff.oldContent.split(`
146
+ `).length:0,le=ne.diff.newContent?ne.diff.newContent.split(`
147
+ `).length:0;B.linesAdded+=Math.max(0,le-ie),B.linesRemoved+=Math.max(0,ie-le)}}else if(pe==="Bash"){if(ne.bashOutput){const B=Mv(ne.bashOutput.command);N.set(B,(N.get(B)||0)+1)}if(ne.isError)g++,E++;else if(!("isError"in ne)){const B=ne.result?.slice(0,500).toLowerCase()||"";/\b(error|fail|exception|errno)\b/.test(B)&&(g++,E++)}}break}}}k();const _=[...v.values()],z=_.filter(ce=>ce.editCount>0).sort((ce,ne)=>ne.editCount-ce.editCount),U=_.filter(ce=>ce.editCount===0&&ce.readCount>0).sort((ce,ne)=>ne.readCount-ce.readCount),J=[...T.entries()].sort((ce,ne)=>ne[1]-ce[1]).slice(0,8),Z=[...N.entries()].sort((ce,ne)=>ne[1]-ce[1]),re=[...T.values()].reduce((ce,ne)=>ce+ne,0),ae=(T.get("Read")||0)+(T.get("Grep")||0)+(T.get("Glob")||0),P=(T.get("Edit")||0)+(T.get("Write")||0),V=T.get("Bash")||0,oe={read:ae,write:P,execute:V,other:re-ae-P-V};return{totalScenes:o.length,userPrompts:r.stats.userPrompts,toolCalls:r.stats.toolCalls,thinkingChars:j,responseChars:S,promptChars:C,durationMs:r.stats.durationMs,tokenUsage:r.stats.tokenUsage,costEstimate:r.stats.costEstimate,turns:x,editedFiles:z,readOnlyFiles:U,topTools:J,bashCats:Z,activityDist:oe,totalTools:re,totalBashErrors:E}},[o,r]),f=r.stats.turnStats&&r.stats.turnStats.length>1,m=y.useMemo(()=>d.turns.map(x=>x.text.slice(0,60)+(x.text.length>60?"…":"")),[d.turns]);return l.jsx("div",{className:"flex-1 overflow-y-auto",children:l.jsxs("div",{className:"p-6 space-y-6 max-w-4xl mx-auto",children:[l.jsxs("div",{className:"flex items-center gap-2.5",children:[l.jsx("h2",{className:"text-sm font-mono font-semibold text-terminal-text truncate",children:r.title||r.slug}),r.provider&&l.jsx("span",{className:"shrink-0 text-[10px] font-mono text-terminal-dimmer px-1.5 py-0.5 rounded bg-terminal-surface border border-terminal-border-subtle",children:r.provider})]}),c.length>0&&l.jsxs("div",{className:"rounded border border-terminal-orange/40 bg-terminal-orange/10 px-3 py-2",children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-orange uppercase tracking-widest mb-1",children:"Data Quality"}),l.jsx("div",{className:"space-y-0.5",children:c.slice(0,4).map(x=>l.jsx("div",{className:"text-xs font-mono text-terminal-dim",children:x},x))})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-3",children:"Overview"}),l.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[l.jsx(Nl,{label:"Turns",value:d.userPrompts,color:"text-terminal-green"}),l.jsx(Nl,{label:"Tool Calls",value:d.toolCalls,color:"text-terminal-orange"}),l.jsx(Nl,{label:"Files Modified",value:d.editedFiles.length,color:"text-terminal-blue"}),l.jsx(Nl,{label:"Scenes",value:d.totalScenes,color:"text-terminal-text"})]}),l.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 mt-3 text-xs font-mono text-terminal-dim",children:[r.model&&l.jsxs("div",{children:["Model: ",l.jsx("span",{className:"text-terminal-text font-semibold",children:r.model})]}),d.durationMs&&l.jsxs("div",{children:["Duration:"," ",l.jsx("span",{className:"text-terminal-text",children:ga(d.durationMs)})]}),d.costEstimate!==void 0&&l.jsxs("div",{children:["Cost:"," ",l.jsxs("span",{className:"text-terminal-green",children:["$",d.costEstimate<.01?d.costEstimate.toFixed(4):d.costEstimate.toFixed(2)]}),l.jsx("span",{className:"text-terminal-dimmer",children:" (est.)"})]}),d.tokenUsage&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:["In:"," ",l.jsx("span",{className:"text-terminal-blue",children:Ct(d.tokenUsage.inputTokens)})," / ","Out:"," ",l.jsx("span",{className:"text-terminal-green",children:Ct(d.tokenUsage.outputTokens)})]}),l.jsxs("div",{children:["Cache:"," ",l.jsx("span",{className:"text-terminal-purple",children:Ct(d.tokenUsage.cacheReadTokens)})," ","read /"," ",l.jsx("span",{className:"text-terminal-orange",children:Ct(d.tokenUsage.cacheCreationTokens)})," ","created"]})]})]})]}),f&&l.jsxs("div",{className:"space-y-5",children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest",children:"Per-Turn Metrics"}),l.jsx(Dv,{turnStats:r.stats.turnStats,costEstimate:r.stats.costEstimate,turnLabels:m}),l.jsx(Bv,{turnStats:r.stats.turnStats,contextLimit:r.contextLimit,turnLabels:m}),d.turns.length>=2&&l.jsx(Hv,{turns:d.turns,turnLabels:m}),r.stats.turnStats.some(x=>x.durationMs)&&l.jsx(Uv,{turnStats:r.stats.turnStats,turnLabels:m})]}),r.tokenUsageByModel&&Object.keys(r.tokenUsageByModel).length>1&&l.jsx($v,{tokenUsageByModel:r.tokenUsageByModel}),r.prLinks&&r.prLinks.length>0&&l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-2",children:"Pull Requests"}),l.jsx("div",{className:"space-y-1",children:r.prLinks.map(x=>l.jsxs("a",{href:x.prUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-xs font-mono text-terminal-blue hover:underline px-2 py-1 rounded hover:bg-terminal-surface-hover transition-colors",children:[l.jsxs("span",{className:"text-terminal-green",children:["#",x.prNumber]}),x.prRepository&&l.jsx("span",{className:"text-terminal-dimmer truncate",children:x.prRepository})]},x.prUrl))})]}),d.turns.length>0&&l.jsx(qv,{turns:d.turns,turnStats:r.stats.turnStats}),l.jsx(Gv,{editedFiles:d.editedFiles,turns:d.turns}),(d.editedFiles.length>0||d.readOnlyFiles.length>0)&&l.jsx(Zv,{editedFiles:d.editedFiles,readOnlyFiles:d.readOnlyFiles}),d.bashCats.length>1&&l.jsxs("div",{children:[l.jsxs("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-2",children:["Bash Commands",d.totalBashErrors>0&&l.jsxs("span",{className:"text-terminal-red ml-2 normal-case tracking-normal",children:[d.totalBashErrors," error",d.totalBashErrors!==1?"s":""]})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:d.bashCats.map(([x,h])=>l.jsxs("span",{className:"text-xs font-mono text-terminal-dim bg-terminal-surface rounded px-2 py-1",children:[x," ",l.jsx("span",{className:"text-terminal-text tabular-nums",children:h})]},x))})]}),d.topTools.length>0&&l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-2",children:"Top Tools"}),l.jsx("div",{className:"space-y-1.5",children:d.topTools.map(([x,h])=>l.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono",children:[l.jsx("span",{className:"text-terminal-text shrink-0 w-24 text-right truncate",title:x,children:x}),l.jsx("div",{className:"flex-1 h-2 rounded-full bg-terminal-surface overflow-hidden",children:l.jsx("div",{className:"h-full rounded-full bg-terminal-orange",style:{width:`${h/d.topTools[0][1]*100}%`}})}),l.jsx("span",{className:"text-terminal-dim shrink-0 w-6 text-right tabular-nums",children:h})]},x))})]}),d.totalTools>0&&l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-2",children:"Activity Distribution"}),l.jsx("div",{className:"space-y-1.5",children:[["Read/Search",d.activityDist.read,"--blue"],["Write/Edit",d.activityDist.write,"--green"],["Execute",d.activityDist.execute,"--purple"],["Other",d.activityDist.other,"--dim"]].filter(([,x])=>x>0).map(([x,h,g])=>l.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono",children:[l.jsx("span",{className:"text-terminal-text shrink-0 w-24 text-right",children:x}),l.jsx("div",{className:"flex-1 h-2 rounded-full bg-terminal-surface overflow-hidden",children:l.jsx("div",{className:"h-full rounded-full",style:{width:`${h/d.totalTools*100}%`,backgroundColor:`var(${g})`}})}),l.jsxs("span",{className:"text-terminal-dim shrink-0 w-16 text-right tabular-nums",children:[h," (",Math.round(h/d.totalTools*100),"%)"]})]},x))})]})]})})}function mi({children:s,visible:r,x:o}){if(!r)return null;const c=o>.7;return l.jsx("div",{className:"absolute top-1 pointer-events-none z-10",style:{left:c?void 0:`${o*100}%`,right:c?`${(1-o)*100}%`:void 0},children:l.jsx("div",{className:`bg-terminal-surface border border-terminal-border-subtle rounded px-2 py-1 text-[10px] font-mono text-terminal-text shadow-md whitespace-nowrap ${c?"text-right":""}`,children:s})})}function Dv({turnStats:s,costEstimate:r,turnLabels:o}){const c=[];let d=0;for(const S of s)d+=S.tokenUsage?.outputTokens||0,c.push(d);const f=c.length,{hovered:m,ref:x,onMouseMove:h,onMouseLeave:g}=Rh(f);if(d===0)return null;const v=c[c.length-1],w=60,T=100,N=c.map((S,C)=>{const E=f===1?T/2:C/(f-1)*T,k=w-S/v*(w-6)-3;return`${E},${k}`}),j=m!==null?f===1?.5:m/(f-1):0;return l.jsxs("div",{children:[l.jsxs("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-1",children:["Token Burn",r?" & Cost":""]}),l.jsxs("div",{className:"relative",children:[l.jsxs("svg",{ref:x,viewBox:`0 0 ${T} ${w}`,preserveAspectRatio:"none",className:"w-full h-20",onMouseMove:h,onMouseLeave:g,children:[l.jsx("polygon",{points:`0,${w} ${N.join(" ")} ${T},${w}`,style:{fill:"var(--green-subtle)"}}),l.jsx("polyline",{points:N.join(" "),fill:"none",style:{stroke:"var(--green)"},strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"}),m!==null&&l.jsx("line",{x1:j*T,y1:"0",x2:j*T,y2:w,stroke:"var(--dim)",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke",opacity:"0.5"})]}),l.jsx(mi,{visible:m!==null,x:j,children:m!==null&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-terminal-green",children:["Turn ",m+1]}),o?.[m]&&l.jsx("div",{className:"text-terminal-dim truncate max-w-[200px]",children:o[m]}),l.jsxs("div",{children:["cumulative: ",Ct(c[m])," tokens"]}),s[m]?.tokenUsage&&l.jsxs("div",{className:"text-terminal-dimmer",children:["this turn: +",Ct(s[m].tokenUsage.outputTokens)," out"]})]})})]}),l.jsxs("div",{className:"flex justify-between text-[10px] font-mono text-terminal-dimmer mt-0.5",children:[l.jsx("span",{children:"Turn 1"}),l.jsxs("span",{children:[Ct(v)," tokens",r?` ($${r<1?r.toFixed(2):r.toFixed(0)})`:""]}),l.jsxs("span",{children:["Turn ",f]})]}),s.some(S=>S.tokenUsage?.cacheReadTokens)&&l.jsx(Lv,{turnStats:s})]})}function Lv({turnStats:s}){const r=s.map(m=>{const x=m.tokenUsage;if(!x)return 0;const h=(x.cacheReadTokens||0)+(x.inputTokens||0);return h>0?x.cacheReadTokens/h:0}),o=24,c=100,d=r.map((m,x)=>{const h=r.length===1?c/2:x/(r.length-1)*c,g=o-m*(o-4)-2;return`${h},${g}`}),f=r.reduce((m,x)=>m+x,0)/r.length;return l.jsxs("div",{className:"mt-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest",children:"Cache Hit Rate"}),l.jsxs("span",{className:"text-[10px] font-mono text-terminal-purple",children:["avg ",Math.round(f*100),"%"]})]}),l.jsx("svg",{viewBox:`0 0 ${c} ${o}`,preserveAspectRatio:"none",className:"w-full h-6",children:l.jsx("polyline",{points:d.join(" "),fill:"none",style:{stroke:"var(--purple)"},strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})})]})}function Bv({turnStats:s,contextLimit:r,turnLabels:o}){const c=s.map(E=>E.contextTokens||0),d=c.length,{hovered:f,ref:m,onMouseMove:x,onMouseLeave:h}=Rh(d);if(!c.some(E=>E>0))return null;const g=Math.max(...c),v=r?Math.max(g,r):g,w=60,T=100,N=c.map((E,k)=>{const _=d===1?T/2:k/(d-1)*T,z=w-E/v*(w-6)-3;return`${_},${z}`}),j=r?w-r/v*(w-6)-3:void 0,S=[];for(let E=0;E<c.length-1;E++){const k=c[E],_=c[E+1];k>0&&_>0&&_<k*.5&&S.push(E)}const C=f!==null?d===1?.5:f/(d-1):0;return l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-1",children:"Context Window Usage"}),l.jsxs("div",{className:"relative",children:[l.jsxs("svg",{ref:m,viewBox:`0 0 ${T} ${w}`,preserveAspectRatio:"none",className:"w-full h-20",onMouseMove:x,onMouseLeave:h,children:[j!==void 0&&l.jsx("line",{x1:"0",y1:j,x2:T,y2:j,style:{stroke:"var(--red)"},strokeWidth:"0.5",strokeDasharray:"2,2",vectorEffect:"non-scaling-stroke",opacity:"0.5"}),l.jsx("polygon",{points:`0,${w} ${N.join(" ")} ${T},${w}`,style:{fill:"var(--cyan-subtle)"}}),l.jsx("polyline",{points:N.join(" "),fill:"none",style:{stroke:"var(--cyan)"},strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"}),S.map(E=>{const k=d===1?T/2:E/(d-1)*T;return l.jsx("line",{x1:k,y1:"0",x2:k,y2:w,style:{stroke:"var(--red)"},strokeWidth:"1",strokeDasharray:"2,1",vectorEffect:"non-scaling-stroke",opacity:"0.6"},E)}),f!==null&&l.jsx("line",{x1:C*T,y1:"0",x2:C*T,y2:w,stroke:"var(--dim)",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke",opacity:"0.5"})]}),l.jsx(mi,{visible:f!==null,x:C,children:f!==null&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-terminal-cyan",children:["Turn ",f+1]}),o?.[f]&&l.jsx("div",{className:"text-terminal-dim truncate max-w-[200px]",children:o[f]}),l.jsxs("div",{children:[Ct(c[f])," tokens"]}),r&&l.jsxs("div",{className:"text-terminal-dimmer",children:[Math.round(c[f]/r*100),"% of limit"]})]})})]}),l.jsxs("div",{className:"flex justify-between text-[10px] font-mono text-terminal-dimmer mt-0.5",children:[l.jsx("span",{children:"Turn 1"}),l.jsxs("span",{children:["peak ",Ct(g),r?` / ${Ct(r)} limit`:""]}),l.jsxs("span",{children:["Turn ",d]})]}),S.length>0&&l.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[l.jsx("span",{className:"inline-block w-3 border-t border-dashed",style:{borderColor:"var(--red)"}}),l.jsxs("span",{className:"text-[10px] font-mono text-terminal-dimmer",children:[S.length," compaction",S.length!==1?"s":""]})]})]})}function Uv({turnStats:s,turnLabels:r}){const o=s.map(x=>x.durationMs||0),c=Math.max(...o,1),d=o.some(x=>x>0),[f,m]=y.useState(null);return d?l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-1",children:"Turn Duration"}),l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"flex items-end gap-px h-16",onMouseLeave:()=>m(null),children:o.map((x,h)=>{const g=x>0?Math.max(x/c*100,4):0;return l.jsx("div",{className:"flex-1 rounded-t-sm cursor-default",style:{height:`${g}%`,backgroundColor:x>0?"var(--blue)":"var(--surface)",opacity:f===h?1:x>0?.5+x/c*.5:.2},onMouseEnter:()=>m(h)},h)})}),l.jsx(mi,{visible:f!==null,x:f!==null?o.length===1?.5:f/(o.length-1):0,children:f!==null&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-terminal-blue",children:["Turn ",f+1]}),r?.[f]&&l.jsx("div",{className:"text-terminal-dim truncate max-w-[200px]",children:r[f]}),l.jsx("div",{children:o[f]>0?ga(o[f]):"no data"})]})})]}),l.jsxs("div",{className:"flex justify-between text-[10px] font-mono text-terminal-dimmer mt-0.5",children:[l.jsx("span",{children:"Turn 1"}),l.jsxs("span",{children:["max ",ga(c)]}),l.jsxs("span",{children:["Turn ",o.length]})]})]}):null}function $v({tokenUsageByModel:s}){const r=Object.entries(s).sort((d,f)=>f[1].outputTokens-d[1].outputTokens),o=r.reduce((d,[,f])=>d+f.outputTokens,0);if(o===0)return null;const c=["--green","--blue","--purple","--orange","--red"];return l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-2",children:"Model Breakdown"}),l.jsx("div",{className:"flex h-3 rounded-full overflow-hidden gap-px",children:r.map(([d,f],m)=>{const x=f.outputTokens/o*100;return l.jsx("div",{style:{width:`${x}%`,minWidth:x>2?void 0:"3px",backgroundColor:`var(${c[m%c.length]})`,opacity:.7},title:`${d}: ${Ct(f.outputTokens)} output tokens`},d)})}),l.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:r.map(([d,f],m)=>l.jsxs("div",{className:"flex items-center gap-1 text-[10px] font-mono text-terminal-dimmer",children:[l.jsx("div",{className:"w-2 h-2 rounded-sm",style:{backgroundColor:`var(${c[m%c.length]})`,opacity:.7}}),l.jsxs("span",{children:[d," ",Ct(f.outputTokens)," (",Math.round(f.outputTokens/o*100),"%)"]})]},d))})]})}function Hv({turns:s,turnLabels:r}){const o=s.map(m=>m.toolCount),c=Math.max(...o,1),[d,f]=y.useState(null);return s.length<2?null:l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-1",children:"Tool Calls per Turn"}),l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"flex items-end gap-px h-16",onMouseLeave:()=>f(null),children:o.map((m,x)=>{const h=m>0?Math.max(m/c*100,4):0;return l.jsx("div",{className:"flex-1 rounded-t-sm cursor-default",style:{height:`${h}%`,backgroundColor:m>0?"var(--orange)":"var(--surface)",opacity:d===x?1:m>0?.5+m/c*.5:.2},onMouseEnter:()=>f(x)},x)})}),l.jsx(mi,{visible:d!==null,x:d!==null?o.length===1?.5:d/(o.length-1):0,children:d!==null&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-terminal-orange",children:["Turn ",d+1]}),r?.[d]&&l.jsx("div",{className:"text-terminal-dim truncate max-w-[200px]",children:r[d]}),l.jsxs("div",{children:[o[d]," tool calls"]})]})})]}),l.jsxs("div",{className:"flex justify-between text-[10px] font-mono text-terminal-dimmer mt-0.5",children:[l.jsx("span",{children:"Turn 1"}),l.jsxs("span",{children:["max ",c]}),l.jsxs("span",{children:["Turn ",o.length]})]})]})}function Gv({editedFiles:s,turns:r}){if(r.length<3||s.length<1)return null;const o=s.slice(0,8),c=60,d=r.map(h=>h.index),f=d.length>c,m=f?d.slice(-c):d;let x=1;for(const h of o)for(const g of m){const v=h.turnEdits.get(g)||0;v>x&&(x=v)}return l.jsxs("div",{children:[l.jsxs("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-2",children:["File Activity Heatmap",f&&l.jsxs("span",{className:"normal-case tracking-normal font-normal ml-2",children:["(last ",c," of ",d.length," turns)"]})]}),l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("div",{className:"grid gap-px text-[10px] font-mono",style:{gridTemplateColumns:`minmax(80px, 120px) repeat(${m.length}, minmax(16px, 1fr))`},children:[l.jsx("div",{className:"text-terminal-dimmer px-1 py-0.5"}),m.map(h=>l.jsx("div",{className:"text-terminal-dimmer text-center py-0.5 text-[9px]",children:h},h)),o.map(h=>{const g=h.path.split("/").pop()||h.path;return[l.jsx("div",{className:"text-terminal-dim truncate px-1 py-0.5",title:h.path,children:g},`label-${h.path}`),...m.map(v=>{const w=h.turnEdits.get(v)||0,T=w===0?0:Math.round(20+Math.log1p(w)/Math.log1p(x)*60);return l.jsx("div",{className:"rounded-sm",style:{backgroundColor:w===0?"transparent":`color-mix(in srgb, var(--orange) ${T}%, transparent)`,minHeight:14},title:w>0?`${g} — Turn ${v}: ${w} edit${w!==1?"s":""}`:void 0},`${h.path}-${v}`)})]})]})})]})}const Uc=20;function qv({turns:s,turnStats:r}){const[o,c]=y.useState(!1),{rows:d,compactionAfter:f}=y.useMemo(()=>{const N=Math.max(...s.map(_=>_.toolCount),1),j=Math.max(...r?.map(_=>_.durationMs||0)||[0],1),S=Math.max(...r?.map(_=>_.contextTokens||0)||[0],1),C=Math.max(...r?.map(_=>_.tokenUsage?.outputTokens||0)||[0],1),E=new Set;if(r)for(let _=0;_<r.length-1;_++){const z=r[_]?.contextTokens||0,U=r[_+1]?.contextTokens||0;z>0&&U>0&&U<z*.5&&E.add(_)}return{rows:s.map((_,z)=>{const U=r?.[z];return{..._,durationMs:U?.durationMs,contextTokens:U?.contextTokens,outputTokens:U?.tokenUsage?.outputTokens,toolRatio:_.toolCount/N,durationRatio:(U?.durationMs||0)/j,contextRatio:(U?.contextTokens||0)/S,outputRatio:(U?.tokenUsage?.outputTokens||0)/C}}),compactionAfter:E}},[s,r]),m=r&&r.length>0,x=m&&r.some(N=>N.durationMs),h=m&&r.some(N=>N.contextTokens),g=m&&r.some(N=>N.tokenUsage),v=3+(x?1:0)+(h?1:0)+(g?1:0),w=d.length>Uc,T=w&&!o?d.slice(0,Uc):d;return l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-2",children:"Per-Turn Breakdown"}),l.jsx("div",{className:"overflow-x-auto rounded border border-terminal-border-subtle",children:l.jsxs("table",{className:"w-full text-[11px] font-mono border-collapse",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-terminal-dimmer text-left",children:[l.jsx("th",{className:"px-2 py-1.5 font-semibold w-7",children:"#"}),l.jsx("th",{className:"px-2 py-1.5 font-semibold",children:"Prompt"}),l.jsx("th",{className:"px-2 py-1.5 font-semibold text-right w-14",children:"Tools"}),x&&l.jsx("th",{className:"px-2 py-1.5 font-semibold text-right w-16",children:"Duration"}),h&&l.jsx("th",{className:"px-2 py-1.5 font-semibold text-right w-16",children:"Context"}),g&&l.jsx("th",{className:"px-2 py-1.5 font-semibold text-right w-14",children:"Output"})]})}),l.jsx("tbody",{children:T.map((N,j)=>l.jsx(Yv,{row:N,hasDuration:!!x,hasContext:!!h,hasTokens:!!g,colCount:v,showCompaction:f.has(j)},N.sceneIndex))}),w&&l.jsx("tfoot",{children:l.jsx("tr",{children:l.jsx("td",{colSpan:v,children:l.jsx("button",{type:"button",className:"w-full py-1.5 text-[11px] font-mono text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors",onClick:()=>c(!o),children:o?"▴ Collapse":`▾ Show all ${d.length} turns (${d.length-Uc} more)`})})})})]})})]})}function Yv({row:s,hasDuration:r,hasContext:o,hasTokens:c,colCount:d,showCompaction:f}){return l.jsxs(l.Fragment,{children:[l.jsxs("tr",{className:"border-t border-terminal-border-subtle hover:bg-terminal-surface-hover transition-colors",children:[l.jsx("td",{className:"px-2 py-1 text-terminal-green tabular-nums",children:String(s.index).padStart(2,"0")}),l.jsx("td",{className:"px-2 py-1 text-terminal-text max-w-0",children:l.jsxs("div",{className:"truncate",title:s.text,children:[s.text,s.errorCount>0&&l.jsxs("span",{className:"text-terminal-red ml-1.5",children:[s.errorCount," err"]})]})}),l.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:l.jsx(kl,{value:s.toolCount,ratio:s.toolRatio,color:"--orange"})}),r&&l.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:l.jsx(kl,{value:s.durationMs?ga(s.durationMs):"—",ratio:s.durationRatio,color:"--blue"})}),o&&l.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:l.jsx(kl,{value:s.contextTokens?Ct(s.contextTokens):"—",ratio:s.contextRatio,color:"--cyan"})}),c&&l.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:l.jsx(kl,{value:s.outputTokens?Ct(s.outputTokens):"—",ratio:s.outputRatio,color:"--green"})})]}),f&&l.jsx("tr",{children:l.jsx("td",{colSpan:d,className:"px-0 py-0",children:l.jsxs("div",{className:"flex items-center gap-2 px-2 py-0.5 bg-terminal-red/5",children:[l.jsx("div",{className:"flex-1 border-t border-dashed border-terminal-red/40"}),l.jsx("span",{className:"text-[10px] font-mono text-terminal-red/70 shrink-0",children:"context compacted"}),l.jsx("div",{className:"flex-1 border-t border-dashed border-terminal-red/40"})]})})})]})}function kl({value:s,ratio:r,color:o}){return l.jsx("span",{className:"inline-block w-full px-1 py-0.5 rounded-sm text-terminal-text",style:{backgroundColor:r>0?`color-mix(in srgb, var(${o}) ${Math.round(r*40)}%, transparent)`:void 0},children:s})}const $c=20;function Zv({editedFiles:s,readOnlyFiles:r}){const[o,c]=y.useState(!1),d=y.useMemo(()=>[...s,...r],[s,r]),f=y.useMemo(()=>Math.max(...d.map(N=>N.editCount),1),[d]),m=y.useMemo(()=>Math.max(...d.map(N=>N.readCount),1),[d]),x=y.useMemo(()=>Math.max(...d.map(N=>N.linesAdded+N.linesRemoved),1),[d]),h=d.some(N=>N.linesAdded>0||N.linesRemoved>0),g=d.some(N=>N.turnEdits.size>0),v=d.length>$c,w=v&&!o?d.slice(0,$c):d,T=3+(h?1:0)+(g?1:0);return l.jsxs("div",{children:[l.jsxs("div",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest mb-2",children:["File Impact",l.jsxs("span",{className:"normal-case tracking-normal ml-1.5",children:["(",s.length," modified",r.length>0&&`, ${r.length} read-only`,")"]})]}),l.jsx("div",{className:"overflow-x-auto rounded border border-terminal-border-subtle",children:l.jsxs("table",{className:"w-full text-[11px] font-mono border-collapse",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-terminal-dimmer text-left",children:[l.jsx("th",{className:"px-2 py-1.5 font-semibold",children:"File"}),l.jsx("th",{className:"px-2 py-1.5 font-semibold text-right w-14",children:"Edits"}),l.jsx("th",{className:"px-2 py-1.5 font-semibold text-right w-14",children:"Reads"}),h&&l.jsx("th",{className:"px-2 py-1.5 font-semibold text-right w-20",children:"+/−"}),g&&l.jsx("th",{className:"px-2 py-1.5 font-semibold text-right w-14",children:"Turns"})]})}),l.jsx("tbody",{children:w.map(N=>{const j=N.path.split("/").pop()||N.path,S=N.editCount>0;return l.jsxs("tr",{className:"border-t border-terminal-border-subtle hover:bg-terminal-surface-hover transition-colors",children:[l.jsx("td",{className:"px-2 py-1 max-w-0",children:l.jsxs("div",{className:`truncate ${S?"text-terminal-text":"text-terminal-dimmer"}`,title:N.path,children:[j,N.editCount>=10&&l.jsx("span",{className:"text-terminal-red ml-1",title:`${N.editCount} edits — high churn file`,children:"⚠"}),l.jsx("span",{className:"text-terminal-dimmer ml-1",children:N.path.slice(0,N.path.length-j.length-1)})]})}),l.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:N.editCount>0?l.jsx(kl,{value:N.editCount,ratio:N.editCount/f,color:"--orange"}):l.jsx("span",{className:"text-terminal-dimmer",children:"—"})}),l.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:N.readCount>0?l.jsx(kl,{value:N.readCount,ratio:N.readCount/m,color:"--blue"}):l.jsx("span",{className:"text-terminal-dimmer",children:"—"})}),h&&l.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:N.linesAdded>0||N.linesRemoved>0?l.jsxs("span",{className:"inline-block w-full px-1 py-0.5 rounded-sm",style:{backgroundColor:`color-mix(in srgb, var(--green) ${Math.round((N.linesAdded+N.linesRemoved)/x*30)}%, transparent)`},children:[l.jsxs("span",{className:"text-terminal-green",children:["+",N.linesAdded]}),l.jsx("span",{className:"text-terminal-dimmer",children:"/"}),l.jsxs("span",{className:"text-terminal-red",children:["−",N.linesRemoved]})]}):l.jsx("span",{className:"text-terminal-dimmer",children:"—"})}),g&&l.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:N.turnEdits.size>0?l.jsx("span",{className:"text-terminal-dim",children:N.turnEdits.size}):l.jsx("span",{className:"text-terminal-dimmer",children:"—"})})]},N.path)})}),v&&l.jsx("tfoot",{children:l.jsx("tr",{children:l.jsx("td",{colSpan:T,children:l.jsx("button",{type:"button",className:"w-full py-1.5 text-[11px] font-mono text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover transition-colors",onClick:()=>c(!o),children:o?"▴ Collapse":`▾ Show all ${d.length} files (${d.length-$c} more)`})})})})]})})]})}function Fv(s){switch(s){case"user-prompt":return"#3fb950";case"compaction-summary":return"#666666";case"thinking":return"#b392f0";case"text-response":return"#79b8ff";case"tool-call":return"#d29922"}}function Xv({scenes:s,currentIndex:r,onSeek:o,annotatedScenes:c}){const d=y.useMemo(()=>{if(s.length<=200)return s.map((T,N)=>({startIndex:N,endIndex:N,type:T.type}));const v=s.length/200,w=[];for(let T=0;T<200;T++){const N=Math.floor(T*v),j=Math.floor((T+1)*v)-1,S={"user-prompt":4,"compaction-summary":1,"tool-call":3,"text-response":2,thinking:1};let C=s[N].type,E=S[C];for(let k=N+1;k<=j&&k<s.length;k++){const _=S[s[k].type];_>E&&(C=s[k].type,E=_)}w.push({startIndex:N,endIndex:j,type:C})}return w},[s]),f=s.length>0?(r+1)/s.length*100:0,m=y.useRef(null),x=y.useCallback(g=>{const v=m.current;if(!v)return;const w=v.getBoundingClientRect(),T=g.clientX-w.left,N=Math.max(0,Math.min(1,T/w.width)),j=Math.floor(N*s.length);o(j)},[s.length,o]),h=y.useMemo(()=>{if(!c||c.size===0)return[];const g=[];return c.forEach(v=>{v>=0&&v<s.length&&g.push((v+.5)/s.length*100)}),g},[c,s.length]);return s.length===0?null:l.jsxs("div",{className:"px-4 pt-3 pb-1 cursor-pointer",onClick:x,children:[h.length>0&&l.jsx("div",{className:"relative h-2 mb-0.5",children:h.map((g,v)=>l.jsx("div",{className:"absolute w-1.5 h-1.5 rounded-full bg-terminal-blue shadow-layer-sm",style:{left:`${g}%`,top:"50%",transform:"translate(-50%, -50%)"}},v))}),l.jsxs("div",{ref:m,className:"relative flex h-2 rounded-full overflow-hidden bg-terminal-surface-2",children:[d.map((g,v)=>l.jsx("div",{className:"flex-1 transition-opacity duration-150",style:{backgroundColor:Fv(g.type),opacity:g.startIndex<=r?1:.15}},v)),l.jsx("div",{className:"absolute top-0 bottom-0 w-0.5 bg-white shadow-layer-sm transition-[left] duration-150 ease-material",style:{left:`${f}%`}})]})]})}const Qv=[{key:"replay",label:"Replay"},{key:"summary",label:"Insights"},{key:"export",label:"Export"}];function Vv({activeView:s,onChangeView:r,className:o="",rightContent:c,hiddenTabs:d}){return l.jsxs("div",{className:`flex items-center justify-between border-b border-terminal-border-subtle bg-terminal-bg shrink-0 ${o}`,children:[l.jsx("div",{className:"flex bg-terminal-surface/30",children:Qv.filter(f=>!d?.includes(f.key)).map(({key:f,label:m})=>l.jsx("button",{onClick:()=>r(f),className:`px-4 py-2 text-[11px] font-sans font-semibold uppercase tracking-widest transition-colors ${s===f?"text-terminal-green border-b-2 border-terminal-green bg-terminal-surface/50":"text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover"}`,children:m},f))}),c&&l.jsx("div",{className:"pr-4 py-1.5 flex items-center",children:c})]})}function Jv(s){s.classList.remove("jump-target-flash"),s.offsetWidth,s.classList.add("jump-target-flash"),window.setTimeout(()=>{s.classList.remove("jump-target-flash")},900)}function Kv({session:s,viewPrefs:r,viewerMode:o="embedded",activeView:c,setActiveView:d,returnToLandingRef:f}){const m=o==="readonly",[x,h]=y.useState(!1);y.useEffect(()=>{if(f)return f.current=()=>{h(!1),Yn(!1);const ue=new URL(window.location.href);ue.searchParams.has("s")&&(ue.searchParams.delete("s"),window.history.replaceState({},"",ue.toString()))},()=>{f.current=null}},[f]);const[g,v]=y.useState(void 0),[w,T]=y.useState(0),[N,j]=y.useState(!1),[S,C]=y.useState(!1),[E,k]=y.useState(null),[_,z]=y.useState(!0),U=Bb(s,o),J=Ub(s,o),{effectiveSession:Z}=J,{annotations:re}=U,ae=Gb(r),{state:P,currentIndex:V,visibleCount:oe,speed:ce,play:ne,pause:pe,togglePlayPause:B,seekTo:W,changeSpeed:ie,totalScenes:le,userPromptIndices:se,computeNextIndex:A}=Hb(s.scenes,ae,x),O=y.useRef(null),[D,ee]=y.useState("outline"),[X,de]=y.useState(!1),[xe,Oe]=y.useState(!1),[Te,mt]=y.useState(!1),it=y.useRef(null),te=y.useRef(null),ke=y.useRef(!1),[we,$e]=y.useState(!1);y.useEffect(()=>{const ue=be=>{(be.metaKey||be.ctrlKey)&&be.key==="k"?(be.preventDefault(),de(Ye=>!Ye)):be.key==="/"?be.target instanceof HTMLInputElement||be.target instanceof HTMLTextAreaElement||(be.preventDefault(),de(!0)):be.key==="?"?$e(Ye=>!Ye):be.key==="Escape"&&(we?$e(!1):X&&de(!1))};return window.addEventListener("keydown",ue),()=>window.removeEventListener("keydown",ue)},[X,we]);const Ie=se.filter(ue=>ue<=V).length||0,xt=se.length,ot=y.useMemo(()=>{const ue=new URLSearchParams(window.location.search).get("s");if(ue!==null){const be=Number(ue);if(Number.isFinite(be)&&be>=0&&be<s.scenes.length)return be}return se.length>=2?se[1]:Math.min(15,s.scenes.length-1)},[se,s.scenes.length]),pt=y.useCallback((ue=!0)=>{h(!0),ue?setTimeout(ne,300):setTimeout(()=>W(ot),100)},[ne,W,ot]),fn=y.useCallback(()=>d("summary"),[d]),ln=y.useRef(r.displayMode);y.useEffect(()=>{ln.current!==r.displayMode&&(ln.current=r.displayMode,x||(h(!0),setTimeout(()=>W(ot),100)))},[r.displayMode,x,W,ot]);const[Sn,Yn]=y.useState(()=>new URLSearchParams(window.location.search).get("s")!==null);y.useEffect(()=>{!x&&c!=="replay"&&!Sn&&(h(!0),setTimeout(()=>W(ot),100))},[c,x,ot,W,Sn]);const $=y.useCallback(ue=>{const be=Math.max(0,Math.min(ue,s.scenes.length-1));pe(),it.current=be,T(Ye=>Ye+1),v(be),te.current&&clearTimeout(te.current),te.current=setTimeout(()=>v(void 0),2500),W(be)},[pe,W,s.scenes.length]);y.useEffect(()=>{!x&&Sn&&(h(!0),setTimeout(()=>$(ot),100))},[x,Sn,ot,$]);const ye=y.useCallback(()=>{const ue=se.find(be=>be>V);ue!==void 0&&$(ue)},[se,V,$]),De=y.useCallback(()=>{const ue=[...se].reverse().find(be=>be<V);ue!==void 0&&$(ue)},[se,V,$]),Ee=y.useRef(!1);y.useEffect(()=>{P==="playing"&&mt(!1)},[P]),y.useEffect(()=>{if(!O.current||V<0||it.current!==null)return;if(ke.current){ke.current=!1;return}const ue=O.current;Ee.current=!0;const be=Ze=>{const Ge=s.scenes;if(Ze<0||Ze>=Ge.length||Ge[Ze].type==="user-prompt"||Ge[Ze].type==="compaction-summary")return Ze;let Et=Ze;for(;Et>0&&Ge[Et-1].type!=="user-prompt"&&Ge[Et-1].type!=="compaction-summary";)Et--;return Et},Ye=Ze=>{const Ge=ue.querySelector(`[data-scene-index="${Ze}"]`);if(Ge)return Ge;const Et=be(Ze);return ue.querySelector(`[data-scene-index="${Et}"]`)};requestAnimationFrame(()=>{const Ze=Ye(V);if(Ze)if(P==="playing")Ze.scrollIntoView({behavior:"smooth",block:"center"});else{const Ge=ue.getBoundingClientRect(),Tt=Ze.getBoundingClientRect().top-Ge.top+ue.scrollTop-Ge.height*.3;ue.scrollTo({top:Math.max(0,Tt),behavior:"smooth"})}else P==="playing"&&ue.scrollTo({top:ue.scrollHeight,behavior:"smooth"});setTimeout(()=>{Ee.current=!1},400)})},[V,P,s.scenes]),y.useEffect(()=>{const ue=O.current;if(!ue)return;const be=()=>{Ee.current||(mt(!0),P==="playing"&&pe())};return ue.addEventListener("wheel",be,{passive:!0}),ue.addEventListener("touchmove",be,{passive:!0}),()=>{ue.removeEventListener("wheel",be),ue.removeEventListener("touchmove",be)}},[P,pe]),y.useEffect(()=>{const ue=O.current;if(!ue)return;let be=!1;const Ye=()=>{if(P!=="paused"||be||V>=s.scenes.length-1||Ee.current||it.current!==null)return;if(ue.scrollHeight-ue.scrollTop-ue.clientHeight<80){be=!0,ke.current=!0;const sn=A(V);sn!==-1&&W(sn),setTimeout(()=>{be=!1},150)}},Ze=Tt=>{Tt.deltaY>0&&Ye()};let Ge=0;const Et=Tt=>{Ge=Tt.touches[0].clientY},$t=Tt=>{Ge-Tt.changedTouches[0].clientY>20&&Ye()};return ue.addEventListener("scroll",Ye,{passive:!0}),ue.addEventListener("wheel",Ze,{passive:!0}),ue.addEventListener("touchstart",Et,{passive:!0}),ue.addEventListener("touchend",$t,{passive:!0}),()=>{ue.removeEventListener("scroll",Ye),ue.removeEventListener("wheel",Ze),ue.removeEventListener("touchstart",Et),ue.removeEventListener("touchend",$t)}},[P,V,s.scenes.length,W,A]),y.useEffect(()=>{const ue=it.current,be=O.current;if(ue===null||!be||V!==ue)return;let Ye=!1,Ze=0;const Ge=$t=>{const Tt=be.querySelector(`[data-scene-index="${$t}"]`);if(Tt)return Tt;const sn=Array.from(be.querySelectorAll("[data-scene-index]"));let Zn=null,Nn=1/0;for(const mn of sn){const ba=mn.getAttribute("data-scene-index");if(!ba)continue;const Fn=parseInt(ba,10);if(Fn<=$t){const Cs=$t-Fn;Cs<Nn&&(Nn=Cs,Zn=mn)}}return Zn},Et=()=>{if(Ye)return;const $t=Ge(ue);if($t){Ee.current=!0;const Tt=be.getBoundingClientRect(),Nn=$t.getBoundingClientRect().top-Tt.top+be.scrollTop-Tt.height*.3;be.scrollTo({top:Math.max(0,Nn),behavior:"smooth"}),Jv($t),setTimeout(()=>{Ee.current=!1},450),it.current=null;return}Ze+=1,Ze<30?setTimeout(Et,80):it.current=null};return requestAnimationFrame(Et),()=>{Ye=!0}},[V]),y.useEffect(()=>()=>{te.current&&clearTimeout(te.current)},[]);const ve=y.useRef(null);y.useEffect(()=>{if(V<0||!x)return;ve.current&&clearTimeout(ve.current);const ue=P==="playing"?500:0;return ve.current=setTimeout(()=>{const be=new URL(window.location.href);be.searchParams.set("s",String(V)),window.history.replaceState({},"",be.toString())},ue),()=>{ve.current&&clearTimeout(ve.current)}},[V,P,x]);const qe=o==="editor",tt=y.useMemo(()=>re.some(ue=>ue.author==="vibe-feedback"),[re]);if(!x&&c==="replay")return l.jsx(Ev,{session:Z,onStart:pt,onViewInsights:fn});const{meta:nt}=s;return l.jsxs("div",{className:"flex flex-1 min-h-0 relative",children:[l.jsxs("div",{className:"flex flex-col flex-1 min-h-0 min-w-0",children:[l.jsx(Vv,{activeView:c,onChangeView:d,hiddenTabs:m?["export"]:void 0,rightContent:c==="replay"?l.jsxs("div",{className:"flex items-center gap-3",children:[J.overlayCount>0&&l.jsxs("button",{onClick:()=>J.toggleAllOriginals(),className:"flex items-center gap-2 text-xs font-mono text-terminal-dim",title:J.showAllOriginals?"Showing originals — click to show modified":"Showing modified — click to show originals",children:[l.jsx("span",{className:"hidden sm:inline",children:J.showAllOriginals?"Original":"Modified"}),l.jsx("span",{className:`relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors duration-200 ${J.showAllOriginals?"bg-terminal-surface border border-terminal-border":"bg-terminal-purple brightness-75"}`,children:l.jsx("span",{className:`inline-block h-3.5 w-3.5 rounded-full bg-white shadow-sm transition-transform duration-200 ${J.showAllOriginals?"translate-x-[3px]":"translate-x-[17px]"}`})})]}),l.jsxs("button",{onClick:()=>j(!0),className:"flex items-center gap-1.5 text-xs font-mono font-semibold text-terminal-text hover:text-terminal-green transition-colors",title:"Open comments",children:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-terminal-dim",children:l.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),l.jsx("span",{className:"hidden sm:inline",children:"Comments"}),U.annotations.length>0&&l.jsx("span",{className:"ml-0.5 px-1 py-0.5 rounded bg-terminal-black text-[10px] text-terminal-text border border-terminal-border tabular-nums leading-none",children:U.annotations.length})]}),qe&&l.jsxs("button",{onClick:()=>C(!0),className:"pl-2 pr-3 py-1 text-[10px] sm:text-[11px] font-mono rounded bg-[rgba(168,85,247,0.1)] hover:bg-[rgba(168,85,247,0.2)] border border-[rgba(168,85,247,0.3)] hover:border-[rgba(168,85,247,0.5)] text-terminal-purple transition-all flex items-center gap-1.5 relative overflow-hidden group shadow-sm",children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/5 to-transparent -translate-x-full group-hover:translate-x-full transition-transform duration-1000"}),l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-[#c084fc]",children:l.jsx("path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"})}),l.jsx("span",{className:"font-semibold tracking-wide",children:"AI Studio"}),(tt||J.overlayCount>0)&&l.jsxs("span",{className:"relative flex h-1.5 w-1.5",children:[l.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-terminal-purple opacity-75"}),l.jsx("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5 bg-terminal-purple"})]})]})]}):void 0}),l.jsxs("div",{className:"flex flex-1 min-h-0 min-w-0 w-full",children:[c==="replay"&&l.jsxs("div",{className:"flex flex-1 min-h-0 min-w-0 w-full relative",children:[_&&l.jsxs("div",{className:"hidden md:flex w-64 shrink-0 flex-col border-r border-terminal-border-subtle bg-terminal-bg shadow-layer-sm",children:[l.jsxs("div",{className:"flex-1 overflow-y-auto min-h-0",children:[l.jsxs("div",{className:"px-3 py-2 border-b border-terminal-border-subtle flex items-center justify-between group/side",children:[l.jsx("span",{className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest",children:"Outline"}),l.jsx("button",{onClick:()=>z(!1),className:"p-1 rounded hover:bg-terminal-surface text-terminal-dimmer hover:text-terminal-text transition-colors",title:"Hide Sidebar",children:l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}),l.jsx("line",{x1:"9",x2:"9",y1:"3",y2:"21"})]})})]}),l.jsx(Qp,{scenes:s.scenes,currentIndex:V,onSeek:$,overlayActions:J})]}),l.jsxs("div",{className:"shrink-0 border-t border-terminal-border-subtle overflow-y-auto max-h-[35%]",children:[l.jsx("div",{className:"px-3 py-2 border-b border-terminal-border-subtle",children:l.jsx("button",{onClick:()=>d("summary"),className:"text-[10px] font-sans font-semibold text-terminal-dimmer uppercase tracking-widest hover:text-terminal-green transition-colors",title:"Open Insights view",children:"Stats"})}),l.jsxs("div",{className:"p-3",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[l.jsx(Nl,{label:"Turns",value:nt.stats.userPrompts,color:"text-terminal-green"}),l.jsx(Nl,{label:"Tools",value:nt.stats.toolCalls,color:"text-terminal-orange"})]}),l.jsxs("div",{className:"mt-2 text-xs font-mono text-terminal-dim space-y-0.5",children:[nt.model&&l.jsx("div",{children:l.jsx("span",{className:"text-terminal-text",children:nt.model})}),nt.stats.durationMs&&l.jsxs("div",{children:[ga(nt.stats.durationMs),nt.stats.costEstimate!==void 0&&l.jsxs("span",{children:[" / ",l.jsxs("span",{className:"text-terminal-green",children:["$",nt.stats.costEstimate<.01?nt.stats.costEstimate.toFixed(4):nt.stats.costEstimate.toFixed(2)]})]})]}),nt.stats.tokenUsage&&l.jsxs("div",{children:[Ct(nt.stats.tokenUsage.inputTokens)," in /"," ",Ct(nt.stats.tokenUsage.outputTokens)," out"]})]})]})]})]}),l.jsxs("div",{className:"flex flex-col flex-1 min-h-0 min-w-0 relative",children:[!_&&l.jsx("button",{onClick:()=>z(!0),className:"absolute left-0 top-1/2 -translate-y-1/2 z-20 group/expand px-1.5 py-4 bg-terminal-surface/80 backdrop-blur-md border border-l-0 border-terminal-border-subtle rounded-r-xl text-terminal-dim hover:text-terminal-green transition-all shadow-layer-md animate-in slide-in-from-left-2 duration-300",title:"Show Sidebar",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("polyline",{points:"9 18 15 12 9 6"})})}),l.jsx("div",{ref:O,className:"flex-1 overflow-y-auto px-5 py-5 pb-10 overscroll-contain",children:l.jsx(mv,{scenes:s.scenes,visibleCount:oe,currentIndex:V,effectivePrefs:ae,focusIndex:g,annotatedScenes:U.annotatedScenes,annotationCounts:U.annotationCounts,onSeek:$,state:P,overlayActions:J,onComment:m?void 0:ue=>{j(!0),k(ue)}})}),l.jsx(_v,{scenes:Z.scenes,open:X,onClose:()=>de(!1),onSeek:ue=>{$(ue),de(!1)}})]})]}),c==="summary"&&l.jsx(Vp,{session:Z}),c==="export"&&l.jsx(wv,{actions:U,viewerMode:o,readOnly:m,session:Z})]}),c==="replay"&&l.jsxs("div",{className:"shrink-0 border-t border-terminal-border-subtle bg-terminal-surface/80 backdrop-blur-md sticky bottom-0 safe-bottom shadow-layer-lg",children:[l.jsx(Xv,{scenes:s.scenes,currentIndex:V,onSeek:$,annotatedScenes:U.annotatedScenes}),l.jsx(Xy,{state:P,speed:ce,currentIndex:V,totalScenes:le,userPromptCount:xt,currentTurn:Ie,onTogglePlayPause:B,onChangeSpeed:ie,onPrevPrompt:De,onNextPrompt:ye,onOpenSearch:()=>de(!0),onOpenOutline:()=>Oe(!0),onShowHelp:()=>$e(!0)})]})]}),l.jsx(Zy,{open:N,onClose:()=>j(!1),actions:U,scenes:Z.scenes,currentIndex:V,onSeek:$,addingForScene:E,onClearAddingTarget:()=>k(null),readOnly:m}),l.jsx(Jb,{open:S,onClose:()=>C(!1),annotationActions:U,overlayActions:J}),l.jsxs("div",{className:`fixed inset-0 z-40 md:hidden transition-opacity duration-300 ${xe?"opacity-100":"opacity-0 pointer-events-none"}`,onClick:()=>Oe(!1),children:[l.jsx("div",{className:"absolute inset-0 bg-black/40"}),l.jsxs("div",{className:`absolute bottom-0 left-0 right-0 h-[65vh] bg-terminal-bg border-t border-terminal-border-subtle rounded-t-2xl flex flex-col transition-transform duration-300 ease-material-decel safe-bottom shadow-layer-xl ${xe?"translate-y-0":"translate-y-full"}`,onClick:ue=>ue.stopPropagation(),children:[l.jsx("div",{className:"flex justify-center py-2.5 shrink-0",children:l.jsx("div",{className:"w-10 h-1 rounded-full bg-terminal-border"})}),l.jsxs("div",{className:"flex border-b border-terminal-border-subtle shrink-0",children:[l.jsx("button",{onClick:()=>ee("outline"),className:`flex-1 px-3 py-2.5 text-[10px] font-sans font-semibold uppercase tracking-widest transition-colors ${D==="outline"?"text-terminal-green border-b-2 border-terminal-green":"text-terminal-dim hover:text-terminal-text"}`,children:"Outline"}),l.jsx("button",{onClick:()=>ee("stats"),className:`flex-1 px-3 py-2.5 text-[10px] font-sans font-semibold uppercase tracking-widest transition-colors ${D==="stats"?"text-terminal-green border-b-2 border-terminal-green":"text-terminal-dim hover:text-terminal-text"}`,children:"Stats"})]}),l.jsx("div",{className:"flex-1 overflow-y-auto overscroll-contain",children:D==="outline"?l.jsx(Qp,{scenes:s.scenes,currentIndex:V,onSeek:ue=>{$(ue),Oe(!1)},overlayActions:J}):l.jsx(Vp,{session:Z})})]})]}),l.jsx(Nv,{open:we,onClose:()=>$e(!1)})]})}function Iv(){const[s,r]=y.useState({status:"loading"}),o=y.useCallback(()=>{r({status:"loading"}),Pv().then(c=>{r(c==="dashboard"?{status:"dashboard"}:{status:"ready",session:c.session,mode:c.mode,gistOwner:c.gistOwner})},c=>r({status:"error",message:String(c.message||c)}))},[]);return y.useEffect(()=>{o();const c=()=>o();return window.addEventListener("popstate",c),()=>window.removeEventListener("popstate",c)},[o]),s}function Wv(){return!!window.__VIBE_REPLAY_EDITOR__}async function Pv(){if(window.__VIBE_REPLAY_DATA__)return{session:window.__VIBE_REPLAY_DATA__,mode:"embedded"};if(Wv()){const d=new URLSearchParams(window.location.search);if(d.get("view")==="dashboard")return"dashboard";const f=d.get("session");if(f){const m=await fetch(`/api/session?slug=${encodeURIComponent(f)}`);if(!m.ok)throw new Error(`Session not found: ${f}`);return{session:await m.json(),mode:"editor"}}return"dashboard"}const s=new URLSearchParams(window.location.search),r=s.get("gist");if(r){if(!/^[a-f0-9]{20,40}$/.test(r))throw new Error("Invalid gist ID");const{rawUrl:d,owner:f}=await t1(r),m=await Jp(d);return e1(r).catch(()=>{}),{session:m,mode:"readonly",gistOwner:f}}const o=s.get("url");if(o)return{session:await Jp(o),mode:"readonly"};const c=s.get("file");if(c){const d=await fetch(c);if(!d.ok)throw new Error(`Failed to load file: ${d.status}`);return{session:await d.json(),mode:"embedded"}}return"dashboard"}async function Jp(s){const r=await fetch(s);if(!r.ok)throw new Error(`Failed to fetch: ${r.status} ${r.statusText}`);const o=await r.text();if(o.trimStart().startsWith("{"))return JSON.parse(o);throw new Error("URL must point to a vibe-replay JSON replay file")}async function e1(s){await fetch("https://vibe-replay.com/api/replays",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({gist_id:s})})}async function t1(s){const r=await fetch(`https://api.github.com/gists/${s}`);if(!r.ok)throw new Error(`Gist not found: ${r.status}`);const o=await r.json(),c=o.files,d=Object.values(c).find(m=>m.filename.endsWith(".json"));if(!d)throw new Error("No JSON file found in gist");const f=o.owner?.login;return{rawUrl:d.raw_url,owner:f}}function n1(){const[s,r]=y.useState(()=>{const d=new URLSearchParams(window.location.search).get("theme");if(d==="light"||d==="dark")return d;const f=localStorage.getItem("vibe-replay-theme");return f==="light"||f==="dark"?f:"dark"});y.useEffect(()=>{const c=document.documentElement;c.classList.add("theme-transition"),c.classList.toggle("dark",s==="dark"),c.classList.toggle("light",s==="light"),localStorage.setItem("vibe-replay-theme",s);const d=setTimeout(()=>c.classList.remove("theme-transition"),300);return()=>clearTimeout(d)},[s]);const o=y.useCallback(()=>{r(c=>c==="dark"?"light":"dark")},[]);return{theme:s,toggleTheme:o}}function Kp(){const r=new URLSearchParams(window.location.search).get("v");return r==="summary"||r==="export"?r:"replay"}function Ip(){const s=y.useRef(null);return y.useEffect(()=>{const r=s.current;if(!r)return;r.innerHTML="";const o=document.createElement("a");o.className="github-button",o.href="https://github.com/tuo-lei/vibe-replay",o.setAttribute("data-color-scheme","no-preference: dark; light: dark; dark: dark;"),o.setAttribute("data-icon","octicon-star"),o.setAttribute("data-size","large"),o.setAttribute("data-show-count","true"),o.textContent="Star",r.appendChild(o);const c=document.createElement("script");return c.src="https://buttons.github.io/buttons.js",c.async=!0,r.appendChild(c),()=>{r.innerHTML=""}},[]),l.jsx("div",{ref:s,className:"flex items-center h-7 overflow-hidden"})}function a1(){const s=Iv(),{theme:r,toggleTheme:o}=n1(),{prefs:c,updatePref:d,togglePref:f}=Yb(),m=s.status==="ready"?s.session:null,x=s.status==="ready"?s.mode:"embedded",h=s.status==="ready"?s.gistOwner:void 0,g=x==="editor",[v,w]=y.useState(Kp()),T=y.useRef(null);y.useEffect(()=>{const z=()=>w(Kp());return window.addEventListener("popstate",z),()=>window.removeEventListener("popstate",z)},[]);const N=z=>{w(z),vt({v:z==="replay"?null:z})},j=y.useMemo(()=>m?.scenes.some(z=>z.type==="thinking")??!1,[m]),[S,C]=y.useState(!1),E=y.useRef(null);if(y.useEffect(()=>{c.displayMode!=="custom"&&C(!1)},[c.displayMode]),y.useEffect(()=>{if(!S)return;const z=U=>{E.current&&!E.current.contains(U.target)&&C(!1)};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[S]),s.status==="loading")return l.jsx("div",{className:"h-screen bg-terminal-bg flex items-center justify-center",children:l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"text-terminal-green font-sans font-bold text-sm animate-pulse",children:"LOADING SESSION..."}),l.jsx("div",{className:"text-terminal-dimmer font-mono text-xs",children:"Preparing replay data"})]})});if(s.status==="error")return l.jsx("div",{className:"h-screen bg-terminal-bg flex items-center justify-center",children:l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"text-terminal-red font-mono text-sm",children:s.message}),l.jsx("div",{className:"text-terminal-dim font-mono text-xs",children:"Use ?gist=<id> or ?url=<replay-json-url> or embed via CLI"})]})});if(s.status==="dashboard")return l.jsxs("div",{className:"h-screen bg-terminal-bg flex flex-col overflow-hidden",children:[l.jsxs("header",{className:"border-b border-terminal-border-subtle px-4 md:px-5 py-2.5 md:py-3 flex items-center justify-between shrink-0 glass-effect z-40 safe-top",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("button",{onClick:()=>vt({view:null,session:null}),className:"text-sm font-sans font-bold bg-gradient-to-r from-terminal-green to-terminal-blue bg-clip-text text-transparent hover:opacity-80 transition-opacity",children:"vibe-replay"}),l.jsxs("span",{className:"instant-tooltip inline-flex items-center gap-1.5 text-[10px] font-sans font-bold px-2.5 py-1 rounded-full bg-terminal-green/10 text-terminal-green uppercase tracking-wider border border-terminal-green/20",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-green animate-pulse"}),"Live",l.jsxs("span",{className:"instant-tooltip-text",children:["Viewer ",window.location.host,void 0]})]}),l.jsx("span",{className:"text-terminal-border/40 text-sm select-none",children:"|"}),l.jsx("span",{className:"text-sm font-sans font-semibold text-terminal-text/90",children:"Dashboard"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ip,{}),l.jsx("button",{onClick:o,className:"h-7 w-7 flex items-center justify-center rounded-md bg-terminal-surface text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover text-xs transition-colors",children:r==="dark"?"☾":"☀"})]})]}),l.jsx(Eb,{})]});const{meta:k}=m,_=g&&new URLSearchParams(window.location.search).has("session");return l.jsxs("div",{className:"h-screen bg-terminal-bg flex flex-col overflow-hidden",children:[l.jsxs("header",{className:"relative z-40 border-b border-terminal-border-subtle px-4 md:px-5 py-2.5 md:py-3 flex items-center justify-between shrink-0 glass-effect safe-top",children:[l.jsxs("div",{className:"flex items-center gap-2 md:gap-3 min-w-0",children:[g?l.jsx("button",{onClick:()=>vt({view:"dashboard",session:null}),className:"text-sm font-sans font-bold shrink-0 hover:opacity-80 transition-opacity bg-gradient-to-r from-terminal-green to-terminal-blue bg-clip-text text-transparent",children:"vibe-replay"}):l.jsx("a",{href:"https://vibe-replay.com",target:"_blank",rel:"noopener noreferrer",className:"text-sm font-sans font-bold shrink-0 hover:opacity-80 transition-opacity bg-gradient-to-r from-terminal-green to-terminal-blue bg-clip-text text-transparent",children:"vibe-replay"}),g&&l.jsxs("span",{className:"instant-tooltip inline-flex items-center gap-1.5 text-[10px] font-sans font-bold px-2.5 py-1 rounded-full bg-terminal-green/10 text-terminal-green uppercase tracking-wider border border-terminal-green/20",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-terminal-green animate-pulse"}),"Live",l.jsxs("span",{className:"instant-tooltip-text",children:["Viewer ",window.location.host,void 0]})]}),_&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-terminal-border/40 text-sm select-none",children:"|"}),l.jsxs("button",{onClick:()=>vt({view:"dashboard",session:null}),className:"flex items-center gap-0.5 text-sm font-sans font-medium text-terminal-dim hover:text-terminal-text transition-colors",children:[l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M10 3L5 8l5 5"})}),"Dashboard"]})]}),k.title&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"hidden md:inline text-terminal-border/40 text-sm select-none",children:"|"}),l.jsx("button",{type:"button",onClick:()=>{T.current?.(),N("replay")},className:"hidden md:inline text-terminal-text text-xs font-sans font-medium truncate max-w-[300px] hover:text-terminal-green transition-colors",title:"Back to landing page",children:k.title}),l.jsx("span",{className:"shrink-0 px-1.5 py-0.5 text-[10px] font-mono rounded bg-terminal-surface text-terminal-dimmer border border-terminal-border-subtle uppercase tracking-tight",children:k.project||"No Project"})]}),l.jsx("div",{className:"hidden sm:flex items-center gap-1.5 text-xs font-mono text-terminal-dim",children:h&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-terminal-border",children:"·"}),l.jsxs("a",{href:`https://github.com/${h}`,target:"_blank",rel:"noopener noreferrer",className:"text-terminal-dim hover:text-terminal-text transition-colors",children:["@",h]})]})})]}),l.jsxs("div",{className:"flex items-center gap-1.5 md:gap-2 shrink-0",children:[g&&!_&&l.jsxs("button",{onClick:()=>vt({view:"dashboard",session:null}),className:"h-7 px-2.5 flex items-center gap-1.5 rounded-md bg-terminal-surface text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover text-xs font-sans font-medium transition-colors",title:"All replays",children:[l.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[l.jsx("rect",{x:"1",y:"1",width:"6",height:"6",rx:"1"}),l.jsx("rect",{x:"9",y:"1",width:"6",height:"6",rx:"1"}),l.jsx("rect",{x:"1",y:"9",width:"6",height:"6",rx:"1"}),l.jsx("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1"})]}),l.jsx("span",{className:"hidden sm:inline",children:"Dashboard"})]}),l.jsxs("div",{ref:E,className:"relative flex items-center",children:[l.jsxs("div",{className:"flex items-center h-7 rounded-md overflow-hidden bg-terminal-surface",children:[l.jsx("button",{onClick:()=>d("displayMode","all"),className:`h-full px-2.5 text-xs font-mono transition-colors ${c.displayMode==="all"?"bg-terminal-green-subtle text-terminal-green":"text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover"}`,children:"All"}),l.jsx("button",{onClick:()=>d("displayMode","compact"),className:`h-full px-2.5 text-xs font-mono transition-colors ${c.displayMode==="compact"?"bg-terminal-green-subtle text-terminal-green":"text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover"}`,children:"Compact"}),l.jsx("button",{onClick:()=>{d("displayMode","custom"),C(z=>c.displayMode==="custom"?!z:!0)},className:`h-full px-2.5 text-xs font-mono transition-colors ${c.displayMode==="custom"?"bg-terminal-green-subtle text-terminal-green":"text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover"}`,children:"Custom"})]}),S&&c.displayMode==="custom"&&l.jsxs("div",{className:"absolute right-0 top-full mt-2 w-40 bg-terminal-surface border border-terminal-border-subtle rounded-xl shadow-layer-xl z-50 py-1.5 backdrop-blur-md",children:[l.jsxs("button",{onClick:()=>f("promptsOnly"),className:"w-full text-left px-3 py-1.5 text-xs font-mono text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface/50 transition-colors flex items-center gap-2",children:[l.jsx("span",{className:`w-3.5 h-3.5 rounded flex items-center justify-center text-[10px] ${c.promptsOnly?"bg-terminal-green-subtle text-terminal-green":"bg-terminal-bg"}`,children:c.promptsOnly?"✓":""}),"Prompts Only"]}),l.jsxs("button",{onClick:()=>f("collapseAllTools"),className:"w-full text-left px-3 py-1.5 text-xs font-mono text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface/50 transition-colors flex items-center gap-2",children:[l.jsx("span",{className:`w-3.5 h-3.5 rounded flex items-center justify-center text-[10px] ${c.collapseAllTools?"bg-terminal-orange-subtle text-terminal-orange":"bg-terminal-bg"}`,children:c.collapseAllTools?"✓":""}),"Tools Collapsed"]}),j&&l.jsxs("button",{onClick:()=>f("hideThinking"),className:"w-full text-left px-3 py-1.5 text-xs font-mono text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface/50 transition-colors flex items-center gap-2",children:[l.jsx("span",{className:`w-3.5 h-3.5 rounded flex items-center justify-center text-[10px] ${c.hideThinking?"bg-terminal-purple-subtle text-terminal-purple":"bg-terminal-bg"}`,children:c.hideThinking?"✓":""}),"Thinking Hidden"]})]})]}),l.jsx(Ip,{}),l.jsx("button",{onClick:o,className:"h-7 w-7 flex items-center justify-center rounded-md bg-terminal-surface text-terminal-dim hover:text-terminal-text hover:bg-terminal-surface-hover text-xs transition-colors",title:r==="dark"?"Light mode":"Dark mode",children:r==="dark"?"☾":"☀"})]})]}),l.jsx(Kv,{session:m,viewPrefs:c,viewerMode:x,activeView:v,setActiveView:N,returnToLandingRef:T})]})}eb.createRoot(document.getElementById("root")).render(l.jsx(Xg.StrictMode,{children:l.jsx(a1,{})}));</script>
148
+ <style rel="stylesheet" crossorigin>*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-sans);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{scrollbar-width:thin;scrollbar-color:var(--border) var(--bg)}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:var(--bg)}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}.tabular-nums{font-variant-numeric:tabular-nums}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-3{top:.75rem}.top-full{top:100%}.-z-10{z-index:-10}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[60\]{z-index:60}.\!m-0{margin:0!important}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-5{margin-left:1.25rem;margin-right:1.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-1\.5{margin-top:.375rem;margin-bottom:.375rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.mt-px{margin-top:1px}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-\[250px\]{height:250px}.h-\[300px\]{height:300px}.h-\[350px\]{height:350px}.h-\[400px\]{height:400px}.h-\[65vh\]{height:65vh}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-72{max-height:18rem}.max-h-\[200px\]{max-height:200px}.max-h-\[300px\]{max-height:300px}.max-h-\[35\%\]{max-height:35%}.max-h-\[4\.5em\]{max-height:4.5em}.max-h-\[400px\]{max-height:400px}.max-h-\[50vh\]{max-height:50vh}.min-h-0{min-height:0px}.min-h-screen{min-height:100vh}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[140px\]{min-width:140px}.min-w-\[40px\]{min-width:40px}.max-w-0{max-width:0px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-\[200px\]{max-width:200px}.max-w-\[300px\]{max-width:300px}.max-w-\[400px\]{max-width:400px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[17px\]{--tw-translate-x: 17px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[3px\]{--tw-translate-x: 3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-px{gap:1px}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-3\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.875rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.875rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.rounded-t-sm{border-top-left-radius:.125rem;border-top-right-radius:.125rem}.border{border-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\[rgba\(168\,85\,247\,0\.2\)\]{border-color:#a855f733}.border-\[rgba\(168\,85\,247\,0\.3\)\]{border-color:#a855f74d}.border-terminal-blue{border-color:var(--blue)}.border-terminal-border{border-color:var(--border)}.border-terminal-border-subtle{border-color:var(--border-subtle)}.border-terminal-dim{border-color:var(--dim)}.border-terminal-green{border-color:var(--green)}.border-white\/5{border-color:#ffffff0d}.border-l-terminal-blue{border-left-color:var(--blue)}.border-l-terminal-purple{border-left-color:var(--purple)}.\!bg-transparent{background-color:transparent!important}.bg-\[rgba\(168\,85\,247\,0\.1\)\]{background-color:#a855f71a}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-terminal-bg{background-color:var(--bg)}.bg-terminal-blue{background-color:var(--blue)}.bg-terminal-blue-emphasis{background-color:var(--blue-emphasis)}.bg-terminal-blue-subtle{background-color:var(--blue-subtle)}.bg-terminal-border{background-color:var(--border)}.bg-terminal-border-subtle{background-color:var(--border-subtle)}.bg-terminal-dim{background-color:var(--dim)}.bg-terminal-green{background-color:var(--green)}.bg-terminal-green-emphasis{background-color:var(--green-emphasis)}.bg-terminal-green-subtle{background-color:var(--green-subtle)}.bg-terminal-orange{background-color:var(--orange)}.bg-terminal-orange-subtle{background-color:var(--orange-subtle)}.bg-terminal-purple{background-color:var(--purple)}.bg-terminal-purple-subtle{background-color:var(--purple-subtle)}.bg-terminal-red-subtle{background-color:var(--red-subtle)}.bg-terminal-surface{background-color:var(--surface)}.bg-terminal-surface-2{background-color:var(--surface-2)}.bg-terminal-surface-hover{background-color:var(--surface-hover)}.bg-terminal-surface-inset{background-color:var(--surface-inset)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-terminal-bg{--tw-gradient-from: var(--bg) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-terminal-green{--tw-gradient-from: var(--green) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-terminal-green-subtle{--tw-gradient-from: var(--green-subtle) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-terminal-surface{--tw-gradient-from: var(--surface) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-transparent{--tw-gradient-from: transparent var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-transparent{--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), transparent var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-white\/5{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(255 255 255 / .05) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-terminal-blue{--tw-gradient-to: var(--blue) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-px{padding-top:1px;padding-bottom:1px}.pb-1{padding-bottom:.25rem}.pb-10{padding-bottom:2.5rem}.pb-12{padding-bottom:3rem}.pb-2{padding-bottom:.5rem}.pb-24{padding-bottom:6rem}.pb-3{padding-bottom:.75rem}.pb-6{padding-bottom:1.5rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pl-9{padding-left:2.25rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-7{padding-right:1.75rem}.pr-8{padding-right:2rem}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.pt-12{padding-top:3rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-\[8vh\]{padding-top:8vh}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:var(--font-sans)}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.normal-case{text-transform:none}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-5{line-height:1.25rem}.leading-\[1\.15\]{line-height:1.15}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-\[\.25em\]{letter-spacing:.25em}.tracking-\[0\.15em\]{letter-spacing:.15em}.tracking-\[0\.2em\]{letter-spacing:.2em}.tracking-\[0\.3em\]{letter-spacing:.3em}.tracking-normal{letter-spacing:0em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[\#c084fc\]{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-terminal-bg{color:var(--bg)}.text-terminal-blue{color:var(--blue)}.text-terminal-border{color:var(--border)}.text-terminal-dim{color:var(--dim)}.text-terminal-dimmer{color:var(--dimmer)}.text-terminal-green{color:var(--green)}.text-terminal-orange{color:var(--orange)}.text-terminal-purple{color:var(--purple)}.text-terminal-red{color:var(--red)}.text-terminal-text{color:var(--text)}.text-transparent{color:transparent}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.placeholder-terminal-dim::-moz-placeholder{color:var(--dim)}.placeholder-terminal-dim::placeholder{color:var(--dim)}.placeholder-terminal-dimmer::-moz-placeholder{color:var(--dimmer)}.placeholder-terminal-dimmer::placeholder{color:var(--dimmer)}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.shadow-\[0_0_8px_rgba\(251\,146\,60\,0\.5\)\]{--tw-shadow: 0 0 8px rgba(251,146,60,.5);--tw-shadow-colored: 0 0 8px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-layer-lg{--tw-shadow: var(--shadow-lg);--tw-shadow-colored: var(--shadow-lg);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-layer-md{--tw-shadow: var(--shadow-md);--tw-shadow-colored: var(--shadow-md);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-layer-sm{--tw-shadow: var(--shadow-sm);--tw-shadow-colored: var(--shadow-sm);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-layer-xl{--tw-shadow: var(--shadow-xl);--tw-shadow-colored: var(--shadow-xl);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-terminal-border-subtle{--tw-ring-color: var(--border-subtle)}.ring-transparent{--tw-ring-color: transparent}.blur-2xl{--tw-blur: blur(40px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.brightness-75{--tw-brightness: brightness(.75);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[left\]{transition-property:left;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-1000{transition-duration:1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.ease-material{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-material-decel,.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}:root{--font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif}:root,.dark{--bg: #0d1117;--surface: #161b22;--surface-hover: #21262d;--surface-2: #1c2129;--surface-inset: #010409;--border: #30363d;--border-subtle: rgba(48, 54, 61, .5);--text: #c9d1d9;--dim: #8b949e;--dimmer: #7d8590;--green: #3fb950;--green-subtle: rgba(63, 185, 80, .15);--green-emphasis: rgba(63, 185, 80, .25);--blue: #79b8ff;--blue-subtle: rgba(121, 184, 255, .15);--blue-emphasis: rgba(121, 184, 255, .25);--orange: #d29922;--orange-subtle: rgba(210, 153, 34, .15);--orange-emphasis: rgba(210, 153, 34, .25);--red: #f85149;--red-subtle: rgba(248, 81, 73, .15);--red-emphasis: rgba(248, 81, 73, .25);--purple: #b392f0;--purple-subtle: rgba(179, 146, 240, .15);--purple-emphasis: rgba(179, 146, 240, .25);--cyan: #56d4dd;--cyan-subtle: rgba(86, 212, 221, .15);--shadow-color: 215 28% 4%;--shadow-sm: 0 1px 2px hsl(var(--shadow-color) / .5);--shadow-md: 0 1px 2px hsl(var(--shadow-color) / .4), 0 4px 8px hsl(var(--shadow-color) / .3);--shadow-lg: 0 1px 3px hsl(var(--shadow-color) / .4), 0 4px 8px hsl(var(--shadow-color) / .3), 0 12px 24px hsl(var(--shadow-color) / .25);--shadow-xl: 0 2px 4px hsl(var(--shadow-color) / .4), 0 8px 16px hsl(var(--shadow-color) / .3), 0 24px 48px hsl(var(--shadow-color) / .25);--surface-subtle-glass: rgba(13, 17, 23, .7)}.light{--bg: #ffffff;--surface: #f6f8fa;--surface-hover: #e6edf3;--surface-2: #ebeef1;--surface-inset: #f0f2f5;--border: #d0d7de;--border-subtle: rgba(208, 215, 222, .5);--text: #24292f;--dim: #57606a;--dimmer: #697078;--green: #1a7f37;--green-subtle: rgba(26, 127, 55, .1);--green-emphasis: rgba(26, 127, 55, .2);--blue: #0969da;--blue-subtle: rgba(9, 105, 218, .1);--blue-emphasis: rgba(9, 105, 218, .2);--orange: #9a6700;--orange-subtle: rgba(154, 103, 0, .1);--orange-emphasis: rgba(154, 103, 0, .2);--red: #cf222e;--red-subtle: rgba(207, 34, 46, .1);--red-emphasis: rgba(207, 34, 46, .2);--purple: #8250df;--purple-subtle: rgba(130, 80, 223, .1);--purple-emphasis: rgba(130, 80, 223, .2);--cyan: #0e7c86;--cyan-subtle: rgba(14, 124, 134, .1);--shadow-color: 220 10% 50%;--shadow-sm: 0 1px 2px hsl(var(--shadow-color) / .1);--shadow-md: 0 1px 2px hsl(var(--shadow-color) / .08), 0 4px 8px hsl(var(--shadow-color) / .06);--shadow-lg: 0 1px 3px hsl(var(--shadow-color) / .08), 0 4px 8px hsl(var(--shadow-color) / .06), 0 12px 24px hsl(var(--shadow-color) / .05);--shadow-xl: 0 2px 4px hsl(var(--shadow-color) / .08), 0 8px 16px hsl(var(--shadow-color) / .06), 0 24px 48px hsl(var(--shadow-color) / .05);--surface-subtle-glass: rgba(255, 255, 255, .75)}html.theme-transition,html.theme-transition *,html.theme-transition *:before,html.theme-transition *:after{transition:background-color .25s ease,border-color .25s ease,color .25s ease}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}button,[role=button]{-webkit-tap-highlight-color:transparent}:focus:not(:focus-visible){outline:none}:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:4px}@supports (padding: env(safe-area-inset-top)){.safe-top{padding-top:env(safe-area-inset-top)}.safe-bottom{padding-bottom:env(safe-area-inset-bottom)}}@keyframes blink{0%,to{opacity:1}50%{opacity:0}}.typing-cursor:after{content:"█";animation:blink 1s step-end infinite;color:var(--green)}@keyframes fade-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.scene-enter{animation:fade-in .3s cubic-bezier(.4,0,.2,1)}@keyframes pulse-border{0%,to{border-color:#d299224d}50%{border-color:#d2992299}}.pause-overlay{animation:pulse-border 2s ease-in-out infinite}@keyframes jump-target-flash{0%{box-shadow:0 0 #3fb95000;outline-color:#3fb95000}30%{box-shadow:0 0 0 3px #3fb95040;outline-color:#3fb95099}to{box-shadow:0 0 #3fb95000;outline-color:#3fb95000}}.jump-target-flash{outline:1px solid transparent;animation:jump-target-flash .85s ease-out}@keyframes nav-focus-pulse{0%,to{transform:translateY(0)}50%{transform:translateY(-1px)}}.scene-nav-focused{animation:nav-focus-pulse .9s ease-in-out 2}@keyframes landing-glow{0%,to{box-shadow:0 0 #3fb95000}50%{box-shadow:0 0 20px 2px #3fb95026}}.landing-pulse{animation:landing-glow 2.5s ease-in-out infinite}.instant-tooltip{position:relative}.instant-tooltip .instant-tooltip-text{visibility:hidden;opacity:0;position:absolute;left:50%;top:100%;transform:translate(-50%);margin-top:6px;padding:4px 8px;border-radius:6px;background:var(--surface);border:1px solid var(--border-subtle);box-shadow:var(--shadow-md);color:var(--text);font:11px / 1.4 var(--font-sans),monospace;text-transform:none;letter-spacing:normal;white-space:nowrap;pointer-events:none;z-index:50;transition:opacity .08s ease}.instant-tooltip:hover .instant-tooltip-text{visibility:visible;opacity:1}.hover-lift{transition:transform .25s cubic-bezier(.175,.885,.32,1.275),box-shadow .25s cubic-bezier(.175,.885,.32,1.275),background-color .2s ease}.hover-lift:hover{transform:translateY(-2px);box-shadow:var(--shadow-lg)}.glass-effect{backdrop-filter:blur(12px) saturate(180%);-webkit-backdrop-filter:blur(12px) saturate(180%);background-color:var(--surface-subtle-glass)}.premium-card{position:relative}.premium-card:before{content:"";position:absolute;inset:0;padding:1px;border-radius:inherit;background:linear-gradient(135deg,var(--green-subtle),var(--blue-subtle));-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none;opacity:.5}@keyframes shimmer{0%{background-position:-1000px 0}to{background-position:1000px 0}}.skeleton{background:linear-gradient(90deg,var(--surface-2) 25%,var(--surface-hover) 50%,var(--surface-2) 75%);background-size:1000px 100%;animation:shimmer 2s infinite linear;border-radius:4px}.bg-dot-grid{background-image:radial-gradient(circle,var(--text) 1px,transparent 1px);background-size:24px 24px;opacity:.03}.minimap-item{transition:background-color .2s cubic-bezier(.4,0,.2,1),border-color .2s cubic-bezier(.4,0,.2,1)}.prose-terminal{line-height:1.6}.prose-terminal p{margin:.5em 0}.prose-terminal code{background:var(--surface);padding:.15em .4em;border-radius:4px;font-size:.9em}.prose-terminal pre{background:var(--surface);padding:.75em 1em;border-radius:6px;overflow-x:auto;margin:.5em 0}.prose-terminal pre code{background:none;padding:0}.prose-terminal ul,.prose-terminal ol{padding-left:1.5em;margin:.5em 0}.prose-terminal li{margin:.25em 0}.prose-terminal h1,.prose-terminal h2,.prose-terminal h3{margin:.75em 0 .5em;font-weight:600}.prose-terminal blockquote{border-left:3px solid var(--border);padding-left:1em;color:var(--dim);margin:.5em 0}.prose-terminal a{color:var(--blue);text-decoration:underline}.prose-terminal table{border-collapse:collapse;margin:.5em 0}.prose-terminal th,.prose-terminal td{border:1px solid var(--border);padding:.4em .8em}.placeholder\:text-terminal-dimmer::-moz-placeholder{color:var(--dimmer)}.placeholder\:text-terminal-dimmer::placeholder{color:var(--dimmer)}.hover\:-translate-y-0\.5:hover{--tw-translate-y: -.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-\[rgba\(168\,85\,247\,0\.5\)\]:hover{border-color:#a855f780}.hover\:border-terminal-border:hover{border-color:var(--border)}.hover\:bg-\[rgba\(168\,85\,247\,0\.2\)\]:hover{background-color:#a855f733}.hover\:bg-\[rgba\(168\,85\,247\,0\.25\)\]:hover{background-color:#a855f740}.hover\:bg-terminal-blue-emphasis:hover{background-color:var(--blue-emphasis)}.hover\:bg-terminal-blue-subtle:hover{background-color:var(--blue-subtle)}.hover\:bg-terminal-green-emphasis:hover{background-color:var(--green-emphasis)}.hover\:bg-terminal-orange-emphasis:hover{background-color:var(--orange-emphasis)}.hover\:bg-terminal-orange-subtle:hover{background-color:var(--orange-subtle)}.hover\:bg-terminal-purple-emphasis:hover{background-color:var(--purple-emphasis)}.hover\:bg-terminal-purple-subtle:hover{background-color:var(--purple-subtle)}.hover\:bg-terminal-red-emphasis:hover{background-color:var(--red-emphasis)}.hover\:bg-terminal-red-subtle:hover{background-color:var(--red-subtle)}.hover\:bg-terminal-surface:hover{background-color:var(--surface)}.hover\:bg-terminal-surface-hover:hover{background-color:var(--surface-hover)}.hover\:text-terminal-blue:hover{color:var(--blue)}.hover\:text-terminal-dim:hover{color:var(--dim)}.hover\:text-terminal-green:hover{color:var(--green)}.hover\:text-terminal-orange:hover{color:var(--orange)}.hover\:text-terminal-red:hover{color:var(--red)}.hover\:text-terminal-text:hover{color:var(--text)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-layer-lg:hover{--tw-shadow: var(--shadow-lg);--tw-shadow-colored: var(--shadow-lg);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-layer-md:hover{--tw-shadow: var(--shadow-md);--tw-shadow-colored: var(--shadow-md);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:block{display:block}.group:hover .group-hover\:-translate-y-0\.5{--tw-translate-y: -.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:rotate-3{--tw-rotate: 3deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group\/help:hover .group-hover\/help\:border-terminal-text{border-color:var(--text)}.group\/help:hover .group-hover\/help\:bg-terminal-text{background-color:var(--text)}.group\/help:hover .group-hover\/help\:text-terminal-bg{color:var(--bg)}.group\/ref:hover .group-hover\/ref\:text-terminal-text{color:var(--text)}.group\/search:hover .group-hover\/search\:text-terminal-blue{color:var(--blue)}.group:hover .group-hover\:text-terminal-green{color:var(--green)}.group:hover .group-hover\:text-terminal-text{color:var(--text)}.group\/batch:hover .group-hover\/batch\:opacity-100,.group\/help:hover .group-hover\/help\:opacity-100,.group\/pause:hover .group-hover\/pause\:opacity-100,.group\/scene:hover .group-hover\/scene\:opacity-100,.group\/search:hover .group-hover\/search\:opacity-100{opacity:1}.group\/search:hover .group-hover\/search\:opacity-80{opacity:.8}.group:hover .group-hover\:opacity-100{opacity:1}.group:hover .group-hover\:opacity-60{opacity:.6}.dark\:bg-green-900\/30:is(.dark *){background-color:#14532d4d}.dark\:bg-red-900\/30:is(.dark *){background-color:#7f1d1d4d}@media(min-width:640px){.sm\:mx-0{margin-left:0;margin-right:0}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:pt-\[15vh\]{padding-top:15vh}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-\[11px\]{font-size:11px}}@media(min-width:768px){.md\:ml-12{margin-left:3rem}.md\:mt-10{margin-top:2.5rem}.md\:block{display:block}.md\:inline{display:inline}.md\:flex{display:flex}.md\:hidden{display:none}.md\:gap-2{gap:.5rem}.md\:gap-3{gap:.75rem}.md\:gap-4{gap:1rem}.md\:space-y-7>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.75rem * var(--tw-space-y-reverse))}.md\:p-8{padding:2rem}.md\:px-5{padding-left:1.25rem;padding-right:1.25rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:py-3{padding-top:.75rem;padding-bottom:.75rem}.md\:text-5xl{font-size:3rem;line-height:1}}@media(min-width:1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:inline{display:inline}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\[\&\>svg\]\:block>svg{display:block}.\[\&\>svg\]\:h-auto>svg{height:auto}.\[\&\>svg\]\:w-full>svg{width:100%}</style>
149
149
  </head>
150
150
  <body class="bg-terminal-bg text-terminal-text min-h-screen">
151
151
  <div id="root"></div>