@ingit/cli-linux-arm64 0.1.5 → 0.1.7

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.
@@ -0,0 +1,615 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function te(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function oe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(te(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ie(a,u),c+=oe(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ie(a,u++),c+=oe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return oe(ae(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function se(e,t,n){if(e==null)return e;var r=[],i=0;return oe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ce(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var D=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&&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)},O={map:se,forEach:function(e,t,n){se(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return se(e,function(){t++}),t},toArray:function(e){return se(e,function(e){return e})||[]},only:function(e){if(!te(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=O,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=te,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ce}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,D)}catch(e){D(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,te());else{var t=n(l);t!==null&&ie(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ie(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?te():S=!1}}}var te;if(typeof y==`function`)te=function(){y(ee)};else if(typeof MessageChannel<`u`){var ne=new MessageChannel,re=ne.port2;ne.port1.onmessage=ee,te=function(){re.postMessage(null)}}else te=function(){_(ee,0)};function ie(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ie(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,te()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),m=o(((e,t)=>{t.exports=p()})),h=o((e=>{var t=f();function n(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 r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=o((e=>{var t=m(),n=f(),r=g();function i(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 a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(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 c(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 l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,h=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),ee=Symbol.for(`react.memo`),te=Symbol.for(`react.lazy`),ne=Symbol.for(`react.activity`),re=Symbol.for(`react.memo_cache_sentinel`),ie=Symbol.iterator;function ae(e){return typeof e!=`object`||!e?null:(e=ie&&e[ie]||e[`@@iterator`],typeof e==`function`?e:null)}var oe=Symbol.for(`react.client.reference`);function se(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case ne:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ee:return t=e.displayName||null,t===null?se(e.type)||`Memo`:t;case te:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var ce=Array.isArray,D=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},k=[],ue=-1;function de(e){return{current:e}}function fe(e){0>ue||(e.current=k[ue],k[ue]=null,ue--)}function A(e,t){ue++,k[ue]=e.current,e.current=t}var pe=de(null),j=de(null),me=de(null),he=de(null);function ge(e,t){switch(A(me,t),A(j,e),A(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Wd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Wd(t),e=Gd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}fe(pe),A(pe,e)}function _e(){fe(pe),fe(j),fe(me)}function ve(e){e.memoizedState!==null&&A(he,e);var t=pe.current,n=Gd(t,e.type);t!==n&&(A(j,e),A(pe,n))}function ye(e){j.current===e&&(fe(pe),fe(j)),he.current===e&&(fe(he),Qf._currentValue=le)}var be,xe;function Se(e){if(be===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);be=t&&t[1]||``,xe=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+be+e+xe}var Ce=!1;function we(e,t){if(!e||Ce)return``;Ce=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ce=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Se(n):``}function Te(e,t){switch(e.tag){case 26:case 27:case 5:return Se(e.type);case 16:return Se(`Lazy`);case 13:return e.child!==t&&t!==null?Se(`Suspense Fallback`):Se(`Suspense`);case 19:return Se(`SuspenseList`);case 0:case 15:return we(e.type,!1);case 11:return we(e.type.render,!1);case 1:return we(e.type,!0);case 31:return Se(`Activity`);default:return``}}function Ee(e){try{var t=``,n=null;do t+=Te(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var De=Object.prototype.hasOwnProperty,Oe=t.unstable_scheduleCallback,ke=t.unstable_cancelCallback,Ae=t.unstable_shouldYield,je=t.unstable_requestPaint,Me=t.unstable_now,Ne=t.unstable_getCurrentPriorityLevel,Pe=t.unstable_ImmediatePriority,Fe=t.unstable_UserBlockingPriority,Ie=t.unstable_NormalPriority,Le=t.unstable_LowPriority,M=t.unstable_IdlePriority,Re=t.log,N=t.unstable_setDisableYieldValue,P=null,ze=null;function F(e){if(typeof Re==`function`&&N(e),ze&&typeof ze.setStrictMode==`function`)try{ze.setStrictMode(P,e)}catch{}}var Be=Math.clz32?Math.clz32:Ue,Ve=Math.log,He=Math.LN2;function Ue(e){return e>>>=0,e===0?32:31-(Ve(e)/He|0)|0}var We=256,Ge=262144,Ke=4194304;function qe(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 Je(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=qe(n))):i=qe(o):i=qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=qe(n))):i=qe(o)):i=qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ye(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Xe(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 Ze(){var e=Ke;return Ke<<=1,!(Ke&62914560)&&(Ke=4194304),e}function Qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $e(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function et(e,t,n,r,i,a){var o=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 s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Be(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&tt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function tt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Be(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function nt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Be(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function rt(e,t){var n=t&-t;return n=n&42?1:it(n),(n&(e.suspendedLanes|t))===0?n:0}function it(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 at(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ot(){var e=O.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function st(e,t){var n=O.p;try{return O.p=e,t()}finally{O.p=n}}var ct=Math.random().toString(36).slice(2),lt=`__reactFiber$`+ct,ut=`__reactProps$`+ct,dt=`__reactContainer$`+ct,ft=`__reactEvents$`+ct,pt=`__reactListeners$`+ct,mt=`__reactHandles$`+ct,ht=`__reactResources$`+ct,gt=`__reactMarker$`+ct;function _t(e){delete e[lt],delete e[ut],delete e[ft],delete e[pt],delete e[mt]}function vt(e){var t=e[lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[dt]||n[lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pf(e);e!==null;){if(n=e[lt])return n;e=pf(e)}return t}e=n,n=e.parentNode}return null}function yt(e){if(e=e[lt]||e[dt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function bt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function xt(e){var t=e[ht];return t||=e[ht]={hoistableStyles:new Map,hoistableScripts:new Map},t}function St(e){e[gt]=!0}var Ct=new Set,wt={};function Tt(e,t){Et(e,t),Et(e+`Capture`,t)}function Et(e,t){for(wt[e]=t,e=0;e<t.length;e++)Ct.add(t[e])}var Dt=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]*$`),Ot={},kt={};function At(e){return De.call(kt,e)?!0:De.call(Ot,e)?!1:Dt.test(e)?kt[e]=!0:(Ot[e]=!0,!1)}function I(e,t,n){if(At(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function jt(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 Mt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Nt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Pt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ft(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function It(e){if(!e._valueTracker){var t=Pt(e)?`checked`:`value`;e._valueTracker=Ft(e,t,``+e[t])}}function Lt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Pt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Rt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var zt=/[\n"\\]/g;function Bt(e){return e.replace(zt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Vt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Nt(t)):e.value!==``+Nt(t)&&(e.value=``+Nt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ut(e,o,Nt(n)):Ut(e,o,Nt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Nt(s):e.removeAttribute(`name`)}function Ht(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){It(e);return}n=n==null?``:``+Nt(n),t=t==null?n:``+Nt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),It(e)}function Ut(e,t,n){t===`number`&&Rt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Wt(e,t,n,r){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&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Nt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Gt(e,t,n){if(t!=null&&(t=``+Nt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Nt(n)}function Kt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ce(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Nt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),It(e)}function L(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qt=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 Jt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Yt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Jt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Jt(e,o,t[o])}function Xt(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 Zt=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`]]),Qt=/^[\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 $t(e){return Qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function en(){}var tn=null;function nn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rn=null,an=null;function on(e){var t=yt(e);if(t&&(e=t.stateNode)){var n=e[ut]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Vt(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="`+Bt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ut]||null;if(!a)throw Error(i(90));Vt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Lt(r)}break a;case`textarea`:Gt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Wt(e,!!n.multiple,t,!1)}}}var sn=!1;function cn(e,t,n){if(sn)return e(t,n);sn=!0;try{return e(t)}finally{if(sn=!1,(rn!==null||an!==null)&&(Su(),rn&&(t=rn,e=an,an=rn=null,on(t),e)))for(t=0;t<e.length;t++)on(e[t])}}function ln(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ut]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var un=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),dn=!1;if(un)try{var fn={};Object.defineProperty(fn,"passive",{get:function(){dn=!0}}),window.addEventListener(`test`,fn,fn),window.removeEventListener(`test`,fn,fn)}catch{dn=!1}var pn=null,mn=null,hn=null;function gn(){if(hn)return hn;var e,t=mn,n=t.length,r,i=`value`in pn?pn.value:pn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return hn=i.slice(e,1<r?1-r:void 0)}function _n(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 vn(){return!0}function yn(){return!1}function bn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?vn:yn,this.isPropagationStopped=yn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=vn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=vn)},persist:function(){},isPersistent:vn}),t}var xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sn=bn(xn),Cn=p({},xn,{view:0,detail:0}),wn=bn(Cn),Tn,En,Dn,On=p({},Cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zn,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!==Dn&&(Dn&&e.type===`mousemove`?(Tn=e.screenX-Dn.screenX,En=e.screenY-Dn.screenY):En=Tn=0,Dn=e),Tn)},movementY:function(e){return`movementY`in e?e.movementY:En}}),kn=bn(On),An=bn(p({},On,{dataTransfer:0})),jn=bn(p({},Cn,{relatedTarget:0})),Mn=bn(p({},xn,{animationName:0,elapsedTime:0,pseudoElement:0})),Nn=bn(p({},xn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Pn=bn(p({},xn,{data:0})),Fn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},In={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`},Ln={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Rn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ln[e])?!!t[e]:!1}function zn(){return Rn}var Bn=bn(p({},Cn,{key:function(e){if(e.key){var t=Fn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=_n(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?In[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zn,charCode:function(e){return e.type===`keypress`?_n(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?_n(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Vn=bn(p({},On,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Hn=bn(p({},Cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zn})),Un=bn(p({},xn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Wn=bn(p({},On,{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})),Gn=bn(p({},xn,{newState:0,oldState:0})),Kn=[9,13,27,32],qn=un&&`CompositionEvent`in window,Jn=null;un&&`documentMode`in document&&(Jn=document.documentMode);var Yn=un&&`TextEvent`in window&&!Jn,Xn=un&&(!qn||Jn&&8<Jn&&11>=Jn),Zn=` `,Qn=!1;function $n(e,t){switch(e){case`keyup`:return Kn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function er(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var tr=!1;function nr(e,t){switch(e){case`compositionend`:return er(t);case`keypress`:return t.which===32?(Qn=!0,Zn):null;case`textInput`:return e=t.data,e===Zn&&Qn?null:e;default:return null}}function rr(e,t){if(tr)return e===`compositionend`||!qn&&$n(e,t)?(e=gn(),hn=mn=pn=null,tr=!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 Xn&&t.locale!==`ko`?null:t.data;default:return null}}var ir={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 ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ir[e.type]:t===`textarea`}function or(e,t,n,r){rn?an?an.push(r):an=[r]:rn=r,t=Od(t,`onChange`),0<t.length&&(n=new Sn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var sr=null,cr=null;function lr(e){xd(e,0)}function ur(e){if(Lt(bt(e)))return e}function dr(e,t){if(e===`change`)return t}var fr=!1;if(un){var pr;if(un){var mr=`oninput`in document;if(!mr){var hr=document.createElement(`div`);hr.setAttribute(`oninput`,`return;`),mr=typeof hr.oninput==`function`}pr=mr}else pr=!1;fr=pr&&(!document.documentMode||9<document.documentMode)}function gr(){sr&&(sr.detachEvent(`onpropertychange`,_r),cr=sr=null)}function _r(e){if(e.propertyName===`value`&&ur(cr)){var t=[];or(t,cr,e,nn(e)),cn(lr,t)}}function R(e,t,n){e===`focusin`?(gr(),sr=t,cr=n,sr.attachEvent(`onpropertychange`,_r)):e===`focusout`&&gr()}function vr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ur(cr)}function yr(e,t){if(e===`click`)return ur(t)}function br(e,t){if(e===`input`||e===`change`)return ur(t)}function xr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Sr=typeof Object.is==`function`?Object.is:xr;function Cr(e,t){if(Sr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!De.call(t,i)||!Sr(e[i],t[i]))return!1}return!0}function wr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tr(e,t){var n=wr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=wr(n)}}function Er(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Er(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Rt(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=Rt(e.document)}return t}function Or(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 kr=un&&`documentMode`in document&&11>=document.documentMode,Ar=null,jr=null,Mr=null,Nr=!1;function Pr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nr||Ar==null||Ar!==Rt(r)||(r=Ar,`selectionStart`in r&&Or(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Mr&&Cr(Mr,r)||(Mr=r,r=Od(jr,`onSelect`),0<r.length&&(t=new Sn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ar)))}function Fr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ir={animationend:Fr(`Animation`,`AnimationEnd`),animationiteration:Fr(`Animation`,`AnimationIteration`),animationstart:Fr(`Animation`,`AnimationStart`),transitionrun:Fr(`Transition`,`TransitionRun`),transitionstart:Fr(`Transition`,`TransitionStart`),transitioncancel:Fr(`Transition`,`TransitionCancel`),transitionend:Fr(`Transition`,`TransitionEnd`)},Lr={},Rr={};un&&(Rr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ir.animationend.animation,delete Ir.animationiteration.animation,delete Ir.animationstart.animation),`TransitionEvent`in window||delete Ir.transitionend.transition);function z(e){if(Lr[e])return Lr[e];if(!Ir[e])return e;var t=Ir[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Rr)return Lr[e]=t[n];return e}var zr=z(`animationend`),Br=z(`animationiteration`),Vr=z(`animationstart`),Hr=z(`transitionrun`),Ur=z(`transitionstart`),Wr=z(`transitioncancel`),Gr=z(`transitionend`),Kr=new Map,qr=`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(` `);qr.push(`scrollEnd`);function Jr(e,t){Kr.set(e,t),Tt(t,[e])}var Yr=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&&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)},Xr=[],Zr=0,Qr=0;function $r(){for(var e=Zr,t=Qr=Zr=0;t<e;){var n=Xr[t];Xr[t++]=null;var r=Xr[t];Xr[t++]=null;var i=Xr[t];Xr[t++]=null;var a=Xr[t];if(Xr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ri(n,i,a)}}function ei(e,t,n,r){Xr[Zr++]=e,Xr[Zr++]=t,Xr[Zr++]=n,Xr[Zr++]=r,Qr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ti(e,t,n,r){return ei(e,t,n,r),B(e)}function ni(e,t){return ei(e,null,null,t),B(e)}function ri(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Be(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function B(e){if(50<pu)throw pu=0,mu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ii={};function V(e,t,n,r){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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ai(e,t,n,r){return new V(e,t,n,r)}function oi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function si(e,t){var n=e.alternate;return n===null?(n=ai(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 ci(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 li(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)oi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,pe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ne:return e=ai(31,n,t,a),e.elementType=ne,e.lanes=o,e;case y:return ui(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ai(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ai(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ai(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case ee:s=14;break a;case te:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ai(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ui(e,t,n,r){return e=ai(7,e,r,t),e.lanes=n,e}function di(e,t,n){return e=ai(6,e,null,t),e.lanes=n,e}function fi(e){var t=ai(18,null,null,0);return t.stateNode=e,t}function pi(e,t,n){return t=ai(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mi=new WeakMap;function hi(e,t){if(typeof e==`object`&&e){var n=mi.get(e);return n===void 0?(t={value:e,source:t,stack:Ee(t)},mi.set(e,t),t):n}return{value:e,source:t,stack:Ee(t)}}var gi=[],_i=0,vi=null,yi=0,bi=[],xi=0,Si=null,Ci=1,wi=``;function Ti(e,t){gi[_i++]=yi,gi[_i++]=vi,vi=e,yi=t}function Ei(e,t,n){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Si=e;var r=Ci;e=wi;var i=32-Be(r)-1;r&=~(1<<i),n+=1;var a=32-Be(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ci=1<<32-Be(t)+i|n<<i|r,wi=a+e}else Ci=1<<a|n<<i|r,wi=e}function Di(e){e.return!==null&&(Ti(e,1),Ei(e,1,0))}function Oi(e){for(;e===vi;)vi=gi[--_i],gi[_i]=null,yi=gi[--_i],gi[_i]=null;for(;e===Si;)Si=bi[--xi],bi[xi]=null,wi=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null}function ki(e,t){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Ci=t.id,wi=t.overflow,Si=e}var Ai=null,ji=null,H=!1,Mi=null,Ni=!1,Pi=Error(i(519));function Fi(e){throw Vi(hi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Pi}function Ii(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[lt]=e,t[ut]=r,n){case`dialog`:X(`cancel`,t),X(`close`,t);break;case`iframe`:case`object`:case`embed`:X(`load`,t);break;case`video`:case`audio`:for(n=0;n<yd.length;n++)X(yd[n],t);break;case`source`:X(`error`,t);break;case`img`:case`image`:case`link`:X(`error`,t),X(`load`,t);break;case`details`:X(`toggle`,t);break;case`input`:X(`invalid`,t),Ht(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:X(`invalid`,t);break;case`textarea`:X(`invalid`,t),Kt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Pd(t.textContent,n)?(r.popover!=null&&(X(`beforetoggle`,t),X(`toggle`,t)),r.onScroll!=null&&X(`scroll`,t),r.onScrollEnd!=null&&X(`scrollend`,t),r.onClick!=null&&(t.onclick=en),t=!0):t=!1,t||Fi(e,!0)}function Li(e){for(Ai=e.return;Ai;)switch(Ai.tag){case 5:case 31:case 13:Ni=!1;return;case 27:case 3:Ni=!0;return;default:Ai=Ai.return}}function Ri(e){if(e!==Ai)return!1;if(!H)return Li(e),H=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Kd(e.type,e.memoizedProps)),n=!n),n&&ji&&Fi(e),Li(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ji=ff(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ji=ff(e)}else t===27?(t=ji,ef(e.type)?(e=df,df=null,ji=e):ji=t):ji=Ai?uf(e.stateNode.nextSibling):null;return!0}function zi(){ji=Ai=null,H=!1}function Bi(){var e=Mi;return e!==null&&($l===null?$l=e:$l.push.apply($l,e),Mi=null),e}function Vi(e){Mi===null?Mi=[e]:Mi.push(e)}var Hi=de(null),Ui=null,Wi=null;function Gi(e,t,n){A(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,fe(Hi)}function qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ji(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),qi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),qi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Yi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Sr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===he.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Ji(t,e,n,r),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!Sr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Ui=e,Wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return ea(Ui,e)}function $i(e,t){return Ui===null&&Zi(e),ea(e,t)}function ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wi===null){if(e===null)throw Error(i(308));Wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wi=Wi.next=t;return n}var ta=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},na=t.unstable_scheduleCallback,ra=t.unstable_NormalPriority,ia={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function aa(){return{controller:new ta,data:new Map,refCount:0}}function oa(e){e.refCount--,e.refCount===0&&na(ra,function(){e.controller.abort()})}var sa=null,ca=0,la=0,ua=null;function da(e,t){if(sa===null){var n=sa=[];ca=0,la=pd(),ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ca++,t.then(fa,fa),t}function fa(){if(--ca===0&&sa!==null){ua!==null&&(ua.status=`fulfilled`);var e=sa;sa=null,la=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ma=D.S;D.S=function(e,t){nu=Me(),typeof t==`object`&&t&&typeof t.then==`function`&&da(e,t),ma!==null&&ma(e,t)};var ha=de(null);function ga(){var e=ha.current;return e===null?G.pooledCache:e}function _a(e,t){t===null?A(ha,ha.current):A(ha,t.pool)}function va(){var e=ga();return e===null?null:{parent:ia._currentValue,pool:e}}var ya=Error(i(460)),ba=Error(i(474)),xa=Error(i(542)),Sa={then:function(){}};function Ca(e){return e=e.status,e===`fulfilled`||e===`rejected`}function wa(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,Oa(e),e;default:if(typeof t.status==`string`)t.then(en,en);else{if(e=G,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e}throw Ea=t,ya}}function Ta(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ea=e,ya):e}}var Ea=null;function Da(){if(Ea===null)throw Error(i(459));var e=Ea;return Ea=null,e}function Oa(e){if(e===ya||e===xa)throw Error(i(483))}var ka=null,Aa=0;function ja(e){var t=Aa;return Aa+=1,ka===null&&(ka=[]),wa(ka,e,t)}function Ma(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Na(e,t){throw t.$$typeof===h?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Pa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=si(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=di(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===te&&Ta(i)===t.type)?(t=a(t,n.props),Ma(t,n),t.return=e,t):(t=li(n.type,n.key,n.props,null,e.mode,r),Ma(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=pi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ui(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=li(t.type,t.key,t.props,null,e.mode,n),Ma(n,t),n.return=e,n;case v:return t=pi(t,e.mode,n),t.return=e,t;case te:return t=Ta(t),f(e,t,n)}if(ce(t)||ae(t))return t=ui(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ja(t),n);if(t.$$typeof===C)return f(e,$i(e,t),n);Na(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case te:return n=Ta(n),p(e,t,n,r)}if(ce(n)||ae(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ja(n),r);if(n.$$typeof===C)return p(e,t,$i(e,n),r);Na(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case te:return r=Ta(r),m(e,t,n,r,i)}if(ce(r)||ae(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ja(r),i);if(r.$$typeof===C)return m(e,t,n,$i(t,r),i);Na(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),H&&Ti(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return H&&Ti(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),H&&Ti(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),H&&Ti(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return H&&Ti(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),H&&Ti(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===te&&Ta(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=ui(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=li(o.type,o.key,o.props,null,e.mode,c),Ma(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=pi(o,e.mode,c),c.return=e,e=c}return s(e);case te:return o=Ta(o),b(e,r,o,c)}if(ce(o))return h(e,r,o,c);if(ae(o)){if(l=ae(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,ja(o),c);if(o.$$typeof===C)return b(e,r,$i(e,o),c);Na(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=b(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(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 Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Va(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,W&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=B(e),ri(e,null,n),t}return ei(e,r,t,n),B(e)}function Ha(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}function Ua(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Wa=!1;function Ga(){if(Wa){var e=ua;if(e!==null)throw e}}function Ka(e,t,n,r){Wa=!1;var i=e.updateQueue;La=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(q&f)===f:(r&f)===f){f!==0&&f===la&&(Wa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:La=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ql|=o,e.lanes=o,e.memoizedState=d}}function qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ja(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)qa(n[e],t)}var Ya=de(null),Xa=de(0);function Za(e,t){e=Gl,A(Xa,e),A(Ya,t),Gl=e|t.baseLanes}function Qa(){A(Xa,Gl),A(Ya,Ya.current)}function $a(){Gl=Xa.current,fe(Ya),fe(Xa)}var eo=de(null),to=null;function no(e){var t=e.alternate;A(so,so.current&1),A(eo,e),to===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(to=e)}function ro(e){A(so,so.current),A(eo,e),to===null&&(to=e)}function io(e){e.tag===22?(A(so,so.current),A(eo,e),to===null&&(to=e)):ao(e)}function ao(){A(so,so.current),A(eo,eo.current)}function oo(e){fe(eo),to===e&&(to=null),fe(so)}var so=de(0);function co(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||cf(n)||lf(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)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 lo=0,U=null,uo=null,fo=null,po=!1,mo=!1,ho=!1,go=0,_o=0,vo=null,yo=0;function bo(){throw Error(i(321))}function xo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sr(e[n],t[n]))return!1;return!0}function So(e,t,n,r,i,a){return lo=a,U=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?zs:Bs,ho=!1,a=n(r,i),ho=!1,mo&&(a=wo(t,n,r,i)),Co(e),a}function Co(e){D.H=Rs;var t=uo!==null&&uo.next!==null;if(lo=0,fo=uo=U=null,po=!1,_o=0,vo=null,t)throw Error(i(300));e===null||rc||(e=e.dependencies,e!==null&&Xi(e)&&(rc=!0))}function wo(e,t,n,r){U=e;var a=0;do{if(mo&&(vo=null),_o=0,mo=!1,25<=a)throw Error(i(301));if(a+=1,fo=uo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}D.H=Vs,o=t(n,r)}while(mo);return o}function To(){var e=D.H,t=e.useState()[0];return t=typeof t.then==`function`?Mo(t):t,e=e.useState()[0],(uo===null?null:uo.memoizedState)!==e&&(U.flags|=1024),t}function Eo(){var e=go!==0;return go=0,e}function Do(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Oo(e){if(po){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}po=!1}lo=0,fo=uo=U=null,mo=!1,_o=go=0,vo=null}function ko(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fo===null?U.memoizedState=fo=e:fo=fo.next=e,fo}function Ao(){if(uo===null){var e=U.alternate;e=e===null?null:e.memoizedState}else e=uo.next;var t=fo===null?U.memoizedState:fo.next;if(t!==null)fo=t,uo=e;else{if(e===null)throw U.alternate===null?Error(i(467)):Error(i(310));uo=e,e={memoizedState:uo.memoizedState,baseState:uo.baseState,baseQueue:uo.baseQueue,queue:uo.queue,next:null},fo===null?U.memoizedState=fo=e:fo=fo.next=e}return fo}function jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Mo(e){var t=_o;return _o+=1,vo===null&&(vo=[]),e=wa(vo,e,t),t=U,(fo===null?t.memoizedState:fo.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?zs:Bs),e}function No(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Mo(e);if(e.$$typeof===C)return Qi(e)}throw Error(i(438,String(e)))}function Po(e){var t=null,n=U.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=U.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=jo(),U.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=re;return t.index++,n}function Fo(e,t){return typeof t==`function`?t(e):t}function Io(e){return Lo(Ao(),uo,e)}function Lo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(lo&f)===f:(q&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===la&&(d=!0);else if((lo&p)===p){u=u.next,p===la&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,U.lanes|=p,ql|=p;f=u.action,ho&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,U.lanes|=f,ql|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Sr(o,e.memoizedState)&&(rc=!0,d&&(n=ua,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ro(e){var t=Ao(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Sr(o,t.memoizedState)||(rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function zo(e,t,n){var r=U,a=Ao(),o=H;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Sr((uo||a).memoizedState,n);if(s&&(a.memoizedState=n,rc=!0),a=a.queue,us(Ho.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||fo!==null&&fo.memoizedState.tag&1){if(r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,a,n,t),null),G===null)throw Error(i(349));o||lo&127||Bo(r,t,n)}return n}function Bo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=U.updateQueue,t===null?(t=jo(),U.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Vo(e,t,n,r){t.value=n,t.getSnapshot=r,Uo(t)&&Wo(e)}function Ho(e,t,n){return n(function(){Uo(t)&&Wo(e)})}function Uo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sr(e,n)}catch{return!0}}function Wo(e){var t=ni(e,2);t!==null&&_u(t,e,2)}function Go(e){var t=ko();if(typeof e==`function`){var n=e;if(e=n(),ho){F(!0);try{n()}finally{F(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:e},t}function Ko(e,t,n,r){return e.baseState=n,Lo(e,uo,typeof r==`function`?r:Fo)}function qo(e,t,n,r,a){if(Fs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};D.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Jo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Jo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=D.T,o={};D.T=o;try{var s=n(i,r),c=D.S;c!==null&&c(o,s),Yo(e,t,s)}catch(n){Zo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),D.T=a}}else try{a=n(i,r),Yo(e,t,a)}catch(n){Zo(e,t,n)}}function Yo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Xo(e,t,n)},function(n){return Zo(e,t,n)}):Xo(e,t,n)}function Xo(e,t,n){t.status=`fulfilled`,t.value=n,Qo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Jo(e,n)))}function Zo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Qo(t),t=t.next;while(t!==r)}e.action=null}function Qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $o(e,t){return t}function es(e,t){if(H){var n=G.formState;if(n!==null){a:{var r=U;if(H){if(ji){b:{for(var i=ji,a=Ni;i.nodeType!==8;){if(!a){i=null;break b}if(i=uf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ji=uf(i.nextSibling),r=i.data===`F!`;break a}}Fi(r)}r=!1}r&&(t=n[0])}}return n=ko(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:t},n.queue=r,n=Ms.bind(null,U,r),r.dispatch=n,r=Go(!1),a=Ps.bind(null,U,!1,r.queue),r=ko(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=qo.bind(null,U,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ts(e){return ns(Ao(),uo,e)}function ns(e,t,n){if(t=Lo(e,t,$o)[0],e=Io(Fo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Mo(t)}catch(e){throw e===ya?xa:e}else r=t;t=Ao();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(U.flags|=2048,as(9,{destroy:void 0},rs.bind(null,i,n),null)),[r,a,e]}function rs(e,t){e.action=t}function is(e){var t=Ao(),n=uo;if(n!==null)return ns(t,n,e);Ao(),t=t.memoizedState,n=Ao();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function as(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=U.updateQueue,t===null&&(t=jo(),U.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function os(){return Ao().memoizedState}function ss(e,t,n,r){var i=ko();U.flags|=e,i.memoizedState=as(1|t,{destroy:void 0},n,r===void 0?null:r)}function cs(e,t,n,r){var i=Ao();r=r===void 0?null:r;var a=i.memoizedState.inst;uo!==null&&r!==null&&xo(r,uo.memoizedState.deps)?i.memoizedState=as(t,a,n,r):(U.flags|=e,i.memoizedState=as(1|t,a,n,r))}function ls(e,t){ss(8390656,8,e,t)}function us(e,t){cs(2048,8,e,t)}function ds(e){U.flags|=4;var t=U.updateQueue;if(t===null)t=jo(),U.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function fs(e){var t=Ao().memoizedState;return ds({ref:t,nextImpl:e}),function(){if(W&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ps(e,t){return cs(4,2,e,t)}function ms(e,t){return cs(4,4,e,t)}function hs(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 gs(e,t,n){n=n==null?null:n.concat([e]),cs(4,4,hs.bind(null,t,e),n)}function _s(){}function vs(e,t){var n=Ao();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ys(e,t){var n=Ao();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&xo(t,r[1]))return r[0];if(r=e(),ho){F(!0);try{e()}finally{F(!1)}}return n.memoizedState=[r,t],r}function bs(e,t,n){return n===void 0||lo&1073741824&&!(q&261930)?e.memoizedState=t:(e.memoizedState=n,e=gu(),U.lanes|=e,ql|=e,n)}function xs(e,t,n,r){return Sr(n,t)?n:Ya.current===null?!(lo&42)||lo&1073741824&&!(q&261930)?(rc=!0,e.memoizedState=n):(e=gu(),U.lanes|=e,ql|=e,t):(e=bs(e,n,r),Sr(e,t)||(rc=!0),e)}function Ss(e,t,n,r,i){var a=O.p;O.p=a!==0&&8>a?a:8;var o=D.T,s={};D.T=s,Ps(e,!1,t,n);try{var c=i(),l=D.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,pa(c,r),hu(e)):Ns(e,t,r,hu(e))}catch(n){Ns(e,t,{then:function(){},status:`rejected`,reason:n},hu())}finally{O.p=a,o!==null&&s.types!==null&&(o.types=s.types),D.T=o}}function Cs(){}function ws(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ts(e).queue;Ss(e,a,t,le,n===null?Cs:function(){return Es(e),n(r)})}function Ts(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:le},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Es(e){var t=Ts(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},hu())}function Ds(){return Qi(Qf)}function Os(){return Ao().memoizedState}function ks(){return Ao().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=hu();e=Ba(n);var r=Va(t,e,n);r!==null&&(_u(r,t,n),Ha(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=hu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=ti(e,t,n,r),n!==null&&(_u(n,e,r),Ls(n,t,r)))}function Ms(e,t,n){Ns(e,t,n,hu())}function Ns(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Sr(s,o))return ei(e,t,i,0),G===null&&$r(),!1}catch{}if(n=ti(e,t,i,r),n!==null)return _u(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:pd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(i(479))}else t=ti(e,n,r,2),t!==null&&_u(t,e,2)}function Fs(e){var t=e.alternate;return e===U||t!==null&&t===U}function Is(e,t){mo=po=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}var Rs={readContext:Qi,use:No,useCallback:bo,useContext:bo,useEffect:bo,useImperativeHandle:bo,useLayoutEffect:bo,useInsertionEffect:bo,useMemo:bo,useReducer:bo,useRef:bo,useState:bo,useDebugValue:bo,useDeferredValue:bo,useTransition:bo,useSyncExternalStore:bo,useId:bo,useHostTransitionStatus:bo,useFormState:bo,useActionState:bo,useOptimistic:bo,useMemoCache:bo,useCacheRefresh:bo};Rs.useEffectEvent=bo;var zs={readContext:Qi,use:No,useCallback:function(e,t){return ko().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ss(4194308,4,hs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var n=ko();t=t===void 0?null:t;var r=e();if(ho){F(!0);try{e()}finally{F(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ko();if(n!==void 0){var i=n(t);if(ho){F(!0);try{n(t)}finally{F(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=js.bind(null,U,e),[r.memoizedState,e]},useRef:function(e){var t=ko();return e={current:e},t.memoizedState=e},useState:function(e){e=Go(e);var t=e.queue,n=Ms.bind(null,U,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:_s,useDeferredValue:function(e,t){return bs(ko(),e,t)},useTransition:function(){var e=Go(!1);return e=Ss.bind(null,U,e.queue,!0,!1),ko().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=U,a=ko();if(H){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),G===null)throw Error(i(349));q&127||Bo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ls(Ho.bind(null,r,o,e),[e]),r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,o,n,t),null),n},useId:function(){var e=ko(),t=G.identifierPrefix;if(H){var n=wi,r=Ci;n=(r&~(1<<32-Be(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=go++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=yo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ds,useFormState:es,useActionState:es,useOptimistic:function(e){var t=ko();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ps.bind(null,U,!0,n),n.dispatch=t,[e,t]},useMemoCache:Po,useCacheRefresh:function(){return ko().memoizedState=As.bind(null,U)},useEffectEvent:function(e){var t=ko(),n={impl:e};return t.memoizedState=n,function(){if(W&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Bs={readContext:Qi,use:No,useCallback:vs,useContext:Qi,useEffect:us,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Io,useRef:os,useState:function(){return Io(Fo)},useDebugValue:_s,useDeferredValue:function(e,t){return xs(Ao(),uo.memoizedState,e,t)},useTransition:function(){var e=Io(Fo)[0],t=Ao().memoizedState;return[typeof e==`boolean`?e:Mo(e),t]},useSyncExternalStore:zo,useId:Os,useHostTransitionStatus:Ds,useFormState:ts,useActionState:ts,useOptimistic:function(e,t){return Ko(Ao(),uo,e,t)},useMemoCache:Po,useCacheRefresh:ks};Bs.useEffectEvent=fs;var Vs={readContext:Qi,use:No,useCallback:vs,useContext:Qi,useEffect:us,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Ro,useRef:os,useState:function(){return Ro(Fo)},useDebugValue:_s,useDeferredValue:function(e,t){var n=Ao();return uo===null?bs(n,e,t):xs(n,uo.memoizedState,e,t)},useTransition:function(){var e=Ro(Fo)[0],t=Ao().memoizedState;return[typeof e==`boolean`?e:Mo(e),t]},useSyncExternalStore:zo,useId:Os,useHostTransitionStatus:Ds,useFormState:is,useActionState:is,useOptimistic:function(e,t){var n=Ao();return uo===null?(n.baseState=e,[e,n.queue.dispatch]):Ko(n,uo,e,t)},useMemoCache:Po,useCacheRefresh:ks};Vs.useEffectEvent=fs;function Hs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Us={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=hu(),i=Ba(r);i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(_u(t,e,r),Ha(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=hu(),i=Ba(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(_u(t,e,r),Ha(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hu(),r=Ba(n);r.tag=2,t!=null&&(r.callback=t),t=Va(e,r,n),t!==null&&(_u(t,e,n),Ha(t,e,n))}};function Ws(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Cr(n,r)||!Cr(i,a):!0}function Gs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Us.enqueueReplaceState(t,t.state,null)}function Ks(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function qs(e){Yr(e)}function Js(e){console.error(e)}function Ys(e){Yr(e)}function Xs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Zs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Qs(e,t,n){return n=Ba(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=Ba(e),e.tag=3,e}function ec(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Zs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Zs(t,n,r),typeof i!=`function`&&(au===null?au=new Set([this]):au.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function tc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Yi(t,n,a,!0),n=eo.current,n!==null){switch(n.tag){case 31:case 13:return to===null?ku():n.alternate===null&&Kl===0&&(Kl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),qu(e,r,a)),!1;case 22:return n.flags|=65536,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),qu(e,r,a)),!1}throw Error(i(435,n.tag))}return qu(e,r,a),ku(),!1}if(H)return t=eo.current,t===null?(r!==Pi&&(t=Error(i(423),{cause:r}),Vi(hi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=hi(r,n),a=Qs(e.stateNode,r,a),Ua(e,a),Kl!==4&&(Kl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Pi&&(e=Error(i(422),{cause:r}),Vi(hi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=hi(o,n),Ql===null?Ql=[o]:Ql.push(o),Kl!==4&&(Kl=2),t===null)return!0;r=hi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Qs(n.stateNode,r,e),Ua(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(au===null||!au.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=$s(a),ec(a,e,n,r),Ua(n,a),!1}n=n.return}while(n!==null);return!1}var nc=Error(i(461)),rc=!1;function ic(e,t,n,r){t.child=e===null?Ia(t,null,n,r):Fa(t,e.child,n,r)}function ac(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Zi(t),r=So(e,t,n,o,a,i),s=Eo(),e!==null&&!rc?(Do(e,t,i),kc(e,t,i)):(H&&s&&Di(t),t.flags|=1,ic(e,t,r,i),t.child)}function oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!oi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ac(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Cr:n,n(o,r)&&e.ref===t.ref)return kc(e,t,i)}return t.flags|=1,e=si(a,r),e.ref=t.ref,e.return=t,t.child=e}function sc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Cr(a,r)&&e.ref===t.ref)if(rc=!1,t.pendingProps=r=a,Ac(e,i))e.flags&131072&&(rc=!0);else return t.lanes=e.lanes,kc(e,t,i)}return hc(e,t,n,r,i)}function cc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_a(t,a===null?null:a.cachePool),a===null?Qa():Za(t,a),io(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&_a(t,null),Qa(),ao(t)):(_a(t,a.cachePool),Za(t,a),ao(t),t.memoizedState=null);return ic(e,t,i,n),t.child}function lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function uc(e,t,n,r,i){var a=ga();return a=a===null?null:{parent:ia._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&_a(t,null),Qa(),io(t),e!==null&&Yi(e,t,r,!0),t.childLanes=i,null}function dc(e,t){return t=wc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fc(e,t,n){return Fa(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,oo(t),t.memoizedState=null,e}function pc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(H){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(ro(t),(e=ji)?(e=sf(e,Ni),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,Ai=t,ji=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ro(t),a)if(t.flags&256)t.flags&=-257,t=fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(rc||Yi(e,t,n,!1),a=(n&e.childLanes)!==0,rc||a){if(r=G,r!==null&&(s=rt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ni(e,s),_u(r,e,s),nc;ku(),t=fc(e,t,n)}else e=o.treeContext,ji=uf(s.nextSibling),Ai=t,H=!0,Mi=null,Ni=!1,e!==null&&ki(t,e),t=dc(t,r),t.flags|=4096;return t}return e=si(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function mc(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(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function hc(e,t,n,r,i){return Zi(t),n=So(e,t,n,r,void 0,i),r=Eo(),e!==null&&!rc?(Do(e,t,i),kc(e,t,i)):(H&&r&&Di(t),t.flags|=1,ic(e,t,n,i),t.child)}function gc(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=wo(t,r,n,i),Co(e),r=Eo(),e!==null&&!rc?(Do(e,t,a),kc(e,t,a)):(H&&r&&Di(t),t.flags|=1,ic(e,t,n,a),t.child)}function _c(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=ii,o=n.contextType;typeof o==`object`&&o&&(a=Qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Us,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ra(t),o=n.contextType,a.context=typeof o==`object`&&o?Qi(o):ii,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Hs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Us.enqueueReplaceState(a,a.state,null),Ka(t,r,a,i),Ga(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ks(n,s);a.props=c;var l=a.context,u=n.contextType;o=ii,typeof u==`object`&&u&&(o=Qi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Gs(t,a,r,o),La=!1;var f=t.memoizedState;a.state=f,Ka(t,r,a,i),Ga(),l=t.memoizedState,s||f!==l||La?(typeof d==`function`&&(Hs(t,n,d,r),l=t.memoizedState),(c=La||Ws(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,za(e,t),o=t.memoizedProps,u=Ks(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ii,typeof l==`object`&&l&&(c=Qi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Gs(t,a,r,c),La=!1,f=t.memoizedState,a.state=f,Ka(t,r,a,i),Ga();var p=t.memoizedState;o!==d||f!==p||La||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof s==`function`&&(Hs(t,n,s,r),p=t.memoizedState),(u=La||Ws(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Xi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,mc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Fa(t,e.child,null,i),t.child=Fa(t,null,n,i)):ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=kc(e,t,i),e}function vc(e,t,n,r){return zi(),t.flags|=256,ic(e,t,n,r),t.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bc(e){return{baseLanes:e,cachePool:va()}}function xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Xl),e}function Sc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(so.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(H){if(a?no(t):ao(t),(e=ji)?(e=sf(e,Ni),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,Ai=t,ji=null)):e=null,e===null)throw Fi(t);return lf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ao(t),a=t.mode,c=wc({mode:`hidden`,children:c},a),r=ui(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(null,r)):(no(t),Cc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(no(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState===null?(ao(t),c=r.fallback,a=t.mode,r=wc({mode:`visible`,children:r.children},a),c=ui(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Fa(t,e.child,null,n),r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,t=lc(null,r)):(ao(t),t.child=e.child,t.flags|=128,t=null);else if(no(t),lf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Vi({value:r,source:null,stack:null}),t=Tc(e,t,n)}else if(rc||Yi(e,t,n,!1),s=(n&e.childLanes)!==0,rc||s){if(s=G,s!==null&&(r=rt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ni(e,r),_u(s,e,r),nc;cf(c)||ku(),t=Tc(e,t,n)}else cf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,ji=uf(c.nextSibling),Ai=t,H=!0,Mi=null,Ni=!1,e!==null&&ki(t,e),t=Cc(t,r.children),t.flags|=4096);return t}return a?(ao(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=si(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ui(c,a,n,null),c.flags|=2):c=si(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,lc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=bc(n):(a=c.cachePool,a===null?a=va():(l=ia._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(e.child,r)):(no(t),n=e.child,e=n.sibling,n=si(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Cc(e,t){return t=wc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function wc(e,t){return e=ai(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return Fa(t,e.child,null,n),e=Cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ec(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function Dc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=so.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,A(so,o),ic(e,t,r,n),r=H?yi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ec(e,n,t);else if(e.tag===19)Ec(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;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&&co(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Dc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&co(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Dc(t,!0,n,null,a,r);break;case`together`:Dc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function kc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ql|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Yi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=si(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=si(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ac(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Xi(e))):!0}function jc(e,t,n){switch(t.tag){case 3:ge(t,t.stateNode.containerInfo),Gi(t,ia,e.memoizedState.cache),zi();break;case 27:case 5:ve(t);break;case 4:ge(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(no(t),e=kc(e,t,n),e===null?null:e.sibling):Sc(e,t,n):(no(t),t.flags|=128,null);no(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Yi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),A(so,so.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:Gi(t,ia,e.memoizedState.cache)}return kc(e,t,n)}function Mc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)rc=!0;else{if(!Ac(e,n)&&!(t.flags&128))return rc=!1,jc(e,t,n);rc=!!(e.flags&131072)}else rc=!1,H&&t.flags&1048576&&Ei(t,yi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ta(t.elementType),t.type=e,typeof e==`function`)oi(e)?(r=Ks(e,r),t.tag=1,t=_c(null,t,e,r,n)):(t.tag=0,t=hc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ac(null,t,e,r,n);break a}else if(a===ee){t.tag=14,t=oc(null,t,e,r,n);break a}}throw t=se(e)||e,Error(i(306,t,``))}}return t;case 0:return hc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ks(r,t.pendingProps),_c(e,t,r,a,n);case 3:a:{if(ge(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,za(e,t),Ka(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Gi(t,ia,r),r!==o.cache&&Ji(t,[ia],n,!0),Ga(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=vc(e,t,r,n);break a}else if(r!==a){a=hi(Error(i(424)),t),Vi(a),t=vc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(ji=uf(e.firstChild),Ai=t,H=!0,Mi=null,Ni=!0,n=Ia(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zi(),r===a){t=kc(e,t,n);break a}ic(e,t,r,n)}t=t.child}return t;case 26:return mc(e,t),e===null?(n=jf(t.type,null,t.pendingProps,null))?t.memoizedState=n:H||(n=t.type,e=t.pendingProps,r=Ud(me.current).createElement(n),r[lt]=t,r[ut]=e,Ld(r,n,e),St(r),t.stateNode=r):t.memoizedState=jf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ve(t),e===null&&H&&(r=t.stateNode=mf(t.type,t.pendingProps,me.current),Ai=t,Ni=!0,a=ji,ef(t.type)?(df=a,ji=uf(r.firstChild)):ji=a),ic(e,t,t.pendingProps.children,n),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&H&&((a=r=ji)&&(r=af(r,t.type,t.pendingProps,Ni),r===null?a=!1:(t.stateNode=r,Ai=t,ji=uf(r.firstChild),Ni=!1,a=!0)),a||Fi(t)),ve(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Kd(a,o)?r=null:s!==null&&Kd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=So(e,t,To,null,null,n),Qf._currentValue=a),mc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&H&&((e=n=ji)&&(n=of(n,t.pendingProps,Ni),n===null?e=!1:(t.stateNode=n,Ai=t,ji=null,e=!0)),e||Fi(t)),null;case 13:return Sc(e,t,n);case 4:return ge(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fa(t,null,r,n):ic(e,t,r,n),t.child;case 11:return ac(e,t,t.type,t.pendingProps,n);case 7:return ic(e,t,t.pendingProps,n),t.child;case 8:return ic(e,t,t.pendingProps.children,n),t.child;case 12:return ic(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Gi(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Zi(t),a=Qi(a),r=r(a),t.flags|=1,ic(e,t,r,n),t.child;case 14:return oc(e,t,t.type,t.pendingProps,n);case 15:return sc(e,t,t.type,t.pendingProps,n);case 19:return Oc(e,t,n);case 31:return pc(e,t,n);case 22:return cc(e,t,n,t.pendingProps);case 24:return Zi(t),r=Qi(ia),e===null?(a=ga(),a===null&&(a=G,o=aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ra(t),Gi(t,ia,a)):((e.lanes&n)!==0&&(za(e,t),Ka(t,null,null,n),Ga()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Gi(t,ia,r),r!==a.cache&&Ji(t,[ia],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Gi(t,ia,r))),ic(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Nc(e){e.flags|=4}function Pc(e,t,n,r,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(Eu())e.flags|=8192;else throw Ea=Sa,ba}else e.flags&=-16777217}function Fc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Eu())e.flags|=8192;else throw Ea=Sa,ba}function Ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ze(),e.lanes|=t,Zl|=t)}function Lc(e,t){if(!H)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 r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Rc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function zc(e,t,n){var r=t.pendingProps;switch(Oi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rc(t),null;case 1:return Rc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ki(ia),_e(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?Nc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bi())),Rc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Nc(t),o===null?(Rc(t),Pc(t,a,null,r,n)):(Rc(t),Fc(t,o))):o?o===e.memoizedState?(Rc(t),t.flags&=-16777217):(Nc(t),Rc(t),Fc(t,o)):(e=e.memoizedProps,e!==r&&Nc(t),Rc(t),Pc(t,a,e,r,n)),null;case 27:if(ye(t),n=me.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}e=pe.current,Ri(t)?Ii(t,e):(e=mf(a,r,n),t.stateNode=e,Nc(t))}return Rc(t),null;case 5:if(ye(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}if(o=pe.current,Ri(t))Ii(t,o);else{var s=Ud(me.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[lt]=t,o[ut]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Ld(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Nc(t)}}return Rc(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=me.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ai,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[lt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Pd(e.nodeValue,n)),e||Fi(t,!0)}else e=Ud(e).createTextNode(r),e[lt]=t,t.stateNode=e}return Rc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[lt]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(oo(t),t):(oo(t),null);if(t.flags&128)throw Error(i(558))}return Rc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ri(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[lt]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),a=!1}else a=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(oo(t),t):(oo(t),null)}return oo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ic(t,t.updateQueue),Rc(t),null);case 4:return _e(),e===null&&wd(t.stateNode.containerInfo),Rc(t),null;case 10:return Ki(t.type),Rc(t),null;case 19:if(fe(so),r=t.memoizedState,r===null)return Rc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Lc(r,!1);else{if(Kl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=co(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ci(n,e),n=n.sibling;return A(so,so.current&1|2),H&&Ti(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Me()>ru&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}else{if(!a)if(e=co(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!H)return Rc(t),null}else 2*Me()-r.renderingStartTime>ru&&n!==536870912&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Rc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Me(),e.sibling=null,n=so.current,A(so,a?n&1|2:n&1),H&&Ti(t,r.treeForkCount),e);case 22:case 23:return oo(t),$a(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Rc(t),t.subtreeFlags&6&&(t.flags|=8192)):Rc(t),n=t.updateQueue,n!==null&&Ic(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&fe(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),Rc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Bc(e,t){switch(Oi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),_e(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ye(t),null;case 31:if(t.memoizedState!==null){if(oo(t),t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(oo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return fe(so),null;case 4:return _e(),null;case 10:return Ki(t.type),null;case 22:case 23:return oo(t),$a(),e!==null&&fe(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function Vc(e,t){switch(Oi(t),t.tag){case 3:Ki(ia),_e();break;case 26:case 27:case 5:ye(t);break;case 4:_e();break;case 31:t.memoizedState!==null&&oo(t);break;case 13:oo(t);break;case 19:fe(so);break;case 10:Ki(t.type);break;case 22:case 23:oo(t),$a(),e!==null&&fe(ha);break;case 24:Ki(ia)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Y(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Y(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Y(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ja(t,n)}catch(t){Y(e,e.return,t)}}}function Gc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Y(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Y(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Y(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Y(e,t,n)}else n.current=null}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Y(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Rd(r,e.type,n,t),r[ut]=t}catch(t){Y(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ef(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(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&&ef(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===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(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ld(t,r,n),t[lt]=e,t[ut]=n}catch(t){Y(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Vd=sp,e=Dr(e),Or(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Hd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ks(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Y(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)rf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:rf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Sl(e,n),r&4&&Hc(5,n);break;case 1:if(Sl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Y(n,n.return,e)}else{var i=Ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Y(n,n.return,e)}}r&64&&Wc(n),r&512&&Kc(n,n.return);break;case 3:if(Sl(e,n),r&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{Ja(e,t)}catch(e){Y(n,n.return,e)}}break;case 27:t===null&&r&4&&el(n);case 26:case 5:Sl(e,n),t===null&&r&4&&Jc(n),r&512&&Kc(n,n.return);break;case 12:Sl(e,n);break;case 31:Sl(e,n),r&4&&pl(e,n);break;case 13:Sl(e,n),r&4&&ml(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Xu.bind(null,n),Z(e,n))));break;case 22:if(r=n.memoizedState!==null||tl,!r){t=t!==null&&t.memoizedState!==null||nl,i=tl;var a=nl;tl=r,(nl=t)&&!a?wl(e,n,(n.subtreeFlags&8772)!=0):Sl(e,n),tl=i,nl=a}break;case 30:break;default:Sl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&_t(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 ll=null,ul=!1;function dl(e,t,n){for(n=n.child;n!==null;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(ze&&typeof ze.onCommitFiberUnmount==`function`)try{ze.onCommitFiberUnmount(P,n)}catch{}switch(n.tag){case 26:nl||qc(n,t),dl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nl||qc(n,t);var r=ll,i=ul;ef(n.type)&&(ll=n.stateNode,ul=!1),dl(e,t,n),hf(n.stateNode),ll=r,ul=i;break;case 5:nl||qc(n,t);case 6:if(r=ll,i=ul,ll=null,dl(e,t,n),ll=r,ul=i,ll!==null)if(ul)try{(ll.nodeType===9?ll.body:ll.nodeName===`HTML`?ll.ownerDocument.body:ll).removeChild(n.stateNode)}catch(e){Y(n,t,e)}else try{ll.removeChild(n.stateNode)}catch(e){Y(n,t,e)}break;case 18:ll!==null&&(ul?(e=ll,tf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):tf(ll,n.stateNode));break;case 4:r=ll,i=ul,ll=n.stateNode.containerInfo,ul=!0,dl(e,t,n),ll=r,ul=i;break;case 0:case 11:case 14:case 15:Uc(2,n,t),nl||Uc(4,n,t),dl(e,t,n);break;case 1:nl||(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Gc(n,t,r)),dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:nl=(r=nl)||n.memoizedState!==null,dl(e,t,n),nl=r;break;default:dl(e,t,n)}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Y(t,t.return,e)}}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Y(t,t.return,e)}}function hl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(i(435,e.tag))}}function gl(e,t){var n=hl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Zu.bind(null,e,t);t.then(r,r)}})}function _l(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(ef(c.type)){ll=c.stateNode,ul=!1;break a}break;case 5:ll=c.stateNode,ul=!1;break a;case 3:case 4:ll=c.stateNode.containerInfo,ul=!0;break a}c=c.return}if(ll===null)throw Error(i(160));fl(o,s,a),ll=null,ul=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yl(t,e),t=t.sibling}var vl=null;function yl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_l(t,e),bl(e),r&4&&(Uc(3,e,e.return),Hc(3,e),Uc(5,e,e.return));break;case 1:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&64&&tl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=vl;if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[gt]||o[lt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Ld(o,r,n),o[lt]=e,St(o),r=o;break a;case`link`:var s=Q(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Ld(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Q(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Ld(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[lt]=e,St(o),r=o}e.stateNode=r}else $(a,e.type,e.stateNode);else e.stateNode=Rf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?$(a,e.type,e.stateNode):Rf(a,r,e.memoizedProps))}break;case 27:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),n!==null&&r&4&&Yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),e.flags&32){a=e.stateNode;try{L(a,``)}catch(t){Y(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Yc(e,a,n===null?a:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(_l(t,e),bl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Y(e,e.return,t)}}break;case 3:if(Hf=null,a=vl,vl=vf(t.containerInfo),_l(t,e),vl=a,bl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Y(e,e.return,t)}rl&&(rl=!1,xl(e));break;case 4:r=vl,vl=vf(e.stateNode.containerInfo),_l(t,e),bl(e),vl=r;break;case 12:_l(t,e),bl(e);break;case 31:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 13:_l(t,e),bl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(tu=Me()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=tl,d=nl;if(tl=u||a,nl=d||l,_l(t,e),nl=d,tl=u,bl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||tl||nl||Cl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Y(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Y(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?nf(m,!0):nf(l.stateNode,!1)}catch(e){Y(l,l.return,e)}}}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 a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,gl(e,n))));break;case 19:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 30:break;case 21:break;default:_l(t,e),bl(e)}}function bl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Xc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;$c(e,Zc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(L(o,``),n.flags&=-33),$c(e,Zc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Qc(e,Zc(e),s);break;default:throw Error(i(161))}}catch(t){Y(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Cl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Uc(4,t,t.return),Cl(t);break;case 1:qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Gc(t,t.return,n),Cl(t);break;case 27:hf(t.stateNode);case 26:case 5:qc(t,t.return),Cl(t);break;case 22:t.memoizedState===null&&Cl(t);break;case 30:Cl(t);break;default:Cl(t)}e=e.sibling}}function wl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:wl(i,a,n),Hc(4,a);break;case 1:if(wl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Y(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)qa(c[i],s)}catch(e){Y(r,r.return,e)}}n&&o&64&&Wc(a),Kc(a,a.return);break;case 27:el(a);case 26:case 5:wl(i,a,n),n&&r===null&&o&4&&Jc(a),Kc(a,a.return);break;case 12:wl(i,a,n);break;case 31:wl(i,a,n),n&&o&4&&pl(i,a);break;case 13:wl(i,a,n),n&&o&4&&ml(i,a);break;case 22:a.memoizedState===null&&wl(i,a,n),Kc(a,a.return);break;case 30:break;default:wl(i,a,n)}t=t.sibling}}function Tl(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&&oa(n))}function El(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e))}function Dl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ol(e,t,n,r),t=t.sibling}function Ol(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Dl(e,t,n,r),i&2048&&Hc(9,t);break;case 1:Dl(e,t,n,r);break;case 3:Dl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e)));break;case 12:if(i&2048){Dl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Y(t,t.return,e)}}else Dl(e,t,n,r);break;case 31:Dl(e,t,n,r);break;case 13:Dl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Dl(e,t,n,r):(a._visibility|=2,kl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Dl(e,t,n,r):Al(e,t),i&2048&&Tl(o,t);break;case 24:Dl(e,t,n,r),i&2048&&El(t.alternate,t);break;default:Dl(e,t,n,r)}}function kl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:kl(a,o,s,c,i),Hc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,kl(a,o,s,c,i)):u._visibility&2?kl(a,o,s,c,i):Al(a,o),i&&l&2048&&Tl(o.alternate,o);break;case 24:kl(a,o,s,c,i),i&&l&2048&&El(o.alternate,o);break;default:kl(a,o,s,c,i)}t=t.sibling}}function Al(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Al(n,r),i&2048&&Tl(r.alternate,r);break;case 24:Al(n,r),i&2048&&El(r.alternate,r);break;default:Al(n,r)}t=t.sibling}}var jl=8192;function Ml(e,t,n){if(e.subtreeFlags&jl)for(e=e.child;e!==null;)Nl(e,t,n),e=e.sibling}function Nl(e,t,n){switch(e.tag){case 26:Ml(e,t,n),e.flags&jl&&e.memoizedState!==null&&Gf(n,vl,e.memoizedState,e.memoizedProps);break;case 5:Ml(e,t,n);break;case 3:case 4:var r=vl;vl=vf(e.stateNode.containerInfo),Ml(e,t,n),vl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=jl,jl=16777216,Ml(e,t,n),jl=r):Ml(e,t,n));break;default:Ml(e,t,n)}}function Pl(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 Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Il(e),e=e.sibling}function Il(e){switch(e.tag){case 0:case 11:case 15:Fl(e),e.flags&2048&&Uc(9,e,e.return);break;case 3:Fl(e);break;case 12:Fl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ll(e)):Fl(e);break;default:Fl(e)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Uc(8,t,t.return),Ll(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ll(t));break;default:Ll(t)}e=e.sibling}}function Rl(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:Uc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var zl={getCacheForType:function(e){var t=Qi(ia),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Qi(ia).controller.signal}},Bl=typeof WeakMap==`function`?WeakMap:Map,W=0,G=null,K=null,q=0,J=0,Vl=null,Hl=!1,Ul=!1,Wl=!1,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=null,$l=null,eu=!1,tu=0,nu=0,ru=1/0,iu=null,au=null,ou=0,su=null,cu=null,lu=0,uu=0,du=null,fu=null,pu=0,mu=null;function hu(){return W&2&&q!==0?q&-q:D.T===null?ot():pd()}function gu(){if(Xl===0)if(!(q&536870912)||H){var e=Ge;Ge<<=1,!(Ge&3932160)&&(Ge=262144),Xl=e}else Xl=536870912;return e=eo.current,e!==null&&(e.flags|=32),Xl}function _u(e,t,n){(e===G&&(J===2||J===9)||e.cancelPendingCommit!==null)&&(wu(e,0),xu(e,q,Xl,!1)),$e(e,n),(!(W&2)||e!==G)&&(e===G&&(!(W&2)&&(Jl|=n),Kl===4&&xu(e,q,Xl,!1)),ad(e))}function vu(e,t,n){if(W&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ye(e,t),a=r?Mu(e,t):Au(e,t,!0),o=r;do{if(a===0){Ul&&!r&&xu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!bu(n)){a=Au(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Ql;var l=c.current.memoizedState.isDehydrated;if(l&&(wu(c,s).flags|=256),s=Au(c,s,!1),s!==2){if(Wl&&!l){c.errorRecoveryDisabledLanes|=o,Jl|=o,a=4;break a}o=$l,$l=a,o!==null&&($l===null?$l=o:$l.push.apply($l,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){wu(e,0),xu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:xu(r,t,Xl,!Hl);break a;case 2:$l=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=tu+300-Me(),10<a)){if(xu(r,t,Xl,!Hl),Je(r,0,!0)!==0)break a;lu=t,r.timeoutHandle=Yd(yu.bind(null,r,n,$l,iu,eu,t,Xl,Jl,Zl,Hl,o,`Throttled`,-0,0),a);break a}yu(r,n,$l,iu,eu,t,Xl,Jl,Zl,Hl,o,null,-0,0)}}break}while(1);ad(e)}function yu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:en},Nl(t,a,d);var m=(a&62914560)===a?tu-Me():(a&4194048)===a?nu-Me():0;if(m=qf(d,m),m!==null){lu=a,e.cancelPendingCommit=m(zu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),xu(e,a,o,!l);return}}zu(e,t,a,n,r,i,o,s,c)}function bu(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 r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Sr(a(),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 xu(e,t,n,r){t&=~Yl,t&=~Jl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Be(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&tt(e,n,t)}function Su(){return W&6?!0:(od(0,!1),!1)}function Cu(){if(K!==null){if(J===0)var e=K.return;else e=K,Wi=Ui=null,Oo(e),ka=null,Aa=0,e=K;for(;e!==null;)Vc(e.alternate,e),e=e.return;K=null}}function wu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Xd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),lu=0,Cu(),G=e,K=n=si(e.current,null),q=t,J=0,Vl=null,Hl=!1,Ul=Ye(e,t),Wl=!1,Zl=Xl=Yl=Jl=ql=Kl=0,$l=Ql=null,eu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Be(r),a=1<<i;t|=e[i],r&=~a}return Gl=t,$r(),n}function Tu(e,t){U=null,D.H=Rs,t===ya||t===xa?(t=Da(),J=3):t===ba?(t=Da(),J=4):J=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Vl=t,K===null&&(Kl=1,Xs(e,hi(t,e.current)))}function Eu(){var e=eo.current;return e===null?!0:(q&4194048)===q?to===null:(q&62914560)===q||q&536870912?e===to:!1}function Du(){var e=D.H;return D.H=Rs,e===null?Rs:e}function Ou(){var e=D.A;return D.A=zl,e}function ku(){Kl=4,Hl||(q&4194048)!==q&&eo.current!==null||(Ul=!0),!(ql&134217727)&&!(Jl&134217727)||G===null||xu(G,q,Xl,!1)}function Au(e,t,n){var r=W;W|=2;var i=Du(),a=Ou();(G!==e||q!==t)&&(iu=null,wu(e,t)),t=!1;var o=Kl;a:do try{if(J!==0&&K!==null){var s=K,c=Vl;switch(J){case 8:Cu(),o=6;break a;case 3:case 2:case 9:case 6:eo.current===null&&(t=!0);var l=J;if(J=0,Vl=null,Iu(e,s,c,l),n&&Ul){o=0;break a}break;default:l=J,J=0,Vl=null,Iu(e,s,c,l)}}ju(),o=Kl;break}catch(t){Tu(e,t)}while(1);return t&&e.shellSuspendCounter++,Wi=Ui=null,W=r,D.H=i,D.A=a,K===null&&(G=null,q=0,$r()),o}function ju(){for(;K!==null;)Pu(K)}function Mu(e,t){var n=W;W|=2;var r=Du(),a=Ou();G!==e||q!==t?(iu=null,ru=Me()+500,wu(e,t)):Ul=Ye(e,t);a:do try{if(J!==0&&K!==null){t=K;var o=Vl;b:switch(J){case 1:J=0,Vl=null,Iu(e,t,o,1);break;case 2:case 9:if(Ca(o)){J=0,Vl=null,Fu(t);break}t=function(){J!==2&&J!==9||G!==e||(J=7),ad(e)},o.then(t,t);break a;case 3:J=7;break a;case 4:J=5;break a;case 7:Ca(o)?(J=0,Vl=null,Fu(t)):(J=0,Vl=null,Iu(e,t,o,7));break;case 5:var s=null;switch(K.tag){case 26:s=K.memoizedState;case 5:case 27:var c=K;if(s?Wf(s):c.stateNode.complete){J=0,Vl=null;var l=c.sibling;if(l!==null)K=l;else{var u=c.return;u===null?K=null:(K=u,Lu(u))}break b}}J=0,Vl=null,Iu(e,t,o,5);break;case 6:J=0,Vl=null,Iu(e,t,o,6);break;case 8:Cu(),Kl=6;break a;default:throw Error(i(462))}}Nu();break}catch(t){Tu(e,t)}while(1);return Wi=Ui=null,D.H=r,D.A=a,W=n,K===null?(G=null,q=0,$r(),Kl):0}function Nu(){for(;K!==null&&!Ae();)Pu(K)}function Pu(e){var t=Mc(e.alternate,e,Gl);e.memoizedProps=e.pendingProps,t===null?Lu(e):K=t}function Fu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=gc(n,t,t.pendingProps,t.type,void 0,q);break;case 11:t=gc(n,t,t.pendingProps,t.type.render,t.ref,q);break;case 5:Oo(t);default:Vc(n,t),t=K=ci(t,Gl),t=Mc(n,t,Gl)}e.memoizedProps=e.pendingProps,t===null?Lu(e):K=t}function Iu(e,t,n,r){Wi=Ui=null,Oo(t),ka=null,Aa=0;var i=t.return;try{if(tc(e,i,t,n,q)){Kl=1,Xs(e,hi(n,e.current)),K=null;return}}catch(t){if(i!==null)throw K=i,t;Kl=1,Xs(e,hi(n,e.current)),K=null;return}t.flags&32768?(H||r===1?e=!0:Ul||q&536870912?e=!1:(Hl=e=!0,(r===2||r===9||r===3||r===6)&&(r=eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ru(t,e)):Lu(t)}function Lu(e){var t=e;do{if(t.flags&32768){Ru(t,Hl);return}e=t.return;var n=zc(t.alternate,t,Gl);if(n!==null){K=n;return}if(t=t.sibling,t!==null){K=t;return}K=t=e}while(t!==null);Kl===0&&(Kl=5)}function Ru(e,t){do{var n=Bc(e.alternate,e);if(n!==null){n.flags&=32767,K=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){K=e;return}K=e=n}while(e!==null);Kl=6,K=null}function zu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Wu();while(ou!==0);if(W&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Qr,et(e,n,o,s,c,l),e===G&&(K=G=null,q=0),cu=t,su=e,lu=n,uu=o,du=a,fu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Qu(Ie,function(){return Gu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=D.T,D.T=null,a=O.p,O.p=2,s=W,W|=4;try{ol(e,t,n)}finally{W=s,O.p=a,D.T=r}}ou=1,Bu(),Vu(),Hu()}}function Bu(){if(ou===1){ou=0;var e=su,t=cu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=W;W|=4;try{yl(t,e);var a=Hd,o=Dr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Er(s.ownerDocument.documentElement,s)){if(c!==null&&Or(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Tr(s,h),v=Tr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Vd,Hd=Vd=null}finally{W=i,O.p=r,D.T=n}}e.current=t,ou=2}}function Vu(){if(ou===2){ou=0;var e=su,t=cu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=W;W|=4;try{sl(e,t.alternate,t)}finally{W=i,O.p=r,D.T=n}}ou=3}}function Hu(){if(ou===4||ou===3){ou=0,je();var e=su,t=cu,n=lu,r=fu;t.subtreeFlags&10256||t.flags&10256?ou=5:(ou=0,cu=su=null,Uu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(au=null),at(n),t=t.stateNode,ze&&typeof ze.onCommitFiberRoot==`function`)try{ze.onCommitFiberRoot(P,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=D.T,i=O.p,O.p=2,D.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{D.T=t,O.p=i}}lu&3&&Wu(),ad(e),i=e.pendingLanes,n&261930&&i&42?e===mu?pu++:(pu=0,mu=e):pu=0,od(0,!1)}}function Uu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,oa(t)))}function Wu(){return Bu(),Vu(),Hu(),Gu()}function Gu(){if(ou!==5)return!1;var e=su,t=uu;uu=0;var n=at(lu),r=D.T,a=O.p;try{O.p=32>n?32:n,D.T=null,n=du,du=null;var o=su,s=lu;if(ou=0,cu=su=null,lu=0,W&6)throw Error(i(331));var c=W;if(W|=4,Il(o.current),Ol(o,o.current,s,n),W=c,od(0,!1),ze&&typeof ze.onPostCommitFiberRoot==`function`)try{ze.onPostCommitFiberRoot(P,o)}catch{}return!0}finally{O.p=a,D.T=r,Uu(e,t)}}function Ku(e,t,n){t=hi(n,t),t=Qs(e.stateNode,t,2),e=Va(e,t,2),e!==null&&($e(e,2),ad(e))}function Y(e,t,n){if(e.tag===3)Ku(e,e,n);else for(;t!==null;){if(t.tag===3){Ku(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(au===null||!au.has(r))){e=hi(n,e),n=$s(2),r=Va(t,n,2),r!==null&&(ec(n,r,t,e),$e(r,2),ad(r));break}}t=t.return}}function qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Bl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Wl=!0,i.add(n),e=Ju.bind(null,e,t,n),t.then(e,e))}function Ju(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,G===e&&(q&n)===n&&(Kl===4||Kl===3&&(q&62914560)===q&&300>Me()-tu?!(W&2)&&wu(e,0):Yl|=n,Zl===q&&(Zl=0)),ad(e)}function Yu(e,t){t===0&&(t=Ze()),e=ni(e,t),e!==null&&($e(e,t),ad(e))}function Xu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yu(e,n)}function Zu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Yu(e,n)}function Qu(e,t){return Oe(e,t)}var $u=null,ed=null,td=!1,nd=!1,rd=!1,id=0;function ad(e){e!==ed&&e.next===null&&(ed===null?$u=ed=e:ed=ed.next=e),nd=!0,td||(td=!0,fd())}function od(e,t){if(!rd&&nd){rd=!0;do for(var n=!1,r=$u;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Be(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,dd(r,a))}else a=q,a=Je(r,r===G?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ye(r,a)||(n=!0,dd(r,a));r=r.next}while(n);rd=!1}}function sd(){cd()}function cd(){nd=td=!1;var e=0;id!==0&&Jd()&&(e=id);for(var t=Me(),n=null,r=$u;r!==null;){var i=r.next,a=ld(r,t);a===0?(r.next=null,n===null?$u=i:n.next=i,i===null&&(ed=n)):(n=r,(e!==0||a&3)&&(nd=!0)),r=i}ou!==0&&ou!==5||od(e,!1),id!==0&&(id=0)}function ld(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Be(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Xe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=G,n=q,n=Je(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(J===2||J===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ke(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ye(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ke(r),at(n)){case 2:case 8:n=Fe;break;case 32:n=Ie;break;case 268435456:n=M;break;default:n=Ie}return r=ud.bind(null,e),n=Oe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ke(r),e.callbackPriority=2,e.callbackNode=null,2}function ud(e,t){if(ou!==0&&ou!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Wu()&&e.callbackNode!==n)return null;var r=q;return r=Je(e,e===G?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(vu(e,r,t),ld(e,Me()),e.callbackNode!=null&&e.callbackNode===n?ud.bind(null,e):null)}function dd(e,t){if(Wu())return null;vu(e,t,!0)}function fd(){Qd(function(){W&6?Oe(Pe,sd):cd()})}function pd(){if(id===0){var e=la;e===0&&(e=We,We<<=1,!(We&261888)&&(We=256)),id=e}return id}function md(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:$t(``+e)}function hd(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 gd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=md((i[ut]||null).action),o=r.submitter;o&&(t=(t=o[ut]||null)?md(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Sn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(id!==0){var e=o?hd(i,o):new FormData(i);ws(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?hd(i,o):new FormData(i),ws(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var _d=0;_d<qr.length;_d++){var vd=qr[_d];Jr(vd.toLowerCase(),`on`+(vd[0].toUpperCase()+vd.slice(1)))}Jr(zr,`onAnimationEnd`),Jr(Br,`onAnimationIteration`),Jr(Vr,`onAnimationStart`),Jr(`dblclick`,`onDoubleClick`),Jr(`focusin`,`onFocus`),Jr(`focusout`,`onBlur`),Jr(Hr,`onTransitionRun`),Jr(Ur,`onTransitionStart`),Jr(Wr,`onTransitionCancel`),Jr(Gr,`onTransitionEnd`),Et(`onMouseEnter`,[`mouseout`,`mouseover`]),Et(`onMouseLeave`,[`mouseout`,`mouseover`]),Et(`onPointerEnter`,[`pointerout`,`pointerover`]),Et(`onPointerLeave`,[`pointerout`,`pointerover`]),Tt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Tt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Tt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Tt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Tt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Tt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var yd=`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(` `),bd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(yd));function xd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Yr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Yr(e)}i.currentTarget=null,a=c}}}}function X(e,t){var n=t[ft];n===void 0&&(n=t[ft]=new Set);var r=e+`__bubble`;n.has(r)||(Td(t,e,2,!1),n.add(r))}function Sd(e,t,n){var r=0;t&&(r|=4),Td(n,e,r,t)}var Cd=`_reactListening`+Math.random().toString(36).slice(2);function wd(e){if(!e[Cd]){e[Cd]=!0,Ct.forEach(function(t){t!==`selectionchange`&&(bd.has(t)||Sd(t,!1,e),Sd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Cd]||(t[Cd]=!0,Sd(`selectionchange`,!1,t))}}function Td(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!dn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Ed(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=vt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}cn(function(){var r=a,i=nn(n),s=[];a:{var c=Kr.get(e);if(c!==void 0){var l=Sn,u=e;switch(e){case`keypress`:if(_n(n)===0)break a;case`keydown`:case`keyup`:l=Bn;break;case`focusin`:u=`focus`,l=jn;break;case`focusout`:u=`blur`,l=jn;break;case`beforeblur`:case`afterblur`:l=jn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=kn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=An;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Hn;break;case zr:case Br:case Vr:l=Mn;break;case Gr:l=Un;break;case`scroll`:case`scrollend`:l=wn;break;case`wheel`:l=Wn;break;case`copy`:case`cut`:case`paste`:l=Nn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Vn;break;case`toggle`:case`beforetoggle`:l=Gn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=ln(m,p),g!=null&&d.push(Dd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==tn&&(u=n.relatedTarget||n.fromElement)&&(vt(u)||u[dt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?vt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=kn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Vn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:bt(l),h=u==null?c:bt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,vt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=kd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Ad(s,c,l,d,!1),u!==null&&f!==null&&Ad(s,f,u,d,!0)}}a:{if(c=r?bt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=dr;else if(ar(c))if(fr)v=br;else{v=vr;var y=R}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Xt(r.elementType)&&(v=dr):v=yr;if(v&&=v(e,r)){or(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ut(c,`number`,c.value)}switch(y=r?bt(r):window,e){case`focusin`:(ar(y)||y.contentEditable===`true`)&&(Ar=y,jr=r,Mr=null);break;case`focusout`:Mr=jr=Ar=null;break;case`mousedown`:Nr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Nr=!1,Pr(s,n,i);break;case`selectionchange`:if(kr)break;case`keydown`:case`keyup`:Pr(s,n,i)}var b;if(qn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else tr?$n(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Xn&&n.locale!==`ko`&&(tr||x!==`onCompositionStart`?x===`onCompositionEnd`&&tr&&(b=gn()):(pn=i,mn=`value`in pn?pn.value:pn.textContent,tr=!0)),y=Od(r,x),0<y.length&&(x=new Pn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=er(n),b!==null&&(x.data=b)))),(b=Yn?nr(e,n):rr(e,n))&&(x=Od(r,`onBeforeInput`),0<x.length&&(y=new Pn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),gd(s,e,r,n,i)}xd(s,t)})}function Dd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Od(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=ln(e,n),i!=null&&r.unshift(Dd(e,i,a)),i=ln(e,t),i!=null&&r.push(Dd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function kd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ad(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=ln(n,a),l!=null&&o.unshift(Dd(n,l,c))):i||(l=ln(n,a),l!=null&&o.push(Dd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var jd=/\r\n?/g,Md=/\u0000|\uFFFD/g;function Nd(e){return(typeof e==`string`?e:``+e).replace(jd,`
9
+ `).replace(Md,``)}function Pd(e,t){return t=Nd(t),Nd(e)===t}function Fd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||L(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&L(e,``+r);break;case`className`:jt(e,`class`,r);break;case`tabIndex`:jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:jt(e,n,r);break;case`style`:Yt(e,r,o);break;case`data`:if(t!==`object`){jt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`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 o==`function`&&(n===`formAction`?(t!==`input`&&Fd(e,t,`name`,a.name,a,null),Fd(e,t,`formEncType`,a.formEncType,a,null),Fd(e,t,`formMethod`,a.formMethod,a,null),Fd(e,t,`formTarget`,a.formTarget,a,null)):(Fd(e,t,`encType`,a.encType,a,null),Fd(e,t,`method`,a.method,a,null),Fd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=en);break;case`onScroll`:r!=null&&X(`scroll`,e);break;case`onScrollEnd`:r!=null&&X(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=$t(``+r),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`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:X(`beforetoggle`,e),X(`toggle`,e),I(e,`popover`,r);break;case`xlinkActuate`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:I(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Zt.get(n)||n,I(e,n,r))}}function Id(e,t,n,r,a,o){switch(n){case`style`:Yt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?L(e,r):(typeof r==`number`||typeof r==`bigint`)&&L(e,``+r);break;case`onScroll`:r!=null&&X(`scroll`,e);break;case`onScrollEnd`:r!=null&&X(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=en);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!wt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ut]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):I(e,n,r)}}}function Ld(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:X(`error`,e),X(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Fd(e,t,o,s,n,null)}}a&&Fd(e,t,`srcSet`,n.srcSet,n,null),r&&Fd(e,t,`src`,n.src,n,null);return;case`input`:X(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Fd(e,t,r,d,n,null)}}Ht(e,o,c,l,u,s,a,!1);return;case`select`:for(a in X(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Fd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Wt(e,!!r,n,!0):Wt(e,!!r,t,!1);return;case`textarea`:for(s in X(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Fd(e,t,s,c,n,null)}Kt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Fd(e,t,l,r,n,null)}return;case`dialog`:X(`beforetoggle`,e),X(`toggle`,e),X(`cancel`,e),X(`close`,e);break;case`iframe`:case`object`:X(`load`,e);break;case`video`:case`audio`:for(r=0;r<yd.length;r++)X(yd[r],e);break;case`image`:X(`error`,e),X(`load`,e);break;case`details`:X(`toggle`,e);break;case`embed`:case`source`:case`link`:X(`error`,e),X(`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(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Fd(e,t,u,r,n,null)}return;default:if(Xt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Id(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Fd(e,t,c,r,n,null))}function Rd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Fd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Fd(e,t,p,m,r,f)}}Vt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Fd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Fd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Wt(e,!!n,n?[]:``,!1):Wt(e,!!n,t,!0)):Wt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Fd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Fd(e,t,s,a,r,o)}Gt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Fd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Fd(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Fd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Fd(e,t,u,p,r,m)}return;default:if(Xt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Id(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Id(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Fd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Fd(e,t,f,p,r,m)}function zd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Bd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&zd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&zd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(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 Vd=null,Hd=null;function Ud(e){return e.nodeType===9?e:e.ownerDocument}function Wd(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 Gd(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 Kd(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 qd=null;function Jd(){var e=window.event;return e&&e.type===`popstate`?e===qd?!1:(qd=e,!0):(qd=null,!1)}var Yd=typeof setTimeout==`function`?setTimeout:void 0,Xd=typeof clearTimeout==`function`?clearTimeout:void 0,Zd=typeof Promise==`function`?Promise:void 0,Qd=typeof queueMicrotask==`function`?queueMicrotask:Zd===void 0?Yd:function(e){return Zd.resolve(null).then(e).catch($d)};function $d(e){setTimeout(function(){throw e})}function ef(e){return e===`head`}function tf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)hf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,hf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[gt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&hf(e.ownerDocument.body);n=i}while(n);Np(t)}function nf(e,t){var n=e;e=0;do{var r=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||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function rf(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`:rf(n),_t(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function af(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[gt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==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(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=uf(e.nextSibling),e===null)break}return null}function of(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=uf(e.nextSibling),e===null))return null;return e}function sf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=uf(e.nextSibling),e===null))return null;return e}function cf(e){return e.data===`$?`||e.data===`$~`}function lf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function Z(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function uf(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 df=null;function ff(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return uf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pf(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 mf(e,t,n){switch(t=Ud(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function hf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);_t(e)}var gf=new Map,_f=new Set;function vf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var yf=O.d;O.d={f:bf,r:xf,D:wf,C:Tf,L:Ef,m:Df,X:kf,S:Of,M:Af};function bf(){var e=yf.f(),t=Su();return e||t}function xf(e){var t=yt(e);t!==null&&t.tag===5&&t.type===`form`?Es(t):yf.r(e)}var Sf=typeof document>`u`?null:document;function Cf(e,t,n){var r=Sf;if(r&&typeof t==`string`&&t){var i=Bt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),_f.has(i)||(_f.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ld(t,`link`,e),St(t),r.head.appendChild(t)))}}function wf(e){yf.D(e),Cf(`dns-prefetch`,e,null)}function Tf(e,t){yf.C(e,t),Cf(`preconnect`,e,t)}function Ef(e,t,n){yf.L(e,t,n);var r=Sf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Bt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Bt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Bt(n.imageSizes)+`"]`)):i+=`[href="`+Bt(e)+`"]`;var a=i;switch(t){case`style`:a=Mf(e);break;case`script`:a=If(e)}gf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),gf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Nf(a))||t===`script`&&r.querySelector(Lf(a))||(t=r.createElement(`link`),Ld(t,`link`,e),St(t),r.head.appendChild(t)))}}function Df(e,t){yf.m(e,t);var n=Sf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Bt(r)+`"][href="`+Bt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=If(e)}if(!gf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),gf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Lf(a)))return}r=n.createElement(`link`),Ld(r,`link`,e),St(r),n.head.appendChild(r)}}}function Of(e,t,n){yf.S(e,t,n);var r=Sf;if(r&&e){var i=xt(r).hoistableStyles,a=Mf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Nf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=gf.get(a))&&Bf(e,n);var c=o=r.createElement(`link`);St(c),Ld(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function kf(e,t){yf.X(e,t);var n=Sf;if(n&&e){var r=xt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=p({src:e,async:!0},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),St(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t){yf.M(e,t);var n=Sf;if(n&&e){var r=xt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),St(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t,n,r){var a=(a=me.current)?vf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Mf(n.href),n=xt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Mf(n.href);var o=xt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Nf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),gf.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},gf.set(e,n),o||Ff(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=If(n),n=xt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Mf(e){return`href="`+Bt(e)+`"`}function Nf(e){return`link[rel="stylesheet"][`+e+`]`}function Pf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Ff(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ld(t,`link`,n),St(t),e.head.appendChild(t))}function If(e){return`[src="`+Bt(e)+`"]`}function Lf(e){return`script[async]`+e}function Rf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Bt(n.href)+`"]`);if(r)return t.instance=r,St(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),St(r),Ld(r,`style`,a),zf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Mf(n.href);var o=e.querySelector(Nf(a));if(o)return t.state.loading|=4,t.instance=o,St(o),o;r=Pf(n),(a=gf.get(a))&&Bf(r,a),o=(e.ownerDocument||e).createElement(`link`),St(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ld(o,`link`,r),t.state.loading|=4,zf(o,n.precedence,e),t.instance=o;case`script`:return o=If(n.src),(a=e.querySelector(Lf(o)))?(t.instance=a,St(a),a):(r=n,(a=gf.get(o))&&(r=p({},n),Vf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),St(a),Ld(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,zf(r,n.precedence,e));return t.instance}function zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Hf=null;function Q(e,t,n){if(Hf===null){var r=new Map,i=Hf=new Map;i.set(n,r)}else i=Hf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[gt]||a[lt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function $(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Mf(r.href),a=t.querySelector(Nf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,St(a);return}a=t.ownerDocument||t,r=Pf(r),(i=gf.get(i))&&Bf(r,i),a=a.createElement(`link`),St(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ld(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Bd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function $f(e,t,n,r,i,a,o,s,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=Qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qe(0),this.hiddenUpdates=Qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ai(3,null,null,t),e.current=a,a.stateNode=e,t=aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ra(a),e}function tp(e){return e?(e=ii,e):ii}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ba(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Va(e,r,t),n!==null&&(_u(n,e,t),Ha(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ni(e,67108864);t!==null&&_u(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=hu();t=it(t);var n=ni(e,t);n!==null&&_u(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=2,up(e,t,n,r)}finally{O.p=a,D.T=i}}function lp(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=8,up(e,t,n,r)}finally{O.p=a,D.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Ed(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=yt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Be(o);s.entanglements[1]|=c,o&=~c}ad(a),!(W&6)&&(ru=Me()+500,od(0,!1))}}break;case 31:case 13:s=ni(a,2),s!==null&&_u(s,a,2),Su(),ip(a,2)}if(a=dp(r),a===null&&Ed(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ed(e,t,r,null,n)}}function dp(e){return e=nn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=vt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(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 fp=e,null}function mp(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(Ne()){case Pe:return 2;case Fe:return 8;case Ie:case Le:return 32;case M:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=yt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=vt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,st(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,st(e.priority,function(){op(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 Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);tn=r,n.target.dispatchEvent(r),tn=null}else return t=yt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=yt(n);a!==null&&(e.splice(t,3),t-=3,ws(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ut]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ut]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,hu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),Su(),t[dt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=ot();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.7`)throw Error(i(527,Lp,`19.2.7`));O.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:D,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{P=zp.inject(Rp),ze=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=qs,s=Js,c=Ys;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[dt]=t.current,wd(e),new Fp(t)}})),v=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_()})),y=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},b=(e=>e?y(e):y),x=c(f(),1),S=e=>e;function C(e,t=S){let n=x.useSyncExternalStore(e.subscribe,x.useCallback(()=>t(e.getState()),[e,t]),x.useCallback(()=>t(e.getInitialState()),[e,t]));return x.useDebugValue(n),n}var w=e=>{let t=b(e),n=e=>C(t,e);return Object.assign(n,t),n},T=(e=>e?w(e):w),E=u(),ee=v();function te(e){return e[0]??{}}function ne(e){return Array.isArray(e)?e:e==null?[]:[e]}function re(e){return typeof e.bytes==`function`?e.bytes():e.arrayBuffer()}var ie=`orpc`,ae=`@orpc/shared`,oe=`1.14.7`,se=class extends Error{constructor(...e){super(...e),this.name=`AbortError`}};function ce(e){let t=Promise.resolve();return(...n)=>t=t.catch(()=>{}).then(()=>e(...n))}var D=2,O=`__${ae}@${oe}/otel/config__`;function le(){return globalThis[O]}function k(e,t={},n){return(le()?.tracer)?.startSpan(e,t,n)}function ue(e,t,n={}){if(!e)return;let r=de(t);e.recordException(r),(!n.signal?.aborted||n.signal.reason!==t)&&e.setStatus({code:D,message:r.message})}function de(e){if(e instanceof Error){let t={message:e.message,name:e.name,stack:e.stack};return`code`in e&&(typeof e.code==`string`||typeof e.code==`number`)&&(t.code=e.code),t}return{message:String(e)}}async function fe({name:e,context:t,...n},r){let i=le()?.tracer;if(!i)return r();let a=async e=>{try{return await r(e)}catch(t){throw ue(e,t,n),t}finally{e.end()}};return t?i.startActiveSpan(e,n,t,a):i.startActiveSpan(e,n,a)}async function A(e,t){let n=le();if(!e||!n)return t();let r=n.trace.setSpan(n.context.active(),e);return n.context.with(r,t)}var pe=class{openIds=new Set;queues=new Map;waiters=new Map;get length(){return this.openIds.size}get waiterIds(){return Array.from(this.waiters.keys())}hasBufferedItems(e){return!!this.queues.get(e)?.length}open(e){this.openIds.add(e)}isOpen(e){return this.openIds.has(e)}push(e,t){this.assertOpen(e);let n=this.waiters.get(e);if(n?.length)n.shift()[0](t),n.length===0&&this.waiters.delete(e);else{let n=this.queues.get(e);n?n.push(t):this.queues.set(e,[t])}}async pull(e){this.assertOpen(e);let t=this.queues.get(e);if(t?.length){let n=t.shift();return t.length===0&&this.queues.delete(e),n}return new Promise((t,n)=>{let r=this.waiters.get(e),i=[t,n];r?r.push(i):this.waiters.set(e,[i])})}close({id:e,reason:t}={}){if(e===void 0){this.waiters.forEach((e,n)=>{let r=t??new se(`[AsyncIdQueue] Queue[${n}] was closed or aborted while waiting for pulling.`);e.forEach(([,e])=>e(r))}),this.waiters.clear(),this.openIds.clear(),this.queues.clear();return}let n=t??new se(`[AsyncIdQueue] Queue[${e}] was closed or aborted while waiting for pulling.`);this.waiters.get(e)?.forEach(([,e])=>e(n)),this.waiters.delete(e),this.openIds.delete(e),this.queues.delete(e)}assertOpen(e){if(!this.isOpen(e))throw Error(`[AsyncIdQueue] Cannot access queue[${e}] because it is not open or aborted.`)}};function j(e){return!e||typeof e!=`object`?!1:`next`in e&&typeof e.next==`function`&&Symbol.asyncIterator in e&&typeof e[Symbol.asyncIterator]==`function`}var me=Symbol.asyncDispose??Symbol.for(`asyncDispose`),he=class{#e=!1;#t=!1;#n;#r;constructor(e,t){this.#n=t,this.#r=ce(async()=>{if(this.#e)return{done:!0,value:void 0};try{let t=await e();return t.done&&(this.#e=!0),t}catch(e){throw this.#e=!0,e}finally{this.#e&&!this.#t&&(this.#t=!0,await this.#n(`next`))}})}next(){return this.#r()}async return(e){return this.#e=!0,this.#t||(this.#t=!0,await this.#n(`return`)),{done:!0,value:e}}async throw(e){throw this.#e=!0,this.#t||(this.#t=!0,await this.#n(`throw`)),e}async[me](){this.#e=!0,this.#t||(this.#t=!0,await this.#n(`dispose`))}[Symbol.asyncIterator](){return this}};function ge({name:e,...t},n){let r;return new he(async()=>{r??=k(e);try{let e=await A(r,()=>n.next());return r?.addEvent(e.done?`completed`:`yielded`),e}catch(e){throw ue(r,e,t),e}},async e=>{try{e!==`next`&&await A(r,()=>n.return?.())}catch(e){throw ue(r,e,t),e}finally{r?.end()}})}var _e=class{index=BigInt(1);generate(){let e=this.index.toString(36);return this.index++,e}};function ve(e,t,n){let r=(t,i)=>{let a=e[i];return a?a({...t,next:(e=t)=>r(e,i+1)}):n(t)};return r(t,0)}function ye(e){return JSON.stringify(e)}function be(e){return Se(e)?Object.getPrototypeOf(e)?.constructor:null}function xe(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||!t||!t.constructor}function Se(e){return!!e&&(typeof e==`object`||typeof e==`function`)}function Ce(e){if(Array.isArray(e))return e.map(Ce);if(xe(e)){let t={};for(let n in e)t[n]=Ce(e[n]);for(let n of Object.getOwnPropertySymbols(e))t[n]=Ce(e[n]);return t}return e}function we(e,...t){return typeof e==`function`?e(...t):e}function Te(e){return new Proxy(e,{get(e,t,n){let r=Reflect.get(e,t,n);return t!==`then`||typeof r!=`function`?r:new Proxy(r,{apply(t,n,r){if(r.length!==2||r.some(e=>!De(e)))return Reflect.apply(t,n,r);let i=!0;r[0].call(n,Te(new Proxy(e,{get:(e,t,n)=>{if(i&&t===`then`){i=!1;return}return Reflect.get(e,t,n)}})))}})}})}var Ee=/^\s*function\s*\(\)\s*\{\s*\[native code\]\s*\}\s*$/;function De(e){return typeof e==`function`&&Ee.test(e.toString())}function Oe(e){try{return decodeURIComponent(e)}catch{return e}}var ke=`@orpc/client`,Ae=`1.14.7`,je={BAD_REQUEST:{status:400,message:`Bad Request`},UNAUTHORIZED:{status:401,message:`Unauthorized`},FORBIDDEN:{status:403,message:`Forbidden`},NOT_FOUND:{status:404,message:`Not Found`},METHOD_NOT_SUPPORTED:{status:405,message:`Method Not Supported`},NOT_ACCEPTABLE:{status:406,message:`Not Acceptable`},TIMEOUT:{status:408,message:`Request Timeout`},CONFLICT:{status:409,message:`Conflict`},PRECONDITION_FAILED:{status:412,message:`Precondition Failed`},PAYLOAD_TOO_LARGE:{status:413,message:`Payload Too Large`},UNSUPPORTED_MEDIA_TYPE:{status:415,message:`Unsupported Media Type`},UNPROCESSABLE_CONTENT:{status:422,message:`Unprocessable Content`},TOO_MANY_REQUESTS:{status:429,message:`Too Many Requests`},CLIENT_CLOSED_REQUEST:{status:499,message:`Client Closed Request`},INTERNAL_SERVER_ERROR:{status:500,message:`Internal Server Error`},NOT_IMPLEMENTED:{status:501,message:`Not Implemented`},BAD_GATEWAY:{status:502,message:`Bad Gateway`},SERVICE_UNAVAILABLE:{status:503,message:`Service Unavailable`},GATEWAY_TIMEOUT:{status:504,message:`Gateway Timeout`}};function Me(e,t){return t??je[e]?.status??500}function Ne(e,t){return t||je[e]?.message||e}var Pe,Fe=class e extends Error{defined;code;status;data;static{let t=Symbol.for(`__${ke}@${Ae}/error/ORPC_ERROR_CONSTRUCTORS__`);globalThis[t]??=new WeakSet,Pe=globalThis[t],Pe.add(e)}constructor(e,...t){let n=te(t);if(n.status!==void 0&&!Le(n.status))throw Error(`[ORPCError] Invalid error status code.`);let r=Ne(e,n.message);super(r,n),this.code=e,this.status=Me(e,n.status),this.defined=n.defined??!1,this.data=n.data}toJSON(){return{defined:this.defined,code:this.code,status:this.status,message:this.message,data:this.data}}static[Symbol.hasInstance](e){if(Pe.has(this)){let t=be(e);if(t&&Pe.has(t))return!0}return super[Symbol.hasInstance](e)}};function Ie(e){return e instanceof Fe?e:new Fe(`INTERNAL_SERVER_ERROR`,{message:`Internal server error`,cause:e})}function Le(e){return e<200||e>=400}function M(e){if(!xe(e))return!1;let t=[`defined`,`code`,`status`,`message`,`data`];return Object.keys(e).some(e=>!t.includes(e))?!1:`defined`in e&&typeof e.defined==`boolean`&&`code`in e&&typeof e.code==`string`&&`status`in e&&typeof e.status==`number`&&Le(e.status)&&`message`in e&&typeof e.message==`string`}function Re(e,t={}){return new Fe(e.code,{...t,...e})}var N=class extends TypeError{},P=class extends Error{data;constructor(e){super(e?.message??`An error event was received`,e),this.data=e?.data}};TransformStream;function ze(e){if(e.includes(`
10
+ `))throw new N(`Event's id must not contain a newline character`)}function F(e){if(!Number.isInteger(e)||e<0)throw new N(`Event's retry must be a integer and >= 0`)}function Be(e){if(e.includes(`
11
+ `))throw new N(`Event's comment must not contain a newline character`)}var Ve=Symbol(`ORPC_EVENT_SOURCE_META`);function He(e,t){if(t.id===void 0&&t.retry===void 0&&!t.comments?.length)return e;if(t.id!==void 0&&ze(t.id),t.retry!==void 0&&F(t.retry),t.comments!==void 0)for(let e of t.comments)Be(e);return new Proxy(e,{get(e,n,r){return n===Ve?t:Reflect.get(e,n,r)}})}function Ue(e){return Se(e)?Reflect.get(e,Ve):void 0}function We(e,t=`inline`){return`${t}; filename="${e.replace(/[^\x20-\x7E]/g,`_`).replace(/"/g,`\\"`)}"; filename*=utf-8''${encodeURIComponent(e).replace(/['()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`).replace(/%(7C|60|5E)/g,(e,t)=>String.fromCharCode(Number.parseInt(t,16)))}`}function Ge(e){let t=e.match(/filename\*=(UTF-8'')?([^;]*)/i);if(t&&typeof t[2]==`string`)return Oe(t[2]);let n=e.match(/filename="((?:\\"|[^"])*)"/i);if(n&&typeof n[1]==`string`)return n[1].replace(/\\"/g,`"`)}function Ke(e,t){let n={...e};for(let e in t)Array.isArray(t[e])?n[e]=[...ne(n[e]),...t[e]]:t[e]!==void 0&&(Array.isArray(n[e])?n[e]=[...n[e],t[e]]:n[e]===void 0?n[e]=t[e]:n[e]=[n[e],t[e]]);return n}function qe(e){if(typeof e==`string`||e===void 0)return e;if(e.length!==0)return e.join(`, `)}function Je(e){return!!(qe(e[`content-type`])?.startsWith(`text/event-stream`)&&qe(e[`content-disposition`])===void 0)}function Ye(e,t){let n=async e=>{let n=await t.error(e);if(n!==e){let t=Ue(e);t&&Se(n)&&(n=He(n,t))}return n};return new he(async()=>{let{done:r,value:i}=await(async()=>{try{return await e.next()}catch(e){throw await n(e)}})(),a=await t.value(i,r);if(a!==i){let e=Ue(i);e&&Se(a)&&(a=He(a,e))}return{done:r,value:a}},async()=>{try{await e.return?.()}catch(e){throw await n(e)}})}function Xe(e){return{...e,context:e.context??{}}}function Ze(e,t={}){let n=t.path??[];return Te(new Proxy(async(...[t,r={}])=>await e.call(n,t,Xe(r)),{get(r,i){return typeof i==`string`?Ze(e,{...t,path:[...n,i]}):Reflect.get(r,i)}}))}var Qe=/^http:\/\/orpc\//,$e=(e=>(e[e.REQUEST=1]=`REQUEST`,e[e.RESPONSE=2]=`RESPONSE`,e[e.EVENT_ITERATOR=3]=`EVENT_ITERATOR`,e[e.ABORT_SIGNAL=4]=`ABORT_SIGNAL`,e))($e||{});function et(e,t,n){if(t===3){let r=n;return{i:e,t,p:{e:r.event,d:r.data,m:r.meta}}}if(t===4)return{i:e,t,p:n};let r=n;return{i:e,p:{u:r.url.toString().replace(Qe,`/`),b:r.body,h:Object.keys(r.headers).length>0?r.headers:void 0,m:r.method===`POST`?void 0:r.method}}}function tt(e){let t=e.i,n=e.t;if(n===3){let r=e.p;return[t,n,{event:r.e,data:r.d,meta:r.m}]}if(n===4)return[t,n,e.p];let r=e.p;return[t,2,{status:r.s??200,headers:r.h??{},body:r.b}]}async function nt(e,t,n){if(t===3||t===4)return st(et(e,t,n));let r=n,{body:i,headers:a}=await it(r.body,r.headers),o=et(e,1,{...r,body:i instanceof Blob?void 0:i,headers:a});return i instanceof Blob?st(o,i):st(o)}async function rt(e){let{json:t,buffer:n}=await ct(e),[r,i,a]=tt(t);if(i===3||i===4)return[r,i,a];let o=a,s=await at(o.headers,o.body,n);return[r,i,{...o,body:s}]}async function it(e,t){let n={...t},r=n[`content-disposition`];if(delete n[`content-type`],delete n[`content-disposition`],e instanceof Blob)return n[`content-type`]=e.type,n[`content-disposition`]=r??We(e instanceof File?e.name:`blob`),{body:e,headers:n};if(e instanceof FormData){let t=new Response(e);return n[`content-type`]=t.headers.get(`content-type`),{body:await t.blob(),headers:n}}return e instanceof URLSearchParams?(n[`content-type`]=`application/x-www-form-urlencoded`,{body:e.toString(),headers:n}):j(e)?(n[`content-type`]=`text/event-stream`,{body:void 0,headers:n}):{body:e,headers:n}}async function at(e,t,n){let r=qe(e[`content-type`]),i=qe(e[`content-disposition`]);if(typeof i==`string`){let e=Ge(i)??`blob`;return new File(n===void 0?[]:[n],e,{type:r})}return r?.startsWith(`multipart/form-data`)?new Response(n,{headers:{"content-type":r}}).formData():r?.startsWith(`application/x-www-form-urlencoded`)&&typeof t==`string`?new URLSearchParams(t):t}var ot=255;async function st(e,t){let n=ye(e);return t===void 0||t.size===0?n:re(new Blob([new TextEncoder().encode(n),new Uint8Array([ot]),t]))}async function ct(e){if(typeof e==`string`)return{json:JSON.parse(e)};let t=e instanceof Uint8Array?e:new Uint8Array(e),n=t.indexOf(ot);if(n===-1){let e=new TextDecoder().decode(t);return{json:JSON.parse(e)}}let r=new TextDecoder().decode(t.subarray(0,n)),i=t.subarray(n+1);return{json:JSON.parse(r),buffer:i}}function lt(e,t,n,r={}){let i;return new he(async()=>{i??=k(`consume_event_iterator_stream`);try{let n=await A(i,()=>e.pull(t));switch(n.event){case`message`:{let e=n.data;return n.meta&&Se(e)&&(e=He(e,n.meta)),i?.addEvent(`message`),{value:e,done:!1}}case`error`:{let e=new P({data:n.data});throw n.meta&&(e=He(e,n.meta)),i?.addEvent(`error`),e}case`done`:{let e=n.data;return n.meta&&Se(e)&&(e=He(e,n.meta)),i?.addEvent(`done`),{value:e,done:!0}}}}catch(e){throw e instanceof P||ue(i,e,r),e}},async e=>{try{e!==`next`&&i?.addEvent(`cancelled`),await A(i,()=>n(e))}catch(e){throw ue(i,e,r),e}finally{i?.end()}})}function ut(e,t){return fe({name:`stream_event_iterator`},async n=>{for(;;){let r=await(async()=>{try{let{value:t,done:r}=await e.next();return r?(n?.addEvent(`done`),{event:`done`,data:t,meta:Ue(t)}):(n?.addEvent(`message`),{event:`message`,data:t,meta:Ue(t)})}catch(e){if(e instanceof P)return n?.addEvent(`error`),{event:`error`,data:e.data,meta:Ue(e)};try{await t({event:`error`,data:void 0})}catch(t){throw ue(n,e),t}throw e}})(),i=!1;try{let n=await t(r);if(r.event===`done`||r.event===`error`)return;if(n===`abort`){i=!0,await e.return?.();return}}catch(t){if(!i)try{await e.return?.()}catch(e){throw ue(n,t),e}throw t}}})}var dt=class{peer;constructor(e){this.peer=new ft(async([t,n,r])=>{await e(await nt(t,n,r))})}get length(){return this.peer.length}open(e){return this.peer.open(e)}async request(e){return this.peer.request(e)}async message(e){return this.peer.message(await rt(e))}close(e={}){return this.peer.close(e)}},ft=class{idGenerator=new _e;responseQueue=new pe;serverEventIteratorQueue=new pe;serverControllers=new Map;cleanupFns=new Map;send;constructor(e){this.send=async t=>{let n=t[0];this.serverControllers.has(n)&&await e(t)}}get length(){return(+this.responseQueue.length+this.serverEventIteratorQueue.length+this.serverControllers.size+this.cleanupFns.size)/4}open(e){this.serverEventIteratorQueue.open(e),this.responseQueue.open(e);let t=new AbortController;return this.serverControllers.set(e,t),this.cleanupFns.set(e,[]),t}async request(e){let t=e.signal;return fe({name:`send_peer_request`,signal:t},async()=>{if(t?.aborted)throw t.reason;let n=this.idGenerator.generate(),r=this.open(n);try{let i=le();if(i){let t=Ce(e.headers);i.propagation.inject(i.context.active(),t),e={...e,headers:t}}if(await this.send([n,$e.REQUEST,e]),t?.aborted)throw await this.send([n,$e.ABORT_SIGNAL,void 0]),t.reason;let a;if(t?.addEventListener(`abort`,a=async()=>{await this.send([n,$e.ABORT_SIGNAL,void 0]),this.close({id:n,reason:t.reason})},{once:!0}),this.cleanupFns.get(n)?.push(()=>{t?.removeEventListener(`abort`,a)}),j(e.body)){let t=e.body;ut(t,async e=>r.signal.aborted?`abort`:(await this.send([n,$e.EVENT_ITERATOR,e]),`next`))}let o=await this.responseQueue.pull(n);if(Je(o.headers)){let e=lt(this.serverEventIteratorQueue,n,async e=>{try{e!==`next`&&await this.send([n,$e.ABORT_SIGNAL,void 0])}finally{this.close({id:n})}},{signal:t});return{...o,body:e}}return this.close({id:n}),o}catch(e){throw this.close({id:n,reason:e}),e}})}async message([e,t,n]){if(t===$e.ABORT_SIGNAL){this.serverControllers.get(e)?.abort();return}if(t===$e.EVENT_ITERATOR){this.serverEventIteratorQueue.isOpen(e)&&this.serverEventIteratorQueue.push(e,n);return}this.responseQueue.isOpen(e)&&this.responseQueue.push(e,n)}close(e={}){e.id===void 0?(this.serverControllers.forEach(t=>t.abort(e.reason)),this.serverControllers.clear(),this.cleanupFns.forEach(e=>e.forEach(e=>e())),this.cleanupFns.clear()):(this.serverControllers.get(e.id)?.abort(e.reason),this.serverControllers.delete(e.id),this.cleanupFns.get(e.id)?.forEach(e=>e()),this.cleanupFns.delete(e.id)),this.responseQueue.close(e),this.serverEventIteratorQueue.close(e)}};function pt(e,t={}){return e.forEach((e,n)=>{Array.isArray(t[n])?t[n].push(e):t[n]===void 0?t[n]=e:t[n]=[t[n],e]}),t}var mt=class{plugins;constructor(e=[]){this.plugins=[...e].sort((e,t)=>(e.order??0)-(t.order??0))}init(e){for(let t of this.plugins)t.init?.(e)}},ht=class{constructor(e,t,n={}){this.codec=e,this.sender=t,new mt(n.plugins).init(n),this.interceptors=ne(n.interceptors),this.clientInterceptors=ne(n.clientInterceptors)}interceptors;clientInterceptors;call(e,t,n){return fe({name:`${ie}.${e.join(`/`)}`,signal:n.signal},r=>(r?.setAttribute(`rpc.system`,ie),r?.setAttribute(`rpc.method`,e.join(`.`)),j(t)&&(t=ge({name:`consume_event_iterator_input`,signal:n.signal},t)),ve(this.interceptors,{...n,path:e,input:t},async({path:e,input:t,...n})=>{let i=le(),a,o=i?.trace.getActiveSpan()??r;o&&i&&(a=i?.trace.setSpan(i.context.active(),o));let s=await fe({name:`encode_request`,context:a},()=>this.codec.encode(e,t,n)),c=await ve(this.clientInterceptors,{...n,input:t,path:e,request:s},({input:e,path:t,request:n,...r})=>fe({name:`send_request`,signal:r.signal,context:a},()=>this.sender.call(n,r,t,e))),l=await fe({name:`decode_response`,context:a},()=>this.codec.decode(c,n,e,t));return j(l)?ge({name:`consume_event_iterator_output`,signal:n.signal},l):l})))}},gt={BIGINT:0,DATE:1,NAN:2,UNDEFINED:3,URL:4,REGEXP:5,SET:6,MAP:7},_t=class{customSerializers;constructor(e={}){if(this.customSerializers=e.customJsonSerializers??[],this.customSerializers.length!==new Set(this.customSerializers.map(e=>e.type)).size)throw Error(`Custom serializer type must be unique.`)}serialize(e,t=[],n=[],r=[],i=[]){for(let a of this.customSerializers)if(a.condition(e)){let o=this.serialize(a.serialize(e),t,n,r,i);return n.push([a.type,...t]),o}if(e instanceof Blob)return r.push(t),i.push(e),[e,n,r,i];if(typeof e==`bigint`)return n.push([gt.BIGINT,...t]),[e.toString(),n,r,i];if(e instanceof Date)return n.push([gt.DATE,...t]),Number.isNaN(e.getTime())?[null,n,r,i]:[e.toISOString(),n,r,i];if(Number.isNaN(e))return n.push([gt.NAN,...t]),[null,n,r,i];if(e instanceof URL)return n.push([gt.URL,...t]),[e.toString(),n,r,i];if(e instanceof RegExp)return n.push([gt.REGEXP,...t]),[e.toString(),n,r,i];if(e instanceof Set){let a=this.serialize(Array.from(e),t,n,r,i);return n.push([gt.SET,...t]),a}if(e instanceof Map){let a=this.serialize(Array.from(e.entries()),t,n,r,i);return n.push([gt.MAP,...t]),a}if(Array.isArray(e))return[e.map((e,a)=>e===void 0?(n.push([gt.UNDEFINED,...t,a]),null):this.serialize(e,[...t,a],n,r,i)[0]),n,r,i];if(xe(e)){let a={};for(let o in e)o===`toJSON`&&typeof e[o]==`function`||(a[o]=this.serialize(e[o],[...t,o],n,r,i)[0]);return[a,n,r,i]}return[e,n,r,i]}deserialize(e,t,n,r){let i={data:e};n&&r&&n.forEach((e,t)=>{let n=i,a=`data`;e.forEach(e=>{if(n=n[a],a=e,!Object.hasOwn(n,a))throw Error(`Security error: accessing non-existent path during deserialization. Path segment: ${a}`)}),n[a]=r(t)});for(let e of t){let t=e[0],n=i,r=`data`;for(let t=1;t<e.length;t++)if(n=n[r],r=e[t],!Object.hasOwn(n,r))throw Error(`Security error: accessing non-existent path during deserialization. Path segment: ${r}`);for(let e of this.customSerializers)if(e.type===t){n[r]=e.deserialize(n[r]);break}switch(t){case gt.BIGINT:n[r]=BigInt(n[r]);break;case gt.DATE:n[r]=new Date(n[r]??`Invalid Date`);break;case gt.NAN:n[r]=NaN;break;case gt.UNDEFINED:n[r]=void 0;break;case gt.URL:n[r]=new URL(n[r]);break;case gt.REGEXP:{let[,e,t]=n[r].match(/^\/(.*)\/([a-z]*)$/);n[r]=new RegExp(e,t);break}case gt.SET:n[r]=new Set(n[r]);break;case gt.MAP:n[r]=new Map(n[r]);break}}return i.data}};function vt(e){return`/${e.map(encodeURIComponent).join(`/`)}`}function yt(e){return typeof e.forEach==`function`?pt(e):e}function bt(e){return Object.entries(je).find(([,t])=>t.status===e)?.[0]??`MALFORMED_ORPC_ERROR_RESPONSE`}var xt=class{constructor(e,t){this.serializer=e,this.baseUrl=t.url,this.maxUrlLength=t.maxUrlLength??2083,this.fallbackMethod=t.fallbackMethod??`POST`,this.expectedMethod=t.method??this.fallbackMethod,this.headers=t.headers??{}}baseUrl;maxUrlLength;fallbackMethod;expectedMethod;headers;async encode(e,t,n){let r=yt(await we(this.headers,n,e,t));n.lastEventId!==void 0&&(r=Ke(r,{"last-event-id":n.lastEventId}));let i=await we(this.expectedMethod,n,e,t),a=await we(this.baseUrl,n,e,t),o=new URL(a);o.pathname=`${o.pathname.replace(/\/$/,``)}${vt(e)}`;let s=this.serializer.serialize(t);if(i===`GET`&&!(s instanceof FormData)&&!j(s)){let a=await we(this.maxUrlLength,n,e,t),c=new URL(o);if(c.searchParams.append(`data`,ye(s)),c.toString().length<=a)return{body:void 0,method:i,headers:r,url:c,signal:n.signal}}return{url:o,method:i===`GET`?this.fallbackMethod:i,headers:r,body:s,signal:n.signal}}async decode(e){let t=!Le(e.status),n=await(async()=>{let t=!1;try{let n=await e.body();return t=!0,this.serializer.deserialize(n)}catch(e){throw Error(t?`Invalid RPC response format.`:`Cannot parse response body, please check the response body and content-type.`,{cause:e})}})();if(!t)throw M(n)?Re(n):new Fe(bt(e.status),{status:e.status,data:{...e,body:n}});return n}},St=class{constructor(e){this.jsonSerializer=e}serialize(e){return j(e)?Ye(e,{value:async e=>this.#e(e,!1),error:async e=>new P({data:this.#e(Ie(e).toJSON(),!1),cause:e})}):this.#e(e,!0)}#e(e,t){let[n,r,i,a]=this.jsonSerializer.serialize(e),o=r.length===0?void 0:r;if(!t||a.length===0)return{json:n,meta:o};let s=new FormData;return s.set(`data`,ye({json:n,meta:o,maps:i})),a.forEach((e,t)=>{s.set(t.toString(),e)}),s}deserialize(e){return j(e)?Ye(e,{value:async e=>this.#t(e),error:async e=>{if(!(e instanceof P))return e;let t=this.#t(e.data);return M(t)?Re(t,{cause:e}):new P({data:t,cause:e})}}):this.#t(e)}#t(e){if(e===void 0)return;if(!(e instanceof FormData))return this.jsonSerializer.deserialize(e.json,e.meta??[]);let t=JSON.parse(e.get(`data`));return this.jsonSerializer.deserialize(t.json,t.meta??[],t.maps,t=>e.get(t.toString()))}},Ct=class extends ht{constructor(e,t){let n=new xt(new St(new _t(t)),t);super(n,e,t)}},wt=0,Tt=1,Et=class{peer;constructor(e){this.peer=new dt(async t=>{if(e.websocket.readyState===wt&&await new Promise(t=>{let n=()=>{e.websocket.removeEventListener(`open`,n),e.websocket.removeEventListener(`close`,n),t()};e.websocket.addEventListener(`open`,n,{once:!0}),e.websocket.addEventListener(`close`,n,{once:!0})}),e.websocket.readyState!==Tt)throw Error(`Cannot send message, WebSocket is not open.`);return e.websocket.send(t)}),e.websocket.addEventListener(`message`,async e=>{let t=e.data instanceof Blob?await re(e.data):e.data;this.peer.message(t)}),e.websocket.addEventListener(`close`,()=>{this.peer.close()})}async call(e,t,n,r){let i=await this.peer.request(e);return{...i,body:()=>Promise.resolve(i.body)}}},Dt=class extends Ct{constructor(e){let t=new Et(e);super(t,{...e,url:`http://orpc`})}},Ot=null,kt=null;function At(){return`${location.protocol===`https:`?`wss:`:`ws:`}//${location.host}/rpc`}function I(){if(Ot&&kt&&kt.readyState<=WebSocket.OPEN)return Ot;let e=new WebSocket(At());return e.addEventListener(`close`,()=>{kt===e&&(kt=null,Ot=null)}),kt=e,Ot=Ze(new Dt({websocket:e})),Ot}function jt(e){return e instanceof Error&&/AsyncIdQueue|closed or aborted|WebSocket/i.test(e.message)}function Mt(e){return I().openRepo(e)}function Nt(){return I().getRecentRepos({})}function Pt(e){return I().discoverRepos({folder:e})}function Ft(e){return I().listDirectory({folder:e})}function It(e){return I().getRefs({repoId:e})}function Lt(e){return I().getWorktreeChanges({repoId:e})}function Rt(e,t,n){return I().stageAction({repoId:e,action:t,paths:n})}function zt(e,t,n,r){return I().getWorktreeFileDiff({repoId:e,path:t,area:n,oldPath:r})}function Bt(e,t,n,r){return I().commit({repoId:e,message:t,noVerify:n,amend:r})}function Vt(e,t){return I().queryHistory(t)}function Ht(e,t){return I().getCommitDetail({repoId:e,sha:t})}function Ut(e,t){return I().getCommitAuthor({repoId:e,sha:t})}function Wt(e,t){return I().getCommitDiff({repoId:e,sha:t})}function Gt(e,t,n,r){return I().getCommitFileDiff({repoId:e,sha:t,path:n,oldPath:r})}function Kt(e,t){return I().getCommitPRs({repoId:e,sha:t})}function L(e,t){return I().getCommitCIStatuses({repoId:e,shas:t})}function qt(e,t,n){return I().commitAction({repoId:e,action:t,sha:n})}function Jt(e,t){return I().getMergePreview({repoId:e,refName:t})}function Yt(e,t){return I().mergeRef({repoId:e,refName:t})}function Xt(e,t){return I().rebaseRef({repoId:e,refName:t})}function Zt(e,t){return I().abortOperation({repoId:e,operation:t})}function Qt(e,t){return I().continueOperation({repoId:e,operation:t})}function $t(e,t,n,r,i){return I().refAction({repoId:e,action:t,refName:n,sha:r,force:i})}function en(e,t,n){return I().getReflog({repoId:e,ref:t,maxCount:n})}function tn(){return I().listAgentSessions({})}function nn(e,t){return I().focusAgentSession({pid:e,cwd:t})}function rn(){return I().installWindowCalls({})}var an=class{activeLanes=new Map;reserved=new Map;nextSideFromCenter=`right`;constructor(e){}reserveLane(e,t){this.reserved.set(e,t),this.activeLanes.set(t,e)}assignLane(e,t){let n=this.reserved.get(e);if(n!==void 0)this.reserved.delete(e),this.activeLanes.set(n,e);else{let r=t[0],i=r?this.reserved.get(r):void 0;n=i===void 0?this.findFreeLane():this.findFreeLaneNear(i),this.activeLanes.set(n,e)}if(t.length===0)return this.activeLanes.delete(n),n;let r=t[0];this.reserved.has(r)?this.reserved.get(r)===n?this.activeLanes.set(n,r):this.activeLanes.delete(n):(this.reserved.set(r,n),this.activeLanes.set(n,r));for(let e=1;e<t.length;e++){let n=t[e];if(!this.reserved.has(n)){let e=this.findFreeLaneOutsideCluster();this.reserved.set(n,e),this.activeLanes.set(e,n)}}return n}findFreeLane(){if(!this.activeLanes.has(0))return 0;for(let e=1;;e++){let t=this.activeLanes.has(-e)?void 0:-e,n=this.activeLanes.has(e)?void 0:e;if(!(t===void 0&&n===void 0))return this.pickLaneFromCenter(t,n)}}findFreeLaneNear(e){for(let t=1;;t++){let n=e-t,r=e+t,i=!this.activeLanes.has(n),a=!this.activeLanes.has(r);if(!(!i&&!a))return e<0?i?n:r:e>0?a?r:n:this.pickLaneFromCenter(i?n:void 0,a?r:void 0)}}findFreeLaneOutsideCluster(){if(this.activeLanes.size===0)return this.findFreeLane();let e=1/0,t=-1/0;for(let n of this.activeLanes.keys())n<e&&(e=n),n>t&&(t=n);return this.pickLaneFromCenter(e-1,t+1)}pickLaneFromCenter(e,t){if(e===void 0&&t===void 0)throw Error(`pickLaneFromCenter requires at least one candidate lane`);if(e===void 0)return this.recordChosenSide(`right`),t;if(t===void 0)return this.recordChosenSide(`left`),e;let n=this.sideLoad(`left`),r=this.sideLoad(`right`);if(n<r)return this.recordChosenSide(`left`),e;if(r<n)return this.recordChosenSide(`right`),t;let i=this.nextSideFromCenter;return this.recordChosenSide(i),i===`left`?e:t}sideLoad(e){let t=0;for(let n of this.activeLanes.keys())e===`left`&&n<0&&t++,e===`right`&&n>0&&t++;return t}recordChosenSide(e){this.nextSideFromCenter=e===`left`?`right`:`left`}snapshot(){return{activeLanes:[...this.activeLanes.entries()].sort((e,t)=>e[0]-t[0]).map(([e,t])=>({lane:e,sha:t})),nextSideFromCenter:this.nextSideFromCenter}}restore(e){this.activeLanes=new Map,this.reserved=new Map,this.nextSideFromCenter=e.nextSideFromCenter;for(let t of e.activeLanes)this.activeLanes.set(t.lane,t.sha),this.reserved.set(t.sha,t.lane)}};function on(e){let t=sn(e),n=new Map;for(let e of t)if(e.lane===0)for(let t of e.shas)n.set(t,0);return cn(t.filter(e=>e.lane<0),`left`,n),cn(t.filter(e=>e.lane>0),`right`,n),n}function sn(e){let t=new Map(e.map(e=>[e.sha,e])),n=new Map(e.map(e=>[e.sha,e.sha])),r=e=>{let t=n.get(e);if(t===e)return e;let i=r(t);return n.set(e,i),i},i=(e,t)=>{let i=r(e),a=r(t);i!==a&&n.set(a,i)};for(let n of e){let e=n.parentShas[0],r=e?t.get(e):void 0;r?.lane===n.lane&&i(n.sha,r.sha)}let a=new Map;for(let n of e){let e=r(n.sha),i=a.get(e);i||(i={id:e,lane:n.lane,shas:[],startRow:n.row,endRow:n.row,continuity:0,maxConcurrency:1},a.set(e,i)),i.shas.push(n.sha),i.startRow=Math.min(i.startRow,n.row),i.endRow=Math.max(i.endRow,n.row);let o=n.parentShas[0],s=o?t.get(o):void 0;s?.lane===n.lane&&(i.continuity+=Math.abs(s.row-n.row))}return[...a.values()]}function cn(e,t,n){if(e.length===0)return;ln(e);let r=Math.max(...e.map(e=>Math.abs(e.lane))),i=new Map,a=[...e].sort((e,t)=>t.continuity-e.continuity||t.endRow-t.startRow-(e.endRow-e.startRow)||e.startRow-t.startRow||Math.abs(e.lane)-Math.abs(t.lane)||e.id.localeCompare(t.id));for(let e of a){let a=un(e,i,e.maxConcurrency,1,-1);a===void 0&&(a=un(e,i,e.maxConcurrency+1,r,1)),a??=Math.abs(e.lane);let o=i.get(a);o?o.push(e):i.set(a,[e]);let s=t===`left`?-a:a;for(let t of e.shas)n.set(t,s)}}function ln(e){let t=[...e].sort((e,t)=>e.startRow-t.startRow),n=[];for(let e of t){n=n.filter(t=>t.endRow>=e.startRow),n.push(e);let t=n.length;for(let e of n)e.maxConcurrency=Math.max(e.maxConcurrency,t)}}function un(e,t,n,r,i){for(let a=n;i>0?a<=r:a>=r;a+=i)if((t.get(a)??[]).every(t=>!dn(e,t)))return a}function dn(e,t){return e.startRow<=t.endRow&&t.startRow<=e.endRow}function fn(e,t,n){let r=[];for(let{sha:i,parentShas:a,row:o,lane:s}of e)for(let e=0;e<a.length;e++){let i=a[e],c=t.get(i)??-1,l=n.get(i)??s,u;u=e===0?s===l?`linear`:`fork`:`merge`,r.push({fromRow:o,toRow:c,fromLane:s,toLane:l,kind:u})}return r}var pn=class{id;repoId;scope;ordering;entries=[];shaIndex=new Map;constructor(e,t,n,r){this.id=e,this.repoId=t,this.scope=n,this.ordering=r}appendEntries(e){let t=this.entries.length;for(let n=0;n<e.length;n++){let{sha:r,parentShas:i}=e[n],a=t+n;this.entries.push({sha:r,parentShas:i,row:a}),this.shaIndex.set(r,a)}}getWindow(e,t,n){let r=Math.max(0,e-t),i=Math.min(this.entries.length-1,e+n);return{entries:this.entries.slice(r,i+1),startRow:r,endRow:i}}findRow(e){return this.shaIndex.get(e)}totalRows(){return this.entries.length}getKnownParentShas(e){return e.filter(e=>this.shaIndex.has(e))}checkpoint(e=256){let t=[],n=new an;for(let r=0;r<this.entries.length;r++){let i=this.entries[r];r%e===0&&t.push({row:i.row,sha:i.sha,laneSnapshot:n.snapshot()}),n.assignLane(i.sha,this.getKnownParentShas(i.parentShas))}return t}restoreFrom(e,t){t.restore(e.laneSnapshot)}computeGeometry(e,t,n,r){let i=Math.max(0,e),a=Math.min(this.entries.length-1,t),o=new an;if(r){let e=r;for(;e!==void 0;){o.reserveLane(e,0);let t=this.shaIndex.get(e);if(t===void 0)break;let n=this.entries[t];e=n.parentShas.length>0?n.parentShas[0]:void 0}}let s=0;n&&n.row<=i&&(this.restoreFrom(n,o),s=n.row);for(let e=s;e<i;e++){let t=this.entries[e];o.assignLane(t.sha,this.getKnownParentShas(t.parentShas))}let c=new Map,l=[];for(let e=i;e<=a;e++){let t=this.entries[e],n=o.assignLane(t.sha,this.getKnownParentShas(t.parentShas));c.set(t.sha,n),l.push({sha:t.sha,parentShas:t.parentShas,row:t.row,lane:n})}let u=on(l);for(let e of l)e.lane=u.get(e.sha)??e.lane,c.set(e.sha,e.lane);let d=new Map,f=new Map(c);for(let e of this.entries)d.set(e.sha,e.row);return{lanes:c,edges:fn(l,d,f)}}},mn=0;function hn(e){return mn+=1,`optimistic-${e}-${Date.now().toString(36)}-${mn}`}function gn(e){return{authorName:e.authorName,authorEmail:e.authorEmail,authorUnix:e.authorUnix,committerUnix:e.committerUnix,subject:e.subject,additions:e.additions,deletions:e.deletions,locChanged:e.locChanged,bodyPreview:e.bodyPreview}}function _n(e){return e.find(e=>e.kind===`head`&&e.isCurrent)??null}function vn(e,t){return e.find(e=>e.shortName===t)??null}function yn(e){return e.peeledSha??e.targetSha}function bn(e,t){let n=new Set,r=[e];for(;r.length>0;){let e=r.pop();if(n.has(e))continue;n.add(e);let i=t.get(e);if(i)for(let e of i)n.has(e)||r.push(e)}return n}function xn(e,t,n){let r=new pn(`optimistic`,`optimistic`,{kind:`all`},`date`);r.appendEntries(e.map(e=>({sha:e.sha,parentShas:e.parentShas})));let{lanes:i}=r.computeGeometry(0,e.length-1,void 0,n??void 0),a=new Map;for(let e of t){let t=yn(e),n=a.get(t);n?n.push(e.shortName):a.set(t,[e.shortName])}return e.map((e,t)=>({row:t,sha:e.sha,parentShas:e.parentShas,authorName:e.meta.authorName,authorEmail:e.meta.authorEmail,authorUnix:e.meta.authorUnix,committerUnix:e.meta.committerUnix,subject:e.meta.subject,additions:e.meta.additions,deletions:e.meta.deletions,locChanged:e.meta.locChanged,bodyPreview:e.meta.bodyPreview,refNames:a.get(e.sha)??[],lane:i.get(e.sha)??0}))}function Sn(e){return e.map(e=>({sha:e.sha,parentShas:e.parentShas,meta:gn(e)}))}function Cn(e,t){return e.map(e=>{if(e.kind!==`head`)return e;let n=t!==null&&e.shortName===t;return!!e.isCurrent===n?e:{...e,isCurrent:n}})}function wn(e,t,n){return e.map(e=>e.kind===`head`&&e.shortName===t?{...e,targetSha:n,peeledSha:void 0}:e)}function Tn(e,t,n,r){if(e.length===0)return null;let i=Cn(t,n);return{rows:xn(Sn(e),i,r),refs:i,headSha:r}}function En(e,t,n,r){if(e.length===0)return null;let i=vn(t,n);if(!i||i.kind!==`head`)return null;let a=wn(t,n,r),o=_n(a),s=o?o.targetSha:null;return{rows:xn(Sn(e),a,s),refs:a,headSha:s}}function Dn(e,t,n){let r=_n(t);if(!r)return null;let i=e.find(e=>e.sha===n);if(!i)return null;let a=i.parentShas[0];if(!a)return null;let o=t.some(e=>e!==r&&yn(e)===n&&e.shortName!==r.shortName),s=Sn(e);o||(s=s.filter(e=>e.sha!==n));let c=wn(t,r.shortName,a);return{rows:xn(s,c,a),refs:c,headSha:a}}function On(e,t,n,r){let i=_n(t);if(!i)return null;let a=i.targetSha;if(!e.some(e=>e.sha===a))return null;let o=Math.floor(Date.now()/1e3),s=hn(r),c=[{sha:s,parentShas:[a],meta:{authorName:``,authorEmail:``,authorUnix:o,committerUnix:o,subject:n,additions:0,deletions:0,locChanged:0}},...Sn(e)],l=wn(t,i.shortName,s);return{rows:xn(c,l,s),refs:l,headSha:s}}function kn(e,t,n){let r=_n(t);if(!r)return null;let i=r.targetSha,a=e.find(e=>e.sha===i);if(!a)return null;let o=hn(`amend`),s={sha:o,parentShas:a.parentShas,meta:{...gn(a),subject:n}},c=t.some(e=>e!==r&&e.shortName!==r.shortName&&yn(e)===i)?[s,...Sn(e)]:Sn(e).map(e=>e.sha===i?s:e),l=wn(t,r.shortName,o);return{rows:xn(c,l,o),refs:l,headSha:o}}function An(e,t,n){let r=_n(t);if(!r)return null;let i=vn(t,n);if(!i)return null;let a=r.targetSha,o=yn(i);if(!e.some(e=>e.sha===a))return null;let s=new Map(e.map(e=>[e.sha,e.parentShas])),c=bn(o,s);if(bn(a,s).has(o))return null;if(c.has(a)){if(!e.some(e=>e.sha===o))return null;let n=wn(t,r.shortName,o);return{rows:xn(Sn(e),n,o),refs:n,headSha:o}}if(!e.some(e=>e.sha===o))return null;let l=Math.floor(Date.now()/1e3),u=hn(`merge`),d=[{sha:u,parentShas:[a,o],meta:{authorName:``,authorEmail:``,authorUnix:l,committerUnix:l,subject:`Merge ${n}`,additions:0,deletions:0,locChanged:0}},...Sn(e)],f=wn(t,r.shortName,u);return{rows:xn(d,f,u),refs:f,headSha:u}}function jn(e,t,n){let r=_n(t);if(!r)return null;let i=vn(t,n);if(!i)return null;let a=r.targetSha,o=yn(i);if(!e.some(e=>e.sha===a)||!e.some(e=>e.sha===o))return null;let s=new Map(e.map(e=>[e.sha,e.parentShas])),c=bn(a,s),l=bn(o,s);if(l.has(a)){let n=wn(t,r.shortName,o);return{rows:xn(Sn(e),n,o),refs:n,headSha:o}}let u=e.filter(e=>c.has(e.sha)&&!l.has(e.sha));if(u.length===0||u.some(e=>e.parentShas.length>1))return null;let d=new Set(u.map(e=>e.sha)),f=u[u.length-1],p=Sn(e).filter(e=>!d.has(e.sha));if(!p.some(e=>e.sha===o))return null;let m=Math.floor(Date.now()/1e3),h=[...u.map(e=>({sha:e.sha,parentShas:e.sha===f.sha?[o]:e.parentShas,meta:{...gn(e),committerUnix:m}})),...p],g=t.slice();return{rows:xn(h,g,a),refs:g,headSha:a}}function Mn(e,t,n){return e+t>=n/2}function Nn(e,t,n){return n&&e!==t}function Pn(e,t){if(!e||e.rows.every((e,n)=>t.rows[n]?.sha===e.sha))return t;let n=new Set(e.rows.map(e=>e.sha)),r=t.rows.filter(e=>!n.has(e.sha));return r.length===0?{...e,hasMoreAfter:t.hasMoreAfter}:{...t,rows:[...e.rows,...r],edges:[...e.edges,...t.edges],hasMoreBefore:e.hasMoreBefore}}var Fn=1e3,In=500,Ln=12,Rn=3e4,zn=13e4,Bn=class extends Error{constructor(){super(`The operation timed out`),this.name=`MutationTimeoutError`}};function Vn(e,t){return new Promise((n,r)=>{let i=setTimeout(()=>r(new Bn),t);e.then(e=>{clearTimeout(i),n(e)},e=>{clearTimeout(i),r(e)})})}function Hn(e){return e.startsWith(`optimistic-`)||e.startsWith(`preview:`)}function Un(e){return new Set(e.unstaged.filter(e=>e.status===`U`).map(e=>e.path)).size}function Wn(e){return e.staged.length+e.unstaged.length}function Gn(e,t,n,r){if(!n){e({pendingMutation:!0,...r?{selectedSha:null,selectedRefName:r,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null}:{}});return}e(e=>({pendingMutation:!0,refs:n.refs,historyWindow:qn(t.historyWindow,n.rows),selectedSha:r?null:n.headSha,selectedRefName:r??null,scrollToSha:n.headSha,scrollToKey:e.scrollToKey+1,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null}))}function Kn(e){return{refs:e.refs,historyWindow:e.historyWindow,selectedSha:e.selectedSha,selectedRefName:e.selectedRefName,scrollToSha:e.scrollToSha,totalCommitCount:e.totalCommitCount,mergePreview:e.mergePreview,commitDetail:e.commitDetail,commitDiff:e.commitDiff,commitPRs:e.commitPRs,commitFileDiffs:e.commitFileDiffs}}function qn(e,t){return e?{...e,rows:t,totalRowsKnown:t.length,checkpointsKnownUntilRow:Math.max(0,t.length-1)}:null}function Jn(e){return Promise.all([It(e),Vt(e,{repoId:e,scope:{kind:`all`},anchor:{kind:`head`},beforeRows:0,afterRows:Fn,firstParent:!1,topoOrder:!0})])}function Yn(e){return Promise.all([It(e),Vt(e,{repoId:e,scope:{kind:`all`},anchor:{kind:`head`},beforeRows:0,afterRows:Fn,firstParent:!1,topoOrder:!0}),Lt(e)])}function Xn(e,t){Promise.all([Ht(e,t),Wt(e,t)]).then(([e,n])=>{R.getState().selectedSha===t&&R.setState({commitDetail:e,commitDiff:n})}).catch(e=>console.error(`Failed to load commit detail:`,e)),R.getState().githubUrl&&(Zn(e,t),Kt(e,t).then(e=>{R.getState().selectedSha===t&&R.setState({commitPRs:e})}).catch(()=>{})),R.getState().fetchCommitCIStatusesIfNeeded([t])}function Zn(e,t){let n=R.getState();!n.githubUrl||t in n.commitAuthorAvatars||Ut(e,t).then(({avatarUrl:n})=>{R.getState().repoId===e&&R.setState(e=>({commitAuthorAvatars:{...e.commitAuthorAvatars,[t]:n}}))}).catch(()=>{})}function Qn(e){let t=e.find(e=>e.kind===`head`&&e.isCurrent);if(!t)return null;if(t.upstream){let n=e.find(e=>e.kind===`remote`&&e.name===t.upstream);if(n)return n.peeledSha??n.targetSha}return t.peeledSha??t.targetSha}function $n(e,t){return e.rows.some(e=>e.sha===t)}function er(){let e=window.location.hash;return e.startsWith(`#/repository`)?new URLSearchParams(e.split(`?`)[1]??``).get(`path`):null}function tr(e){window.location.hash=`#/repository?path=${encodeURIComponent(e)}`}function nr(){window.history.replaceState(null,``,`${window.location.pathname}${window.location.search}`)}function rr(e){return e instanceof Error&&e.message.includes(`No session found`)}function ir(e,t){return[t,...e.filter(e=>e!==t)].slice(0,Ln)}var ar=300;function or(e,t){return`${e}:${t}`}function sr(e,t){return`${e}:${t}`}async function cr(e,t,n,r){t({status:`loading`,openError:null});try{let r=await Mt({path:e});tr(r.rootPath),fr.clear(),mr(),t({status:`ready`,repoId:r.repoId,repoPath:r.rootPath,totalCommitCount:r.totalCommitCount,recentRepos:ir(n().recentRepos,r.rootPath),githubUrl:r.githubUrl,commitAuthorAvatars:{},commitCIStatus:{},openError:null,selectedRefName:null,mergePreview:null,worktreeChanges:null,worktreeSelected:!1,worktreeFileDiffs:{},commitFileDiffs:{},reflog:null,reflogMaxCount:ar}),n().viewMode===`reflog`&&n().loadReflog(),n().loadWorktreeChanges();let[i,a]=await Promise.all([It(r.repoId),Vt(r.repoId,{repoId:r.repoId,scope:{kind:`all`},anchor:{kind:`head`},beforeRows:0,afterRows:Fn,firstParent:!1,topoOrder:!0})]);t({refs:i,historyWindow:a})}catch(e){let i=n().recentRepos;try{i=await Nt()}catch(e){console.error(`Failed to load recent repositories:`,e)}t({status:`no-repo`,recentRepos:i,openError:r.showOpenError?e instanceof Error?e.message:`Failed to open repository`:null})}}var lr=1e4,ur=10*6e4,dr=new Set([`success`,`failure`,`neutral`]),fr=new Map,pr=null;function mr(){pr!==null&&(clearInterval(pr),pr=null)}function hr(){pr===null&&(pr=setInterval(_r,lr))}function gr(e){let{repoId:t}=R.getState();!t||e.length===0||L(t,e).then(n=>{R.getState().repoId===t&&R.setState(t=>{let r={...t.commitCIStatus};for(let t of e){let e=n[t];r[t]=e?{state:e.state,runs:e.runs??[]}:{state:`none`,runs:[]}}return{commitCIStatus:r}})}).catch(e=>console.warn(`[CI] poll fetch failed`,e))}function _r(){let{repoId:e,commitCIStatus:t}=R.getState();if(!e){mr();return}let n=Date.now(),r=new Set;for(let[e,i]of fr){let a=t[e]?.state;n>i||a!==void 0&&dr.has(a)?fr.delete(e):r.add(e)}for(let[e,n]of Object.entries(t))n.state===`pending`&&r.add(e);if(r.size===0){mr();return}gr([...r])}var R=T((e,t)=>({status:`no-repo`,repoId:null,repoPath:null,totalCommitCount:0,recentRepos:[],discoveredFolder:null,discoveredRepos:[],refs:[],historyWindow:null,viewMode:`history`,reflog:null,reflogLoading:!1,reflogMaxCount:ar,selectedSha:null,selectedRefName:null,scrollToSha:null,scrollToKey:0,commitDetail:null,commitDiff:null,commitPRs:[],commitAuthorAvatars:{},mergePreview:null,githubUrl:null,openError:null,errorDialog:null,loadingMore:!1,commitCIStatus:{},worktreeChanges:null,worktreeSelected:!1,worktreeFileDiffs:{},commitFileDiffs:{},pendingMutation:!1,graphAnimationSuppressToken:0,showCommitMessages:(()=>{try{let e=localStorage.getItem(`showCommitMessages`);return e===null?!0:e===`true`}catch{return!0}})(),showGutterColors:(()=>{try{return localStorage.getItem(`showGutterColors`)===`true`}catch{return!1}})(),setShowCommitMessages:t=>{try{localStorage.setItem(`showCommitMessages`,String(t))}catch{}e({showCommitMessages:t})},setShowGutterColors:t=>{try{localStorage.setItem(`showGutterColors`,String(t))}catch{}e({showGutterColors:t})},reloadFromServer:async()=>{let{repoPath:n}=t(),r=t().repoId;if(!(!r||!n)&&!t().pendingMutation)try{let i,a,o;try{[i,a,o]=await Yn(r)}catch(t){if(rr(t)||jt(t)){let t=await Mt({path:n});r=t.repoId,e({repoId:r,githubUrl:t.githubUrl,totalCommitCount:t.totalCommitCount});let s=await Yn(r);i=s[0],a=s[1],o=s[2]}else throw t}e(e=>({refs:i,historyWindow:a,totalCommitCount:Math.max(e.totalCommitCount,a.rows.length),mergePreview:null,worktreeChanges:o,worktreeFileDiffs:{},worktreeSelected:Un(o)>0?!0:Wn(o)>0?e.worktreeSelected:!1})),t().viewMode===`reflog`&&t().loadReflog()}catch(e){console.error(`Failed to reload repository state:`,e)}},loadWorktreeChanges:async()=>{let{repoId:n}=t();if(n)try{let t=await Lt(n);e(e=>({worktreeChanges:t,worktreeFileDiffs:{},worktreeSelected:Un(t)>0?!0:Wn(t)>0?e.worktreeSelected:!1}))}catch(e){console.error(`Failed to load worktree changes:`,e)}},loadWorktreeFileDiff:async(n,r)=>{let{repoId:i}=t();if(!i)return;let a=or(r,n.path),o=t().worktreeFileDiffs[a];if(!(o&&(o.loading||o.patchText!==void 0))){e(e=>({worktreeFileDiffs:{...e.worktreeFileDiffs,[a]:{loading:!0}}}));try{let t=await zt(i,n.path,r,n.oldPath);e(e=>({worktreeFileDiffs:{...e.worktreeFileDiffs,[a]:{loading:!1,patchText:t.patchText,isBinary:t.isBinary}}}))}catch(t){e(e=>({worktreeFileDiffs:{...e.worktreeFileDiffs,[a]:{loading:!1,error:t instanceof Error?t.message:`Failed to load diff`}}}))}}},loadCommitFileDiff:async(n,r)=>{let{repoId:i}=t();if(!i)return;let a=sr(n,r.path),o=t().commitFileDiffs[a];if(!(o&&(o.loading||o.patchText!==void 0))){e(e=>({commitFileDiffs:{...e.commitFileDiffs,[a]:{loading:!0}}}));try{let t=await Gt(i,n,r.path,r.oldPath);e(e=>({commitFileDiffs:{...e.commitFileDiffs,[a]:{loading:!1,patchText:t.patchText,isBinary:t.isBinary}}}))}catch(t){e(e=>({commitFileDiffs:{...e.commitFileDiffs,[a]:{loading:!1,error:t instanceof Error?t.message:`Failed to load diff`}}}))}}},performCommit:async(n,r,i=!1)=>{let{repoPath:a}=t(),o=t().repoId;if(!o||!a||t().pendingMutation)return!1;let s=Kn(t()),c=s.historyWindow?.rows??[],l=n.split(`
12
+ `)[0],u=i?kn(c,s.refs,l):On(c,s.refs,l,`commit`);e(u?{pendingMutation:!0,refs:u.refs,historyWindow:qn(s.historyWindow,u.rows)}:{pendingMutation:!0});let d;try{d=await Vn((async()=>{try{return await Bt(o,n,r,i)}catch(t){if(rr(t)){let t=await Mt({path:a});return o=t.repoId,e({repoId:o,githubUrl:t.githubUrl,totalCommitCount:t.totalCommitCount}),await Bt(o,n,r,i)}throw t}})(),zn)}catch(n){return e({...s,pendingMutation:!1}),t().showError(`Commit failed`,n),!1}let[f,p]=await Jn(o);return e(e=>({pendingMutation:!1,graphAnimationSuppressToken:u?e.graphAnimationSuppressToken+1:e.graphAnimationSuppressToken,refs:f,historyWindow:p,totalCommitCount:Math.max(i?e.totalCommitCount:e.totalCommitCount+1,p.rows.length),worktreeChanges:d.changes,worktreeFileDiffs:{}})),t().viewMode===`reflog`&&t().loadReflog(),!0},selectWorktree:()=>{e({worktreeSelected:!0,selectedSha:null,selectedRefName:null,commitDetail:null,commitDiff:null,commitPRs:[],mergePreview:null,commitFileDiffs:{}}),t().loadWorktreeChanges()},runStageAction:async(n,r)=>{let{repoPath:i}=t(),a=t().repoId;if(!a||!i)return!1;try{let t;try{t=await Rt(a,n,r)}catch(o){if(!rr(o)&&!jt(o))throw o;let s=await Mt({path:i});a=s.repoId,e({repoId:a,githubUrl:s.githubUrl,totalCommitCount:s.totalCommitCount}),t=await Rt(a,n,r)}return e({worktreeChanges:t,worktreeFileDiffs:{}}),!0}catch(e){return t().showError(`Staging action failed`,e),!1}},setViewMode:n=>{e({viewMode:n}),n===`reflog`&&!t().reflog&&t().loadReflog()},loadReflog:async()=>{let{repoPath:n,reflogMaxCount:r}=t(),i=t().repoId;if(!(!i||!n)){e({reflogLoading:!0});try{let t;try{t=await en(i,`HEAD`,r)}catch(a){if(rr(a)||jt(a)){let a=await Mt({path:n});i=a.repoId,e({repoId:i,githubUrl:a.githubUrl,totalCommitCount:a.totalCommitCount}),t=await en(i,`HEAD`,r)}else throw a}e({reflog:t})}catch(e){console.error(`Failed to load reflog:`,e),t().showError(`Failed to load reflog`,e)}finally{e({reflogLoading:!1})}}},loadMoreReflog:async()=>{t().reflogLoading||(e({reflogMaxCount:t().reflogMaxCount+ar}),await t().loadReflog())},recoverBranch:async(n,r)=>{await t().performRefAction(`create`,n,r),e({selectedSha:r}),t().loadReflog()},fetchCommitCIStatusesIfNeeded:n=>{let{repoId:r,commitCIStatus:i}=t();if(!r)return;let a=n.filter(e=>!Hn(e)&&i[e]===void 0);a.length!==0&&(e(e=>{let t={...e.commitCIStatus};for(let e of a)t[e]={state:`loading`,runs:[]};return{commitCIStatus:t}}),L(r,a).then(t=>{e(e=>{let n={...e.commitCIStatus};for(let e of a){let r=t[e];n[e]=r?{state:r.state,runs:r.runs??[]}:{state:`none`,runs:[]}}return{commitCIStatus:n}})}).catch(t=>{console.warn(`[CI] batch fetch failed`,t),e(e=>{let t={...e.commitCIStatus};for(let e of a)t[e]={state:`none`,runs:[]};return{commitCIStatus:t}})}))},watchCommitCIStatus:e=>{fr.set(e,Date.now()+ur),gr([e]),hr()},showError:(t,n,r)=>{e({errorDialog:{title:t,message:n instanceof Error?n.message:typeof n==`string`?n:`Unknown error`,action:r}})},dismissError:()=>e({errorDialog:null}),openRepoByPath:async n=>{await cr(n,e,t,{showOpenError:!0})},closeRepo:()=>{fr.clear(),mr(),nr(),e({status:`no-repo`,repoId:null,repoPath:null,totalCommitCount:0,refs:[],historyWindow:null,selectedSha:null,selectedRefName:null,scrollToSha:null,commitDetail:null,commitDiff:null,commitPRs:[],commitAuthorAvatars:{},mergePreview:null,githubUrl:null,openError:null,loadingMore:!1,commitCIStatus:{},worktreeChanges:null,worktreeSelected:!1,worktreeFileDiffs:{},commitFileDiffs:{},pendingMutation:!1,reflog:null,reflogLoading:!1,reflogMaxCount:ar,viewMode:`history`})},loadRecentRepos:async()=>{try{e({recentRepos:await Nt()})}catch(e){console.error(`Failed to load recent repositories:`,e)}},loadDiscoveredRepos:async t=>{try{let{folder:n,repos:r}=await Pt(t);e({discoveredFolder:n,discoveredRepos:r})}catch(e){console.error(`Failed to discover repositories:`,e)}},openFromUrl:()=>{let n=er();t().loadRecentRepos(),t().loadDiscoveredRepos(),n?t().openRepoByPath(n):cr(`.`,e,t,{showOpenError:!1})},selectCommit:n=>{e({selectedSha:n,worktreeSelected:!1,scrollToSha:null,scrollToKey:t().scrollToKey,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{}});let{repoId:r,githubUrl:i}=t();r&&(t().fetchCommitCIStatusesIfNeeded([n]),Promise.all([Ht(r,n),Wt(r,n)]).then(([r,i])=>{t().selectedSha===n&&e({commitDetail:r,commitDiff:i})}).catch(e=>console.error(`Failed to load commit detail:`,e)),i&&(Zn(r,n),Kt(r,n).then(r=>{t().selectedSha===n&&e({commitPRs:r})}).catch(()=>{})))},selectRef:e=>{t().selectCommit(e.targetSha)},selectGraphRef:n=>{let{repoId:r}=t();e({selectedSha:null,worktreeSelected:!1,selectedRefName:n,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null}),r&&Jt(r,n).then(r=>{t().selectedRefName===n&&e({mergePreview:r})}).catch(()=>{})},clearGraphRefSelection:()=>{e({selectedSha:null,worktreeSelected:!1,selectedRefName:null,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null})},ensureMergePreview:async n=>{let{repoId:r,mergePreview:i}=t();if(!r)return null;if(i?.sourceRefName===n)return i;let a=await Jt(r,n);return t().selectedRefName===n&&e({mergePreview:a}),a},navigateTo:async n=>{let{historyWindow:r,repoId:i}=t();if(r?.rows.some(e=>e.sha===n))e(e=>({selectedSha:n,scrollToSha:n,scrollToKey:e.scrollToKey+1,commitDetail:null,commitDiff:null,commitFileDiffs:{}}));else if(i){let r=!1,a=t().historyWindow?.rows.length??Fn;for(let t=0;t<3&&!r;t++){a=Math.min(a*3,1e4);try{let t=await Vt(i,{repoId:i,scope:{kind:`all`},anchor:{kind:`head`},beforeRows:0,afterRows:a,firstParent:!1,topoOrder:!0});if(r=t.rows.some(e=>e.sha===n||e.sha.startsWith(n)),e(e=>({historyWindow:r?t:Pn(e.historyWindow,t),selectedSha:n,scrollToSha:r?n:null,scrollToKey:r?e.scrollToKey+1:e.scrollToKey,commitDetail:null,commitDiff:null,commitFileDiffs:{}})),!r&&!t.hasMoreAfter)break}catch(e){console.error(`Failed to load history for navigation:`,e);break}}r||console.warn(`Commit ${n} not found in reachable history`)}let{repoId:a}=t();a&&(t().fetchCommitCIStatusesIfNeeded([n]),Zn(a,n),Promise.all([Ht(a,n),Wt(a,n)]).then(([r,i])=>{t().selectedSha===n&&e({commitDetail:r,commitDiff:i})}).catch(()=>{}))},requestMore:async n=>{let{repoId:r,historyWindow:i,loadingMore:a}=t();if(!(!r||!i||a)&&!(n===`down`&&!i.hasMoreAfter)){e({loadingMore:!0});try{let t=await Vt(r,{repoId:r,scope:{kind:`all`},anchor:{kind:`head`},beforeRows:0,afterRows:i.rows.length+In,firstParent:!1,topoOrder:!0});e(e=>({historyWindow:Pn(e.historyWindow,t)}))}catch(e){console.error(`Failed to load more history:`,e)}finally{e({loadingMore:!1})}}},performRefAction:async(n,r,i,a)=>{let{repoPath:o}=t(),s=t().repoId;if(!s||!o||t().pendingMutation)return;let c=Kn(t()),l=c.historyWindow?.rows??[],u=null;n===`checkout`?u=Tn(l,c.refs,r,i):(n===`move`||n===`reset`)&&(u=En(l,c.refs,r,i)),e(u?{pendingMutation:!0,refs:u.refs,historyWindow:qn(c.historyWindow,u.rows),mergePreview:null,...n===`move`?{selectedRefName:r,selectedSha:i,scrollToSha:null,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{}}:{selectedRefName:null}}:{pendingMutation:!0});try{await Vn((async()=>{try{await $t(s,n,r,i,a)}catch(t){if(rr(t)||jt(t)){let t=await Mt({path:o});s=t.repoId,e({repoId:s,githubUrl:t.githubUrl,totalCommitCount:t.totalCommitCount}),await $t(s,n,r,i,a)}else throw t}})(),Rn)}catch(t){throw e({...c,pendingMutation:!1}),t}let[d,f]=await Jn(s);if(t().loadWorktreeChanges(),n===`fetch`){let n=Qn(d),r=n&&$n(f,n)?n:null;e(e=>({pendingMutation:!1,refs:d,historyWindow:f,totalCommitCount:Math.max(e.totalCommitCount,f.rows.length),selectedSha:r??e.selectedSha,selectedRefName:null,scrollToSha:r??e.scrollToSha,scrollToKey:r?e.scrollToKey+1:e.scrollToKey,commitDetail:r?null:e.commitDetail,commitDiff:r?null:e.commitDiff,commitPRs:r?[]:e.commitPRs,commitFileDiffs:r?{}:e.commitFileDiffs,mergePreview:null})),r&&Xn(s,r),t().viewMode===`reflog`&&t().loadReflog();return}if(n===`move`){e(e=>({pendingMutation:!1,graphAnimationSuppressToken:u?e.graphAnimationSuppressToken+1:e.graphAnimationSuppressToken,refs:d,historyWindow:f,selectedRefName:r,selectedSha:i,scrollToSha:null,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null})),Xn(s,i);return}if(n===`push`&&t().watchCommitCIStatus(i),n===`create`||n===`create-tag`){e(e=>({pendingMutation:!1,graphAnimationSuppressToken:u?e.graphAnimationSuppressToken+1:e.graphAnimationSuppressToken,refs:d,historyWindow:f,selectedRefName:r,selectedSha:i,scrollToSha:null,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null})),Xn(s,i);return}e(e=>({pendingMutation:!1,graphAnimationSuppressToken:u?e.graphAnimationSuppressToken+1:e.graphAnimationSuppressToken,refs:d,historyWindow:f,selectedRefName:null,mergePreview:null}))},performCommitAction:async(n,r)=>{let{repoPath:i}=t(),a=t().repoId;if(!a||!i||t().pendingMutation)return;let o=Kn(t()),s=o.historyWindow?.rows??[],c=null;if(n===`uncommit`)c=Dn(s,o.refs,r);else{let e=s.find(e=>e.sha===r),t=n===`revert`?`Revert "${e?.subject??r.slice(0,8)}"`:e?.subject??r.slice(0,8);c=On(s,o.refs,t,n)}Gn(e,o,c);let l;try{l=await Vn((async()=>{try{return await qt(a,n,r)}catch(t){if(rr(t)){let t=await Mt({path:i});return a=t.repoId,e({repoId:a,githubUrl:t.githubUrl,totalCommitCount:t.totalCommitCount}),await qt(a,n,r)}throw t}})(),Rn)}catch(t){throw e({...o,pendingMutation:!1}),t}let[u,d]=await Jn(a),f=l.headSha,p=n===`uncommit`?-1:1;e(e=>({pendingMutation:!1,graphAnimationSuppressToken:c?e.graphAnimationSuppressToken+1:e.graphAnimationSuppressToken,refs:u,historyWindow:d,totalCommitCount:Math.max(e.totalCommitCount+p,d.rows.length),selectedSha:f,selectedRefName:null,scrollToSha:f,scrollToKey:e.scrollToKey+1,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null})),Xn(a,f),t().loadWorktreeChanges(),t().viewMode===`reflog`&&t().loadReflog()},performMergeRef:async n=>{let{repoPath:r}=t(),i=t().repoId;if(!i||!r||t().pendingMutation)return;let a=Kn(t()),o=An(a.historyWindow?.rows??[],a.refs,n),s=a.refs.find(e=>e.kind===`head`&&e.isCurrent)?.shortName;Gn(e,a,o,s);let c;try{c=await Vn((async()=>{try{return await Yt(i,n)}catch(t){if(rr(t)){let t=await Mt({path:r});return i=t.repoId,e({repoId:i,githubUrl:t.githubUrl,totalCommitCount:t.totalCommitCount}),await Yt(i,n)}throw t}})(),Rn)}catch(t){let n=null;try{n=await Lt(i)}catch(e){console.error(`Failed to load worktree after failed merge:`,e)}throw e({...a,pendingMutation:!1,...n?{worktreeChanges:n,worktreeFileDiffs:{},worktreeSelected:Un(n)>0}:{}}),t}let[l,u]=await Jn(i),d=c.headSha,f=l.find(e=>e.kind===`head`&&e.isCurrent)?.shortName??s;e(e=>({pendingMutation:!1,graphAnimationSuppressToken:o?e.graphAnimationSuppressToken+1:e.graphAnimationSuppressToken,refs:l,historyWindow:u,totalCommitCount:Math.max(e.totalCommitCount+1,u.rows.length),selectedSha:f?null:d,selectedRefName:f??null,scrollToSha:d,scrollToKey:e.scrollToKey+1,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null})),f||Xn(i,d),t().loadWorktreeChanges()},performRebaseRef:async n=>{let{repoPath:r}=t(),i=t().repoId;if(!i||!r||t().pendingMutation)return;let a=Kn(t()),o=jn(a.historyWindow?.rows??[],a.refs,n);Gn(e,a,o);let s;try{s=await Vn((async()=>{try{return await Xt(i,n)}catch(t){if(rr(t)){let t=await Mt({path:r});return i=t.repoId,e({repoId:i,githubUrl:t.githubUrl,totalCommitCount:t.totalCommitCount}),await Xt(i,n)}throw t}})(),Rn)}catch(t){let n=null,r=null,o=null;try{[n,r,o]=await Promise.all([It(i),Vt(i,{repoId:i,scope:{kind:`all`},anchor:{kind:`head`},beforeRows:0,afterRows:Fn,firstParent:!1,topoOrder:!0}),Lt(i)])}catch(e){console.error(`Failed to load graph after failed rebase:`,e)}throw e(e=>!n||!r?{...a,pendingMutation:!1,...o?{worktreeChanges:o,worktreeFileDiffs:{},worktreeSelected:Un(o)>0}:{}}:{pendingMutation:!1,refs:n,historyWindow:r,totalCommitCount:Math.max(e.totalCommitCount,r.rows.length),selectedSha:null,selectedRefName:null,scrollToSha:o?.headSha??null,scrollToKey:o?e.scrollToKey+1:e.scrollToKey,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null,worktreeChanges:o,worktreeFileDiffs:{},worktreeSelected:o?Un(o)>0:e.worktreeSelected}),t}let[c,l]=await Jn(i),u=s.headSha;e(e=>({pendingMutation:!1,graphAnimationSuppressToken:o?e.graphAnimationSuppressToken+1:e.graphAnimationSuppressToken,refs:c,historyWindow:l,totalCommitCount:Math.max(e.totalCommitCount,l.rows.length),selectedSha:u,selectedRefName:null,scrollToSha:u,scrollToKey:e.scrollToKey+1,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null})),Xn(i,u),t().loadWorktreeChanges()},abortInProgressOperation:async n=>{let{repoPath:r}=t(),i=t().repoId;if(!(!i||!r)&&!t().pendingMutation){e({pendingMutation:!0});try{let a;try{a=await Zt(i,n)}catch(t){if(rr(t)){let t=await Mt({path:r});i=t.repoId,e({repoId:i,githubUrl:t.githubUrl,totalCommitCount:t.totalCommitCount}),a=await Zt(i,n)}else throw t}let[o,s]=await Jn(i),c=a.headSha;e(e=>({pendingMutation:!1,refs:o,historyWindow:s,totalCommitCount:Math.max(e.totalCommitCount,s.rows.length),selectedSha:c,selectedRefName:null,scrollToSha:c,scrollToKey:e.scrollToKey+1,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null,worktreeChanges:a.changes,worktreeFileDiffs:{},worktreeSelected:Wn(a.changes)>0})),Xn(i,c),t().viewMode===`reflog`&&t().loadReflog()}catch(r){e({pendingMutation:!1}),t().showError(`Abort ${n} failed`,r)}}},continueInProgressOperation:async n=>{let{repoPath:r}=t(),i=t().repoId;if(!(!i||!r)&&!t().pendingMutation){e({pendingMutation:!0});try{let a;try{a=await Qt(i,n)}catch(t){if(rr(t)){let t=await Mt({path:r});i=t.repoId,e({repoId:i,githubUrl:t.githubUrl,totalCommitCount:t.totalCommitCount}),a=await Qt(i,n)}else throw t}let[o,s]=await Jn(i),c=a.headSha;e(e=>({pendingMutation:!1,refs:o,historyWindow:s,totalCommitCount:Math.max(e.totalCommitCount,s.rows.length),selectedSha:c,selectedRefName:null,scrollToSha:c,scrollToKey:e.scrollToKey+1,commitDetail:null,commitDiff:null,commitPRs:[],commitFileDiffs:{},mergePreview:null,worktreeChanges:a.changes,worktreeFileDiffs:{},worktreeSelected:Wn(a.changes)>0})),Xn(i,c),t().viewMode===`reflog`&&t().loadReflog()}catch(r){let a=null,o=null,s=null;try{[a,o,s]=await Promise.all([It(i),Vt(i,{repoId:i,scope:{kind:`all`},anchor:{kind:`head`},beforeRows:0,afterRows:Fn,firstParent:!1,topoOrder:!0}),Lt(i)])}catch(e){console.error(`Failed to reload state after failed continue:`,e)}e(e=>({pendingMutation:!1,...a&&o?{refs:a,historyWindow:o,totalCommitCount:Math.max(e.totalCommitCount,o.rows.length)}:{},...s?{worktreeChanges:s,worktreeFileDiffs:{},worktreeSelected:Un(s)>0||e.worktreeSelected}:{}})),t().showError(`Continue ${n} failed`,r)}}},checkoutSha:async n=>{let{repoPath:r}=t(),i=t().repoId;if(!i||!r||t().pendingMutation)return;let a=Kn(t()),o=Tn(a.historyWindow?.rows??[],a.refs,null,n);e(o?{pendingMutation:!0,refs:o.refs,historyWindow:qn(a.historyWindow,o.rows),selectedRefName:null,mergePreview:null}:{pendingMutation:!0});try{await Vn((async()=>{try{await $t(i,`checkout`,n,n)}catch(t){if(rr(t))i=(await Mt({path:r})).repoId,e({repoId:i}),await $t(i,`checkout`,n,n);else throw t}})(),Rn)}catch(t){throw e({...a,pendingMutation:!1}),t}let[s,c]=await Jn(i);e(e=>({pendingMutation:!1,graphAnimationSuppressToken:o?e.graphAnimationSuppressToken+1:e.graphAnimationSuppressToken,refs:s,historyWindow:c,selectedRefName:null,mergePreview:null})),t().loadWorktreeChanges(),t().viewMode===`reflog`&&t().loadReflog()}})),vr=5e3;function yr(e){let t=[],n=new Map;for(let r of e){if(r.kind!==`ide`){t.push({...r,count:1});continue}let e=`${r.agent}\0${r.ide}\0${r.cwd}`,i=n.get(e);if(i)i.count+=1;else{let i={...r,count:1};n.set(e,i),t.push(i)}}return t}function br(e,t=e=>e.cwd){let n=new Map;for(let r of yr(e)){let e=t(r),i=n.get(e);i||(i={cwd:e,sessions:[]},n.set(e,i)),i.sessions.push(r)}return[...n.values()]}function xr(e){return e.kind===`ide`?e.ide??`ide`:e.kind===`terminal`?e.tty?.replace(`/dev/`,``)??`terminal`:`background`}function Sr(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(null),[i,a]=(0,x.useState)(null),[o,s]=(0,x.useState)(!1),c=R(e=>e.showError),l=(0,x.useCallback)(async()=>{let e=await tn();t(e.sessions),r(e.capabilities)},[]);return(0,x.useEffect)(()=>{let e=!1,n=()=>{tn().then(n=>{e||(t(n.sessions),r(n.capabilities))}).catch(()=>{})};n();let i=setInterval(n,vr);return()=>{e=!0,clearInterval(i)}},[]),{sessions:e,capabilities:n,focusingPid:i,installing:o,focus:(0,x.useCallback)(async e=>{a(e.pid);try{let t=await nn(e.pid,e.cwd);return t.ok?!0:(c(`Could not focus agent session`,t.error??`Unknown error`),!1)}catch(e){return c(`Could not focus agent session`,e),!1}finally{a(null)}},[c]),install:(0,x.useCallback)(async()=>{s(!0);try{let e=await rn();if(!e.ok){c(`Extension install failed`,e.error??`Unknown error`);return}await l().catch(()=>{})}catch(e){c(`Extension install failed`,e)}finally{s(!1)}},[l,c]),canInstallWindowCalls:n?.canInstallWindowCalls===!0&&!n.canFocusTerminals&&e.some(e=>e.kind===`terminal`)}}var Cr=`#D97757`,wr=[[12,6.6],[16.2,8.6],[17.3,13.2],[14.3,16.9],[9.7,16.9],[6.7,13.2],[7.8,8.6]];function Tr({agent:e,size:t=12,busy:n=!1}){let r=(0,x.useId)(),i={width:t,height:t,style:{flexShrink:0,animation:n?`agent-icon-pulse 1.2s ease-in-out infinite`:void 0},"aria-label":e,role:`img`};return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`style`,{children:`@keyframes agent-icon-pulse { 50% { opacity: 0.25; } }`}),e===`claude`?(0,E.jsx)(`svg`,{viewBox:`0 0 24 24`,...i,children:(0,E.jsxs)(`g`,{stroke:Cr,strokeWidth:`2.8`,strokeLinecap:`round`,children:[(0,E.jsx)(`line`,{x1:`12`,y1:`2.5`,x2:`12`,y2:`21.5`}),(0,E.jsx)(`line`,{x1:`2.5`,y1:`12`,x2:`21.5`,y2:`12`}),(0,E.jsx)(`line`,{x1:`5.3`,y1:`5.3`,x2:`18.7`,y2:`18.7`}),(0,E.jsx)(`line`,{x1:`18.7`,y1:`5.3`,x2:`5.3`,y2:`18.7`})]})}):(0,E.jsxs)(`svg`,{viewBox:`0 0 24 24`,...i,children:[(0,E.jsx)(`defs`,{children:(0,E.jsxs)(`linearGradient`,{id:r,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,E.jsx)(`stop`,{offset:`0`,stopColor:`#9a86ee`}),(0,E.jsx)(`stop`,{offset:`1`,stopColor:`#3d31ee`})]})}),(0,E.jsxs)(`g`,{fill:`url(#${r})`,children:[wr.map(([e,t])=>(0,E.jsx)(`circle`,{cx:e,cy:t,r:5},`${e}-${t}`)),(0,E.jsx)(`circle`,{cx:`12`,cy:`12`,r:`6.5`})]}),(0,E.jsxs)(`g`,{stroke:`#fff`,strokeWidth:`2.1`,strokeLinecap:`round`,strokeLinejoin:`round`,fill:`none`,children:[(0,E.jsx)(`path`,{d:`M8.8 9 L11.8 12 L8.8 15`}),(0,E.jsx)(`line`,{x1:`13.4`,y1:`15`,x2:`16.8`,y2:`15`})]})]})]})}var Er=8;function Dr(e){return e.replace(/[\\/]+$/,``).split(/[\\/]/).filter(Boolean).pop()??e}function Or(e){return e.replace(/[^a-z0-9_-]/gi,`_`)}function kr(e){if(e.trim().length===0)return null;let t=e.lastIndexOf(`/`),n=e.lastIndexOf(`\\`),r=Math.max(t,n);if(r===-1)return{folder:`.`,prefix:e};let i=e.slice(r+1),a=e.slice(0,r);return a||=e.startsWith(`/`)?`/`:`.`,{folder:a,prefix:i}}function Ar(e){let t=e.replace(/[\\/]+$/,``)||e,n=t.includes(`\\`)&&!t.includes(`/`)?`\\`:`/`;if(/^[A-Za-z]:[\\/]/.test(t)){let e=`${t.slice(0,2)}${n}`,r=[{label:e,path:e}],i=e;for(let e of t.slice(3).split(/[\\/]+/).filter(Boolean))i=i.endsWith(n)?`${i}${e}`:`${i}${n}${e}`,r.push({label:e,path:i});return r}if(t.startsWith(`/`)||t.startsWith(`\\`)){let e=[{label:`/`,path:`/`}],n=``;for(let r of t.split(/[\\/]+/).filter(Boolean))n=`${n}/${r}`,e.push({label:r,path:n});return e}let r=``;return t.split(/[\\/]+/).filter(Boolean).map(e=>(r=r?`${r}${n}${e}`:e,{label:e,path:r}))}function jr({onOpen:e,error:t,recentRepos:n,discoveredFolder:r,discoveredRepos:i=[]}){let{sessions:a,focusingPid:o,focus:s}=Sr(),[c,l]=(0,x.useState)(``),[u,d]=(0,x.useState)(null),[f,p]=(0,x.useState)({}),[m,h]=(0,x.useState)(!1),[g,_]=(0,x.useState)(!1),[v,y]=(0,x.useState)(!1),[b,S]=(0,x.useState)([]),[C,w]=(0,x.useState)(0),T=(0,x.useCallback)(async(e,t)=>{e&&p(t=>({...t,[e]:{...t[e],expanded:!0,loading:!0,error:void 0}}));try{let n=await Ft(e);p(e=>({...e,[n.path]:{listing:n,expanded:!0,loading:!1,error:n.error}})),(!e||t?.makeRoot)&&d(n.path)}catch(t){let n=t instanceof Error?t.message:`Unable to read directory`;e&&p(t=>({...t,[e]:{...t[e],expanded:!0,loading:!1,error:n}}))}},[]);(0,x.useEffect)(()=>{T(void 0,{makeRoot:!0})},[T]),(0,x.useEffect)(()=>{if(!m){_(!1),y(!1);return}let e=kr(c);if(!e){S([]),_(!1),y(!1);return}let t=!1,n=window.setTimeout(()=>{y(!0),Ft(e.folder).then(n=>{if(t)return;let r=e.prefix.toLowerCase(),i=n.entries.filter(e=>r.length===0||e.name.toLowerCase().startsWith(r)).slice(0,Er);S(i),w(0),_(m&&i.length>0)}).catch(()=>{t||(S([]),_(!1))}).finally(()=>{t||y(!1)})},120);return()=>{t=!0,window.clearTimeout(n)}},[c,m]);function ee(t){t.preventDefault();let n=c.trim();n&&e(n)}function te(e){l(e.path),_(!1),w(0)}function ne(e){if(!g||b.length===0){e.key===`Escape`&&_(!1);return}if(e.key===`ArrowDown`){e.preventDefault(),w(e=>(e+1)%b.length);return}if(e.key===`ArrowUp`){e.preventDefault(),w(e=>(e-1+b.length)%b.length);return}if(e.key===`Tab`||e.key===`Enter`){e.preventDefault(),te(b[C]);return}e.key===`Escape`&&(e.preventDefault(),_(!1))}function re(e){let t=f[e.path];if(t?.expanded){p(n=>({...n,[e.path]:{...t,expanded:!1}}));return}if(t?.listing){p(n=>({...n,[e.path]:{...t,expanded:!0}}));return}T(e.path)}function ie(t,n){let r=f[t],i=r?.listing?.entries??[];return r?.error?(0,E.jsx)(`div`,{className:`repo-open-tree-empty`,style:{paddingLeft:34+n*18},children:r.error}):!r?.loading&&i.length===0?(0,E.jsx)(`div`,{className:`repo-open-tree-empty`,style:{paddingLeft:34+n*18},children:`No folders`}):i.map(t=>{let r=f[t.path],i=r?.expanded??!1,a=r?.loading??!1;return(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`div`,{className:`repo-open-tree-row${t.isGitRepo?` repo-open-tree-row-repo`:``}`,onClick:()=>l(t.path),onDoubleClick:()=>{t.isGitRepo&&e(t.path)},style:{paddingLeft:10+n*18},children:[(0,E.jsx)(`button`,{type:`button`,className:`repo-open-expand`,onClick:e=>{e.stopPropagation(),re(t)},"aria-label":i?`Collapse ${t.name}`:`Expand ${t.name}`,"aria-controls":`folder-${Or(t.path)}`,title:i?`Collapse`:`Expand`,children:a?`...`:i?`-`:`+`}),(0,E.jsx)(`span`,{className:`repo-open-folder-name`,children:t.name}),t.isGitRepo&&(0,E.jsx)(`span`,{className:`repo-open-repo-badge`,children:`repo`}),t.isGitRepo&&(0,E.jsx)(`button`,{type:`button`,className:`repo-open-row-action`,onClick:n=>{n.stopPropagation(),e(t.path)},children:`Open`})]}),i&&(0,E.jsx)(`div`,{id:`folder-${Or(t.path)}`,children:r?.loading?(0,E.jsx)(`div`,{className:`repo-open-tree-empty`,style:{paddingLeft:34+(n+1)*18},children:`Loading...`}):ie(t.path,n+1)})]},t.path)})}let ae=br(a.filter(e=>e.gitRoot!==null),e=>e.gitRoot),oe=u?f[u]?.listing:null,se=!u||f[u]?.loading,ce=m&&(v||g&&b.length>0);return(0,E.jsxs)(`div`,{className:`repo-open-page`,children:[(0,E.jsx)(`style`,{children:`
13
+ .repo-open-page {
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ height: 100%;
18
+ width: 100%;
19
+ background: #171820;
20
+ color: #d7dae5;
21
+ padding: 24px;
22
+ box-sizing: border-box;
23
+ }
24
+
25
+ .repo-open-stack {
26
+ width: min(1360px, 100%);
27
+ max-height: 100%;
28
+ display: flex;
29
+ flex-direction: column;
30
+ gap: 16px;
31
+ min-height: 0;
32
+ }
33
+
34
+ .repo-open-agents-card {
35
+ flex-shrink: 0;
36
+ max-height: 42%;
37
+ overflow: auto;
38
+ overscroll-behavior: contain;
39
+ background: linear-gradient(180deg, #262a3a 0%, #222430 100%);
40
+ border: 1px solid #4a5366;
41
+ border-radius: 8px;
42
+ box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
43
+ padding: 14px 16px 16px;
44
+ }
45
+
46
+ .repo-open-agents-brand {
47
+ display: flex;
48
+ justify-content: center;
49
+ margin-bottom: 8px;
50
+ }
51
+
52
+ .repo-open-agents-logo {
53
+ width: 34px;
54
+ height: 34px;
55
+ display: block;
56
+ }
57
+
58
+ .repo-open-agents-title {
59
+ color: #eef0f6;
60
+ font-size: 14px;
61
+ font-weight: 650;
62
+ margin-bottom: 10px;
63
+ }
64
+
65
+ .repo-open-agents-grid {
66
+ display: grid;
67
+ grid-template-columns: repeat(auto-fill, minmax(min(760px, 100%), 1fr));
68
+ gap: 8px;
69
+ }
70
+
71
+ .repo-open-shell {
72
+ flex: 1;
73
+ width: 100%;
74
+ min-height: 380px;
75
+ background: #222430;
76
+ border: 1px solid #343847;
77
+ border-radius: 8px;
78
+ box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
79
+ display: flex;
80
+ flex-direction: column;
81
+ overflow: hidden;
82
+ }
83
+
84
+ .repo-open-version {
85
+ flex-shrink: 0;
86
+ align-self: center;
87
+ color: #777d8e;
88
+ font-size: 12px;
89
+ line-height: 1;
90
+ }
91
+
92
+ .repo-open-header {
93
+ display: flex;
94
+ align-items: center;
95
+ justify-content: space-between;
96
+ gap: 16px;
97
+ padding: 18px 20px;
98
+ border-bottom: 1px solid #343847;
99
+ background: #1d1f29;
100
+ }
101
+
102
+ .repo-open-title {
103
+ margin: 0;
104
+ font-size: 18px;
105
+ line-height: 1.2;
106
+ font-weight: 650;
107
+ color: #eef0f6;
108
+ }
109
+
110
+ .repo-open-form {
111
+ display: flex;
112
+ align-items: center;
113
+ gap: 8px;
114
+ min-width: min(520px, 58%);
115
+ }
116
+
117
+ .repo-open-input-wrap {
118
+ position: relative;
119
+ flex: 1;
120
+ min-width: 0;
121
+ }
122
+
123
+ .repo-open-input {
124
+ flex: 1;
125
+ min-width: 0;
126
+ width: 100%;
127
+ height: 32px;
128
+ background: #171820;
129
+ border: 1px solid #3d4253;
130
+ border-radius: 5px;
131
+ color: #eef0f6;
132
+ font-size: 13px;
133
+ padding: 0 10px;
134
+ outline: none;
135
+ font-family: inherit;
136
+ }
137
+
138
+ .repo-open-input:focus {
139
+ border-color: #6ea8fe;
140
+ }
141
+
142
+ .repo-open-path-suggestions {
143
+ position: absolute;
144
+ z-index: 20;
145
+ top: calc(100% + 6px);
146
+ left: 0;
147
+ right: 0;
148
+ max-height: 238px;
149
+ overflow: auto;
150
+ overscroll-behavior: contain;
151
+ padding: 5px;
152
+ border: 1px solid #3d4253;
153
+ border-radius: 6px;
154
+ background: #171820;
155
+ box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
156
+ }
157
+
158
+ .repo-open-path-suggestion {
159
+ width: 100%;
160
+ min-width: 0;
161
+ min-height: 34px;
162
+ display: flex;
163
+ align-items: center;
164
+ gap: 8px;
165
+ padding: 6px 8px;
166
+ border: none;
167
+ border-radius: 4px;
168
+ background: transparent;
169
+ color: #d7dae5;
170
+ font: inherit;
171
+ text-align: left;
172
+ cursor: pointer;
173
+ }
174
+
175
+ .repo-open-path-suggestion-active,
176
+ .repo-open-path-suggestion:hover {
177
+ background: #2a2e3b;
178
+ }
179
+
180
+ .repo-open-path-suggestion-main {
181
+ flex: 1;
182
+ min-width: 0;
183
+ display: flex;
184
+ flex-direction: column;
185
+ gap: 2px;
186
+ }
187
+
188
+ .repo-open-path-suggestion-name,
189
+ .repo-open-path-suggestion-path {
190
+ max-width: 100%;
191
+ overflow: hidden;
192
+ text-overflow: ellipsis;
193
+ white-space: nowrap;
194
+ }
195
+
196
+ .repo-open-path-suggestion-name {
197
+ color: #eef0f6;
198
+ font-size: 13px;
199
+ font-weight: 650;
200
+ }
201
+
202
+ .repo-open-path-suggestion-path {
203
+ color: #8f96a8;
204
+ font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
205
+ }
206
+
207
+ .repo-open-path-suggestions-loading {
208
+ min-height: 30px;
209
+ display: flex;
210
+ align-items: center;
211
+ padding: 0 8px;
212
+ color: #8f96a8;
213
+ font-size: 12px;
214
+ }
215
+
216
+ .repo-open-button,
217
+ .repo-open-row-action,
218
+ .repo-open-root-action,
219
+ .repo-open-root-nav {
220
+ border: 1px solid #4a5366;
221
+ border-radius: 5px;
222
+ background: #2b3140;
223
+ color: #f1f3f8;
224
+ font: inherit;
225
+ font-size: 12px;
226
+ cursor: pointer;
227
+ }
228
+
229
+ .repo-open-button {
230
+ height: 32px;
231
+ padding: 0 14px;
232
+ font-weight: 650;
233
+ }
234
+
235
+ .repo-open-button:disabled {
236
+ cursor: default;
237
+ color: #777d8e;
238
+ background: #242733;
239
+ border-color: #343847;
240
+ }
241
+
242
+ .repo-open-body {
243
+ flex: 1;
244
+ min-height: 0;
245
+ display: grid;
246
+ grid-template-columns: minmax(0, 1fr) 460px;
247
+ }
248
+
249
+ .repo-open-explorer {
250
+ min-width: 0;
251
+ min-height: 0;
252
+ display: flex;
253
+ flex-direction: column;
254
+ overflow: hidden;
255
+ border-right: 1px solid #343847;
256
+ }
257
+
258
+ .repo-open-explorer-head {
259
+ display: flex;
260
+ align-items: center;
261
+ gap: 8px;
262
+ min-height: 44px;
263
+ padding: 0 12px;
264
+ border-bottom: 1px solid #343847;
265
+ background: #20232d;
266
+ }
267
+
268
+ .repo-open-root-nav {
269
+ width: 30px;
270
+ height: 26px;
271
+ padding: 0;
272
+ }
273
+
274
+ .repo-open-root-nav:disabled {
275
+ cursor: default;
276
+ color: #5f6575;
277
+ border-color: #343847;
278
+ background: #222430;
279
+ }
280
+
281
+ .repo-open-root-path {
282
+ flex: 1;
283
+ min-width: 0;
284
+ display: flex;
285
+ align-items: center;
286
+ gap: 2px;
287
+ overflow: auto hidden;
288
+ scrollbar-width: none;
289
+ white-space: nowrap;
290
+ font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
291
+ color: #aeb5c6;
292
+ }
293
+
294
+ .repo-open-root-path::-webkit-scrollbar {
295
+ display: none;
296
+ }
297
+
298
+ .repo-open-root-crumb {
299
+ flex: 0 0 auto;
300
+ max-width: 160px;
301
+ overflow: hidden;
302
+ text-overflow: ellipsis;
303
+ white-space: nowrap;
304
+ border: 1px solid transparent;
305
+ border-radius: 4px;
306
+ background: transparent;
307
+ color: #aeb5c6;
308
+ font: inherit;
309
+ padding: 3px 5px;
310
+ cursor: pointer;
311
+ }
312
+
313
+ .repo-open-root-crumb:hover {
314
+ border-color: #3d4253;
315
+ background: #2a2e3b;
316
+ color: #eef0f6;
317
+ }
318
+
319
+ .repo-open-root-separator {
320
+ flex: 0 0 auto;
321
+ color: #596072;
322
+ font-size: 11px;
323
+ }
324
+
325
+ .repo-open-root-action {
326
+ height: 26px;
327
+ padding: 0 10px;
328
+ color: #b7f0c0;
329
+ border-color: #3f7350;
330
+ background: #213229;
331
+ }
332
+
333
+ .repo-open-tree {
334
+ flex: 1;
335
+ min-width: 0;
336
+ min-height: 0;
337
+ overflow: auto;
338
+ overscroll-behavior: contain;
339
+ padding: 8px 0;
340
+ }
341
+
342
+ .repo-open-tree-row {
343
+ display: flex;
344
+ align-items: center;
345
+ gap: 8px;
346
+ min-height: 30px;
347
+ padding-top: 0;
348
+ padding-right: 10px;
349
+ padding-bottom: 0;
350
+ color: #c7ccd8;
351
+ cursor: default;
352
+ box-sizing: border-box;
353
+ }
354
+
355
+ .repo-open-tree-row:hover {
356
+ background: #2a2e3b;
357
+ }
358
+
359
+ .repo-open-tree-row-repo {
360
+ color: #eef0f6;
361
+ }
362
+
363
+ .repo-open-expand {
364
+ width: 20px;
365
+ height: 20px;
366
+ flex: 0 0 20px;
367
+ display: inline-flex;
368
+ align-items: center;
369
+ justify-content: center;
370
+ border: 1px solid transparent;
371
+ border-radius: 4px;
372
+ background: transparent;
373
+ color: #8f96a8;
374
+ font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
375
+ cursor: pointer;
376
+ }
377
+
378
+ .repo-open-expand:hover {
379
+ border-color: #3d4253;
380
+ background: #20232d;
381
+ color: #d7dae5;
382
+ }
383
+
384
+ .repo-open-folder-name {
385
+ flex: 1;
386
+ min-width: 0;
387
+ overflow: hidden;
388
+ text-overflow: ellipsis;
389
+ white-space: nowrap;
390
+ font-size: 13px;
391
+ }
392
+
393
+ .repo-open-repo-badge {
394
+ flex: 0 0 auto;
395
+ border: 1px solid #3f7350;
396
+ border-radius: 4px;
397
+ padding: 2px 6px;
398
+ color: #b7f0c0;
399
+ background: #213229;
400
+ font-size: 11px;
401
+ line-height: 1;
402
+ }
403
+
404
+ .repo-open-row-action {
405
+ height: 24px;
406
+ padding: 0 9px;
407
+ color: #eef0f6;
408
+ }
409
+
410
+ .repo-open-tree-empty {
411
+ min-height: 28px;
412
+ display: flex;
413
+ align-items: center;
414
+ color: #777d8e;
415
+ font-size: 12px;
416
+ box-sizing: border-box;
417
+ }
418
+
419
+ .repo-open-side {
420
+ min-width: 0;
421
+ min-height: 0;
422
+ display: flex;
423
+ flex-direction: column;
424
+ gap: 18px;
425
+ padding: 16px;
426
+ overflow: auto;
427
+ }
428
+
429
+ .repo-open-section {
430
+ display: flex;
431
+ flex-direction: column;
432
+ gap: 8px;
433
+ }
434
+
435
+ .repo-open-section-title {
436
+ color: #8f96a8;
437
+ font-size: 12px;
438
+ font-weight: 650;
439
+ }
440
+
441
+ .repo-open-list {
442
+ display: flex;
443
+ flex-direction: column;
444
+ gap: 6px;
445
+ }
446
+
447
+ .repo-open-list-button {
448
+ display: flex;
449
+ flex-direction: column;
450
+ align-items: flex-start;
451
+ gap: 3px;
452
+ min-width: 0;
453
+ border: 1px solid #343847;
454
+ border-radius: 6px;
455
+ background: #1d1f29;
456
+ color: #d7dae5;
457
+ cursor: pointer;
458
+ padding: 9px 10px;
459
+ text-align: left;
460
+ font: inherit;
461
+ }
462
+
463
+ .repo-open-list-button:hover {
464
+ border-color: #4a5366;
465
+ background: #242835;
466
+ }
467
+
468
+ .repo-open-list-name {
469
+ max-width: 100%;
470
+ overflow: hidden;
471
+ text-overflow: ellipsis;
472
+ white-space: nowrap;
473
+ font-size: 13px;
474
+ font-weight: 650;
475
+ }
476
+
477
+ .repo-open-list-path,
478
+ .repo-open-folder-caption {
479
+ max-width: 100%;
480
+ overflow: hidden;
481
+ text-overflow: ellipsis;
482
+ white-space: nowrap;
483
+ font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
484
+ color: #8f96a8;
485
+ }
486
+
487
+ .repo-open-claude-row {
488
+ position: relative;
489
+ padding-right: 62px;
490
+ }
491
+
492
+ .repo-open-agent-name {
493
+ display: inline-flex;
494
+ align-items: center;
495
+ gap: 7px;
496
+ }
497
+
498
+ .repo-open-claude-chips {
499
+ display: flex;
500
+ flex-wrap: wrap;
501
+ gap: 5px;
502
+ margin-top: 3px;
503
+ min-width: 0;
504
+ max-width: 100%;
505
+ align-self: stretch;
506
+ }
507
+
508
+ .repo-open-claude-chip {
509
+ border: 1px solid #3d4253;
510
+ border-radius: 4px;
511
+ background: #20232d;
512
+ color: #aeb5c6;
513
+ padding: 3px 8px;
514
+ font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
515
+ cursor: pointer;
516
+ flex: 1 1 80%;
517
+ min-width: 0;
518
+ max-width: 80%;
519
+ overflow: hidden;
520
+ text-overflow: ellipsis;
521
+ white-space: nowrap;
522
+ text-align: left;
523
+ }
524
+
525
+ .repo-open-claude-chip:hover:not(:disabled) {
526
+ border-color: #6ea8fe;
527
+ color: #eef0f6;
528
+ background: #262c3c;
529
+ }
530
+
531
+ .repo-open-claude-chip-busy {
532
+ border-color: #d8b45a;
533
+ color: #ecd08a;
534
+ animation: repo-open-chip-pulse 1.2s ease-in-out infinite;
535
+ }
536
+
537
+ @keyframes repo-open-chip-pulse {
538
+ 50% { opacity: 0.55; }
539
+ }
540
+
541
+ .repo-open-claude-chip:disabled {
542
+ cursor: default;
543
+ color: #5f6575;
544
+ border-color: #2c2f3b;
545
+ }
546
+
547
+ .repo-open-claude-open {
548
+ position: absolute;
549
+ top: 50%;
550
+ right: 10px;
551
+ transform: translateY(-50%);
552
+ height: 24px;
553
+ }
554
+
555
+ .repo-open-error {
556
+ margin: 0;
557
+ color: #ff9ca8;
558
+ font-size: 12px;
559
+ line-height: 1.4;
560
+ }
561
+
562
+ @media (max-width: 760px) {
563
+ .repo-open-page {
564
+ padding: 12px;
565
+ }
566
+
567
+ .repo-open-shell {
568
+ height: 100%;
569
+ min-height: 0;
570
+ }
571
+
572
+ .repo-open-header {
573
+ align-items: stretch;
574
+ flex-direction: column;
575
+ }
576
+
577
+ .repo-open-form {
578
+ min-width: 0;
579
+ width: 100%;
580
+ }
581
+
582
+ .repo-open-body {
583
+ grid-template-columns: 1fr;
584
+ }
585
+
586
+ .repo-open-explorer {
587
+ min-height: 340px;
588
+ border-right: none;
589
+ border-bottom: 1px solid #343847;
590
+ }
591
+
592
+ .repo-open-agents-grid {
593
+ grid-template-columns: 1fr;
594
+ }
595
+ }
596
+ `}),(0,E.jsxs)(`div`,{className:`repo-open-stack`,children:[ae.length>0&&(0,E.jsxs)(`section`,{className:`repo-open-agents-card`,children:[(0,E.jsx)(`div`,{className:`repo-open-agents-brand`,children:(0,E.jsx)(`img`,{className:`repo-open-agents-logo`,src:`/press-kit/ingit-icon-mark-light.svg`,alt:`ingit`})}),(0,E.jsx)(`div`,{className:`repo-open-agents-title`,children:`Running agent sessions`}),(0,E.jsx)(`div`,{className:`repo-open-agents-grid`,children:ae.map(t=>(0,E.jsxs)(`div`,{className:`repo-open-list-button repo-open-claude-row`,children:[(0,E.jsxs)(`span`,{className:`repo-open-list-name repo-open-agent-name`,children:[[...new Set(t.sessions.map(e=>e.agent))].map(e=>(0,E.jsx)(Tr,{agent:e,size:15,busy:t.sessions.some(t=>t.agent===e&&t.busy)},e)),Dr(t.cwd)]}),(0,E.jsx)(`span`,{className:`repo-open-list-path`,children:t.cwd}),(0,E.jsx)(`span`,{className:`repo-open-claude-chips`,children:t.sessions.map(e=>(0,E.jsx)(`button`,{type:`button`,className:`repo-open-claude-chip${e.busy?` repo-open-claude-chip-busy`:``}`,disabled:!e.focusable||o!==null,title:e.focusable?`Focus this session's window — ${xr(e)} (pid ${e.pid})`:`${xr(e)} (pid ${e.pid}) — window focus unavailable for this session`,onClick:()=>void s(e),children:o===e.pid?`focusing…`:`${e.title??`${e.agent===`codex`?`codex `:``}${xr(e)}`}${e.count>1?` ×${e.count}`:``}`},`${e.pid}:${e.cwd}`))}),(0,E.jsx)(`button`,{type:`button`,className:`repo-open-row-action repo-open-claude-open`,onClick:()=>e(t.cwd),children:`Open`})]},t.cwd))})]}),(0,E.jsxs)(`div`,{className:`repo-open-shell`,children:[(0,E.jsxs)(`div`,{className:`repo-open-header`,children:[(0,E.jsx)(`h1`,{className:`repo-open-title`,children:`Open repository`}),(0,E.jsxs)(`form`,{onSubmit:ee,className:`repo-open-form`,children:[(0,E.jsxs)(`div`,{className:`repo-open-input-wrap`,children:[(0,E.jsx)(`input`,{type:`text`,value:c,onChange:e=>l(e.target.value),onFocus:()=>{h(!0),b.length>0&&_(!0)},onBlur:()=>{h(!1),_(!1)},onKeyDown:ne,placeholder:`/home/user/my-project`,className:`repo-open-input`,autoComplete:`off`,role:`combobox`,"aria-expanded":ce,"aria-controls":`repo-open-path-suggestions`,"aria-autocomplete":`list`}),ce&&(0,E.jsx)(`div`,{id:`repo-open-path-suggestions`,className:`repo-open-path-suggestions`,role:`listbox`,children:v&&b.length===0?(0,E.jsx)(`div`,{className:`repo-open-path-suggestions-loading`,children:`Loading...`}):b.map((e,t)=>(0,E.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t===C,className:`repo-open-path-suggestion${t===C?` repo-open-path-suggestion-active`:``}`,onMouseEnter:()=>w(t),onMouseDown:t=>{t.preventDefault(),te(e)},children:[(0,E.jsxs)(`span`,{className:`repo-open-path-suggestion-main`,children:[(0,E.jsx)(`span`,{className:`repo-open-path-suggestion-name`,children:e.name}),(0,E.jsx)(`span`,{className:`repo-open-path-suggestion-path`,children:e.path})]}),e.isGitRepo&&(0,E.jsx)(`span`,{className:`repo-open-repo-badge`,children:`repo`})]},e.path))})]}),(0,E.jsx)(`button`,{type:`submit`,disabled:!c.trim(),className:`repo-open-button`,children:`Open`})]})]}),(0,E.jsxs)(`div`,{className:`repo-open-body`,children:[(0,E.jsxs)(`section`,{className:`repo-open-explorer`,"aria-label":`Folder tree`,children:[(0,E.jsxs)(`div`,{className:`repo-open-explorer-head`,children:[(0,E.jsx)(`button`,{type:`button`,className:`repo-open-root-nav`,disabled:!oe?.parentPath,onClick:()=>{oe?.parentPath&&T(oe.parentPath,{makeRoot:!0})},title:`Parent folder`,"aria-label":`Parent folder`,children:`..`}),(0,E.jsx)(`div`,{className:`repo-open-root-path`,children:oe?Ar(oe.path).map((e,t,n)=>(0,E.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,minWidth:0},children:[t>0&&!/^(\/|[A-Za-z]:[\\/])$/.test(n[t-1].label)&&(0,E.jsx)(`span`,{className:`repo-open-root-separator`,children:`/`}),(0,E.jsx)(`button`,{type:`button`,className:`repo-open-root-crumb`,onClick:()=>void T(e.path,{makeRoot:!0}),title:e.path,children:e.label})]},e.path)):`Loading...`}),oe?.isGitRepo&&(0,E.jsx)(`button`,{type:`button`,className:`repo-open-root-action`,onClick:()=>e(oe.path),children:`Open`})]}),(0,E.jsxs)(`div`,{className:`repo-open-tree`,children:[se&&(0,E.jsx)(`div`,{className:`repo-open-tree-empty`,style:{paddingLeft:16},children:`Loading...`}),u&&!se&&ie(u,0)]})]}),(0,E.jsxs)(`aside`,{className:`repo-open-side`,children:[t&&(0,E.jsx)(`p`,{className:`repo-open-error`,children:t}),n.length>0&&(0,E.jsxs)(`section`,{className:`repo-open-section`,children:[(0,E.jsx)(`div`,{className:`repo-open-section-title`,children:`Recent repositories`}),(0,E.jsx)(`div`,{className:`repo-open-list`,children:n.map(t=>(0,E.jsxs)(`button`,{type:`button`,onClick:()=>e(t),className:`repo-open-list-button`,children:[(0,E.jsx)(`span`,{className:`repo-open-list-name`,children:Dr(t)}),(0,E.jsx)(`span`,{className:`repo-open-list-path`,children:t})]},t))})]}),i.length>0&&(0,E.jsxs)(`section`,{className:`repo-open-section`,children:[(0,E.jsx)(`div`,{className:`repo-open-section-title`,children:`Repositories`}),r&&(0,E.jsx)(`div`,{className:`repo-open-folder-caption`,children:r}),(0,E.jsx)(`div`,{className:`repo-open-list`,children:i.map(t=>(0,E.jsxs)(`button`,{type:`button`,onClick:()=>e(t),className:`repo-open-list-button`,children:[(0,E.jsx)(`span`,{className:`repo-open-list-name`,children:Dr(t)}),(0,E.jsx)(`span`,{className:`repo-open-list-path`,children:t})]},t))})]})]})]})]}),(0,E.jsxs)(`div`,{className:`repo-open-version`,children:[`v`,`0.1.7`]})]})]})}var Mr={head:`Branches`,remote:`Remotes`,tag:`Tags`},Nr=[`head`,`remote`,`tag`];function Pr({refs:e,onSelectRef:t,selectedSha:n,showGutterColors:r,onShowGutterColorsChange:i,onClose:a}){let[o,s]=(0,x.useState)({head:!0,remote:!0,tag:!0}),[c,l]=(0,x.useState)(``),u=c.toLowerCase(),d={head:[],remote:[],tag:[]};for(let t of e)u&&!t.shortName.toLowerCase().includes(u)||d[t.kind].push(t);function f(e){s(t=>({...t,[e]:!t[e]}))}return(0,E.jsxs)(`div`,{style:{width:250,flexShrink:0,height:`100%`,background:`#181825`,borderRight:`1px solid #313244`,display:`flex`,flexDirection:`column`,overflowY:`auto`,userSelect:`none`},children:[(0,E.jsxs)(`div`,{style:{padding:`8px 14px`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,color:`#6c7086`,textTransform:`uppercase`,borderBottom:`1px solid #313244`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[`Refs`,(0,E.jsx)(`button`,{onClick:a,title:`Hide refs`,style:{background:`none`,border:`none`,color:`#6c7086`,cursor:`pointer`,fontSize:14,padding:`0 2px`,lineHeight:1},children:`✕`})]}),(0,E.jsx)(`div`,{style:{padding:`6px 10px`,borderBottom:`1px solid #313244`},children:(0,E.jsx)(`input`,{type:`text`,value:c,onChange:e=>l(e.target.value),placeholder:`Filter branches...`,style:{width:`100%`,background:`#1e1e2e`,border:`1px solid #45475a`,borderRadius:4,color:`#cdd6f4`,fontSize:12,padding:`5px 8px`,outline:`none`,fontFamily:`inherit`},onFocus:e=>{e.currentTarget.style.borderColor=`#89b4fa`},onBlur:e=>{e.currentTarget.style.borderColor=`#45475a`}})}),(0,E.jsxs)(`label`,{title:`Give each graph gutter a distinct background color`,style:{display:`flex`,alignItems:`center`,gap:8,padding:`8px 14px`,borderBottom:`1px solid #313244`,color:r?`#cdd6f4`:`#a6adc8`,fontSize:12,cursor:`pointer`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>i(e.target.checked),style:{margin:0,accentColor:`#89b4fa`,cursor:`pointer`}}),`Color-code gutters`]}),Nr.map(e=>{let r=d[e];if(r.length===0)return null;let i=c?!1:o[e];return(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`button`,{onClick:()=>f(e),style:{width:`100%`,display:`flex`,alignItems:`center`,gap:6,padding:`6px 14px`,background:`none`,border:`none`,color:`#a6adc8`,fontSize:12,fontWeight:600,cursor:`pointer`,textAlign:`left`,fontFamily:`inherit`},children:[(0,E.jsx)(`span`,{style:{display:`inline-block`,transform:i?`rotate(-90deg)`:`rotate(0deg)`,transition:`transform 0.15s`,fontSize:10,lineHeight:1},children:`▼`}),Mr[e],(0,E.jsx)(`span`,{style:{marginLeft:`auto`,background:`#313244`,borderRadius:8,padding:`1px 6px`,fontSize:10,color:`#6c7086`,fontWeight:500},children:r.length})]}),!i&&(0,E.jsx)(`div`,{children:r.map(e=>{let r=e.targetSha===n;return(0,E.jsxs)(`button`,{onClick:()=>t(e),title:e.name,style:{width:`100%`,display:`flex`,alignItems:`center`,gap:8,padding:`5px 14px 5px 28px`,background:r?`#313244`:`none`,border:`none`,color:r?`#89b4fa`:`#cdd6f4`,fontSize:13,fontWeight:e.isCurrent?700:`normal`,cursor:`pointer`,textAlign:`left`,fontFamily:`inherit`,overflow:`hidden`},children:[(0,E.jsx)(Fr,{kind:e.kind,isCurrent:e.isCurrent}),(0,E.jsx)(`span`,{style:{flex:1,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.shortName}),(e.ahead!=null||e.behind!=null)&&(0,E.jsxs)(`span`,{style:{display:`flex`,gap:4,flexShrink:0,fontSize:11},children:[e.ahead!=null&&e.ahead>0&&(0,E.jsxs)(`span`,{style:{color:`#a6e3a1`},children:[`↑`,e.ahead]}),e.behind!=null&&e.behind>0&&(0,E.jsxs)(`span`,{style:{color:`#f38ba8`},children:[`↓`,e.behind]})]})]},e.name)})})]},e)})]})}function Fr({kind:e,isCurrent:t}){let n={flexShrink:0,fontSize:11,width:14,textAlign:`center`};return e===`head`?(0,E.jsx)(`span`,{style:{...n,color:t?`#a6e3a1`:`#89b4fa`},children:t?`●`:`⎇`}):e===`remote`?(0,E.jsx)(`span`,{style:{...n,color:`#94e2d5`},children:`◉`}):(0,E.jsx)(`span`,{style:{...n,color:`#f9e2af`},children:`◆`})}var Ir=Object.defineProperty,Lr=(e,t)=>{let n={};for(var r in e)Ir(n,r,{get:e[r],enumerable:!0});return t||Ir(n,Symbol.toStringTag,{value:`Module`}),n},Rr=ei(),z=e=>Yr(e,Rr),zr=ei();z.write=e=>Yr(e,zr);var Br=ei();z.onStart=e=>Yr(e,Br);var Vr=ei();z.onFrame=e=>Yr(e,Vr);var Hr=ei();z.onFinish=e=>Yr(e,Hr);var Ur=[];z.setTimeout=(e,t)=>{let n=z.now()+t,r=()=>{let e=Ur.findIndex(e=>e.cancel==r);~e&&Ur.splice(e,1),qr-=+!!~e},i={time:n,handler:e,cancel:r};return Ur.splice(Wr(n),0,i),qr+=1,Xr(),i};var Wr=e=>~(~Ur.findIndex(t=>t.time>e)||~Ur.length);z.cancel=e=>{Br.delete(e),Vr.delete(e),Hr.delete(e),Rr.delete(e),zr.delete(e)},z.sync=e=>{Jr=!0,z.batchedUpdates(e),Jr=!1},z.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,z.onStart(n)}return r.handler=e,r.cancel=()=>{Br.delete(n),t=null},r};var Gr=typeof window<`u`?window.requestAnimationFrame:()=>{};z.use=e=>Gr=e,z.now=typeof performance<`u`?()=>performance.now():Date.now,z.batchedUpdates=e=>e(),z.catch=console.error,z.frameLoop=`always`,z.onDemand=()=>{},z.advance=()=>{z.frameLoop===`demand`?$r():console.warn(`Cannot call the manual advancement of rafz whilst frameLoop is not set as demand`)};var Kr=-1,qr=0,Jr=!1;function Yr(e,t){Jr?(t.delete(e),e(0)):(t.add(e),Xr(),z.frameLoop===`demand`&&z.onDemand())}function Xr(){Kr<0&&(Kr=0,z.frameLoop!==`demand`&&Gr(Qr))}function Zr(){Kr=-1}function Qr(){~Kr&&(Gr(Qr),z.batchedUpdates($r))}function $r(){let e=Kr;Kr=z.now();let t=Wr(Kr);if(t&&(ti(Ur.splice(0,t),e=>e.handler()),qr-=t),!qr){Zr();return}Br.flush(),Rr.flush(e?Math.min(64,Kr-e):16.667),Vr.flush(),zr.flush(),Hr.flush(),z.frameLoop===`demand`&&qr>0&&z.onDemand()}function ei(){let e=new Set,t=e;return{add(n){qr+=+(t==e&&!e.has(n)),e.add(n)},delete(n){return qr-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,qr-=t.size,ti(t,t=>t(n)&&e.add(t)),qr+=e.size,t=e)}}}function ti(e,t){e.forEach(e=>{try{t(e)}catch(e){z.catch(e)}})}function ni(){}var ri=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),B={arr:Array.isArray,obj:e=>!!e&&e.constructor.name===`Object`,fun:(e=>typeof e==`function`),str:e=>typeof e==`string`,num:e=>typeof e==`number`,und:e=>e===void 0};function ii(e,t){if(B.arr(e)){if(!B.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var V=(e,t)=>e.forEach(t);function ai(e,t,n){if(B.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var oi=e=>B.und(e)?[]:B.arr(e)?e:[e];function si(e,t){if(e.size){let n=Array.from(e);e.clear(),V(n,t)}}var ci=(e,...t)=>si(e,e=>e(...t)),li=()=>typeof window>`u`||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),ui=Lr({assign:()=>gi,colors:()=>pi,createStringInterpolator:()=>di,skipAnimation:()=>mi,to:()=>fi,willAdvance:()=>hi}),di,fi,pi=null,mi=!1,hi=ni,gi=e=>{e.to&&(fi=e.to),e.now&&(z.now=e.now),e.colors!==void 0&&(pi=e.colors),e.skipAnimation!=null&&(mi=e.skipAnimation),e.createStringInterpolator&&(di=e.createStringInterpolator),e.requestAnimationFrame&&z.use(e.requestAnimationFrame),e.batchedUpdates&&(z.batchedUpdates=e.batchedUpdates),e.willAdvance&&(hi=e.willAdvance),e.frameLoop&&(z.frameLoop=e.frameLoop),e.onDemand&&(z.onDemand=e.onDemand)},_i=new Set,vi=[],yi=[],bi=0,xi={get idle(){return!_i.size&&!vi.length},start(e){bi>e.priority?(_i.add(e),z.onStart(Si)):(Ci(e),z(Ti))},advance:Ti,sort(e){if(bi)z.onFrame(()=>xi.sort(e));else{let t=vi.indexOf(e);~t&&(vi.splice(t,1),wi(e))}},clear(){vi=[],_i.clear()}};function Si(){_i.forEach(Ci),_i.clear(),z(Ti)}function Ci(e){vi.includes(e)||wi(e)}function wi(e){vi.splice(Ei(vi,t=>t.priority>e.priority),0,e)}function Ti(e){let t=yi;for(let n=0;n<vi.length;n++){let r=vi[n];bi=r.priority,r.idle||(hi(r),r.advance(e),r.idle||t.push(r))}return bi=0,yi=vi,yi.length=0,vi=t,vi.length>0}function Ei(e,t){let n=e.findIndex(t);return n<0?e.length:n}var Di=(e,t,n)=>Math.min(Math.max(n,e),t),Oi={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},ki=`[-+]?\\d*\\.?\\d+`,Ai=`[-+]?\\d*\\.?\\d+%`;function ji(...e){return`\\(\\s*(`+e.join(`)\\s*,\\s*(`)+`)\\s*\\)`}var H=RegExp(`rgb`+ji(ki,ki,ki)),Mi=RegExp(`rgba`+ji(ki,ki,ki,ki)),Ni=RegExp(`hsl`+ji(ki,Ai,Ai)),Pi=RegExp(`hsla`+ji(ki,Ai,Ai,ki)),Fi=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ii=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Li=/^#([0-9a-fA-F]{6})$/,Ri=/^#([0-9a-fA-F]{8})$/;function zi(e){let t;return typeof e==`number`?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Li.exec(e))?parseInt(t[1]+`ff`,16)>>>0:pi&&pi[e]!==void 0?pi[e]:(t=H.exec(e))?(Hi(t[1])<<24|Hi(t[2])<<16|Hi(t[3])<<8|255)>>>0:(t=Mi.exec(e))?(Hi(t[1])<<24|Hi(t[2])<<16|Hi(t[3])<<8|Wi(t[4]))>>>0:(t=Fi.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+`ff`,16)>>>0:(t=Ri.exec(e))?parseInt(t[1],16)>>>0:(t=Ii.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Ni.exec(e))?(Vi(Ui(t[1]),Gi(t[2]),Gi(t[3]))|255)>>>0:(t=Pi.exec(e))?(Vi(Ui(t[1]),Gi(t[2]),Gi(t[3]))|Wi(t[4]))>>>0:null}function Bi(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Vi(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=Bi(i,r,e+1/3),o=Bi(i,r,e),s=Bi(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function Hi(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function Ui(e){return(parseFloat(e)%360+360)%360/360}function Wi(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Gi(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Ki(e){let t=zi(e);return t===null?e:(t||=0,`rgba(${(t&4278190080)>>>24}, ${(t&16711680)>>>16}, ${(t&65280)>>>8}, ${(t&255)/255})`)}var qi=(e,t,n)=>{if(B.fun(e))return e;if(B.arr(e))return qi({range:e,output:t,extrapolate:n});if(B.str(e.output[0]))return di(e);let r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||`extend`,s=r.extrapolateRight||r.extrapolate||`extend`,c=r.easing||(e=>e);return e=>{let t=Yi(e,a);return Ji(e,a[t],a[t+1],i[t],i[t+1],c,o,s,r.map)}};function Ji(e,t,n,r,i,a,o,s,c){let l=c?c(e):e;if(l<t){if(o===`identity`)return l;o===`clamp`&&(l=t)}if(l>n){if(s===`identity`)return l;s===`clamp`&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function Yi(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Xi=(e,t=`end`)=>n=>{n=t===`end`?Math.min(n,.999):Math.max(n,.001);let r=n*e;return Di(0,1,(t===`end`?Math.floor(r):Math.ceil(r))/e)},Zi=1.70158,Qi=Zi*1.525,$i=2.70158,ea=2*Math.PI/3,ta=2*Math.PI/4.5,na=e=>{let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},ra={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-(-2*e+2)**2/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-(1-e)**3,easeInOutCubic:e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-(1-e)**4,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-(-2*e+2)**4/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-(1-e)**5,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-(-2*e+2)**5/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:2**(10*e-10),easeOutExpo:e=>e===1?1:1-2**(-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-e**2),easeOutCirc:e=>Math.sqrt(1-(e-1)**2),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-(2*e)**2))/2:(Math.sqrt(1-(-2*e+2)**2)+1)/2,easeInBack:e=>$i*e*e*e-Zi*e*e,easeOutBack:e=>1+$i*(e-1)**3+Zi*(e-1)**2,easeInOutBack:e=>e<.5?(2*e)**2*(3.5949095*2*e-Qi)/2:((2*e-2)**2*(3.5949095*(e*2-2)+Qi)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-(2**(10*e-10))*Math.sin((e*10-10.75)*ea),easeOutElastic:e=>e===0?0:e===1?1:2**(-10*e)*Math.sin((e*10-.75)*ea)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(2**(20*e-10)*Math.sin((20*e-11.125)*ta))/2:2**(-20*e+10)*Math.sin((20*e-11.125)*ta)/2+1,easeInBounce:e=>1-na(1-e),easeOutBounce:na,easeInOutBounce:e=>e<.5?(1-na(1-2*e))/2:(1+na(2*e-1))/2,steps:Xi},ia=Symbol.for(`FluidValue.get`),aa=Symbol.for(`FluidValue.observers`),oa=e=>!!(e&&e[ia]),sa=e=>e&&e[ia]?e[ia]():e,ca=e=>e[aa]||null;function la(e,t){e.eventObserved?e.eventObserved(t):e(t)}function ua(e,t){let n=e[aa];n&&n.forEach(e=>{la(e,t)})}var da=class{constructor(e){if(!e&&!(e=this.get))throw Error(`Unknown getter`);fa(this,e)}},fa=(e,t)=>ha(e,ia,t);function pa(e,t){if(e[ia]){let n=e[aa];n||ha(e,aa,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function ma(e,t){let n=e[aa];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[aa]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var ha=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ga=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_a=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,va=RegExp(`(${ga.source})(%|[a-z]+)`,`i`),ya=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ba=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,xa=e=>{let[t,n]=Sa(e);if(!t||li())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);return r?r.trim():n&&n.startsWith(`--`)?window.getComputedStyle(document.documentElement).getPropertyValue(n)||e:n&&ba.test(n)?xa(n):n||e},Sa=e=>{let t=ba.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},Ca,wa=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,Ta=e=>e.match(ga)??[],Ea=e=>{Ca||=pi?RegExp(`(${Object.keys(pi).join(`|`)})(?!\\w)`,`g`):/^\b$/;let t=e.output.map(e=>sa(e).replace(ba,xa).replace(_a,Ki).replace(Ca,Ki)),n=t.map(e=>Ta(e).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error(`The arity of each "output" value must be equal`);return e[t]})).map(t=>qi({...e,output:t})),i=e.range||[0,1],a=t.map(e=>Ta(e)),o=a[0].map((e,t)=>{let n=a.map(e=>{let n=e[t],r=n.indexOf(`.`);return r===-1?0:n.length-r-1});return n.every(e=>e===n[0])&&n[0]>0?n[0]:null});return e=>{let n=i.indexOf(e);if(n!==-1)return t[n];let a=!va.test(t[0])&&t.find(e=>va.test(e))?.replace(ga,``),s=0;return t[0].replace(ga,()=>{let t=s++,n=r[t](e),i=o[t];return`${i==null?n:n.toFixed(i)}${a||``}`}).replace(ya,wa)}},Da=`react-spring: `,Oa=e=>{let t=e,n=!1;if(typeof t!=`function`)throw TypeError(`${Da}once requires a function parameter`);return(...e)=>{n||=(t(...e),!0)}},ka=Oa(console.warn);function Aa(){ka(`${Da}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var ja=Oa(console.warn);function Ma(){ja(`${Da}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Na(e){return B.str(e)&&(e[0]==`#`||/\d/.test(e)||!li()&&ba.test(e)||e in(pi||{}))}var Pa=li()?x.useEffect:x.useLayoutEffect,Fa=()=>{let e=(0,x.useRef)(!1);return Pa(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Ia(){let e=(0,x.useState)()[1],t=Fa();return()=>{t.current&&e(Math.random())}}var La=e=>(0,x.useEffect)(e,Ra),Ra=[];function za(e){let t=(0,x.useRef)(void 0);return(0,x.useEffect)(()=>{t.current=e}),t.current}var Ba=Symbol.for(`Animated:node`),Va=e=>!!e&&e[Ba]===e,Ha=e=>e&&e[Ba],Ua=(e,t)=>ri(e,Ba,t),Wa=e=>e&&e[Ba]&&e[Ba].getPayload(),Ga=class{constructor(){Ua(this,this)}getPayload(){return this.payload||[]}},Ka=class e extends Ga{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,B.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return B.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,B.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},qa=class e extends Ka{constructor(e){super(0),this._string=null,this._toString=qi({output:[e,e]})}static create(t){return new e(t)}getValue(){return this._string??=this._toString(this._value)}setValue(e){if(B.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=qi({output:[this.getValue(),e]})),this._value=0,super.reset()}},Ja={dependencies:null},Ya=class extends Ga{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return ai(this.source,(n,r)=>{Va(n)?t[r]=n.getValue(e):oa(n)?t[r]=sa(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&V(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return ai(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ja.dependencies&&oa(e)&&Ja.dependencies.add(e);let t=Wa(e);t&&V(t,e=>this.add(e))}},Xa=class e extends Ya{constructor(e){super(e)}static create(t){return new e(t)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(Za)),!0)}};function Za(e){return(Na(e)?qa:Ka).create(e)}function Qa(e){let t=Ha(e);return t?t.constructor:B.arr(e)?Xa:Na(e)?qa:Ka}var $a=(e,t)=>{let n=!B.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,x.forwardRef)((r,i)=>{let a=(0,x.useRef)(null),o=n&&(0,x.useCallback)(e=>{a.current=no(i,e)},[i]),[s,c]=to(r,t),l=Ia(),u=()=>{let e=a.current;n&&!e||(e?t.applyAnimatedValues(e,s.getValue(!0)):!1)===!1&&l()},d=new eo(u,c),f=(0,x.useRef)(void 0);Pa(()=>(f.current=d,V(c,e=>pa(e,d)),()=>{f.current&&(V(f.current.deps,e=>ma(e,f.current)),z.cancel(f.current.update))})),(0,x.useEffect)(u,[]),La(()=>()=>{let e=f.current;V(e.deps,t=>ma(t,e))});let p=t.getComponentProps(s.getValue());return x.createElement(e,{...p,ref:o})})},eo=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type==`change`&&z.write(this.update)}};function to(e,t){let n=new Set;return Ja.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Ya(e),Ja.dependencies=null,[e,n]}function no(e,t){return e&&(B.fun(e)?e(t):e.current=t),t}var ro=Symbol.for(`AnimatedComponent`),io=new WeakMap,ao=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new Ya(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{let t=oo(e)||`Anonymous`;if(B.str(e))e=a[e]||(a[e]=$a(e,i));else{let t=e[ro]??io.get(e);if(!t){t=$a(e,i);try{e[ro]=t}catch{}io.set(e,t)}e=t}return e.displayName=`Animated(${t})`,e};return ai(e,(t,n)=>{B.arr(e)&&(n=oo(t)),a[n]=a(t)}),{animated:a}},oo=e=>B.str(e)?e:e&&B.str(e.displayName)?e.displayName:B.fun(e)&&e.name||null;function so(e,...t){return B.fun(e)?e(...t):e}var co=(e,t)=>e===!0||!!(t&&e&&(B.fun(e)?e(t):oi(e).includes(t))),lo=(e,t)=>B.obj(e)?t&&e[t]:e,U=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,uo=e=>e,fo=(e,t=uo)=>{let n=po;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));let r={};for(let i of n){let n=t(e[i],i);B.und(n)||(r[i]=n)}return r},po=[`config`,`onProps`,`onStart`,`onChange`,`onPause`,`onResume`,`onRest`],mo={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function ho(e){let t={},n=0;if(ai(e,(e,r)=>{mo[r]||(t[r]=e,n++)}),n)return t}function go(e){let t=ho(e);if(t){let n={to:t};return ai(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function _o(e){let t=sa(e);return B.arr(t)?t.map(_o):Na(t)?ui.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function vo(e){for(let t in e)return!0;return!1}function yo(e){return B.fun(e)||B.arr(e)&&B.obj(e[0])}function bo(e,t){e.ref?.delete(e),t?.delete(e)}function xo(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var So={...{default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}}.default,mass:1,damping:1,easing:ra.linear,clamp:!1},Co=class{constructor(){this.velocity=0,Object.assign(this,So)}};function wo(e,t,n){n&&(n={...n},To(n,t),t={...n,...t}),To(e,t),Object.assign(e,t);for(let t in So)e[t]??(e[t]=So[t]);let{frequency:r,damping:i}=e,{mass:a}=e;return B.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=(2*Math.PI/r)**2*a,e.friction=4*Math.PI*i*a/r),e}function To(e,t){if(!B.und(t.decay))e.duration=void 0;else{let n=!B.und(t.tension)||!B.und(t.friction);(n||!B.und(t.frequency)||!B.und(t.damping)||!B.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var Eo=[],Do=class{constructor(){this.changed=!1,this.values=Eo,this.toValues=null,this.fromValues=Eo,this.config=new Co,this.immediate=!1}};function Oo(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=co(n.cancel??r?.cancel,t);if(u)p();else{B.und(n.pause)||(i.paused=co(n.pause,t));let e=r?.pause;e!==!0&&(e=i.paused||co(e,t)),c=so(n.delay||0,t),e?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(l),l.cancel(),c=l.time-z.now()}function f(){c>0&&!ui.skipAnimation?(i.delayed=!0,l=z.setTimeout(p,c),i.pauseQueue.add(d),i.timeouts.add(l)):p()}function p(){i.delayed&&=!1,i.pauseQueue.delete(d),i.timeouts.delete(l),e<=(i.cancelId||0)&&(u=!0);try{a.start({...n,callId:e,cancel:u},o)}catch(e){s(e)}}})}var ko=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?Mo(e.get()):t.every(e=>e.noop)?Ao(e.get()):jo(e.get(),t.every(e=>e.finished)),Ao=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),jo=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Mo=e=>({value:e,cancelled:!0,finished:!1});function No(e,t,n,r){let{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:c}=n;return!a&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let l=fo(t,(e,t)=>t===`onRest`?void 0:e),u,d,f=new Promise((e,t)=>(u=e,d=t)),p=e=>{let t=i<=(n.cancelId||0)&&Mo(r)||i!==n.asyncId&&jo(r,!1);if(t)throw e.result=t,d(e),e},m=0,h=(e,t)=>{let a=new Fo,o=new Io;return(async()=>{p(a);let s=B.obj(e)?{...e}:{...t,to:e};if(s.parentId=i,ai(l,(e,t)=>{B.und(s[t])&&(s[t]=e)}),ui.skipAnimation){if(++m>1024)throw Po(n),o.result=jo(r,!1),d(o),o;return s.immediate=!0,await r.start(s)}let c=await r.start(s);return p(a),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),c})()},g;try{let t;t=B.arr(e)?(async e=>{for(let t of e)await h(t)})(e):Promise.resolve(e(h,r.stop.bind(r))),await Promise.all([t.then(u),f]),g=jo(r.get(),!0,!1)}catch(e){if(e instanceof Fo)g=e.result;else if(e instanceof Io)g=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?c:void 0)}return B.fun(o)&&z.batchedUpdates(()=>{o(g,r,r.item)}),g})()}function Po(e,t){si(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Fo=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Io=class extends Error{constructor(){super(`SkipAnimationSignal`)}},Lo=e=>e instanceof zo,Ro=1,zo=class extends da{constructor(...e){super(...e),this.id=Ro++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=Ha(this);return e&&e.getValue()}to(...e){return ui.to(this,e)}interpolate(...e){return Aa(),ui.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){ua(this,{type:`change`,parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||xi.sort(this),ua(this,{type:`priority`,parent:this,priority:e})}},Bo=Symbol.for(`SpringPhase`),Vo=1,Ho=2,Uo=4,Wo=e=>(e[Bo]&Vo)>0,Go=e=>(e[Bo]&Ho)>0,Ko=e=>(e[Bo]&Uo)>0,qo=(e,t)=>t?e[Bo]|=3:e[Bo]&=-3,Jo=(e,t)=>t?e[Bo]|=Uo:e[Bo]&=-5,Yo=class extends zo{constructor(e,t){if(super(),this.animation=new Do,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!B.und(e)||!B.und(t)){let n=B.obj(e)?{...e}:{...t,from:e};B.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Go(this)||this._state.asyncTo)||Ko(this)}get goal(){return sa(this.animation.to)}get velocity(){let e=Ha(this);return e instanceof Ka?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return Wo(this)}get isAnimating(){return Go(this)}get isPaused(){return Ko(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:a}=r,o=Wa(r.to);!o&&oa(r.to)&&(i=oi(sa(r.to))),r.values.forEach((s,c)=>{if(s.done)return;let l=s.constructor==qa?1:o?o[c].lastPosition:i[c],u=r.immediate,d=l;if(!u){if(d=s.lastPosition,a.tension<=0){s.done=!0;return}let t=s.elapsedTime+=e,n=r.fromValues[c],i=s.v0==null?s.v0=B.arr(a.velocity)?a.velocity[c]:a.velocity:s.v0,o,f=a.precision||(n==l?.005:Math.max(Math.max(Math.abs(l),Math.abs(n),1)*2**-52,Math.min(1,Math.abs(l-n)*.001)));if(!B.und(a.duration)){let r=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,s.durationProgress>0&&(s.elapsedTime=a.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(a.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+a.easing(r)*(l-n),o=(d-s.lastPosition)/e,u=r==1}else if(a.decay){let e=a.decay===!0?.998:a.decay,r=Math.exp(-(1-e)*t);d=n+i/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=f,o=i*r}else{o=s.lastVelocity==null?i:s.lastVelocity;let t=a.restVelocity||f/10,r=a.clamp?0:a.bounce,c=!B.und(r),p=n==l?s.v0>0:n<l,m,h=!1,g=Math.ceil(e/1);for(let e=0;e<g&&(m=Math.abs(o)>t,!(!m&&(u=Math.abs(l-d)<=f,u)));++e){c&&(h=d==l||d>l==p,h&&(o=-o*r,d=l));let e=(-a.tension*1e-6*(d-l)+-a.friction*.001*o)/a.mass;o+=e*1,d+=o*1}}s.lastVelocity=o,Number.isNaN(d)&&(console.warn(`Got NaN while animating:`,this),u=!0)}o&&!o[c].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,a.round)&&(n=!0)});let s=Ha(this),c=s.getValue();if(t){let e=sa(r.to);(c!==e||n)&&!a.decay?(s.setValue(e),this._onChange(e)):n&&a.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return z.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Go(this)){let{to:e,config:t}=this.animation;z.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||=[]).push(e),this}start(e,t){let n;return B.und(e)?(n=this.queue||[],this.queue=[]):n=[B.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>this._update(e))).then(e=>ko(this,e))}stop(e){let{to:t}=this.animation;return B.und(t)||this._focus(this.get()),Po(this._state,e&&this._lastCallId),z.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type==`change`?this._start():e.type==`priority`&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||``,{to:n,from:r}=e;n=B.obj(n)?n[t]:n,(n==null||yo(n))&&(n=void 0),r=B.obj(r)?r[t]:r,r??=void 0;let i={to:n,from:r};return Wo(this)||(e.reverse&&([n,r]=[r,n]),r=sa(r),B.und(r)?Ha(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,fo(e,(e,t)=>/^on/.test(t)?lo(e,n):e)),ns(this,e,`onProps`),rs(this,`onProps`,e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let a=this._state;return Oo(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{Ko(this)||(Jo(this,!0),ci(a.pauseQueue),rs(this,`onPause`,jo(this,Xo(this,this.animation.to)),this))},resume:()=>{Ko(this)&&(Jo(this,!1),Go(this)&&this._resume(),ci(a.resumeQueue),rs(this,`onResume`,jo(this,Xo(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=Zo(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Mo(this));let r=!B.und(e.to),i=!B.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Mo(this));let{key:a,defaultProps:o,animation:s}=this,{to:c,from:l}=s,{to:u=c,from:d=l}=e;i&&!r&&(!t.default||B.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let f=!ii(d,l);f&&(s.from=d),d=sa(d);let p=!ii(u,c);p&&this._focus(u);let m=yo(t.to),{config:h}=s,{decay:g,velocity:_}=h;(r||i)&&!h.decay&&(h.velocity=0),t.config&&!m&&wo(h,so(t.config,a),t.config===o.config?void 0:so(o.config,a));let v=Ha(this);if(!v||B.und(u))return n(jo(this,!0));let y=B.und(t.reset)?i&&!t.default:!B.und(d)&&co(t.reset,a),b=y?d:this.get(),x=_o(u),S=B.num(x)||B.arr(x)||Na(x),C=!m&&(!S||co(o.immediate||t.immediate,a));if(p){let e=Qa(u);if(e!==v.constructor)if(C)v=this._set(x);else throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`)}let w=v.constructor,T=oa(u),E=!1;if(!T){let e=y||!Wo(this)&&f;(p||e)&&(E=ii(_o(b),x),T=!E),(!ii(s.immediate,C)&&!C||!ii(h.decay,g)||!ii(h.velocity,_))&&(T=!0)}if(E&&Go(this)&&(s.changed&&!y?T=!0:T||this._stop(c)),!m&&((T||oa(c))&&(s.values=v.getPayload(),s.toValues=oa(u)?null:w==qa?[1]:oi(x)),s.immediate!=C&&(s.immediate=C,!C&&!y&&this._set(c)),T)){let{onRest:e}=s;V(ts,e=>ns(this,t,e));let r=jo(this,Xo(this,c));ci(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&z.batchedUpdates(()=>{s.changed=!y,e?.(r,this),y?so(o.onRest,r):s.onStart?.(r,this)})}y&&this._set(b),m?n(No(t.to,t,this._state,this)):T?this._start():Go(this)&&!p?this._pendingCalls.add(n):n(Ao(b))}_focus(e){let t=this.animation;e!==t.to&&(ca(this)&&this._detach(),t.to=e,ca(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;oa(t)&&(pa(t,this),Lo(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;oa(e)&&ma(e,this)}_set(e,t=!0){let n=sa(e);if(!B.und(n)){let e=Ha(this);if(!e||!ii(n,e.getValue())){let r=Qa(n);!e||e.constructor!=r?Ua(this,r.create(n)):e.setValue(n),e&&z.batchedUpdates(()=>{this._onChange(n,t)})}}return Ha(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,rs(this,`onStart`,jo(this,Xo(this,e.to)),this))}_onChange(e,t){let n=jo(e,!1);t||(this._onStart(),so(this.animation.onChange,n,this)),so(this.defaultProps.onChange,n,this),super._onChange(e,t)}_start(){let e=this.animation;Ha(this).reset(sa(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),Go(this)||(qo(this,!0),Ko(this)||this._resume())}_resume(){ui.skipAnimation?this.finish():xi.start(this)}_stop(e,t){if(Go(this)){qo(this,!1);let n=this.animation;V(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),ua(this,{type:`idle`,parent:this});let r=t?Mo(this.get()):jo(this.get(),Xo(this,e??n.to));ci(this._pendingCalls,r),n.changed=!1,rs(this,`onRest`,r,this)}}};function Xo(e,t){let n=_o(t);return ii(_o(e.get()),n)}function Zo(e,t=e.loop,n=e.to){let r=so(t);if(r){let i=r!==!0&&go(r),a=(i||e).reverse,o=!i||i.reset;return Qo({...e,loop:t,default:!1,pause:void 0,to:!a||yo(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function Qo(e){let{to:t,from:n}=e=go(e),r=new Set;return B.obj(t)&&es(t,r),B.obj(n)&&es(n,r),e.keys=r.size?Array.from(r):null,e}function $o(e){let t=Qo(e);return B.und(t.default)&&(t.default=fo(t)),t}function es(e,t){ai(e,(e,n)=>e!=null&&t.add(n))}var ts=[`onStart`,`onRest`,`onChange`,`onPause`,`onResume`];function ns(e,t,n){e.animation[n]=t[n]===U(t,n)?void 0:lo(t[n],e.key)}function rs(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var is=[`onStart`,`onChange`,`onRest`],as=1,os=class{constructor(e,t){this.id=as++,this.springs={},this.queue=[],this._lastAsyncId=0,this._lastLoopId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];B.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Qo(e)),this}start(e){let{queue:t}=this;return e?t=oi(e).map(Qo):this.queue=[],this._flush?this._flush(this,t):(ps(this,t),ss(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;V(oi(t),t=>n[t].stop(!!e))}else Po(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(B.und(e))this.start({pause:!0});else{let t=this.springs;V(oi(e),e=>t[e].pause())}return this}resume(e){if(B.und(e))this.start({pause:!1});else{let t=this.springs;V(oi(e),e=>t[e].resume())}return this}each(e){ai(this.springs,e)}onLoopReset(e){let t=this._onLoopReset??=new Set;return t.add(e),()=>{t.delete(e)}}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,si(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&si(t,([e,t])=>{t.value=o,e(t,this,this._item)}),a&&(this._started=!1,si(n,([e,t])=>{t.value=o,e(t,this,this._item)}))}eventObserved(e){if(e.type==`change`)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type==`idle`)this._active.delete(e.parent);else return;z.onFrame(this._onFrame)}};function ss(e,t){return Promise.all(t.map(t=>cs(e,t))).then(t=>ko(e,t))}async function cs(e,t,n){let{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:c}=t,l=B.obj(t.default)&&t.default;o&&(t.loop=!1);let u=t,d=!n&&!u.parentId&&`loop`in t?++e._lastLoopId:n?u.loopId:e._lastLoopId;i===!1&&(t.to=null),a===!1&&(t.from=null);let f=B.arr(i)||B.fun(i)?i:void 0;f?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):V(is,n=>{let r=t[n];if(B.fun(r)){let i=e._events[n];t[n]=(({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})}),l&&(l[n]=t[n])}});let p=e._state;t.pause===!p.paused?(p.paused=t.pause,ci(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);let m=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),h=t.cancel===!0||U(t,`cancel`)===!0;(f||h&&p.asyncId)&&m.push(Oo(++e._lastAsyncId,{props:t,state:p,actions:{pause:ni,resume:ni,start(t,n){h?(Po(p,e._lastAsyncId),n(Mo(e))):(t.onRest=s,n(No(f,t,p,e)))}}})),p.paused&&await new Promise(e=>{p.resumeQueue.add(e)});let g=ko(e,await Promise.all(m));if(o&&g.finished&&!(n&&g.noop)&&d===e._lastLoopId){let n=Zo(t,o,i);if(n)return n.loopId=d,e._onLoopReset?.forEach(e=>e()),ps(e,[n]),cs(e,n,!0)}return c&&z.batchedUpdates(()=>c(g,e,e.item)),g}function ls(e,t){let n={...e.springs};return t&&V(oi(t),e=>{B.und(e.keys)&&(e=Qo(e)),B.obj(e.to)||(e={...e,to:void 0}),fs(n,e,e=>ds(e))}),us(e,n),n}function us(e,t){ai(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,pa(t,e))})}function ds(e,t){let n=new Yo;return n.key=e,t&&pa(n,t),n}function fs(e,t,n){t.keys&&V(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function ps(e,t){V(t,t=>{fs(e.springs,t,t=>ds(t,e))})}var ms=x.createContext({pause:!1,immediate:!1}),hs=()=>{let e=[],t=function(t){Ma();let r=[];return V(e,(e,i)=>{if(B.und(t))r.push(e.start());else{let a=n(t,e,i);a&&r.push(e.start(a))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return V(e,e=>e.pause(...arguments)),this},t.resume=function(){return V(e,e=>e.resume(...arguments)),this},t.set=function(t){V(e,(e,n)=>{let r=B.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){let n=[];return V(e,(e,r)=>{if(B.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}}),n},t.stop=function(){return V(e,e=>e.stop(...arguments)),this},t.update=function(t){return V(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return B.fun(e)?e(n,t):e};return t._getProps=n,t};function gs(e,t,n){let r=B.fun(t)&&t;r&&!n&&(n=[]);let i=(0,x.useMemo)(()=>r||arguments.length==3?hs():void 0,[]),a=(0,x.useRef)(0),o=Ia(),s=(0,x.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=ls(e,t);return a.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t])?ss(e,t):new Promise(r=>{us(e,n),s.queue.push(()=>{r(ss(e,t))}),o()})}}),[]),c=(0,x.useRef)([...s.ctrls]),l=(0,x.useRef)([]),u=(0,x.useRef)([]);u.current=[];let d=za(e)||0;(0,x.useMemo)(()=>{V(c.current.slice(e,d),e=>{bo(e,i),e.stop(!0)}),c.current.length=e,f(d,e)},[e]),(0,x.useMemo)(()=>{f(0,Math.min(d,e))},n);function f(e,n){for(let i=e;i<n;i++){let e=c.current[i]||(c.current[i]=new os(null,s.flush)),n=r?r(i,e):t[i];n&&(l.current[i]=$o(n))}}let p=c.current.map((e,t)=>ls(e,l.current[t])),m=(0,x.useContext)(ms),h=m!==za(m)&&vo(m);Pa(()=>{a.current++,s.ctrls=c.current;let{queue:e}=s;e.length&&(s.queue=[],V(e,e=>e()));let t=l.current.length>0?l.current:u.current;V(c.current,(e,n)=>{i?.add(e),h&&e.start({default:m});let r=t[n];r&&(xo(e,r.ref),e.ref?e.queue.push({...r,default:B.obj(r.default)?{...r.default}:r.default}):e.start(r))}),l.current.length>0&&(u.current=l.current),l.current=[]}),La(()=>()=>{V(s.ctrls,e=>e.stop(!0))});let g=p.map(e=>({...e}));return i?[g,i]:g}function _s(e,t){let n=B.fun(e),[[r],i]=gs(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,i]:r}var vs=class extends zo{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=qi(...t);let n=this._get(),r=Qa(n);Ua(this,r.create(n))}advance(e){let t=this._get();ii(t,this.get())||(Ha(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&bs(this._active)&&xs(this)}_get(){let e=B.arr(this.source)?this.source.map(sa):oi(sa(this.source));return this.calc(...e)}_start(){this.idle&&!bs(this._active)&&(this.idle=!1,V(Wa(this),e=>{e.done=!1}),ui.skipAnimation?(z.batchedUpdates(()=>this.advance()),xs(this)):xi.start(this))}_attach(){let e=1;V(oi(this.source),t=>{oa(t)&&pa(t,this),Lo(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){V(oi(this.source),e=>{oa(e)&&ma(e,this)}),this._active.clear(),xs(this)}eventObserved(e){e.type==`change`?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type==`idle`?this._active.delete(e.parent):e.type==`priority`&&(this.priority=oi(this.source).reduce((e,t)=>Math.max(e,(Lo(t)?t.priority:0)+1),0))}};function ys(e){return e.idle!==!1}function bs(e){return!e.size||Array.from(e).every(ys)}function xs(e){e.idle||(e.idle=!0,V(Wa(e),e=>{e.done=!0}),ua(e,{type:`idle`,parent:e}))}var Ss=(e,...t)=>new vs(e,t);ui.assign({createStringInterpolator:Ea,to:(e,t)=>new vs(e,t)}),xi.advance;var Cs=g(),ws=/^--/;function Ts(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t==`number`&&t!==0&&!ws.test(e)&&!(Os.hasOwnProperty(e)&&Os[e])?t+`px`:(``+t).trim()}var Es={};function Ds(e,t){if(!e.nodeType||!e.setAttribute||!e.removeAttribute)return!1;let n=e.nodeName===`filter`||e.parentNode&&e.parentNode.nodeName===`filter`,{className:r,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:c,...l}=t,u=Object.values(l),d=Object.keys(l).map(t=>n||e.hasAttribute(t)?t:Es[t]||(Es[t]=t.replace(/([A-Z])/g,e=>`-`+e.toLowerCase())));t.hasOwnProperty(`children`)&&(e.textContent=a);for(let t in i)if(i.hasOwnProperty(t)){let n=Ts(t,i[t]);ws.test(t)?e.style.setProperty(t,n):e.style[t]=n}d.forEach((t,n)=>{let r=u[n];r===void 0?e.removeAttribute(t):e.setAttribute(t,r)}),t.hasOwnProperty(`className`)&&(r===void 0?e.removeAttribute(`class`):e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),t.hasOwnProperty(`viewBox`)&&(c===void 0?e.removeAttribute(`viewBox`):e.setAttribute(`viewBox`,c))}var Os={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ks=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),As=[`Webkit`,`Ms`,`Moz`,`O`];Os=Object.keys(Os).reduce((e,t)=>(As.forEach(n=>e[ks(n,t)]=e[t]),e),Os);var js=/^(matrix3d|matrix|translate3d|translate[XYZ]?|scale3d|scale[XYZ]?|rotate3d|rotate[XYZ]?|skew[XY]?)$/,Ms=/^(translate)/,Ns=/^(rotate|skew)/,Ps=(e,t)=>B.num(e)&&e!==0?e+t:e,Fs=(e,t)=>B.arr(e)?e.every(e=>Fs(e,t)):B.num(e)?e===t:parseFloat(e)===t,Is=class extends Ya{constructor({x:e,y:t,z:n,...r}){let i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(e=>[`translate3d(${e.map(e=>Ps(e,`px`)).join(`,`)})`,Fs(e,0)])),ai(r,(e,t)=>{if(t===`transform`)i.push([e||``]),a.push(e=>[e,e===``]);else if(js.test(t)){if(delete r[t],B.und(e))return;let n=Ms.test(t)?`px`:Ns.test(t)?`deg`:``;i.push(oi(e)),a.push(t===`rotate3d`?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${Ps(i,n)})`,Fs(i,0)]:e=>[`${t}(${e.map(e=>Ps(e,n)).join(`,`)})`,Fs(e,+!!t.startsWith(`scale`))])}}),i.length&&(r.transform=new Ls(i,a)),super(r)}},Ls=class extends da{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||=this._get()}_get(){let e=``,t=!0;return V(this.inputs,(n,r)=>{let i=sa(n[0]),[a,o]=this.transforms[r](B.arr(i)?i:n.map(sa));e+=` `+a,t&&=o}),t?`none`:e}observerAdded(e){e==1&&V(this.inputs,e=>V(e,e=>oa(e)&&pa(e,this)))}observerRemoved(e){e==0&&V(this.inputs,e=>V(e,e=>oa(e)&&ma(e,this)))}eventObserved(e){e.type==`change`&&(this._value=null),ua(this,e)}},Rs=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`);ui.assign({batchedUpdates:Cs.unstable_batchedUpdates,createStringInterpolator:Ea,colors:Oi});var zs=ao(Rs,{applyAnimatedValues:Ds,createAnimatedStyle:e=>new Is(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated,Bs=`BN.BN.BN.BN.BN.BN.BN.BN.BN.S.B.S.WS.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.B.B.B.S.WS.ON.ON.ET.ET.ET.ON.ON.ON.ON.ON.ES.CS.ES.CS.CS.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.CS.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.BN.BN.BN.BN.BN.BN.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.CS.ON.ET.ET.ET.ET.ON.ON.ON.ON.L.ON.ON.BN.ON.ON.ET.ET.EN.EN.ON.L.ON.ON.ON.EN.L.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L`.split(`.`),Vs=[[697,698,`ON`],[706,719,`ON`],[722,735,`ON`],[741,749,`ON`],[751,767,`ON`],[768,879,`NSM`],[884,885,`ON`],[894,894,`ON`],[900,901,`ON`],[903,903,`ON`],[1014,1014,`ON`],[1155,1161,`NSM`],[1418,1418,`ON`],[1421,1422,`ON`],[1423,1423,`ET`],[1424,1424,`R`],[1425,1469,`NSM`],[1470,1470,`R`],[1471,1471,`NSM`],[1472,1472,`R`],[1473,1474,`NSM`],[1475,1475,`R`],[1476,1477,`NSM`],[1478,1478,`R`],[1479,1479,`NSM`],[1480,1535,`R`],[1536,1541,`AN`],[1542,1543,`ON`],[1544,1544,`AL`],[1545,1546,`ET`],[1547,1547,`AL`],[1548,1548,`CS`],[1549,1549,`AL`],[1550,1551,`ON`],[1552,1562,`NSM`],[1563,1610,`AL`],[1611,1631,`NSM`],[1632,1641,`AN`],[1642,1642,`ET`],[1643,1644,`AN`],[1645,1647,`AL`],[1648,1648,`NSM`],[1649,1749,`AL`],[1750,1756,`NSM`],[1757,1757,`AN`],[1758,1758,`ON`],[1759,1764,`NSM`],[1765,1766,`AL`],[1767,1768,`NSM`],[1769,1769,`ON`],[1770,1773,`NSM`],[1774,1775,`AL`],[1776,1785,`EN`],[1786,1808,`AL`],[1809,1809,`NSM`],[1810,1839,`AL`],[1840,1866,`NSM`],[1867,1957,`AL`],[1958,1968,`NSM`],[1969,1983,`AL`],[1984,2026,`R`],[2027,2035,`NSM`],[2036,2037,`R`],[2038,2041,`ON`],[2042,2044,`R`],[2045,2045,`NSM`],[2046,2069,`R`],[2070,2073,`NSM`],[2074,2074,`R`],[2075,2083,`NSM`],[2084,2084,`R`],[2085,2087,`NSM`],[2088,2088,`R`],[2089,2093,`NSM`],[2094,2136,`R`],[2137,2139,`NSM`],[2140,2143,`R`],[2144,2191,`AL`],[2192,2193,`AN`],[2194,2198,`AL`],[2199,2207,`NSM`],[2208,2249,`AL`],[2250,2273,`NSM`],[2274,2274,`AN`],[2275,2306,`NSM`],[2362,2362,`NSM`],[2364,2364,`NSM`],[2369,2376,`NSM`],[2381,2381,`NSM`],[2385,2391,`NSM`],[2402,2403,`NSM`],[2433,2433,`NSM`],[2492,2492,`NSM`],[2497,2500,`NSM`],[2509,2509,`NSM`],[2530,2531,`NSM`],[2546,2547,`ET`],[2555,2555,`ET`],[2558,2558,`NSM`],[2561,2562,`NSM`],[2620,2620,`NSM`],[2625,2626,`NSM`],[2631,2632,`NSM`],[2635,2637,`NSM`],[2641,2641,`NSM`],[2672,2673,`NSM`],[2677,2677,`NSM`],[2689,2690,`NSM`],[2748,2748,`NSM`],[2753,2757,`NSM`],[2759,2760,`NSM`],[2765,2765,`NSM`],[2786,2787,`NSM`],[2801,2801,`ET`],[2810,2815,`NSM`],[2817,2817,`NSM`],[2876,2876,`NSM`],[2879,2879,`NSM`],[2881,2884,`NSM`],[2893,2893,`NSM`],[2901,2902,`NSM`],[2914,2915,`NSM`],[2946,2946,`NSM`],[3008,3008,`NSM`],[3021,3021,`NSM`],[3059,3064,`ON`],[3065,3065,`ET`],[3066,3066,`ON`],[3072,3072,`NSM`],[3076,3076,`NSM`],[3132,3132,`NSM`],[3134,3136,`NSM`],[3142,3144,`NSM`],[3146,3149,`NSM`],[3157,3158,`NSM`],[3170,3171,`NSM`],[3192,3198,`ON`],[3201,3201,`NSM`],[3260,3260,`NSM`],[3276,3277,`NSM`],[3298,3299,`NSM`],[3328,3329,`NSM`],[3387,3388,`NSM`],[3393,3396,`NSM`],[3405,3405,`NSM`],[3426,3427,`NSM`],[3457,3457,`NSM`],[3530,3530,`NSM`],[3538,3540,`NSM`],[3542,3542,`NSM`],[3633,3633,`NSM`],[3636,3642,`NSM`],[3647,3647,`ET`],[3655,3662,`NSM`],[3761,3761,`NSM`],[3764,3772,`NSM`],[3784,3790,`NSM`],[3864,3865,`NSM`],[3893,3893,`NSM`],[3895,3895,`NSM`],[3897,3897,`NSM`],[3898,3901,`ON`],[3953,3966,`NSM`],[3968,3972,`NSM`],[3974,3975,`NSM`],[3981,3991,`NSM`],[3993,4028,`NSM`],[4038,4038,`NSM`],[4141,4144,`NSM`],[4146,4151,`NSM`],[4153,4154,`NSM`],[4157,4158,`NSM`],[4184,4185,`NSM`],[4190,4192,`NSM`],[4209,4212,`NSM`],[4226,4226,`NSM`],[4229,4230,`NSM`],[4237,4237,`NSM`],[4253,4253,`NSM`],[4957,4959,`NSM`],[5008,5017,`ON`],[5120,5120,`ON`],[5760,5760,`WS`],[5787,5788,`ON`],[5906,5908,`NSM`],[5938,5939,`NSM`],[5970,5971,`NSM`],[6002,6003,`NSM`],[6068,6069,`NSM`],[6071,6077,`NSM`],[6086,6086,`NSM`],[6089,6099,`NSM`],[6107,6107,`ET`],[6109,6109,`NSM`],[6128,6137,`ON`],[6144,6154,`ON`],[6155,6157,`NSM`],[6158,6158,`BN`],[6159,6159,`NSM`],[6277,6278,`NSM`],[6313,6313,`NSM`],[6432,6434,`NSM`],[6439,6440,`NSM`],[6450,6450,`NSM`],[6457,6459,`NSM`],[6464,6464,`ON`],[6468,6469,`ON`],[6622,6655,`ON`],[6679,6680,`NSM`],[6683,6683,`NSM`],[6742,6742,`NSM`],[6744,6750,`NSM`],[6752,6752,`NSM`],[6754,6754,`NSM`],[6757,6764,`NSM`],[6771,6780,`NSM`],[6783,6783,`NSM`],[6832,6877,`NSM`],[6880,6891,`NSM`],[6912,6915,`NSM`],[6964,6964,`NSM`],[6966,6970,`NSM`],[6972,6972,`NSM`],[6978,6978,`NSM`],[7019,7027,`NSM`],[7040,7041,`NSM`],[7074,7077,`NSM`],[7080,7081,`NSM`],[7083,7085,`NSM`],[7142,7142,`NSM`],[7144,7145,`NSM`],[7149,7149,`NSM`],[7151,7153,`NSM`],[7212,7219,`NSM`],[7222,7223,`NSM`],[7376,7378,`NSM`],[7380,7392,`NSM`],[7394,7400,`NSM`],[7405,7405,`NSM`],[7412,7412,`NSM`],[7416,7417,`NSM`],[7616,7679,`NSM`],[8125,8125,`ON`],[8127,8129,`ON`],[8141,8143,`ON`],[8157,8159,`ON`],[8173,8175,`ON`],[8189,8190,`ON`],[8192,8202,`WS`],[8203,8205,`BN`],[8207,8207,`R`],[8208,8231,`ON`],[8232,8232,`WS`],[8233,8233,`B`],[8234,8238,`BN`],[8239,8239,`CS`],[8240,8244,`ET`],[8245,8259,`ON`],[8260,8260,`CS`],[8261,8286,`ON`],[8287,8287,`WS`],[8288,8303,`BN`],[8304,8304,`EN`],[8308,8313,`EN`],[8314,8315,`ES`],[8316,8318,`ON`],[8320,8329,`EN`],[8330,8331,`ES`],[8332,8334,`ON`],[8352,8399,`ET`],[8400,8432,`NSM`],[8448,8449,`ON`],[8451,8454,`ON`],[8456,8457,`ON`],[8468,8468,`ON`],[8470,8472,`ON`],[8478,8483,`ON`],[8485,8485,`ON`],[8487,8487,`ON`],[8489,8489,`ON`],[8494,8494,`ET`],[8506,8507,`ON`],[8512,8516,`ON`],[8522,8525,`ON`],[8528,8543,`ON`],[8585,8587,`ON`],[8592,8721,`ON`],[8722,8722,`ES`],[8723,8723,`ET`],[8724,9013,`ON`],[9083,9108,`ON`],[9110,9257,`ON`],[9280,9290,`ON`],[9312,9351,`ON`],[9352,9371,`EN`],[9450,9899,`ON`],[9901,10239,`ON`],[10496,11123,`ON`],[11126,11263,`ON`],[11493,11498,`ON`],[11503,11505,`NSM`],[11513,11519,`ON`],[11647,11647,`NSM`],[11744,11775,`NSM`],[11776,11869,`ON`],[11904,11929,`ON`],[11931,12019,`ON`],[12032,12245,`ON`],[12272,12287,`ON`],[12288,12288,`WS`],[12289,12292,`ON`],[12296,12320,`ON`],[12330,12333,`NSM`],[12336,12336,`ON`],[12342,12343,`ON`],[12349,12351,`ON`],[12441,12442,`NSM`],[12443,12444,`ON`],[12448,12448,`ON`],[12539,12539,`ON`],[12736,12773,`ON`],[12783,12783,`ON`],[12829,12830,`ON`],[12880,12895,`ON`],[12924,12926,`ON`],[12977,12991,`ON`],[13004,13007,`ON`],[13175,13178,`ON`],[13278,13279,`ON`],[13311,13311,`ON`],[19904,19967,`ON`],[42128,42182,`ON`],[42509,42511,`ON`],[42607,42610,`NSM`],[42611,42611,`ON`],[42612,42621,`NSM`],[42622,42623,`ON`],[42654,42655,`NSM`],[42736,42737,`NSM`],[42752,42785,`ON`],[42888,42888,`ON`],[43010,43010,`NSM`],[43014,43014,`NSM`],[43019,43019,`NSM`],[43045,43046,`NSM`],[43048,43051,`ON`],[43052,43052,`NSM`],[43064,43065,`ET`],[43124,43127,`ON`],[43204,43205,`NSM`],[43232,43249,`NSM`],[43263,43263,`NSM`],[43302,43309,`NSM`],[43335,43345,`NSM`],[43392,43394,`NSM`],[43443,43443,`NSM`],[43446,43449,`NSM`],[43452,43453,`NSM`],[43493,43493,`NSM`],[43561,43566,`NSM`],[43569,43570,`NSM`],[43573,43574,`NSM`],[43587,43587,`NSM`],[43596,43596,`NSM`],[43644,43644,`NSM`],[43696,43696,`NSM`],[43698,43700,`NSM`],[43703,43704,`NSM`],[43710,43711,`NSM`],[43713,43713,`NSM`],[43756,43757,`NSM`],[43766,43766,`NSM`],[43882,43883,`ON`],[44005,44005,`NSM`],[44008,44008,`NSM`],[44013,44013,`NSM`],[64285,64285,`R`],[64286,64286,`NSM`],[64287,64296,`R`],[64297,64297,`ES`],[64298,64335,`R`],[64336,64450,`AL`],[64451,64466,`ON`],[64467,64829,`AL`],[64830,64847,`ON`],[64848,64911,`AL`],[64912,64913,`ON`],[64914,64967,`AL`],[64968,64975,`ON`],[64976,65007,`BN`],[65008,65020,`AL`],[65021,65023,`ON`],[65024,65039,`NSM`],[65040,65049,`ON`],[65056,65071,`NSM`],[65072,65103,`ON`],[65104,65104,`CS`],[65105,65105,`ON`],[65106,65106,`CS`],[65108,65108,`ON`],[65109,65109,`CS`],[65110,65118,`ON`],[65119,65119,`ET`],[65120,65121,`ON`],[65122,65123,`ES`],[65124,65126,`ON`],[65128,65128,`ON`],[65129,65130,`ET`],[65131,65131,`ON`],[65136,65278,`AL`],[65279,65279,`BN`],[65281,65282,`ON`],[65283,65285,`ET`],[65286,65290,`ON`],[65291,65291,`ES`],[65292,65292,`CS`],[65293,65293,`ES`],[65294,65295,`CS`],[65296,65305,`EN`],[65306,65306,`CS`],[65307,65312,`ON`],[65339,65344,`ON`],[65371,65381,`ON`],[65504,65505,`ET`],[65506,65508,`ON`],[65509,65510,`ET`],[65512,65518,`ON`],[65520,65528,`BN`],[65529,65533,`ON`],[65534,65535,`BN`],[65793,65793,`ON`],[65856,65932,`ON`],[65936,65948,`ON`],[65952,65952,`ON`],[66045,66045,`NSM`],[66272,66272,`NSM`],[66273,66299,`EN`],[66422,66426,`NSM`],[67584,67870,`R`],[67871,67871,`ON`],[67872,68096,`R`],[68097,68099,`NSM`],[68100,68100,`R`],[68101,68102,`NSM`],[68103,68107,`R`],[68108,68111,`NSM`],[68112,68151,`R`],[68152,68154,`NSM`],[68155,68158,`R`],[68159,68159,`NSM`],[68160,68324,`R`],[68325,68326,`NSM`],[68327,68408,`R`],[68409,68415,`ON`],[68416,68863,`R`],[68864,68899,`AL`],[68900,68903,`NSM`],[68904,68911,`AL`],[68912,68921,`AN`],[68922,68927,`AL`],[68928,68937,`AN`],[68938,68968,`R`],[68969,68973,`NSM`],[68974,68974,`ON`],[68975,69215,`R`],[69216,69246,`AN`],[69247,69290,`R`],[69291,69292,`NSM`],[69293,69311,`R`],[69312,69327,`AL`],[69328,69336,`ON`],[69337,69369,`AL`],[69370,69375,`NSM`],[69376,69423,`R`],[69424,69445,`AL`],[69446,69456,`NSM`],[69457,69487,`AL`],[69488,69505,`R`],[69506,69509,`NSM`],[69510,69631,`R`],[69633,69633,`NSM`],[69688,69702,`NSM`],[69714,69733,`ON`],[69744,69744,`NSM`],[69747,69748,`NSM`],[69759,69761,`NSM`],[69811,69814,`NSM`],[69817,69818,`NSM`],[69826,69826,`NSM`],[69888,69890,`NSM`],[69927,69931,`NSM`],[69933,69940,`NSM`],[70003,70003,`NSM`],[70016,70017,`NSM`],[70070,70078,`NSM`],[70089,70092,`NSM`],[70095,70095,`NSM`],[70191,70193,`NSM`],[70196,70196,`NSM`],[70198,70199,`NSM`],[70206,70206,`NSM`],[70209,70209,`NSM`],[70367,70367,`NSM`],[70371,70378,`NSM`],[70400,70401,`NSM`],[70459,70460,`NSM`],[70464,70464,`NSM`],[70502,70508,`NSM`],[70512,70516,`NSM`],[70587,70592,`NSM`],[70606,70606,`NSM`],[70608,70608,`NSM`],[70610,70610,`NSM`],[70625,70626,`NSM`],[70712,70719,`NSM`],[70722,70724,`NSM`],[70726,70726,`NSM`],[70750,70750,`NSM`],[70835,70840,`NSM`],[70842,70842,`NSM`],[70847,70848,`NSM`],[70850,70851,`NSM`],[71090,71093,`NSM`],[71100,71101,`NSM`],[71103,71104,`NSM`],[71132,71133,`NSM`],[71219,71226,`NSM`],[71229,71229,`NSM`],[71231,71232,`NSM`],[71264,71276,`ON`],[71339,71339,`NSM`],[71341,71341,`NSM`],[71344,71349,`NSM`],[71351,71351,`NSM`],[71453,71453,`NSM`],[71455,71455,`NSM`],[71458,71461,`NSM`],[71463,71467,`NSM`],[71727,71735,`NSM`],[71737,71738,`NSM`],[71995,71996,`NSM`],[71998,71998,`NSM`],[72003,72003,`NSM`],[72148,72151,`NSM`],[72154,72155,`NSM`],[72160,72160,`NSM`],[72193,72198,`NSM`],[72201,72202,`NSM`],[72243,72248,`NSM`],[72251,72254,`NSM`],[72263,72263,`NSM`],[72273,72278,`NSM`],[72281,72283,`NSM`],[72330,72342,`NSM`],[72344,72345,`NSM`],[72544,72544,`NSM`],[72546,72548,`NSM`],[72550,72550,`NSM`],[72752,72758,`NSM`],[72760,72765,`NSM`],[72850,72871,`NSM`],[72874,72880,`NSM`],[72882,72883,`NSM`],[72885,72886,`NSM`],[73009,73014,`NSM`],[73018,73018,`NSM`],[73020,73021,`NSM`],[73023,73029,`NSM`],[73031,73031,`NSM`],[73104,73105,`NSM`],[73109,73109,`NSM`],[73111,73111,`NSM`],[73459,73460,`NSM`],[73472,73473,`NSM`],[73526,73530,`NSM`],[73536,73536,`NSM`],[73538,73538,`NSM`],[73562,73562,`NSM`],[73685,73692,`ON`],[73693,73696,`ET`],[73697,73713,`ON`],[78912,78912,`NSM`],[78919,78933,`NSM`],[90398,90409,`NSM`],[90413,90415,`NSM`],[92912,92916,`NSM`],[92976,92982,`NSM`],[94031,94031,`NSM`],[94095,94098,`NSM`],[94178,94178,`ON`],[94180,94180,`NSM`],[113821,113822,`NSM`],[113824,113827,`BN`],[117760,117973,`ON`],[118e3,118009,`EN`],[118010,118012,`ON`],[118016,118451,`ON`],[118458,118480,`ON`],[118496,118512,`ON`],[118528,118573,`NSM`],[118576,118598,`NSM`],[119143,119145,`NSM`],[119155,119162,`BN`],[119163,119170,`NSM`],[119173,119179,`NSM`],[119210,119213,`NSM`],[119273,119274,`ON`],[119296,119361,`ON`],[119362,119364,`NSM`],[119365,119365,`ON`],[119552,119638,`ON`],[120513,120513,`ON`],[120539,120539,`ON`],[120571,120571,`ON`],[120597,120597,`ON`],[120629,120629,`ON`],[120655,120655,`ON`],[120687,120687,`ON`],[120713,120713,`ON`],[120745,120745,`ON`],[120771,120771,`ON`],[120782,120831,`EN`],[121344,121398,`NSM`],[121403,121452,`NSM`],[121461,121461,`NSM`],[121476,121476,`NSM`],[121499,121503,`NSM`],[121505,121519,`NSM`],[122880,122886,`NSM`],[122888,122904,`NSM`],[122907,122913,`NSM`],[122915,122916,`NSM`],[122918,122922,`NSM`],[123023,123023,`NSM`],[123184,123190,`NSM`],[123566,123566,`NSM`],[123628,123631,`NSM`],[123647,123647,`ET`],[124140,124143,`NSM`],[124398,124399,`NSM`],[124643,124643,`NSM`],[124646,124646,`NSM`],[124654,124655,`NSM`],[124661,124661,`NSM`],[124928,125135,`R`],[125136,125142,`NSM`],[125143,125251,`R`],[125252,125258,`NSM`],[125259,126063,`R`],[126064,126143,`AL`],[126144,126207,`R`],[126208,126287,`AL`],[126288,126463,`R`],[126464,126703,`AL`],[126704,126705,`ON`],[126706,126719,`AL`],[126720,126975,`R`],[126976,127019,`ON`],[127024,127123,`ON`],[127136,127150,`ON`],[127153,127167,`ON`],[127169,127183,`ON`],[127185,127221,`ON`],[127232,127242,`EN`],[127243,127247,`ON`],[127279,127279,`ON`],[127338,127343,`ON`],[127405,127405,`ON`],[127584,127589,`ON`],[127744,128728,`ON`],[128732,128748,`ON`],[128752,128764,`ON`],[128768,128985,`ON`],[128992,129003,`ON`],[129008,129008,`ON`],[129024,129035,`ON`],[129040,129095,`ON`],[129104,129113,`ON`],[129120,129159,`ON`],[129168,129197,`ON`],[129200,129211,`ON`],[129216,129217,`ON`],[129232,129240,`ON`],[129280,129623,`ON`],[129632,129645,`ON`],[129648,129660,`ON`],[129664,129674,`ON`],[129678,129734,`ON`],[129736,129736,`ON`],[129741,129756,`ON`],[129759,129770,`ON`],[129775,129784,`ON`],[129792,129938,`ON`],[129940,130031,`ON`],[130032,130041,`EN`],[130042,130042,`ON`],[131070,131071,`BN`],[196606,196607,`BN`],[262142,262143,`BN`],[327678,327679,`BN`],[393214,393215,`BN`],[458750,458751,`BN`],[524286,524287,`BN`],[589822,589823,`BN`],[655358,655359,`BN`],[720894,720895,`BN`],[786430,786431,`BN`],[851966,851967,`BN`],[917502,917759,`BN`],[917760,917999,`NSM`],[918e3,921599,`BN`],[983038,983039,`BN`],[1048574,1048575,`BN`],[1114110,1114111,`BN`]];function Hs(e){if(e<=255)return Bs[e];let t=0,n=Vs.length-1;for(;t<=n;){let r=t+n>>1,i=Vs[r];if(e<i[0]){n=r-1;continue}if(e>i[1]){t=r+1;continue}return i[2]}return`L`}function Us(e){let t=e.length;if(t===0)return null;let n=Array(t),r=!1;for(let i=0;i<t;){let a=e.charCodeAt(i),o=a,s=1;if(a>=55296&&a<=56319&&i+1<t){let t=e.charCodeAt(i+1);t>=56320&&t<=57343&&(o=(a-55296<<10)+(t-56320)+65536,s=2)}let c=Hs(o);(c===`R`||c===`AL`||c===`AN`)&&(r=!0);for(let e=0;e<s;e++)n[i+e]=c;i+=s}if(!r)return null;let i=0;for(let e=0;e<t;e++){let t=n[e];if(t===`L`){i=0;break}if(t===`R`||t===`AL`){i=1;break}}let a=new Int8Array(t);for(let e=0;e<t;e++)a[e]=i;let o=i&1?`R`:`L`,s=o,c=s;for(let e=0;e<t;e++)n[e]===`NSM`?n[e]=c:c=n[e];c=s;for(let e=0;e<t;e++){let t=n[e];t===`EN`?n[e]=c===`AL`?`AN`:`EN`:(t===`R`||t===`L`||t===`AL`)&&(c=t)}for(let e=0;e<t;e++)n[e]===`AL`&&(n[e]=`R`);for(let e=1;e<t-1;e++)n[e]===`ES`&&n[e-1]===`EN`&&n[e+1]===`EN`&&(n[e]=`EN`),n[e]===`CS`&&(n[e-1]===`EN`||n[e-1]===`AN`)&&n[e+1]===n[e-1]&&(n[e]=n[e-1]);for(let e=0;e<t;e++){if(n[e]!==`EN`)continue;let r;for(r=e-1;r>=0&&n[r]===`ET`;r--)n[r]=`EN`;for(r=e+1;r<t&&n[r]===`ET`;r++)n[r]=`EN`}for(let e=0;e<t;e++){let t=n[e];(t===`WS`||t===`ES`||t===`ET`||t===`CS`)&&(n[e]=`ON`)}c=s;for(let e=0;e<t;e++){let t=n[e];t===`EN`?n[e]=c===`L`?`L`:`EN`:(t===`R`||t===`L`)&&(c=t)}for(let e=0;e<t;e++){if(n[e]!==`ON`)continue;let r=e+1;for(;r<t&&n[r]===`ON`;)r++;let i=e>0?n[e-1]:s,a=r<t?n[r]:s,o=i===`L`?`L`:`R`;if(o===(a===`L`?`L`:`R`))for(let t=e;t<r;t++)n[t]=o;e=r-1}for(let e=0;e<t;e++)n[e]===`ON`&&(n[e]=o);for(let e=0;e<t;e++){let t=n[e];a[e]&1?(t===`L`||t===`AN`||t===`EN`)&&a[e]++:t===`R`?a[e]++:(t===`AN`||t===`EN`)&&(a[e]+=2)}return a}function Ws(e,t){let n=Us(e);if(n===null)return null;let r=new Int8Array(t.length);for(let e=0;e<t.length;e++)r[e]=n[t[e]];return r}var Gs=/[ \t\n\r\f]+/g,Ks=/[\t\n\r\f]| {2,}|^ | $/;function qs(e){let t=e??`normal`;return t===`pre-wrap`?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function Js(e){if(!Ks.test(e))return e;let t=e.replace(Gs,` `);return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function Ys(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,`
597
+ `).replace(/[\r\f]/g,`
598
+ `):e}var Xs=null,Zs;function Qs(){return Xs===null&&(Xs=new Intl.Segmenter(Zs,{granularity:`word`})),Xs}var $s=/\p{Script=Arabic}/u,ec=/\p{M}/u,tc=/\p{Nd}/u;function nc(e){return $s.test(e)}function rc(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function ic(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){let r=e.charCodeAt(t+1);if(r>=56320&&r<=57343){if(rc((n-55296<<10)+(r-56320)+65536))return!0;t++;continue}}if(rc(n))return!0}}return!1}function ac(e){let t=Cc(e);return t!==null&&(dc.has(t)||mc.has(t))}var oc=new Set([`\xA0`,` `,`⁠`,``]),sc=new Set([`-`,`‐`,`–`,`—`]);function cc(e){let t=Cc(e);return t!==null&&oc.has(t)}function lc(e){let t=Cc(e);return t!==null&&sc.has(t)}function uc(e,t){return cc(e)?!1:t?!(ac(e)||lc(e)):!0}var dc=new Set(`,...!.:.;.?.、.。.・.).〕.〉.》.」.』.】.〗.〙.〛.ー.々.〻.ゝ.ゞ.ヽ.ヾ`.split(`.`)),fc=new Set([`"`,`(`,`[`,`{`,`¡`,`¿`,`“`,`‘`,`‚`,`„`,`«`,`‹`,`⸘`,`(`,`〔`,`〈`,`《`,`「`,`『`,`【`,`〖`,`〘`,`〚`]),pc=new Set([`'`,`’`]),mc=new Set(`.(,(!(?(:(;(،(؛(؟(।(॥(၊(။(၌(၍(၏()(](}(%("(”(’(»(›(…`.split(`(`)),hc=new Set([`:`,`.`,`،`,`؛`]),gc=new Set([`၏`]),_c=new Set([`”`,`’`,`»`,`›`,`」`,`』`,`】`,`》`,`〉`,`〕`,`)`]);function vc(e){if(xc(e))return!0;let t=!1;for(let n of e){if(mc.has(n)||Oc(n)){t=!0;continue}if(!(t&&ec.test(n)))return!1}return t}function yc(e){for(let t of e)if(!dc.has(t)&&!mc.has(t))return!1;return e.length>0}function bc(e){if(xc(e))return!0;for(let t of e)if(!fc.has(t)&&!pc.has(t)&&!ec.test(t)&&!Oc(t))return!1;return e.length>0}function xc(e){let t=!1;for(let n of e)if(!(n===`\\`||ec.test(n))){if(fc.has(n)||mc.has(n)||pc.has(n)){t=!0;continue}return!1}return t}function Sc(e,t){let n=t-1;if(n<=0)return Math.max(n,0);let r=e.charCodeAt(n);if(r<56320||r>57343)return n;let i=n-1;if(i<0)return n;let a=e.charCodeAt(i);return a>=55296&&a<=56319?i:n}function Cc(e){if(e.length===0)return null;let t=Sc(e,e.length);return e.slice(t)}function wc(e){for(let t of e)if(!ec.test(t))return t;return null}function Tc(e){for(let t=e.length;t>0;){let n=Sc(e,t),r=e.slice(n,t);if(!ec.test(r))return r;t=n}return null}var Ec=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function Dc(e,t){for(let n=0;n<t.length;n+=2)if(e>=t[n]&&e<=t[n+1])return!0;return!1}function Oc(e){let t=e.codePointAt(0);return t!==void 0&&Dc(t,Ec)}function kc(e){let t=Tc(e);return t!==null&&Oc(t)}function Ac(e){let t=wc(e);return t!==null&&tc.test(t)}function jc(e){let t=Array.from(e),n=t.length;for(;n>0;){let e=t[n-1];if(ec.test(e)){n--;continue}if(fc.has(e)||pc.has(e)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(``),tail:t.slice(n).join(``)}}function Mc(e,t,n){return n===`text`&&!t&&e.length===1&&e!==`-`&&e!==`—`?e:null}function Nc(e,t,n,r){let i=t[r],a=e[r];if(i==null)return a;let o=n[r];if(a.length===o)return a;let s=i.repeat(o);return e[r]=s,s}function Pc(e,t){return e&&t!==null&&hc.has(t)}function Fc(e){let t=Cc(e);return t!==null&&gc.has(t)}function Ic(e){if(e.length<2||e[0]!==` `)return null;let t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:` `,marks:t}:null}function Lc(e){let t=e.length;for(;t>0;){let n=Sc(e,t),r=e.slice(n,t);if(_c.has(r))return!0;if(!mc.has(r))return!1;t=n}return!1}function Rc(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===` `)return`preserved-space`;if(e===` `)return`tab`;if(t.preserveHardBreaks&&e===`
599
+ `)return`hard-break`}return e===` `?`space`:e===`\xA0`||e===` `||e===`⁠`||e===``?`glue`:e===`​`?`zero-width-break`:e===`­`?`soft-hyphen`:`text`}var zc=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Bc(e){return e.length===1?e[0]:e.join(``)}function Vc(e,t){let n=[];for(let t=e.length-1;t>=0;t--)n.push(e[t]);return n.push(t),Bc(n)}function Hc(e,t,n,r){if(!zc.test(e))return[{text:e,isWordLike:t,kind:`text`,start:n}];let i=[],a=null,o=[],s=n,c=!1,l=0;for(let u of e){let e=Rc(u,r),d=e===`text`&&t;if(a!==null&&e===a&&d===c){o.push(u),l+=u.length;continue}a!==null&&i.push({text:Bc(o),isWordLike:c,kind:a,start:s}),a=e,o=[u],s=n+l,c=d,l+=u.length}return a!==null&&i.push({text:Bc(o),isWordLike:c,kind:a,start:s}),i}function Uc(e){return e===`space`||e===`preserved-space`||e===`zero-width-break`||e===`hard-break`}var Wc=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Gc(e,t){let n=e.texts[t];return n.startsWith(`www.`)?!0:Wc.test(n)&&t+1<e.len&&e.kinds[t+1]===`text`&&e.texts[t+1]===`//`}function Kc(e){return e.includes(`?`)&&(e.includes(`://`)||e.startsWith(`www.`))}function qc(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),i=e.starts.slice();for(let i=0;i<e.len;i++){if(r[i]!==`text`||!Gc(e,i))continue;let a=[t[i]],o=i+1;for(;o<e.len&&!Uc(r[o]);){a.push(t[o]),n[i]=!0;let e=t[o].includes(`?`);if(r[o]=`text`,t[o]=``,o++,e)break}t[i]=Bc(a)}let a=0;for(let e=0;e<t.length;e++){let o=t[e];o.length!==0&&(a!==e&&(t[a]=o,n[a]=n[e],r[a]=r[e],i[a]=i[e]),a++)}return t.length=a,n.length=a,r.length=a,i.length=a,{len:a,texts:t,isWordLike:n,kinds:r,starts:i}}function Jc(e){let t=[],n=[],r=[],i=[];for(let a=0;a<e.len;a++){let o=e.texts[a];if(t.push(o),n.push(e.isWordLike[a]),r.push(e.kinds[a]),i.push(e.starts[a]),!Kc(o))continue;let s=a+1;if(s>=e.len||Uc(e.kinds[s]))continue;let c=[],l=e.starts[s],u=s;for(;u<e.len&&!Uc(e.kinds[u]);)c.push(e.texts[u]),u++;c.length>0&&(t.push(Bc(c)),n.push(!0),r.push(`text`),i.push(l),a=u-1)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}var Yc=new Set([`:`,`-`,`/`,`×`,`,`,`.`,`+`,`–`,`—`]),Xc=/[\p{P}\p{S}\p{Co}]/u,Zc=/\p{Emoji_Presentation}/u,Qc=new Set([`?`,`֊`,`-`,`‐`,`‒`,`–`,`—`,`…`,`‼`,`‽`,`⁉`]);function $c(e){return e>=33&&e<=47&&e!==45||e>=58&&e<=64&&e!==63||e>=91&&e<=96||e>=123&&e<=126}function el(e){let t=e.charCodeAt(0);return t<128?$c(t):!Qc.has(e)&&!Zc.test(e)&&Xc.test(e)}function tl(e){let t=!1;for(let n of e)if(!ec.test(n)){if(!el(n))return!1;t=!0}return t}function nl(e){for(let t=e.length;t>0;){let n=Sc(e,t),r=e.slice(n,t);if(ec.test(r)){t=n;continue}return el(r)||Oc(r)}return!1}function rl(e,t,n,r){let i=!t&&tl(e),a=!r&&tl(n),o=kc(e),s=(t||o)&&nl(e);return!i&&!a&&!s||ic(e)||ic(n)?!1:(t||i||o)&&(r||a)}function il(e){for(let t of e)if(tc.test(t))return!0;return!1}function al(e){if(e.length===0)return!1;for(let t of e)if(!(tc.test(t)||Yc.has(t)))return!1;return!0}function ol(e){let t=[],n=[],r=[],i=[];for(let a=0;a<e.len;a++){let o=e.texts[a],s=e.kinds[a];if(s===`text`&&al(o)&&il(o)){let s=[o],c=a+1;for(;c<e.len&&e.kinds[c]===`text`&&al(e.texts[c]);)s.push(e.texts[c]),c++;t.push(Bc(s)),n.push(!0),r.push(`text`),i.push(e.starts[a]),a=c-1;continue}t.push(o),n.push(e.isWordLike[a]),r.push(s),i.push(e.starts[a])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}function sl(e){let t=[],n=[],r=[],i=[],a=0;for(;a<e.len;){let o=e.texts[a],s=e.kinds[a],c=e.isWordLike[a];if(s===`text`){let s=[o],l=a+1,u=c;for(;l<e.len&&e.kinds[l]===`text`&&rl(e.texts[l-1],e.isWordLike[l-1],e.texts[l],e.isWordLike[l]);){let t=e.texts[l];s.push(t),u||=e.isWordLike[l],l++}if(l>a+1){t.push(Bc(s)),n.push(u),r.push(`text`),i.push(e.starts[a]),a=l;continue}}t.push(o),n.push(c),r.push(s),i.push(e.starts[a]),a++}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}function cl(e){let t=[],n=[],r=[],i=[];for(let a=0;a<e.len;a++){let o=e.texts[a];if(e.kinds[a]===`text`&&o.includes(`-`)){let s=o.split(`-`),c=s.length>1;for(let e=0;e<s.length;e++){let t=s[e];if(!c)break;(t.length===0||!il(t)||!al(t))&&(c=!1)}if(c){let o=0;for(let c=0;c<s.length;c++){let l=s[c],u=c<s.length-1?`${l}-`:l;t.push(u),n.push(!0),r.push(`text`),i.push(e.starts[a]+o),o+=u.length}continue}}t.push(o),n.push(e.isWordLike[a]),r.push(e.kinds[a]),i.push(e.starts[a])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}function ll(e){let t=[],n=[],r=[],i=[],a=0;for(;a<e.len;){let o=[e.texts[a]],s=e.isWordLike[a],c=e.kinds[a],l=e.starts[a];if(c===`glue`){let u=[o[0]],d=l;for(a++;a<e.len&&e.kinds[a]===`glue`;)u.push(e.texts[a]),a++;let f=Bc(u);if(a<e.len&&e.kinds[a]===`text`)o[0]=f,o.push(e.texts[a]),s=e.isWordLike[a],c=`text`,l=d,a++;else{t.push(f),n.push(!1),r.push(`glue`),i.push(d);continue}}else a++;if(c===`text`)for(;a<e.len&&e.kinds[a]===`glue`;){let t=[];for(;a<e.len&&e.kinds[a]===`glue`;)t.push(e.texts[a]),a++;let n=Bc(t);if(a<e.len&&e.kinds[a]===`text`){o.push(n,e.texts[a]),s||=e.isWordLike[a],a++;continue}o.push(n)}t.push(Bc(o)),n.push(s),r.push(c),i.push(l)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}function ul(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),i=e.starts.slice();for(let e=0;e<t.length-1;e++){if(r[e]!==`text`||r[e+1]!==`text`||!ic(t[e])||!ic(t[e+1]))continue;let n=jc(t[e]);n!==null&&(t[e]=n.head,t[e+1]=n.tail+t[e+1],i[e+1]=i[e]+n.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}function dl(e,t,n){let r=Qs(),i=0,a=[],o=[],s=[],c=[],l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=[];for(let _ of r.segment(e))for(let e of Hc(_.segment,_.isWordLike??!1,_.index,n)){let n=e.kind===`text`,r=Mc(e.text,e.isWordLike,e.kind),_=ic(e.text),v=nc(e.text),y=Cc(e.text),b=Lc(e.text),x=Fc(e.text),S=i-1;function C(){u[S]!==null&&(o[S]=[Nc(a,u,d,S)],u[S]=null),o[S].push(e.text),s[S]=s[S]||e.isWordLike,f[S]=f[S]||_,p[S]=p[S]||v,m[S]=b,h[S]=x,g[S]=Pc(p[S],y)}t.carryCJKAfterClosingQuote&&n&&i>0&&c[S]===`text`&&_&&f[S]&&m[S]||n&&i>0&&c[S]===`text`&&yc(e.text)&&f[S]||n&&i>0&&c[S]===`text`&&h[S]?C():n&&i>0&&c[S]===`text`&&e.isWordLike&&v&&g[S]?(C(),s[S]=!0):r!==null&&i>0&&c[S]===`text`&&u[S]===r?d[S]=(d[S]??1)+1:n&&!e.isWordLike&&i>0&&c[S]===`text`&&!f[S]&&(vc(e.text)||e.text===`-`&&s[S])?C():(a[i]=e.text,o[i]=[e.text],s[i]=e.isWordLike,c[i]=e.kind,l[i]=e.start,u[i]=r,d[i]=r===null?0:1,f[i]=_,p[i]=v,m[i]=b,h[i]=x,g[i]=Pc(v,y),i++)}for(let e=0;e<i;e++){if(u[e]!==null){a[e]=Nc(a,u,d,e);continue}a[e]=Bc(o[e])}for(let e=1;e<i;e++)c[e]===`text`&&!s[e]&&xc(a[e])&&c[e-1]===`text`&&!f[e-1]&&(a[e-1]+=a[e],s[e-1]=s[e-1]||s[e],a[e]=``);let _=Array.from({length:i},()=>null),v=-1;for(let e=i-1;e>=0;e--){let t=a[e];if(t.length!==0){if(c[e]===`text`&&!s[e]&&v>=0&&c[v]===`text`&&(bc(t)||t===`-`&&Ac(a[v]))){let n=_[v]??[];n.push(t),_[v]=n,l[v]=l[e],a[e]=``;continue}v=e}}for(let e=0;e<i;e++){let t=_[e];t!=null&&(a[e]=Vc(t,a[e]))}let y=0;for(let e=0;e<i;e++){let t=a[e];t.length!==0&&(y!==e&&(a[y]=t,s[y]=s[e],c[y]=c[e],l[y]=l[e]),y++)}a.length=y,s.length=y,c.length=y,l.length=y;let b=ul(sl(cl(ol(Jc(qc(ll({len:y,texts:a,isWordLike:s,kinds:c,starts:l})))))));for(let e=0;e<b.len-1;e++){let t=Ic(b.texts[e]);t!==null&&(b.kinds[e]!==`space`&&b.kinds[e]!==`preserved-space`||b.kinds[e+1]!==`text`||!nc(b.texts[e+1])||(b.texts[e]=t.space,b.isWordLike[e]=!1,b.kinds[e]=b.kinds[e]===`preserved-space`?`preserved-space`:`space`,b.texts[e+1]=t.marks+b.texts[e+1],b.starts[e+1]=b.starts[e]+t.space.length))}return b}function fl(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];let n=[],r=0;for(let t=0;t<e.len;t++)e.kinds[t]===`hard-break`&&(n.push({startSegmentIndex:r,endSegmentIndex:t,consumedEndSegmentIndex:t+1}),r=t+1);return r<e.len&&n.push({startSegmentIndex:r,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function pl(e,t,n){if(t.len<=1)return t;let r=[],i=[],a=[],o=[],s=-1,c=!1;function l(e){r.push(t.texts[e]),i.push(t.isWordLike[e]),a.push(`text`),o.push(t.starts[e])}function u(n,s){let c=!1;for(let e=n;e<s;e++)c||=t.isWordLike[e];let l=t.starts[n],u=s<t.len?t.starts[s]:e.length;r.push(e.slice(l,u)),i.push(c),a.push(`text`),o.push(l)}function d(e){if(!(s<0)){if(c)s+1===e?l(s):u(s,e);else for(let t=s;t<e;t++)l(t);s=-1,c=!1}}for(let e=0;e<t.len;e++){let l=t.texts[e],u=t.kinds[e];if(u===`text`){s>=0&&!uc(t.texts[e-1],n)&&d(e),s<0&&(s=e),c||=ic(l);continue}d(e),r.push(l),i.push(t.isWordLike[e]),a.push(u),o.push(t.starts[e])}return d(t.len),{len:r.length,texts:r,isWordLike:i,kinds:a,starts:o}}function ml(e,t,n=`normal`,r=`normal`){let i=qs(n),a=i.mode===`pre-wrap`?Ys(e):Js(e);if(a.length===0)return{normalized:a,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let o=dl(a,t,i),s=r===`keep-all`?pl(a,o,t.breakKeepAllAfterPunctuation):o;return{normalized:a,chunks:fl(s,i),...s}}var hl=null,gl=new Map,_l=null,vl=96,yl=/\p{Emoji_Presentation}/u,bl=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u,xl=null,Sl=new Map;function Cl(){if(hl!==null)return hl;if(typeof OffscreenCanvas<`u`)return hl=new OffscreenCanvas(1,1).getContext(`2d`),hl;if(typeof document<`u`)return hl=document.createElement(`canvas`).getContext(`2d`),hl;throw Error(`Text measurement requires OffscreenCanvas or a DOM canvas context.`)}function wl(e){let t=gl.get(e);return t||(t=new Map,gl.set(e,t)),t}function Tl(e,t){let n=t.get(e);return n===void 0&&(n={width:Cl().measureText(e).width,containsCJK:ic(e)},t.set(e,n)),n}function El(){if(_l!==null)return _l;if(typeof navigator>`u`)return _l={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},_l;let e=navigator.userAgent,t=navigator.vendor===`Apple Computer, Inc.`&&e.includes(`Safari/`)&&!e.includes(`Chrome/`)&&!e.includes(`Chromium/`)&&!e.includes(`CriOS/`)&&!e.includes(`FxiOS/`)&&!e.includes(`EdgiOS/`),n=e.includes(`Chrome/`)||e.includes(`Chromium/`)||e.includes(`CriOS/`)||e.includes(`Edg/`);return _l={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},_l}function Dl(e){let t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function Ol(){return xl===null&&(xl=new Intl.Segmenter(void 0,{granularity:`grapheme`})),xl}function kl(e){return yl.test(e)||e.includes(`️`)}function Al(e){return bl.test(e)}function jl(e,t){let n=Sl.get(e);if(n!==void 0)return n;let r=Cl();r.font=e;let i=r.measureText(`😀`).width;if(n=0,i>t+.5&&typeof document<`u`&&document.body!==null){let t=document.createElement(`span`);t.style.font=e,t.style.display=`inline-block`,t.style.visibility=`hidden`,t.style.position=`absolute`,t.textContent=`😀`,document.body.appendChild(t);let r=t.getBoundingClientRect().width;document.body.removeChild(t),i-r>.5&&(n=i-r)}return Sl.set(e,n),n}function Ml(e){let t=0,n=Ol();for(let r of n.segment(e))kl(r.segment)&&t++;return t}function Nl(e,t){return t.emojiCount===void 0&&(t.emojiCount=Ml(e)),t.emojiCount}function Pl(e,t,n){return n===0?t.width:t.width-Nl(e,t)*n}function Fl(e,t,n,r,i){if(t.breakableFitAdvances!==void 0&&t.breakableFitMode===i)return t.breakableFitAdvances;t.breakableFitMode=i;let a=Ol(),o=[];for(let t of a.segment(e))o.push(t.segment);if(o.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(i===`sum-graphemes`){let e=[];for(let t of o){let i=Tl(t,n);e.push(Pl(t,i,r))}return t.breakableFitAdvances=e,t.breakableFitAdvances}if(i===`pair-context`||o.length>vl){let e=[],i=null,a=0;for(let t of o){let o=Pl(t,Tl(t,n),r);if(i===null)e.push(o);else{let o=i+t,s=Tl(o,n);e.push(Pl(o,s,r)-a)}i=t,a=o}return t.breakableFitAdvances=e,t.breakableFitAdvances}let s=[],c=``,l=0;for(let e of o){c+=e;let t=Tl(c,n),i=Pl(c,t,r);s.push(i-l),l=i}return t.breakableFitAdvances=s,t.breakableFitAdvances}function Il(e,t){let n=Cl();n.font=e;let r=wl(e),i=Dl(e);return{cache:r,fontSize:i,emojiCorrection:t?jl(e,i):0}}function Ll(e){return e===`space`||e===`zero-width-break`||e===`soft-hyphen`}function Rl(e){return e===`space`||e===`preserved-space`||e===`tab`||e===`zero-width-break`||e===`soft-hyphen`}function zl(e,t,n=e.widths.length){for(;t<n;){let n=e.kinds[t];if(!Ll(n))break;t++}return t}function Bl(e,t){if(t<=0)return 0;let n=e%t;return Math.abs(n)<=1e-6?t:t-n}function W(e,t,n){return e.letterSpacing!==0&&t&&e.spacingGraphemeCounts[n]>0?e.letterSpacing:0}function G(e,t){return t===0?0:e+t}function K(e,t){return e.letterSpacing!==0&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}function q(e,t,n,r,i){return G(r,t===`tab`?i+K(e,n):e.lineEndFitAdvances[n])}function J(e,t,n,r){return G(r,t===`tab`?0:e.lineEndFitAdvances[n])}function Vl(e,t,n,r,i){return G(r,t===`tab`?i:e.lineEndPaintAdvances[n])}function Hl(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function Ul(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function Wl(e,t,n){let r=t;for(;r<e.length&&e[r]<n;)r++;return r}function Gl(e,t,n,r,i){if(e.letterSpacing===0)return 0;if(i>0)return e.spacingGraphemeCounts[r]>0?e.letterSpacing:0;for(let i=r-1;i>=t;i--){let a=e.kinds[i];if(!(a===`space`||a===`zero-width-break`||a===`hard-break`)){if(a===`soft-hyphen`){if(i===r-1)return 0;continue}return i===t&&n>0||e.spacingGraphemeCounts[i]>0?e.letterSpacing:0}}return 0}function Kl(e,t,n,r,i,a){return t+Gl(e,n,r,i,a)}function ql(e,t,n){let{widths:r,kinds:i,breakableFitAdvances:a,breakablePreferredBreaks:o}=e;if(r.length===0)return 0;let s=t+El().lineFitEpsilon,c=0,l=0,u=!1,d=0,f=0,p=0,m=0,h=-1,g=0;function _(){h=-1,g=0}function v(e=p,t=m,r=l){c++,n?.(r,d,f,e,t),l=0,u=!1,_()}function y(e,t){u=!0,d=e,f=0,p=e+1,m=0,l=t}function b(e,t,n){u=!0,d=e,f=t,p=e,m=t+1,l=n}function x(e,t){if(!u){y(e,t);return}l+=t,p=e+1,m=0}function S(e,t){let n=a[e],r=o[e]??null,i=r===null?-1:Wl(r,0,t+1),c=-1,d=0,f=t;for(;f<n.length;){let a=n[f];if(!u)b(e,f,a);else if(l+a>s){if(r!==null&&c>t){v(e,c,d),f=c,i=Wl(r,i,f+1),c=-1,d=0;continue}v(),b(e,f,a)}else l+=a,p=e,m=f+1;let o=f+1;r!==null&&r[i]===o&&(c=o,d=l,i++),f++}u&&p===e&&m===n.length&&(p=e+1,m=0)}let C=0;for(;C<r.length&&!(!u&&(C=zl(e,C),C>=r.length));){let e=r[C],t=i[C],n=Rl(t);if(!u){e>s&&a[C]!==null?S(C,0):y(C,e),n&&(h=C+1,g=l-e),C++;continue}if(l+e>s){if(n){x(C,e),v(C+1,0,l-e),C++;continue}if(h>=0){if(p>h||p===h&&m>0){v();continue}v(h,0,g);continue}if(e>s&&a[C]!==null){v(),S(C,0),C++;continue}v();continue}x(C,e),n&&(h=C+1,g=l-e),C++}return u&&v(),c}function Jl(e,t,n){if(e.simpleLineWalkFastPath)return ql(e,t,n);let{widths:r,kinds:i,breakableFitAdvances:a,breakablePreferredBreaks:o,discretionaryHyphenWidth:s,chunks:c}=e;if(r.length===0||c.length===0)return 0;let l=El(),u=t+l.lineFitEpsilon,d=0,f=0,p=!1,m=0,h=0,g=0,_=0,v=-1,y=0,b=0,x=null;function S(){v=-1,y=0,b=0,x=null}function C(){return x===`soft-hyphen`&&v===g&&_===0?b:f}function w(t=g,r=_,i){d++,n!==void 0&&n(Kl(e,i??C(),m,h,t,r),m,h,t,r),f=0,p=!1,S()}function T(e,t){p=!0,m=e,h=0,g=e+1,_=0,f=t}function E(e,t,n){p=!0,m=e,h=t,g=e,_=t+1,f=n}function ee(e,t){if(!p){T(e,t);return}f+=t,g=e+1,_=0}function te(t,n,r,i,a,o){if(!n)return;let s=J(e,t,r,a),c=Vl(e,t,r,a,i);v=r+1,y=f-o+s,b=f-o+c,x=t}function ne(t,n){let r=a[t],i=o[t]??null,s=i===null?-1:Wl(i,0,n+1),c=-1,l=0,d=n;for(;d<r.length;){let a=r[d];if(!p)E(t,d,a);else{let r=Hl(e,!0,a),o=f+r;if(Ul(e,o)>u){if(i!==null&&c>n){w(t,c,l),d=c,s=Wl(i,s,d+1),c=-1,l=0;continue}w(),E(t,d,a)}else f=o,g=t,_=d+1}let o=d+1;i!==null&&i[s]===o&&(c=o,l=f,s++),d++}p&&g===t&&_===r.length&&(g=t+1,_=0)}function re(e){d++,n?.(0,e.startSegmentIndex,0,e.consumedEndSegmentIndex,0),S()}for(let t=0;t<c.length;t++){let n=c[t];if(n.startSegmentIndex===n.endSegmentIndex){re(n);continue}p=!1,f=0,m=n.startSegmentIndex,h=0,g=n.startSegmentIndex,_=0,S();let o=n.startSegmentIndex;for(;o<n.endSegmentIndex&&!(!p&&(o=zl(e,o,n.endSegmentIndex),o>=n.endSegmentIndex));){let t=i[o],n=Rl(t),c=W(e,p,o),d=t===`tab`?Bl(f+c,e.tabStopAdvance):r[o],m=c+d,h=q(e,t,o,c,d);if(t===`soft-hyphen`){p&&(g=o+1,_=0,v=o+1,y=f+s,b=f+s,x=t),o++;continue}if(!p){h>u&&a[o]!==null?ne(o,0):T(o,d),te(t,n,o,d,c,m),o++;continue}if(f+h>u){let r=f+J(e,t,o,c),i=f+Vl(e,t,o,c,d);if(x===`soft-hyphen`&&l.preferEarlySoftHyphenBreak&&y<=u){w(v,0,b);continue}if(n&&r<=u){ee(o,m),w(o+1,0,i),o++;continue}if(v>=0&&y<=u){if(g>v||g===v&&_>0){w();continue}let e=v;w(e,0,b),o=e;continue}if(h>u&&a[o]!==null){w(),ne(o,0),o++;continue}w();continue}ee(o,m),te(t,n,o,d,c,m),o++}if(p){let e=v===n.consumedEndSegmentIndex?b:f;w(n.consumedEndSegmentIndex,0,e)}}return d}var Yl=null;function Xl(){return Yl===null&&(Yl=new Intl.Segmenter(void 0,{granularity:`grapheme`})),Yl}function Zl(e){return e?{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}:{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}function Ql(e,t){let n=[],r=[],i=0,a=!1,o=!1,s=!1;function c(){r.length!==0&&(n.push({text:r.length===1?r[0]:r.join(``),start:i}),r=[],a=!1,o=!1,s=!1)}function l(e,t,n){r=[e],i=t,a=n,o=Lc(e),s=fc.has(e)}function u(e,t){r.push(e),a||=t;let n=Lc(e);e.length===1&&mc.has(e)?o||=n:o=n,s=!1}for(let n of Xl().segment(e)){let e=n.segment,i=ic(e);if(r.length===0){l(e,n.index,i);continue}if(s||dc.has(e)||mc.has(e)||t.carryCJKAfterClosingQuote&&i&&o){u(e,i);continue}if(!a&&!i){u(e,i);continue}c(),l(e,n.index,i)}return c(),n}function $l(e,t,n){if(t.length<=1)return t;let r=[],i=-1,a=!1;function o(n,i){let a=t[n].start,o=i<t.length?t[i].start:e.length;r.push({text:e.slice(a,o),start:a})}function s(e){if(!(i<0)){if(a)i+1===e?r.push(t[i]):o(i,e);else for(let n=i;n<e;n++)r.push(t[n]);i=-1,a=!1}}for(let e=0;e<t.length;e++){let r=t[e];i>=0&&!uc(t[e-1].text,n)&&s(e),i<0&&(i=e),a||=ic(r.text)}return s(t.length),r}function eu(e,t){if(t===`zero-width-break`||t===`soft-hyphen`||t===`hard-break`)return 0;if(t===`tab`)return 1;let n=0,r=Xl();for(let t of r.segment(e))n++;return n}function tu(e){return e===`-`||e===`֊`||e===`‐`||e===`‒`||e===`–`||e===`—`}function nu(e){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(e))return null;let t=[],n=0;for(let r of Xl().segment(e))n++,tu(r.segment)&&t.push(n);return t.length===0?null:t}function ru(e,t,n){return t>1?e+(t-1)*n:e}function iu(e,t,n,r,i){let a=El(),{cache:o,emojiCorrection:s}=Il(t,Al(e.normalized)),c=Pl(`-`,Tl(`-`,o),s)+(i===0?0:i*2),l=Pl(` `,Tl(` `,o),s)*8,u=i!==0;if(e.len===0)return Zl(n);let d=[],f=[],p=[],m=[],h=e.chunks.length<=1&&!u,g=n?[]:null,_=[],v=[],y=[],b=n?[]:null,x=Array.from({length:e.len});function S(e,t,n,r,i,a,o,s,c){i!==`text`&&i!==`space`&&i!==`zero-width-break`&&(h=!1),d.push(t),f.push(n),p.push(r),m.push(i),g?.push(a),_.push(o),v.push(s),u&&y.push(c),b!==null&&b.push(e)}function C(e,t,n,c,l){let d=Tl(e,o),f=u?eu(e,t):0,p=ru(Pl(e,d,s),f,i),m=t===`space`||t===`preserved-space`||t===`zero-width-break`?0:p,h=m===0?0:m+(f>0?i:0),g=t===`space`||t===`zero-width-break`?0:p;if(l&&c&&e.length>1){let c=`sum-graphemes`;i===0?al(e)?c=`pair-context`:a.preferPrefixWidthsForBreakableRuns&&(c=`segment-prefixes`):c=`segment-prefixes`;let l=Fl(e,d,o,s,c);S(e,p,h,g,t,n,l,l===null||r===`keep-all`?null:nu(e),f);return}S(e,p,h,g,t,n,null,null,f)}for(let t=0;t<e.len;t++){x[t]=d.length;let n=e.texts[t],i=e.isWordLike[t],s=e.kinds[t],l=e.starts[t];if(s===`soft-hyphen`){S(n,0,c,c,s,l,null,null,0);continue}if(s===`hard-break`){S(n,0,0,0,s,l,null,null,0);continue}if(s===`tab`){S(n,0,0,0,s,l,null,null,u?eu(n,s):0);continue}let f=Tl(n,o);if(s===`text`&&f.containsCJK){let e=Ql(n,a),t=r===`keep-all`?$l(n,e,a.breakKeepAllAfterPunctuation):e;for(let e=0;e<t.length;e++){let n=t[e];C(n.text,`text`,l+n.start,i,r===`keep-all`||!ic(n.text))}continue}C(n,s,l,i,!0)}let w=au(e.chunks,x,d.length),T=g===null?null:Ws(e.normalized,g);return b===null?{widths:d,lineEndFitAdvances:f,lineEndPaintAdvances:p,kinds:m,simpleLineWalkFastPath:h,segLevels:T,breakableFitAdvances:_,breakablePreferredBreaks:v,letterSpacing:i,spacingGraphemeCounts:y,discretionaryHyphenWidth:c,tabStopAdvance:l,chunks:w}:{widths:d,lineEndFitAdvances:f,lineEndPaintAdvances:p,kinds:m,simpleLineWalkFastPath:h,segLevels:T,breakableFitAdvances:_,breakablePreferredBreaks:v,letterSpacing:i,spacingGraphemeCounts:y,discretionaryHyphenWidth:c,tabStopAdvance:l,chunks:w,segments:b}}function au(e,t,n){let r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a.startSegmentIndex<t.length?t[a.startSegmentIndex]:n,s=a.endSegmentIndex<t.length?t[a.endSegmentIndex]:n,c=a.consumedEndSegmentIndex<t.length?t[a.consumedEndSegmentIndex]:n;r.push({startSegmentIndex:o,endSegmentIndex:s,consumedEndSegmentIndex:c})}return r}function ou(e,t,n,r){let i=r?.wordBreak??`normal`,a=r?.letterSpacing??0;return iu(ml(e,El(),r?.whiteSpace,i),t,n,i,a)}function su(e,t,n){return ou(e,t,!0,n)}function cu(e){return e}function lu(e){let t=0;return Jl(cu(e),1/0,e=>{e>t&&(t=e)}),t}function uu(e){let t=e.toLowerCase().replace(/^←\s*/,``);return t.includes(`force push`)?`force-push`:t.includes(`cherry`)?`cherry-pick`:t.includes(`uncommit`)?`uncommit`:t.includes(`revert`)?`revert`:t.includes(`rebase`)?`rebase`:t.includes(`merge`)?`merge`:t.includes(`checkout`)?`checkout`:t.includes(`fetch`)?`fetch`:t.includes(`push`)?`push`:t.includes(`delete`)?`delete`:t.includes(`move`)?`move`:t.includes(`reset`)?`reset`:t.includes(`branch`)?`branch`:t.includes(`tag`)?`tag`:`checkout`}function du({name:e,size:t=14}){let n={fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`};return(0,E.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:t,height:t,viewBox:`0 0 24 24`,style:{flex:`0 0 auto`},children:[e===`branch`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`circle`,{...n,cx:`6`,cy:`6`,r:`3`}),(0,E.jsx)(`circle`,{...n,cx:`18`,cy:`18`,r:`3`}),(0,E.jsx)(`path`,{...n,d:`M6 9v9`}),(0,E.jsx)(`path`,{...n,d:`M9 18h6`})]}),e===`checkout`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M5 12h14`}),(0,E.jsx)(`path`,{...n,d:`m13 6 6 6-6 6`}),(0,E.jsx)(`path`,{...n,d:`M5 5v14`})]}),e===`cherry-pick`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`circle`,{...n,cx:`7`,cy:`7`,r:`3`}),(0,E.jsx)(`circle`,{...n,cx:`17`,cy:`17`,r:`3`}),(0,E.jsx)(`path`,{...n,d:`M10 7h2a5 5 0 0 1 5 5v2`})]}),e===`delete`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M3 6h18`}),(0,E.jsx)(`path`,{...n,d:`M8 6V4h8v2`}),(0,E.jsx)(`path`,{...n,d:`m19 6-1 14H6L5 6`}),(0,E.jsx)(`path`,{...n,d:`M10 11v5`}),(0,E.jsx)(`path`,{...n,d:`M14 11v5`})]}),e===`fetch`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M12 5v12`}),(0,E.jsx)(`path`,{...n,d:`m7 12 5 5 5-5`}),(0,E.jsx)(`path`,{...n,d:`M5 20h14`})]}),e===`force-push`&&(0,E.jsx)(`path`,{...n,d:`M13 2 4 14h7l-1 8 10-13h-7l0-7Z`}),e===`merge`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`circle`,{...n,cx:`6`,cy:`6`,r:`3`}),(0,E.jsx)(`circle`,{...n,cx:`6`,cy:`18`,r:`3`}),(0,E.jsx)(`circle`,{...n,cx:`18`,cy:`18`,r:`3`}),(0,E.jsx)(`path`,{...n,d:`M6 9v6`}),(0,E.jsx)(`path`,{...n,d:`M9 6h1a8 8 0 0 1 8 8v1`})]}),e===`move`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M3 12h18`}),(0,E.jsx)(`path`,{...n,d:`m8 7-5 5 5 5`}),(0,E.jsx)(`path`,{...n,d:`m16 7 5 5-5 5`})]}),e===`push`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M12 19V5`}),(0,E.jsx)(`path`,{...n,d:`m7 10 5-5 5 5`}),(0,E.jsx)(`path`,{...n,d:`M5 20h14`})]}),e===`rebase`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`circle`,{...n,cx:`6`,cy:`6`,r:`3`}),(0,E.jsx)(`circle`,{...n,cx:`6`,cy:`18`,r:`3`}),(0,E.jsx)(`circle`,{...n,cx:`18`,cy:`12`,r:`3`}),(0,E.jsx)(`path`,{...n,d:`M6 9v6`}),(0,E.jsx)(`path`,{...n,d:`M9 6h2a7 7 0 0 1 7 7`})]}),e===`reset`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M4 7v6h6`}),(0,E.jsx)(`path`,{...n,d:`M20 17a8 8 0 0 1-14.9-4`}),(0,E.jsx)(`path`,{...n,d:`M4 13A8 8 0 0 1 19 8`})]}),e===`revert`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.7 2.7L3 8`}),(0,E.jsx)(`path`,{...n,d:`M3 3v5h5`})]}),e===`tag`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M20 10 10 20 4 14V4h10l6 6Z`}),(0,E.jsx)(`circle`,{...n,cx:`9`,cy:`9`,r:`1`})]}),e===`uncommit`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M9 14 4 9l5-5`}),(0,E.jsx)(`path`,{...n,d:`M4 9h10a6 6 0 0 1 0 12h-1`})]})]})}function fu({size:e=13}){return(0,E.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:e,height:e,viewBox:`0 0 24 24`,style:{flex:`0 0 auto`},children:(0,E.jsx)(`path`,{d:`M12 3a9 9 0 0 1 9 9`,fill:`none`,stroke:`currentColor`,strokeWidth:2.4,strokeLinecap:`round`,children:(0,E.jsx)(`animateTransform`,{attributeName:`transform`,type:`rotate`,from:`0 12 12`,to:`360 12 12`,dur:`0.8s`,repeatCount:`indefinite`})})})}function pu({label:e,onClick:t,tone:n,onMouseEnter:r,onMouseLeave:i}){let a=n===`success`?`#0b1020`:n===`warning`?`#fff7d6`:n===`merge`?`#fff7ff`:`#fff7ed`,o=n===`success`?`#6d9658`:n===`warning`?`#d8a43a`:n===`merge`?`#b764d9`:`#9a3412`,s=n===`success`?`#8dcf78`:n===`warning`?`#b88a25`:n===`merge`?`#c77de4`:`#b45309`,c=n===`success`?`#9cda89`:n===`warning`?`#c99a30`:n===`merge`?`#d08bea`:`#c26115`;return(0,E.jsxs)(`button`,{onClick:e=>{e.stopPropagation(),t()},style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,minWidth:104,height:30,padding:`0 12px`,background:s,border:`1px solid ${o}`,borderRadius:7,color:a,fontSize:10,fontWeight:700,cursor:`pointer`,fontFamily:`inherit`,whiteSpace:`nowrap`,position:`relative`,zIndex:8,boxShadow:`0 10px 24px rgba(0,0,0,0.35)`,gap:6,lineHeight:1},onMouseEnter:e=>{e.currentTarget.style.background=c},onMouseLeave:e=>{e.currentTarget.style.background=s},onPointerEnter:r,onPointerLeave:i,children:[(0,E.jsx)(du,{name:uu(e)}),(0,E.jsx)(`span`,{children:e})]})}function mu({label:e,onClick:t,tone:n,size:r=`default`,variant:i=`solid`,disabled:a=!1,loading:o=!1}){let s=r===`compact`,c=i===`ghost`,l=a||o,u=n===`danger`?`#5c2430`:n===`warning`?`#7a4e11`:n===`success`?`#2c4231`:`#2f3348`,d=n===`danger`?`#6a2b39`:n===`warning`?`#8a5a16`:n===`success`?`#37523d`:`#3a4058`,f=n===`danger`?`#8b3a4a`:n===`warning`?`#d19128`:n===`success`?`#588a5c`:`#4a4f68`,p=n===`danger`?`#f5a6b8`:n===`warning`?`#f9d28b`:n===`success`?`#a6e3a1`:c?`#bac2de`:`#cdd6f4`;return(0,E.jsxs)(`button`,{onClick:e=>{e.stopPropagation(),!l&&t()},disabled:l,"aria-busy":o||void 0,style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,minWidth:s?72:84,height:s?20:28,padding:s?`0 8px`:`0 10px`,background:c?`rgba(24,24,37,0.5)`:u,border:c?`1px solid transparent`:`1px solid ${f}`,color:p,fontSize:10,fontWeight:600,cursor:l?`default`:`pointer`,opacity:a&&!o?.62:1,borderRadius:s?6:7,fontFamily:`inherit`,whiteSpace:`nowrap`,gap:s?5:6,lineHeight:1},onMouseEnter:e=>{l||(e.currentTarget.style.background=c?`rgba(49,50,68,0.8)`:d)},onMouseLeave:e=>{l||(e.currentTarget.style.background=c?`rgba(24,24,37,0.5)`:u)},children:[o?(0,E.jsx)(fu,{size:s?12:13}):(0,E.jsx)(du,{name:uu(e),size:s?12:13}),(0,E.jsx)(`span`,{children:e})]})}function hu(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=Math.hypot(r,i)||1;return{x:e.x+r/a*n,y:e.y+i/a*n}}function gu(e,t,n,r,i){let a=1-i,o=a**3,s=3*a**2*i,c=3*a*i**2,l=i**3;return{x:e.x*o+t.x*s+n.x*c+r.x*l,y:e.y*o+t.y*s+n.y*c+r.y*l}}function _u(e,t,n){let r=n.x-t.x,i=n.y-t.y,a=r*r+i*i;if(a===0)return(e.x-t.x)**2+(e.y-t.y)**2;let o=Math.max(0,Math.min(1,((e.x-t.x)*r+(e.y-t.y)*i)/a)),s=t.x+o*r,c=t.y+o*i;return(e.x-s)**2+(e.y-c)**2}function vu(e,t,n,r){let i=r.nodeRadius-1,a=hu(e,t,i),o=hu(t,e,i),s=o.y-a.y,c={x:a.x,y:a.y+s*r.curveControlRatio},l={x:o.x,y:o.y-s*r.curveControlRatio},u=(r.nodeRadius+r.clearance)**2,d=Math.max(32,Math.ceil(Math.hypot(o.x-a.x,o.y-a.y)/4)),f=Math.min(e.idx,t.idx)+1,p=Math.max(e.idx,t.idx)-1,m=[];for(let t=f;t<=p;t++){let i=n[t];i!==void 0&&m.push({x:e.x+(i-e.lane)*r.laneWidth,y:e.y+(t-e.idx)*r.rowHeight})}let h=a;for(let e=1;e<=d;e++){let t=gu(a,c,l,o,e/d);if(m.some(e=>_u(e,h,t)<=u))return!0;h=t}return!1}function yu(e,t,n,r){let i=r===`from`?e.lane:t.lane,a=Math.min(e.idx,t.idx)+1,o=Math.max(e.idx,t.idx)-1;for(let e=a;e<=o;e++)if(n[e]===i)return!1;return!0}function bu(e,t,n,r,i){if(Math.abs(t.idx-e.idx)<2||!vu(e,t,n,r))return null;if(yu(e,t,n,i))return i;let a=i===`from`?`to`:`from`;return yu(e,t,n,a)?a:null}var xu={position:`fixed`,inset:0,margin:`auto`,width:`min(420px, calc(100vw - 32px))`,padding:0,border:`1px solid #45475a`,borderRadius:8,background:`#1e1e2e`,color:`#cdd6f4`,boxShadow:`0 22px 64px rgba(0,0,0,0.58)`},Su={display:`flex`,flexDirection:`column`,gap:14,padding:18,fontFamily:`system-ui, -apple-system, sans-serif`},Cu={margin:0,color:`#f5e0dc`,fontSize:16,fontWeight:700,lineHeight:1.25},wu={height:30,padding:`0 12px`,borderRadius:6,border:`1px solid #45475a`,background:`#181825`,color:`#bac2de`,fontSize:12,fontWeight:700,fontFamily:`inherit`,cursor:`pointer`},Tu={height:30,padding:`0 12px`,borderRadius:6,border:`1px solid #6d9658`,background:`#8dcf78`,color:`#0b1020`,fontSize:12,fontWeight:800,fontFamily:`inherit`,cursor:`pointer`};function Eu({open:e,title:t,label:n,initialValue:r=``,confirmLabel:i,onSubmit:a,onClose:o}){let s=(0,x.useRef)(null),c=(0,x.useRef)(null),[l,u]=(0,x.useState)(r);return(0,x.useEffect)(()=>{e&&u(r)},[r,e]),(0,x.useEffect)(()=>{let t=s.current;if(t){if(e){t.open||t.showModal(),requestAnimationFrame(()=>c.current?.focus());return}t.open&&t.close()}},[e]),(0,E.jsx)(`dialog`,{ref:s,"aria-labelledby":`text-input-dialog-title`,onCancel:o,onClose:o,onClick:e=>{e.target===e.currentTarget&&o()},style:xu,children:(0,E.jsxs)(`form`,{method:`dialog`,onSubmit:e=>{e.preventDefault();let t=l.trim();if(!t){c.current?.focus();return}a(t)},onClick:e=>e.stopPropagation(),style:Su,children:[(0,E.jsx)(`h2`,{id:`text-input-dialog-title`,style:Cu,children:t}),(0,E.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:7,color:`#bac2de`,fontSize:12,fontWeight:700},children:[n,(0,E.jsx)(`input`,{ref:c,value:l,onChange:e=>u(e.target.value),required:!0,autoComplete:`off`,spellCheck:!1,style:{height:34,padding:`0 10px`,borderRadius:6,border:`1px solid #45475a`,background:`#11111b`,color:`#cdd6f4`,fontSize:13,fontFamily:`inherit`,outline:`none`}})]}),(0,E.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,paddingTop:2},children:[(0,E.jsx)(`button`,{type:`button`,onClick:o,style:wu,children:`Cancel`}),(0,E.jsx)(`button`,{type:`submit`,value:`confirm`,style:Tu,children:i})]})]})})}function Du({open:e,title:t,message:n,confirmLabel:r,onConfirm:i,onClose:a}){let o=(0,x.useRef)(null);return(0,x.useEffect)(()=>{let t=o.current;if(t){if(e){t.open||t.showModal();return}t.open&&t.close()}},[e]),(0,E.jsx)(`dialog`,{ref:o,"aria-labelledby":`confirm-dialog-title`,onCancel:a,onClose:a,onClick:e=>{e.target===e.currentTarget&&a()},style:xu,children:(0,E.jsxs)(`form`,{method:`dialog`,onSubmit:e=>{e.preventDefault(),i()},onClick:e=>e.stopPropagation(),style:Su,children:[(0,E.jsx)(`h2`,{id:`confirm-dialog-title`,style:Cu,children:t}),(0,E.jsx)(`p`,{style:{margin:0,color:`#bac2de`,fontSize:13,lineHeight:1.45},children:n}),(0,E.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,paddingTop:2},children:[(0,E.jsx)(`button`,{type:`button`,onClick:a,style:wu,children:`Cancel`}),(0,E.jsx)(`button`,{type:`submit`,value:`confirm`,style:Tu,children:r})]})]})})}var Ou=56,ku=20,Au=80,ju=16,Mu=`#11111b`,Nu=20,Pu=30,Fu=28,Iu=24,Lu=112,Ru=ju-5,zu=`#1e1e2e`,Bu=`#45475a`,Vu=`#cdd6f455`,Hu=`#cdd6f422`,Uu=`#a6e3a1`,Wu=`#f38ba8`,Gu=2,Ku=.85,Y=12,qu=6,Ju=30,Yu=6,Xu=4,Zu=520,Qu=40,$u=Ou*2,ed=260,td=160,nd={mass:2.1,tension:180,friction:28},rd=6,id=14,ad=`600 11px system-ui, -apple-system, sans-serif`,od=Ou*.55,sd=Ou*.3,cd=54,ld={laneWidth:Au,rowHeight:Ou,nodeRadius:ju,clearance:2,curveControlRatio:.3},ud=[`#89b4fa`,`#a6e3a1`,`#f9e2af`,`#f38ba8`,`#cba6f7`,`#94e2d5`,`#fab387`,`#74c7ec`,`#f5c2e7`,`#b4befe`],dd=new Map;function fd(e){return ud[(e%ud.length+ud.length)%ud.length]}function pd(e){return ud[wd(e)%ud.length]}function md(e,t){let n=t.get(e);return n?pd(n):ud[wd(e)%ud.length]}function hd(e){return Math.round((Nu-e)/2)}function gd(e,t){return!!e&&e.action===t.action&&e.refName===t.refName&&e.sha===t.sha&&e.force===t.force}function _d(e){return!!e&&typeof e==`object`&&e.code===`CONFLICT`}function vd(e){let t=/^(v?)(\d+)\.(\d+)\.(\d+)$/.exec(e);return t?{hasVPrefix:t[1]===`v`,major:Number(t[2]),minor:Number(t[3]),patch:Number(t[4])}:null}function yd(e,t){return e.major-t.major||e.minor-t.minor||e.patch-t.patch||Number(e.hasVPrefix)-Number(t.hasVPrefix)}function bd(e){let t=null;for(let n of e){if(n.kind!==`tag`)continue;let e=vd(n.shortName);e&&(!t||yd(e,t)>0)&&(t=e)}return t?`${t.hasVPrefix?`v`:``}${t.major}.${t.minor}.${t.patch+1}`:``}function xd(e){return e?e.startsWith(`refs/remotes/`)?e.slice(13):e:null}function X(e,t){let n=xd(e.upstream);if(n)return t.find(e=>e.kind===`remote`&&e.shortName===n)??null;let r=t.find(t=>t.kind===`remote`&&t.shortName===`origin/${e.shortName}`);if(r)return r;let i=t.filter(t=>t.kind===`remote`&&t.shortName.endsWith(`/${e.shortName}`));return i.length===1?i[0]:null}function Sd(e,t=0){let n=1/0,r=-1/0,i=[],a=new Map,o=new Map;for(let t=0;t<e.length;t++){let i=e[t];i.lane<n&&(n=i.lane),i.lane>r&&(r=i.lane),o.set(i.sha,i)}let s=Math.max(Math.abs(Number.isFinite(n)?n:0),Math.abs(Number.isFinite(r)?r:0)),c=td+t;for(let t=0;t<e.length;t++){let n=e[t],r={row:n,x:c+(n.lane+s)*Au,y:152+t*Ou,idx:t};i.push(r),a.set(n.sha,r)}let l=new Map;for(let t of e){let e=$d(t.refNames);if(!e)continue;let n=t.sha;for(;n&&!l.has(n);){l.set(n,e);let t=o.get(n);if(!t||t.parentShas.length===0)break;n=t.parentShas[0]}}let u=new Map;for(let e of i)u.set(e.row.sha,md(e.row.sha,l));return{nodes:i,shaToNode:a,shaToBranch:l,shaToColor:u,maxLane:r,totalWidth:200+t+(s*2+1)*Au+Zu,totalHeight:e.length*Ou+Qu*2+$u}}function Cd(e,t,n,r){if(e===n)return`M${e},${t}L${n},${r}`;let i=r-t;return`M${e},${t}C${e},${t+i*.3} ${n},${r-i*.3} ${n},${r}`}function wd(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return t}function Td(e,t,n,r,i){let a=n-e,o=r-t,s=Math.hypot(a,o)||1;return{x:e+a/s*i,y:t+o/s*i}}function Ed(e,t){if(e.length===0)return``;if(e.length===1)return`M${e[0].x},${e[0].y}`;let n=`M${e[0].x},${e[0].y}`;for(let r=1;r<e.length-1;r++){let i=e[r-1],a=e[r],o=e[r+1],s=a.x-i.x,c=a.y-i.y,l=o.x-a.x,u=o.y-a.y,d=Math.hypot(s,c),f=Math.hypot(l,u);if(d<.001||f<.001){n+=`L${a.x},${a.y}`;continue}let p=Math.min(t,d/2,f/2),m=a.x-s/d*p,h=a.y-c/d*p,g=a.x+l/f*p,_=a.y+u/f*p;n+=`L${m},${h}Q${a.x},${a.y} ${g},${_}`}let r=e[e.length-1];return n+=`L${r.x},${r.y}`,n}function Dd(e,t,n){let r=Math.abs(t.idx-e.idx),i=Math.min(e.y,t.y),a=wd(n),o=r>12?[.28,.42,.56,.7]:[.35,.5,.65],s=o[a%o.length]??.5,c=Math.max(0,Math.min(r-1,Math.round((r-1)*s))),l=((a>>3)%3-1)*4;return i+Ou*(c+.5)+l}function Od(e,t,n,r){let i=Math.max(0,Math.min(t,n)+1),a=Math.min(e.length-1,Math.max(t,n)-1),o=0;for(let t=i;t<=a;t++){let n=e[t];r(n,t)&&o++}return o}function kd(e,t,n){let r=t.y>e.y?1:-1,i=Td(e.x,e.y,n,e.y+r*24,ju-1),a=Td(t.x,t.y,n,t.y-r*24,ju-1),o=e.y+r*24,s=t.y-r*24;return Ed([i,{x:n,y:o},{x:n,y:s},a],Y)}function Ad(e,t,n){let r=t.y>e.y?1:-1,i=Td(e.x,e.y,n,t.y,ju-1),a=Td(t.x,t.y,n,t.y,ju-1);return Ed([i,{x:n,y:e.y+r*24},{x:n,y:t.y},a],Y)}function jd(e,t,n,r,i){let a=Td(e.x,e.y,t.x,t.y,ju-1),o=Td(t.x,t.y,e.x,e.y,ju-1),s=t.y>e.y?1:-1,c=e.y+s*24,l=t.y-s*24;return Ed([a,{x:n,y:c},{x:n,y:i},{x:r,y:i},{x:r,y:l},o],Y)}function Md(e,t){let n=Td(e.x,e.y,t.x,t.y,ju-1),r=Td(t.x,t.y,e.x,e.y,ju-1);return`M${n.x},${n.y}L${r.x},${r.y}`}function Nd(e,t){let n=Td(e.x,e.y,t.x,t.y,ju-1),r=Td(t.x,t.y,e.x,e.y,ju-1);return Cd(n.x,n.y,r.x,r.y)}function Pd(e,t,n,r,i={}){let a=Math.abs(e.row.lane-t.row.lane),o=Math.abs(t.idx-e.idx);if(a===0)return{mode:`straight`};if(a===1&&o>=qu)return{mode:`adjacent-hook`,laneA:Math.min(e.row.lane,t.row.lane),laneB:Math.max(e.row.lane,t.row.lane),track:i.adjacentTrack??`from`};if(o<qu){let n=i.adjacentTrack??`from`,a=bu({x:e.x,y:e.y,idx:e.idx,lane:e.row.lane},{x:t.x,y:t.y,idx:t.idx,lane:t.row.lane},r,ld,n);return a?{mode:`occlusion-hook`,laneA:Math.min(e.row.lane,t.row.lane),laneB:Math.max(e.row.lane,t.row.lane),track:a}:{mode:`curve`}}let s=Math.min(e.row.lane,t.row.lane),c=Math.max(e.row.lane,t.row.lane),l=wd(n)%3*Yu,u=t.x>e.x?1:-1,d=Ju+l,f=e.x+u*d,p=t.x-u*d,m=Dd(e,t,n),h=Math.max(e.x,t.x),g=Math.min(e.x,t.x),_=Od(r,e.idx,t.idx,e=>e>s&&e<c),v=Od(r,e.idx,t.idx,e=>e<s),y=Od(r,e.idx,t.idx,e=>e>c),b=e.x<t.x?`left`:(e.x,t.x,`right`),x=_*5+a,S=v*2+(b===`left`?0:.5),C=y*2+(b===`right`?0:.5);return C<=S&&C<x?{mode:`outer-rail`,side:`right`,anchorLane:c,innerLane:s,outerRailX:h}:S<x?{mode:`outer-rail`,side:`left`,anchorLane:s,innerLane:c,outerRailX:g}:{mode:`inside-rail`,minLane:s,maxLane:c,sourceRailX:f,targetRailX:p,crossoverY:m}}function Fd(e){switch(e.mode){case`outer-rail`:return`${e.mode}:${e.side}:${e.anchorLane}`;case`inside-rail`:return`${e.mode}:${e.minLane}:${e.maxLane}`;case`adjacent-hook`:case`occlusion-hook`:return`${e.mode}:${e.laneA}:${e.laneB}:${e.track}`;default:return null}}function Id(e,t,n,r){switch(n.mode){case`straight`:return Md(e,t);case`curve`:return Nd(e,t);case`adjacent-hook`:case`occlusion-hook`:return Ad(e,t,(n.track===`to`?t.x:e.x)+r);case`inside-rail`:return jd(e,t,n.sourceRailX+r,n.targetRailX+r,n.crossoverY);case`outer-rail`:return kd(e,t,n.outerRailX+r)}}function Ld(e,t,n){if(e.mode!==t.mode)return n<.5?e:t;switch(t.mode){case`straight`:case`curve`:return t;case`adjacent-hook`:case`occlusion-hook`:return t;case`inside-rail`:{let r=e;return{...t,sourceRailX:Z(r.sourceRailX,t.sourceRailX,n),targetRailX:Z(r.targetRailX,t.targetRailX,n),crossoverY:Z(r.crossoverY,t.crossoverY,n)}}case`outer-rail`:{let r=e;return{...t,outerRailX:Z(r.outerRailX,t.outerRailX,n)}}}}function Rd(e,t){return Id({x:Z(e.fromX1,e.toX1,t),y:Z(e.fromY1,e.toY1,t)},{x:Z(e.fromX2,e.toX2,t),y:Z(e.fromY2,e.toY2,t)},Ld(e.fromPlan,e.toPlan,t),Z(e.fromBundleOffset,e.toBundleOffset,t))}function zd(e){if(e.length===0)return 0;let t=e.map(e=>e.locChanged).sort((e,t)=>e-t);return t[Math.max(0,Math.ceil(t.length*Ku)-1)]??t[t.length-1]??0}function Bd(e,t,n,r){let i=+(r===`right`);return`M ${e} ${t-n} A ${n} ${n} 0 0 ${i} ${e} ${t+n} L ${e} ${t-n} Z`}function Vd(e,t,n,r){let i=+(r===`right`);return`M ${e} ${t-n} A ${n} ${n} 0 0 ${i} ${e} ${t+n}`}function Hd(e,t,n){if(e<=0||t<=0)return 0;let r=n*Math.min(e/t,1);return Math.max(Gu,r)}var Ud=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function Wd(e){return e>=1.4}function Gd(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function Kd(e,t){return Gd(e,t)&&e.getHours()===t.getHours()}function qd(e){return`${Ud[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`}function Jd(e){return`${`${e.getHours()}`.padStart(2,`0`)}:${`${e.getMinutes()}`.padStart(2,`0`)}`}function Yd(e,t){return Wd(t)?`${qd(e)} ${Jd(e)}`:qd(e)}function Xd(e,t){if(e.length===0)return[];let n=Wd(t),r=[],i=null,a=-1/0;for(let o of e){let e=new Date(o.row.committerUnix*1e3),s=o.y*t,c=!i||!Gd(e,i),l=!i||e.getMonth()!==i.getMonth()||e.getFullYear()!==i.getFullYear(),u=!i||!Kd(e,i);i=e;let d=null;if(n?c?d={key:`${o.row.sha}:day`,text:qd(e),y:s,kind:`month`}:u&&(d={key:`${o.row.sha}:hour`,text:Jd(e),y:s,kind:`hour`}):c&&(d={key:`${o.row.sha}:day`,text:l?qd(e):`${e.getDate()}`,y:s,kind:l?`month`:`day`}),!d)continue;let f=d.kind===`hour`?34:22;s-a<f||(r.push(d),a=s)}return r}function Zd(e,t,n){if(e.length===0)return null;let r=t/n,i=Math.max(0,Math.min(e.length-1,Math.floor((r-Qu-$u)/Ou)));for(;i+1<e.length&&e[i+1].y*n<=t;)i++;return e[i]??e[0]??null}function Qd(e){return e.includes(`/`)}function $d(e){return e.length===0?null:e.find(e=>!e.includes(`/`))||(e.find(e=>e.includes(`/`)&&e!==`origin`&&e!==`HEAD`)??null)}function ef(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function tf(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.sha!==i.sha||r.row!==i.row||r.lane!==i.lane||r.parentShas.length!==i.parentShas.length||!ef(r.refNames,i.refNames))return!1;for(let e=0;e<r.parentShas.length;e++)if(r.parentShas[e]!==i.parentShas[e])return!1}return!0}function nf(e,t){if(t.length<=e.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.sha!==i.sha||r.row!==i.row||r.lane!==i.lane||!ef(r.refNames,i.refNames))return!1}return!0}function rf(e,t){return!(!e||!t||e.length===0||t.length===0||tf(e,t)||nf(e,t))}function af(e,t){return e?`☁ `:t?`● `:`⎇ `}var of=new Map;function sf(e){let t=of.get(e);if(t!==void 0)return t;let n=lu(su(e,ad));return of.set(e,n),n}function cf(e,t,n){let r=af(t,n)+e;return id+Math.ceil(sf(r))}function lf(e,t,n,r){let i=[],a=new Map;for(let o of e){let e=o.x+ju+8,s=o.y-10,c=e;for(let e of o.row.refNames){let a=t!==null&&e===t,l=Qd(e);i.push({refName:e,nodeSha:o.row.sha,x:c,y:s,color:r.get(o.row.sha)??fd(o.row.lane),isCurrent:a,isSelected:e===n,isRemote:l}),c+=cf(e,l,a)+rd}a.set(o.row.sha,o.row.refNames.length>0?c-e-rd:0)}return{placements:i,rowWidths:a}}function Z(e,t,n){return e+(t-e)*n}function uf(e,t,n,r){let i=t*3,a=e-i,o=e+t+i,s=Ou*r,c=152*r;return{firstIdx:Math.max(0,Math.floor((a-c)/s)),lastIdx:Math.min(n-1,Math.ceil((o-c)/s))}}function df(e,t,n,r){return Math.max(e,t)>=n&&Math.min(e,t)<=r}function ff(e,t,n){let r=e.nodes.slice(t,n+1),i=[];for(let r of e.nodes)for(let a=0;a<r.row.parentShas.length;a++){let o=e.shaToNode.get(r.row.parentShas[a]);o&&df(r.idx,o.idx,t,n)&&i.push({from:r,to:o,isMerge:a>0,key:`${r.row.sha}-${o.row.sha}`})}return{visibleNodes:r,visibleEdges:i}}function pf(e,t){let n=new Set;if(!e||!t)return n;let r=e.nodes.find(e=>e.row.refNames.includes(t));if(!r)return n;let i=r.row.sha,a=new Set;for(;i&&!a.has(i);){a.add(i);let t=e.shaToNode.get(i),r=t?.row.parentShas[0];if(!t||!r)break;let o=e.shaToNode.get(r);if(!o)break;n.add(`${t.row.sha}-${o.row.sha}`),i=o.row.sha}return n}function mf(e,t){let n=new Set;if(!e||!t)return n;let r=e.nodes.find(e=>e.row.refNames.includes(t));if(!r)return n;let i=r.row.sha;for(;i&&!n.has(i);){n.add(i);let t=e.shaToNode.get(i),r=t?.row.parentShas[0];if(!t||!r||!e.shaToNode.get(r))break;i=r}return n}function hf(e,t){if(!e||!t)return null;let n=e.nodes.find(e=>e.row.refNames.includes(t));return n?{key:t,x:n.x-cd/2,color:e.shaToColor.get(n.row.sha)??fd(n.row.lane)}:null}function gf(e){return new Set(e.unstaged.filter(e=>e.status===`U`).map(e=>e.path)).size}function _f(e,t){let n=new Map,r=new Map;for(let i of e){let e=Pd(i.from,i.to,i.key,t,{adjacentTrack:i.isMerge?`to`:`from`});n.set(i.key,e);let a=Fd(e);if(!a)continue;let o=r.get(a),s={key:i.key,topIdx:Math.min(i.from.idx,i.to.idx),bottomIdx:Math.max(i.from.idx,i.to.idx),innerLane:e.mode===`outer-rail`?e.innerLane:void 0};o?o.push(s):r.set(a,[s])}let i=new Map;for(let e of r.values()){let t=n.get(e[0]?.key??``);if(!t)continue;if(t.mode===`outer-rail`){e.sort((e,n)=>{let r=e.innerLane??t.innerLane,i=n.innerLane??t.innerLane;return t.side===`right`&&r!==i?r-i:t.side===`left`&&r!==i?i-r:e.topIdx-n.topIdx||e.bottomIdx-n.bottomIdx||e.key.localeCompare(n.key)});for(let n=0;n<e.length;n++){let r=t.side===`right`?1:-1;i.set(e[n].key,n*Xu*r)}continue}e.sort((e,t)=>e.topIdx-t.topIdx||e.bottomIdx-t.bottomIdx||e.key.localeCompare(t.key));let r=(e.length-1)/2;for(let t=0;t<e.length;t++)i.set(e[t].key,(t-r)*Xu)}return{plans:n,bundleOffsets:i}}function vf(e,t,n,r,i){return e.map(e=>{let a=r.has(e.key),o=t.plans.get(e.key)??Pd(e.from,e.to,e.key,n,{adjacentTrack:e.isMerge?`to`:`from`}),s=t.bundleOffsets.get(e.key)??0,c=e.isMerge?e.to:e.from;return{key:e.key,fromSha:e.from.row.sha,toSha:e.to.row.sha,path:Id(e.from,e.to,o,s),plan:o,bundleOffset:s,x1:e.from.x,y1:e.from.y,x2:e.to.x,y2:e.to.y,isMerge:e.isMerge,stroke:i.get(c.row.sha)??fd(c.row.lane),strokeWidth:a?4.5:e.isMerge?2:3,opacity:a?.95:.8}})}function yf(e,t,n,r,i,a){return rf(e,t)?!0:!i||!a?!1:n!==r}function bf(){let e=R(e=>e.historyWindow),t=R(e=>e.refs),n=R(e=>e.selectedSha),r=R(e=>e.selectedRefName),i=R(e=>e.mergePreview),a=R(e=>e.scrollToSha),o=R(e=>e.scrollToKey),s=R(e=>e.selectCommit),c=R(e=>e.selectGraphRef),l=R(e=>e.clearGraphRefSelection),u=R(e=>e.ensureMergePreview),d=R(e=>e.requestMore),f=R(e=>e.performRefAction),p=R(e=>e.performCommitAction),m=R(e=>e.performMergeRef),h=R(e=>e.performRebaseRef),g=R(e=>e.pendingMutation),_=R(e=>e.graphAnimationSuppressToken),v=R(e=>e.showCommitMessages),y=R(e=>e.showGutterColors),b=R(e=>e.showError),S=R(e=>e.commitCIStatus),C=R(e=>e.fetchCommitCIStatusesIfNeeded),w=R(e=>e.worktreeChanges),T=R(e=>e.worktreeSelected),ee=R(e=>e.selectWorktree),[te,ne]=(0,x.useState)(null),re=(0,x.useRef)(null),ie=(0,x.useRef)(null),ae=(0,x.useRef)(null),oe=(0,x.useRef)({scrollTop:0,clientHeight:0}),se=(0,x.useRef)(0),ce=(0,x.useRef)(null),D=(0,x.useRef)(null),O=(0,x.useRef)(null),le=(0,x.useRef)(0),[k,ue]=(0,x.useState)(1),[de,fe]=(0,x.useState)(0),[A,pe]=(0,x.useState)(0),[j,me]=(0,x.useState)(null),he=(0,x.useRef)(null),[ge,_e]=(0,x.useState)(!1),[ve,ye]=(0,x.useState)(null),[be,xe]=(0,x.useState)(null),[Se,Ce]=(0,x.useState)(null),[we,Te]=(0,x.useState)(null),[{graphProgress:Ee},De]=_s(()=>({graphProgress:1,config:nd})),Oe=(0,x.useRef)(1),ke=(0,x.useRef)(0),Ae=(0,x.useRef)(null),je=(0,x.useRef)(0),Me=(0,x.useRef)(null),Ne=(0,x.useRef)(null),Pe=(0,x.useRef)(null),Fe=(0,x.useRef)(_),[,Ie]=(0,x.useReducer)(e=>e+1,0),Le=(0,x.useRef)({firstIdx:0,lastIdx:100}),M=(0,x.useMemo)(()=>!e||e.rows.length===0?null:Sd(e.rows,v?ed:0),[e,v]),Re=(0,x.useMemo)(()=>new Map(t.map(e=>[e.shortName,e])),[t]),N=(0,x.useMemo)(()=>r?Re.get(r)??null:null,[Re,r]),P=(0,x.useMemo)(()=>t.find(e=>e.isCurrent)?.shortName??null,[t]),ze=(0,x.useMemo)(()=>bd(t),[t]),F=(0,x.useMemo)(()=>{if(!M||!w)return null;let e=w.staged.length+w.unstaged.length;if(e===0)return null;let t=(P?M.nodes.find(e=>e.row.refNames.includes(P)):void 0)??M.shaToNode.get(w.headSha);if(!t)return null;let n=w.mergeHeadShas?.length?`merge`:w.rebaseHeadSha?`rebase`:`worktree`,r=gf(w),i=t.y-Ou,a=n===`worktree`?M.shaToColor.get(t.row.sha)??fd(t.row.lane):`#fab387`,o={row:{row:t.row.row-1,sha:`${n}:${w.headSha}:${w.mergeHeadShas?.[0]??w.rebaseHeadSha??`dirty`}`,parentShas:[t.row.sha,...w.mergeHeadShas?.slice(0,1)??[]],authorName:``,authorEmail:``,authorUnix:0,committerUnix:0,subject:n===`merge`?`Merge in progress`:n===`rebase`?`Rebase in progress`:`Uncommitted changes`,additions:0,deletions:0,locChanged:0,refNames:[],lane:t.row.lane},x:t.x,y:i,idx:t.idx-1},s=M.nodes.map(e=>e.row.lane),c=Id(o,t,Pd(o,t,`${o.row.sha}-${t.row.sha}`,s),0),l=w.mergeHeadShas?.[0],u=l?M.shaToNode.get(l)??null:null,d=u?Id(o,u,Pd(o,u,`${o.row.sha}-${u.row.sha}`,s,{adjacentTrack:`to`}),0):null;return{kind:n,x:o.x,y:o.y,headY:t.y,color:a,count:e,conflictedCount:r,targetPath:c,sourcePath:d}},[M,w,P]),Be=(0,x.useCallback)(e=>{le.current=e,D.current===null&&(D.current=requestAnimationFrame(()=>{D.current=null,fe(le.current)}))},[]),Ve=(0,x.useCallback)(()=>{ce.current!==null&&(cancelAnimationFrame(ce.current),ce.current=null),he.current&&(De.stop(),De.set({graphProgress:1}),he.current=null,me(null))},[De]),He=(0,x.useCallback)(e=>{ce.current!==null&&(cancelAnimationFrame(ce.current),ce.current=null),De.stop(),De.set({graphProgress:0}),he.current=e,me(e),ce.current=requestAnimationFrame(()=>{ce.current=requestAnimationFrame(()=>{ce.current=null,he.current===e&&De.start({graphProgress:1,immediate:!1,config:nd,onRest:t=>{t.finished&&me(t=>t===e?(he.current=null,null):t)}})})})},[De]),Ue=(0,x.useCallback)(()=>{O.current!==null&&(clearTimeout(O.current),O.current=null)},[]),We=(0,x.useCallback)(e=>{Ue(),ye(e)},[Ue]),Ge=(0,x.useCallback)(e=>{Ue(),O.current=setTimeout(()=>{ye(t=>t===e?null:t),O.current=null},120)},[Ue]);(0,x.useEffect)(()=>{_e(!1),xe(null)},[r]),(0,x.useEffect)(()=>()=>{Ue()},[Ue]),(0,x.useEffect)(()=>{if(!M||!e){Me.current=e?.rows??null,Ne.current=M,Pe.current=P,Ve();return}let t=_!==Fe.current;if(Fe.current=_,t){Me.current=e.rows,Ne.current=M,Pe.current=P;return}yf(Me.current,e.rows,Pe.current,P,Ne.current,M)&&Ne.current?He({fromLayout:Ne.current,toLayout:M,fromCurrentBranch:Pe.current,toCurrentBranch:P}):Ve(),Me.current=e.rows,Ne.current=M,Pe.current=P},[P,e,M,_,He,Ve]),(0,x.useEffect)(()=>()=>{De.stop(),ce.current!==null&&cancelAnimationFrame(ce.current),D.current!==null&&cancelAnimationFrame(D.current)},[De]);let Ke=(0,x.useMemo)(()=>e?zd(e.rows):0,[e]),qe=(0,x.useMemo)(()=>M?M.nodes.map(e=>e.row.lane):[],[M]),Je=(0,x.useMemo)(()=>{if(!M||!y)return[];let e=new Map;for(let t of M.nodes)e.set(t.row.lane,t.x);return[...e].sort(([e],[t])=>e-t).map(([e,t])=>({lane:e,x:t,color:fd(e)}))},[M,y]),Ye=(0,x.useMemo)(()=>pf(M,P),[M,P]),Xe=(0,x.useCallback)((e,t)=>{if(!M)return;oe.current={scrollTop:e.scrollTop,clientHeight:e.clientHeight},se.current=e.scrollTop,Be(e.scrollTop),ie.current&&(ie.current.style.transform=`translateY(${-e.scrollTop}px)`);let{firstIdx:n,lastIdx:r}=uf(e.scrollTop,e.clientHeight,M.nodes.length,t);Le.current={firstIdx:n,lastIdx:r},Ie()},[M,Be]);(0,x.useEffect)(()=>{if(!a||!M||!re.current||Date.now()<ke.current)return;let e=M.shaToNode.get(a);if(!Nn(Ae.current,o,!!e)||!e)return;Ae.current=o;let t=re.current,n=e.y*k-t.clientHeight/2;je.current=Date.now()+700,t.scrollTo({top:Math.max(0,n),behavior:`smooth`})},[a,o,M,k]),(0,x.useEffect)(()=>{let t=re.current;if(!t)return;let n=()=>{if(!M)return;let n=t.scrollTop,r=Math.abs(n-se.current)>.5;oe.current={scrollTop:t.scrollTop,clientHeight:t.clientHeight},pe(t.clientHeight),se.current=n,r&&Date.now()>=je.current&&Ve(),Be(t.scrollTop),ie.current&&(ie.current.style.transform=`translateY(${-t.scrollTop}px)`),ae.current&&(ae.current.style.transform=`translateY(${-t.scrollTop}px)`);let{firstIdx:i,lastIdx:a}=uf(t.scrollTop,t.clientHeight,M.nodes.length,Oe.current),o=Le.current,s=Math.floor((o.lastIdx-o.firstIdx)*.25);if((i<o.firstIdx+s||a>o.lastIdx-s)&&(Le.current={firstIdx:i,lastIdx:a},Ie()),e&&e.hasMoreAfter&&M){let e=M.totalHeight*Oe.current;Mn(t.scrollTop,t.clientHeight,e)&&d(`down`)}};t.addEventListener(`scroll`,n,{passive:!0});let r=new ResizeObserver(()=>n());return r.observe(t),n(),()=>{t.removeEventListener(`scroll`,n),r.disconnect()}},[M,e,d,Ve,Be]),(0,x.useEffect)(()=>{let e=re.current;!e||!ie.current||Xe(e,k)},[M,k,Xe]),(0,x.useEffect)(()=>{let e=e=>{if(!e.ctrlKey&&!e.metaKey)return;let t=re.current;if(!t||!t.contains(e.target))return;e.preventDefault(),e.stopPropagation();let n=t.getBoundingClientRect(),r=e.clientY-n.top+t.scrollTop,i=Oe.current,a=e.deltaY>0?-.1:.1,o=Math.max(.1,Math.min(3,i+a));Oe.current=o,ue(o);let s=r/i*o-(e.clientY-n.top);t.scrollTop=Math.max(0,s)};return document.addEventListener(`wheel`,e,{passive:!1,capture:!0}),()=>document.removeEventListener(`wheel`,e,{capture:!0})},[]),(0,x.useEffect)(()=>{!M||!re.current||!e?.hasMoreAfter||re.current.clientHeight/k>M.nodes.length*Ou*.8&&d(`down`)},[k,M,e,d]);let{visibleNodes:Ze,visibleEdges:Qe}=(0,x.useMemo)(()=>{if(!M)return{visibleNodes:[],visibleEdges:[]};let{firstIdx:e,lastIdx:t}=Le.current;return ff(M,e,t)},[M,Le.current.firstIdx,Le.current.lastIdx]),$e=(0,x.useMemo)(()=>_f(Qe,qe),[Qe,qe]),{placements:et,rowWidths:tt}=(0,x.useMemo)(()=>lf(Ze,P,r,M?.shaToColor??dd),[Ze,P,r,M]),nt=(0,x.useMemo)(()=>vf(Qe,$e,qe,Ye,M?.shaToColor??dd),[Qe,$e,qe,Ye,M]),rt=(0,x.useMemo)(()=>hf(M,P),[M,P]),it=(0,x.useMemo)(()=>{if(!j)return null;let e=oe.current.scrollTop,t=oe.current.clientHeight||re.current?.clientHeight||0,n=j.fromLayout.nodes.map(e=>e.row.lane),i=j.toLayout.nodes.map(e=>e.row.lane),a=uf(e,t,j.fromLayout.nodes.length,k),o=uf(e,t,j.toLayout.nodes.length,k),s=ff(j.fromLayout,a.firstIdx,a.lastIdx),c=ff(j.toLayout,o.firstIdx,o.lastIdx),l=_f(s.visibleEdges,n),u=_f(c.visibleEdges,i),d=vf(s.visibleEdges,l,n,pf(j.fromLayout,j.fromCurrentBranch),j.fromLayout.shaToColor),f=vf(c.visibleEdges,u,i,pf(j.toLayout,j.toCurrentBranch),j.toLayout.shaToColor),p=lf(s.visibleNodes,j.fromCurrentBranch,r,j.fromLayout.shaToColor).placements,m=lf(c.visibleNodes,j.toCurrentBranch,r,j.toLayout.shaToColor).placements,h=hf(j.fromLayout,j.fromCurrentBranch),g=hf(j.toLayout,j.toCurrentBranch),_=new Map(s.visibleNodes.map(e=>[e.row.sha,e])),v=new Map(c.visibleNodes.map(e=>[e.row.sha,e])),y=new Map(d.map(e=>[e.key,e])),b=new Map(f.map(e=>[e.key,e])),x=new Map(p.map(e=>[e.refName,e])),S=new Map(m.map(e=>[e.refName,e]));return{nodes:[...new Set([..._.keys(),...v.keys()])].map(e=>{let t=_.get(e),n=v.get(e),r=n??t;if(!r)return null;let i=n?j.toLayout:j.fromLayout;return{sortIdx:n?.idx??t?.idx??0,item:{key:e,row:r.row,interactive:!!n,color:i.shaToColor.get(e)??fd(r.row.lane),fromX:t?.x??r.x,fromY:t?t.y:r.y+od,toX:n?.x??r.x,toY:n?n.y:r.y-sd,fromOpacity:+!!t,toOpacity:+!!n}}}).filter(e=>e!==null).sort((e,t)=>e.sortIdx-t.sortIdx).map(e=>e.item),edges:[...new Set([...y.keys(),...b.keys()])].map(e=>{let t=y.get(e),n=b.get(e),r=n??t;if(!r)return null;let i=n?j.fromLayout.shaToNode.get(n.fromSha):void 0,a=n?j.fromLayout.shaToNode.get(n.toSha):void 0,o=t?j.toLayout.shaToNode.get(t.fromSha):void 0,s=t?j.toLayout.shaToNode.get(t.toSha):void 0;return{sortY:Math.min(n?.y1??t?.y1??0,n?.y2??t?.y2??0),item:{key:e,path:n?.path??t?.path??``,fromPlan:t?.plan??n?.plan??{mode:`curve`},toPlan:n?.plan??t?.plan??{mode:`curve`},fromBundleOffset:t?.bundleOffset??n?.bundleOffset??0,toBundleOffset:n?.bundleOffset??t?.bundleOffset??0,stroke:n?.stroke??t?.stroke??`#cdd6f4`,fromStrokeWidth:t?.strokeWidth??r.strokeWidth,toStrokeWidth:n?.strokeWidth??r.strokeWidth,fromOpacity:t?.opacity??0,toOpacity:n?.opacity??0,fromX1:t?.x1??i?.x??r.x1,fromY1:t?.y1??i?.y??r.y1+od,fromX2:t?.x2??a?.x??r.x2,fromY2:t?.y2??a?.y??r.y2+od,toX1:n?.x1??o?.x??r.x1,toY1:n?.y1??o?.y??r.y1-sd,toX2:n?.x2??s?.x??r.x2,toY2:n?.y2??s?.y??r.y2-sd}}}).filter(e=>e!==null).sort((e,t)=>e.sortY-t.sortY).map(e=>e.item),refs:[...new Set([...x.keys(),...S.keys()])].map(e=>{let t=x.get(e),n=S.get(e),r=n??t;return r?{sortY:n?.y??t?.y??0,item:{key:e,placement:r,fromX:t?.x??r.x,fromY:t?t.y:r.y+od,toX:n?.x??r.x,toY:n?n.y:r.y-sd,fromOpacity:+!!t,toOpacity:+!!n,fromScale:t?1:.9,toScale:n?1:.92}}:null}).filter(e=>e!==null).sort((e,t)=>e.sortY-t.sortY).map(e=>e.item),lane:h||g?{key:g?.key??h?.key??`current-lane`,color:g?.color??h?.color??`#89b4fa`,fromX:h?.x??g?.x??0,toX:g?.x??h?.x??0,fromOpacity:+!!h,toOpacity:+!!g}:null}},[j,r,k]),at=(0,x.useMemo)(()=>it?.nodes??Ze.map(e=>({key:e.row.sha,row:e.row,interactive:!0,color:M?.shaToColor.get(e.row.sha)??fd(e.row.lane),fromX:e.x,fromY:e.y,toX:e.x,toY:e.y,fromOpacity:1,toOpacity:1})),[it,Ze,M]),ot=(0,x.useMemo)(()=>it?.edges??nt.map(e=>({key:e.key,path:e.path,fromPlan:e.plan,toPlan:e.plan,fromBundleOffset:e.bundleOffset,toBundleOffset:e.bundleOffset,stroke:e.stroke,fromStrokeWidth:e.strokeWidth,toStrokeWidth:e.strokeWidth,fromOpacity:e.opacity,toOpacity:e.opacity,fromX1:e.x1,fromY1:e.y1,fromX2:e.x2,fromY2:e.y2,toX1:e.x1,toY1:e.y1,toX2:e.x2,toY2:e.y2})),[it,nt]),st=(0,x.useMemo)(()=>it?.refs??et.map(e=>({key:e.refName,placement:e,fromX:e.x,fromY:e.y,toX:e.x,toY:e.y,fromOpacity:1,toOpacity:1,fromScale:1,toScale:1})),[it,et]),ct=(0,x.useMemo)(()=>it?it.lane:rt?{key:rt.key,color:rt.color,fromX:rt.x,toX:rt.x,fromOpacity:1,toOpacity:1}:null,[it,rt]),lt=(0,x.useMemo)(()=>M&&P?M.nodes.find(e=>e.row.refNames.includes(P))??null:null,[M,P]),ut=(0,x.useMemo)(()=>!N||N.kind!==`head`?null:X(N,t),[N,t]),dt=(0,x.useMemo)(()=>!N||N.kind!==`head`?!1:!ut||ut.targetSha!==N.targetSha,[N,ut]),ft=(0,x.useMemo)(()=>!N||N.kind!==`head`||!ut||ut.targetSha===N.targetSha?!1:(N.ahead??0)>0,[N,ut]),pt=(0,x.useMemo)(()=>{if(!N)return[];if(N.kind===`head`){let e=(N.behind??0)>0?{action:`push`,label:`Force push`,tone:`warning`,force:!0}:{action:`push`,label:`Push`,tone:`neutral`};return N.isCurrent?[...dt?[e]:[],...ft?[{action:`reset`,label:`Reset`,tone:`warning`}]:[]]:[{action:`checkout`,label:`Checkout`,tone:`neutral`},...dt?[e]:[],...ft?[{action:`reset`,label:`Reset`,tone:`warning`}]:[],{action:`delete`,label:`Delete`,tone:`danger`}]}return N.kind===`remote`?[{action:`checkout`,label:`Checkout`,tone:`neutral`},{action:`delete`,label:`Delete`,tone:`danger`}]:[{action:`push`,label:`Push`,tone:`neutral`}]},[N,dt,ft]),mt=(0,x.useMemo)(()=>!N||N.kind!==`head`||N.isCurrent?null:N.shortName,[N]),ht=(0,x.useMemo)(()=>!!lt&&!!P&&!!r&&r!==P&&i?.sourceRefName===r&&i.mergeable,[lt,P,r,i]),gt=(0,x.useMemo)(()=>N&&N.kind===`head`&&N.isCurrent?N:null,[N]),_t=(0,x.useMemo)(()=>{if(!M||!r||!i?.mergeable||i.sourceRefName!==r||!i.sourceSha||!i.targetSha)return null;let e=M.shaToNode.get(i.sourceSha),t=M.shaToNode.get(i.targetSha);if(!e||!t)return null;let n=M.nodes[0]??t,a={row:{row:n.row.row-1,sha:`preview:${i.sourceSha}:${i.targetSha}`,parentShas:[t.row.sha,e.row.sha],authorName:``,authorEmail:``,authorUnix:0,committerUnix:0,subject:`Merge preview`,additions:0,deletions:0,locChanged:0,refNames:[],lane:t.row.lane},x:t.x,y:n.y-Ou,idx:n.idx-1},o=`${a.row.sha}-${t.row.sha}`,s=`${a.row.sha}-${e.row.sha}`,c=Pd(a,t,o,qe);return{previewNode:a,sourceNode:e,targetNode:t,sourcePath:Id(a,e,Pd(a,e,s,qe,{adjacentTrack:`to`}),$e.bundleOffsets.get(s)??0),targetPath:Id(a,t,c,$e.bundleOffsets.get(o)??0),color:M.shaToColor.get(t.row.sha)??fd(t.row.lane)}},[M,r,i,qe,$e.bundleOffsets]),vt=(0,x.useMemo)(()=>ge?_t:null,[ge,_t]),yt=(0,x.useCallback)((e,t)=>{e.stopPropagation(),_e(!1),c(t)},[c]),bt=(0,x.useCallback)(e=>(ne(e),f(e.action,e.refName,e.sha,e.force).finally(()=>{ne(t=>gd(t,e)?null:t)})),[f]),xt=(0,x.useCallback)(e=>{if(!r||!N||g)return;_e(!1);let t=N.targetSha,n=r,i={...e,refName:n,sha:t,force:!!e.force};bt(i).catch(r=>{e.action===`push`&&!e.force&&_d(r)?b(`Push rejected`,r,{label:`Force push`,run:()=>{bt({action:`push`,label:`Force push`,tone:`warning`,force:!0,refName:n,sha:t}).catch(e=>b(`Force push failed`,e))}}):b(`${e.action} failed`,r)})},[r,N,bt,b,g]),St=(0,x.useCallback)(e=>{mt&&(g||Te({title:`Move branch`,message:`Move branch ${mt} to commit ${e.slice(0,8)}?`,confirmLabel:`Move`,onConfirm:()=>{_e(!1),f(`move`,mt,e).catch(e=>{b(`Move failed`,e)})}}))},[mt,f,b,g]),Ct=(0,x.useCallback)((e,t)=>{g||(_e(!1),xe(null),ye(null),Ce({kind:e,targetSha:t}))},[g]),wt=(0,x.useCallback)(e=>{if(!Se)return;let{kind:t,targetSha:n}=Se;Ce(null),f(t===`branch`?`create`:`create-tag`,e,n).catch(e=>{b(`Create ${t} failed`,e)})},[Se,f,b]),Tt=(0,x.useCallback)(()=>Ce(null),[]),Et=Se?.kind===`branch`?`Branch name`:`Tag name`,Dt=Se?`Create ${Se.kind} at ${Se.targetSha.slice(0,8)}`:`Create ref`,Ot=Se?.kind===`tag`?ze:``,kt=(0,x.useCallback)(()=>{r&&(_e(!0),(!i||i.sourceRefName!==r)&&u(r))},[r,i,u]),At=(0,x.useCallback)(()=>{_e(!1)},[]),I=(0,x.useCallback)(()=>{let e=re.current;if(!e||!_t)return;let t=Math.max(_t.previewNode.y+ju,_t.sourceNode.y+ju,_t.targetNode.y+ju),n=Math.max(t+Qu,Ou*4),r=Math.min(Oe.current,Math.max(.18,Math.min(1,e.clientHeight/n)));ke.current=Date.now()+500,Oe.current=r,ue(r),e.scrollTo({top:0,behavior:`smooth`}),requestAnimationFrame(()=>Xe(e,r))},[_t,Xe]),jt=(0,x.useCallback)(()=>{r&&(g||(_e(!0),I(),m(r).catch(e=>{b(`Merge failed`,e)})))},[r,m,I,b,g]),Mt=(0,x.useCallback)(e=>{_e(!1),h(e).catch(e=>{b(`Rebase failed`,e)})},[h,b]),Nt=(0,x.useCallback)(e=>{if(!gt||g)return;let n=X(gt,t);if(e===gt.shortName||e===gt.name||e===n?.shortName||e===n?.name){Mt(e);return}Te({title:`Rebase branch`,message:`Rebase ${gt.shortName} onto ${e}? This rewrites the current branch history.`,confirmLabel:`Rebase`,onConfirm:()=>Mt(e)})},[gt,t,Mt,g]),Pt=(0,x.useMemo)(()=>{if(!M||!re.current)return[];let e=re.current.scrollTop,t=new Map;for(let e of Ze){let n=t.get(e.row.lane);(!n||e.y<n.y)&&t.set(e.row.lane,e)}let n=new Map;for(let r of M.nodes){if(r.row.refNames.length===0||r.y*k>=e)continue;let i=r.row.lane;if(n.has(i))continue;let a=t.get(i);if(!a)continue;let o=$d(r.row.refNames);o&&M.shaToBranch.get(a.row.sha)===o&&n.set(i,{name:o,x:r.x,color:pd(o)})}let r=[...n.values()].sort((e,t)=>e.x-t.x),i=[],a=[];for(let e of r){let t=e.x*k-4,n=e.name.length*7+20,r=0;for(let e=0;e<a.length;e++){if(t>=a[e]){r=e;break}r=e+1}r>=a.length&&a.push(0),a[r]=t+n+4,i.push({...e,row:r})}return i},[M,Ze,k]),Ft=(0,x.useMemo)(()=>M?Xd(M.nodes,k):[],[M,k]),It=(0,x.useMemo)(()=>{if(!M)return null;let e=Zd(M.nodes,de,k);return e?Yd(new Date(e.row.committerUnix*1e3),k):null},[M,de,k]),Lt=(0,x.useMemo)(()=>Ft.filter(e=>e.y-de>28),[Ft,de]),Rt=(0,x.useMemo)(()=>mf(M,P),[M,P]),zt=(0,x.useMemo)(()=>!M||Rt.size===0||!v?[]:M.nodes.filter(e=>Rt.has(e.row.sha)).map(e=>({key:e.row.sha,sha:e.row.sha,y:e.y*k,text:e.row.subject})),[M,Rt,k,v]),Bt=(0,x.useMemo)(()=>zt.filter(e=>e.y-de>28),[zt,de]),Vt=(0,x.useMemo)(()=>A===0?[]:zt.filter(e=>{let t=e.y-de;return t>0&&t<A}),[zt,de,A]);(0,x.useEffect)(()=>{if(Vt.length===0)return;let e=window.setTimeout(()=>{let e=Vt.slice(0,ku).map(e=>e.sha);C(e)},200);return()=>window.clearTimeout(e)},[Vt,C]);let Ht=(0,x.useMemo)(()=>M&&n?M.shaToNode.get(n)??null:null,[M,n]),Ut=(0,x.useMemo)(()=>{if(!M||!Ht||!P)return!1;let e=M.nodes.find(e=>e.row.refNames.includes(P));if(!e)return!1;let t=e.row.sha,n=new Set;for(;t&&!n.has(t);){if(t===Ht.row.sha)return!0;n.add(t);let e=M.shaToNode.get(t);if(!e||e.row.parentShas.length===0)break;t=e.row.parentShas[0]}return!1},[M,Ht,P]),Wt=(0,x.useMemo)(()=>!Ht||!P?!1:Ht.row.refNames.includes(P),[Ht,P]),Gt=(0,x.useMemo)(()=>{if(!Ht)return[];let e=[],t=Ht.row.parentShas.length===1;return Wt?(e.push({action:`uncommit`,label:`Uncommit`,tone:`uncommit`}),t&&e.push({action:`revert`,label:`Revert`,tone:`warning`}),e):Ut?(t&&e.push({action:`revert`,label:`Revert`,tone:`warning`}),e):(t&&(e.push({action:`cherry-pick`,label:`Cherry pick`,tone:`success`}),e.push({action:`revert`,label:`Revert`,tone:`warning`})),e)},[Ht,Wt,Ut]),Kt=(0,x.useCallback)(e=>{if(!Ht||g)return;let t=Ht.row.sha.slice(0,8),n=e===`cherry-pick`?`Cherry pick commit`:e===`uncommit`?`Uncommit`:`Revert commit`,r=e===`uncommit`?`Uncommit ${t}? This will move HEAD to its parent and keep the changes in your working tree.`:`${e===`cherry-pick`?`Cherry-pick`:`Revert`} commit ${t} on the current branch?`;Te({title:n,message:r,confirmLabel:e===`cherry-pick`?`Cherry pick`:e===`uncommit`?`Uncommit`:`Revert`,onConfirm:()=>{p(e,Ht.row.sha).catch(t=>{b(`${e} failed`,t)})}})},[Ht,p,b,g]),L=j!==null;if(!M)return(0,E.jsx)(`div`,{style:{flex:1,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#45475a`,fontSize:13},children:`No commits to display`});let qt=M.totalWidth,Jt=M.totalHeight,Yt=qt*k,Xt=Jt*k,Zt=F?Math.max(22,String(F.conflictedCount).length*7+14):0,Qt=F?.kind===`merge`?F.conflictedCount>0?`Merge conflicts`:`Merge in progress`:F?.kind===`rebase`?F.conflictedCount>0?`Rebase conflicts`:`Rebase in progress`:`Uncommitted changes`,$t=F?.kind===`worktree`?`Uncommitted changes — ${F.count} file${F.count===1?``:`s`}\nClick to stage / unstage`:`${Qt} — ${F?.conflictedCount??0} conflict${F?.conflictedCount===1?``:`s`}\nClick to review files`;return(0,E.jsxs)(`div`,{ref:re,style:{flex:1,height:`100%`,overflow:`auto`,position:`relative`,background:`#1e1e2e`,touchAction:`pan-x pan-y`},onClick:()=>{_e(!1),xe(null),ye(null),Ue(),l()},children:[(0,E.jsx)(Eu,{open:!!Se,title:Dt,label:Et,initialValue:Ot,confirmLabel:`Create`,onSubmit:wt,onClose:Tt}),(0,E.jsx)(Du,{open:!!we,title:we?.title??``,message:we?.message??``,confirmLabel:we?.confirmLabel??`Confirm`,onConfirm:()=>{let e=we?.onConfirm;Te(null),e?.()},onClose:()=>Te(null)}),(0,E.jsx)(`div`,{style:{position:`sticky`,top:0,left:0,zIndex:20,height:0,overflow:`visible`,pointerEvents:`none`},children:Pt.map(e=>(0,E.jsx)(`div`,{onClick:t=>yt(t,e.name),style:{position:`absolute`,left:e.x*k-4,top:4+e.row*22,padding:`2px 8px`,borderRadius:4,background:r===e.name?e.color+`35`:e.color+`20`,border:`1px solid ${r===e.name?e.color:e.color+`50`}`,color:e.color,fontSize:10,fontWeight:600,whiteSpace:`nowrap`,pointerEvents:`auto`,transform:`scale(${Math.min(k,1)})`,transformOrigin:`top left`,cursor:`pointer`,boxShadow:r===e.name?`0 0 8px ${e.color}40`:`none`},children:e.name},e.name))}),(0,E.jsxs)(`div`,{style:{position:`sticky`,top:0,left:0,width:`100%`,height:0,overflow:`visible`,zIndex:5,pointerEvents:`none`},children:[It&&(0,E.jsx)(`div`,{style:{position:`absolute`,right:20,top:6,padding:`3px 8px`,borderRadius:6,background:`#181825`,border:`1px solid #313244`,color:`#9399b2`,fontSize:11,fontWeight:600,whiteSpace:`nowrap`,boxShadow:`0 4px 12px rgba(0,0,0,0.2)`},children:It}),(0,E.jsxs)(`div`,{ref:ae,style:{position:`relative`},children:[F&&F.y*k-de>28&&(0,E.jsxs)(`div`,{style:{position:`absolute`,left:20,top:F.y*k-7,maxWidth:380*k,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,color:T?F.color:`#a6adc8`,fontSize:12,fontWeight:600,pointerEvents:`none`,userSelect:`none`,display:`flex`,alignItems:`center`,gap:6},children:[(0,E.jsx)(`span`,{style:{display:`inline-block`,width:8,height:8,borderRadius:`50%`,background:F.color,flexShrink:0}}),(0,E.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`},children:Qt})]}),Bt.map(e=>{let t=S[e.sha],n=t?{success:`#a6e3a1`,pending:`#f9e2af`,failure:`#f38ba8`,error:`#f38ba8`,neutral:`#6c7086`,loading:`#585b70`,none:`#45475a`}[t.state]:void 0;return(0,E.jsxs)(`div`,{style:{position:`absolute`,left:20,top:e.y-7,maxWidth:380*k,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,color:`#a6adc8`,fontSize:12,pointerEvents:`none`,userSelect:`none`,display:`flex`,alignItems:`center`,gap:6},children:[n&&(0,E.jsx)(`span`,{style:{display:`inline-block`,width:8,height:8,borderRadius:`50%`,background:n,flexShrink:0}}),(0,E.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`},children:e.text})]},e.key)})]}),(0,E.jsx)(`div`,{ref:ie,style:{position:`relative`},children:Lt.map(e=>(0,E.jsxs)(`div`,{style:{position:`absolute`,right:20,top:e.y-7,padding:`2px 6px`,borderRadius:6,background:`#1e1e2e`,color:e.kind===`month`?`#6c7086`:e.kind===`hour`?`#585b70`:`#45475a`,fontSize:e.kind===`month`?11:10,fontWeight:e.kind===`month`?600:e.kind===`hour`?500:400,whiteSpace:`nowrap`,pointerEvents:`none`,userSelect:`none`},children:[(0,E.jsx)(`span`,{style:{display:`inline-block`,width:e.kind===`month`?16:e.kind===`hour`?6:8,height:1,background:e.kind===`month`?`#585b70`:e.kind===`hour`?`#45475a`:`#313244`,verticalAlign:`middle`,marginRight:4}}),e.text]},e.key))})]}),(0,E.jsx)(`div`,{style:{width:Yt,height:Xt,position:`relative`,zIndex:10},children:(0,E.jsxs)(`div`,{style:{position:`absolute`,top:0,left:0,width:qt,height:Jt,transform:`scale(${k})`,transformOrigin:`top left`},children:[(0,E.jsxs)(`svg`,{width:qt,height:Jt,style:{position:`absolute`,top:0,left:0,zIndex:10,pointerEvents:`none`,overflow:`visible`},children:[Je.map(e=>(0,E.jsx)(`rect`,{x:e.x-Au/2+2,y:0,width:Au-4,height:Jt,rx:16,fill:`${e.color}16`,stroke:`${e.color}24`,strokeWidth:1},`gutter-${e.lane}`)),ct&&(0,E.jsxs)(zs.g,{opacity:L?Ss(Ee,e=>Z(ct.fromOpacity,ct.toOpacity,e)*.95):ct.toOpacity*.95,children:[(0,E.jsx)(zs.rect,{x:L?Ss(Ee,e=>Z(ct.fromX,ct.toX,e)):ct.toX,y:0,width:cd,height:Jt,rx:18,fill:`${ct.color}10`}),(0,E.jsx)(zs.rect,{x:L?Ss(Ee,e=>Z(ct.fromX,ct.toX,e)+2):ct.toX+2,y:0,width:cd-4,height:Jt,rx:16,fill:`${ct.color}06`})]},ct.key),vt&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{d:vt.targetPath,stroke:vt.color,strokeWidth:3,fill:`none`,strokeLinecap:`round`,strokeDasharray:`8 6`,opacity:.7}),(0,E.jsx)(`path`,{d:vt.sourcePath,stroke:vt.color,strokeWidth:2.5,fill:`none`,strokeLinecap:`round`,strokeDasharray:`8 6`,opacity:.55})]}),ot.map(e=>(0,E.jsx)(zs.path,{d:L?Ss(Ee,t=>t>=.999?e.path:Rd(e,t)):e.path,stroke:e.stroke,strokeWidth:L?Ss(Ee,t=>Z(e.fromStrokeWidth,e.toStrokeWidth,t)):e.toStrokeWidth,fill:`none`,strokeLinecap:`round`,opacity:L?Ss(Ee,t=>Z(e.fromOpacity,e.toOpacity,t)):e.toOpacity},e.key))]}),(0,E.jsxs)(`svg`,{width:qt,height:Jt,style:{position:`absolute`,top:0,left:0,zIndex:30,pointerEvents:`none`,overflow:`visible`},children:[vt&&(0,E.jsxs)(`g`,{children:[(0,E.jsx)(`circle`,{cx:vt.previewNode.x,cy:vt.previewNode.y,r:ju*1.9,fill:vt.color,opacity:.12}),(0,E.jsx)(`circle`,{cx:vt.previewNode.x,cy:vt.previewNode.y,r:ju,fill:Mu,stroke:vt.color,strokeWidth:3,strokeDasharray:`6 4`}),(0,E.jsx)(`circle`,{cx:vt.previewNode.x,cy:vt.previewNode.y,r:2.5,fill:vt.color})]}),at.map(e=>{let{row:t}=e,r=t.sha===n,i=e.color,a=Ru*2,o=Hd(t.additions,Ke,a),c=Hd(t.deletions,Ke,a),l=`gauge-${t.sha}`,u=`${l}-left`,d=`${l}-right`,f=r?Vu:Bu,p=r?Hu:zu,m=L?Ss(Ee,t=>Z(e.fromX,e.toX,t)):e.toX,h=L?Ss(Ee,t=>Z(e.fromY,e.toY,t)):e.toY,g=L?Ss(Ee,t=>Z(e.fromOpacity,e.toOpacity,t)):e.toOpacity,_=L?Ss(Ee,t=>Bd(Z(e.fromX,e.toX,t),Z(e.fromY,e.toY,t),Ru,`left`)):Bd(e.toX,e.toY,Ru,`left`),v=L?Ss(Ee,t=>Bd(Z(e.fromX,e.toX,t),Z(e.fromY,e.toY,t),Ru,`right`)):Bd(e.toX,e.toY,Ru,`right`),y=L?Ss(Ee,t=>Vd(Z(e.fromX,e.toX,t),Z(e.fromY,e.toY,t),Ru,`left`)):Vd(e.toX,e.toY,Ru,`left`),b=L?Ss(Ee,t=>Vd(Z(e.fromX,e.toX,t),Z(e.fromY,e.toY,t),Ru,`right`)):Vd(e.toX,e.toY,Ru,`right`);return(0,E.jsxs)(zs.g,{onClick:e.interactive?e=>{e.stopPropagation(),s(t.sha)}:void 0,onPointerEnter:e.interactive?()=>We(t.sha):void 0,onPointerLeave:e.interactive?()=>Ge(t.sha):void 0,opacity:g,style:{cursor:e.interactive?`pointer`:`default`,pointerEvents:e.interactive?`auto`:`none`},children:[(0,E.jsx)(`title`,{children:`${t.subject}\n+${t.additions} / -${t.deletions} (${t.locChanged} LOC changed)`}),r&&(0,E.jsx)(zs.circle,{cx:m,cy:h,r:ju*2.5,fill:i,opacity:.15}),(0,E.jsx)(zs.circle,{cx:m,cy:h,r:ju,fill:Mu,stroke:i,strokeWidth:r?3.5:2.75}),(0,E.jsxs)(`defs`,{children:[(0,E.jsx)(`clipPath`,{id:u,clipPathUnits:`userSpaceOnUse`,children:(0,E.jsx)(zs.path,{d:_})}),(0,E.jsx)(`clipPath`,{id:d,clipPathUnits:`userSpaceOnUse`,children:(0,E.jsx)(zs.path,{d:v})})]}),(0,E.jsx)(zs.path,{d:_,fill:p}),(0,E.jsx)(zs.path,{d:v,fill:p}),o>0&&(0,E.jsx)(zs.rect,{x:L?Ss(Ee,t=>Z(e.fromX,e.toX,t)-Ru):e.toX-Ru,y:L?Ss(Ee,t=>Z(e.fromY,e.toY,t)+Ru-o):e.toY+Ru-o,width:Ru,height:o,fill:Uu,clipPath:`url(#${u})`}),c>0&&(0,E.jsx)(zs.rect,{x:m,y:L?Ss(Ee,t=>Z(e.fromY,e.toY,t)+Ru-c):e.toY+Ru-c,width:Ru,height:c,fill:Wu,clipPath:`url(#${d})`}),(0,E.jsx)(zs.path,{d:y,stroke:f,strokeWidth:1.6,fill:`none`}),(0,E.jsx)(zs.path,{d:b,stroke:f,strokeWidth:1.6,fill:`none`}),(0,E.jsx)(zs.line,{x1:m,y1:L?Ss(Ee,t=>Z(e.fromY,e.toY,t)-Ru):e.toY-Ru,x2:m,y2:L?Ss(Ee,t=>Z(e.fromY,e.toY,t)+Ru):e.toY+Ru,stroke:f,strokeWidth:1.6}),t.parentShas.length>1&&(0,E.jsx)(zs.circle,{cx:m,cy:h,r:2,fill:i})]},t.sha)}),F&&!L&&(0,E.jsxs)(`g`,{onClick:e=>{e.stopPropagation(),ee()},style:{cursor:`pointer`,pointerEvents:`auto`},children:[(0,E.jsx)(`title`,{children:$t}),F.sourcePath&&(0,E.jsx)(`path`,{d:F.sourcePath,stroke:F.color,strokeWidth:2.25,strokeLinecap:`round`,strokeDasharray:`3 5`,fill:`none`,opacity:.55}),(0,E.jsx)(`path`,{d:F.targetPath,stroke:F.color,strokeWidth:2.5,strokeLinecap:`round`,strokeDasharray:`3 5`,fill:`none`,opacity:.7}),T&&(0,E.jsx)(`circle`,{cx:F.x,cy:F.y,r:ju*2.5,fill:F.color,opacity:.15}),(0,E.jsx)(`circle`,{cx:F.x,cy:F.y,r:ju,fill:Mu,stroke:F.color,strokeWidth:T?3.5:2.75,strokeDasharray:`4 3`}),F.kind===`worktree`?(0,E.jsx)(`text`,{x:F.x,y:F.y,textAnchor:`middle`,dominantBaseline:`central`,fontSize:12,fontWeight:700,fill:F.color,style:{pointerEvents:`none`,userSelect:`none`},children:F.count}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`circle`,{cx:F.x,cy:F.y,r:2.5,fill:F.color}),F.conflictedCount>0&&(0,E.jsxs)(`g`,{style:{pointerEvents:`none`,userSelect:`none`},children:[(0,E.jsx)(`rect`,{x:F.x+ju+6,y:F.y-10,width:Zt,height:20,rx:10,fill:`#fab38722`,stroke:`#fab387`,strokeWidth:1.4}),(0,E.jsx)(`text`,{x:F.x+ju+6+Zt/2,y:F.y,textAnchor:`middle`,dominantBaseline:`central`,fontSize:11,fontWeight:800,fill:`#fab387`,children:F.conflictedCount})]})]})]})]}),st.map(e=>{let{placement:t}=e,n=t.isSelected||t.isCurrent,r=t.isSelected?t.color+`35`:t.isCurrent?t.color+`2a`:t.color+`18`,i=[`inset 0 1px 0 rgba(255, 255, 255, 0.14)`,`inset 0 -1px 0 ${t.color}18`,n?`0 0 8px ${t.color}38`:`0 2px 5px rgba(0, 0, 0, 0.18)`].join(`, `);return(0,E.jsxs)(zs.div,{onClick:e=>yt(e,t.refName),onPointerEnter:()=>We(t.nodeSha),onPointerLeave:()=>Ge(t.nodeSha),style:{position:`absolute`,left:0,top:0,zIndex:20,height:20,padding:`0 7px`,borderRadius:4,background:`linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.015) 38%, ${t.color}18 100%), linear-gradient(${r}, ${r}), rgba(24, 24, 37, 0.5)`,backdropFilter:`blur(3px) saturate(145%) contrast(103%)`,WebkitBackdropFilter:`blur(3px) saturate(145%) contrast(103%)`,border:`1px solid ${n?t.color:t.color+`66`}`,color:t.color,fontSize:11,fontWeight:600,lineHeight:`20px`,whiteSpace:`nowrap`,cursor:`pointer`,userSelect:`none`,boxShadow:i,transformOrigin:`top left`,opacity:L?Ss(Ee,t=>Z(e.fromOpacity,e.toOpacity,t)):e.toOpacity,transform:L?Ss(Ee,t=>`translate(${Z(e.fromX,e.toX,t)}px, ${Z(e.fromY,e.toY,t)}px) scale(${Z(e.fromScale,e.toScale,t)})`):`translate(${e.toX}px, ${e.toY}px) scale(${e.toScale})`},children:[af(t.isRemote,t.isCurrent),t.refName]},e.key)}),Ze.map(e=>{let t=tt.get(e.row.sha)??0,i=e.x+ju+8+t+(t>0?8:0),a=e.y-10,o=te!==null,s=!o&&e.row.sha===n?Gt:[],c=!!r&&e.row.refNames.includes(r),l=c?pt:[],u=o&&c&&te?l.find(e=>e.action===te.action)??te:null,d=o?u?[u]:[]:l,f=!o&&!!P&&e.row.refNames.includes(P)&&ht,p=!o&&!!mt&&e.row.sha!==N?.targetSha,m=!g&&!o&&!L&&(ve===e.row.sha||be===e.row.sha),h=!o&&gt&&e.row.sha!==gt.targetSha?$d(e.row.refNames.filter(e=>e!==gt.shortName)):null,_=d.length>0||f||p||m||!!h;return s.length===0&&!_?null:(0,E.jsxs)(x.Fragment,{children:[s.length>0&&(0,E.jsx)(`div`,{style:{position:`absolute`,left:e.x-ju-12,top:e.y,transform:`translate(-100%, -50%)`,display:`flex`,alignItems:`center`,gap:10,flexWrap:`nowrap`,zIndex:20},children:s.map(e=>(0,E.jsx)(pu,{label:e.label,tone:e.tone,onClick:()=>Kt(e.action)},e.action))}),_&&(0,E.jsxs)(`div`,{onPointerEnter:()=>We(e.row.sha),onPointerLeave:()=>Ge(e.row.sha),style:{position:`absolute`,left:i,top:a,display:`flex`,alignItems:`flex-start`,gap:10,flexWrap:`nowrap`,zIndex:20},children:[d.length>0&&(0,E.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,position:`relative`,top:hd(Fu),zIndex:7},children:d.map(e=>(0,E.jsx)(mu,{label:e.label,tone:e.tone,loading:!!u&&e.action===u.action,onClick:()=>xt(e)},e.action))}),p&&(0,E.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,position:`relative`,zIndex:7},children:(0,E.jsx)(mu,{label:`Move`,tone:`neutral`,size:`compact`,variant:`ghost`,onClick:()=>St(e.row.sha)})}),h&&(0,E.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,position:`relative`,top:hd(Pu),zIndex:7},children:(0,E.jsx)(pu,{label:`Rebase`,tone:`success`,onClick:()=>Nt(h)})}),f&&(0,E.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,position:`relative`,top:hd(Pu),zIndex:7},children:(0,E.jsx)(pu,{label:`Merge`,tone:`merge`,onClick:jt,onMouseEnter:kt,onMouseLeave:At})}),m&&(0,E.jsxs)(`div`,{style:{position:`relative`,top:hd(Iu),zIndex:8},children:[(0,E.jsx)(`button`,{type:`button`,title:`Create branch or tag`,"aria-label":`Create branch or tag`,onClick:t=>{t.stopPropagation(),_e(!1),xe(t=>t===e.row.sha?null:e.row.sha),ye(e.row.sha)},style:{width:Iu,height:Iu,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,padding:0,borderRadius:6,border:`1px solid #4a4f68`,background:`#2f3348`,color:`#cdd6f4`,fontSize:21,fontWeight:600,lineHeight:1,cursor:`pointer`,fontFamily:`inherit`,boxShadow:`0 8px 20px rgba(0,0,0,0.28)`},onMouseEnter:e=>{e.currentTarget.style.background=`#3a4058`},onMouseLeave:e=>{e.currentTarget.style.background=`#2f3348`},children:`+`}),be===e.row.sha&&(0,E.jsx)(`div`,{onClick:e=>e.stopPropagation(),style:{position:`absolute`,right:0,top:30,width:Lu,padding:5,borderRadius:7,border:`1px solid #4a4f68`,background:`#181825`,boxShadow:`0 14px 30px rgba(0,0,0,0.42)`,display:`flex`,flexDirection:`column`,gap:4},children:[`branch`,`tag`].map(t=>(0,E.jsx)(`button`,{type:`button`,onClick:n=>{n.stopPropagation(),Ct(t,e.row.sha)},style:{height:28,padding:`0 9px`,borderRadius:5,border:`1px solid transparent`,background:`transparent`,color:`#cdd6f4`,fontSize:12,fontWeight:600,fontFamily:`inherit`,textAlign:`left`,cursor:`pointer`},onMouseEnter:e=>{e.currentTarget.style.background=`#313244`,e.currentTarget.style.borderColor=`#45475a`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`,e.currentTarget.style.borderColor=`transparent`},children:t===`branch`?`Branch`:`Tag`},t))})]})]})]},`${e.row.sha}-actions`)})]})})]})}var xf=56,Sf=56,Cf=12,wf=`#11111b`,Tf=56,Ef=80,Df=110,Of=150,kf=28,Af=640,jf=[`#89b4fa`,`#a6e3a1`,`#f9e2af`,`#f38ba8`,`#cba6f7`,`#94e2d5`,`#fab387`,`#74c7ec`,`#f5c2e7`,`#b4befe`];function Mf(e){return jf[(e%jf.length+jf.length)%jf.length]}var Nf=`#f9e2af`,Pf={commit:`#a6e3a1`,amend:`#f9e2af`,checkout:`#89b4fa`,reset:`#f38ba8`,rebase:`#fab387`,merge:`#cba6f7`,"cherry-pick":`#94e2d5`,revert:`#f5c2e7`,pull:`#74c7ec`,branch:`#b4befe`,clone:`#9399b2`,other:`#9399b2`},Ff=new Set([`reset`,`rebase`,`amend`]),If={reset:`reset moved HEAD away — commits only on the old position may be unreachable`,rebase:`rebase rewrote history — the original commits live on only in the reflog`,amend:`amend replaced the previous commit — the original version is only in the reflog`};function Lf(e,t,n,r){if(e===n)return`M${e},${t}L${n},${r}`;let i=r-t;return`M${e},${t}C${e},${t+i*.3} ${n},${r-i*.3} ${n},${r}`}function Rf(e){let t=new Map;e.forEach((e,n)=>t.set(e.sha,n));let n=new Map,r=[],i=[],a=0;for(let o=0;o<e.length;o++){let s=e[o],c=n.get(s.sha);c===void 0&&(c=r.indexOf(null),c===-1?(c=r.length,r.push(s.sha)):r[c]=s.sha,n.set(s.sha,c)),i.push(c),c>a&&(a=c),t.get(s.sha)===o&&(r[c]=null)}return{lanes:i,maxLane:a}}function zf(e){if(!e)return``;let t=Math.floor(Date.now()/1e3-e);if(t<60)return`just now`;if(t<3600)return`${Math.floor(t/60)}m ago`;if(t<86400)return`${Math.floor(t/3600)}h ago`;if(t<172800)return`yesterday`;if(t<14*86400)return`${Math.floor(t/86400)}d ago`;let n=new Date(e*1e3),r=n.toLocaleDateString(void 0,{month:`short`,day:`numeric`});return n.getFullYear()===new Date().getFullYear()?r:`${r} ${n.getFullYear()}`}function Bf(){let e=R(e=>e.reflog),t=R(e=>e.reflogLoading),n=R(e=>e.reflogMaxCount),r=R(e=>e.selectedSha),i=R(e=>e.selectCommit),a=R(e=>e.recoverBranch),o=R(e=>e.checkoutSha),s=R(e=>e.performCommitAction),c=R(e=>e.loadMoreReflog),l=R(e=>e.showError),[u,d]=(0,x.useState)(null),[f,p]=(0,x.useState)(null),[m,h]=(0,x.useState)(null);(0,x.useEffect)(()=>{d(null)},[e]);let g=e?.entries??[],{lanes:_,maxLane:v}=(0,x.useMemo)(()=>Rf(g),[g]),y=(0,x.useMemo)(()=>{let e=new Set;for(let t of g)t.isReachable||e.add(t.sha);return e},[g]),b=e=>Of+e*Sf,S=e=>Tf+e*xf,C=Of+(v+1)*Sf+kf,w=C+Af,T=Tf+g.length*xf+Ef,ee=(0,x.useMemo)(()=>{let e=``;return g.map(t=>{let n=zf(t.entryUnix);return n===e?``:(e=n,n)})},[g]),te=e=>{p({entry:e,defaultName:`recovered-${e.sha.slice(0,7)}`})},ne=e=>{h({title:`Checkout commit`,message:`Checkout ${e.sha.slice(0,8)}? This detaches HEAD at that state.`,confirmLabel:`Checkout`,onConfirm:()=>{o(e.sha).catch(e=>l(`Checkout failed`,e))}})},re=e=>{h({title:`Cherry pick commit`,message:`Cherry-pick ${e.sha.slice(0,8)} onto the current branch?`,confirmLabel:`Cherry pick`,onConfirm:()=>{s(`cherry-pick`,e.sha).catch(e=>l(`Cherry-pick failed`,e))}})},ie=e=>{if(!f)return;let{entry:t}=f;p(null),a(e,t.sha).catch(e=>l(`Recover failed`,e))},ae=e=>{navigator.clipboard?.writeText(e.sha)};return!e&&t?(0,E.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#6c7086`,fontSize:13},children:`Reading reflog…`}):g.length===0?(0,E.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#45475a`,fontSize:13},children:`No reflog entries — this repository has no recorded HEAD movements yet`}):(0,E.jsxs)(`div`,{style:{flex:1,height:`100%`,overflow:`auto`,position:`relative`,background:`#1e1e2e`},onClick:()=>d(null),children:[(0,E.jsx)(Eu,{open:!!f,title:f?`Create branch at ${f.entry.sha.slice(0,8)}`:`Create branch`,label:`Branch name`,initialValue:f?.defaultName??``,confirmLabel:`Create`,onSubmit:ie,onClose:()=>p(null)}),(0,E.jsx)(Du,{open:!!m,title:m?.title??``,message:m?.message??``,confirmLabel:m?.confirmLabel??`Confirm`,onConfirm:()=>{let e=m?.onConfirm;h(null),e?.()},onClose:()=>h(null)}),y.size>0&&(0,E.jsxs)(`div`,{style:{position:`sticky`,top:0,zIndex:30,margin:`10px 14px 0`,padding:`8px 14px`,borderRadius:6,background:`#f9e2af18`,border:`1px solid ${Nf}55`,color:Nf,fontSize:12,display:`flex`,alignItems:`center`,gap:8},children:[(0,E.jsx)(`span`,{style:{fontSize:14},children:`⚠`}),(0,E.jsxs)(`span`,{children:[y.size===1?`1 commit in your reflog is no longer reachable from any branch.`:`${y.size} commits in your reflog are no longer reachable from any branch.`,` `,`Select a dashed entry below to recover it.`]})]}),(0,E.jsxs)(`div`,{style:{width:w,height:T,position:`relative`},children:[(0,E.jsxs)(`div`,{style:{position:`absolute`,left:150-Cf,top:16,color:`#585b70`,fontSize:11,whiteSpace:`nowrap`,userSelect:`none`},children:[e?.refName??`HEAD`,` time machine — every state HEAD has pointed to, newest first`]}),(0,E.jsxs)(`svg`,{width:w,height:T,style:{position:`absolute`,top:0,left:0,pointerEvents:`none`,overflow:`visible`},children:[g.slice(0,-1).map((e,t)=>{let n=b(_[t]),r=S(t);return(0,E.jsx)(`path`,{d:Lf(b(_[t+1]),S(t+1),n,r),stroke:Mf(_[t]),strokeWidth:2.25,fill:`none`,strokeLinecap:`round`,opacity:.85},`edge-${t}`)}),g.map((e,t)=>{let n=b(_[t]),a=S(t),o=Mf(_[t]),s=u===t||u===null&&e.sha===r,c=!e.isReachable;return(0,E.jsxs)(`g`,{onClick:n=>{n.stopPropagation(),d(t),i(e.sha)},style:{cursor:`pointer`,pointerEvents:`auto`},children:[(0,E.jsx)(`title`,{children:`${e.selector} — ${e.message}`}),s&&(0,E.jsx)(`circle`,{cx:n,cy:a,r:Cf*2.3,fill:o,opacity:.15}),c&&(0,E.jsx)(`circle`,{cx:n,cy:a,r:17,fill:`none`,stroke:Nf,strokeWidth:1.5,strokeDasharray:`4 3`,opacity:.9}),(0,E.jsx)(`circle`,{cx:n,cy:a,r:Cf,fill:wf,stroke:o,strokeWidth:s?3:2.25}),t===0&&(0,E.jsx)(`circle`,{cx:n,cy:a,r:3,fill:o})]},`node-${t}`)})]}),g.map((e,t)=>{let n=S(t);return ee[t]?(0,E.jsx)(`div`,{style:{position:`absolute`,left:0,top:n-7,width:Df,textAlign:`right`,color:`#585b70`,fontSize:11,whiteSpace:`nowrap`,pointerEvents:`none`,userSelect:`none`},children:ee[t]},`time-${t}`):null}),g.map((e,t)=>{let n=S(t),r=u===t,a=!e.isReachable,o=Pf[e.kind],s=Ff.has(e.kind),c=If[e.kind];return(0,E.jsxs)(`div`,{onClick:n=>{n.stopPropagation(),d(t),i(e.sha)},style:{position:`absolute`,left:C,top:n-10,cursor:`pointer`},children:[(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,height:20,whiteSpace:`nowrap`},children:[(0,E.jsxs)(`span`,{title:c??e.message,style:{height:18,padding:`0 8px`,borderRadius:4,background:o+`20`,border:`1px solid ${o}55`,color:o,fontSize:10,fontWeight:700,lineHeight:`18px`,textTransform:`uppercase`,letterSpacing:.4},children:[s?`⚠ `:``,e.kind]}),a&&(0,E.jsx)(`span`,{title:`Not reachable from any branch — only the reflog still knows this commit`,style:{height:18,padding:`0 8px`,borderRadius:4,background:`#f9e2af20`,border:`1px solid ${Nf}`,color:Nf,fontSize:10,fontWeight:700,lineHeight:`18px`},children:`LOST`}),e.refNames.slice(0,3).map(e=>(0,E.jsx)(`span`,{style:{height:18,padding:`0 7px`,borderRadius:4,background:`#89b4fa18`,border:`1px solid #89b4fa55`,color:`#89b4fa`,fontSize:10,fontWeight:600,lineHeight:`18px`},children:e},e)),(0,E.jsx)(`span`,{style:{color:`#6c7086`,fontSize:11,fontFamily:`monospace`},children:e.sha.slice(0,7)}),(0,E.jsx)(`span`,{style:{color:`#a6adc8`,fontSize:12,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:360},children:e.subject})]}),r?(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginTop:4},children:[a?(0,E.jsx)(pu,{label:`Recover branch`,tone:`success`,onClick:()=>te(e)}):(0,E.jsx)(mu,{label:`Branch here`,tone:`neutral`,size:`compact`,onClick:()=>te(e)}),(0,E.jsx)(mu,{label:`Checkout`,tone:`warning`,size:`compact`,onClick:()=>ne(e)}),(0,E.jsx)(mu,{label:`Cherry-pick`,tone:`neutral`,size:`compact`,onClick:()=>re(e)}),(0,E.jsx)(mu,{label:`Copy sha`,tone:`neutral`,size:`compact`,variant:`ghost`,onClick:()=>ae(e)})]}):(0,E.jsx)(`div`,{style:{marginTop:4,color:`#6c7086`,fontSize:10,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:Af-40},children:e.message})]},`row-${t}`)}),g.length>=n&&(0,E.jsx)(`div`,{style:{position:`absolute`,left:C,top:S(g.length)+4},children:(0,E.jsx)(mu,{label:t?`Loading…`:`Load older entries`,tone:`neutral`,size:`compact`,variant:`ghost`,onClick:()=>{c()}})})]})]})}var Vf=Object.defineProperty,Hf=e=>t=>{var n=e[t];if(n)return n();throw Error(`Module not found in bundle: `+t)},Q=(e,t)=>()=>(e&&(t=e(e=0)),t),$=(e,t)=>{for(var n in t)Vf(e,n,{get:t[n],enumerable:!0})},Uf={};$(Uf,{default:()=>Wf});var Wf,Gf=Q(()=>{Wf=[{type:`cmnt`,match:/(;|#).*/gm},{expand:`str`},{expand:`num`},{type:`num`,match:/\$[\da-fA-F]*\b/g},{type:`kwd`,match:/^[a-z]+\s+[a-z.]+\b/gm,sub:[{type:`func`,match:/^[a-z]+/g}]},{type:`kwd`,match:/^\t*[a-z][a-z\d]*\b/gm},{match:/%|\$/g,type:`oper`}]}),Kf={};$(Kf,{default:()=>Jf});var qf,Jf,Yf=Q(()=>{qf={type:`var`,match:/\$\w+|\${[^}]*}|\$\([^)]*\)/g},Jf=[{sub:`todo`,match:/#.*/g},{type:`str`,match:/(["'])((?!\1)[^\r\n\\]|\\[^])*\1?/g,sub:[qf]},{type:`oper`,match:/(?<=\s|^)\.*\/[a-z/_.-]+/gi},{type:`kwd`,match:/\s-[a-zA-Z]+|$<|[&|;]+|\b(unset|readonly|shift|export|if|fi|else|elif|while|do|done|for|until|case|esac|break|continue|exit|return|trap|wait|eval|exec|then|declare|enable|local|select|typeset|time|add|remove|install|update|delete)(?=\s|$)/g},{expand:`num`},{type:`func`,match:/(?<=(^|\||\&\&|\;)\s*)[a-z_.-]+(?=\s|$)/gim},{type:`bool`,match:/(?<=\s|^)(true|false)(?=\s|$)/g},{type:`oper`,match:/[=(){}<>!]+/g},{type:`var`,match:/(?<=\s|^)[\w_]+(?=\s*=)/g},qf]}),Xf={};$(Xf,{default:()=>Zf});var Zf,Qf=Q(()=>{Zf=[{match:/[^\[\->+.<\]\s].*/g,sub:`todo`},{type:`func`,match:/\.+/g},{type:`kwd`,match:/[<>]+/g},{type:`oper`,match:/[+-]+/g}]}),$f={};$($f,{default:()=>ep});var ep,tp=Q(()=>{ep=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{expand:`num`},{type:`kwd`,match:/#\s*include (<.*>|".*")/g,sub:[{type:`str`,match:/(<|").*/g}]},{match:/asm\s*{[^}]*}/g,sub:[{type:`kwd`,match:/^asm/g},{match:/[^{}]*(?=}$)/g,sub:`asm`}]},{type:`kwd`,match:/\*|&|#[a-z]+\b|\b(asm|auto|double|int|struct|break|else|long|switch|case|enum|register|typedef|char|extern|return|union|const|float|short|unsigned|continue|for|signed|void|default|goto|sizeof|volatile|do|if|static|while)\b/g},{type:`oper`,match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:`func`,match:/[a-zA-Z_][\w_]*(?=\s*\()/g},{type:`class`,match:/\b[A-Z][\w_]*\b/g}]}),np={};$(np,{default:()=>rp});var rp,ip=Q(()=>{rp=[{match:/\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{type:`kwd`,match:/@\w+\b|\b(and|not|only|or)\b|\b[a-z-]+(?=[^{}]*{)/g},{type:`var`,match:/\b[\w-]+(?=\s*:)|(::?|\.)[\w-]+(?=[^{}]*{)/g},{type:`func`,match:/#[\w-]+(?=[^{}]*{)/g},{type:`num`,match:/#[\da-f]{3,8}/g},{type:`num`,match:/\d+(\.\d+)?(cm|mm|in|px|pt|pc|em|ex|ch|rem|vm|vh|vmin|vmax|%)?/g,sub:[{type:`var`,match:/[a-z]+|%/g}]},{match:/url\([^)]*\)/g,sub:[{type:`func`,match:/url(?=\()/g},{type:`str`,match:/[^()]+/g}]},{type:`func`,match:/\b[a-zA-Z]\w*(?=\s*\()/g},{type:`num`,match:/\b[a-z-]+\b/g}]}),ap={};$(ap,{default:()=>op});var op,sp=Q(()=>{op=[{expand:`strDouble`},{type:`oper`,match:/,/g}]}),cp={};$(cp,{default:()=>lp});var lp,up=Q(()=>{lp=[{type:`deleted`,match:/^[-<].*/gm},{type:`insert`,match:/^[+>].*/gm},{type:`kwd`,match:/!.*/gm},{type:`section`,match:/^@@.*@@$|^\d.*|^([*-+])\1\1.*/gm}]}),dp={};$(dp,{default:()=>fp});var fp,pp=Q(()=>{Yf(),fp=[{type:`kwd`,match:/^(FROM|RUN|CMD|LABEL|MAINTAINER|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ARG|ONBUILD|STOPSIGNAL|HEALTHCHECK|SHELL)\b/gim},...Jf]}),mp={};$(mp,{default:()=>hp});var hp,gp=Q(()=>{up(),hp=[{match:/^#.*/gm,sub:`todo`},{expand:`str`},...lp,{type:`func`,match:/^(\$ )?git(\s.*)?$/gm},{type:`kwd`,match:/^commit \w+$/gm}]}),_p={};$(_p,{default:()=>vp});var vp,yp=Q(()=>{vp=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{expand:`num`},{type:`kwd`,match:/\*|&|\b(break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go|goto|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/g},{type:`func`,match:/[a-zA-Z_][\w_]*(?=\s*\()/g},{type:`class`,match:/\b[A-Z][\w_]*\b/g},{type:`oper`,match:/[+\-*\/%&|^~=!<>.^-]+/g}]}),bp={};$(bp,{default:()=>Ep,name:()=>Cp,properties:()=>wp,xmlElement:()=>Tp});var xp,Sp,Cp,wp,Tp,Ep,Dp=Q(()=>{xp=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�`,Sp=xp+`\\-\\.0-9·̀-ͯ‿-⁀`,Cp=`[${xp}][${Sp}]*`,wp=`\\s*(\\s+${Cp}\\s*(=\\s*([^"']\\S*|("|')(\\\\[^]|(?!\\4)[^])*\\4?)?)?\\s*)*`,Tp={match:RegExp(`<[/!?]?${Cp}${wp}[/!?]?>`,`g`),sub:[{type:`var`,match:RegExp(`^<[/!?]?${Cp}`,`g`),sub:[{type:`oper`,match:/^<[\/!?]?/g}]},{type:`str`,match:/=\s*([^"']\S*|("|')(\\[^]|(?!\2)[^])*\2?)/g,sub:[{type:`oper`,match:/^=/g}]},{type:`oper`,match:/[\/!?]?>/g},{type:`class`,match:RegExp(Cp,`g`)}]},Ep=[{match:/<!--[^]*?-->/g,sub:`todo`},{type:`class`,match:/<!\[CDATA\[[\s\S]*?\]\]>/gi},Tp,{type:`str`,match:RegExp(`<\\?${Cp}([^?]|\\?[^?>])*\\?+>`,`g`),sub:[{type:`var`,match:RegExp(`^<\\?${Cp}`,`g`),sub:[{type:`oper`,match:/^<\?/g}]},{type:`oper`,match:/\?+>$/g}]},{type:`var`,match:/&(#x?)?[\da-z]{1,8};/gi}]}),Op={};$(Op,{default:()=>kp});var kp,Ap=Q(()=>{Dp(),kp=[{type:`class`,match:/<!DOCTYPE("[^"]*"|'[^']*'|[^"'>])*>/gi,sub:[{type:`str`,match:/"[^"]*"|'[^']*'/g},{type:`oper`,match:/^<!|>$/g},{type:`var`,match:/DOCTYPE/gi}]},{match:RegExp(`<style${wp}>[^]*?</style\\s*>`,`g`),sub:[{match:RegExp(`^<style${wp}>`,`g`),sub:Tp.sub},{match:RegExp(`${Tp.match}|[^]*(?=</style\\s*>$)`,`g`),sub:`css`},Tp]},{match:RegExp(`<script${wp}>[^]*?<\/script\\s*>`,`g`),sub:[{match:RegExp(`^<script${wp}>`,`g`),sub:Tp.sub},{match:RegExp(`${Tp.match}|[^]*(?=<\/script\\s*>$)`,`g`),sub:`js`},Tp]},...Ep]}),jp,Mp,Np=Q(()=>{jp=[[`bash`,[/#!(\/usr)?\/bin\/bash/g,500],[/\b(if|elif|then|fi|echo)\b|\$/g,10]],[`html`,[/<\/?[a-z-]+[^\n>]*>/g,10],[/^\s+<!DOCTYPE\s+html/g,500]],[`http`,[/^(GET|HEAD|POST|PUT|DELETE|PATCH|HTTP)\b/g,500]],[`js`,[/\b(console|await|async|function|export|import|this|class|for|let|const|map|join|require|document|window)\b/g,10]],[`ts`,[/\b(console|await|async|function|export|import|this|class|for|let|const|map|join|require|document|window|implements|interface|namespace)\b/g,10]],[`py`,[/\b(def|print|await|async|class|and|or|lambda|import|from|self|asyncio|pass|True|False|None|__init__)\b/g,10]],[`sql`,[/\b(SELECT|INSERT|FROM)\b/g,50]],[`pl`,[/#!(\/usr)?\/bin\/perl/g,500],[/\b(use|print)\b|\$/g,10]],[`lua`,[/#!(\/usr)?\/bin\/lua/g,500]],[`make`,[/\b(ifneq|endif|if|elif|then|fi|echo|.PHONY|^[a-z]+ ?:$)\b|\$/gm,10]],[`uri`,[/https?:|mailto:|tel:|ftp:/g,30]],[`css`,[/^(@import|@page|@media|(\.|#)[a-z]+)/gm,20]],[`diff`,[/^[+><-]/gm,10],[/^@@ ?[-+,0-9 ]+ ?@@/gm,25]],[`md`,[/^(>|\t\*|\t\d+.)/gm,10],[/\[.*\](.*)/g,10]],[`docker`,[/^(FROM|ENTRYPOINT|RUN)/gm,500]],[`xml`,[/<\/?[a-z-]+[^\n>]*>/g,10],[/^<\?xml/g,500]],[`c`,[/#include\b|\bprintf\s+\(/g,100]],[`rs`,[/^\s+(use|fn|mut|match)\b/gm,100]],[`go`,[/\b(func|fmt|package)\b/g,100]],[`java`,[/^import\s+java/gm,500]],[`asm`,[/^(section|global main|extern|\t(call|mov|ret))/gm,100]],[`css`,[/^(@import|@page|@media|(\.|#)[a-z]+)/gm,20]],[`json`,[/\b(true|false|null|\{})\b|\"[^"]+\":/g,10]],[`yaml`,[/^(\s+)?[a-z][a-z0-9]*:/gim,10]]],Mp=e=>jp.map(([t,...n])=>[t,n.reduce((t,[n,r])=>t+[...e.matchAll(n)].length*r,0)]).filter(([e,t])=>t>20).sort((e,t)=>t[1]-e[1])[0]?.[0]||`plain`}),Pp={};$(Pp,{default:()=>Fp});var Fp,Ip=Q(()=>{Np(),Fp=[{type:`kwd`,match:/^(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PRI|SEARCH)\b/gm},{expand:`str`},{type:`section`,match:/\bHTTP\/[\d.]+\b/g},{expand:`num`},{type:`oper`,match:/[,;:=]/g},{type:`var`,match:/[a-zA-Z][\w-]*(?=:)/g},{match:/\n\n[^]*/g,sub:Mp}]}),Lp={};$(Lp,{default:()=>Rp});var Rp,zp=Q(()=>{Rp=[{match:/(^[ \f\t\v]*)[#;].*/gm,sub:`todo`},{type:`var`,match:/.*(?==)/g},{type:`section`,match:/^\s*\[.+\]\s*$/gm},{type:`oper`,match:/=/g},{type:`str`,match:/.*/g}]}),Bp={};$(Bp,{default:()=>Vp});var Vp,Hp=Q(()=>{Vp=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{expand:`num`},{type:`kwd`,match:/\b(abstract|assert|boolean|break|byte|case|catch|char|class|continue|const|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|package|private|protected|public|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|transient|try|var|void|volatile|while)\b/g},{type:`oper`,match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:`func`,match:/[a-zA-Z_][\w_]*(?=\s*\()/g},{type:`class`,match:/\b[A-Z][\w_]*\b/g}]}),Up={};$(Up,{default:()=>Wp});var Wp,Gp=Q(()=>{Wp=[{match:/(("|')([^\r\n\\]|\\[^])*?\2|[a-zA-Z]\w*)(?=\s*:)/g},{match:/\/\*\*((?!\*\/)[^])*(\*\/)?/g,sub:`jsdoc`},{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{match:/`((?!`)[^]|\\[^])*`?/g,sub:`js_template_literals`},{type:`kwd`,match:/=>|\b(this|set|get|as|async|await|break|case|catch|class|const|constructor|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|if|implements|import|in|instanceof|interface|let|var|of|new|package|private|protected|public|return|static|super|switch|throw|throws|try|typeof|void|while|with|yield)\b/g},{match:/\/((?!\/)[^\r\n\\]|\\.)+\/[dgimsuy]*/g,sub:`regex`},{expand:`num`},{type:`num`,match:/\b(NaN|null|undefined|[A-Z][A-Z_]*)\b/g},{type:`bool`,match:/\b(true|false)\b/g},{type:`oper`,match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:`class`,match:/\b[A-Z][\w_]*\b/g},{type:`func`,match:/[a-zA-Z$_][\w$_]*(?=\s*((\?\.)?\s*\(|=\s*(\(?[\w,{}\[\])]+\)? =>|function\b)))/g}]}),Kp={};$(Kp,{default:()=>qp,type:()=>Jp});var qp,Jp,Yp=Q(()=>{qp=[{match:new class{exec(e){let t=this.lastIndex,n,r=n=>{for(;++t<e.length-2;)if(e[t]==`{`)r();else if(e[t]==`}`)return};for(;t<e.length;++t)if(e[t-1]!=`\\`&&e[t]==`$`&&e[t+1]==`{`)return n=t++,r(t),this.lastIndex=t+1,{index:n,0:e.slice(n,t+1)};return null}},sub:[{type:`kwd`,match:/^\${|}$/g},{match:/(?!^\$|{)[^]+(?=}$)/g,sub:`js`}]}],Jp=`str`}),Xp={};$(Xp,{default:()=>Zp,type:()=>Qp});var Zp,Qp,$p=Q(()=>{Zp=[{type:`err`,match:/\b(TODO|FIXME|DEBUG|OPTIMIZE|WARNING|XXX|BUG)\b/g},{type:`class`,match:/\bIDEA\b/g},{type:`insert`,match:/\b(CHANGED|FIX|CHANGE)\b/g},{type:`oper`,match:/\bQUESTION\b/g}],Qp=`cmnt`}),em={};$(em,{default:()=>tm,type:()=>nm});var tm,nm,rm=Q(()=>{$p(),tm=[{type:`kwd`,match:/@\w+/g},{type:`class`,match:/{[\w\s|<>,.@\[\]]+}/g},{type:`var`,match:/\[[\w\s="']+\]/g},...Zp],nm=`cmnt`}),im={};$(im,{default:()=>am});var am,om=Q(()=>{am=[{type:`var`,match:/(("|')([^\r\n\\]|\\[^])*?\2|[a-zA-Z]\w*)(?=\s*:)/g},{expand:`str`},{expand:`num`},{type:`num`,match:/\bnull\b/g},{type:`bool`,match:/\b(true|false)\b/g}]}),sm={};$(sm,{default:()=>cm});var cm,lm=Q(()=>{Np(),cm=[{type:`cmnt`,match:/^>.*|(=|-)\1+/gm},{type:`class`,match:/\*\*.*?\*\*/g},{match:/^(`{3,})(.*)\n[^]*?^\1[ \t]*$/gm,sub:e=>({type:`kwd`,sub:[{match:/\n[^]*(?=```)/g,sub:e.split(`
600
+ `)[0].slice(3)||Mp(e)}]})},{type:`str`,match:/`[^`]*`/g},{type:`var`,match:/~~.*?~~/g},{type:`kwd`,match:/\b_\S([^\n]*?\S)?_\b|\*\S([^\n]*?\S)?\*/g},{type:`kwd`,match:/^\s*(\*|\d+\.)\s/gm},{type:`func`,match:/\[[^\]]*]\([^)]*\)|<[^>]*>/g,sub:[{type:`oper`,match:/^\[[^\]]*]/g}]}]}),um={};$(um,{default:()=>dm});var dm,fm=Q(()=>{lm(),Np(),dm=[{type:`insert`,match:/(leanpub-start-insert)((?!leanpub-end-insert)[^])*(leanpub-end-insert)?/g,sub:[{type:`insert`,match:/leanpub-(start|end)-insert/g},{match:/(?!leanpub-start-insert)((?!leanpub-end-insert)[^])*/g,sub:Mp}]},{type:`deleted`,match:/(leanpub-start-delete)((?!leanpub-end-delete)[^])*(leanpub-end-delete)?/g,sub:[{type:`deleted`,match:/leanpub-(start|end)-delete/g},{match:/(?!leanpub-start-delete)((?!leanpub-end-delete)[^])*/g,sub:Mp}]},...cm]}),pm={};$(pm,{default:()=>mm});var mm,hm=Q(()=>{mm=[{type:`cmnt`,match:/^#.*/gm},{expand:`strDouble`},{expand:`num`},{type:`err`,match:/\b(err(or)?|[a-z_-]*exception|warn|warning|failed|ko|invalid|not ?found|alert|fatal)\b/gi},{type:`num`,match:/\b(null|undefined)\b/gi},{type:`bool`,match:/\b(false|true|yes|no)\b/gi},{type:`oper`,match:/\.|,/g}]}),gm={};$(gm,{default:()=>_m});var _m,vm=Q(()=>{_m=[{match:/^#!.*|--(\[(=*)\[[^]*?--\]\2\]|.*)/g,sub:`todo`},{expand:`str`},{type:`kwd`,match:/\b(and|break|do|else|elseif|end|for|function|if|in|local|not|or|repeat|return|then|until|while)\b/g},{type:`bool`,match:/\b(true|false|nil)\b/g},{type:`oper`,match:/[+*/%^#=~<>:,.-]+/g},{expand:`num`},{type:`func`,match:/[a-z_]+(?=\s*[({])/g}]}),ym={};$(ym,{default:()=>bm});var bm,xm=Q(()=>{bm=[{match:/^\s*#.*/gm,sub:`todo`},{expand:`str`},{type:`oper`,match:/[${}()]+/g},{type:`class`,match:/.PHONY:/gm},{type:`section`,match:/^[\w.]+:/gm},{type:`kwd`,match:/\b(ifneq|endif)\b/g},{expand:`num`},{type:`var`,match:/[A-Z_]+(?=\s*=)/g},{match:/^.*$/gm,sub:`bash`}]}),Sm={};$(Sm,{default:()=>Cm});var Cm,wm=Q(()=>{Cm=[{match:/#.*/g,sub:`todo`},{type:`str`,match:/(["'])(\\[^]|(?!\1)[^])*\1?/g},{expand:`num`},{type:`kwd`,match:/\b(any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while|not|and|or|xor)\b/g},{type:`oper`,match:/[-+*/%~!&<>|=?,]+/g},{type:`func`,match:/[a-z_]+(?=\s*\()/g}]}),Tm={};$(Tm,{default:()=>Em});var Em,Dm=Q(()=>{Em=[{expand:`strDouble`}]}),Om={};$(Om,{default:()=>km});var km,Am=Q(()=>{km=[{match:/#.*/g,sub:`todo`},{type:`str`,match:/f("""|''')(\\[^]|(?!\1)[^])*\1?|f("|')(\\[^]|(?!\3).)*\3?/gi,sub:[{type:`var`,match:/{[^{}]*}/g,sub:[{match:/(?!^{)[^]*(?=}$)/g,sub:`py`}]}]},{match:/("""|''')(\\[^]|(?!\1)[^])*\1?/g,sub:`todo`},{expand:`str`},{type:`kwd`,match:/\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|raise|return|try|while|with|yield)\b/g},{type:`bool`,match:/\b(False|True|None)\b/g},{expand:`num`},{type:`func`,match:/[a-z_]\w*(?=\s*\()/gi},{type:`oper`,match:/[-/*+<>,=!&|^%]+/g},{type:`class`,match:/\b[A-Z][\w_]*\b/g}]}),jm={};$(jm,{default:()=>Mm,type:()=>Nm});var Mm,Nm,Pm=Q(()=>{Mm=[{match:/^(?!\/).*/gm,sub:`todo`},{type:`num`,match:/\[((?!\])[^\\]|\\.)*\]/g},{type:`kwd`,match:/\||\^|\$|\\.|\w+($|\r|\n)/g},{type:`var`,match:/\*|\+|\{\d+,\d+\}/g}],Nm=`oper`}),Fm={};$(Fm,{default:()=>Im});var Im,Lm=Q(()=>{Im=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{expand:`num`},{type:`kwd`,match:/\b(as|break|const|continue|crate|else|enum|extern|false|fn|for|if|impl|in|let|loop|match|mod|move|mut|pub|ref|return|self|Self|static|struct|super|trait|true|type|unsafe|use|where|while|async|await|dyn|abstract|become|box|do|final|macro|override|priv|typeof|unsized|virtual|yield|try)\b/g},{type:`oper`,match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:`class`,match:/\b[A-Z][\w_]*\b/g},{type:`func`,match:/[a-zA-Z_][\w_]*(?=\s*!?\s*\()/g}]}),Rm={};$(Rm,{default:()=>zm});var zm,Bm=Q(()=>{zm=[{match:/--.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{type:`func`,match:/\b(AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/g},{type:`kwd`,match:/\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(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|kwdS?|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(?:S|ING)?|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/g},{type:`num`,match:/\.?\d[\d.oxa-fA-F-]*|\bNULL\b/g},{type:`bool`,match:/\b(TRUE|FALSE)\b/g},{type:`oper`,match:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|IN|ILIKE|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/g},{type:`var`,match:/@\S+/g}]}),Vm={};$(Vm,{default:()=>Hm});var Hm,Um=Q(()=>{Hm=[{match:/#.*/g,sub:`todo`},{type:`str`,match:/("""|''')((?!\1)[^]|\\[^])*\1?/g},{expand:`str`},{type:`section`,match:/^\[.+\]\s*$/gm},{type:`num`,match:/\b(inf|nan)\b|\d[\d:ZT.-]*/g},{expand:`num`},{type:`bool`,match:/\b(true|false)\b/g},{type:`oper`,match:/[+,.=-]/g},{type:`var`,match:/\w+(?= \=)/g}]}),Wm={};$(Wm,{default:()=>Gm});var Gm,Km=Q(()=>{Gp(),Gm=[{type:`type`,match:/:\s*(any|void|number|boolean|string|object|never|enum)\b/g},{type:`kwd`,match:/\b(type|namespace|typedef|interface|public|private|protected|implements|declare|abstract|readonly)\b/g},...Wp]}),qm={};$(qm,{default:()=>Jm});var Jm,Ym=Q(()=>{Jm=[{match:/^#.*/gm,sub:`todo`},{type:`class`,match:/^\w+(?=:?)/gm},{type:`num`,match:/:\d+/g},{type:`oper`,match:/[:/&?]|\w+=/g},{type:`func`,match:/[.\w]+@|#[\w]+$/gm},{type:`var`,match:/\w+\.\w+(\.\w+)*/g}]}),Xm={};$(Xm,{default:()=>Zm});var Zm,Qm=Q(()=>{Zm=[{match:/#.*/g,sub:`todo`},{expand:`str`},{type:`str`,match:/(>|\|)\r?\n((\s[^\n]*)?(\r?\n|$))*/g},{type:`type`,match:/!![a-z]+/g},{type:`bool`,match:/\b(Yes|No)\b/g},{type:`oper`,match:/[+:-]/g},{expand:`num`},{type:`var`,match:/[a-zA-Z]\w*(?=:)/g}]}),$m={num:{type:`num`,match:/(\.e?|\b)\d(e-|[\d.oxa-fA-F_])*(\.|\b)/g},str:{type:`str`,match:/(["'])(\\[^]|(?!\1)[^\r\n\\])*\1?/g},strDouble:{type:`str`,match:/"((?!")[^\r\n\\]|\\[^])*"?/g}},eh=Hf({"./languages/asm.js":()=>Promise.resolve().then(()=>(Gf(),Uf)),"./languages/bash.js":()=>Promise.resolve().then(()=>(Yf(),Kf)),"./languages/bf.js":()=>Promise.resolve().then(()=>(Qf(),Xf)),"./languages/c.js":()=>Promise.resolve().then(()=>(tp(),$f)),"./languages/css.js":()=>Promise.resolve().then(()=>(ip(),np)),"./languages/csv.js":()=>Promise.resolve().then(()=>(sp(),ap)),"./languages/diff.js":()=>Promise.resolve().then(()=>(up(),cp)),"./languages/docker.js":()=>Promise.resolve().then(()=>(pp(),dp)),"./languages/git.js":()=>Promise.resolve().then(()=>(gp(),mp)),"./languages/go.js":()=>Promise.resolve().then(()=>(yp(),_p)),"./languages/html.js":()=>Promise.resolve().then(()=>(Ap(),Op)),"./languages/http.js":()=>Promise.resolve().then(()=>(Ip(),Pp)),"./languages/ini.js":()=>Promise.resolve().then(()=>(zp(),Lp)),"./languages/java.js":()=>Promise.resolve().then(()=>(Hp(),Bp)),"./languages/js.js":()=>Promise.resolve().then(()=>(Gp(),Up)),"./languages/js_template_literals.js":()=>Promise.resolve().then(()=>(Yp(),Kp)),"./languages/jsdoc.js":()=>Promise.resolve().then(()=>(rm(),em)),"./languages/json.js":()=>Promise.resolve().then(()=>(om(),im)),"./languages/leanpub-md.js":()=>Promise.resolve().then(()=>(fm(),um)),"./languages/log.js":()=>Promise.resolve().then(()=>(hm(),pm)),"./languages/lua.js":()=>Promise.resolve().then(()=>(vm(),gm)),"./languages/make.js":()=>Promise.resolve().then(()=>(xm(),ym)),"./languages/md.js":()=>Promise.resolve().then(()=>(lm(),sm)),"./languages/pl.js":()=>Promise.resolve().then(()=>(wm(),Sm)),"./languages/plain.js":()=>Promise.resolve().then(()=>(Dm(),Tm)),"./languages/py.js":()=>Promise.resolve().then(()=>(Am(),Om)),"./languages/regex.js":()=>Promise.resolve().then(()=>(Pm(),jm)),"./languages/rs.js":()=>Promise.resolve().then(()=>(Lm(),Fm)),"./languages/sql.js":()=>Promise.resolve().then(()=>(Bm(),Rm)),"./languages/todo.js":()=>Promise.resolve().then(()=>($p(),Xp)),"./languages/toml.js":()=>Promise.resolve().then(()=>(Um(),Vm)),"./languages/ts.js":()=>Promise.resolve().then(()=>(Km(),Wm)),"./languages/uri.js":()=>Promise.resolve().then(()=>(Ym(),qm)),"./languages/xml.js":()=>Promise.resolve().then(()=>(Dp(),bp)),"./languages/yaml.js":()=>Promise.resolve().then(()=>(Qm(),Xm))}),th={},nh=(e=``)=>e.replaceAll(`&`,`&#38;`).replaceAll?.(`<`,`&lt;`).replaceAll?.(`>`,`&gt;`),rh=(e,t)=>t?`<span class="shj-syn-${t}">${e}</span>`:e;async function ih(e,t,n){try{let r,i,a={},o,s=[],c=0,l=typeof t==`string`?await(th[t]??(th[t]=eh(`./languages/${t}.js`))):t,u=[...typeof t==`string`?l.default:t.sub];for(;c<e.length;){for(a.index=null,r=u.length;r-->0;){if(i=u[r].expand?$m[u[r].expand]:u[r],s[r]===void 0||s[r].match.index<c){if(i.match.lastIndex=c,o=i.match.exec(e),o===null){u.splice(r,1),s.splice(r,1);continue}s[r]={match:o,lastIndex:i.match.lastIndex}}s[r].match[0]&&(s[r].match.index<=a.index||a.index===null)&&(a={part:i,index:s[r].match.index,match:s[r].match[0],end:s[r].lastIndex})}if(a.index===null)break;n(e.slice(c,a.index),l.type),c=a.end,a.part.sub?await ih(a.match,typeof a.part.sub==`string`?a.part.sub:typeof a.part.sub==`function`?a.part.sub(a.match):a.part,n):n(a.match,a.part.type)}n(e.slice(c,e.length),l.type)}catch{n(e)}}async function ah(e,t,n=!0,r={}){let i=``;return await ih(e,t,(e,t)=>i+=rh(nh(e),t)),n?`<div><div class="shj-numbers">${`<div></div>`.repeat(!r.hideLineNumbers&&e.split(`
601
+ `).length)}</div><div>${i}</div></div>`:i}var oh=5e4,sh={ts:`ts`,tsx:`ts`,mts:`ts`,cts:`ts`,js:`js`,jsx:`js`,mjs:`js`,cjs:`js`,py:`py`,rs:`rs`,go:`go`,java:`java`,lua:`lua`,pl:`pl`,c:`c`,h:`c`,cpp:`c`,cc:`c`,hpp:`c`,css:`css`,scss:`css`,html:`html`,htm:`html`,xml:`xml`,svg:`xml`,json:`json`,md:`md`,markdown:`md`,yml:`yaml`,yaml:`yaml`,toml:`toml`,ini:`ini`,sh:`bash`,bash:`bash`,zsh:`bash`,sql:`sql`,dockerfile:`docker`,makefile:`make`};function ch(e){let t=e.slice(e.lastIndexOf(`/`)+1).toLowerCase();return t===`dockerfile`?`docker`:t===`makefile`?`make`:sh[t.slice(t.lastIndexOf(`.`)+1)]??`plain`}var lh=`
602
+ .file-diff .shj-syn-cmnt { color: #6c7086; font-style: italic; }
603
+ .file-diff .shj-syn-kwd { color: #cba6f7; }
604
+ .file-diff .shj-syn-num { color: #fab387; }
605
+ .file-diff .shj-syn-bool { color: #fab387; }
606
+ .file-diff .shj-syn-str { color: #a6e3a1; }
607
+ .file-diff .shj-syn-func { color: #89b4fa; }
608
+ .file-diff .shj-syn-class { color: #f9e2af; }
609
+ .file-diff .shj-syn-section { color: #94e2d5; }
610
+ .file-diff .shj-syn-oper { color: #94e2d5; }
611
+ .file-diff .shj-syn-var { color: #cdd6f4; }
612
+ .file-diff .shj-syn-esc { color: #f5c2e7; }
613
+ .file-diff .shj-syn-err { color: #f38ba8; }
614
+ `;function uh(e){let t=[],n=!1;for(let r of e.split(`
615
+ `)){if(r.startsWith(`@@`)){n=!0,t.push({kind:`hunk`,content:r,marker:``});continue}n&&(r.startsWith(`+`)?t.push({kind:`add`,content:r.slice(1),marker:`+`}):r.startsWith(`-`)?t.push({kind:`del`,content:r.slice(1),marker:`-`}):r.startsWith(` `)||r===``?t.push({kind:`ctx`,content:r.slice(1),marker:` `}):r.startsWith(`\\`)&&t.push({kind:`ctx`,content:r,marker:``}))}return t}var dh={add:`#a6e3a114`,del:`#f38ba814`,hunk:`transparent`,ctx:`transparent`},fh={add:`#a6e3a1`,del:`#f38ba8`,hunk:`#89b4fa`,ctx:`#45475a`};function ph({entry:e,path:t}){let n=(0,x.useMemo)(()=>e.patchText?uh(e.patchText):[],[e.patchText]),r=(0,x.useMemo)(()=>ch(t),[t]),i=r!==`plain`&&n.length<=oh,[a,o]=(0,x.useState)(null);return(0,x.useEffect)(()=>{if(o(null),!i||n.length===0)return;let e=!1;return Promise.all(n.map(e=>e.kind===`hunk`||e.content.length===0?Promise.resolve(null):ah(e.content,r,!1).catch(()=>null))).then(t=>{e||o(t)}),()=>{e=!0}},[n,r,i]),e.loading?(0,E.jsx)(mh,{text:`Loading diff...`}):e.error?(0,E.jsx)(mh,{text:e.error,color:`#f38ba8`}):e.isBinary?(0,E.jsx)(mh,{text:`Binary file`}):n.length===0?(0,E.jsx)(mh,{text:`No textual changes`}):(0,E.jsxs)(`div`,{className:`file-diff`,style:{margin:`2px 0 6px 24px`,border:`1px solid #313244`,borderRadius:6,background:`#11111b`,overflow:`auto`,maxHeight:420,fontSize:11,fontFamily:`monospace`,lineHeight:1.5},children:[(0,E.jsx)(`style`,{children:lh}),(0,E.jsx)(`div`,{style:{minWidth:`fit-content`},children:n.map((e,t)=>{let n=a?.[t]??null;return(0,E.jsxs)(`div`,{style:{display:`flex`,background:dh[e.kind],color:e.kind===`hunk`?`#89b4fa`:`#cdd6f4`,whiteSpace:`pre`},children:[(0,E.jsx)(`span`,{style:{flexShrink:0,width:16,textAlign:`center`,color:fh[e.kind],userSelect:`none`},children:e.marker}),n===null?(0,E.jsx)(`span`,{children:e.content}):(0,E.jsx)(`span`,{dangerouslySetInnerHTML:{__html:n}})]},t)})})]})}function mh({text:e,color:t}){return(0,E.jsx)(`div`,{style:{margin:`2px 0 6px 24px`,padding:`6px 10px`,fontSize:11,color:t??`#6c7086`,border:`1px solid #313244`,borderRadius:6,background:`#11111b`},children:e})}var hh={success:`#a6e3a1`,failure:`#f38ba8`,error:`#f38ba8`,pending:`#f9e2af`,neutral:`#6c7086`},gh={success:`✓`,failure:`✗`,error:`✗`,pending:`◔`,neutral:`–`},_h={A:`#a6e3a1`,M:`#f9e2af`,D:`#f38ba8`,R:`#cba6f7`,C:`#94e2d5`,T:`#89b4fa`,U:`#fab387`},vh={A:`A`,M:`M`,D:`D`,R:`R`,C:`C`,T:`T`,U:`U`};function yh(e){return new Date(e*1e3).toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function bh({commit:e,diff:t,branchName:n,prs:r,authorAvatarUrl:i,ciState:a,ciRuns:o,githubUrl:s,onCheckout:c,onNavigate:l}){return e?(0,E.jsxs)(`div`,{style:{width:400,flexShrink:0,height:`100%`,background:`#181825`,borderLeft:`1px solid #313244`,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,E.jsxs)(`div`,{style:{padding:`14px 16px 12px`,borderBottom:`1px solid #313244`,flexShrink:0},children:[(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:8},children:[(0,E.jsx)(`span`,{style:{fontFamily:`monospace`,fontSize:11,color:`#89b4fa`,letterSpacing:`0.04em`},children:e.sha.slice(0,12)}),l&&(0,E.jsx)(Eh,{label:`Navigate to`,onClick:()=>l(e.sha)}),c&&(0,E.jsx)(Eh,{label:`Checkout`,onClick:()=>c(e.sha)})]}),(0,E.jsx)(`p`,{style:{fontSize:14,fontWeight:600,color:`#cdd6f4`,lineHeight:1.4,margin:0,marginBottom:10},children:e.subject}),(0,E.jsx)(xh,{label:`Author`,value:`${e.authorName} <${e.authorEmail}>`,leading:(0,E.jsx)(Sh,{name:e.authorName,url:i})}),(0,E.jsx)(xh,{label:`Date`,value:yh(e.authorUnix)}),n&&(0,E.jsx)(xh,{label:`Branch`,value:n}),(e.committerName!==e.authorName||e.committerUnix!==e.authorUnix)&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(xh,{label:`Committer`,value:`${e.committerName} <${e.committerEmail}>`}),(0,E.jsx)(xh,{label:`Commit date`,value:yh(e.committerUnix)})]}),e.parents.length>0&&(0,E.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:3,fontSize:12},children:[(0,E.jsx)(`span`,{style:{color:`#6c7086`,minWidth:76,flexShrink:0},children:`Parents`}),(0,E.jsx)(`span`,{style:{display:`flex`,gap:4,flexWrap:`wrap`},children:e.parents.map(e=>(0,E.jsx)(`span`,{onClick:()=>l?.(e),style:{fontFamily:`monospace`,color:`#89b4fa`,cursor:l?`pointer`:`default`,textDecoration:l?`underline`:`none`},children:e.slice(0,8)},e))})]}),e.parents.length>1&&(0,E.jsxs)(`div`,{style:{fontSize:12,color:`#a6adc8`,marginBottom:3},children:[(0,E.jsx)(`span`,{style:{color:`#6c7086`},children:`Merge: `}),`merged into`,` `,(0,E.jsx)(`span`,{onClick:()=>l?.(e.parents[0]),style:{color:`#89b4fa`,cursor:`pointer`,textDecoration:`underline`,fontFamily:`monospace`},children:e.parents[0].slice(0,8)}),` `,`from`,` `,(0,E.jsx)(`span`,{onClick:()=>l?.(e.parents[1]),style:{color:`#a6e3a1`,cursor:`pointer`,textDecoration:`underline`,fontFamily:`monospace`},children:e.parents[1].slice(0,8)})]}),r&&r.length>0&&(0,E.jsx)(`div`,{style:{marginTop:6,marginBottom:4},children:r.map(e=>(0,E.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,style:{display:`inline-flex`,alignItems:`center`,gap:4,padding:`2px 8px`,borderRadius:4,background:e.mergedAt?`#a6e3a120`:`#89b4fa20`,border:`1px solid ${e.mergedAt?`#a6e3a160`:`#89b4fa60`}`,color:e.mergedAt?`#a6e3a1`:`#89b4fa`,fontSize:11,fontWeight:600,textDecoration:`none`,marginRight:4},children:[`PR #`,e.number,`: `,e.title.length>40?e.title.slice(0,40)+`…`:e.title]},e.number))}),s&&e.isPushed&&(0,E.jsxs)(`div`,{style:{marginTop:4,marginBottom:4,display:`flex`,gap:12},children:[(0,E.jsx)(`a`,{href:`${s}/commit/${e.sha}`,target:`_blank`,rel:`noopener noreferrer`,style:{fontSize:11,color:`#6c7086`,textDecoration:`underline`},children:`View on GitHub`}),(0,E.jsx)(`a`,{href:`${s}/commit/${e.sha}/checks`,target:`_blank`,rel:`noopener noreferrer`,style:{fontSize:11,color:`#6c7086`,textDecoration:`underline`},children:`CI runs`})]}),a===`loading`&&(0,E.jsx)(`div`,{style:{marginTop:8},children:(0,E.jsx)(Th,{})}),o&&o.length>0&&(0,E.jsx)(`div`,{style:{marginTop:8,display:`flex`,flexDirection:`column`,gap:3},children:o.map((e,t)=>(0,E.jsx)(wh,{run:e},`${e.name}-${t}`))}),e.refs.length>0&&(0,E.jsx)(`div`,{style:{marginTop:8,display:`flex`,flexWrap:`wrap`,gap:4},children:e.refs.map(e=>(0,E.jsx)(`span`,{style:{background:`#313244`,color:`#89b4fa`,fontSize:11,borderRadius:4,padding:`2px 6px`,fontWeight:500},children:e},e))})]}),e.body&&(0,E.jsx)(`div`,{style:{padding:`10px 16px`,borderBottom:`1px solid #313244`,flexShrink:0,maxHeight:200,overflowY:`auto`},children:(0,E.jsx)(`pre`,{style:{fontSize:12,color:`#a6adc8`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,fontFamily:`inherit`,margin:0,lineHeight:1.5},children:e.body})}),(0,E.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:t&&t.changedPaths.length>0?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12,padding:`8px 16px 4px`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,color:`#6c7086`,textTransform:`uppercase`,position:`sticky`,top:0,background:`#181825`},children:[(0,E.jsxs)(`span`,{children:[`Changed files (`,t.changedPaths.length,`)`]}),(0,E.jsxs)(`span`,{style:{display:`flex`,gap:10,fontSize:10,letterSpacing:`0.04em`},children:[(0,E.jsxs)(`span`,{style:{color:`#a6e3a1`},children:[`+`,t.additions]}),(0,E.jsxs)(`span`,{style:{color:`#f38ba8`},children:[`-`,t.deletions]})]})]}),t.changedPaths.map((t,n)=>(0,E.jsx)(Ch,{sha:e.sha,cp:t},`${t.status}:${t.oldPath??``}:${t.path}:${n}`))]}):t?(0,E.jsx)(`div`,{style:{padding:`16px`,fontSize:13,color:`#45475a`},children:`No changed files`}):null})]}):null}function xh({label:e,value:t,mono:n,leading:r}){return(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:r?`center`:void 0,gap:8,marginBottom:3,fontSize:12},children:[(0,E.jsx)(`span`,{style:{color:`#6c7086`,minWidth:76,flexShrink:0},children:e}),(0,E.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:7,minWidth:0,color:`#a6adc8`,fontFamily:n?`monospace`:`inherit`},children:[r,(0,E.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:t})]})]})}function Sh({name:e,url:t}){let[n,r]=(0,x.useState)(!1);(0,x.useEffect)(()=>r(!1),[t]);let i={width:24,height:24,borderRadius:`50%`,flexShrink:0};return t&&!n?(0,E.jsx)(`img`,{src:t,alt:`${e} avatar`,width:24,height:24,onError:()=>r(!0),style:{...i,display:`block`,objectFit:`cover`,background:`#313244`}}):(0,E.jsx)(`span`,{"aria-hidden":`true`,style:{...i,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,background:`#313244`,color:`#cdd6f4`,fontSize:11,fontWeight:700},children:e.trim().charAt(0).toUpperCase()||`?`})}function Ch({sha:e,cp:t}){let[n,r]=(0,x.useState)(!1),i=R(e=>e.loadCommitFileDiff),a=R(n=>n.commitFileDiffs[sr(e,t.path)]),o=_h[t.status]??`#cdd6f4`,s=vh[t.status]??t.status,c=t.oldPath?`${t.oldPath} → ${t.path}`:t.path;return(0,x.useEffect)(()=>{n&&!a&&i(e,t)},[n,a,e,t,i]),(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`5px 16px`,fontSize:12,color:`#cdd6f4`,borderBottom:`1px solid #1e1e2e`,cursor:`pointer`},onClick:()=>{let a=!n;r(a),a&&i(e,t)},onMouseEnter:e=>{e.currentTarget.style.background=`#1e1e2e`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,E.jsx)(`span`,{style:{flexShrink:0,width:10,fontSize:9,color:`#6c7086`,userSelect:`none`},children:n?`▼`:`▶`}),(0,E.jsx)(`span`,{style:{flexShrink:0,width:18,height:18,borderRadius:3,background:o+`33`,color:o,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:10,fontWeight:700},children:s}),(0,E.jsx)(`span`,{style:{flex:1,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,fontFamily:`monospace`,fontSize:12,color:`#a6adc8`},title:c,children:c})]}),n&&a&&(0,E.jsx)(ph,{entry:a,path:t.path})]})}function wh({run:e}){let t=hh[e.state],n=gh[e.state],r=(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`span`,{style:{color:t,fontSize:12,fontWeight:700,width:12,textAlign:`center`,flexShrink:0},children:n}),(0,E.jsx)(`span`,{style:{color:`#cdd6f4`,fontWeight:500,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,flexShrink:0,maxWidth:`55%`},children:e.name}),e.description&&(0,E.jsx)(`span`,{style:{color:`#6c7086`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,flex:1},children:e.description})]}),i={display:`flex`,alignItems:`center`,gap:8,fontSize:12,padding:`2px 0`,textDecoration:`none`};return e.url?(0,E.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,style:i,title:e.description??e.name,children:r}):(0,E.jsx)(`div`,{style:i,title:e.description??e.name,children:r})}function Th(){return(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:12,padding:`2px 0`,color:`#6c7086`},title:`Loading CI status`,children:[(0,E.jsx)(`span`,{style:{width:10,height:10,borderRadius:`50%`,border:`2px solid #45475a`,borderTopColor:`#89b4fa`,flexShrink:0,animation:`ci-spin 0.8s linear infinite`}}),(0,E.jsx)(`span`,{style:{color:`#cdd6f4`,fontWeight:500},children:`CI status`}),(0,E.jsx)(`span`,{children:`Loading...`}),(0,E.jsx)(`style`,{children:`@keyframes ci-spin { to { transform: rotate(360deg); } }`})]})}function Eh({label:e,onClick:t}){return(0,E.jsx)(`button`,{onClick:t,title:e,style:{background:`#313244`,border:`1px solid #45475a`,borderRadius:4,color:`#cdd6f4`,fontSize:11,padding:`2px 8px`,cursor:`pointer`,fontFamily:`inherit`},onMouseEnter:e=>{e.currentTarget.style.background=`#45475a`},onMouseLeave:e=>{e.currentTarget.style.background=`#313244`},children:e})}var Dh={A:`#a6e3a1`,M:`#f9e2af`,D:`#f38ba8`,R:`#cba6f7`,C:`#94e2d5`,T:`#89b4fa`,U:`#fab387`,"?":`#94e2d5`},Oh={A:`Added`,M:`Modified`,D:`Deleted`,R:`Renamed`,C:`Copied`,T:`Type changed`,U:`Conflicted`,"?":`Untracked`};function kh({file:e,area:t,actionLabel:n,onAction:r}){let[i,a]=(0,x.useState)(!1),o=R(e=>e.loadWorktreeFileDiff),s=R(n=>n.worktreeFileDiffs[or(t,e.path)]),c=e.path.lastIndexOf(`/`),l=c>=0?e.path.slice(0,c+1):``,u=c>=0?e.path.slice(c+1):e.path,d=Dh[e.status]??`#cdd6f4`;return(0,x.useEffect)(()=>{i&&!s&&o(e,t)},[i,s,e,t,o]),(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`4px 6px`,borderRadius:6,cursor:`pointer`},onClick:()=>{let n=!i;a(n),n&&o(e,t)},onMouseEnter:e=>{e.currentTarget.style.background=`#1e1e2e`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,E.jsx)(`span`,{style:{flexShrink:0,width:10,fontSize:9,color:`#6c7086`,userSelect:`none`},children:i?`▼`:`▶`}),(0,E.jsx)(`span`,{title:Oh[e.status]??e.status,style:{flexShrink:0,width:16,height:16,borderRadius:3,background:d+`22`,color:d,fontSize:10,fontWeight:700,fontFamily:`monospace`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:e.status}),(0,E.jsxs)(`span`,{title:e.path,style:{flex:1,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,fontSize:12,fontFamily:`monospace`,direction:`rtl`,textAlign:`left`},children:[(0,E.jsx)(`span`,{style:{color:`#6c7086`},children:l}),(0,E.jsx)(`span`,{style:{color:`#cdd6f4`},children:u})]}),(0,E.jsx)(`span`,{onClick:e=>e.stopPropagation(),children:(0,E.jsx)(mu,{label:n,tone:`neutral`,size:`compact`,variant:`ghost`,onClick:r})})]}),i&&s&&(0,E.jsx)(ph,{entry:s,path:e.path})]})}function Ah({title:e,files:t,area:n,bulkLabel:r,onBulk:i,rowActionLabel:a,onRowAction:o}){return t.length===0?null:(0,E.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:[(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`0 6px 4px`},children:[(0,E.jsxs)(`span`,{style:{fontSize:11,fontWeight:700,letterSpacing:.4,textTransform:`uppercase`,color:`#a6adc8`},children:[e,` `,(0,E.jsxs)(`span`,{style:{color:`#6c7086`},children:[`(`,t.length,`)`]})]}),(0,E.jsx)(mu,{label:r,tone:`neutral`,size:`compact`,variant:`ghost`,onClick:i})]}),t.map(e=>(0,E.jsx)(kh,{file:e,area:n,actionLabel:typeof a==`function`?a(e):a,onAction:()=>o(e)},`${e.status}:${e.path}`))]})}function jh({stagedCount:e,headSha:t,amendable:n}){let r=R(e=>e.performCommit),i=R(e=>e.runStageAction),a=R(e=>e.pendingMutation),o=R(e=>e.repoId),[s,c]=(0,x.useState)(``),[l,u]=(0,x.useState)(()=>{try{return localStorage.getItem(`commitNoVerify`)===`true`}catch{return!1}}),[d,f]=(0,x.useState)(!1),[p,m]=(0,x.useState)(!1),[h,g]=(0,x.useState)(``),_=d&&n,v=e=>{try{localStorage.setItem(`commitNoVerify`,String(e))}catch{}u(e)},y=async e=>{if(f(e),e){m(!0);let e=await i(`stage-all`,[]);if(m(!1),!e){f(!1);return}if(s.trim().length===0&&o&&t)try{let e=await Ht(o,t),n=e.body?`${e.subject}\n\n${e.body}`:e.subject;c(e=>e.trim().length===0?n:e),g(n)}catch{}}else s===h&&(c(``),g(``))},b=e>0&&s.trim().length>0&&!p&&!a,S=async()=>{b&&await r(s.trim(),l,_)&&(c(``),g(``),f(!1))},C=p?`Staging…`:a?_?`Amending…`:`Committing…`:`${_?`Amend`:`Commit`}${e>0?` (${e})`:``}`;return(0,E.jsxs)(`div`,{style:{borderBottom:`1px solid #313244`,padding:`10px 12px`,display:`flex`,flexDirection:`column`,gap:8,flexShrink:0},children:[(0,E.jsx)(`textarea`,{value:s,onChange:e=>c(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),S())},placeholder:_?`Amend commit message`:e>0?`Commit message`:`Stage files to commit`,rows:3,style:{resize:`vertical`,minHeight:54,background:`#11111b`,border:`1px solid #313244`,borderRadius:6,color:`#cdd6f4`,fontSize:12,fontFamily:`inherit`,padding:`8px 10px`,outline:`none`},onFocus:e=>{e.currentTarget.style.borderColor=`#89b4fa`},onBlur:e=>{e.currentTarget.style.borderColor=`#313244`}}),(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:8},children:[(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,minWidth:0},children:[n&&(0,E.jsxs)(`label`,{title:`Replace the previous commit (git commit --amend) instead of creating a new one`,style:{display:`flex`,alignItems:`center`,gap:6,fontSize:11,color:`#a6adc8`,cursor:`pointer`,userSelect:`none`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:d,disabled:p,onChange:e=>void y(e.target.checked),style:{accentColor:`#cba6f7`,cursor:p?`default`:`pointer`}}),`Amend`]}),(0,E.jsxs)(`label`,{title:`Commit with --no-verify (skips pre-commit and commit-msg hooks)`,style:{display:`flex`,alignItems:`center`,gap:6,fontSize:11,color:`#a6adc8`,cursor:`pointer`,userSelect:`none`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:l,onChange:e=>v(e.target.checked),style:{accentColor:`#fab387`,cursor:`pointer`}}),`Skip git hooks`]})]}),(0,E.jsx)(`button`,{onClick:()=>void S(),disabled:!b,style:{background:b?`#a6e3a1`:`#313244`,color:b?`#11111b`:`#6c7086`,border:`none`,borderRadius:6,fontSize:12,fontWeight:700,padding:`6px 14px`,cursor:b?`pointer`:`default`,fontFamily:`inherit`,flexShrink:0},children:C})]})]})}function Mh({operation:e,conflictedCount:t}){let n=R(e=>e.abortInProgressOperation),r=R(e=>e.continueInProgressOperation),i=R(e=>e.pendingMutation),a=e===`rebase`?`Rebase`:`Merge`,o=t>0?`${a} conflict`:`${a} in progress`,s=t>0?`${t} conflicted file${t===1?``:`s`} — resolve and stage them, then continue`:`All conflicts resolved — continue the ${e} to finish.`,c=!i&&t===0;return(0,E.jsxs)(`div`,{style:{border:`1px solid #8b3a4a`,background:`#5c243033`,borderRadius:7,padding:`10px 10px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12},children:[(0,E.jsxs)(`div`,{style:{minWidth:0,display:`flex`,flexDirection:`column`,gap:2},children:[(0,E.jsx)(`span`,{style:{color:`#f5a6b8`,fontSize:13,fontWeight:700},children:o}),(0,E.jsx)(`span`,{style:{color:`#a6adc8`,fontSize:11},children:s})]}),(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flexShrink:0},children:[(0,E.jsx)(`span`,{title:c?void 0:t>0?`Stage all conflicted files first`:void 0,children:(0,E.jsx)(mu,{label:i?`Working…`:`Continue ${a}`,tone:`success`,onClick:()=>void r(e),disabled:!c})}),(0,E.jsx)(mu,{label:i?`Aborting…`:`Abort ${a}`,tone:`danger`,onClick:()=>void n(e),disabled:i})]})]})}function Nh(){let e=R(e=>e.worktreeChanges),t=R(e=>e.runStageAction),n=e?.staged??[],r=e?.unstaged??[],i=n.length+r.length,a=e?.mergeHeadShas?.length?`merge`:e?.rebaseHeadSha?`rebase`:null,o=(0,x.useMemo)(()=>new Set(r.filter(e=>e.status===`U`).map(e=>e.path)).size,[r]);return(0,E.jsxs)(`div`,{style:{width:480,flexShrink:0,height:`100%`,borderLeft:`1px solid #313244`,background:`#181825`,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,E.jsxs)(`div`,{style:{padding:`14px 16px 10px`,borderBottom:`1px solid #313244`},children:[(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:8},children:[(0,E.jsx)(`span`,{style:{fontSize:14,fontWeight:700,color:`#cdd6f4`},children:`Working tree`}),e?.branch&&(0,E.jsxs)(`span`,{style:{fontSize:12,color:`#89b4fa`,fontFamily:`monospace`},children:[`⎇ `,e.branch]})]}),(0,E.jsx)(`div`,{style:{fontSize:11,color:`#6c7086`,marginTop:2},children:i===0?`No changes`:`${i} changed file${i===1?``:`s`}`})]}),(0,E.jsx)(jh,{stagedCount:n.length,headSha:e?.headSha,amendable:!a&&!!e?.headSha}),(0,E.jsxs)(`div`,{style:{flex:1,overflow:`auto`,padding:`12px 10px`,display:`flex`,flexDirection:`column`,gap:16},children:[a&&(0,E.jsx)(Mh,{operation:a,conflictedCount:o}),i===0?(0,E.jsx)(`div`,{style:{color:`#45475a`,fontSize:13,textAlign:`center`,marginTop:28},children:`Working tree clean`}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Ah,{title:`Staged`,files:n,area:`staged`,bulkLabel:`Unstage all`,onBulk:()=>t(`unstage-all`,[]),rowActionLabel:`Unstage`,onRowAction:e=>t(`unstage`,[e.path])}),(0,E.jsx)(Ah,{title:`Changes`,files:r,area:`unstaged`,bulkLabel:`Stage all`,onBulk:()=>t(`stage-all`,[]),rowActionLabel:e=>e.status===`U`?`Mark resolved`:`Stage`,onRowAction:e=>t(`stage`,[e.path])})]})]})]})}function Ph({error:e,onDismiss:t}){let[n,r]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{if(!e)return;r(!1);let n=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]),e?(0,E.jsx)(`div`,{onClick:t,style:{position:`fixed`,inset:0,background:`rgba(17, 17, 27, 0.75)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1e3,padding:24},children:(0,E.jsxs)(`div`,{onClick:e=>e.stopPropagation(),role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":`error-dialog-title`,style:{background:`#1e1e2e`,border:`1px solid #45475a`,borderRadius:8,boxShadow:`0 12px 40px rgba(0, 0, 0, 0.5)`,maxWidth:760,width:`100%`,maxHeight:`80vh`,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`14px 18px`,borderBottom:`1px solid #313244`,background:`#181825`},children:[(0,E.jsx)(`span`,{id:`error-dialog-title`,style:{fontSize:14,fontWeight:600,color:`#f38ba8`},children:e.title}),(0,E.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`Close`,style:{background:`transparent`,border:`none`,color:`#6c7086`,fontSize:20,lineHeight:1,cursor:`pointer`,padding:4},children:`×`})]}),(0,E.jsx)(`pre`,{style:{margin:0,padding:`16px 18px`,overflow:`auto`,flex:1,fontFamily:`ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`,fontSize:12.5,lineHeight:1.5,color:`#cdd6f4`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,userSelect:`text`},children:e.message}),(0,E.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,padding:`12px 18px`,borderTop:`1px solid #313244`,background:`#181825`},children:[(0,E.jsx)(`button`,{type:`button`,onClick:async()=>{try{await navigator.clipboard.writeText(e.message),r(!0),setTimeout(()=>r(!1),1500)}catch{}},style:{background:`#313244`,color:`#cdd6f4`,border:`1px solid #45475a`,borderRadius:6,padding:`6px 14px`,fontSize:13,cursor:`pointer`},children:n?`Copied`:`Copy`}),e.action&&(0,E.jsx)(`button`,{type:`button`,onClick:()=>{e.action?.run(),t()},style:{background:`#f9e2af`,color:`#1e1e2e`,border:`none`,borderRadius:6,padding:`6px 14px`,fontSize:13,fontWeight:600,cursor:`pointer`},children:e.action.label}),(0,E.jsx)(`button`,{type:`button`,onClick:t,style:{background:`#89b4fa`,color:`#1e1e2e`,border:`none`,borderRadius:6,padding:`6px 14px`,fontSize:13,fontWeight:600,cursor:`pointer`},children:`Close`})]})]})}):null}function Fh(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function Ih(e){let t=new Set(e.map(e=>e.agent)).size>1?`Agents ×${e.length}`:`${e[0].agent[0].toUpperCase()}${e[0].agent.slice(1)} ×${e.length}`,n=e.filter(e=>e.busy).length;return n>0?`${t} · ${n} working`:t}function Lh(){let{sessions:e,capabilities:t,focusingPid:n,installing:r,focus:i,install:a,canInstallWindowCalls:o}=Sr(),[s,c]=(0,x.useState)(!1),[l,u]=(0,x.useState)(()=>{try{return localStorage.getItem(`agentSessionsShowAll`)===`true`}catch{return!1}}),d=e=>{try{localStorage.setItem(`agentSessionsShowAll`,String(e))}catch{}u(e)},[f,p]=(0,x.useState)(null),m=R(e=>e.repoPath),h=R(e=>e.openRepoByPath),g=(0,x.useRef)(null);(0,x.useEffect)(()=>{if(!s)return;let e=e=>{g.current&&!g.current.contains(e.target)&&c(!1)};return window.addEventListener(`pointerdown`,e),()=>window.removeEventListener(`pointerdown`,e)},[s]);let _=async e=>{await i(e)&&c(!1)},v=e=>{!e.gitRoot||e.gitRoot===m||(c(!1),h(e.gitRoot))};if(e.length===0)return null;let y=yr(e),b=m?y.filter(e=>e.gitRoot===m||e.cwd===m):[],S=y.filter(e=>!b.includes(e)),C=m===null||l?[...b,...S]:b,w=m!==null&&!l?S.length:0;return(0,E.jsxs)(`div`,{ref:g,style:{position:`relative`,flexShrink:0},children:[(0,E.jsxs)(`button`,{onClick:e=>{let t=e.currentTarget.getBoundingClientRect();p({top:t.bottom+4,right:window.innerWidth-t.right}),c(e=>!e)},title:`${e.length} agent session${e.length===1?``:`s`} running`,"aria-label":`Agent sessions`,style:{display:`flex`,alignItems:`center`,gap:5,padding:`4px 10px`,borderRadius:4,border:`1px solid ${b.length>0?`#a6e3a155`:`#313244`}`,background:b.length>0?`#a6e3a115`:`transparent`,color:b.length>0?`#a6e3a1`:`#6c7086`,fontSize:11,cursor:`pointer`},children:[[...new Set(e.map(e=>e.agent))].map(t=>(0,E.jsx)(Tr,{agent:t,size:12,busy:e.some(e=>e.agent===t&&e.busy)},t)),Ih(e)]}),s&&f&&(0,E.jsxs)(`div`,{style:{position:`fixed`,top:f.top,right:f.right,width:480,maxWidth:`calc(100vw - 16px)`,maxHeight:320,overflowY:`auto`,background:`#181825`,border:`1px solid #313244`,borderRadius:6,boxShadow:`0 8px 24px #00000088`,zIndex:100,padding:4},children:[o&&(0,E.jsxs)(`div`,{style:{padding:`8px 8px 10px`,borderBottom:`1px solid #313244`,marginBottom:4},children:[(0,E.jsx)(`div`,{style:{color:`#a6adc8`,fontSize:11,marginBottom:6,lineHeight:1.4},children:`Focusing terminal windows needs the “Window Calls” GNOME\xA0Shell extension.`}),(0,E.jsx)(`button`,{onClick:()=>void a(),disabled:r,style:{padding:`4px 10px`,borderRadius:4,border:`1px solid #89b4fa55`,background:`#89b4fa20`,color:r?`#45475a`:`#89b4fa`,fontSize:11,cursor:r?`default`:`pointer`},children:r?`Waiting for GNOME confirmation…`:`Install extension`})]}),C.length===0&&(0,E.jsx)(`div`,{style:{padding:`8px`,color:`#585b70`,fontSize:11},children:`No agents running in this repository`}),C.map(e=>{let r=m!==null&&(e.gitRoot===m||e.cwd===m),i=e.gitRoot!==null&&!r,a=!e.focusable,o=a?e.kind===`terminal`?t?.displayServer===`wayland`?`Can't focus terminal windows on Wayland — install the 'Window Calls' GNOME Shell extension`:`Can't focus terminal windows — install wmctrl`:`This session has no window to focus`:`Focus ${e.agent} window · ${xr(e)} (pid ${e.pid})`;return(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,width:`100%`,borderRadius:4,background:`transparent`,opacity:n!==null&&n!==e.pid?.5:1},onMouseEnter:e=>{e.currentTarget.style.background=`#31324466`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`},children:[(0,E.jsxs)(`button`,{onClick:()=>v(e),disabled:!i,title:r?`${e.cwd} · currently open repository`:e.gitRoot?`Switch to ${e.gitRoot}`:`${e.cwd} · not inside a Git repository`,style:{display:`flex`,alignItems:`center`,gap:8,flex:1,minWidth:0,padding:`6px 8px`,border:`none`,background:`transparent`,color:`#a6adc8`,fontSize:11,textAlign:`left`,cursor:i?`pointer`:`default`},children:[(0,E.jsx)(`span`,{style:{flexShrink:0,display:`inline-flex`},children:(0,E.jsx)(Tr,{agent:e.agent,size:13,busy:e.busy??!1})}),(0,E.jsxs)(`span`,{style:{flexShrink:0,fontFamily:`monospace`},children:[Fh(e.cwd),e.count>1?` ×${e.count}`:``]}),(0,E.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,flex:1,color:`#7f849c`,textAlign:`right`},children:e.title??xr(e)}),e.busy&&(0,E.jsx)(`span`,{style:{flexShrink:0,color:`#f9e2af`,fontSize:10},children:`working`}),r&&(0,E.jsx)(`span`,{style:{flexShrink:0,color:`#a6e3a1`,fontSize:10},children:`this repo`})]}),(0,E.jsx)(`button`,{onClick:()=>!a&&void _(e),disabled:a||n!==null,title:o,style:{flexShrink:0,marginRight:6,padding:`3px 7px`,border:`1px solid #89b4fa55`,borderRadius:4,background:`#89b4fa18`,color:a?`#45475a`:`#89b4fa`,fontSize:10,cursor:a||n!==null?`default`:`pointer`},children:n===e.pid?`Focusing…`:`Focus on window`})]},`${e.pid}:${e.cwd}`)}),w>0&&(0,E.jsxs)(`button`,{onClick:()=>d(!0),style:{display:`block`,width:`100%`,padding:`6px 8px`,marginTop:C.length>0?2:0,border:`none`,borderTop:C.length>0?`1px solid #313244`:`none`,background:`transparent`,color:`#6c7086`,fontSize:11,textAlign:`left`,cursor:`pointer`},children:[`▸ Show `,w,` agent`,w===1?``:`s`,` in other repositories`]}),m!==null&&l&&S.length>0&&(0,E.jsx)(`button`,{onClick:()=>d(!1),style:{display:`block`,width:`100%`,padding:`6px 8px`,border:`none`,borderTop:`1px solid #313244`,background:`transparent`,color:`#6c7086`,fontSize:11,textAlign:`left`,cursor:`pointer`},children:`▾ Hide agents in other repositories`})]})]})}var Rh=`ingit`,zh=8;function Bh(e){if(e.trim().length===0)return null;let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));if(t===-1)return{folder:`.`,prefix:e};let n=e.slice(t+1),r=e.slice(0,t);return r||=e.startsWith(`/`)?`/`:`.`,{folder:r,prefix:n}}function Vh(e){return e.replace(/[\\/]+$/,``).split(/[\\/]+/).at(-1)||e}function Hh(e){if(!e)return 0;let t=new Set;for(let n of e.staged)t.add(n.path);for(let n of e.unstaged)t.add(n.path);return t.size}function Uh(){let[e,t]=(0,x.useState)(!1),[n,r]=(0,x.useState)(!1),[i,a]=(0,x.useState)(``),[o,s]=(0,x.useState)(!1),[c,l]=(0,x.useState)(!1),[u,d]=(0,x.useState)(!1),[f,p]=(0,x.useState)(!1),[m,h]=(0,x.useState)([]),[g,_]=(0,x.useState)(0),[v,y]=(0,x.useState)(null),b=(0,x.useRef)(null),{status:S,repoPath:C,recentRepos:w,discoveredFolder:T,discoveredRepos:ee,refs:te,historyWindow:ne,selectedSha:re,commitDetail:ie,commitDiff:ae,commitPRs:oe,commitAuthorAvatars:se,commitCIStatus:ce,githubUrl:D,openError:O,errorDialog:le,dismissError:k,showError:ue,openRepoByPath:de,closeRepo:fe,openFromUrl:A,selectRef:pe,navigateTo:j,checkoutSha:me,performRefAction:he,showCommitMessages:ge,setShowCommitMessages:_e,showGutterColors:ve,setShowGutterColors:ye,viewMode:be,setViewMode:xe,worktreeSelected:Se,worktreeChanges:Ce,reloadFromServer:we}=R(),Te=async()=>{if(!n){r(!0);try{await he(`fetch`,``,``)}catch(e){ue(`Fetch failed`,e)}finally{r(!1)}}},Ee=re?ce[re]:void 0,De=Ee?.runs??[];(0,x.useEffect)(()=>{A()},[A]),(0,x.useEffect)(()=>{a(C??``),l(!1),d(!1)},[C]),(0,x.useEffect)(()=>{if(!o||!c){d(!1),p(!1);return}let e=Bh(i);if(!e){h([]),d(!1),p(!1);return}let t=!1,n=window.setTimeout(()=>{p(!0),Ft(e.folder).then(n=>{if(t)return;let r=e.prefix.toLowerCase(),i=n.entries.filter(e=>r.length===0||e.name.toLowerCase().startsWith(r)).slice(0,zh);h(i),_(0),d(i.length>0)}).catch(()=>{t||(h([]),d(!1))}).finally(()=>{t||p(!1)})},120);return()=>{t=!0,window.clearTimeout(n)}},[c,o,i]),(0,x.useEffect)(()=>{if(S!==`ready`||!C){document.title=Rh;return}document.title=`${Vh(C)} (${Hh(Ce)})`},[S,C,Ce]),(0,x.useEffect)(()=>{let e=document.visibilityState===`hidden`?Date.now():null,t=()=>{e=Date.now()},n=()=>{document.visibilityState!==`hidden`&&(e!==null&&Date.now()-e>3e4&&we(),e=null)},r=()=>{document.visibilityState===`hidden`?t():n()};return window.addEventListener(`blur`,t),window.addEventListener(`focus`,n),document.addEventListener(`visibilitychange`,r),()=>{window.removeEventListener(`blur`,t),window.removeEventListener(`focus`,n),document.removeEventListener(`visibilitychange`,r)}},[we]);let Oe=e=>{e.preventDefault();let t=i.trim();if(!t||t===C){a(C??``),s(!1),e.currentTarget.querySelector(`input`)?.blur();return}de(t)},ke=()=>{let e=b.current?.getBoundingClientRect();e&&y({top:e.bottom+4,left:e.left,width:e.width})},Ae=e=>{a(e.path),l(!1),d(!1),_(0)},je=o&&v!==null&&(f||u&&m.length>0),Me=(0,x.useMemo)(()=>{if(!re||!ne)return null;let e=ne.rows,t=new Map(e.map(e=>[e.sha,e]));for(let n of e){if(n.refNames.length===0)continue;let e=n.refNames.find(e=>!e.includes(`/`)),r=n.refNames.find(e=>e.includes(`/`)&&e!==`origin`&&e!==`HEAD`),i=e??r;if(!i)continue;let a=n.sha,o=new Set;for(;a&&!o.has(a);){if(a===re)return i;o.add(a);let e=t.get(a);if(!e||e.parentShas.length===0)break;a=e.parentShas[0]}}return null},[re,ne]);return S===`no-repo`?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(jr,{onOpen:de,error:O,recentRepos:w,discoveredFolder:T,discoveredRepos:ee}),(0,E.jsx)(Ph,{error:le,onDismiss:k})]}):S===`loading`?(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`,width:`100%`,background:`#1e1e2e`,flexDirection:`column`,gap:16},children:[(0,E.jsx)(Wh,{}),(0,E.jsx)(`span`,{style:{color:`#6c7086`,fontSize:13},children:`Opening repository…`})]}):(0,E.jsxs)(`div`,{style:{display:`flex`,height:`100%`,width:`100%`,overflow:`hidden`,background:`#1e1e2e`},children:[e&&(0,E.jsx)(Pr,{refs:te,onSelectRef:pe,selectedSha:re,showGutterColors:ve,onShowGutterColorsChange:ye,onClose:()=>t(!1)}),(0,E.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,E.jsxs)(`div`,{style:{height:36,flexShrink:0,display:`flex`,alignItems:`center`,padding:`0 14px`,borderBottom:`1px solid #313244`,background:`#181825`,fontSize:12,color:`#6c7086`,gap:8,overflow:`hidden`},children:[!e&&(0,E.jsx)(`button`,{onClick:()=>t(!0),title:`Show refs`,"aria-label":`Show refs`,style:{width:24,height:20,flexShrink:0,padding:0,borderRadius:3,border:`1px solid #313244`,background:`#1e1e2e`,color:`#6c7086`,fontSize:13,lineHeight:`18px`,cursor:`pointer`},children:`☰`}),be===`history`&&(0,E.jsx)(`button`,{onClick:()=>_e(!ge),style:{flexShrink:0,padding:`4px 10px`,borderRadius:4,border:`1px solid ${ge?`#89b4fa55`:`#313244`}`,background:ge?`#89b4fa20`:`transparent`,color:ge?`#89b4fa`:`#6c7086`,fontSize:11,cursor:`pointer`},title:ge?`Hide commit messages`:`Show commit messages`,children:ge?`Hide messages`:`Show messages`}),(0,E.jsxs)(`div`,{style:{flexShrink:0,display:`flex`,borderRadius:4,border:`1px solid #313244`,overflow:`hidden`},children:[(0,E.jsx)(`button`,{onClick:()=>xe(`history`),style:{padding:`4px 10px`,border:`none`,background:be===`history`?`#89b4fa20`:`transparent`,color:be===`history`?`#89b4fa`:`#6c7086`,fontSize:11,cursor:`pointer`},title:`Branch history graph`,children:`History`}),(0,E.jsx)(`button`,{onClick:()=>xe(`reflog`),style:{padding:`4px 10px`,border:`none`,borderLeft:`1px solid #313244`,background:be===`reflog`?`#f9e2af20`:`transparent`,color:be===`reflog`?`#f9e2af`:`#6c7086`,fontSize:11,cursor:`pointer`},title:`Reflog time machine — recover lost commits and see where HEAD has been`,children:`Time Machine`})]}),(0,E.jsx)(`span`,{style:{color:`#45475a`,marginLeft:8},children:`repo`}),(0,E.jsx)(`form`,{onSubmit:Oe,style:{display:`flex`,flex:1,minWidth:0},children:(0,E.jsx)(`input`,{ref:b,value:i,onChange:e=>{a(e.target.value),l(!0),ke()},onFocus:e=>{s(!0),l(!1),ke(),e.currentTarget.select()},onBlur:()=>{s(!1),l(!1),d(!1)},onKeyDown:e=>{if(u&&m.length>0){if(e.key===`ArrowDown`){e.preventDefault(),_(e=>(e+1)%m.length);return}if(e.key===`ArrowUp`){e.preventDefault(),_(e=>(e-1+m.length)%m.length);return}if(e.key===`Tab`||e.key===`Enter`){e.preventDefault(),Ae(m[g]);return}if(e.key===`Escape`){e.preventDefault(),l(!1),d(!1);return}}e.key===`Escape`&&(a(C??``),e.currentTarget.blur())},"aria-label":`Repository path`,title:`Type a repository path and press Enter to open it`,spellCheck:!1,autoComplete:`off`,role:`combobox`,"aria-expanded":je,"aria-controls":`header-repo-path-suggestions`,"aria-autocomplete":`list`,style:{width:`100%`,minWidth:0,padding:`3px 5px`,border:`1px solid ${o?`#89b4fa88`:`transparent`}`,borderRadius:3,outline:`none`,background:o?`#1e1e2e`:`transparent`,color:`#a6adc8`,fontFamily:`monospace`,fontSize:12}})}),je&&(0,E.jsx)(`div`,{id:`header-repo-path-suggestions`,role:`listbox`,style:{position:`fixed`,zIndex:100,top:v.top,left:v.left,width:v.width,maxHeight:238,overflowY:`auto`,padding:4,border:`1px solid #3d4253`,borderRadius:5,background:`#181825`,boxShadow:`0 8px 24px #00000088`},children:f&&m.length===0?(0,E.jsx)(`div`,{style:{padding:`7px 8px`,color:`#7f849c`,fontSize:11},children:`Loading…`}):m.map((e,t)=>(0,E.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t===g,onMouseEnter:()=>_(t),onMouseDown:t=>{t.preventDefault(),Ae(e)},style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,minWidth:0,padding:`6px 8px`,border:`none`,borderRadius:4,background:t===g?`#313244`:`transparent`,color:`#cdd6f4`,fontSize:11,textAlign:`left`,cursor:`pointer`},children:[(0,E.jsx)(`span`,{style:{flex:1,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,fontFamily:`monospace`},children:e.path}),e.isGitRepo&&(0,E.jsx)(`span`,{style:{flexShrink:0,color:`#a6e3a1`,fontSize:10},children:`repo`})]},e.path))}),(0,E.jsx)(Lh,{}),(0,E.jsxs)(`button`,{onClick:Te,disabled:n,title:`Fetch all remotes`,"aria-label":`Fetch all remotes`,style:{flexShrink:0,display:`flex`,alignItems:`center`,gap:5,padding:`4px 10px`,borderRadius:4,border:`1px solid #313244`,background:`transparent`,color:n?`#45475a`:`#6c7086`,fontSize:11,cursor:n?`default`:`pointer`},children:[(0,E.jsx)(`span`,{style:{display:`inline-block`,animation:n?`spin 0.7s linear infinite`:`none`},children:`⟳`}),n?`Fetching…`:`Fetch`,(0,E.jsx)(`style`,{children:`@keyframes spin { to { transform: rotate(360deg); } }`})]}),(0,E.jsx)(`button`,{onClick:fe,title:`Close repository`,"aria-label":`Close repository`,style:{flexShrink:0,padding:`4px 10px`,borderRadius:4,border:`1px solid #313244`,background:`transparent`,color:`#6c7086`,fontSize:11,cursor:`pointer`},children:`Close`})]}),be===`reflog`?(0,E.jsx)(Bf,{}):(0,E.jsx)(bf,{})]}),Se?(0,E.jsx)(Nh,{}):(0,E.jsx)(bh,{commit:ie,diff:ae,branchName:Me,prs:oe,authorAvatarUrl:ie?se[ie.sha]:void 0,ciState:Ee?.state,ciRuns:De,githubUrl:D,onNavigate:j,onCheckout:async e=>{try{await me(e)}catch(e){ue(`Checkout failed`,e)}}}),(0,E.jsx)(Ph,{error:le,onDismiss:k})]})}function Wh(){return(0,E.jsx)(`div`,{style:{width:32,height:32,border:`3px solid #313244`,borderTopColor:`#89b4fa`,borderRadius:`50%`,animation:`spin 0.7s linear infinite`},children:(0,E.jsx)(`style`,{children:`@keyframes spin { to { transform: rotate(360deg); } }`})})}(0,ee.createRoot)(document.getElementById(`root`)).render((0,E.jsx)(x.StrictMode,{children:(0,E.jsx)(Uh,{})}));