papilot 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,217 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/math-CUuXX16h.js","assets/math-DEcVZfaU.css"])))=>i.map(i=>d[i]);
2
+ 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,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(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},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,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),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=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.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.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`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function te(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(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 ne(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,ne(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+te(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),ne(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+te(a,u),c+=ne(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+te(a,u++),c+=ne(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ne(j(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 M(e,t,n){if(e==null)return e;var r=[],i=0;return ne(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ie=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)};function ae(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,ie)}catch(e){ie(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function oe(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ae(oe.bind(null,e))}var se={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=se,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=oe,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=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.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 D(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)E.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 D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:re}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ae,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=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,O());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){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&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,ee=k.port2;k.port1.onmessage=D,O=function(){ee.postMessage(null)}}else O=function(){_(D,0)};function A(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,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),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}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();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`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(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.browser=function(e){return{$$typeof:o,_reason:e}},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 c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.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=u(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=u(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,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority: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=u(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=u(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,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority: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 l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),h=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=m()})),g=o((e=>{var t=p(),n=d(),r=h();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){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e: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 f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function m(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),ee=Symbol.for(`react.portal`),A=Symbol.for(`react.fragment`),te=Symbol.for(`react.strict_mode`),j=Symbol.for(`react.profiler`),ne=Symbol.for(`react.consumer`),M=Symbol.for(`react.context`),re=Symbol.for(`react.forward_ref`),ie=Symbol.for(`react.suspense`),ae=Symbol.for(`react.suspense_list`),oe=Symbol.for(`react.memo`),se=Symbol.for(`react.lazy`),ce=Symbol.for(`react.activity`),le=Symbol.for(`react.legacy_hidden`),ue=Symbol.for(`react.memo_cache_sentinel`),de=Symbol.for(`react.view_transition`),fe=Symbol.for(`react.recoverable`),pe=Symbol.iterator;function me(e){return typeof e!=`object`||!e?null:(e=pe&&e[pe]||e[`@@iterator`],typeof e==`function`?e:null)}var he=Symbol.for(`react.client.reference`);function N(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case A:return`Fragment`;case j:return`Profiler`;case te:return`StrictMode`;case ie:return`Suspense`;case ae:return`SuspenseList`;case ce:return`Activity`;case de:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case ee:return`Portal`;case M:return e.displayName||`Context`;case ne:return(e._context.displayName||`Context`)+`.Consumer`;case re:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case oe:return t=e.displayName||null,t===null?N(e.type)||`Memo`:t;case se:t=e._payload,e=e._init;try{return N(e(t))}catch{}}return null}var ge=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_e={pending:!1,data:null,method:null,action:null},ve=[],ye=-1;function be(e){return{current:e}}function xe(e){0>ye||(e.current=ve[ye],ve[ye]=null,ye--)}function Se(e,t){ye++,ve[ye]=e.current,e.current=t}var Ce=be(null),we=be(null),Te=be(null),Ee=be(null);function De(e,t){switch(Se(Te,t),Se(we,e),Se(Ce,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}xe(Ce),Se(Ce,e)}function Oe(){xe(Ce),xe(we),xe(Te)}function ke(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,Se(Ee,e)),t=Ce.current;var n=dp(t,e.type);t!==n&&(Se(we,e),Se(Ce,n))}function Ae(e){we.current===e&&(xe(Ce),xe(we)),Ee.current===e&&(xe(Ee),sh._currentValue=_e)}var je,Me;function Ne(e){if(je===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);je=t&&t[1]||``,Me=-1<e.stack.indexOf(`
3
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
+ `+je+e+Me}var Pe=!1;function Fe(e,t){if(!e||Pe)return``;Pe=!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}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}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(`
5
+ `),l=s.split(`
6
+ `);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=`
7
+ `+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{Pe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ne(n):``}function Ie(e,t){switch(e.tag){case 26:case 27:case 5:return Ne(e.type);case 16:return Ne(`Lazy`);case 13:return e.child!==t&&t!==null?Ne(`Suspense Fallback`):Ne(`Suspense`);case 19:return Ne(`SuspenseList`);case 0:case 15:return Fe(e.type,!1);case 11:return Fe(e.type.render,!1);case 1:return Fe(e.type,!0);case 31:return Ne(`Activity`);case 30:return Ne(`ViewTransition`);default:return``}}function Le(e){try{var t=``,n=null;do t+=Ie(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
+ Error generating stack: `+e.message+`
9
+ `+e.stack}}var Re=Object.prototype.hasOwnProperty,ze=t.unstable_scheduleCallback,Be=t.unstable_cancelCallback,Ve=t.unstable_shouldYield,He=t.unstable_requestPaint,Ue=t.unstable_now,We=t.unstable_getCurrentPriorityLevel,Ge=t.unstable_ImmediatePriority,Ke=t.unstable_UserBlockingPriority,qe=t.unstable_NormalPriority,Je=t.unstable_LowPriority,Ye=t.unstable_IdlePriority,Xe=t.log,Ze=t.unstable_setDisableYieldValue,Qe=null,$e=null;function et(e){if(typeof Xe==`function`&&Ze(e),$e&&typeof $e.setStrictMode==`function`)try{$e.setStrictMode(Qe,e)}catch{}}var tt=Math.clz32?Math.clz32:it,nt=Math.log,rt=Math.LN2;function it(e){return e>>>=0,e===0?32:31-(nt(e)/rt|0)|0}var at=256,ot=262144,st=4194304;function ct(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&-e;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 lt(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=ct(n))):i=ct(o):i=ct(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ct(n))):i=ct(o)):i=ct(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 ut(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function dt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-tt(n),i=1<<r;t|=e[r],n&=~i}return t}function ft(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 pt(){var e=st;return st<<=1,!(st&62914560)&&(st=4194304),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ht(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function gt(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-tt(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&&_t(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function _t(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-tt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function vt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-tt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function yt(e,t){var n=t&-t;return n=n&42?1:bt(n),(n&(e.suspendedLanes|t))===0?n:0}function bt(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 xt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function St(){var e=F.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function Ct(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var wt=Math.random().toString(36).slice(2),Tt=`__reactFiber$`+wt,Et=`__reactProps$`+wt,Dt=`__reactContainer$`+wt,Ot=`__reactEvents$`+wt,kt=`__reactListeners$`+wt,At=`__reactHandles$`+wt,jt=`__reactResources$`+wt,Mt=`__reactMarker$`+wt,Nt=`__reactLoad$`+wt;function Pt(e){delete e[Tt],delete e[Et],delete e[kt],delete e[At]}function Ft(e){var t;if(t=e[Tt])return t;for(var n=e.parentNode;n;){if(t=n[Dt]||n[Tt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fm(e);e!==null;){if(n=e[Tt])return n;e=fm(e)}return t}e=n,n=e.parentNode}return null}function It(e){if(e=e[Tt]||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 Lt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Rt(e){var t=e[jt];return t||=e[jt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function zt(e){e[Mt]=!0}function Bt(e){e[Nt]=void 0}var Vt=new Set,Ht={};function I(e,t){Ut(e,t),Ut(e+`Capture`,t)}function Ut(e,t){for(Ht[e]=t,e=0;e<t.length;e++)Vt.add(t[e])}var L=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]*$`),Wt={},Gt={};function Kt(e){return Re.call(Gt,e)?!0:Re.call(Wt,e)?!1:L.test(e)?Gt[e]=!0:(Wt[e]=!0,!1)}var R=!1;function qt(){var e=R;return R=!1,e}function Jt(e,t,n){if(Kt(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 Yt(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 Xt(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 Zt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Qt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function z(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 $t(e){if(!e._valueTracker){var t=Qt(e)?`checked`:`value`;e._valueTracker=z(e,t,``+e[t])}}function en(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Qt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var B=/[\n"\\]/g;function V(e){return e.replace(B,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function tn(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=``+Zt(t)):e.value!==``+Zt(t)&&(e.value=``+Zt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):rn(e,Zt(n)):o===`number`&&e.value==t?rn(e,Zt(e.value)):rn(e,Zt(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=``+Zt(s):e.removeAttribute(`name`)}function nn(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)){$t(e);return}n=n==null?``:``+Zt(n),t=t==null?n:``+Zt(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),$t(e)}function rn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function an(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=``+Zt(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 on(e,t,n){t!=null&&(t=``+Zt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Zt(n)}function sn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ge(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Zt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),$t(e)}function cn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ln=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 un(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||ln.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function dn(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]=``,R=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(un(e,a,r),R=!0)}else for(var o in t)t.hasOwnProperty(o)&&un(e,o,t[o])}function fn(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 pn=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`],[`maskType`,`mask-type`],[`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`]]),mn=/^[\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 hn(e){return mn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function gn(){}var _n=null;function vn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yn=null,bn=null;function xn(e){var t=It(e);if(t&&(e=t.stateNode)){var n=e[Et]||null;a:switch(e=t.stateNode,t.type){case`input`:if(tn(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="`+V(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Et]||null;if(!a)throw Error(i(90));tn(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&&en(r)}break a;case`textarea`:on(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&an(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,(yn!==null||bn!==null)&&(Rd(),yn&&(t=yn,e=bn,bn=yn=null,xn(t),e)))for(t=0;t<e.length;t++)xn(e[t])}}function wn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Et]||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 Tn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,En=!1;if(Tn)try{var Dn={};Object.defineProperty(Dn,"passive",{get:function(){En=!0}}),window.addEventListener(`test`,Dn,Dn),window.removeEventListener(`test`,Dn,Dn)}catch{En=!1}var On=null,kn=null,An=null;function jn(){if(An)return An;var e,t=kn,n=t.length,r,i=`value`in On?On.value:On.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 An=i.slice(e,1<r?1-r:void 0)}function Mn(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 Nn(){return!0}function Pn(){return!1}function Fn(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)?Nn:Pn,this.isPropagationStopped=Pn,this}return D(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=Nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Nn)},persist:function(){},isPersistent:Nn}),t}var In={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ln=Fn(In),Rn=D({},In,{view:0,detail:0}),zn=Fn(Rn),Bn,Vn,Hn,Un=D({},Rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:er,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!==Hn&&(Hn&&e.type===`mousemove`?(Bn=e.screenX-Hn.screenX,Vn=e.screenY-Hn.screenY):Vn=Bn=0,Hn=e),Bn)},movementY:function(e){return`movementY`in e?e.movementY:Vn}}),Wn=Fn(Un),Gn=Fn(D({},Un,{dataTransfer:0})),Kn=Fn(D({},Rn,{relatedTarget:0})),qn=Fn(D({},In,{animationName:0,elapsedTime:0,pseudoElement:0})),Jn=Fn(D({},In,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Yn=Fn(D({},In,{data:0})),Xn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Zn={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`},Qn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function $n(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Qn[e])?!!t[e]:!1}function er(){return $n}var tr=Fn(D({},Rn,{key:function(e){if(e.key){var t=Xn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Zn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:er,charCode:function(e){return e.type===`keypress`?Mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),nr=Fn(D({},Un,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),rr=Fn(D({},In,{submitter:0})),ir=Fn(D({},Rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:er})),ar=Fn(D({},In,{propertyName:0,elapsedTime:0,pseudoElement:0})),or=Fn(D({},Un,{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})),sr=Fn(D({},In,{newState:0,oldState:0,source:0})),cr=[9,13,27,32],lr=Tn&&`CompositionEvent`in window,ur=null;Tn&&`documentMode`in document&&(ur=document.documentMode);var dr=Tn&&`TextEvent`in window&&!ur,fr=Tn&&(!lr||ur&&8<ur&&11>=ur),pr=` `,mr=!1;function hr(e,t){switch(e){case`keyup`:return cr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function gr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var _r=!1;function vr(e,t){switch(e){case`compositionend`:return gr(t);case`keypress`:return t.which===32?(mr=!0,pr):null;case`textInput`:return e=t.data,e===pr&&mr?null:e;default:return null}}function yr(e,t){if(_r)return e===`compositionend`||!lr&&hr(e,t)?(e=jn(),An=kn=On=null,_r=!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 fr&&t.locale!==`ko`?null:t.data;default:return null}}var br={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 xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!br[e.type]:t===`textarea`}function Sr(e,t,n,r){yn?bn?bn.push(r):bn=[r]:yn=r,t=qf(t,`onChange`),0<t.length&&(n=new Ln(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Cr=null,wr=null;function Tr(e){Bf(e,0)}function Er(e){if(en(Lt(e)))return e}function Dr(e,t){if(e===`change`)return t}var Or=!1;if(Tn){var kr;if(Tn){var Ar=`oninput`in document;if(!Ar){var jr=document.createElement(`div`);jr.setAttribute(`oninput`,`return;`),Ar=typeof jr.oninput==`function`}kr=Ar}else kr=!1;Or=kr&&(!document.documentMode||9<document.documentMode)}function Mr(){Cr&&(Cr.detachEvent(`onpropertychange`,Nr),wr=Cr=null)}function Nr(e){if(e.propertyName===`value`&&Er(wr)){var t=[];Sr(t,wr,e,vn(e)),Cn(Tr,t)}}function Pr(e,t,n){e===`focusin`?(Mr(),Cr=t,wr=n,Cr.attachEvent(`onpropertychange`,Nr)):e===`focusout`&&Mr()}function Fr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Er(wr)}function Ir(e,t){if(e===`click`)return Er(t)}function Lr(e,t){if(e===`input`||e===`change`)return Er(t)}function Rr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var H=typeof Object.is==`function`?Object.is:Rr;function U(e,t){if(H(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(!Re.call(t,i)||!H(e[i],t[i]))return!1}return!0}function W(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function zr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Br(e,t){var n=zr(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=zr(n)}}function Vr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=W(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=W(e.document)}return t}function G(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 Ur=Tn&&`documentMode`in document&&11>=document.documentMode,Wr=null,Gr=null,Kr=null,qr=!1;function Jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qr||Wr==null||Wr!==W(r)||(r=Wr,`selectionStart`in r&&G(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}),Kr&&U(Kr,r)||(Kr=r,r=qf(Gr,`onSelect`),0<r.length&&(t=new Ln(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Wr)))}function Yr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Xr={animationend:Yr(`Animation`,`AnimationEnd`),animationiteration:Yr(`Animation`,`AnimationIteration`),animationstart:Yr(`Animation`,`AnimationStart`),transitionrun:Yr(`Transition`,`TransitionRun`),transitionstart:Yr(`Transition`,`TransitionStart`),transitioncancel:Yr(`Transition`,`TransitionCancel`),transitionend:Yr(`Transition`,`TransitionEnd`)},Zr={},Qr={};Tn&&(Qr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Xr.animationend.animation,delete Xr.animationiteration.animation,delete Xr.animationstart.animation),`TransitionEvent`in window||delete Xr.transitionend.transition);function $r(e){if(Zr[e])return Zr[e];if(!Xr[e])return e;var t=Xr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Qr)return Zr[e]=t[n];return e}var ei=$r(`animationend`),ti=$r(`animationiteration`),ni=$r(`animationstart`),ri=$r(`transitionrun`),ii=$r(`transitionstart`),ai=$r(`transitioncancel`),oi=$r(`transitionend`),si=new Map,ci=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);ci.push(`scrollEnd`);function li(e,t){si.set(e,t),I(t,[e])}var ui=0;function di(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=yd.identifierPrefix;var n=ui++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function fi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Dd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function pi(e,t){return e=fi(e),t=fi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var mi=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)},hi=[],gi=0,_i=0;function vi(){for(var e=gi,t=_i=gi=0;t<e;){var n=hi[t];hi[t++]=null;var r=hi[t];hi[t++]=null;var i=hi[t];hi[t++]=null;var a=hi[t];if(hi[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&&Si(n,i,a)}}function yi(e,t,n,r){hi[gi++]=e,hi[gi++]=t,hi[gi++]=n,hi[gi++]=r,_i|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function bi(e,t,n,r){return yi(e,t,n,r),Ci(e)}function xi(e,t){return yi(e,null,null,t),Ci(e)}function Si(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-tt(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ci(e){if(50<Od)throw Od=0,kd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var wi={};function Ti(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 Ei(e,t,n,r){return new Ti(e,t,n,r)}function Di(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oi(e,t){var n=e.alternate;return n===null?(n=Ei(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&1206910976,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 ki(e,t){e.flags&=1206910978;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 Ai(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Di(r)&&(s=1);else if(typeof r==`string`)s=qm(e,n,Ce.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ce:return e=Ei(31,n,t,a),e.elementType=ce,e.lanes=o,e;case A:return ji(n.children,a,o,t);case te:s=8,a|=24;break;case j:return e=Ei(12,n,t,a|2),e.elementType=j,e.lanes=o,e;case ie:return e=Ei(13,n,t,a),e.elementType=ie,e.lanes=o,e;case ae:return e=Ei(19,n,t,a),e.elementType=ae,e.lanes=o,e;case le:case de:return e=a|32,e=Ei(30,n,t,e),e.elementType=de,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case M:s=10;break a;case ne:s=9;break a;case re:s=11;break a;case oe:s=14;break a;case se:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ei(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ji(e,t,n,r){return e=Ei(7,e,r,t),e.lanes=n,e}function Mi(e,t,n){return e=Ei(6,e,null,t),e.lanes=n,e}function Ni(e){var t=Ei(18,null,null,0);return t.stateNode=e,t}function Pi(e,t,n){return t=Ei(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Fi=new WeakMap;function Ii(e,t){if(typeof e==`object`&&e){var n=Fi.get(e);return n===void 0?(t={value:e,source:t,stack:Le(t)},Fi.set(e,t),t):n}return{value:e,source:t,stack:Le(t)}}var Li=[],Ri=0,zi=null,Bi=0,Vi=[],Hi=0,Ui=null,Wi=1,Gi=``;function Ki(e,t){Li[Ri++]=Bi,Li[Ri++]=zi,zi=e,Bi=t}function qi(e,t,n){Vi[Hi++]=Wi,Vi[Hi++]=Gi,Vi[Hi++]=Ui,Ui=e;var r=Wi;e=Gi;var i=32-tt(r)-1;r&=~(1<<i),n+=1;var a=32-tt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Wi=1<<32-tt(t)+i|n<<i|r,Gi=a+e}else Wi=1<<a|n<<i|r,Gi=e}function Ji(e){e.return!==null&&(Ki(e,1),qi(e,1,0))}function Yi(e){for(;e===zi;)zi=Li[--Ri],Li[Ri]=null,Bi=Li[--Ri],Li[Ri]=null;for(;e===Ui;)Ui=Vi[--Hi],Vi[Hi]=null,Gi=Vi[--Hi],Vi[Hi]=null,Wi=Vi[--Hi],Vi[Hi]=null}function Xi(e,t){Vi[Hi++]=Wi,Vi[Hi++]=Gi,Vi[Hi++]=Ui,Wi=t.id,Gi=t.overflow,Ui=e}var Zi=null,Qi=null,K=!1,$i=null,ea=!1,ta=Error(i(519));function na(e){throw ca(Ii(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ta}function ra(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Tt]=e,t[Et]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<Rf.length;n++)$(Rf[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),nn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),sn(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||$f(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=gn),t=!0):t=!1,t||na(e,!0)}function ia(e){for(Zi=e.return;Zi;)switch(Zi.tag){case 5:case 31:case 13:ea=!1;return;case 27:case 3:ea=!0;return;default:Zi=Zi.return}}function aa(e){if(e!==Zi)return!1;if(!K)return ia(e),K=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||pp(e.type,e.memoizedProps)),n=!n),n&&Qi&&na(e),ia(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Qi=dm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Qi=dm(e)}else t===27?(t=Qi,Sp(e.type)?(e=um,um=null,Qi=e):Qi=t):Qi=Zi?lm(e.stateNode.nextSibling):null;return!0}function oa(){Qi=Zi=null,K=!1}function sa(){var e=$i;return e!==null&&(dd===null?dd=e:dd.push.apply(dd,e),$i=null),e}function ca(e){$i===null?$i=[e]:$i.push(e)}var la=be(null),ua=null,da=null;function fa(e,t,n){Se(la,t._currentValue),t._currentValue=n}function pa(e){e._currentValue=la.current,xe(la)}function ma(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 ha(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),ma(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),ma(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ma(a.return,n,e),s=a.child,s=s===null?null:s.sibling):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 ga(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;H(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Ee.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sh]:e.push(sh))}a=a.return}return e!==null&&ha(t,e,n,r),t.flags|=262144,e!==null}function _a(e){for(e=e.firstContext;e!==null;){if(!H(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function va(e){ua=e,da=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ya(e){return xa(ua,e)}function ba(e,t){return ua===null&&va(e),xa(e,t)}function xa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},da===null){if(e===null)throw Error(i(308));da=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else da=da.next=t;return n}var Sa=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()})}},Ca=t.unstable_scheduleCallback,wa=t.unstable_NormalPriority,Ta={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ea(){return{controller:new Sa,data:new Map,refCount:0}}function Da(e){e.refCount--,e.refCount===0&&Ca(wa,function(){e.controller.abort()})}function Oa(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var ka=null;function Aa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var ja=null,Ma=0,Na=0,Pa=null;function Fa(e,t){if(ja===null){var n=ja=[];Ma=0,Na=Nf(),Pa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ma++,t.then(Ia,Ia),t}function Ia(){if(--Ma===0&&(ka=null,ja!==null)){Pa!==null&&(Pa.status=`fulfilled`);var e=ja;ja=null,Na=0,Pa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function La(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 Ra=P.S;P.S=function(e,t){if(md=Ue(),typeof t==`object`&&t&&typeof t.then==`function`&&Fa(e,t),ka!==null)for(var n=yf;n!==null;)Oa(n,ka),n=n.next;if(n=e.types,n!==null){for(var r=yf;r!==null;)Oa(r,n),r=r.next;if(Na!==0){r=ka,r===null&&(r=ka=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ra!==null&&Ra(e,t)};var za=be(null);function Ba(){var e=za.current;return e===null?Qu.pooledCache:e}function Va(e,t){t===null?Se(za,za.current):Se(za,t.pool)}function Ha(){var e=Ba();return e===null?null:{parent:Ta._currentValue,pool:e}}var Ua=Error(i(460)),Wa=Error(i(474)),Ga=Error(i(542)),Ka={then:function(){}};function qa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ja(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(gn,gn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Qa(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(gn,gn);else{if(e=Qu,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,Qa(e),e}throw Xa=t,Ua}}function Ya(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Xa=e,Ua):e}}var Xa=null;function Za(){if(Xa===null)throw Error(i(459));var e=Xa;return Xa=null,e}function Qa(e){if(e===Ua||e===Ga)throw Error(i(483))}var $a=null,eo=0;function to(e){var t=eo;return eo+=1,$a===null&&($a=[]),Ja($a,e,t)}function no(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ro(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function io(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=Oi(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|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Mi(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===A?(e=d(e,t,n.props.children,r,n.key),no(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===se&&Ya(i)===t.type)?(t=a(t,n.props),no(t,n),t.return=e,t):(t=Ai(n.type,n.key,n.props,null,e.mode,r),no(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=ji(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=Mi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Ai(t.type,t.key,t.props,null,e.mode,n),no(n,t),n.return=e,n;case ee:return t=Pi(t,e.mode,n),t.return=e,t;case se:return t=Ya(t),f(e,t,n)}if(ge(t)||me(t))return t=ji(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,to(t),n);if(t.$$typeof===M)return f(e,ba(e,t),n);ro(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 k:return n.key===i?l(e,t,n,r):null;case ee:return n.key===i?u(e,t,n,r):null;case se:return n=Ya(n),p(e,t,n,r)}if(ge(n)||me(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,to(n),r);if(n.$$typeof===M)return p(e,t,ba(e,n),r);ro(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 k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case ee:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case se:return r=Ya(r),m(e,t,n,r,i)}if(ge(r)||me(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,to(r),i);if(r.$$typeof===M)return m(e,t,n,ba(t,r),i);ro(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),K&&Ki(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 K&&Ki(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(_.key===null?h:_.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)}),K&&Ki(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),K&&Ki(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 K&&Ki(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(_.key===null?g:_.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)}),K&&Ki(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===A&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===A){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),no(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===se&&Ya(l)===r.type){n(e,r.sibling),c=a(r,o.props),no(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===A?(c=ji(o.props.children,e.mode,c,o.key),no(c,o),c.return=e,e=c):(c=Ai(o.type,o.key,o.props,null,e.mode,c),no(c,o),c.return=e,e=c)}return s(e);case ee: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}n(e,r);break}t(e,r),r=r.sibling}c=Pi(o,e.mode,c),c.return=e,e=c}return s(e);case se:return o=Ya(o),_(e,r,o,c)}if(ge(o))return h(e,r,o,c);if(me(o)){if(l=me(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,to(o),c);if(o.$$typeof===M)return _(e,r,ba(e,o),c);ro(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=Mi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{eo=0;var i=_(e,t,n,r);return $a=null,i}catch(t){if(t===Ua||t===Ga)throw t;var a=Ei(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ao=io(!0),oo=io(!1),so=!1;function co(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lo(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 uo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Zu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ci(e),Si(e,null,n),t}return yi(e,r,t,n),Ci(e)}function po(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,vt(e,n)}}function mo(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}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ho=!1;function go(){if(ho){var e=Pa;if(e!==null)throw e}}function _o(e,t,n,r){ho=!1;var i=e.updateQueue;so=!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,p=f!==s.lane;if(p?(X&f)===f:(r&f)===f){f!==0&&f===Na&&(ho=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:so=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,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),ad|=o,e.lanes=o,e.memoizedState=d}}function vo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function yo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)vo(n[e],t)}var bo=be(null),xo=be(0);function So(e,t){e=rd,Se(xo,e),Se(bo,t),rd=e|t.baseLanes}function Co(){Se(xo,rd),Se(bo,bo.current)}function wo(){rd=xo.current,xe(bo),xe(xo)}var To=be(null),Eo=null;function Do(e){var t=e.alternate;Se(Mo,Mo.current&1),Se(To,e),Eo===null&&(t===null||bo.current!==null||t.memoizedState!==null)&&(Eo=e)}function Oo(e){Se(Mo,Mo.current),Se(To,e),Eo===null&&(Eo=e)}function ko(e){e.tag===22?(Se(Mo,Mo.current),Se(To,e),Eo===null&&(Eo=e)):Ao()}function Ao(){Se(Mo,Mo.current),Se(To,To.current)}function jo(e){xe(To),Eo===e&&(Eo=null),xe(Mo)}var Mo=be(0);function No(e,t){Se(To,To.current),Se(Mo,t)}function Po(e){xe(Mo),xe(To),Eo===e&&(Eo=null)}function Fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||om(n)||sm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){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 Io=0,q=null,Lo=null,Ro=null,zo=!1,Bo=!1,Vo=!1,Ho=0,Uo=0,Wo=null,Go=0;function Ko(){throw Error(i(321))}function qo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!H(e[n],t[n]))return!1;return!0}function Jo(e,t,n,r,i,a){return Io=a,q=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?dc:fc,Vo=!1,a=n(r,i),Vo=!1,Bo&&(a=Xo(t,n,r,i)),Yo(e),a}function Yo(e){P.H=uc;var t=Lo!==null&&Lo.next!==null;if(Io=0,Ro=Lo=q=null,zo=!1,Uo=0,Wo=null,t)throw Error(i(300));e===null||kc||(e=e.dependencies,e!==null&&_a(e)&&(kc=!0))}function Xo(e,t,n,r){q=e;var a=0;do{if(Bo&&(Wo=null),Uo=0,Bo=!1,25<=a)throw Error(i(301));if(a+=1,Ro=Lo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=pc,o=t(n,r)}while(Bo);return o}function Zo(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?is(t):t,e=e.useState()[0],(Lo===null?null:Lo.memoizedState)!==e&&(q.flags|=1024),t}function Qo(){var e=Ho!==0;return Ho=0,e}function $o(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function es(e){if(zo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}zo=!1}Io=0,Ro=Lo=q=null,Bo=!1,Uo=Ho=0,Wo=null}function ts(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ro===null?q.memoizedState=Ro=e:Ro=Ro.next=e,Ro}function ns(){if(Lo===null){var e=q.alternate;e=e===null?null:e.memoizedState}else e=Lo.next;var t=Ro===null?q.memoizedState:Ro.next;if(t!==null)Ro=t,Lo=e;else{if(e===null)throw q.alternate===null?Error(i(467)):Error(i(310));Lo=e,e={memoizedState:Lo.memoizedState,baseState:Lo.baseState,baseQueue:Lo.baseQueue,queue:Lo.queue,next:null},Ro===null?q.memoizedState=Ro=e:Ro=Ro.next=e}return Ro}function rs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function is(e){var t=Uo;return Uo+=1,Wo===null&&(Wo=[]),e=Ja(Wo,e,t),t=q,(Ro===null?t.memoizedState:Ro.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?dc:fc),e}function as(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return is(e);if(e.$$typeof===fe)return;if(e.$$typeof===M)return ya(e)}throw Error(i(438,String(e)))}function os(e){var t=null,n=q.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=q.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=rs(),q.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]=ue;return t.index++,n}function ss(e,t){return typeof t==`function`?t(e):t}function cs(e){return ls(ns(),Lo,e)}function ls(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?(Io&f)===f:(X&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===Na&&(d=!0);else if((Io&p)===p){u=u.next,p===Na&&(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,q.lanes|=p,ad|=p;f=u.action,Vo&&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,q.lanes|=f,ad|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!H(o,e.memoizedState)&&(kc=!0,d&&(n=Pa,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 us(e){var t=ns(),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);H(o,t.memoizedState)||(kc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ds(e,t,n){var r=q,a=ns(),o=K;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!H((Lo||a).memoizedState,n);if(s&&(a.memoizedState=n,kc=!0),a=a.queue,Is(ms.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Ro!==null&&!!(Ro.memoizedState.tag&1),js(e?9:8,{destroy:void 0},ps.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Qu===null)throw Error(i(349));o||Io&127||fs(r,t,n)}return n}function fs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=q.updateQueue,t===null?(t=rs(),q.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ps(e,t,n,r){t.value=n,t.getSnapshot=r,hs(t)&&gs(e)}function ms(e,t,n){return n(function(){hs(t)&&gs(e)})}function hs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!H(e,n)}catch{return!0}}function gs(e){var t=xi(e,2);t!==null&&Nd(t,e,2)}function _s(e){var t=ts();if(typeof e==`function`){var n=e;if(e=n(),Vo){et(!0);try{n()}finally{et(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:e},t}function vs(e,t,n,r){return e.baseState=n,ls(e,Lo,typeof r==`function`?r:ss)}function ys(e,t,n,r,a){if(sc(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)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,bs(t,o)):(o.next=n.next,t.pending=n.next=o)}}function bs(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};o.types=a===null?null:a.types,P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),xs(e,t,s)}catch(n){Cs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),xs(e,t,a)}catch(n){Cs(e,t,n)}}function xs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ss(e,t,n)},function(n){return Cs(e,t,n)}):Ss(e,t,n)}function Ss(e,t,n){t.status=`fulfilled`,t.value=n,ws(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,bs(e,n)))}function Cs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ws(t),t=t.next;while(t!==r)}e.action=null}function ws(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ts(e,t){return t}function Es(e,t){if(K){var n=Qu.formState;if(n!==null){a:{var r=q;if(K){if(Qi){b:{for(var i=Qi,a=ea;i.nodeType!==8;)if(!a||(i=lm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Qi=lm(i.nextSibling),r=i.data===`F!`;break a}}na(r)}r=!1}r&&(t=n[0])}}return n=ts(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ts,lastRenderedState:t},n.queue=r,n=ic.bind(null,q,r),r.dispatch=n,r=_s(!1),a=oc.bind(null,q,!1,r.queue),r=ts(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=ys.bind(null,q,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ds(e){return Os(ns(),Lo,e)}function Os(e,t,n){if(t=ls(e,t,Ts)[0],e=cs(ss)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=is(t)}catch(e){throw e===Ua?Ga:e}else r=t;t=ns();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(q.flags|=2048,js(9,{destroy:void 0},ks.bind(null,i,n),null)),[r,a,e]}function ks(e,t){e.action=t}function As(e){var t=ns(),n=Lo;if(n!==null)return Os(t,n,e);ns(),t=t.memoizedState,n=ns();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function js(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=q.updateQueue,t===null&&(t=rs(),q.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 Ms(){return ns().memoizedState}function Ns(e,t,n,r){var i=ts();q.flags|=e,i.memoizedState=js(1|t,{destroy:void 0},n,r===void 0?null:r)}function Ps(e,t,n,r){var i=ns();r=r===void 0?null:r;var a=i.memoizedState.inst;Lo!==null&&r!==null&&qo(r,Lo.memoizedState.deps)?i.memoizedState=js(t,a,n,r):(q.flags|=e,i.memoizedState=js(1|t,a,n,r))}function Fs(e,t){Ns(8390656,8,e,t)}function Is(e,t){Ps(2048,8,e,t)}function Ls(e){q.flags|=4;var t=q.updateQueue;if(t===null)t=rs(),q.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Rs(e){var t=ns().memoizedState;return Ls({ref:t,nextImpl:e}),function(){if(Zu&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function zs(e,t){return Ps(4,2,e,t)}function Bs(e,t){return Ps(4,4,e,t)}function Vs(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 Hs(e,t,n){n=n==null?null:n.concat([e]),Ps(4,4,Vs.bind(null,t,e),n)}function Us(){}function Ws(e,t){var n=ns();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&qo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Gs(e,t){var n=ns();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&qo(t,r[1]))return r[0];if(r=e(),Vo){et(!0);try{e()}finally{et(!1)}}return n.memoizedState=[r,t],r}function Ks(e,t,n){return n===void 0||Io&1073741824&&!(X&261930)?e.memoizedState=t:(e.memoizedState=n,e=jd(),q.lanes|=e,ad|=e,n)}function qs(e,t,n,r){return H(n,t)?n:bo.current===null?!(Io&106)||Io&1073741824&&!(X&261930)?(kc=!0,e.memoizedState=n):(e=jd(),q.lanes|=e,ad|=e,t):(e=Ks(e,n,r),H(e,t)||(kc=!0),e)}function Js(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};s.types=o===null?null:o.types,P.T=s,oc(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ac(e,t,La(c,r),Ad(e)):ac(e,t,r,Ad(e))}catch(n){ac(e,t,{then:function(){},status:`rejected`,reason:n},Ad())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function Ys(){}function Xs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Zs(e).queue;Js(e,a,t,_e,n===null?Ys:function(){return Qs(e),n(r)})}function Zs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:_e,baseState:_e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:_e},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Qs(e){var t=Zs(e);t.next===null&&(t=e.alternate.memoizedState),ac(e,t.next.queue,{},Ad())}function $s(){return ya(sh)}function ec(){return ns().memoizedState}function tc(){return ns().memoizedState}function nc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ad();e=uo(n);var r=fo(t,e,n);r!==null&&(Nd(r,t,n),po(r,t,n)),t={cache:Ea()},e.payload=t;return}t=t.return}}function rc(e,t,n){var r=Ad();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},sc(e)?cc(t,n):(n=bi(e,t,n,r),n!==null&&(Nd(n,e,r),lc(n,t,r)))}function ic(e,t,n){ac(e,t,n,Ad())}function ac(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(sc(e))cc(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,H(s,o))return yi(e,t,i,0),Qu===null&&vi(),!1}catch{}if(n=bi(e,t,i,r),n!==null)return Nd(n,e,r),lc(n,t,r),!0}return!1}function oc(e,t,n,r){if(r={lane:2,revertLane:Nf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},sc(e)){if(t)throw Error(i(479))}else t=bi(e,n,r,2),t!==null&&Nd(t,e,2)}function sc(e){var t=e.alternate;return e===q||t!==null&&t===q}function cc(e,t){Bo=zo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function lc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vt(e,n)}}var uc={readContext:ya,use:as,useCallback:Ko,useContext:Ko,useEffect:Ko,useImperativeHandle:Ko,useLayoutEffect:Ko,useInsertionEffect:Ko,useMemo:Ko,useReducer:Ko,useRef:Ko,useState:Ko,useDebugValue:Ko,useDeferredValue:Ko,useTransition:Ko,useSyncExternalStore:Ko,useId:Ko,useHostTransitionStatus:Ko,useFormState:Ko,useActionState:Ko,useOptimistic:Ko,useMemoCache:Ko,useCacheRefresh:Ko,useEffectEvent:Ko},dc={readContext:ya,use:as,useCallback:function(e,t){return ts().memoizedState=[e,t===void 0?null:t],e},useContext:ya,useEffect:Fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ns(4194308,4,Vs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ns(4194308,4,e,t)},useInsertionEffect:function(e,t){Ns(4,2,e,t)},useMemo:function(e,t){var n=ts();t=t===void 0?null:t;var r=e();if(Vo){et(!0);try{e()}finally{et(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ts();if(n!==void 0){var i=n(t);if(Vo){et(!0);try{n(t)}finally{et(!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=rc.bind(null,q,e),[r.memoizedState,e]},useRef:function(e){var t=ts();return e={current:e},t.memoizedState=e},useState:function(e){e=_s(e);var t=e.queue,n=ic.bind(null,q,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Us,useDeferredValue:function(e,t){return Ks(ts(),e,t)},useTransition:function(){var e=_s(!1);return e=Js.bind(null,q,e.queue,!0,!1),ts().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=q,a=ts();if(K){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Qu===null)throw Error(i(349));X&127||fs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Fs(ms.bind(null,r,o,e),[e]),r.flags|=2048,js(9,{destroy:void 0},ps.bind(null,r,o,n,t),null),n},useId:function(){var e=ts(),t=Qu.identifierPrefix;if(K){var n=Gi,r=Wi;n=(r&~(1<<32-tt(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ho++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Go++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:$s,useFormState:Es,useActionState:Es,useOptimistic:function(e){var t=ts();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=oc.bind(null,q,!0,n),n.dispatch=t,[e,t]},useMemoCache:os,useCacheRefresh:function(){return ts().memoizedState=nc.bind(null,q)},useEffectEvent:function(e){var t=ts(),n={impl:e};return t.memoizedState=n,function(){if(Zu&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},fc={readContext:ya,use:as,useCallback:Ws,useContext:ya,useEffect:Is,useImperativeHandle:Hs,useInsertionEffect:zs,useLayoutEffect:Bs,useMemo:Gs,useReducer:cs,useRef:Ms,useState:function(){return cs(ss)},useDebugValue:Us,useDeferredValue:function(e,t){return qs(ns(),Lo.memoizedState,e,t)},useTransition:function(){var e=cs(ss)[0],t=ns().memoizedState;return[typeof e==`boolean`?e:is(e),t]},useSyncExternalStore:ds,useId:ec,useHostTransitionStatus:$s,useFormState:Ds,useActionState:Ds,useOptimistic:function(e,t){return vs(ns(),Lo,e,t)},useMemoCache:os,useCacheRefresh:tc,useEffectEvent:Rs},pc={readContext:ya,use:as,useCallback:Ws,useContext:ya,useEffect:Is,useImperativeHandle:Hs,useInsertionEffect:zs,useLayoutEffect:Bs,useMemo:Gs,useReducer:us,useRef:Ms,useState:function(){return us(ss)},useDebugValue:Us,useDeferredValue:function(e,t){var n=ns();return Lo===null?Ks(n,e,t):qs(n,Lo.memoizedState,e,t)},useTransition:function(){var e=us(ss)[0],t=ns().memoizedState;return[typeof e==`boolean`?e:is(e),t]},useSyncExternalStore:ds,useId:ec,useHostTransitionStatus:$s,useFormState:As,useActionState:As,useOptimistic:function(e,t){var n=ns();return Lo===null?(n.baseState=e,[e,n.queue.dispatch]):vs(n,Lo,e,t)},useMemoCache:os,useCacheRefresh:tc,useEffectEvent:Rs};function mc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var hc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=uo(r);i.payload=t,n!=null&&(i.callback=n),t=fo(e,i,r),t!==null&&(Nd(t,e,r),po(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=uo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=fo(e,i,r),t!==null&&(Nd(t,e,r),po(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ad(),r=uo(n);r.tag=2,t!=null&&(r.callback=t),t=fo(e,r,n),t!==null&&(Nd(t,e,n),po(t,e,n))}};function gc(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?!U(n,r)||!U(i,a):!0}function _c(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&&hc.enqueueReplaceState(t,t.state,null)}function vc(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=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function yc(e){mi(e)}function bc(e){console.error(e)}function xc(e){mi(e)}function Sc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Cc(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 wc(e,t,n){return n=uo(n),n.tag=3,n.payload={element:null},n.callback=function(){Sc(e,t)},n}function Tc(e){return e=uo(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(){Cc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Cc(t,n,r),typeof i!=`function`&&(_d===null?_d=new Set([this]):_d.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Dc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ga(t,n,a,!0),n=To.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Eo===null?Gd():n.alternate===null&&id===0&&(id=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ka?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),mf(e,r,a)),!1;case 22:return n.flags|=65536,r===Ka?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)),mf(e,r,a)),!1}throw Error(i(435,n.tag))}return mf(e,r,a),Gd(),!1}if(K)return t=To.current,t===null?(r!==ta&&(t=Error(i(423),{cause:r}),ca(Ii(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ii(r,n),a=wc(e.stateNode,r,a),mo(e,a),id!==4&&(id=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ta&&(e=Error(i(422),{cause:r}),ca(Ii(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ii(o,n),ud===null?ud=[o]:ud.push(o),id!==4&&(id=2),t===null)return!0;r=Ii(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=wc(n.stateNode,r,e),mo(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`&&(_d===null||!_d.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Tc(a),Ec(a,e,n,r),mo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Oc=Error(i(461)),kc=!1;function Ac(e,t,n,r){t.child=e===null?oo(t,null,n,r):ao(t,e.child,n,r)}function jc(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 va(t),r=Jo(e,t,n,o,a,i),s=Qo(),e!==null&&!kc?($o(e,t,i),al(e,t,i)):(K&&s&&Ji(t),t.flags|=1,Ac(e,t,r,i),t.child)}function Mc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Di(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Nc(e,t,a,r,i)):(e=Ai(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ol(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?U:n,n(o,r)&&e.ref===t.ref)return al(e,t,i)}return t.flags|=1,e=Oi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Nc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(U(a,r)&&e.ref===t.ref){if(kc=!1,t.pendingProps=r=a,ol(e,i))e.flags&131072&&(kc=!0);else return t.lanes=e.lanes,al(e,t,i)}}return Vc(e,t,n,r,i)}function Pc(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 Ic(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Va(t,a===null?null:a.cachePool),a===null?Co():So(t,a),ko(t);else return r=t.lanes=536870912,Ic(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Va(t,null),Co(),Ao()):(Va(t,a.cachePool),So(t,a),Ao(),t.memoizedState=null);return Ac(e,t,i,n),t.child}function Fc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ic(e,t,n,r,i){var a=Ba();return a=a===null?null:{parent:Ta._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Va(t,null),Co(),ko(t),e!==null&&ga(e,t,r,!0),t.childLanes=i,null}function Lc(e,t){return t=Xc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Rc(e,t,n){return ao(t,e.child,null,n),e=Lc(t,t.pendingProps),e.flags|=2,jo(t),t.memoizedState=null,e}function zc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(K){if(r.mode===`hidden`)return e=Lc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Fc(null,e);if(Oo(t),(e=Qi)?(e=am(e,ea),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ui===null?null:{id:Wi,overflow:Gi},retryLane:536870912,hydrationErrors:null},n=Ni(e),n.return=t,t.child=n,Zi=t,Qi=null)):e=null,e===null)throw na(t);return t.lanes=536870912,null}return Lc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Oo(t),a){if(t.flags&256)t.flags&=-257,t=Rc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(kc||ga(e,t,n,!1),a=(n&e.childLanes)!==0,kc||a){if(bo.current===null){if(r=Qu,r!==null&&(s=yt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,xi(e,s),Nd(r,e,s),Oc;Gd()}t=Rc(e,t,n)}else e=o.treeContext,Qi=lm(s.nextSibling),Zi=t,K=!0,$i=null,ea=!1,e!==null&&Xi(t,e),t=Lc(t,r),t.flags|=134221824;return t}return e=Oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Bc(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 Vc(e,t,n,r,i){return va(t),n=Jo(e,t,n,r,void 0,i),r=Qo(),e!==null&&!kc?($o(e,t,i),al(e,t,i)):(K&&r&&Ji(t),t.flags|=1,Ac(e,t,n,i),t.child)}function Hc(e,t,n,r,i,a){return va(t),t.updateQueue=null,n=Xo(t,r,n,i),Yo(e),r=Qo(),e!==null&&!kc?($o(e,t,a),al(e,t,a)):(K&&r&&Ji(t),t.flags|=1,Ac(e,t,n,a),t.child)}function Uc(e,t,n,r,i){if(va(t),t.stateNode===null){var a=wi,o=n.contextType;typeof o==`object`&&o&&(a=ya(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=hc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},co(t),o=n.contextType,a.context=typeof o==`object`&&o?ya(o):wi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(mc(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&&hc.enqueueReplaceState(a,a.state,null),_o(t,r,a,i),go(),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=vc(n,s);a.props=c;var l=a.context,u=n.contextType;o=wi,typeof u==`object`&&u&&(o=ya(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)&&_c(t,a,r,o),so=!1;var f=t.memoizedState;a.state=f,_o(t,r,a,i),go(),l=t.memoizedState,s||f!==l||so?(typeof d==`function`&&(mc(t,n,d,r),l=t.memoizedState),(c=so||gc(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,lo(e,t),o=t.memoizedProps,u=vc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=wi,typeof l==`object`&&l&&(c=ya(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)&&_c(t,a,r,c),so=!1,f=t.memoizedState,a.state=f,_o(t,r,a,i),go();var p=t.memoizedState;o!==d||f!==p||so||e!==null&&e.dependencies!==null&&_a(e.dependencies)?(typeof s==`function`&&(mc(t,n,s,r),p=t.memoizedState),(u=so||gc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&_a(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,Bc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=ao(t,e.child,null,i),t.child=ao(t,null,n,i)):Ac(e,t,n,i),t.memoizedState=a.state,e=t.child):e=al(e,t,i),e}function Wc(e,t,n,r){return oa(),t.flags|=256,Ac(e,t,n,r),t.child}var Gc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kc(e){return{baseLanes:e,cachePool:Ha()}}function qc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=cd),e}function Jc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Mo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(K){if(i?Do(t):Ao(),(e=Qi)?(e=am(e,ea),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ui===null?null:{id:Wi,overflow:Gi},retryLane:536870912,hydrationErrors:null},n=Ni(e),n.return=t,t.child=n,Zi=t,Qi=null)):e=null,e===null)throw na(t);return t.lanes=sm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Ao(),i=t.mode,a=Xc({mode:`hidden`,children:a},i),r=ji(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Kc(n),r.childLanes=qc(e,o,n),t.memoizedState=Gc,Fc(null,r)):(Do(t),Yc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return Qc(e,t,a,o,r,c,s,n)}return i?(Ao(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Oi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=ji(i,a,n,null),i.flags|=2):i=Oi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Fc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Kc(n):(a=i.cachePool,a===null?a=Ha():(s=Ta._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=qc(e,o,n),t.memoizedState=Gc,Fc(e.child,r)):(Do(t),n=e.child,e=n.sibling,n=Oi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Yc(e,t){return t=Xc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Xc(e,t){return e=Ei(22,e,null,t),e.lanes=0,e}function Zc(e,t,n){return ao(t,e.child,null,n),e=Yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Qc(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Do(t),t.flags&=-257,Zc(e,t,c)):t.memoizedState===null?(Ao(),o=a.fallback,s=t.mode,a=Xc({mode:`visible`,children:a.children},s),o=ji(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,ao(t,e.child,null,c),a=t.child,a.memoizedState=Kc(c),a.childLanes=qc(e,r,c),t.memoizedState=Gc,Fc(null,a)):(Ao(),t.child=e.child,t.flags|=128,null);if(Do(t),sm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ca({value:a,source:null,stack:null})),Zc(e,t,c)}if(kc||ga(e,t,c,!1),r=(c&e.childLanes)!==0,kc||r){if(bo.current!==null)return Zc(e,t,c);if(r=Qu,r!==null&&(a=yt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,xi(e,a),Nd(r,e,a),Oc;return om(o)||Gd(),Zc(e,t,c)}return om(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,Qi=lm(o.nextSibling),Zi=t,K=!0,$i=null,ea=!1,e!==null&&Xi(t,e),t=Yc(t,a.children),t.flags|=134221824,t)}function $c(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ma(e.return,t,n)}function el(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Fo(n)===null&&(t=e),e=e.sibling}return t}function tl(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 nl(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function rl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Mo.current;if(t.flags&128)return No(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,No(t,o),i===`backwards`&&e!==null?(nl(e),Ac(e,t,r,n),nl(e)):Ac(e,t,r,n),r=K?Bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$c(e,n,t);else if(e.tag===19)$c(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`backwards`:n=el(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,nl(t)),tl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}tl(t,!0,n,null,a,r);break;case`together`:tl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=el(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),tl(t,!1,i,n,a,r)}return t.child}function il(e,t,n){var r=t.pendingProps;return fa(t,t.type,r.value),Ac(e,t,r.children,n),t.child}function al(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ad|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ga(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=Oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ol(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&_a(e)))}function sl(e,t,n){switch(t.tag){case 3:De(t,t.stateNode.containerInfo),fa(t,Ta,e.memoizedState.cache),oa();break;case 27:case 5:ke(t);break;case 4:De(t,t.stateNode.containerInfo);break;case 10:fa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Do(t),t.flags|=128,null;r=ga(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Jc(e,t,n):(Do(t),e=al(e,t,n),e===null?null:e.sibling)}Do(t);break;case 19:if(t.flags&128)return rl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ga(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return rl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),No(t,Mo.current),r)break;return null;case 22:return t.lanes=0,Pc(e,t,n,t.pendingProps);case 24:fa(t,Ta,e.memoizedState.cache)}return al(e,t,n)}function cl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)kc=!0;else{if(!ol(e,n)&&!(t.flags&128))return kc=!1,sl(e,t,n);kc=!!(e.flags&131072)}}else kc=!1,K&&t.flags&1048576&&qi(t,Bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ya(t.elementType),t.type=e,typeof e==`function`)Di(e)?(r=vc(e,r),t.tag=1,t=Uc(null,t,e,r,n)):(t.tag=0,t=Vc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===re){t.tag=11,t=jc(null,t,e,r,n);break a}if(a===oe){t.tag=14,t=Mc(null,t,e,r,n);break a}if(a===M){t.tag=10,t.type=e,t=il(null,t,n);break a}}throw t=N(e)||e,Error(i(306,t,``))}}return t;case 0:return Vc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=vc(r,t.pendingProps),Uc(e,t,r,a,n);case 3:a:{if(De(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,lo(e,t),_o(t,r,null,n);var s=t.memoizedState;if(r=s.cache,fa(t,Ta,r),r!==o.cache&&ha(t,[Ta],n,!0),go(),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=Wc(e,t,r,n);break a}if(r!==a){a=Ii(Error(i(424)),t),ca(a),t=Wc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Qi=lm(e.firstChild),Zi=t,K=!0,$i=null,ea=!0,n=oo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(oa(),r===a){t=al(e,t,n);break a}Ac(e,t,r,n)}t=t.child}return t;case 26:return Bc(e,t),e===null?(n=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=n:K||(t.stateNode=fp(t.type,t.pendingProps,Te.current,t)):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ke(t),e===null&&K&&(r=t.stateNode=hm(t.type,t.pendingProps,Te.current),Zi=t,ea=!0,a=Qi,Sp(t.type)?(um=a,Qi=lm(r.firstChild)):Qi=a),Ac(e,t,t.pendingProps.children,n),Bc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&K&&((a=r=Qi)&&(r=rm(r,t.type,t.pendingProps,ea),r===null?a=!1:(t.stateNode=r,Zi=t,Qi=lm(r.firstChild),ea=!1,a=!0)),a||na(t)),ke(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,pp(a,o)?r=null:s!==null&&pp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Jo(e,t,Zo,null,null,n),sh._currentValue=a),Bc(e,t),Ac(e,t,r,n),t.child;case 6:return e===null&&K&&((e=n=Qi)&&(n=im(n,t.pendingProps,ea),n===null?e=!1:(t.stateNode=n,Zi=t,Qi=null,e=!0)),e||na(t)),null;case 13:return Jc(e,t,n);case 4:return De(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ao(t,null,r,n):Ac(e,t,r,n),t.child;case 11:return jc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Bc(e,t),Ac(e,t,r,n),t.child;case 8:return Ac(e,t,t.pendingProps.children,n),t.child;case 12:return Ac(e,t,t.pendingProps.children,n),t.child;case 10:return il(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,va(t),a=ya(a),r=r(a),t.flags|=1,Ac(e,t,r,n),t.child;case 14:return Mc(e,t,t.type,t.pendingProps,n);case 15:return Nc(e,t,t.type,t.pendingProps,n);case 19:return rl(e,t,n);case 31:return zc(e,t,n);case 22:return Pc(e,t,n,t.pendingProps);case 24:return va(t),r=ya(Ta),e===null?(a=Ba(),a===null&&(a=Qu,o=Ea(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},co(t),fa(t,Ta,a)):((e.lanes&n)!==0&&(lo(e,t),_o(t,null,null,n),go()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,fa(t,Ta,r),r!==a.cache&&ha(t,[Ta],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),fa(t,Ta,r))),Ac(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:K&&Ji(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Bc(e,t),Ac(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function ll(e){e.flags|=4}function ul(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Jm(t,r):Jm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Hd())e.flags|=8192;else throw Xa=Ka,Wa}}else e.flags&=-16777217}function dl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ym(t)){if(Hd())e.flags|=8192;else throw Xa=Ka,Wa}}function fl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:pt(),e.lanes|=t,ld|=t)}function pl(e,t){if(!K)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,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;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function ml(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&1206910976,r|=i.flags&1206910976,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 hl(e,t,n){var r=t.pendingProps;switch(Yi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ml(t),null;case 1:return ml(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),pa(Ta),Oe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(aa(t)?ll(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,sa())),ml(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(ll(t),o===null?(ml(t),ul(t,a,null,r,n)):(ml(t),dl(t,o))):o?o===e.memoizedState?(ml(t),t.flags&=-16777217):(ll(t),ml(t),dl(t,o)):(e=e.memoizedProps,e!==r&&ll(t),ml(t),ul(t,a,e,r,n)),null;case 27:if(Ae(t),n=Te.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ll(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return ml(t),t.subtreeFlags&=-33554433,null}e=Ce.current,aa(t)?ra(t,e):(e=hm(a,r,n),t.stateNode=e,ll(t))}return ml(t),t.subtreeFlags&=-33554433,null;case 5:if(Ae(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ll(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return ml(t),t.subtreeFlags&=-33554433,null}if(o=Ce.current,aa(t))ra(t,o);else{var s=lp(Te.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[Tt]=t,o[Et]=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(np(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&&ll(t)}}return ml(t),t.subtreeFlags&=-33554433,ul(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ll(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Te.current,aa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Zi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Tt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||$f(e.nodeValue,n)),e||na(t,!0)}else e=lp(e).createTextNode(r),e[Tt]=t,t.stateNode=e}return ml(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=aa(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[Tt]=t}else oa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ml(t),e=!1}else n=sa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(jo(t),t):(jo(t),null);if(t.flags&128)throw Error(i(558))}return ml(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=aa(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[Tt]=t}else oa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ml(t),a=!1}else a=sa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(jo(t),t):(jo(t),null)}return jo(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),fl(t,t.updateQueue),ml(t),null);case 4:return Oe(),e===null&&Uf(t.stateNode.containerInfo),t.flags|=67108864,ml(t),null;case 10:return pa(t.type),ml(t),null;case 19:if(Po(t),r=t.memoizedState,r===null)return ml(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)pl(r,!1);else{if(id!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Fo(e),o!==null){for(t.flags|=128,pl(r,!1),e=o.updateQueue,t.updateQueue=e,fl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ki(n,e),n=n.sibling;return No(t,Mo.current&1|2),K&&Ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ue()>hd&&(t.flags|=128,a=!0,pl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Fo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,fl(t,e),pl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!K)return ml(t),null}else 2*Ue()-r.renderingStartTime>hd&&n!==536870912&&(t.flags|=128,a=!0,pl(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)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ue(),e.sibling=null,o=Mo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||K?No(t,o):(n=o,Se(To,t),Se(Mo,n),Eo===null&&(Eo=t)),K&&Ki(t,r.treeForkCount),e}return ml(t),null;case 22:case 23:return jo(t),wo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(ml(t),t.subtreeFlags&6&&(t.flags|=8192)):ml(t),n=t.updateQueue,n!==null&&fl(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&&xe(za),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),pa(Ta),ml(t),null;case 25:return null;case 30:return t.flags|=33554432,ml(t),null}throw Error(i(156,t.tag))}function gl(e,t){switch(Yi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pa(Ta),Oe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ae(t),null;case 31:if(t.memoizedState!==null){if(jo(t),t.alternate===null)throw Error(i(340));oa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(jo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));oa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Po(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Oe(),null;case 10:return pa(t.type),null;case 22:case 23:return jo(t),wo(),e!==null&&xe(za),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pa(Ta),null;case 25:return null;default:return null}}function _l(e,t){switch(Yi(t),t.tag){case 3:pa(Ta),Oe();break;case 26:case 27:case 5:Ae(t);break;case 4:Oe();break;case 31:t.memoizedState!==null&&jo(t);break;case 13:jo(t);break;case 19:Po(t);break;case 10:pa(t.type);break;case 22:case 23:jo(t),wo(),e!==null&&xe(za);break;case 24:pa(Ta)}}function vl(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){pf(t,t.return,e)}}function yl(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){pf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){pf(t,t.return,e)}}function bl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{yo(t,n)}catch(t){pf(e,e.return,t)}}}function xl(e,t,n){n.props=vc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){pf(e,t,n)}}function Sl(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:var i=e.stateNode,a=di(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);m(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){pf(e,t,n)}}function Cl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){pf(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){pf(e,t,n)}else n.current=null}}function wl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)em(e.stateNode,t[n])}function Tl(e){for(var t=e.return;t!==null&&(Ol(t)&&em(e.stateNode,t.stateNode),!Dl(t));)t=t.return}function El(e){for(var t=e.return;t!==null&&(Ol(t)&&tm(e.stateNode,t.stateNode),!Dl(t));)t=t.return}function Dl(e){return e.tag===5||e.tag===3||e.tag===27}function Ol(e){return e&&e.tag===7&&e.stateNode!==null}function kl(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){pf(e,e.return,t)}}function Al(e,t,n){try{var r=e.stateNode;ip(r,e.type,n,t),r[Et]=t}catch(t){pf(e,e.return,t)}}function jl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sp(e.type)||e.tag===4}function Ml(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||jl(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&&Sp(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 Nl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=gn)),wl(e,r),R=!0;else if(i!==4&&(i===27&&(wl(e,r),r=null,Sp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Nl(e,t,n,r),e=e.sibling;e!==null;)Nl(e,t,n,r),e=e.sibling}function Pl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),wl(e,r),R=!0;else if(i!==4&&(i===27&&(wl(e,r),r=null,Sp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Pl(e,t,n,r),e=e.sibling;e!==null;)Pl(e,t,n,r),e=e.sibling}function Fl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);np(t,r,n),t[Tt]=e,t[Et]=n}catch(t){pf(e,e.return,t)}}var Il=!1,Ll=null;function Rl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Il=!0)}var zl=null;function Bl(){var e=zl;return zl=null,e}var Vl=0;function Hl(e,t,n,r,i){return Vl=0,Ul(e.child,t,n,r,i)}function Ul(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Op(o);r.push(s),s.view&&(a=!0)}else a||Op(o).view&&(a=!0);Il=!0,Tp(o,Vl===0?t:t+`_`+Vl,n),Vl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Ul(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Wl(e,t){for(;e!==null;)e.tag===5?Ep(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Wl(e.child,t),e=e.sibling}function Gl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Gl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=pi(t.default,t.share),t!==`none`&&(Hl(e,n,t,null,!1)||Wl(e.child,!1))}e=e.sibling}}function Kl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=di(r,n),a=pi(r.default,n.paired?r.share:r.enter);a===`none`?Gl(e):Hl(e,i,a,null,!1)?(Gl(e),n.paired||t||Md(e,r.onEnter)):Wl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Kl(e,t),e=e.sibling;else Gl(e)}function ql(e){if(Ll!==null&&Ll.size!==0){var t=Ll;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=pi(n.default,n.share);if(a!==`none`&&(Hl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Md(e,n.onShare)):Wl(e.child,!1)),t.delete(r),t.size===0)break}}}ql(e)}e=e.sibling}}}function Jl(e){if(e.tag===30){var t=e.memoizedProps,n=di(t,e.stateNode),r=Ll===null?void 0:Ll.get(n),i=pi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Hl(e,n,i,null,!1)?r===void 0?Md(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Ll.delete(n),Md(e,t.onShare)):Wl(e.child,!1)),Ll!==null&&ql(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Jl(e),e=e.sibling;else Ll!==null&&ql(e)}function Yl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=di(t,e.stateNode);t=pi(t.default,t.update),e.flags&=-5,t!==`none`&&Hl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Yl(e);e=e.sibling}}function Xl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Wl(e.child,!1))}Xl(e)}e=e.sibling}}function Zl(e){if(e.tag===30)e.stateNode.paired=null,Wl(e.child,!1),Xl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Zl(e),e=e.sibling;else Xl(e)}function Ql(e){for(e=e.child;e!==null;)e.tag===30?Wl(e.child,!1):e.subtreeFlags&33554432&&Ql(e),e=e.sibling}function $l(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Vl<a.length){var l=a[Vl],u=Op(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Tp(c,Vl===0?n:n+`_`+Vl,i),s&&e.flags&4||(zl===null&&(zl=[]),zl.push(c,Vl===0?r:r+`_`+Vl,t.memoizedProps)),Vl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:$l(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function eu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=di(n,r),a=pi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(kp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Vl=0,i=$l(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Md(e,n.onUpdate))}else e.subtreeFlags&33554432&&eu(e,t);e=e.sibling}}var tu=!1,J=!1,nu=!1,ru=!1,iu=typeof WeakSet==`function`?WeakSet:Set,au=null,ou=!1,su=!1,cu=!1,lu=!1;function uu(e,t,n){if(e=e.containerInfo,sp=gh,e=Hr(e),G(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(cp={focusedElem:e,selectionRange:r},gh=!1,n=(n&335544064)===n,au=t,t=n?9270:1024;au!==null;){if(e=au,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Jl(r[a]);if(e.alternate===null&&e.flags&2)n&&Rl(e),du(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Jl(r),du(n);continue}if(r!==null&&r.memoizedState!==null){n&&Rl(e),du(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,au=r):(n&&Yl(e),du(n))}}Ll=null}function du(e){for(;au!==null;){var t=au,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=vc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){pf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)nm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:nm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=di(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=pi(a.default,a.update),a!==`none`&&Hl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,au=r;break}au=t.return}}function fu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Mu(e,n),r&4&&vl(5,n);break;case 1:if(Mu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){pf(n,n.return,e)}else{var i=vc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){pf(n,n.return,e)}}}r&64&&bl(n),r&512&&Sl(n,n.return);break;case 3:if(Mu(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{yo(e,t)}catch(e){pf(n,n.return,e)}}break;case 27:t===null&&r&4&&Fl(n);case 26:case 5:Mu(e,n),t===null&&r&4&&kl(n),r&512&&Sl(n,n.return);break;case 12:Mu(e,n);break;case 31:Mu(e,n),r&4&&xu(e,n);break;case 13:Mu(e,n),r&4&&Su(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=gf.bind(null,n),cm(e,n))));break;case 22:if(r=n.memoizedState!==null||tu,!r){var a=t!==null&&t.memoizedState!==null||J;t=tu,i=J,tu=r,(J=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Pu(e,n,r)):Mu(e,n),tu=t,J=i}break;case 30:Mu(e,n),r&512&&Sl(n,n.return);break;case 7:r&512&&Sl(n,n.return);default:Mu(e,n)}}function pu(e,t){for(e=e.child;e!==null;)mu(e,t),e=e.sibling}function mu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){pf(e,e.return,t)}hu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,R=!0}catch(t){pf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?wp(s,!0):wp(e.stateNode,!1)}catch(t){pf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&pu(e,t);break;default:pu(e,t)}}function hu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:mu(n,r);break a;case 22:n.memoizedState===null&&hu(n,r);break a;default:hu(n,r)}}e=e.sibling}}function gu(e){var t=e.alternate;t!==null&&(e.alternate=null,gu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Pt(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 _u=null,vu=!1;function yu(e,t,n){for(n=n.child;n!==null;)bu(e,t,n),n=n.sibling}function bu(e,t,n){if($e&&typeof $e.onCommitFiberUnmount==`function`)try{$e.onCommitFiberUnmount(Qe,n)}catch{}switch(n.tag){case 26:J||Cl(n,t),yu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!J&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:J||Cl(n,t),El(n);var r=_u,i=vu;Sp(n.type)&&(_u=n.stateNode,vu=!1),yu(e,t,n),gm(n.stateNode,n.type,n.memoizedProps),_u=r,vu=i;break;case 5:J||Cl(n,t),El(n);case 6:if(n.tag===6&&El(n),r=_u,i=vu,_u=null,yu(e,t,n),_u=r,vu=i,_u!==null){if(vu)try{(_u.nodeType===9?_u.body:_u.nodeName===`HTML`?_u.ownerDocument.body:_u).removeChild(n.stateNode),R=!0}catch(e){pf(n,t,e)}else try{_u.removeChild(n.stateNode),R=!0}catch(e){pf(n,t,e)}}break;case 18:_u!==null&&(vu?(e=_u,Cp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):Cp(_u,n.stateNode));break;case 4:r=_u,i=vu,_u=n.stateNode.containerInfo,vu=!0,yu(e,t,n),_u=r,vu=i;break;case 0:case 11:case 14:case 15:yl(2,n,t),J||yl(4,n,t),yu(e,t,n);break;case 1:J||(Cl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&xl(n,t,r)),yu(e,t,n);break;case 21:yu(e,t,n);break;case 22:J=(r=J)||n.memoizedState!==null,yu(e,t,n),J=r;break;case 30:Cl(n,t),yu(e,t,n);break;case 7:J||Cl(n,t),yu(e,t,n);break;default:yu(e,t,n)}}function xu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){pf(t,t.return,e)}}}function Su(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){pf(t,t.return,e)}}function Cu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new iu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new iu),t;default:throw Error(i(435,e.tag))}}function wu(e,t){var n=Cu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=_f.bind(null,e,t);t.then(r,r)}})}function Tu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Sp(l.type)){_u=l.stateNode,vu=!1;break a}break;case 5:_u=l.stateNode,vu=!1;break a;case 3:case 4:_u=l.stateNode.containerInfo,vu=!0;break a}l=l.return}if(_u===null)throw Error(i(160));bu(s,c,o),_u=null,vu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Du(t,e,n),t=t.sibling}var Eu=null;function Du(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Tu(t,e,n),Ou(e),a&4&&(yl(3,e,e.return),vl(3,e),yl(5,e,e.return));break;case 1:Tu(t,e,n),Ou(e),a&512&&(J||r===null||Cl(r,r.return)),a&64&&tu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Eu,Tu(t,e,n),Ou(e),a&512&&(J||r===null||Cl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(tu)e.stateNode=fp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Mt]||r[Tt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),np(r,t,n),r[Tt]=e,zt(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),np(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Gm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),np(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Tt]=e,zt(r),t=r}e.stateNode=t}}else tu||Km(o,e.type,e.stateNode)}else e.stateNode=Bm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Al(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||J||t.parentNode.removeChild(t)):a.count--,n===null?tu||Km(o,e.type,e.stateNode):Bm(o,n,e.memoizedProps))}break;case 27:Tu(t,e,n),Ou(e),a&512&&(J||r===null||Cl(r,r.return)),r!==null&&a&4&&Al(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=nu,nu=!1,Tu(t,e,n),nu=o,Ou(e),a&512&&(J||r===null||Cl(r,r.return)),e.flags&32){t=e.stateNode;try{cn(t,``),R=!0}catch(t){pf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Al(e,t,r===null?t:r.memoizedProps)),a&1024&&(ru=!0);break;case 6:if(Tu(t,e,n),Ou(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,R=!0}catch(t){pf(e,e.return,t)}}break;case 3:if(R=!1,Wm=null,o=Eu,Eu=bm(t.containerInfo),Tu(t,e,n),Eu=o,Ou(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){pf(e,e.return,t)}ru&&(ru=!1,ku(e)),R=!1;break;case 4:a=nu,nu=tu,r=qt(),o=Eu,Eu=bm(e.stateNode.containerInfo),Tu(t,e,n),Ou(e),Eu=o,R&&su&&(cu=!0),R=r,nu=a;break;case 12:Tu(t,e,n),Ou(e);break;case 31:Tu(t,e,n),Ou(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,wu(e,t)));break;case 13:Tu(t,e,n),Ou(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(pd=Ue()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,wu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=tu,l=J,u=nu;tu=c||o,nu=u||o,J=l||s,Tu(t,e,n),J=l,nu=u,tu=c,Ou(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||tu||J||(t=s||J,n=tu,r=J,tu=o||tu,J=t,Nu(e,2),tu=n,J=r),!o&&nu||pu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,wu(e,n))));break;case 19:Tu(t,e,n),Ou(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,wu(e,t)));break;case 30:a&512&&(J||r===null||Cl(r,r.return)),a=qt(),o=su,s=(n&335544064)===n,c=e.memoizedProps,su=s&&pi(c.default,c.update)!==`none`,Tu(t,e,n),Ou(e),s&&r!==null&&R&&(e.flags|=4),su=o,R=a;break;case 21:break;case 7:a&512&&(J||r===null||Cl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Tu(t,e,n),Ou(e)}}function Ou(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(jl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Ol(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Dl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Pl(e,Ml(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(cn(l,``),n.flags&=-33),Pl(e,Ml(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Nl(e,Ml(e),u,s);break;default:throw Error(i(161))}}catch(t){pf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ku(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ku(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gh=!0,t.reset(),gh=!1),e=e.sibling}}function Au(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)ju(t,e),t=t.sibling;else eu(t,!1)}function ju(e,t){var n=e.alternate;if(n===null)Kl(e,!1);else switch(e.tag){case 3:if(lu=ou=!1,Bl(),Au(t,e),!ou&&!cu){if(e=zl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ep(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),lu=!0}zl=null;break;case 5:Au(t,e);break;case 4:r=ou,ou=!1,Au(t,e),ou&&(cu=!0),ou=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Au(t,e):Kl(e,!1));break;case 30:r=ou,i=Bl(),ou=!1,Au(t,e),ou&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=di(a,o),o=di(n.memoizedProps,o);var s=pi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Vl=0,t=$l(e,n,t,o,s,a,!0),Vl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Md(e,e.memoizedProps.onUpdate),zl=i):i!==null&&(i.push.apply(i,zl),zl=i),ou=e.flags&32?!0:r;break;default:Au(t,e)}}function Mu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fu(e,t.alternate,t),t=t.sibling}function Nu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:yl(4,n,n.return),Nu(n,r);break;case 1:Cl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&xl(n,n.return,i),Nu(n,r);break;case 27:r&2&&gm(n.stateNode,n.type,n.memoizedProps);case 5:Cl(n,n.return),n.tag!==5&&n.tag!==27||El(n),Nu(n,r);break;case 6:El(n);break;case 26:Cl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||J||i.parentNode.removeChild(i),Nu(n,r);break;case 22:n.memoizedState===null&&Nu(n,r);break;case 30:Cl(n,n.return),Nu(n,r);break;case 7:Cl(n,n.return);default:Nu(n,r)}e=e.sibling}}function Pu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Pu(i,a,n),vl(4,a);break;case 1:if(Pu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){pf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)vo(l[i],c)}catch(e){pf(r,r.return,e)}}s&&o&64&&bl(a),Sl(a,a.return);break;case 27:n&2&&Fl(a);case 5:a.tag!==5&&a.tag!==27||Tl(a),Pu(i,a,n),s&&r===null&&o&4&&kl(a),Sl(a,a.return);break;case 6:Tl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||tu||Km(bm(c.ownerDocument),a.type,c),Pu(i,a,n),s&&r===null&&o&4&&kl(a),Sl(a,a.return);break;case 12:Pu(i,a,n);break;case 31:Pu(i,a,n),s&&o&4&&xu(i,a);break;case 13:Pu(i,a,n),s&&o&4&&Su(i,a);break;case 22:a.memoizedState===null&&Pu(i,a,n),Sl(a,a.return);break;case 30:Pu(i,a,n),Sl(a,a.return);break;case 7:Sl(a,a.return);default:Pu(i,a,n)}t=t.sibling}}function Fu(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&&Da(n))}function Iu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Da(e))}function Lu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Ru(e,t,n,r),t=t.sibling;else i&&Ql(t)}function Ru(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Zl(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Lu(e,t,n,r),a&2048&&vl(9,t);break;case 1:Lu(e,t,n,r);break;case 3:Lu(e,t,n,r),i&&lu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Da(a)));break;case 12:if(a&2048){Lu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){pf(t,t.return,e)}}else Lu(e,t,n,r);break;case 31:Lu(e,t,n,r);break;case 13:Lu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Zl(t),o._visibility&2?Lu(e,t,n,r):(o._visibility|=2,zu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Zl(s),o._visibility&2?Lu(e,t,n,r):Bu(e,t)),a&2048&&Fu(s,t);break;case 24:Lu(e,t,n,r),a&2048&&Iu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Wl(a.child,!0),Wl(t.child,!0))),Lu(e,t,n,r);break;default:Lu(e,t,n,r)}}function zu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!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:zu(a,o,s,c,i),vl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,zu(a,o,s,c,i)):u._visibility&2?zu(a,o,s,c,i):Bu(a,o),i&&l&2048&&Fu(o.alternate,o);break;case 24:zu(a,o,s,c,i),i&&l&2048&&Iu(o.alternate,o);break;default:zu(a,o,s,c,i)}t=t.sibling}}function Bu(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:Bu(n,r),i&2048&&Fu(r.alternate,r);break;case 24:Bu(n,r),i&2048&&Iu(r.alternate,r);break;default:Bu(n,r)}t=t.sibling}}var Vu=8192;function Hu(e,t,n){if(e.subtreeFlags&Vu)for(e=e.child;e!==null;)Uu(e,t,n),e=e.sibling}function Uu(e,t,n){switch(e.tag){case 26:Hu(e,t,n),e.flags&Vu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Zm(n,e)):Qm(n,Eu,e.memoizedState,e.memoizedProps));break;case 5:Hu(e,t,n),e.flags&Vu&&(e=e.stateNode,(t&335544128)===t&&Zm(n,e));break;case 3:case 4:var r=Eu;Eu=bm(e.stateNode.containerInfo),Hu(e,t,n),Eu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Vu,Vu=16777216,Hu(e,t,n),Vu=r):Hu(e,t,n));break;case 30:if((e.flags&Vu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Ll===null&&(Ll=new Map),Ll.set(r,i)}Hu(e,t,n);break;default:Hu(e,t,n)}}function Wu(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 Gu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];au=r,Ju(r,e)}Wu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ku(e),e=e.sibling}function Ku(e){switch(e.tag){case 0:case 11:case 15:Gu(e),e.flags&2048&&yl(9,e,e.return);break;case 3:Gu(e);break;case 12:Gu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qu(e)):Gu(e);break;default:Gu(e)}}function qu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];au=r,Ju(r,e)}Wu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:yl(8,t,t.return),qu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,qu(t));break;default:qu(t)}e=e.sibling}}function Ju(e,t){for(;au!==null;){var n=au;switch(n.tag){case 0:case 11:case 15:yl(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:Da(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,au=r;else a:for(n=e;au!==null;){r=au;var i=r.sibling,a=r.return;if(gu(r),r===n){au=null;break a}if(i!==null){i.return=a,au=i;break a}au=a}}}var Yu={getCacheForType:function(e){var t=ya(Ta),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ya(Ta).controller.signal}},Xu=typeof WeakMap==`function`?WeakMap:Map,Zu=0,Qu=null,Y=null,X=0,Z=0,$u=null,ed=!1,td=!1,nd=!1,rd=0,id=0,ad=0,od=0,sd=0,cd=0,ld=0,ud=null,dd=null,fd=!1,pd=0,md=0,hd=1/0,gd=null,_d=null,vd=0,yd=null,bd=null,xd=0,Sd=0,Cd=null,wd=null,Td=null,Ed=null,Dd=null,Od=0,kd=null;function Ad(){return Zu&2&&X!==0?X&-X:P.T===null?St():Nf()}function jd(){if(cd===0){if(!(X&536870912)||K){var e=ot;ot<<=1,!(ot&3932160)&&(ot=262144),cd=e}else cd=536870912}return e=To.current,e!==null&&(e.flags|=32),cd}function Md(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Pp(di(e.memoizedProps,n))),Ed===null&&(Ed=[]),Ed.push(t.bind(null,r))}}function Nd(e,t,n){(e===Qu&&(Z===2||Z===9)||e.cancelPendingCommit!==null)&&(Bd(e,0),Ld(e,X,cd,!1)),ht(e,n),Zu&2&&e===Qu||(e===Qu&&(!(Zu&2)&&(od|=n),id===4&&Ld(e,X,cd,!1)),Tf(e))}function Pd(e,t,n){if(Zu&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ut(e,t),a=r?Jd(e,t):Kd(e,t,!0),o=r;do{if(a===0){td&&!r&&Ld(e,t,0,!1);break}if(n=e.current.alternate,o&&!Id(n))a=Kd(e,t,!1),o=!1;else{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=ud;var l=c.current.memoizedState.isDehydrated;if(l&&(Bd(c,s).flags|=256),s=Kd(c,s,!1),s!==2&&s!==6){if(nd&&!l){c.errorRecoveryDisabledLanes|=o,od|=o,a=4;break a}o=dd,dd=a,o!==null&&(dd===null?dd=o:dd.push.apply(dd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Bd(e,0),Ld(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&&(t&62914560)!==t)break;case 6:Ld(r,t,cd,!ed);break a;case 2:dd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=pd+300-Ue(),10<a)){if(Ld(r,t,cd,!ed),lt(r,0,!0)!==0)break a;xd=t,r.timeoutHandle=gp(Fd.bind(null,r,n,dd,gd,fd,t,cd,od,ld,ed,o,`Throttled`,-0,0),a);break a}Fd(r,n,dd,gd,fd,t,cd,od,ld,ed,o,null,-0,0)}break}}while(1);Tf(e)}function Fd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:gn},Ll=null,Uu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=nh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?pd-Ue():(a&4194048)===a?md-Ue():0,m=eh(d,m),m!==null)?(xd=a,e.cancelPendingCommit=m(tf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Ld(e,a,o,!l)):tf(e,t,a,n,r,i,o,s,c,l,u,d)}function Id(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(!H(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 Ld(e,t,n,r){t=dt(e,t),t&=~sd,t&=~od,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-tt(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&_t(e,n,t)}function Rd(){return Zu&6?!0:(Ef(0,!1),!1)}function zd(){if(Y!==null){if(Z===0)var e=Y.return;else e=Y,da=ua=null,es(e),$a=null,eo=0,e=Y;for(;e!==null;)_l(e.alternate,e),e=e.return;Y=null}}function Bd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,_p(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),xd=0,zd(),Qu=e,Y=n=Oi(e.current,null),X=t,Z=0,$u=null,ed=!1,td=ut(e,t),nd=!1,ld=cd=sd=od=ad=id=0,dd=ud=null,fd=!1,rd=dt(e,t),vi(),n}function Vd(e,t){q=null,P.H=uc,t===Ua||t===Ga?(t=Za(),Z=3):t===Wa?(t=Za(),Z=4):Z=t===Oc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,$u=t,Y===null&&(id=1,Sc(e,Ii(t,e.current)))}function Hd(){var e=To.current;return e===null?!0:(X&4194048)===X?Eo===null:(X&62914560)===X||X&536870912?e===Eo:!1}function Ud(){var e=P.H;return P.H=uc,e===null?uc:e}function Wd(){var e=P.A;return P.A=Yu,e}function Gd(){id=4,ed||(X&4194048)!==X&&To.current!==null||(td=!0),!(ad&134217727)&&!(od&134217727)||Qu===null||Ld(Qu,X,cd,!1)}function Kd(e,t,n){var r=Zu;Zu|=2;var i=Ud(),a=Wd();(Qu!==e||X!==t)&&(gd=null,Bd(e,t)),t=!1;var o=id;a:do try{if(Z!==0&&Y!==null){var s=Y,c=$u;switch(Z){case 8:zd(),o=6;break a;case 3:case 2:case 9:case 6:To.current===null&&(t=!0);var l=Z;if(Z=0,$u=null,Qd(e,s,c,l),n&&td){o=0;break a}break;default:l=Z,Z=0,$u=null,Qd(e,s,c,l)}}qd(),o=id;break}catch(t){Vd(e,t)}while(1);return t&&e.shellSuspendCounter++,da=ua=null,Zu=r,P.H=i,P.A=a,Y===null&&(Qu=null,X=0,vi()),o}function qd(){for(;Y!==null;)Xd(Y)}function Jd(e,t){var n=Zu;Zu|=2;var r=Ud(),a=Wd();Qu!==e||X!==t?(gd=null,hd=Ue()+500,Bd(e,t)):td=ut(e,t);a:do try{if(Z!==0&&Y!==null){t=Y;var o=$u;b:switch(Z){case 1:Z=0,$u=null,Qd(e,t,o,1);break;case 2:case 9:if(qa(o)){Z=0,$u=null,Zd(t);break}t=function(){Z!==2&&Z!==9||Qu!==e||(Z=7),Tf(e)},o.then(t,t);break a;case 3:Z=7;break a;case 4:Z=5;break a;case 7:qa(o)?(Z=0,$u=null,Zd(t)):(Z=0,$u=null,Qd(e,t,o,7));break;case 5:var s=null;switch(Y.tag){case 26:s=Y.memoizedState;case 5:case 27:var c=Y;if(s?Ym(s):c.stateNode.complete){Z=0,$u=null;var l=c.sibling;if(l!==null)Y=l;else{var u=c.return;u===null?Y=null:(Y=u,$d(u))}break b}}Z=0,$u=null,Qd(e,t,o,5);break;case 6:Z=0,$u=null,Qd(e,t,o,6);break;case 8:zd(),id=6;break a;default:throw Error(i(462))}}Yd();break}catch(t){Vd(e,t)}while(1);return da=ua=null,P.H=r,P.A=a,Zu=n,Y===null?(Qu=null,X=0,vi(),id):0}function Yd(){for(;Y!==null&&!Ve();)Xd(Y)}function Xd(e){var t=cl(e.alternate,e,rd);e.memoizedProps=e.pendingProps,t===null?$d(e):Y=t}function Zd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Hc(n,t,t.pendingProps,t.type,void 0,X);break;case 11:t=Hc(n,t,t.pendingProps,t.type.render,t.ref,X);break;case 5:es(t);var r=t;r===Zi&&(K?(ia(r),r.tag===5&&r.stateNode!=null&&(Qi=r.stateNode)):(ia(r),K=!0));default:_l(n,t),t=Y=ki(t,rd),t=cl(n,t,rd)}e.memoizedProps=e.pendingProps,t===null?$d(e):Y=t}function Qd(e,t,n,r){da=ua=null,es(t),$a=null,eo=0;var i=t.return;try{if(Dc(e,i,t,n,X)){id=1,Sc(e,Ii(n,e.current)),Y=null;return}}catch(t){if(i!==null)throw Y=i,t;id=1,Sc(e,Ii(n,e.current)),Y=null;return}t.flags&32768?(K||r===1?e=!0:td||X&536870912?e=!1:(ed=e=!0,(r===2||r===9||r===3||r===6)&&(r=To.current,r!==null&&r.tag===13&&(r.flags|=16384))),ef(t,e)):$d(t)}function $d(e){var t=e;do{if(t.flags&32768){ef(t,ed);return}e=t.return;var n=hl(t.alternate,t,rd);if(n!==null){Y=n;return}if(t=t.sibling,t!==null){Y=t;return}Y=t=e}while(t!==null);id===0&&(id=5)}function ef(e,t){do{var n=gl(e.alternate,e);if(n!==null){n.flags&=32767,Y=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Y=e;return}Y=e=n}while(e!==null);id=6,Y=null}function tf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do uf();while(vd!==0);if(Zu&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Qu&&(Y=Qu=null,X=0),bd=t,yd=e,xd=n,Cd=a,wd=r,nf(e,t,n,s,c,l,f)}}function nf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Sd=s,s|=_i,gt(e,n,s,r,i,a),Ed=null,(n&335544064)===n?(Dd=Aa(e),r=10262):(Dd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,vf(qe,function(){return df(),null})):(e.callbackNode=null,e.callbackPriority=0),Il=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=P.T,P.T=null,i=F.p,F.p=2,a=Zu,Zu|=4;try{uu(e,t,n)}finally{Zu=a,F.p=i,P.T=r}}vd=1,Il?Td=Mp(o,e.containerInfo,Dd,of,sf,af,cf,df,rf,null,null):(of(),sf(),cf())}function rf(e){if(vd!==0){var t=yd.onRecoverableError;t(e,{componentStack:null})}}function af(){vd===3&&(vd=0,ju(bd,yd),vd=4)}function of(){if(vd===1){vd=0;var e=yd,t=bd,n=xd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=P.T,P.T=null;var i=F.p;F.p=2;var a=Zu;Zu|=4;try{su=cu=!1,Du(t,e,n),n=cp;var o=Hr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Vr(s.ownerDocument.documentElement,s)){if(c!==null&&G(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 _=Br(s,h),v=Br(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}}gh=!!sp,cp=sp=null}finally{Zu=a,F.p=i,P.T=r}}e.current=t,vd=2}}function sf(){if(vd===2){vd=0;var e=yd,t=bd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Zu;Zu|=4;try{fu(e,t.alternate,t)}finally{Zu=i,F.p=r,P.T=n}}vd=3}}function cf(){if(vd===4||vd===3){vd=0;var e=Td;Td=null,He();var t=yd,n=bd,r=xd,i=wd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?vd=5:(vd=0,bd=yd=null,lf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(_d=null),xt(r),n=n.stateNode,$e&&typeof $e.onCommitFiberRoot==`function`)try{$e.onCommitFiberRoot(Qe,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=P.T,a=F.p,F.p=2,P.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{P.T=n,F.p=a}}if(i=Ed,o=Dd,Dd=null,i!==null&&(Ed=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);xd&3&&uf(),Tf(t),a=t.pendingLanes,r&261930&&a&42?t===kd?Od++:(Od=0,kd=t):(Od=0,kd=null),Ef(0,!1)}}function lf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Da(t)))}function uf(){return Td!==null&&(Td.skipTransition(),Td=null),of(),sf(),cf(),df()}function df(){if(vd!==5)return!1;var e=yd,t=Sd;Sd=0;var n=xt(xd),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=Cd,Cd=null;var o=yd,s=xd;if(vd=0,bd=yd=null,xd=0,Zu&6)throw Error(i(331));var c=Zu;if(Zu|=4,Ku(o.current),Ru(o,o.current,s,n),Zu=c,Ef(0,!1),$e&&typeof $e.onPostCommitFiberRoot==`function`)try{$e.onPostCommitFiberRoot(Qe,o)}catch{}return!0}finally{F.p=a,P.T=r,lf(e,t)}}function ff(e,t,n){t=Ii(n,t),t=wc(e.stateNode,t,2),e=fo(e,t,2),e!==null&&(ht(e,2),Tf(e))}function pf(e,t,n){if(e.tag===3)ff(e,e,n);else for(;t!==null;){if(t.tag===3){ff(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(_d===null||!_d.has(r))){e=Ii(n,e),n=Tc(2),r=fo(t,n,2),r!==null&&(Ec(n,r,t,e),ht(r,2),Tf(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Xu;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)||(nd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Qu===e&&(X&n)===n&&(id===4||id===3&&(X&62914560)===X&&300>Ue()-pd?Zu&2?sd|=n:Bd(e,0):sd|=n,ld===X&&(ld=0)),Tf(e)}function Q(e,t){t===0&&(t=pt()),e=xi(e,t),e!==null&&(ht(e,t),Tf(e))}function gf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Q(e,n)}function _f(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),Q(e,n)}function vf(e,t){return ze(e,t)}var yf=null,bf=null,xf=!1,Sf=!1,Cf=!1,wf=0;function Tf(e){e!==bf&&e.next===null&&(bf===null?yf=bf=e:bf=bf.next=e),Sf=!0,xf||(xf=!0,Mf())}function Ef(e,t){if(!Cf&&Sf){Cf=!0;do for(var n=!1,r=yf;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-tt(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,jf(r,a))}else a=X,a=lt(r,r===Qu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ut(r,a)||(n=!0,jf(r,a))}r=r.next}while(n);Cf=!1}}function Df(){Of()}function Of(){Sf=xf=!1;var e=0;wf!==0&&hp()&&(e=wf);for(var t=Ue(),n=null,r=yf;r!==null;){var i=r.next,a=kf(r,t);a===0?(r.next=null,n===null?yf=i:n.next=i,i===null&&(bf=n)):(n=r,(e!==0||a&3)&&(Sf=!0)),r=i}vd!==0&&vd!==5||Ef(e,!1),wf!==0&&(wf=0)}function kf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-tt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ft(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Qu,n=X,n=lt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Z===2||Z===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Be(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ut(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Be(r),xt(n)){case 2:case 8:n=Ke;break;case 32:n=qe;break;case 268435456:n=Ye;break;default:n=qe}return r=Af.bind(null,e),n=ze(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Be(r),e.callbackPriority=2,e.callbackNode=null,2}function Af(e,t){if(vd!==0&&vd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(uf()&&e.callbackNode!==n)return null;var r=X;return r=lt(e,e===Qu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Pd(e,r,t),kf(e,Ue()),e.callbackNode!=null&&e.callbackNode===n?Af.bind(null,e):null)}function jf(e,t){if(uf())return null;Pd(e,t,!0)}function Mf(){bp(function(){Zu&6?ze(Ge,Df):Of()})}function Nf(){if(wf===0){var e=Na;e===0&&(e=at,at<<=1,!(at&261888)&&(at=256)),wf=e}return wf}function Pf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:hn(e)}function Ff(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Pf((i[Et]||null).action),o=r.submitter;o&&(t=(t=o[Et]||null)?Pf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Ln(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(wf!==0){var e=new FormData(i,o);Xs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Xs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var If=0;If<ci.length;If++){var Lf=ci[If];li(Lf.toLowerCase(),`on`+(Lf[0].toUpperCase()+Lf.slice(1)))}li(ei,`onAnimationEnd`),li(ti,`onAnimationIteration`),li(ni,`onAnimationStart`),li(`dblclick`,`onDoubleClick`),li(`focusin`,`onFocus`),li(`focusout`,`onBlur`),li(ri,`onTransitionRun`),li(ii,`onTransitionStart`),li(ai,`onTransitionCancel`),li(oi,`onTransitionEnd`),Ut(`onMouseEnter`,[`mouseout`,`mouseover`]),Ut(`onMouseLeave`,[`mouseout`,`mouseover`]),Ut(`onPointerEnter`,[`pointerout`,`pointerover`]),Ut(`onPointerLeave`,[`pointerout`,`pointerover`]),I(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),I(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),I(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),I(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),I(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),I(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Rf=`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(` `),zf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Rf));function Bf(e,t){t=!!(t&4);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){mi(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){mi(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[Ot];n===void 0&&(n=t[Ot]=new Set);var r=e+`__bubble`;n.has(r)||(Wf(t,e,2,!1),n.add(r))}function Vf(e,t,n){var r=0;t&&(r|=4),Wf(n,e,r,t)}var Hf=`_reactListening`+Math.random().toString(36).slice(2);function Uf(e){if(!e[Hf]){e[Hf]=!0,Vt.forEach(function(t){t!==`selectionchange`&&(zf.has(t)||Vf(t,!1,e),Vf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Hf]||(t[Hf]=!0,Vf(`selectionchange`,!1,t))}}function Wf(e,t,n,r){switch(Ch(t)){case 2:var i=_h;break;case 8:i=vh;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!En||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 Gf(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=Ft(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=vn(n),s=[];a:{var c=si.get(e);if(c!==void 0){var l=Ln,u=e;switch(e){case`keypress`:if(Mn(n)===0)break a;case`keydown`:case`keyup`:l=tr;break;case`focusin`:u=`focus`,l=Kn;break;case`focusout`:u=`blur`,l=Kn;break;case`beforeblur`:case`afterblur`:l=Kn;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=Wn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Gn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=ir;break;case ei:case ti:case ni:l=qn;break;case oi:l=ar;break;case`scroll`:case`scrollend`:l=zn;break;case`wheel`:l=or;break;case`copy`:case`cut`:case`paste`:l=Jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=nr;break;case`submit`:l=rr;break;case`toggle`:case`beforetoggle`:l=sr}var d=!!(t&4),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=wn(m,p),g!=null&&d.push(Kf(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(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==_n&&(u=n.relatedTarget||n.fromElement)&&(Ft(u)||u[Dt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ft(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Wn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=nr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Lt(c),h=l==null?u:Lt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Ft(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Jf):null,c!==null&&Yf(s,u,c,d,!1),l!==null&&f!==null&&Yf(s,f,l,d,!0)))}a:{if(c=r?Lt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Dr;else if(xr(c)){if(Or)_=Lr;else{_=Fr;var v=Pr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&fn(r.elementType)&&(_=Dr):_=Ir;if(_&&=_(e,r)){Sr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Lt(r):window,e){case`focusin`:(xr(v)||v.contentEditable===`true`)&&(Wr=v,Gr=r,Kr=null);break;case`focusout`:Kr=Gr=Wr=null;break;case`mousedown`:qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:qr=!1,Jr(s,n,i);break;case`selectionchange`:if(Ur)break;case`keydown`:case`keyup`:Jr(s,n,i)}var y;if(lr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else _r?hr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(fr&&n.locale!==`ko`&&(_r||b!==`onCompositionStart`?b===`onCompositionEnd`&&_r&&(y=jn()):(On=i,kn=`value`in On?On.value:On.textContent,_r=!0)),v=qf(r,b),0<v.length&&(b=new Yn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=gr(n),y!==null&&(b.data=y)))),(y=dr?vr(e,n):yr(e,n))&&(b=qf(r,`onBeforeInput`),0<b.length&&(v=new Yn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Ff(s,e,r,n,i)}Bf(s,t)})}function Kf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qf(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=wn(e,n),i!=null&&r.unshift(Kf(e,i,a)),i=wn(e,t),i!=null&&r.push(Kf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Jf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Yf(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=wn(n,a),l!=null&&o.unshift(Kf(n,l,c))):i||(l=wn(n,a),l!=null&&o.push(Kf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Xf=/\r\n?/g,Zf=/\u0000|\uFFFD/g;function Qf(e){return(typeof e==`string`?e:``+e).replace(Xf,`
10
+ `).replace(Zf,``)}function $f(e,t){return t=Qf(t),Qf(e)===t}function ep(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&cn(e,``+r);else return;break;case`className`:Yt(e,`class`,r);break;case`tabIndex`:Yt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Yt(e,n,r);break;case`style`:dn(e,r,o);return;case`data`:if(t!==`object`){Yt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=hn(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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&ep(e,t,`name`,a.name,a,null),ep(e,t,`formEncType`,a.formEncType,a,null),ep(e,t,`formMethod`,a.formMethod,a,null),ep(e,t,`formTarget`,a.formTarget,a,null)):(ep(e,t,`encType`,a.encType,a,null),ep(e,t,`method`,a.method,a,null),ep(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=hn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=gn);return;case`onScroll`:r!=null&&$(`scroll`,e);return;case`onScrollEnd`:r!=null&&$(`scrollend`,e);return;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));o?.__html!==n&&(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=hn(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`credentialless`: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`:$(`beforetoggle`,e),$(`toggle`,e),Jt(e,`popover`,r);break;case`xlinkActuate`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Jt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=pn.get(n)||n,Jt(e,n,r);else return}R=!0}function tp(e,t,n,r,a,o){switch(n){case`style`:dn(e,r,o);return;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));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)cn(e,``+r);else return;break;case`onScroll`:r!=null&&$(`scroll`,e);return;case`onScrollEnd`:r!=null&&$(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=gn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Ht.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[Et]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}R=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Jt(e,n,r)}return}R=!0}function np(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`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:ep(e,t,o,s,n,null)}}a&&ep(e,t,`srcSet`,n.srcSet,n,null),r&&ep(e,t,`src`,n.src,n,null);return;case`input`:$(`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:ep(e,t,r,d,n,null)}}nn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`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:ep(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&an(e,!!r,n,!0):an(e,!!r,t,!1);return;case`textarea`:for(s in $(`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:ep(e,t,s,c,n,null)}sn(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:ep(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<Rf.length;r++)$(Rf[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`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:ep(e,t,u,r,n,null)}return;default:if(fn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&tp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ep(e,t,c,r,n,null))}var rp={};function ip(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)||ep(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`:m!==f&&(R=!0),o=m;break;case`name`:m!==f&&(R=!0),a=m;break;case`checked`:m!==f&&(R=!0),u=m;break;case`defaultChecked`:m!==f&&(R=!0),d=m;break;case`value`:m!==f&&(R=!0),s=m;break;case`defaultValue`:m!==f&&(R=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&ep(e,t,p,m,r,f)}}tn(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)||ep(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`:o!==l&&(R=!0),p=o;break;case`defaultValue`:o!==l&&(R=!0),c=o;break;case`multiple`:o!==l&&(R=!0),s=o;default:o!==l&&ep(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?an(e,!!n,n?[]:``,!1):an(e,!!n,t,!0)):an(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:ep(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`:a!==o&&(R=!0),p=a;break;case`defaultValue`:a!==o&&(R=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ep(e,t,s,a,r,o)}on(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:ep(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`:p!==m&&(R=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ep(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)&&ep(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:ep(e,t,u,p,r,m)}return;default:if(fn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&tp(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||tp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ep(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||ep(e,t,f,p,r,m)}function ap(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function op(){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&&ap(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&&ap(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 sp=null,cp=null;function lp(e){return e.nodeType===9?e:e.ownerDocument}function up(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 dp(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 fp(e,t,n,r){return n=lp(n).createElement(e),n[Tt]=r,n[Et]=t,np(n,e,t),zt(n),n}function pp(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 mp=null;function hp(){var e=window.event;return e&&e.type===`popstate`?e!==mp&&(mp=e,!0):(mp=null,!1)}var gp=typeof setTimeout==`function`?setTimeout:void 0,_p=typeof clearTimeout==`function`?clearTimeout:void 0,vp=typeof Promise==`function`?Promise:void 0,yp=typeof requestAnimationFrame==`function`?requestAnimationFrame:gp,bp=typeof queueMicrotask==`function`?queueMicrotask:vp===void 0?gp:function(e){return vp.resolve(null).then(e).catch(xp)};function xp(e){setTimeout(function(){throw e})}function Sp(e){return e===`head`}function Cp(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),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)_m(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,_m(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&_m(e.ownerDocument.body)}n=i}while(n);Hh(t)}function wp(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 Tp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ep(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Dp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Op(e){return Dp(e.getBoundingClientRect(),getComputedStyle(e),e)}function kp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Dp(t,n,e)}function Ap(e){return e.documentElement.clientHeight}function jp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Mp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Ap(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Xm(f),u>$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Np(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Np.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Np.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Np.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Pp(e){return{name:e,group:new Np(`group`,e),imagePair:new Np(`image-pair`,e),old:new Np(`old`,e),new:new Np(`new`,e)}}function Fp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Fp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Bp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Rp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,Ip,e,s,r)}this._eventListeners=a}};function Ip(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Fp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Bp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Rp(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,Lp,e,n,i),r.splice(t,1),a!==null&&a()}};function Lp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Rp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function zp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Bp(e,t,n,r){if(e.length===0)return-1;r=zp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&zp(a.optionsOrUseCapture)===r)return i}return-1}Fp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Fp.prototype.focus=function(e){m(this._fragmentFiber.child,!0,Vp,e,void 0,void 0)};function Vp(e,t){return e.tag!==6&&(e=b(e),pm(e,t))}Fp.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,Hp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Vp(t[n],e);n--);};function Hp(e,t){return t.push(e),!1}Fp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=lp(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,Up,e,void 0,void 0))};function Up(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Fp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Fp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,Gp,e,void 0,void 0);for(var n=t=0;n<Kp.length;n++){var r=Kp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Kp[t++]=r}Kp.length=t}};function Gp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Kp=[],qp=!1;function Jp(e,t,n){Kp.push({fragmentInstance:e,observer:t,instance:n}),qp||(qp=!0,mm(function(){qp=!1;var e=Kp;Kp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Fp.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,Yp,e,void 0,void 0),e};function Yp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Fp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Fp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,Hp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Xp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Xp(e,t,n,r,i){var a=Ft(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function Zp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Fp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,Hp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),Zp(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),Zp(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function Qp(e,t){return e=b(e),$p(e,t),!1}function $p(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function em(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Kp.length;i++){var a=Kp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Kp[r++]=a)}Kp.length=r,n.observe(e)}),$p(e,t))}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Jp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function nm(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`:nm(n),Pt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rm(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[Mt])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=lm(e.nextSibling),e===null)break}return null}function im(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lm(e.nextSibling),e===null))return null;return e}function am(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lm(e.nextSibling),e===null))return null;return e}function om(e){return e.data===`$?`||e.data===`$~`}function sm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cm(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 lm(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 um=null;function dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function fm(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 pm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function mm(e){yp(function(){yp(function(t){return e(t)})})}function hm(e,t,n){switch(t=lp(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 gm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ep(e,t,r,null,rp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===gn&&(e.onclick=null),Pt(e)}function _m(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Pt(e)}var vm=new Map,ym=new Set;function bm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var xm=F.d;F.d={f:Sm,r:Cm,D:Em,C:Dm,L:Om,m:km,X:jm,S:Am,M:Mm};function Sm(){var e=xm.f(),t=Rd();return e||t}function Cm(e){var t=It(e);t!==null&&t.tag===5&&t.type===`form`?Qs(t):xm.r(e)}var wm=typeof document>`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=V(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),zt(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+V(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+V(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+V(n.imageSizes)+`"]`)):i+=`[href="`+V(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[Nt]=!0,o.onload=o.onerror=function(){Bt(o)}),zt(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+V(r)+`"][href="`+V(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),zt(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Rt(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);zt(c),np(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,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Rt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),zt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Rt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),zt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=Te.current)?bm(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`?(n=Pm(n.href),t=Rt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,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=Pm(n.href);var o=Rt(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(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(a,e,o,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`?(n=Rm(n),t=Rt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+V(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Nt]){r.loading=1;return}}else t=e.createElement(`link`),t[Nt]=!0,t.onload=t.onerror=Bt.bind(null,t),np(t,`link`,n),zt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+V(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+V(n.href)+`"]`);if(r)return t.instance=r,zt(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),zt(r),np(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,zt(o),o;r=Im(n),(a=vm.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),zt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,zt(a),a):(r=n,(a=vm.get(o))&&(r=D({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),zt(a),np(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,Vm(r,n.precedence,e));return t.instance}function Vm(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 Hm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wm=null;function Gm(e,t,n){if(Wm===null){var r=new Map,i=Wm=new Map;i.set(n,r)}else i=Wm,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[Mt]||a[Tt]||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 Km(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qm(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 Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(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=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,zt(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),zt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(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=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$m===0&&($m=62500*op());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.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=nh.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 sh={$$typeof:M,Provider:null,Consumer:null,_currentValue:_e,_currentValue2:_e,_threadCount:0};function ch(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=mt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.hiddenUpdates=mt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ei(3,null,null,t),e.current=a,a.stateNode=e,t=Ea(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},co(a),e}function uh(e){return e?(e=wi,e):wi}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=uo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=fo(e,r,t),n!==null&&(Nd(n,e,t),po(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=xi(e,67108864);t!==null&&Nd(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=Ad();t=bt(t);var n=xi(e,t);n!==null&&Nd(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,yh(e,t,n,r)}finally{F.p=a,P.T=i}}function vh(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,yh(e,t,n,r)}finally{F.p=a,P.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Gf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=It(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ct(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-tt(o);s.entanglements[1]|=c,o&=~c}Tf(a),!(Zu&6)&&(hd=Ue()+500,Ef(0,!1))}}break;case 31:case 13:s=xi(a,2),s!==null&&Nd(s,a,2),Rd(),ph(a,2)}if(a=bh(r),a===null&&Gf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Gf(e,t,r,null,n)}}function bh(e){return e=vn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=Ft(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 xh=e,null}function Ch(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`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`fullscreenerror`: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`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(We()){case Ge:return 2;case Ke:return 8;case qe:case Je:return 32;case Ye:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`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 Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(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=It(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=Ft(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,Ct(e.priority,function(){hh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ct(e.priority,function(){hh(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 Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);_n=r,n.target.dispatchEvent(r),_n=null}else return t=It(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=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(Sh(r||n)===null)continue;break}var a=It(n);a!==null&&(e.splice(t,3),t-=3,Xs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.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[Et]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Et]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){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 Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dh(n,Ad(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),Rd(),t[Dt]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.1`)throw Error(i(527,Kh,`19.3.1`));F.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:f(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{Qe=Jh.inject(qh),$e=Jh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=yc,s=bc,c=xc;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=lh(e,1,!1,null,null,n,r,null,o,s,c,Uh),e[Dt]=t.current,Uf(e),new Wh(t)}})),_=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=g()})),v=d(),y=_(),b=`Revise the manuscript according to these notes the author marked on the compiled PDF.`,x=` PDF text: "`,S=` Marked region: a figure, equation or other non-text area`,C=`
11
+ Note: `;function w(e){return`${b} These notes refer to the displayed review round and its Before, After or Unchanged text. Region coordinates are percentages of the displayed PDF strip (left, top, right, bottom); any quoted text for a region is nearby context. Read the current source before editing. Preserve accepted changes and do not reintroduce rejected edits unless a note explicitly asks for it.\n\n${e.map((e,t)=>`${t+1}. ${e.where}\n${e.quote?`${x}${e.quote}"`:S}${C}${e.comment.trim().replace(/\n/g,`
12
+ `)}`).join(`
13
+
14
+ `)}`}function T(e){if(!e.startsWith(b))return null;let t=[];for(let n of e.split(/\n\n(?=\d+\. )/).slice(1)){let e=n.match(/^\d+\. (.*)\n/);if(!e)return null;let r=n.slice(e[0].length);if(r.startsWith(" LaTeX source of the marked region:\n ```latex\n")){let e=r.match(/\n {3}```\n(?= {3}(?:PDF text: "|Marked region: ))/);if(!e)return null;r=r.slice(e.index+e[0].length)}let i=r.indexOf(C);if(i<0)return null;let a=r.slice(0,i);if(a!==S&&!(a.startsWith(x)&&a.endsWith(`"`)))return null;t.push({where:e[1],quote:a===S?``:a.slice(14,-1),comment:r.slice(i+10).replace(/\n {3}/g,`
15
+ `)})}return t.length?t:null}var E=e=>e===`Continue this task using the decisions and comments from this review round. Preserve accepted changes and do not reintroduce rejected edits. Address any remaining revision requests; if no revision is needed, summarize the result.`||e===`Address the comments from this review round. Preserve accepted changes and do not reintroduce rejected edits.`,D=/\.(aux|log|out|toc|lof|lot|lol|fls|fdb_latexmk|synctex(?:\.gz)?|bbl|blg|bcf|run\.xml|nav|snm|vrb|xdv|dvi|idx|ilg|ind|glo|gls|glg|ist|thm|loa)$/;function O(e){let t=e.slice(e.lastIndexOf(`/`)+1);if(t===`.DS_Store`)return`.DS_Store`;if(/(?:^|\/)_minted[^/]*\//.test(e))return`_minted*/`;let n=D.exec(t);return n?`*.${n[1]}`:null}var k=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})),ee=o(((e,t)=>{t.exports=k()})),A=ee(),te={sun:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,A.jsx)(`path`,{d:`M12 2v2m0 16v2M2 12h2m16 0h2M5 5l1.5 1.5m11 11L19 19M5 19l1.5-1.5m11-11L19 5`})]}),moon:(0,A.jsx)(`path`,{d:`M20.9 13A9 9 0 0 1 11 3.1 9 9 0 1 0 20.9 13Z`}),plus:(0,A.jsx)(`path`,{d:`M12 5v14M5 12h14`}),compose:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}),(0,A.jsx)(`path`,{d:`M18.4 2.6a2.1 2.1 0 0 1 3 3L12 15l-4 1 1-4Z`})]}),sidebar:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2.5`}),(0,A.jsx)(`path`,{d:`M9 3v18`})]}),menu:(0,A.jsx)(`path`,{d:`M4 7h16M4 12h16M4 17h16`}),arrowUp:(0,A.jsx)(`path`,{d:`M12 19V5m-7 7 7-7 7 7`}),arrowDown:(0,A.jsx)(`path`,{d:`M12 5v14m7-7-7 7-7-7`}),arrowRight:(0,A.jsx)(`path`,{d:`M5 12h14m-6-6 6 6-6 6`}),stop:(0,A.jsx)(`rect`,{x:`7`,y:`7`,width:`10`,height:`10`,rx:`2`,fill:`currentColor`,stroke:`none`}),updown:(0,A.jsx)(`path`,{d:`m7 15 5 5 5-5M7 9l5-5 5 5`}),check:(0,A.jsx)(`path`,{d:`M20 6 9 17l-5-5`}),close:(0,A.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`}),more:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`circle`,{cx:`5`,cy:`12`,r:`1.4`,fill:`currentColor`,stroke:`none`}),(0,A.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.4`,fill:`currentColor`,stroke:`none`}),(0,A.jsx)(`circle`,{cx:`19`,cy:`12`,r:`1.4`,fill:`currentColor`,stroke:`none`})]}),external:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`path`,{d:`M15 3h6v6M10 14 21 3`}),(0,A.jsx)(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`})]}),paper:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`}),(0,A.jsx)(`path`,{d:`M14 2v5h5M16 13H8M16 17H8M10 9H8`})]}),chat:(0,A.jsx)(`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2Z`}),split:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2.5`}),(0,A.jsx)(`path`,{d:`M14 3v18`})]}),terminal:(0,A.jsx)(`path`,{d:`m4 17 6-6-6-6m8 14h8`}),diff:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`}),(0,A.jsx)(`path`,{d:`M9 10h6m-3-3v6m-3 4h6`})]}),tool:(0,A.jsx)(`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.8-3.8a6 6 0 0 1-7.9 7.9l-6.9 6.9a2.1 2.1 0 0 1-3-3l6.9-6.9a6 6 0 0 1 7.9-7.9Z`}),alert:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,A.jsx)(`path`,{d:`M12 8v4m0 4h.01`})]}),refresh:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`path`,{d:`M21 12a9 9 0 1 1-3-6.7L21 8`}),(0,A.jsx)(`path`,{d:`M21 3v5h-5`})]}),trash:(0,A.jsx)(`path`,{d:`M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m3 0-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6m5 5v6m4-6v6`}),pause:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`rect`,{x:`6`,y:`5`,width:`4`,height:`14`,rx:`1`}),(0,A.jsx)(`rect`,{x:`14`,y:`5`,width:`4`,height:`14`,rx:`1`})]}),search:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`circle`,{cx:`11`,cy:`11`,r:`7`}),(0,A.jsx)(`path`,{d:`m20 20-3.5-3.5`})]}),region:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`path`,{d:`M5 3a2 2 0 0 0-2 2m16-2a2 2 0 0 1 2 2M5 21a2 2 0 0 1-2-2M9 3h1m4 0h1M9 21h2M3 9v1m18-1v2M3 14v1`}),(0,A.jsx)(`path`,{d:`M12.5 12.5 21 15.8l-3.6 1.3-1.3 3.6Z`})]}),list:(0,A.jsx)(`path`,{d:`M8 6h13M8 12h13M8 18h13M3.5 6h.01M3.5 12h.01M3.5 18h.01`}),chevronDown:(0,A.jsx)(`path`,{d:`m6 9 6 6 6-6`}),chevronUp:(0,A.jsx)(`path`,{d:`m18 15-6-6-6 6`}),chevronLeft:(0,A.jsx)(`path`,{d:`m15 18-6-6 6-6`}),chevronRight:(0,A.jsx)(`path`,{d:`m9 18 6-6-6-6`}),minus:(0,A.jsx)(`path`,{d:`M5 12h14`}),branch:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`path`,{d:`M6 3v12`}),(0,A.jsx)(`circle`,{cx:`18`,cy:`6`,r:`3`}),(0,A.jsx)(`circle`,{cx:`6`,cy:`18`,r:`3`}),(0,A.jsx)(`path`,{d:`M18 9a9 9 0 0 1-9 9`})]}),commit:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,A.jsx)(`path`,{d:`M3 12h6m6 0h6`})]}),notes:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2Z`}),(0,A.jsx)(`path`,{d:`M8 8h8M8 12h5`})]}),pencil:(0,A.jsx)(`path`,{d:`M17 3a2.85 2.85 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z`}),copy:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`rect`,{x:`9`,y:`9`,width:`12`,height:`12`,rx:`2`}),(0,A.jsx)(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})]}),plane:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`path`,{d:`m22 2-7 20-4-9-9-4Z`}),(0,A.jsx)(`path`,{d:`M22 2 11 13`})]}),spark:(0,A.jsx)(`path`,{d:`M12 3c.4 3.9 2.1 5.6 6 6-3.9.4-5.6 2.1-6 6-.4-3.9-2.1-5.6-6-6 3.9-.4 5.6-2.1 6-6ZM19 15c.2 1.5.8 2.1 2.3 2.3-1.5.2-2.1.8-2.3 2.3-.2-1.5-.8-2.1-2.3-2.3 1.5-.2 2.1-.8 2.3-2.3Z`}),monitor:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`rect`,{x:`2`,y:`3`,width:`20`,height:`14`,rx:`2`}),(0,A.jsx)(`path`,{d:`M8 21h8m-4-4v4`})]}),bell:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`path`,{d:`M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9`}),(0,A.jsx)(`path`,{d:`M10.3 21a1.94 1.94 0 0 0 3.4 0`})]}),key:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`circle`,{cx:`7.5`,cy:`15.5`,r:`4.5`}),(0,A.jsx)(`path`,{d:`m10.7 12.3 9.8-9.8M17 6l3 3M14.5 8.5l2 2`})]}),people:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`circle`,{cx:`9`,cy:`8`,r:`3.5`}),(0,A.jsx)(`path`,{d:`M2.5 20a6.5 6.5 0 0 1 13 0`}),(0,A.jsx)(`path`,{d:`M16 4.6a3.5 3.5 0 0 1 0 6.8M18.5 14.2A6.5 6.5 0 0 1 21.5 20`})]}),signOut:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}),(0,A.jsx)(`path`,{d:`m16 17 5-5-5-5M21 12H9`})]}),settings:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`}),(0,A.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})};function j({name:e,size:t=18}){return(0,A.jsx)(`svg`,{width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.75`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:te[e]||te.paper})}var ne=new Map,M={getItem(e){if(ne.has(e))return ne.get(e);try{return localStorage.getItem(e)}catch{return null}},setItem(e,t){ne.set(e,t);try{localStorage.setItem(e,t),ne.delete(e)}catch{}},removeItem(e){ne.set(e,``);try{localStorage.removeItem(e),ne.delete(e)}catch{}}},re={None:`无`,Minimal:`最低`,Low:`低`,Medium:`中`,High:`高`,"Extra high":`超高`,Max:`最高`,Default:`默认`,"Reasoning effort":`推理强度`,"Reasoning effort: {label}":`推理强度:{label}`,"Model default":`模型默认`,"Request failed. Please try again.":`请求失败,请重试。`,"The connection is taking too long. Check your network and try again.":`连接时间过长。请检查网络后重试。`,"The request timed out and may still be processing. Check the task status before retrying.":`请求超时,可能仍在处理中。重试前请先检查任务状态。`,Ready:`就绪`,Queued:`排队中`,"Needs your reply":`等待你的回复`,"Building PDF review":`正在生成 PDF 审阅`,"Ready for review":`待审阅`,Paused:`已暂停`,"Needs attention":`需要处理`,"Check task status":`请检查任务状态`,"Deleting task":`正在删除任务`,"Review complete":`审阅完成`,"{agent} is editing":`{agent} 正在编辑`,now:`刚刚`,"{n}m":`{n} 分钟`,"{n}h":`{n} 小时`,"{n}d":`{n} 天`,"just now":`刚刚`,"{time} ago":`{time}前`,"Add details, or send to run the skill":`补充细节,或直接发送以运行技能`,"{agent} needs your input":`{agent} 需要你的回答`,"Approve this action":`批准此操作`,"Or type your own answer":`或输入你自己的回答`,"{agent} is requesting permission for this action.":`{agent} 请求执行此操作的权限。`,"Apply file changes":`应用文件修改`,Decline:`拒绝`,"Submitting…":`正在提交…`,"Reply to {agent}":`回复 {agent}`,"Allow this action":`允许此操作`,Copied:`已复制`,"Copy message":`复制消息`,Copy:`复制`,"You, {time}":`你,{time}`,"Note on the PDF":`PDF 上的批注`,"{n} notes on the PDF":`PDF 上的 {n} 条批注`,"Marked region":`标记的区域`,"{n} accepted":`{n} 处已接受`,"{n} rejected":`{n} 处已拒绝`,"{n} comment":`{n} 条评论`,"{n} comments":`{n} 条评论`,"{n} undone":`{n} 处已撤销`,"build error":`编译错误`,"You sent review feedback, {time}":`你发送了审阅反馈,{time}`,"Review feedback · Round {round}":`审阅反馈 · 第 {round} 轮`,"Review feedback":`审阅反馈`,"Build failed · sent to {agent}":`编译失败 · 已发给 {agent}`,"Papilot sent the build error to {agent}, {time}":`Papilot 已将编译错误发给 {agent},{time}`,"With review feedback · Round {round}":`附带审阅反馈 · 第 {round} 轮`,"With review feedback":`附带审阅反馈`,"Run command":`运行命令`,"Edited {file}":`编辑了 {file}`,"Edited {n} files":`编辑了 {n} 个文件`,"Run tool":`使用工具`,Running:`运行中`,Declined:`已拒绝`,Failed:`失败`,"ran {n} command":`运行了 {n} 条命令`,"ran {n} commands":`运行了 {n} 条命令`,"edited {file}":`编辑了 {file}`,"edited {n} files":`编辑了 {n} 个文件`,"used {n} tool":`使用了 {n} 个工具`,"used {n} tools":`使用了 {n} 个工具`,", ":`,`,"{n} failed":`{n} 个失败`,"This task is being deleted":`此任务正在删除`,"Check task status before sending":`发送前请先检查任务状态`,"Sending feedback…":`正在发送反馈…`,"Sending…":`正在发送…`,"{n} review update will be sent with this message":`{n} 项审阅更新将随此消息发送`,"{n} review updates will be sent with this message":`{n} 项审阅更新将随此消息发送`,"{agent} is working · new instructions run next":`{agent} 正在工作 · 新指令将在下一轮执行`,"Enter to send · / for skills":`Enter 发送 · / 选择技能`,"Enter to send · Shift+Enter for a new line":`Enter 发送 · Shift+Enter 换行`,"Default model":`默认模型`,"{agent} conversation":`{agent} 对话`,Chat:`对话`,"the default model on this host ({model})":`此主机上的默认模型({model})`,"the default model on this host":`此主机上的默认模型`,"Loading conversation…":`正在加载对话…`,"Retry conversation":`重新加载对话`,"{agent} is working on this task":`{agent} 正在处理此任务`,"Task saved. Waiting for an available {agent} session.":`任务已保存。正在等待可用的 {agent} 会话。`,"Round {round} is ready · {n} change to decide":`第 {round} 轮已就绪 · {n} 处修改待定`,"Round {round} is ready · {n} changes to decide":`第 {round} 轮已就绪 · {n} 处修改待定`,"Open review":`打开审阅`,"This step needs attention":`此步骤需要处理`,"Latest messages":`最新消息`,"Instructions for {agent}":`给 {agent} 的指令`,"Queue instructions for the next turn…":`为下一轮排队添加指令…`,"Ask for another revision…":`提出新的修改要求…`,"Pause task":`暂停任务`,"Pause {agent}":`暂停 {agent}`,"Send instructions":`发送指令`,"Send (Enter) · New line (Shift+Enter)":`发送(Enter)· 换行(Shift+Enter)`,"{n} review update not sent yet":`{n} 项审阅更新尚未发送`,"{n} review updates not sent yet":`{n} 项审阅更新尚未发送`,"Send your review decisions and comments to the agent":`把你的审阅决定和评论发送给智能体`,"Send feedback":`发送反馈`,detached:`游离`,"{n} changed":`{n} 处改动`,clean:`无改动`,Modified:`已修改`,Added:`已添加`,Deleted:`已删除`,Renamed:`已重命名`,Conflict:`冲突`,Untracked:`未跟踪`,"Type changed":`类型已改变`,"No textual changes.":`没有文本改动。`,"The diff is too long to show in full.":`差异太长,无法完整显示。`,"Git status":`Git 状态`,"Reading Git status…":`正在读取 Git 状态…`,"Committed {hash}.":`已提交 {hash}。`,"{n} new commit on {upstream}.":`{upstream} 上有 {n} 个新提交。`,"{n} new commits on {upstream}.":`{upstream} 上有 {n} 个新提交。`,"Up to date with the remote.":`已与远程保持同步。`,"Pulled the latest commits.":`已拉取最新提交。`,"Pushed to {upstream}.":`已推送到 {upstream}。`,"Pushed to the remote.":`已推送到远程。`,"detached HEAD":`游离 HEAD`,"Compared with {upstream}":`与 {upstream} 比较`,"up to date":`已同步`,"Pulling…":`正在拉取…`,Pull:`拉取`,"Pushing…":`正在推送…`,Push:`推送`,"Publish branch":`发布分支`,"Fetch from the remote":`从远程获取`,Tracking:`跟踪`,"Stage all changes":`暂存全部改动`,"Stage or unstage every change":`暂存或取消暂存全部改动`,"Uncommitted changes":`未提交的改动`,"Commit message":`提交信息`,"Committing…":`正在提交…`,"Commit 1 file":`提交 1 个文件`,"Commit staged changes in 1 file":`提交 1 个文件中暂存的改动`,"Commit staged changes in {n} files":`提交 {n} 个文件中暂存的改动`,"Commit all {n} files":`提交全部 {n} 个文件`,"Commit {chosen} of {n} files":`提交 {n} 个文件中的 {chosen} 个`,"Generate commit message":`生成提交信息`,"Write a commit message for the chosen files with {agent}":`让 {agent} 为选中的文件写提交信息`,"{agent} is writing a commit message…":`{agent} 正在写提交信息…`,"{n} build file":`{n} 个构建文件`,"{n} build files":`{n} 个构建文件`,"Untracked build output. Add to .gitignore adds:":`未跟踪的构建产物。加入 .gitignore 会添加:`,"Add to .gitignore":`加入 .gitignore`,"Not committed yet":`尚未提交`,"{n} file staged":`已暂存 {n} 个文件`,"{n} files staged":`已暂存 {n} 个文件`,"Commit what is staged":`提交已暂存的改动`,Show:`显示`,Changes:`改动`,"What changed since the last commit, to stage, revert and commit change by change":`上次提交以来的改动,可逐处暂存、还原并提交`,"Uncommitted changes in the PDF":`PDF 中未提交的改动`,"Commit…":`提交…`,"Accepted changes are not committed yet":`接受的改动尚未提交`,"Commit to {branch}":`提交到 {branch}`,Commit:`提交`,"What this task accepted, in {n} file:":`此任务接受的改动,共 {n} 个文件:`,"What is staged, in {n} file:":`已暂存的改动,共 {n} 个文件:`,"What is staged, in {n} files:":`已暂存的改动,共 {n} 个文件:`,"What this task accepted, in {n} files:":`此任务接受的改动,共 {n} 个文件:`,"Commit and push":`提交并推送`,"Committing and pushing…":`正在提交并推送…`,"Committed {hash} and pushed.":`已提交 {hash} 并推送。`,Merge:`合并`,"Merging…":`正在合并…`,"{branch} and {upstream} have both changed. Merge brings in the remote commits.":`{branch} 和 {upstream} 都有新提交。合并会引入远端的提交。`,"Merged {upstream}.":`已合并 {upstream}。`,"The merge stopped at conflicts.":`合并遇到了冲突。`,"Merge in progress":`合并进行中`,"Merging: {n} file has conflicts":`合并中:{n} 个文件有冲突`,"Merging: {n} files have conflicts":`合并中:{n} 个文件有冲突`,"Merging: no conflicts left":`合并中:冲突已全部解决`,"Resolve with {agent}":`让 {agent} 解决`,"{agent} is resolving…":`{agent} 正在解决…`,"{agent} on the merge":`{agent} 对这次合并的说明`,"{n} file still has conflicts.":`还有 {n} 个文件有冲突。`,"{n} files still have conflicts.":`还有 {n} 个文件有冲突。`,"Conflicts resolved. Read the diffs, then commit the merge.":`冲突已解决。看过各文件的改动后,提交这次合并。`,"Commit merge":`提交合并`,"Abort merge":`放弃合并`,"Aborting…":`正在放弃…`,"The merge was abandoned.":`已放弃这次合并。`,"Added {n} pattern to .gitignore.":`已向 .gitignore 添加 {n} 条规则。`,"Added {n} patterns to .gitignore.":`已向 .gitignore 添加 {n} 条规则。`,"Stage {path}":`暂存 {path}`,Staged:`已暂存`,"Partly staged":`部分暂存`,"Not staged":`未暂存`,"Changes in {path}":`{path} 的改动`,"Loading the diff…":`正在加载差异…`,"No uncommitted changes":`没有未提交的改动`,"Page {n}":`第 {n} 页`,"PDF notes":`PDF 批注`,"Show note {n} on the page":`在页面上显示批注 {n}`,"Delete note {n}":`删除批注 {n}`,"Delete note":`删除批注`,"{file}, the LaTeX that produced the marked region":`{file},生成所标记区域的 LaTeX 源码`,"Marked on an earlier version of the PDF.":`标记于较早版本的 PDF。`,"Select text in the PDF and choose Add note, or use Mark region for a figure or equation. All notes go to the agent as one task.":`在 PDF 中选中文字后选择“添加批注”,或用“标记区域”框选图表或公式。所有批注会作为一个任务发送给智能体。`,"Send {n} note to the agent":`把 {n} 条批注发送给智能体`,"Send {n} notes to the agent":`把 {n} 条批注发送给智能体`,"Send notes to the agent":`把批注发送给智能体`,"PDF preview":`PDF 预览`,"The manuscript did not compile.":`稿件编译失败。`,"Compiling the latest changes…":`正在编译最新改动…`,"Opening the PDF…":`正在打开 PDF…`,"Compiling the PDF…":`正在编译 PDF…`,"The first build of a paper can take a minute.":`论文第一次编译可能需要一分钟。`,"Contents, Notes and Git":`目录、批注和 Git`,"PDF panels":`PDF 面板`,Contents:`目录`,Notes:`批注`,"PDF contents":`PDF 目录`,"This PDF has no bookmarks.":`此 PDF 没有书签。`,"Contents will appear when the PDF is ready.":`PDF 就绪后会显示目录。`,"You are offline. Your draft is kept in this browser.":`你已离线。草稿保存在此浏览器中。`,Agent:`智能体`," · unavailable":` · 不可用`,Model:`模型`,"Wait for the PDF to compile.":`请等待 PDF 编译完成。`,"Fit width":`适合宽度`,"Fit page":`适合页面`,"Note for the agent":`给智能体的批注`,"What should change here?":`这里应该怎么改?`,"Add note":`添加批注`,"Adding…":`正在添加…`,"PDF controls":`PDF 控件`,"Previous page":`上一页`,"Page number":`页码`,"Next page":`下一页`,"Zoom out":`缩小`,"Zoom out (⌘−)":`缩小(⌘−)`,Zoom:`缩放`,"Zoom in":`放大`,"Zoom in (⌘+)":`放大(⌘+)`,"Find in PDF":`在 PDF 中查找`,"Find (⌘F)":`查找(⌘F)`,"Mark region":`标记区域`,"Mark a figure or region":`标记图表或区域`,"Search the PDF":`搜索 PDF`,"No matches":`无匹配`,"{current} of {total}":`{current}/{total}`,"Previous match":`上一个匹配`,"Next match":`下一个匹配`,"Close search":`关闭搜索`,"Drag across the page to mark a figure, equation or region. Press Escape to stop.":`在页面上拖动以标记图表、公式或区域。按 Esc 结束。`,"PDF pages":`PDF 页面`,"The PDF could not be opened: {error}":`无法打开 PDF:{error}`,"Note {n}: {comment}":`批注 {n}:{comment}`,"{title} PDF change review":`{title} 的 PDF 修改审阅`,"The PDF review could not be loaded.":`无法加载 PDF 审阅。`,"The PDF review is taking longer than expected.":`PDF 审阅加载时间比预期长。`,"Loading PDF review…":`正在加载 PDF 审阅…`,"Reload review":`重新加载审阅`,"Mark a region in the review PDF":`在审阅 PDF 中标记区域`,"Review notes, {n}":`审阅批注,{n} 条`,"Review notes":`审阅批注`,"Review note: {comment}":`审阅批注:{comment}`,"Review PDF notes":`审阅 PDF 批注`,"Review notes ({n})":`审阅批注({n})`,"Close review notes":`关闭审阅批注`,"Drag over a figure, equation or paragraph to add a note.":`拖动框选图表、公式或段落来添加批注。`,"Delete review note {n}":`删除审阅批注 {n}`,"Marked on an earlier review round.":`标记于较早的审阅轮次。`,"Select text in the review PDF and choose Add note, or use Mark region. Notes can also be added to accepted, rejected and unchanged text.":`在审阅 PDF 中选中文字后选择“添加批注”,或使用“标记区域”。已接受、已拒绝和未修改的文字也可以添加批注。`,"Check the task status before sending notes.":`发送批注前请先检查任务状态。`,"Full PDF":`完整 PDF`,"Open the full PDF after round {round}":`打开第 {round} 轮之后的完整 PDF`,"Build review":`生成审阅`,"Build the review again":`重新生成审阅`,"Open review in new tab":`在新标签页中打开审阅`,"Rename {name}":`重命名 {name}`,"Rename paper: {name}":`重命名论文:{name}`,"{name} · Click to rename":`{name} · 点击重命名`,"Papers and tasks":`论文和任务`,"Hide task list":`隐藏任务列表`,Paper:`论文`,"Paper: {name}":`论文:{name}`,"Add paper…":`添加论文…`,"Add paper":`添加论文`,"Git status of the manuscript":`稿件的 Git 状态`,"New task":`新任务`,Tasks:`任务`,"Task list":`任务列表`,"{n} change to decide":`{n} 处修改待定`,"{n} changes to decide":`{n} 处修改待定`,"Task actions for {title}":`{title} 的任务操作`,"Rename…":`重命名…`,"Check status":`检查状态`,"Retry deletion…":`重试删除…`,"Delete task…":`删除任务…`,"No tasks yet. Start one with New task.":`还没有任务。用“新任务”开始一个。`,"Add a paper to get started.":`添加一篇论文即可开始。`,Settings:`设置`,Host:`主机`,Connected:`已连接`,Reconnecting:`正在重新连接`,"{n} active task":`{n} 个活动任务`,"{n} active tasks":`{n} 个活动任务`,"Close task list":`关闭任务列表`,"Show task list":`显示任务列表`,Loading:`加载中`,Compiling:`编译中`,"Build failed":`编译失败`,"Compiled {time}":`{time}编译`,"PDF options":`PDF 选项`,Recompile:`重新编译`,"Open the PDF file":`打开 PDF 文件`,"Compile the PDF again":`重新编译 PDF`,"Open the PDF file in a new tab":`在新标签页中打开 PDF 文件`,"Open PDF":`打开 PDF`,"PDF view":`PDF 视图`,"Notes, {n}":`批注,{n} 条`,"Git, {n} changed":`Git,{n} 处改动`,"Retry deletion":`重试删除`,Pause:`暂停`,"View details":`查看详情`,"Workspace view":`工作区视图`,"Review, {n} to decide":`审阅,{n} 处待定`,Review:`审阅`,"Chat (reply needed)":`对话(需要回复)`,"PDF review only":`只看 PDF 审阅`,Split:`分栏`,"Review and chat side by side":`审阅和对话并排`,"Chat only":`只看对话`,"Connection lost. Showing the last update; your draft is kept.":`连接已断开。正在显示最近一次更新,你的草稿仍然保留。`,"Retry connection":`重新连接`,"Connecting to {agent}…":`正在连接 {agent}…`,"Connecting…":`正在连接…`,Reconnect:`重新连接`,"Resize chat panel":`调整对话面板宽度`,"Drag to resize · Double-click to reset":`拖动调整宽度 · 双击还原`,"PDF review":`PDF 审阅`,"The latest review build failed.":`最近一次审阅生成失败。`,"Retry build":`重新生成`,"Deletion is in progress":`正在删除`,"This task is reserved until its worktree cleanup is confirmed. Use Retry deletion if the connection was interrupted.":`在确认工作树清理完成之前,此任务会保留。如果连接中断,请使用“重试删除”。`,"Building PDF review…":`正在生成 PDF 审阅…`,"No review yet":`还没有审阅`,"The review will appear when the build finishes.":`编译完成后会显示审阅。`,"PDF changes will appear here after {agent} finishes editing.":`{agent} 完成编辑后,PDF 修改会显示在这里。`,"Opening your workspace":`正在打开工作区`,"Connecting to your papers and tasks…":`正在连接你的论文和任务…`,"What are we revising next?":`接下来要修改什么?`,"Describe the revision":`描述修改`,"Describe the revision, or type / for a skill…":`描述修改,或输入 / 选择技能…`,"Describe the revision, what to preserve, and how to judge the result…":`描述要做的修改、需要保留的内容,以及如何判断结果…`,"Start task":`开始任务`,"Start task (Enter)":`开始任务(Enter)`,"{agent} is unavailable on this host: {error}":`{agent} 在此主机上不可用:{error}`,"Add your first paper":`添加你的第一篇论文`,"Connect a LaTeX Git repository on this host. An agent edits it in isolated worktrees, and you review every change as a PDF diff.":`连接此主机上的一个 LaTeX Git 仓库。智能体在隔离的工作树中编辑,你以 PDF 差异的形式审阅每一处修改。`,"Dismiss error":`关闭错误提示`,Close:`关闭`,"Add a paper":`添加论文`,"Choose an existing LaTeX Git repository on this host. It needs at least one commit and must compile with latexmk.":`选择此主机上已有的 LaTeX Git 仓库。它至少需要一个提交,并且能用 latexmk 编译。`,"Repository path":`仓库路径`,"/Users/you/papers/my-paper":`/Users/you/papers/my-paper`,"Display name (optional)":`显示名称(可选)`,"My research paper":`我的研究论文`,Cancel:`取消`,"Copied path":`已复制路径`,"Copy path: {path}":`复制路径:{path}`,"{agent} is waiting for your approval":`{agent} 正在等待你的批准`,"Review ready · {n} change to decide":`审阅已就绪 · {n} 处修改待定`,"Review ready · {n} changes to decide":`审阅已就绪 · {n} 处修改待定`,"{agent} finished":`{agent} 已完成`,"A task needs attention":`有任务需要处理`,"Notifications are on":`通知已开启`,"Papilot will tell you here when a task needs you.":`任务需要你时,Papilot 会在这里通知你。`,"This browser cannot show notifications.":`此浏览器无法显示通知。`,"Browsers show notifications only on HTTPS or localhost. Open Papilot at a secure address to use them.":`浏览器只在 HTTPS 或 localhost 上显示通知。请通过安全地址打开 Papilot 后再使用。`,"Notifications are blocked for this site. Allow them in the browser’s site settings, then turn them on here.":`此网站的通知已被屏蔽。请先在浏览器的网站设置中允许通知,再回到这里开启。`,"These preferences apply to this browser.":`这些偏好设置只对此浏览器生效。`,Appearance:`外观`,Light:`浅色`,Dark:`深色`,System:`跟随系统`,Language:`语言`,"Browser default ({language})":`浏览器默认({language})`,Notifications:`通知`,"Notify me when a task needs my reply, its review is ready, or it stops with an error, while Papilot is in the background.":`Papilot 在后台时,如果任务需要我回复、审阅已就绪或因错误停止,就通知我。`,"Send a test notification":`发送测试通知`,"Sent. If nothing appeared, allow notifications for this browser in your system settings.":`已发送。如果没有看到通知,请在系统设置中允许此浏览器发送通知。`,"This browser could not show the notification.":`此浏览器无法显示这条通知。`,Skills:`技能`,"This paper":`本论文`,Yours:`你的`,"No skill matches. Press Enter to send the text as it is.":`没有匹配的技能。按 Enter 直接发送文字。`,"Skill: {name}":`技能:{name}`,"Remove the {name} skill":`移除技能 {name}`,"Start from a skill":`从技能开始`,"Pause this task before deleting it.":`删除前请先暂停此任务。`,"Wait for the PDF build to finish before deleting this task.":`请等 PDF 编译完成后再删除此任务。`,"Check task status before deleting this task.":`删除前请先检查任务状态。`,"Delete task?":`删除任务?`,"This permanently removes the task from Papilot, including its conversation, worktree, and PDF review files. Unaccepted edits and saved comments will be discarded, and review decisions can no longer be undone.":`这会从 Papilot 中永久删除此任务,包括它的对话、工作树和 PDF 审阅文件。未接受的修改和已保存的评论将被丢弃,审阅决定也无法再撤销。`,"Accepted changes in your manuscript stay in place. Other tasks are not affected.":`稿件中已接受的修改会保留,其他任务不受影响。`,"Deletion has already started. Retry to confirm the cleanup and remove the task.":`删除已经开始。重试以确认清理并移除任务。`,"Deleting…":`正在删除…`,"Delete task":`删除任务`,"Weekly limit":`每周额度`,"Daily limit":`每日额度`,"{n}-day limit":`{n} 天额度`,"{n}-hour limit":`{n} 小时额度`,"{n}-minute limit":`{n} 分钟额度`,"Usage limit":`用量额度`,"resets now":`即将重置`,"resets in {hours} h {minutes} min":`{hours} 小时 {minutes} 分钟后重置`,"resets in {minutes} min":`{minutes} 分钟后重置`,"resets {time}":`{time} 重置`,"{name} used":`{name}已用`,"{used}% used":`已用 {used}%`,"Limit reached":`已达上限`,"{agent} usage":`{agent} 用量`,"Unlimited credits":`无限额度`,"{n} credits":`{n} 点额度`,"Credits available":`有可用额度`,"Sign in to continue.":`请先登录。`,"{name}, {time}":`{name},{time}`,"{name} sent review feedback, {time}":`{name} 发送了审阅反馈,{time}`,"from {name}":`来自 {name}`,People:`成员`,"Sign out":`退出登录`,"No papers yet":`还没有论文`,"No papers have been shared with you yet. Papers appear here as soon as {name} shares them.":`还没有论文共享给你。{name} 共享后,论文会立即显示在这里。`,"People you invite sign in with a passkey at the public address and can do everything you can in the papers you share with them, including approving the commands agents run on this host and pushing with its Git credentials.":`受邀成员在公开地址上用通行密钥登录。在你共享给他们的论文里,他们能做你能做的一切,包括批准 agent 在此主机上运行的命令,以及用此主机的 Git 凭据推送。`,"Agents and builds can read any file on this host, including your other papers. Invite only people you would trust with access to it.":`Agent 和编译过程可以读取此主机上的任何文件,包括你的其他论文。只邀请你愿意让其访问此主机的人。`,"To invite people, give Papilot a public HTTPS address: set PAPILOT_ACCOUNT_ORIGIN and forward it to this host, as the Collaborators section of the guide describes.":`要邀请成员,请先给 Papilot 一个公开的 HTTPS 地址:设置 PAPILOT_ACCOUNT_ORIGIN,并把它转发到此主机,具体见指南的“协作者”一节。`,"Invite someone":`邀请成员`,"Their name, as others will see it":`对方的名字,其他人会看到`,"Papers they can open":`可以打开的论文`,"Creating…":`正在创建…`,"Create invite link":`创建邀请链接`,"Loading people…":`正在加载成员…`,"{name} (you)":`{name}(你)`,Owner:`所有者`,"Invited, not joined yet":`已邀请,尚未加入`,"Last active {time}":`最近活动:{time}`,Joined:`已加入`,"Papers {name} can open":`{name} 可以打开的论文`,"Invite link for {name}":`{name} 的邀请链接`,"Open it on the device you want to sign in from. It works once, within 15 minutes.":`在要登录的设备上打开。链接只能使用一次,15 分钟内有效。`,"Send it to {name} yourself. It works once, within 7 days.":`请自行发给 {name}。链接只能使用一次,7 天内有效。`,"Passkey · {label}":`通行密钥 · {label}`,"Signed in · {label}":`已登录 · {label}`,"used {time}":`{time}使用过`,"added {time}":`{time}添加`,"Remove {device}":`移除 {device}`,Remove:`移除`,"Sign in from anywhere":`从任何地方登录`,"Invite link for a new device":`新设备的邀请链接`,"New invite link":`新的邀请链接`,"Sign out everywhere":`在所有设备上退出`,"Remove {name}":`移除 {name}`,"Remove…":`移除…`,"Signing in was cancelled. Try again when you are ready.":`登录已取消。准备好后再试一次。`,"Sign in to Papilot":`登录 Papilot`,"Use the passkey you created from your invite link.":`使用你通过邀请链接创建的通行密钥。`,"Waiting for your passkey…":`正在等待通行密钥…`,"Sign in with a passkey":`用通行密钥登录`,"This browser cannot use passkeys. Open this page in a current version of Safari, Chrome, Edge or Firefox.":`此浏览器不支持通行密钥。请用最新版的 Safari、Chrome、Edge 或 Firefox 打开此页。`,"No passkey on this device? Ask the person who invited you for a new invite link.":`这台设备上没有通行密钥?请邀请你的人发一个新的邀请链接。`,"This invite link is incomplete. Copy the whole link and open it again.":`邀请链接不完整。请复制完整链接后重新打开。`,"Creating the passkey was cancelled. The link still works; try again when you are ready.":`创建通行密钥已取消。链接仍然有效,准备好后再试一次。`,"Add a passkey":`添加通行密钥`,"Join Papilot":`加入 Papilot`,"Create a passkey to sign in to your Papilot from anywhere.":`创建通行密钥,以便从任何地方登录你的 Papilot。`,"Create a passkey on this device to sign in as {name}.":`在这台设备上创建通行密钥,以 {name} 的身份登录。`,"{inviter} invited you to work on {papers}. You will appear as {name}.":`{inviter} 邀请你参与 {papers}。你将显示为 {name}。`,"{inviter} invited you to Papilot. You will appear as {name}.":`{inviter} 邀请你加入 Papilot。你将显示为 {name}。`,"Create a passkey":`创建通行密钥`,"A passkey signs you in with Face ID, Touch ID, Windows Hello or your phone. Papilot never sees a password.":`通行密钥用面容 ID、触控 ID、Windows Hello 或手机为你登录,Papilot 不会接触任何密码。`},ie=[{id:`en`,name:`English`},{id:`zh-CN`,name:`简体中文`}],ae=`papilot:language`,oe={en:{},"zh-CN":re};function se(e=typeof window>`u`?[]:navigator.languages?.length?navigator.languages:[navigator.language]){for(let t of e){let e=t.toLowerCase();if(e.startsWith(`zh`))return`zh-CN`;if(e.startsWith(`en`))return`en`}return`en`}function ce(){let e=M.getItem(ae);return e===`en`||e===`zh-CN`?e:`system`}var le={choice:ce(),language:`en`};le.language=le.choice===`system`?se():le.choice;var ue=new Set;function de(e){let t=e===`system`?se():e;(e!==le.choice||t!==le.language)&&(le={choice:e,language:t},ue.forEach(e=>e())),typeof document<`u`&&(document.documentElement.lang=t)}de(le.choice),typeof window<`u`&&(window.addEventListener(`languagechange`,()=>de(le.choice)),window.addEventListener(`storage`,e=>{(e.key===ae||e.key===null)&&de(ce())}));function fe(e){e===`system`?M.removeItem(ae):M.setItem(ae,e),de(e)}var pe=()=>le.language,me=()=>le.language===`zh-CN`?`zh-CN`:`en-US`;function he(){return(0,v.useSyncExternalStore)(e=>(ue.add(e),()=>{ue.delete(e)}),()=>le)}function N(e,t){let n=oe[le.language][e]??e;return t?n.replace(/\{(\w+)\}/g,(e,n)=>n in t?String(t[n]):e):n}function ge(e,t,n,r){return N(e===1?t:n,{n:e,...r})}var P=e=>/^\/([\w-]*)$/.exec(e)?.[1].toLowerCase()??null;function F(e,t){let n=e=>[e.id,e.name.toLowerCase().replace(/\s+/g,`-`)],r=e.filter(e=>n(e).some(e=>e.startsWith(t))),i=e.filter(e=>!r.includes(e)&&(n(e).some(e=>e.includes(t))||e.description.toLowerCase().includes(t)));return[...r,...i]}function _e({id:e,skills:t,active:n,onPick:r,onActive:i}){return(0,A.jsx)(`div`,{className:`skill-menu`,role:`listbox`,id:e,"aria-label":N(`Skills`),children:t.length?t.map((t,a)=>(0,A.jsxs)(`div`,{role:`option`,id:`${e}-${a}`,"aria-selected":a===n,className:`skill-option`+(a===n?` active`:``),onPointerDown:e=>{e.preventDefault(),r(t)},onPointerEnter:()=>i(a),children:[(0,A.jsxs)(`span`,{className:`skill-name`,children:[(0,A.jsx)(j,{name:`spark`,size:14}),t.name]}),(0,A.jsx)(`span`,{className:`skill-description`,children:t.description}),t.source!==`builtin`&&(0,A.jsx)(`span`,{className:`skill-source`,children:t.source===`paper`?N(`This paper`):N(`Yours`)})]},t.id)):(0,A.jsx)(`p`,{className:`skill-empty`,children:N(`No skill matches. Press Enter to send the text as it is.`)})})}function ve({skill:e,onRemove:t}){return(0,A.jsxs)(`span`,{className:`skill-chip`,title:N(`Skill: {name}`,{name:e.name}),children:[(0,A.jsx)(j,{name:`spark`,size:13}),e.name,t&&(0,A.jsx)(`button`,{type:`button`,"aria-label":N(`Remove the {name} skill`,{name:e.name}),onClick:t,children:(0,A.jsx)(j,{name:`close`,size:12})})]})}function ye({skills:e,selected:t,onPick:n,disabled:r}){return e.length?(0,A.jsx)(`div`,{className:`skill-suggestions`,role:`group`,"aria-label":N(`Start from a skill`),children:e.slice(0,8).map(e=>(0,A.jsxs)(`button`,{type:`button`,disabled:r,"aria-pressed":t?.id===e.id,title:e.description,onClick:()=>n(t?.id===e.id?null:e),children:[(0,A.jsx)(j,{name:`spark`,size:14}),e.name]},e.id))}):null}var be=e=>e?.unsent??[`accepted`,`rejected`,`commented`].reduce((t,n)=>t+(e?.counts?.[n]||0),0),xe=class{key;storage;newId;text;sending=!1;sendingSource=null;revision=0;requestKeys;listeners=new Set;snapshot;subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.snapshot;changed(){this.snapshot={text:this.text,sending:this.sending,sendingSource:this.sendingSource};for(let e of this.listeners)e()}constructor(e,t,n){this.key=e,this.storage=t,this.newId=n,this.text=t.getItem(e)||``,this.requestKeys={draft:n(),feedback:n()},this.snapshot={text:this.text,sending:this.sending,sendingSource:this.sendingSource}}edit(e){this.text=e,this.revision++,this.requestKeys.draft=this.newId(),this.storage.setItem(this.key,e),this.changed()}async submit(e,t,n){let r=e===`draft`?this.text:``;if(this.sending||e===`draft`&&!r.trim()&&!n)return!1;this.sending=!0,this.sendingSource=e,this.changed();let i=this.revision;try{if(await t({text:r.trim(),requestKey:this.requestKeys[e],...e===`feedback`?{feedback:!0}:{},...n?{skill:n}:{}}),e===`draft`&&this.revision===i){let e=this.storage.getItem(this.key);e===r||e===null?(this.text=``,this.storage.removeItem(this.key)):this.text=e}return(e===`feedback`||this.revision===i)&&(this.requestKeys[e]=this.newId()),!0}finally{this.sending=!1,this.sendingSource=null,this.changed()}}};function Se(e){let t=(e.split(`
16
+ `).find(e=>e.trim())||``).replace(/^[\s#>*+-]+/,``).replace(/\s+/g,` `).trim().replace(/\.$/,``);if(!t)return`Untitled task`;if(t.length<=80)return t;let n=t.slice(0,80),r=n.lastIndexOf(` `);return(r>40?n.slice(0,r):n).replace(/[\s,.;:]+$/,``)+`…`}function Ce(e,t){return e.key!==`Enter`||e.isComposing||e.keyCode===229?!1:e.metaKey||e.ctrlKey||!t&&!e.shiftKey&&!e.altKey}var we=class{current=null;run(e,t,n){if(this.current?.key===e)return this.current.promise;this.cancel();let r=new AbortController,i=Promise.resolve().then(()=>t(r.signal)).then(e=>{r.signal.aborted||n(e)}).catch(e=>{if(!r.signal.aborted)throw e}).finally(()=>{this.current?.controller===r&&(this.current=null)});return this.current={key:e,controller:r,promise:i},i}cancel(){this.current?.controller.abort(),this.current=null}};function Te(e){return e===`h2`||e===`h3`}var Ee=h();function De(e){let t=[];for(let n of[...e].sort((e,t)=>e[1]-t[1]||e[0]-t[0])){let e=t.find(e=>Math.abs((e[1]+e[3])/2-(n[1]+n[3])/2)<Math.min(e[3]-e[1],n[3]-n[1])/2&&n[0]<=e[2]+.02);e?(e[0]=Math.min(e[0],n[0]),e[1]=Math.min(e[1],n[1]),e[2]=Math.max(e[2],n[2]),e[3]=Math.max(e[3],n[3])):t.push([...n])}return t}var Oe=()=>crypto.randomUUID?.()||Array.from(crypto.getRandomValues(new Uint8Array(20)),e=>e.toString(16).padStart(2,`0`)).join(``),ke=e=>Math.max(0,Math.min(1,e)),Ae=([e,t,n,r])=>({left:`${e*100}%`,top:`${t*100}%`,width:`${(n-e)*100}%`,height:`${(r-t)*100}%`}),je=e=>e?.nodeType===1?e:e?.parentElement;function Me(e){try{let t=JSON.parse(M.getItem(e)||`null`);if(t&&Array.isArray(t.notes)&&typeof t.requestKey==`string`)return t}catch{}return{notes:[],requestKey:Oe(),editing:null}}function Ne(e,t,n,r){let i=e.strip.closest(`.change`),a=e.strip.closest(`.before`)?`Before`:e.strip.closest(`.after`)?`After`:`Unchanged text`,o=i?.querySelector(`.change-number`),s=i?.querySelector(`.change-where`),c=[`Round ${e.round}`,`PDF page ${e.strip.dataset.page||`?`}`,a,o?.dataset.change?`Change ${o.dataset.change}`:o?.textContent,s?.dataset.location||s?.getAttribute(`title`)||s?.textContent].filter(Boolean).join(` · `);return{strip:e.key,round:e.round,where:c,quote:n,rects:t,region:r}}function Pe({doc:e,task:t,onSend:n}){let r=`papilot:review-notes:${t.id}`,[i,a]=(0,v.useState)(()=>Me(r)),[o,s]=(0,v.useState)([]),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(!1),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)(``),[y,b]=(0,v.useState)(null),x=(0,v.useRef)(null),S=(0,v.useRef)({draft:i,region:u,busy:m});S.current={draft:i,region:u,busy:m};let C=(0,v.useRef)(!1);function T(e){M.setItem(r,JSON.stringify(e)),a(e)}(0,v.useEffect)(()=>{if(!e)return;let n=new Map,r=()=>{let r=!1,i=Array.from(e.querySelectorAll(`.pdf-strip`));for(let[e,t]of n)i.includes(e)||(t.element.remove(),n.delete(e),r=!0);i.forEach((i,a)=>{let o=i.querySelector(`img`)?.getAttribute(`src`)||``,s=Number(o.match(/\/files\/[^/]+\/(\d+)\//)?.[1]||t.review?.round||0),c=`${s}:${a}`,l=n.get(i);if(l?.key===c)return;l?.element.remove();let u=e.createElement(`div`);u.className=`review-note-layer`,i.append(u),n.set(i,{strip:i,element:u,key:c,round:s}),r=!0}),r&&(s([...n.values()]),l(null))};r();let i=new MutationObserver(r);i.observe(e.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`src`]});let a,o=()=>{if(S.current.draft.editing||S.current.region||S.current.busy)return;let t=e.getSelection();if(!t?.rangeCount||t.isCollapsed){l(null);return}let r=t.getRangeAt(0),i=je(r.startContainer)?.closest(`.pdf-strip`),a=i===je(r.endContainer)?.closest(`.pdf-strip`)&&i?n.get(i):null;if(!a||!je(r.startContainer)?.closest(`.pdf-text`)||!je(r.endContainer)?.closest(`.pdf-text`)){l(null);return}let o=a.strip.getBoundingClientRect(),s=Array.from(r.getClientRects()).filter(e=>e.width>0&&e.height>0).map(e=>[ke((e.left-o.left)/o.width),ke((e.top-o.top)/o.height),ke((e.right-o.left)/o.width),ke((e.bottom-o.top)/o.height)]),c=t.toString().replace(/\s+/g,` `).trim();l(c&&s.length?Ne(a,De(s),c,!1):null)},c=()=>{clearTimeout(a),a=setTimeout(o,100)};return e.addEventListener(`selectionchange`,c),()=>{clearTimeout(a),i.disconnect(),e.removeEventListener(`selectionchange`,c);for(let e of n.values())e.element.remove()}},[e,t.review?.round]);function E(t){T({...S.current.draft,editing:{...t,comment:``}}),l(null),d(!1),p(!0),e?.getSelection()?.removeAllRanges()}function D(){let e=S.current.draft,t=e.editing;t?.comment.trim()&&!m&&T({notes:[...e.notes,{...t,comment:t.comment.trim(),id:Oe()}],editing:null,requestKey:Oe()})}async function O(){if(C.current||!i.notes.length||i.editing)return;C.current=!0,h(!0),_(``);let e=i;try{await n({requestKey:e.requestKey,text:w(e.notes.map(e=>({where:e.where+(e.region?` · Region in displayed strip: ${e.rects[0].map(e=>`${Math.round(e*100)}%`).join(`, `)}`:``),quote:e.quote,comment:e.comment})))});let t=Me(r);t.requestKey===e.requestKey?T({notes:[],editing:null,requestKey:Oe()}):a(t),p(!1)}catch(e){_(e instanceof Error?e.message:String(e))}finally{C.current=!1,h(!1)}}let k=t.status===`uncertain`||t.status===`deleting`;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":N(`Mark region`),title:N(`Mark a region in the review PDF`),"aria-pressed":u,disabled:!e||m||!!i.editing,onClick:()=>{d(!u),p(!1),l(null)},children:(0,A.jsx)(j,{name:`region`,size:15})}),(0,A.jsxs)(`button`,{type:`button`,className:`button ghost compact review-notes-toggle`,"aria-label":i.notes.length?N(`Review notes, {n}`,{n:i.notes.length}):N(`Review notes`),"aria-pressed":f,disabled:!e,onClick:()=>p(!f),children:[(0,A.jsx)(j,{name:`notes`,size:15}),i.notes.length?(0,A.jsx)(`span`,{children:i.notes.length}):(0,A.jsx)(`span`,{className:`review-notes-label`,children:N(`Notes`)})]}),e&&(0,Ee.createPortal)((0,A.jsx)(`style`,{children:`.review-note-layer{z-index:3;pointer-events:none;font-family:var(--sans);position:absolute;inset:0}.review-note-mark,.review-note-box{pointer-events:none;background:#2563eb33;border-radius:2px;position:absolute}.review-note-box{background:#2563eb14;border:1.5px solid #2563eb}.review-region-capture{pointer-events:auto;cursor:crosshair;touch-action:none;position:absolute;inset:0}.review-note-tag,.review-add-note{pointer-events:auto;color:#fff;font:500 13px/1.4 var(--sans);cursor:pointer;background:#2563eb;border:0;border-radius:16px;padding:5px 10px;position:absolute;box-shadow:0 2px 8px #0002}.review-note-tag{min-width:24px;padding:3px 6px;left:8px}.review-add-note{white-space:nowrap;z-index:2;transform:translate(-50%,4px)}.review-notes-panel{z-index:20;box-sizing:border-box;border:1px solid var(--line);background:var(--bg);width:min(360px,100% - 32px);max-height:calc(100% - 80px);color:var(--text);box-shadow:var(--float);font:14px/1.5 var(--sans);border-radius:14px;padding:14px;position:fixed;bottom:16px;right:16px;overflow:auto}.review-notes-panel *{box-sizing:border-box}.review-notes-panel header,.review-notes-panel footer,.review-notes-panel li>div{justify-content:space-between;align-items:center;gap:8px;display:flex}.review-notes-panel header{margin-bottom:10px}.review-notes-panel button{font:inherit;cursor:pointer;background:var(--bg-muted);color:var(--text-2);border:0;border-radius:7px;padding:5px 10px}.review-notes-panel button:disabled{opacity:.45;cursor:default}.review-notes-panel button:focus-visible,.review-add-note:focus-visible,.review-note-tag:focus-visible{outline-offset:2px;outline:2px solid #2563eb}.review-notes-panel button.primary{background:var(--primary);color:#fff;padding:7px 12px}.review-notes-panel footer{justify-content:flex-end;margin-top:10px}.review-notes-panel p{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0}.review-notes-panel small{color:var(--text-2);overflow-wrap:anywhere}.review-notes-panel blockquote{border-left:2px solid var(--line);color:var(--text-2);max-height:110px;margin:8px 0;padding-left:10px;font-size:13px;overflow:auto}.review-notes-panel textarea{resize:vertical;border:1px solid var(--line-strong);width:100%;min-height:80px;font:14px/1.5 var(--sans);color:var(--text);background:var(--bg);border-radius:8px;padding:8px;display:block}.review-notes-panel textarea:focus{outline:2px solid var(--accent-line);border-color:#2563eb}.review-notes-panel ol{margin:0;padding:0;list-style:none}.review-notes-panel li+li{border-top:1px solid var(--line);margin-top:12px;padding-top:12px}.review-notes-panel button.review-note-location{text-align:left;color:var(--text-2);overflow-wrap:anywhere;background:0 0;padding:0;font-size:12px}.review-notes-panel .review-notes-error{color:var(--red)}@media (width<=680px){.review-notes-panel{max-height:calc(100% - 140px);bottom:76px}.review-notes-panel textarea{font-size:16px}.review-notes-panel button{min-height:36px}}`}),e.head),o.map(e=>(0,Ee.createPortal)((0,A.jsxs)(v.Fragment,{children:[i.notes.filter(t=>t.strip===e.key).map(e=>(0,A.jsxs)(v.Fragment,{children:[e.rects.map((t,n)=>(0,A.jsx)(`div`,{className:e.region?`review-note-box`:`review-note-mark`,style:Ae(t)},n)),(0,A.jsx)(`button`,{className:`review-note-tag`,style:{top:`${e.rects[0][1]*100}%`},title:e.comment,"aria-label":N(`Review note: {comment}`,{comment:e.comment}),onClick:()=>p(!0),children:i.notes.indexOf(e)+1})]},e.id)),i.editing?.strip===e.key&&i.editing.rects.map((e,t)=>(0,A.jsx)(`div`,{className:i.editing.region?`review-note-box`:`review-note-mark`,style:Ae(e)},t)),u&&(0,A.jsx)(`div`,{className:`review-region-capture`,onPointerDown:t=>{if(t.button!==0)return;t.preventDefault(),t.stopPropagation(),t.currentTarget.setPointerCapture(t.pointerId);let n=e.strip.getBoundingClientRect(),r=ke((t.clientX-n.left)/n.width),i=ke((t.clientY-n.top)/n.height);x.current={layer:e,x:r,y:i},b({key:e.key,rect:[r,i,r,i]})},onPointerMove:e=>{let t=x.current;if(!t)return;let n=t.layer.strip.getBoundingClientRect(),r=ke((e.clientX-n.left)/n.width),i=ke((e.clientY-n.top)/n.height);b({key:t.layer.key,rect:[Math.min(t.x,r),Math.min(t.y,i),Math.max(t.x,r),Math.max(t.y,i)]})},onPointerUp:e=>{let t=x.current;if(x.current=null,b(null),!t)return;let n=t.layer.strip.getBoundingClientRect(),r=ke((e.clientX-n.left)/n.width),i=ke((e.clientY-n.top)/n.height),a=[Math.min(t.x,r),Math.min(t.y,i),Math.max(t.x,r),Math.max(t.y,i)];if((a[2]-a[0])*n.width<4||(a[3]-a[1])*n.height<4)return;let o=(t.layer.strip.querySelector(`.pdf-text`)?.textContent||``).replace(/\s+/g,` `).trim().slice(0,2e3);E(Ne(t.layer,[a],o,!0))},onPointerCancel:()=>{x.current=null,b(null)}}),y?.key===e.key&&(0,A.jsx)(`div`,{className:`review-note-box`,style:Ae(y.rect)}),c?.strip===e.key&&!i.editing&&!m&&(0,A.jsx)(`button`,{className:`review-add-note`,style:{left:`${Math.min(80,c.rects.at(-1)[2]*100)}%`,top:`${c.rects.at(-1)[3]*100}%`},onPointerDown:e=>e.preventDefault(),onClick:()=>E(c),children:N(`Add note`)})]}),e.element,e.key)),e&&(f||u)&&(0,Ee.createPortal)((0,A.jsxs)(`aside`,{className:`review-notes-panel`,"aria-label":N(`Review PDF notes`),onKeyDown:e=>{e.stopPropagation(),e.key===`Escape`&&!m&&(p(!1),d(!1))},children:[(0,A.jsxs)(`header`,{children:[(0,A.jsx)(`strong`,{children:u?N(`Mark region`):i.notes.length?N(`Review notes ({n})`,{n:i.notes.length}):N(`Review notes`)}),(0,A.jsx)(`button`,{type:`button`,"aria-label":N(`Close review notes`),onClick:()=>{p(!1),d(!1)},children:`×`})]}),u?(0,A.jsx)(`p`,{children:N(`Drag over a figure, equation or paragraph to add a note.`)}):(0,A.jsx)(A.Fragment,{children:i.editing?(0,A.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),D()},children:[(0,A.jsx)(`small`,{children:i.editing.where}),i.editing.quote&&(0,A.jsx)(`blockquote`,{children:i.editing.quote}),(0,A.jsx)(`textarea`,{autoFocus:!0,"aria-label":N(`Note for the agent`),rows:3,placeholder:N(`What should change here?`),value:i.editing.comment,onChange:e=>T({...i,editing:{...i.editing,comment:e.target.value}}),onKeyDown:e=>{Ce(e.nativeEvent,window.matchMedia(`(pointer: coarse)`).matches)&&(e.preventDefault(),D())}}),(0,A.jsxs)(`footer`,{children:[(0,A.jsx)(`button`,{type:`button`,onClick:()=>T({...i,editing:null}),children:N(`Cancel`)}),(0,A.jsx)(`button`,{className:`primary`,disabled:!i.editing.comment.trim(),children:N(`Add note`)})]})]}):(0,A.jsxs)(A.Fragment,{children:[i.notes.length?(0,A.jsx)(`ol`,{children:i.notes.map((e,n)=>(0,A.jsxs)(`li`,{children:[(0,A.jsxs)(`div`,{children:[(0,A.jsxs)(`button`,{className:`review-note-location`,onClick:()=>{o.find(t=>t.key===e.strip)?.strip.scrollIntoView({block:`center`}),p(!1)},children:[n+1,`. `,e.where]}),(0,A.jsx)(`button`,{type:`button`,"aria-label":N(`Delete review note {n}`,{n:n+1}),disabled:m,onClick:()=>T({...i,notes:i.notes.filter(t=>t.id!==e.id),requestKey:Oe()}),children:`×`})]}),e.quote&&(0,A.jsx)(`blockquote`,{children:e.quote}),(0,A.jsx)(`p`,{children:e.comment}),e.round!==t.review?.round&&(0,A.jsx)(`small`,{children:N(`Marked on an earlier review round.`)})]},e.id))}):(0,A.jsx)(`p`,{children:N(`Select text in the review PDF and choose Add note, or use Mark region. Notes can also be added to accepted, rejected and unchanged text.`)}),g&&(0,A.jsx)(`p`,{className:`review-notes-error`,role:`alert`,children:g}),k&&(0,A.jsx)(`p`,{children:N(`Check the task status before sending notes.`)}),(0,A.jsx)(`footer`,{children:(0,A.jsx)(`button`,{className:`primary`,disabled:!i.notes.length||m||k,onClick:()=>void O(),children:m?N(`Sending…`):i.notes.length?ge(i.notes.length,`Send {n} note to the agent`,`Send {n} notes to the agent`):N(`Send notes to the agent`)})})]})})]}),e.body)]})}var Fe=`:root{--bg:#fff;--sidebar:#f9f9f9;--bg-subtle:#fafafa;--bg-muted:#f4f4f4;--bg-hover:#efefef;--bg-active:#e7e7e7;--canvas:#f3f3f3;--line:#e8e8e8;--line-strong:#d6d6d6;--text:#171717;--text-2:#525252;--text-3:#8a8a8a;--accent:#2563eb;--accent-hover:#1d4ed8;--accent-soft:#eff6ff;--accent-line:#bfdbfe;--primary:#2563eb;--primary-hover:#1d4ed8;--green:#15803d;--green-soft:#f0fdf4;--purple:#7c3aed;--purple-soft:#f5f3ff;--red:#dc2626;--red-soft:#fef2f2;--red-line:#fecaca;--amber-soft:#fffbeb;--amber-line:#fde68a;--amber-text:#92400e;--shadow-xs:0 1px 2px #0000000f;--shadow-sm:0 1px 2px #0000000d,0 3px 8px #0000000d;--float:0 2px 4px #0000000a,0 14px 36px #00000021;--ring:0 0 0 3px #2563eb2e;--line-hover:#c4c4c4;--danger:#dc2626;--danger-hover:#b91c1c;--scroll-thumb:#0000001f;--scroll-hover:#0003;--scroll-active:#00000057;--pdf-filter:none;--pdf-page:#fff;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}:root[data-theme=dark]{--bg:#26272b;--sidebar:#202124;--bg-subtle:#2a2b2f;--bg-muted:#303135;--bg-hover:#37383c;--bg-active:#404145;--canvas:#1e1f22;--line:#38393e;--line-strong:#4b4c52;--line-hover:#63646b;--text:#ececee;--text-2:#c2c3c9;--text-3:#9c9da5;--accent:#8ab4ff;--accent-hover:#b2ceff;--accent-soft:#2b3651;--accent-line:#445c85;--primary:#2563eb;--primary-hover:#1d4ed8;--green:#7bd5a0;--green-soft:#243a2f;--purple:#bfa1ff;--purple-soft:#372d48;--red:#ff9696;--red-soft:#46292e;--red-line:#733b45;--amber-soft:#3e3424;--amber-line:#6d5631;--amber-text:#eac584;--shadow-xs:0 1px 2px #0003;--shadow-sm:0 1px 2px #0000002e,0 3px 8px #0003;--float:0 2px 4px #0003,0 14px 36px #0006;--ring:0 0 0 3px #8ab4ff38;--scroll-thumb:#ffffff29;--scroll-hover:#ffffff40;--scroll-active:#ffffff61;--pdf-filter:invert(.84) hue-rotate(180deg);--pdf-page:#292929;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}`,Ie=e=>`/review/${e.projectId}/?task=${e.name}${pe()===`en`?``:`&lang=${pe()}`}`,Le=e=>`/review/${e}/?changes=1${pe()===`en`?``:`&lang=${pe()}`}`;function Re(e,t,n){if(!e||e.getElementById(`papilot-embed-style`))return;e.documentElement.style.setProperty(`--papilot-tools`,`${t}px`),e.documentElement.style.setProperty(`--papilot-lead`,`${n}px`);let r=e.createElement(`style`);r.id=`papilot-embed-style`,r.textContent=Fe+`
17
+ :root{--sans:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI","PingFang SC","Noto Sans SC",system-ui,sans-serif;--comment:var(--accent);--accept:var(--green);--reject:var(--red);--frame:var(--canvas);--bar:var(--bg);--muted:var(--text-3);--ink:var(--text);--head:var(--bg-subtle);font-size:14px}
18
+ .banner{border-radius:10px}
19
+ .source,.source-code,.composer textarea,.composer button,.unit-actions button,.toast,.change-map-tooltip,.review-mode,.review-mode select,.review-complete,.change.standalone{background:var(--bg);color:var(--text)}
20
+ .banner{background:var(--accent-soft);border-color:var(--accent-line)}.banner .details{background:var(--bg-subtle)}
21
+ .source-title{color:var(--text-2)}
22
+ .source-code del{background:var(--red-soft);color:var(--red)}
23
+ .source-code ins{background:var(--green-soft);color:var(--green)}
24
+ .remark{background:var(--accent-soft)}.histories,.caption{background:var(--bg-subtle);color:var(--text-2)}
25
+ .toast.error{background:var(--red-soft);color:var(--red)}
26
+ /* Papilot's commit step at the end of the completion card. */
27
+ .review-complete{align-items:center}
28
+ .review-complete-actions .commit-state{font-size:13px;color:var(--text-3)}
29
+ .review-complete-actions .commit-button{display:inline-flex;align-items:center;height:28px;padding:0 12px;border:1px solid var(--line-strong);border-radius:7px;background:var(--bg);color:var(--text);font:500 13px var(--sans);cursor:pointer;box-shadow:0 1px 2px rgb(0 0 0/.06)}
30
+ .review-complete-actions .commit-button:hover{background:var(--bg-subtle);border-color:var(--line-hover)}
31
+ .review-complete-actions .commit-button:focus-visible{outline:none;box-shadow:var(--ring)}
32
+ /* Page images follow the theme like the manuscript's PDF. They are
33
+ transparent: the sheet is the paper, and the before/after rows tint it. */
34
+ .pdf-strip{color-scheme:light}.pdf-strip img{filter:var(--pdf-filter)}.sheet{background:var(--pdf-page)}
35
+ :root[data-theme="dark"]{--before:#432c30;--after:#28392d}
36
+ .bar{display:flex;align-items:center;height:44px;min-height:44px;padding:0 calc(var(--papilot-tools,0px) + 12px) 0 calc(var(--papilot-lead,0px) + 14px);gap:12px;flex-wrap:nowrap;overflow:hidden}
37
+ .bar .overview-link,.bar .identity h1{display:none}
38
+ .bar .identity{flex:1;min-width:0;flex-direction:row;gap:6px}
39
+ .bar .identity span{font-size:13px;font-weight:600;color:var(--text-2);overflow:hidden;text-overflow:ellipsis}
40
+ .bar .meter{display:flex;order:initial;width:auto;font-size:13px}
41
+ .bar .bar-end{margin-left:0;gap:6px}
42
+ .bar .ghost{font-size:13px;font-weight:500;height:28px;padding:0 10px;border-radius:7px}
43
+ .bar .ghost:hover{text-decoration:none;background:var(--bg-hover)}
44
+ .bar .accept-all,.bar .reject-all{display:inline-flex;align-items:center;gap:6px;border-color:var(--line-strong);background:var(--bg);color:var(--ink);box-shadow:0 1px 2px rgb(0 0 0/.06)}
45
+ .bar .accept-all:hover,.bar .reject-all:hover{background:var(--bg-subtle);border-color:var(--line-hover)}
46
+ .bar .ghost.round{width:28px;height:28px;padding:0;border-radius:50%}
47
+ .bar .status{font-size:13px}
48
+ .sheet{border-radius:4px;box-shadow:0 1px 2px rgb(0 0 0/.06),0 8px 24px rgb(0 0 0/.08)}
49
+ .change-head{font-size:13px;background:var(--bg-subtle)}.link{font-size:13px}
50
+ /* The current change: a thin accent outline and a warm header, like a selected
51
+ row in the workspace, rather than a blue frame on a blue-grey header. */
52
+ .change.current{box-shadow:0 0 0 1px var(--accent-line),0 0 0 4px rgb(37 99 235/.07)}
53
+ .change.current .change-head{background:var(--bg-muted);color:var(--ink)}
54
+ .change-head .link{display:inline-flex;align-items:center;height:28px;padding:0 8px;border-radius:7px;color:var(--text-2);font-weight:500}
55
+ .change-head .link:hover{background:var(--bg-hover);color:var(--ink);text-decoration:none}
56
+ .change-head .link.active{background:var(--accent-soft);color:var(--accent);text-decoration:none}
57
+ /* Decision buttons are plain text actions like the rest of the header
58
+ (Copy reference, LaTeX, Undo): a coloured icon says what each does, and
59
+ hovering tints it green, red or blue. On phones the bar is a solid
60
+ toolbar at the bottom. */
61
+ :root{--icon-copy:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'><rect x='8' y='8' width='12' height='12' rx='2'/><path d='M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2'/></svg>");--icon-check:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");--icon-cross:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'><path d='M18 6 6 18M6 6l12 12'/></svg>");--icon-comment:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'><path d='M20 15a2 2 0 0 1-2 2H8l-4 4V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2z'/></svg>")}
62
+ .change-head .actions .accept::before,.change-head .actions .reject::before,.change-head .actions .comment::before,.bar .accept-all::before,.bar .reject-all::before{content:"";flex:none;width:13px;height:13px;background:currentColor;-webkit-mask:var(--icon) center/contain no-repeat;mask:var(--icon) center/contain no-repeat}
63
+ .change-head .actions .accept,.bar .accept-all{--icon:var(--icon-check)}.change-head .actions .reject,.bar .reject-all{--icon:var(--icon-cross)}.change-head .actions .comment{--icon:var(--icon-comment)}
64
+ .change-head .actions .accept::before,.bar .accept-all::before{background:var(--accept)}.change-head .actions .reject::before,.bar .reject-all::before{background:var(--reject)}.change-head .actions .comment::before{background:var(--accent)}
65
+ .change-head .actions{gap:3px;padding:4px;background:var(--bg);border:1px solid var(--line-strong);border-radius:12px;box-shadow:0 1px 2px rgb(0 0 0/.06),0 4px 12px rgb(0 0 0/.06)}
66
+ .change-head .actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:28px;padding:0 11px;border:1px solid transparent;border-radius:7px;font-size:13px;font-weight:500;line-height:1;transition:background-color .15s,border-color .15s}
67
+ .change-head .actions .nav{width:28px;padding:0;font-size:19px;font-weight:400;color:var(--text-2)}
68
+ .change-head .actions .nav:hover:not(:disabled){background:var(--bg-hover)}
69
+ .change-head .actions .nav:disabled{color:var(--text-3);opacity:1}
70
+ .change-head .position{min-width:38px;font-size:12.5px;color:var(--text-2);font-variant-numeric:tabular-nums}
71
+ .change-head .actions .accept,.change-head .actions .reject,.change-head .actions .comment,.change-head .actions .skip{background:transparent;color:var(--ink)}
72
+ .change-head .actions .accept:hover:not(:disabled){background:var(--green-soft);color:var(--accept)}
73
+ .change-head .actions .reject:hover:not(:disabled){background:var(--red-soft);color:var(--reject)}
74
+ .change-head .actions .comment:hover:not(:disabled){background:var(--accent-soft);color:var(--accent)}
75
+ .change-head .actions .skip:hover{background:var(--bg-hover)}
76
+ .change-head .actions button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
77
+ .change-head .complete{display:inline-flex;align-items:center;gap:6px;padding:0 8px;font-size:13px;font-weight:500;color:var(--accept)}
78
+ .change-head .complete::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
79
+ .change-head .actions .undo{margin-left:3px;padding:0 9px;font-weight:400;color:var(--text-2)}
80
+ .change-head .actions .undo:hover:not(:disabled){background:var(--bg-hover)}
81
+ .change-head .actions .undo:disabled{color:var(--text-3);opacity:1}
82
+ .change-head .actions .accept:disabled,.change-head .actions .reject:disabled,.change-head .actions .comment:disabled{opacity:.4}
83
+ /* Uncommitted changes: Stage is the check, Unstage a minus and Revert an
84
+ arrow back. The last revert is undone from the bar. */
85
+ :root{--icon-minus:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'><path d='M5 12h14'/></svg>");--icon-revert:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M9 14 4 9l5-5'/><path d='M4 9h10.5a5.5 5.5 0 0 1 0 11H11'/></svg>")}
86
+ .change-head .actions .unstage::before{content:"";flex:none;width:13px;height:13px;background:var(--text-2);-webkit-mask:var(--icon-minus) center/contain no-repeat;mask:var(--icon-minus) center/contain no-repeat}
87
+ [data-mode=changes] .change-head .actions .reject{--icon:var(--icon-revert)}
88
+ .change-head .actions .unstage{background:transparent;color:var(--ink)}
89
+ .change-head .actions .unstage:hover:not(:disabled){background:var(--bg-hover)}
90
+ .change-head .actions .unstage:disabled{opacity:.4}
91
+ .unit-actions .unstage{color:var(--text-2)}
92
+ .bar .ghost.undo{flex-shrink:0;white-space:nowrap}
93
+ @media(max-width:370px){.change-head .actions .unstage::before{display:none}}
94
+ /* Wider than a phone, a change has one compact header row: its number and
95
+ place on the left, between the previous and next arrows; its status,
96
+ the decisions and the change's own tools on the right. The bar's items
97
+ join the header row directly. Undo appears once there is something to
98
+ undo, Copy reference is a copy icon, and the position and "Review
99
+ complete" are left to the toolbar's decided count. */
100
+ @media(min-width:681px){
101
+ .change-head{flex-wrap:wrap;align-items:center;gap:4px 6px;padding:5px 8px 5px 12px;min-height:40px}
102
+ .change-head .dock,.change-head .actions{display:contents}
103
+ .change-head .actions>.nav:first-child{order:1}.change-head .change-number{order:2}.change-head .actions>.nav:not(:first-child){order:3}
104
+ .change-head .change-where{order:4;flex:1 1 120px;min-width:0;margin-left:4px}
105
+ .change-head .change-kind,.change-head .badge{order:5}
106
+ .change-head .actions>*{order:6}
107
+ .change-head .link{order:7}
108
+ .change-head .position,.change-head .complete{display:none}
109
+ .change-head .actions .undo:disabled{display:none}
110
+ .change-head .actions .nav{width:24px;height:26px;font-size:18px}
111
+ .change-head .copy-reference{width:28px;padding:0;justify-content:center;font-size:0}
112
+ .change-head .copy-reference::before{content:"";width:15px;height:15px;background:currentColor;-webkit-mask:var(--icon-copy) center/contain no-repeat;mask:var(--icon-copy) center/contain no-repeat}
113
+ }
114
+ #paper{--paper-top:14px;padding-top:14px}
115
+ .review-body>#paper{padding-right:34px}
116
+ .change-map{top:10px;bottom:10px;right:8px;width:14px;border:0;border-radius:0;background:none;box-shadow:none}
117
+ .change-map::before{content:"";position:absolute;top:0;bottom:0;left:50%;width:2px;margin-left:-1px;border-radius:2px;background:var(--line)}
118
+ .change-map-viewport{left:50%;right:auto;width:4px;margin-left:-2px;border:0;border-radius:999px;background:var(--scroll-thumb);transition:width .15s,margin .15s,background-color .15s}
119
+ .change-map:hover .change-map-viewport,.change-map-viewport:active{width:6px;margin-left:-3px;background:var(--scroll-hover)}
120
+ .change-map-mark{--mark:var(--text-3);left:50%;width:4px;min-height:3px;margin-left:-2px;border-radius:999px;transition:width .15s,margin .15s}
121
+ .change-map-mark[aria-current]{outline:0;width:6px;margin-left:-3px;box-shadow:0 0 0 2px var(--frame)}
122
+ .change-map:hover .change-map-mark{width:6px;margin-left:-3px}
123
+ .change-map .change-map-mark:hover{outline:0;width:8px;margin-left:-4px;box-shadow:0 0 0 2px var(--frame)}
124
+ .change-map-mark:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
125
+ ::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track,::-webkit-scrollbar-corner{background:transparent}
126
+ ::-webkit-scrollbar-thumb{background-color:var(--scroll-thumb);border:3px solid transparent;border-radius:999px;background-clip:padding-box}
127
+ ::-webkit-scrollbar-thumb:hover{background-color:var(--scroll-active);border-width:2px}
128
+ @supports not selector(::-webkit-scrollbar){*{scrollbar-width:thin;scrollbar-color:var(--scroll-hover) transparent}}
129
+ .part-title{font-size:15px;margin:6px 0 10px}
130
+ .side .pdf-strip,.context .pdf-strip{max-width:none}
131
+ @media(max-width:680px){
132
+ .bar{height:48px;min-height:48px;padding-left:calc(var(--papilot-lead,0px) + 12px);gap:8px}.bar .ghost{min-height:36px;font-size:12px}
133
+ .bar .ghost.round{display:none}.bar .identity span,.bar .meter{font-size:12px}
134
+ .change-map{display:none}.review-body>#paper{padding-left:8px;padding-right:8px;padding-bottom:84px}
135
+ .side.before::after,.side.after::after{content:none}
136
+ .change-head{align-items:center;padding:4px 6px 4px 10px;gap:6px}.change-head .change-where{min-width:0}
137
+ .change-head .link{min-height:36px;padding:0 6px}
138
+ .change-head .dock{position:fixed;z-index:6;left:8px;right:8px;bottom:8px;margin:0}
139
+ .change-head .actions{width:100%;flex-wrap:nowrap;justify-content:space-between;gap:4px;padding:5px;border-radius:16px;border-color:var(--line-strong);box-shadow:0 2px 4px rgb(0 0 0/.05),0 10px 28px rgb(0 0 0/.16)}
140
+ .change-head .actions button{flex:1 1 auto;min-width:0;height:44px;gap:5px;padding:0 4px;border-radius:11px;font-size:14.5px}
141
+ .change-head .actions .nav{flex:0 0 auto;width:28px;min-width:28px;padding:0}.change-head .position{min-width:30px;font-size:11.5px}
142
+ .change-head .actions .undo{flex:0 0 auto;margin-left:0;padding:0 6px;font-size:14px}
143
+ .composer{left:8px!important;right:8px!important;width:auto!important;max-width:none;bottom:70px;transform:none;max-height:calc(100% - 86px);overflow:auto}
144
+ .composer textarea{font-size:16px;max-height:min(140px,30vh)}.composer button{min-height:44px}
145
+ .side .pdf-strip,.context .pdf-strip{width:calc(100% * var(--pdf-crop-scale,1));margin-left:calc(-100% * var(--pdf-crop-scale,1) * var(--pdf-crop-shift,0))}
146
+ .side,.context{overflow-x:hidden}
147
+ }
148
+ @media(max-width:480px){.bar .identity,.bar .meter{display:none}.bar .bar-end{gap:4px}}
149
+ @media(max-width:400px){.change-head .position{display:none}}
150
+ @media(max-width:370px){.change-head .actions .accept::before,.change-head .actions .reject::before,.change-head .actions .comment::before{display:none}}
151
+ @media(max-width:350px){.change-head .actions .nav{display:none}}
152
+ @media(max-width:360px){.bar .ghost{padding:0 7px;font-size:11.5px}}
153
+ /* History is an icon like the PDF tools beside it, so the batch decisions
154
+ keep their room. In a narrow pane it takes the place of the shortcuts
155
+ button (the ? key still opens them). */
156
+ .bar .ghost.history{display:inline-flex;align-items:center;justify-content:center;width:28px;padding:0;font-size:0}
157
+ .bar .history::before{content:"";width:15px;height:15px;background:currentColor;-webkit-mask:var(--icon-history) center/contain no-repeat;mask:var(--icon-history) center/contain no-repeat}
158
+ @media(max-width:680px){.bar .ghost.history{width:36px}}
159
+ /* The batch decisions keep one line, with their count as a badge. The bar
160
+ is a container measured without the room Papilot's PDF tools take, so it
161
+ gives way in steps whatever their width or the language: first the meter
162
+ and the shortcuts button (the ? key still opens them), then the labels,
163
+ leaving each icon with its count, and last the counts. The buttons keep
164
+ their full names for screen readers and tooltips. */
165
+ .bar{container:review-bar/inline-size}
166
+ .bar .accept-all,.bar .reject-all{flex-shrink:0;white-space:nowrap}
167
+ .bar .batch-count{margin-left:0;background:var(--bg-muted);color:var(--text-2)}
168
+ @container review-bar (max-width:440px){.bar .meter,.bar .ghost.round{display:none}}
169
+ @container review-bar (max-width:370px){.bar .identity{visibility:hidden}}
170
+ @container review-bar (max-width:300px){.bar .batch-label{display:none}.bar .accept-all,.bar .reject-all{padding:0 8px}}
171
+ @container review-bar (max-width:170px){.bar .batch-count{display:none}}
172
+ :root{--icon-history:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 12a9 9 0 1 0 2.6-6.4L3 8'/><path d='M3 3v5h5M12 7v5l3 2'/></svg>")}
173
+ `,e.documentElement.dataset.theme=window.document.documentElement.dataset.theme,e.head.append(r)}function ze(e){let t=1,n=0;for(let r of e.querySelectorAll(`.pdf-strip`)){let e=r.getBoundingClientRect();if(e.width)for(let i of r.querySelectorAll(`.pdf-text-line`)){let r=i.firstElementChild?.getBoundingClientRect(),a=i.lastElementChild?.getBoundingClientRect();r?.width&&a?.width&&(t=Math.min(t,(r.left-e.left)/e.width),n=Math.max(n,(a.right-e.left)/e.width))}}let r=e.documentElement.style,i=n-t+.04;n<=t||i>=.95?(r.removeProperty(`--pdf-crop-scale`),r.removeProperty(`--pdf-crop-shift`)):(r.setProperty(`--pdf-crop-scale`,(1/i).toFixed(4)),r.setProperty(`--pdf-crop-shift`,Math.max(0,t-.02).toFixed(4)))}function Be({task:e,changesOf:t,tools:n,lead:r,completion:i,onSendNotes:a,onDecided:o}){let[s,c]=(0,v.useState)(null),l=(0,v.useRef)(null),u=(0,v.useRef)(null),d=(0,v.useRef)(null),[f,p]=(0,v.useState)(0),[m,h]=(0,v.useState)(0),g=(0,v.useRef)(o);g.current=o;let _=(0,v.useRef)(null),y=(0,v.useRef)(null),[b,x]=(0,v.useState)(0),[S,C]=(0,v.useState)(`loading`),w=he().language;(0,v.useEffect)(()=>{C(`loading`);let e=setTimeout(()=>C(e=>e===`loading`?`slow`:e),15e3);return()=>{clearTimeout(e),_.current?.disconnect(),y.current?.disconnect()}},[b,w]),(0,v.useEffect)(()=>{let e=u.current;if(!e)return;let t=new ResizeObserver(()=>p(Math.ceil(e.offsetWidth)));return t.observe(e),()=>t.disconnect()},[!!n]),(0,v.useEffect)(()=>{let e=d.current;if(!e)return;let t=new ResizeObserver(()=>h(Math.ceil(e.offsetWidth)));return t.observe(e),()=>t.disconnect()},[!!r]),(0,v.useEffect)(()=>{try{let e=l.current?.contentDocument?.documentElement;e?.style.setProperty(`--papilot-tools`,`${f}px`),e?.style.setProperty(`--papilot-lead`,`${m}px`)}catch{}},[f,m]);function T(){_.current?.disconnect();try{let e=l.current?.contentDocument;if(!e||!e.getElementById(`root`)&&!e.getElementById(`paper`)){C(`error`);return}Re(e,f,m),c(e),l.current?.contentWindow?.addEventListener(`latex-review:decided`,()=>g.current?.());let n;y.current?.disconnect(),y.current=new MutationObserver(()=>{clearTimeout(n),n=setTimeout(()=>ze(e),150)}),y.current.observe(e.body,{childList:!0,subtree:!0});let r=()=>{let n=e.getElementById(`paper`);n&&(n.querySelector(`[role="alert"]`)?C(`error`):(t||!n.querySelector(`.waiting`))&&(C(`ready`),_.current?.disconnect(),ze(e)))};_.current=new MutationObserver(r),_.current.observe(e.body,{childList:!0,subtree:!0}),r()}catch{C(`error`)}}(0,v.useEffect)(()=>{if(!s)return;let e=window.document.documentElement,t=()=>{s.documentElement.dataset.theme=e.dataset.theme};t();let n=new MutationObserver(t);return n.observe(e,{attributes:!0,attributeFilter:[`data-theme`]}),()=>n.disconnect()},[s]);let E=S===`ready`,[D,O]=(0,v.useState)(null);return(0,v.useEffect)(()=>{if(!s||!E){O(null);return}let e=()=>O(s.querySelector(`.review-complete-actions`));e();let t=new MutationObserver(e);return t.observe(s.body,{childList:!0,subtree:!0}),()=>t.disconnect()},[s,E]),(0,A.jsxs)(`div`,{className:`review-viewport`+(E?``:` review-pending`),"aria-busy":!E,children:[(0,A.jsx)(`iframe`,{ref:l,title:e?N(`{title} PDF change review`,{title:e.title}):N(`Uncommitted changes in the PDF`),src:e?Ie(e):Le(t),onLoad:T,onError:()=>C(`error`),className:`review-frame`,"aria-hidden":!E,tabIndex:E?0:-1},`${b}:${w}`),r&&(0,A.jsx)(`div`,{ref:d,className:`review-lead`,children:r}),(0,A.jsxs)(`div`,{ref:u,className:`review-tools`,children:[e&&a&&(0,A.jsx)(Pe,{doc:E?s:null,task:e,onSend:a}),n]}),D&&i?(0,Ee.createPortal)(i,D):null,!E&&(0,A.jsxs)(`div`,{className:`review-loading`,children:[(0,A.jsx)(`p`,{role:S===`error`?`alert`:`status`,children:N(S===`error`?`The PDF review could not be loaded.`:S===`slow`?`The PDF review is taking longer than expected.`:`Loading PDF review…`)}),S!==`loading`&&(0,A.jsx)(`button`,{className:`button secondary`,onClick:()=>{C(`loading`),x(e=>e+1)},children:N(`Reload review`)})]})]})}function Ve(e){if(e.key!==`Tab`)return;let t=Array.from(e.currentTarget.querySelectorAll(`a[href], button:not(:disabled), input:not(:disabled), textarea:not(:disabled), select:not(:disabled)`)).filter(e=>e.getClientRects().length>0&&!e.closest(`[inert]`)),n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus())}function He({task:e,submit:t,onClose:n,onDeleted:r,refresh:i}){let a=(0,v.useRef)(null),o=(0,v.useRef)(!1),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(``),d=[`running`,`waiting_input`,`queued`].includes(e.status)?N(`Pause this task before deleting it.`):e.status===`building`?N(`Wait for the PDF build to finish before deleting this task.`):e.status===`uncertain`?N(`Check task status before deleting this task.`):``;(0,v.useEffect)(()=>{let e=document.activeElement,t=a.current;return t.showModal(),t.querySelector(`[data-cancel]`)?.focus(),()=>{t.close(),e?.isConnected&&e.getClientRects().length&&!e.closest(`[inert]`)?e.focus():Array.from(document.querySelectorAll(`.sidebar .new-task, .sidebar-toggle`)).find(e=>e.getClientRects().length&&!e.closest(`[inert]`))?.focus()}},[]);async function f(){if(!(o.current||d)){o.current=!0,c(!0),u(``);try{await t(),r()}catch(e){u(e instanceof Error?e.message:String(e)),i()}finally{o.current=!1,c(!1)}}}return(0,A.jsx)(`dialog`,{ref:a,className:`modal-backdrop`,"aria-labelledby":`delete-title`,"aria-describedby":`delete-description`,onKeyDown:Ve,onCancel:e=>{e.preventDefault(),s||n()},onClick:e=>{e.target===e.currentTarget&&!s&&n()},children:(0,A.jsxs)(`section`,{className:`modal delete-dialog`,children:[(0,A.jsx)(`h2`,{id:`delete-title`,children:N(`Delete task?`)}),(0,A.jsx)(`p`,{className:`delete-task-name`,children:e.title}),(0,A.jsx)(`p`,{id:`delete-description`,children:N(`This permanently removes the task from Papilot, including its conversation, worktree, and PDF review files. Unaccepted edits and saved comments will be discarded, and review decisions can no longer be undone.`)}),(0,A.jsx)(`p`,{children:N(`Accepted changes in your manuscript stay in place. Other tasks are not affected.`)}),e.status===`deleting`&&(0,A.jsx)(`p`,{className:`muted`,children:N(`Deletion has already started. Retry to confirm the cleanup and remove the task.`)}),d&&(0,A.jsx)(`p`,{className:`inline-error`,role:`status`,children:d}),l&&(0,A.jsx)(`p`,{className:`inline-error`,role:`alert`,children:l}),(0,A.jsxs)(`div`,{className:`button-row`,children:[(0,A.jsx)(`button`,{"data-cancel":!0,className:`button secondary`,disabled:s,onClick:n,children:N(`Cancel`)}),(0,A.jsx)(`button`,{className:`button danger`,disabled:s||!!d,onClick:()=>void f(),children:s?N(`Deleting…`):e.status===`deleting`?N(`Retry deletion`):N(`Delete task`)})]})]})})}function Ue({label:e,actions:t,children:n,className:r=`icon-button more-button`,menuClassName:i=``,align:a=`end`}){let o=(0,v.useId)(),s=(0,v.useRef)(null),c=(0,v.useRef)(null),[l,u]=(0,v.useState)(!1);(0,v.useEffect)(()=>{if(!l)return;let e=()=>c.current?.hidePopover(),t=t=>{t.target instanceof Node&&c.current?.contains(t.target)||e()};return window.addEventListener(`resize`,e),document.addEventListener(`scroll`,t,!0),()=>{window.removeEventListener(`resize`,e),document.removeEventListener(`scroll`,t,!0)}},[l]);function d(){let e=c.current,t=s.current.getBoundingClientRect();a===`start`&&(e.style.minWidth=`${t.width}px`);let n=a===`start`?t.left:t.right-e.offsetWidth;e.style.left=`${Math.max(8,Math.min(n,window.innerWidth-e.offsetWidth-8))}px`;let r=t.bottom+6,i=t.top-e.offsetHeight-6;e.style.top=`${r+e.offsetHeight>window.innerHeight-8&&i>=8?i:Math.max(8,Math.min(r,window.innerHeight-e.offsetHeight-8))}px`}function f(){return Array.from(c.current.querySelectorAll(`[role^="menuitem"]:not(:disabled)`))}function p(){c.current?.hidePopover()}function m(e=!1){c.current?.showPopover(),d(),u(!0);let t=f();(e?t[t.length-1]:t.find(e=>e.getAttribute(`aria-checked`)===`true`)||t[0])?.focus()}let h=t.some(e=>e.checked!==void 0);return(0,A.jsxs)(`span`,{className:`menu-anchor`,children:[(0,A.jsx)(`button`,{ref:s,type:`button`,className:r,"aria-label":e,title:n?void 0:e,"aria-haspopup":`menu`,"aria-expanded":l,popoverTarget:o,onClick:e=>{e.preventDefault(),c.current?.matches(`:popover-open`)?p():m()},onKeyDown:e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),m(e.key===`ArrowUp`))},children:n||(0,A.jsx)(j,{name:`more`,size:18})}),(0,A.jsx)(`div`,{ref:c,id:o,popover:`auto`,role:`menu`,"aria-label":e,className:`action-menu `+i,onToggle:e=>{let t=e.nativeEvent.newState===`open`;u(t)},onKeyDown:e=>{if(e.key===`Tab`)p(),s.current?.focus();else if(e.stopPropagation(),e.key===`Escape`)e.preventDefault(),p(),s.current?.focus();else if([`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key)){e.preventDefault();let t=f(),n=t.indexOf(document.activeElement);t[e.key===`Home`?0:e.key===`End`?t.length-1:(n+(e.key===`ArrowDown`?1:-1)+t.length)%t.length]?.focus()}},children:t.map(e=>{let t=(0,A.jsxs)(A.Fragment,{children:[e.icon?(0,A.jsx)(j,{name:e.icon,size:16}):h&&(0,A.jsx)(`span`,{className:`menu-check`,children:e.checked&&(0,A.jsx)(j,{name:`check`,size:16})}),(0,A.jsxs)(`span`,{className:`menu-label`,children:[e.label,e.detail&&(0,A.jsx)(`small`,{className:`menu-detail`,"aria-hidden":`true`,children:e.detail})]}),e.hint&&(0,A.jsx)(`span`,{className:`menu-hint`,"aria-hidden":`true`,children:e.hint})]}),n=e.href?(0,A.jsx)(`a`,{role:`menuitem`,href:e.href,target:`_blank`,rel:`noreferrer`,onClick:p,children:t},e.id||e.label):(0,A.jsx)(`button`,{type:`button`,role:e.checked===void 0?`menuitem`:`menuitemradio`,"aria-checked":e.checked,disabled:e.disabled,className:e.danger?`danger-text`:void 0,"data-indent":e.indent||void 0,style:e.indent?{paddingLeft:10+e.indent*14}:void 0,onClick:()=>{p(),s.current?.focus(),e.select?.()},children:t},e.id||e.label);return e.divider?[(0,A.jsx)(`div`,{role:`separator`,className:`menu-separator`},e.label+`-divider`),n]:n})})]})}var We=`papilot:theme`;function Ge(e){return e===`light`||e===`dark`?e:`system`}function Ke(){let[e,t]=(0,v.useState)(()=>Ge(M.getItem(We))),[n,r]=(0,v.useState)(()=>matchMedia(`(prefers-color-scheme: dark)`).matches),i=e===`system`?n?`dark`:`light`:e;return(0,v.useEffect)(()=>{let e=matchMedia(`(prefers-color-scheme: dark)`),n=()=>r(e.matches),i=e=>{(e.key===We||e.key===null)&&t(Ge(M.getItem(We)))};return n(),e.addEventListener(`change`,n),window.addEventListener(`storage`,i),()=>{e.removeEventListener(`change`,n),window.removeEventListener(`storage`,i)}},[]),(0,v.useLayoutEffect)(()=>{document.documentElement.dataset.theme=i,document.querySelector(`meta[name="theme-color"]`)?.setAttribute(`content`,i===`dark`?`#26272b`:`#ffffff`)},[i]),{theme:e,resolved:i,setTheme:e=>{M.setItem(We,e),t(e)}}}function qe({label:e,value:t,options:n,onChange:r,disabled:i,icon:a,className:o=``}){return(0,A.jsxs)(`label`,{className:`chip-select `+o,title:e,children:[a&&(0,A.jsx)(j,{name:a,size:14}),(0,A.jsx)(`span`,{className:`chip-value`,children:n.find(e=>e.value===t)?.label??t}),(0,A.jsx)(`select`,{"aria-label":e,disabled:i,value:t,onChange:e=>r(e.target.value),children:n.map(e=>(0,A.jsx)(`option`,{value:e.value,children:e.label},e.value))})]})}var Je=`papilot:notifications`;function Ye(){let e=M.getItem(Je)===`on`;return typeof window>`u`||!(`Notification`in window)?{on:e,permission:`unsupported`}:window.isSecureContext?{on:e,permission:Notification.permission}:{on:e,permission:`insecure`}}var Xe=Ye(),Ze=new Set;function Qe(){let e=Ye();(e.on!==Xe.on||e.permission!==Xe.permission)&&(Xe=e,Ze.forEach(e=>e()))}typeof window<`u`&&(window.addEventListener(`storage`,e=>{(e.key===Je||e.key===null)&&Qe()}),window.addEventListener(`focus`,Qe));var $e=()=>Xe,et=()=>Xe.on&&Xe.permission===`granted`;function tt(e){return Ze.add(e),()=>{Ze.delete(e)}}function nt(){return(0,v.useSyncExternalStore)(tt,$e)}async function rt(e){e&&Xe.permission==="default"&&await Notification.requestPermission(),e?M.setItem(Je,`on`):M.removeItem(Je),Qe()}var it={codex:`Codex`,claude:`Claude`,antigravity:`Antigravity`};function at(e,t){let n=[];for(let r of t.tasks){let i=e.tasks.find(e=>e.id===r.id);if(!i)continue;let a=it[r.agent||`codex`]||`Codex`,o=t.requests.filter(t=>t.taskId===r.id&&!e.requests.some(e=>e.id===t.id));if(o.length){let e=o.some(e=>e.method.endsWith(`requestUserInput`));n.push({taskId:r.id,title:N(e?`{agent} needs your input`:`{agent} is waiting for your approval`,{agent:a}),body:r.title})}else if(i.status===`building`&&r.status===`reviewing`){let e=r.review?.counts?.pending||0;n.push({taskId:r.id,title:e?ge(e,`Review ready · {n} change to decide`,`Review ready · {n} changes to decide`):N(`{agent} finished`,{agent:a}),body:r.title})}else r.status!==i.status&&(r.status===`failed`||r.status===`uncertain`||r.status===`interrupted`&&r.error)&&n.push({taskId:r.id,title:N(`A task needs attention`),body:ot(r,r.title)})}return n}function ot(e,t){let n=e.error?.split(`
174
+ `).find(e=>e.trim())?.trim();return n?`${t}\n${n.slice(0,160)}`:t}function st(e,t){if(et())try{let n=new Notification(e.title,{body:e.body,tag:`papilot:`+e.taskId,renotify:!0,icon:`/favicon.png`});n.onclick=()=>{window.focus(),t(e.taskId),n.close()}}catch{}}function ct(){try{return new Notification(N(`Notifications are on`),{body:N(`Papilot will tell you here when a task needs you.`),tag:`papilot:test`,icon:`/favicon.png`}),!0}catch{return!1}}function lt({theme:e,onTheme:t,onClose:n}){let r=(0,v.useRef)(null),{choice:i}=he(),a=nt(),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(``);(0,v.useEffect)(()=>{let e=document.activeElement,t=r.current;return t.showModal(),t.querySelector(`input:checked`)?.focus(),()=>{t.close(),e?.isConnected&&e.getClientRects().length&&e.focus()}},[]);let u=a.permission===`granted`,d=a.on&&u,f=a.permission===`unsupported`?N(`This browser cannot show notifications.`):a.permission===`insecure`?N(`Browsers show notifications only on HTTPS or localhost. Open Papilot at a secure address to use them.`):a.permission===`denied`?N(`Notifications are blocked for this site. Allow them in the browser’s site settings, then turn them on here.`):``;async function p(e){s(!0),l(``);try{await rt(e)}finally{s(!1)}}let m=ie.find(e=>e.id===se()).name;return(0,A.jsx)(`dialog`,{ref:r,className:`modal-backdrop`,"aria-labelledby":`settings-title`,onKeyDown:Ve,onCancel:e=>{e.preventDefault(),n()},onClick:e=>{e.target===e.currentTarget&&n()},children:(0,A.jsxs)(`section`,{className:`modal settings-dialog`,children:[(0,A.jsx)(`button`,{className:`modal-close icon-button`,"aria-label":N(`Close`),onClick:n,children:(0,A.jsx)(j,{name:`close`})}),(0,A.jsx)(`h2`,{id:`settings-title`,children:N(`Settings`)}),(0,A.jsx)(`p`,{className:`modal-description`,children:N(`These preferences apply to this browser.`)}),(0,A.jsxs)(`div`,{className:`settings-row`,children:[(0,A.jsx)(`span`,{className:`settings-name`,id:`settings-appearance`,children:N(`Appearance`)}),(0,A.jsx)(`div`,{className:`segmented`,role:`radiogroup`,"aria-labelledby":`settings-appearance`,children:[`light`,`dark`,`system`].map(n=>(0,A.jsxs)(`label`,{className:e===n?`checked`:void 0,children:[(0,A.jsx)(`input`,{type:`radio`,name:`theme`,value:n,checked:e===n,onChange:()=>t(n)}),(0,A.jsx)(j,{name:n===`light`?`sun`:n===`dark`?`moon`:`monitor`,size:15}),N(n===`light`?`Light`:n===`dark`?`Dark`:`System`)]},n))})]}),(0,A.jsxs)(`div`,{className:`settings-row`,children:[(0,A.jsx)(`span`,{className:`settings-name`,children:N(`Language`)}),(0,A.jsx)(qe,{label:N(`Language`),value:i,onChange:e=>fe(e),options:[{value:`system`,label:N(`Browser default ({language})`,{language:m})},...ie.map(e=>({value:e.id,label:e.name}))]})]}),(0,A.jsxs)(`div`,{className:`settings-row settings-notifications`,children:[(0,A.jsxs)(`div`,{className:`settings-text`,children:[(0,A.jsx)(`label`,{className:`settings-name`,htmlFor:`settings-notify`,children:N(`Notifications`)}),(0,A.jsx)(`p`,{id:`settings-notify-detail`,children:f||N(`Notify me when a task needs my reply, its review is ready, or it stops with an error, while Papilot is in the background.`)})]}),(0,A.jsx)(`input`,{id:`settings-notify`,type:`checkbox`,role:`switch`,className:`switch`,"aria-describedby":`settings-notify-detail`,checked:d,disabled:o||!!f&&!d,onChange:e=>void p(e.target.checked)})]}),d&&(0,A.jsxs)(`div`,{className:`settings-test`,children:[(0,A.jsxs)(`button`,{type:`button`,className:`button secondary compact`,onClick:()=>l(ct()?`sent`:`failed`),children:[(0,A.jsx)(j,{name:`bell`,size:14}),N(`Send a test notification`)]}),c&&(0,A.jsx)(`span`,{role:`status`,children:N(c===`sent`?`Sent. If nothing appeared, allow notifications for this browser in your system settings.`:`This browser could not show the notification.`)})]})]})})}function ut({branch:e,files:t,staged:n,remote:r,agent:i,generate:a,commit:o,onClose:s}){let c=(0,v.useRef)(null),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(``),[p,m]=(0,v.useState)(``),h=(0,v.useRef)(!1);async function g(e){f(`writing`),m(``);try{let t=await a(e);h.current||u(t)}catch(e){m(e instanceof Error?e.message:String(e))}finally{f(e=>e===`writing`?``:e)}}(0,v.useEffect)(()=>{let e=document.activeElement,t=c.current;return t.showModal(),t.querySelector(`textarea`)?.focus(),g(!1),()=>{t.close(),e?.isConnected&&e.getClientRects().length&&e.focus()}},[]);async function _(e){if(!d&&l.trim()){f(e?`push`:`commit`),m(``);try{await o(l.trim(),e)}catch(e){m(e instanceof Error?e.message:String(e)),f(``)}}}let y=()=>{d!==`commit`&&d!==`push`&&s()};return(0,A.jsx)(`dialog`,{ref:c,className:`modal-backdrop`,"aria-labelledby":`commit-title`,onKeyDown:Ve,onCancel:e=>{e.preventDefault(),y()},onClick:e=>{e.target===e.currentTarget&&y()},children:(0,A.jsxs)(`section`,{className:`modal commit-dialog`,children:[(0,A.jsx)(`button`,{className:`modal-close icon-button`,"aria-label":N(`Close`),onClick:y,children:(0,A.jsx)(j,{name:`close`})}),(0,A.jsx)(`h2`,{id:`commit-title`,children:e?N(`Commit to {branch}`,{branch:e}):N(`Commit`)}),(0,A.jsx)(`p`,{className:`modal-description`,children:n?ge(t.length,`What is staged, in {n} file:`,`What is staged, in {n} files:`):ge(t.length,`What this task accepted, in {n} file:`,`What this task accepted, in {n} files:`)}),(0,A.jsx)(`ul`,{className:`commit-files`,children:t.map(e=>(0,A.jsx)(`li`,{children:(0,A.jsx)(`code`,{children:e})},e))}),(0,A.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),_(!1)},children:[(0,A.jsxs)(`div`,{className:`git-message-box`,children:[(0,A.jsx)(`textarea`,{"aria-label":N(`Commit message`),rows:3,value:l,readOnly:d===`commit`||d===`push`,placeholder:d===`writing`?N(`{agent} is writing a commit message…`,{agent:i}):N(`Commit message`),onChange:e=>{h.current=!0,u(e.target.value)},onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!e.nativeEvent.isComposing&&(e.preventDefault(),_(!1))}}),(0,A.jsx)(`button`,{type:`button`,className:`icon-button git-generate`,"aria-label":N(`Generate commit message`),title:N(`Write a commit message for the chosen files with {agent}`,{agent:i}),disabled:!!d,onClick:()=>{h.current=!1,g(!0)},children:d===`writing`?(0,A.jsx)(`span`,{className:`spinner`}):(0,A.jsx)(j,{name:`spark`,size:15})})]}),p&&(0,A.jsx)(`p`,{className:`inline-error`,role:`alert`,children:p}),(0,A.jsxs)(`div`,{className:`button-row`,children:[(0,A.jsx)(`button`,{type:`button`,className:`button secondary`,disabled:d===`commit`||d===`push`,onClick:y,children:N(`Cancel`)}),r&&(0,A.jsx)(`button`,{type:`button`,className:`button secondary`,disabled:!!d||!l.trim(),onClick:()=>void _(!0),children:N(d===`push`?`Committing and pushing…`:`Commit and push`)}),(0,A.jsx)(`button`,{className:`button primary`,disabled:!!d||!l.trim(),children:N(d===`commit`?`Committing…`:`Commit`)})]})]})]})})}function dt({api:e,projects:t,ago:n,onClose:r}){let i=(0,v.useRef)(null),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)({}),[p,m]=(0,v.useState)(``),[h,g]=(0,v.useState)(``),[_,y]=(0,v.useState)([]);(0,v.useEffect)(()=>{let t=document.activeElement,n=i.current;return n.showModal(),b(`load`,()=>e(`/people`)),()=>{n.close(),t?.isConnected&&t.getClientRects().length&&t.focus()}},[]);async function b(e,t){u(e),c(``);try{let e=await t();e&&o(e)}catch(e){c(e instanceof Error?e.message:String(e))}finally{u(``)}}let x=()=>b(`invite`,async()=>{let t=await e(`/people`,{name:h.trim(),projects:_});return f(e=>({...e,[t.id]:t.link})),g(``),y([]),e(`/people`)}),S=t=>b(`link:`+t.id,async()=>{let{link:n}=await e(`/people/${t.id}/invite`,{});f(e=>({...e,[t.id]:n}))}),C=(t,n,r)=>{let i=r?[...t.projects,n]:t.projects.filter(e=>e!==n);return o(e=>e&&{...e,people:e.people.map(e=>e.id===t.id?{...e,projects:i}:e)}),b(`share:`+t.id,()=>e(`/people/${t.id}/share`,{projects:i}).catch(async t=>{throw o(await e(`/people`)),t}))},w=(t,n)=>b(`device:`+n.id,()=>e(`/people/${t.id}/devices/${n.id}/remove`,{})),T=t=>b(`remove:`+t.id,()=>e(`/people/${t.id}/remove`,{})),E=t=>b(`sign-out:`+t.id,()=>e(`/people/${t.id}/sign-out`,{})),D=()=>{l&&l!==`load`||r()},O=(e,n,r,i)=>(0,A.jsxs)(`fieldset`,{className:`people-papers`,disabled:r,children:[(0,A.jsx)(`legend`,{children:i}),t.map(t=>(0,A.jsxs)(`label`,{className:`checkbox`,children:[(0,A.jsx)(`input`,{type:`checkbox`,checked:e.includes(t.id),onChange:e=>n(t.id,e.target.checked)}),t.name]},t.id))]});return(0,A.jsx)(`dialog`,{ref:i,className:`modal-backdrop`,"aria-labelledby":`people-title`,onKeyDown:Ve,onCancel:e=>{e.preventDefault(),D()},onClick:e=>{e.target===e.currentTarget&&D()},children:(0,A.jsxs)(`section`,{className:`modal people-dialog`,children:[(0,A.jsx)(`button`,{className:`modal-close icon-button`,"aria-label":N(`Close`),onClick:D,children:(0,A.jsx)(j,{name:`close`})}),(0,A.jsx)(`h2`,{id:`people-title`,children:N(`People`)}),(0,A.jsx)(`p`,{className:`modal-description`,children:N(`People you invite sign in with a passkey at the public address and can do everything you can in the papers you share with them, including approving the commands agents run on this host and pushing with its Git credentials.`)}),(0,A.jsxs)(`p`,{className:`people-warning`,children:[(0,A.jsx)(j,{name:`alert`,size:15}),(0,A.jsx)(`span`,{children:N(`Agents and builds can read any file on this host, including your other papers. Invite only people you would trust with access to it.`)})]}),a&&!a.origin&&(0,A.jsx)(`p`,{className:`people-setup`,children:N(`To invite people, give Papilot a public HTTPS address: set PAPILOT_ACCOUNT_ORIGIN and forward it to this host, as the Collaborators section of the guide describes.`)}),a?.origin&&(0,A.jsxs)(`form`,{className:`people-invite`,onSubmit:e=>{e.preventDefault(),h.trim()&&x()},children:[(0,A.jsxs)(`label`,{children:[N(`Invite someone`),(0,A.jsx)(`input`,{value:h,maxLength:80,onChange:e=>g(e.target.value),placeholder:N(`Their name, as others will see it`),autoComplete:`off`})]}),O(_,(e,t)=>y(n=>t?[...n,e]:n.filter(t=>t!==e)),l===`invite`,N(`Papers they can open`)),(0,A.jsx)(`div`,{className:`button-row`,children:(0,A.jsx)(`button`,{className:`button primary`,disabled:!h.trim()||!!l,children:N(l===`invite`?`Creating…`:`Create invite link`)})})]}),s&&(0,A.jsx)(`p`,{className:`inline-error`,role:`alert`,children:s}),!a&&l===`load`&&(0,A.jsx)(`p`,{className:`muted`,role:`status`,children:N(`Loading people…`)}),(0,A.jsx)(`ul`,{className:`people-list`,children:a?.people.map(e=>{let t=e.role===`owner`,r=e.devices.filter(e=>e.kind===`session`);return(0,A.jsxs)(`li`,{className:`person`,children:[(0,A.jsxs)(`div`,{className:`person-head`,children:[(0,A.jsx)(`strong`,{children:t?N(`{name} (you)`,{name:e.name}):e.name}),(0,A.jsx)(`span`,{className:`muted`,children:t?N(`Owner`):e.joined?e.lastSeenAt?N(`Last active {time}`,{time:n(e.lastSeenAt)}):N(`Joined`):N(`Invited, not joined yet`)})]}),!t&&O(e.projects,(t,n)=>void C(e,t,n),l===`share:`+e.id,N(`Papers {name} can open`,{name:e.name})),d[e.id]&&(0,A.jsxs)(`div`,{className:`invite-link`,children:[(0,A.jsx)(`input`,{readOnly:!0,"aria-label":N(`Invite link for {name}`,{name:e.name}),value:d[e.id],onFocus:e=>e.currentTarget.select()}),(0,A.jsxs)(`button`,{type:`button`,className:`button secondary compact`,onClick:()=>void navigator.clipboard?.writeText(d[e.id]),children:[(0,A.jsx)(j,{name:`copy`,size:14}),N(`Copy`)]}),(0,A.jsx)(`small`,{className:`muted`,children:t?N(`Open it on the device you want to sign in from. It works once, within 15 minutes.`):N(`Send it to {name} yourself. It works once, within 7 days.`,{name:e.name})})]}),e.devices.length>0&&(0,A.jsx)(`ul`,{className:`device-list`,children:e.devices.map(t=>(0,A.jsxs)(`li`,{children:[(0,A.jsx)(j,{name:t.kind===`passkey`?`key`:`monitor`,size:14}),(0,A.jsx)(`span`,{children:t.kind===`passkey`?N(`Passkey · {label}`,{label:t.label}):N(`Signed in · {label}`,{label:t.label})}),(0,A.jsx)(`span`,{className:`muted`,children:t.lastUsedAt?N(`used {time}`,{time:n(t.lastUsedAt)}):N(`added {time}`,{time:n(t.createdAt)})}),(0,A.jsx)(`button`,{type:`button`,className:`button secondary compact`,disabled:!!l,"aria-label":N(`Remove {device}`,{device:t.label}),onClick:()=>void w(e,t),children:N(`Remove`)})]},t.id))}),a.origin&&(0,A.jsxs)(`div`,{className:`person-actions`,children:[(0,A.jsx)(`button`,{type:`button`,className:`button secondary compact`,disabled:!!l,onClick:()=>void S(e),children:t?N(`Sign in from anywhere`):e.joined?N(`Invite link for a new device`):N(`New invite link`)}),r.length>0&&(0,A.jsx)(`button`,{type:`button`,className:`button secondary compact`,disabled:!!l,onClick:()=>void E(e),children:N(`Sign out everywhere`)}),!t&&(p===e.id?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`button`,{type:`button`,className:`button danger compact`,disabled:!!l,onClick:()=>{m(``),T(e)},children:N(`Remove {name}`,{name:e.name})}),(0,A.jsx)(`button`,{type:`button`,className:`button secondary compact`,onClick:()=>m(``),children:N(`Cancel`)})]}):(0,A.jsx)(`button`,{type:`button`,className:`button secondary compact`,disabled:!!l,onClick:()=>m(e.id),children:N(`Remove…`)}))]})]},e.id)})})]})})}function ft(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function pt(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function mt(){return ht.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var ht={stubThis:e=>e};function gt(e){let{id:t}=e;return{...e,id:pt(t),transports:e.transports,type:e.type}}function _t(e){return e===`localhost`||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}var vt=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??n.name,this.code=t}};function yt({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new vt({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new vt({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new vt({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new vt({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new vt({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new vt({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new vt({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new vt({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!_t(t))return new vt({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new vt({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new vt({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new vt({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}var bt=new class{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},xt=[`cross-platform`,`platform`];function St(e){if(e&&!(xt.indexOf(e)<0))return e}async function Ct(e){!e.optionsJSON&&e.challenge&&(console.warn(`startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useAutoRegister:n=!1}=e;if(!mt())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:pt(t.challenge),user:{...t.user,id:pt(t.user.id)},excludeCredentials:t.excludeCredentials?.map(gt)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=bt.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw yt({error:e,options:i})}if(!a)throw Error(`Registration was not completed`);let{id:o,rawId:s,response:c,type:l}=a,u;typeof c.getTransports==`function`&&(u=c.getTransports());let d;if(typeof c.getPublicKeyAlgorithm==`function`)try{d=c.getPublicKeyAlgorithm()}catch(e){wt(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=ft(e))}catch(e){wt(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=ft(c.getAuthenticatorData())}catch(e){wt(`getAuthenticatorData()`,e)}return{id:o,rawId:ft(s),response:{attestationObject:ft(c.attestationObject),clientDataJSON:ft(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:St(a.authenticatorAttachment)}}function wt(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.\n`,t)}function Tt(){if(!mt())return Et.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?Et.stubThis(new Promise(e=>e(!1))):Et.stubThis(e.isConditionalMediationAvailable())}var Et={stubThis:e=>e};function Dt({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new vt({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new vt({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!_t(t))return new vt({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new vt({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new vt({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function Ot(e){!e.optionsJSON&&e.challenge&&(console.warn(`startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!mt())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(gt));let a={...t,challenge:pt(t.challenge),allowCredentials:i},o={};if(n){if(!await Tt())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation=`conditional`,a.allowCredentials=[]}o.publicKey=a,o.signal=bt.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw Dt({error:e,options:o})}if(!s)throw Error(`Authentication was not completed`);let{id:c,rawId:l,response:u,type:d}=s,f;return u.userHandle&&(f=ft(u.userHandle)),{id:c,rawId:ft(l),response:{authenticatorData:ft(u.authenticatorData),clientDataJSON:ft(u.clientDataJSON),signature:ft(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:St(s.authenticatorAttachment)}}var kt=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20fill='none'%3e%3crect%20x='18'%20y='48'%20width='14'%20height='10'%20fill='%23F0F4F8'%20stroke='%23000000'%20stroke-width='2'/%3e%3crect%20x='32'%20y='48'%20width='14'%20height='10'%20fill='%23C6D5E5'%20stroke='%23000000'%20stroke-width='2'/%3e%3cpath%20d='M32%206L12%2034L18%2048H32V6Z'%20fill='%23FFFFFF'/%3e%3cpath%20d='M32%206L52%2034L46%2048H32V6Z'%20fill='%23356AA0'/%3e%3cpath%20d='M32%206L52%2034L46%2048H18L12%2034L32%206Z'%20stroke='%23000000'%20stroke-width='2'%20stroke-linejoin='miter'%20stroke-miterlimit='2'/%3e%3cpath%20d='M32%206V20'%20stroke='%23000000'%20stroke-width='2'/%3e%3cpath%20d='M32%2020Q35%2031%2046%2034Q35%2037%2032%2048Q29%2037%2018%2034Q29%2031%2032%2020Z'%20fill='%23FFFFFF'%20stroke='%23000000'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3c/svg%3e`,At=e=>e instanceof Error&&(e.name===`NotAllowedError`||e.name===`AbortError`),jt=e=>e instanceof Error?e.message:String(e);function Mt({api:e,onSignedIn:t}){let[n,r]=(0,v.useState)(!1),[i,a]=(0,v.useState)(``);async function o(){r(!0),a(``);try{await e(`/auth/verify`,{response:await Ot({optionsJSON:await e(`/auth/options`,{})})}),t()}catch(e){a(At(e)?N(`Signing in was cancelled. Try again when you are ready.`):jt(e))}finally{r(!1)}}return(0,A.jsx)(`div`,{className:`home sign-in`,children:(0,A.jsxs)(`div`,{className:`home-inner`,children:[(0,A.jsx)(`img`,{className:`home-logo`,src:kt,alt:``}),(0,A.jsx)(`h1`,{children:N(`Sign in to Papilot`)}),mt()?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`p`,{className:`home-copy`,children:N(`Use the passkey you created from your invite link.`)}),(0,A.jsxs)(`button`,{className:`button primary`,disabled:n,"aria-busy":n,onClick:()=>void o(),children:[(0,A.jsx)(j,{name:`key`,size:16}),N(n?`Waiting for your passkey…`:`Sign in with a passkey`)]})]}):(0,A.jsx)(`p`,{className:`home-copy`,children:N(`This browser cannot use passkeys. Open this page in a current version of Safari, Chrome, Edge or Firefox.`)}),i&&(0,A.jsx)(`p`,{className:`inline-error home-error`,role:`alert`,children:i}),(0,A.jsx)(`p`,{className:`home-copy muted sign-in-help`,children:N(`No passkey on this device? Ask the person who invited you for a new invite link.`)})]})})}function Nt({api:e,onDone:t}){let[n]=(0,v.useState)(()=>location.hash.slice(1)),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(``);(0,v.useEffect)(()=>{history.replaceState(null,``,`/invite`),n?e(`/auth/invite`,{token:n}).then(i,e=>c(jt(e))):c(N(`This invite link is incomplete. Copy the whole link and open it again.`))},[]);async function l(){o(!0),c(``);try{let r=await Ct({optionsJSON:await e(`/auth/invite/options`,{token:n})});await e(`/auth/invite/verify`,{token:n,response:r}),history.replaceState(null,``,`/`),t()}catch(e){c(At(e)?N(`Creating the passkey was cancelled. The link still works; try again when you are ready.`):jt(e))}finally{o(!1)}}let u=r?.papers.join(N(`, `))||``;return(0,A.jsx)(`div`,{className:`home sign-in`,children:(0,A.jsxs)(`div`,{className:`home-inner`,children:[(0,A.jsx)(`img`,{className:`home-logo`,src:kt,alt:``}),(0,A.jsx)(`h1`,{children:r?.adding?N(`Add a passkey`):N(`Join Papilot`)}),r&&(0,A.jsx)(`p`,{className:`home-copy`,children:r.owner?N(`Create a passkey to sign in to your Papilot from anywhere.`):r.adding?N(`Create a passkey on this device to sign in as {name}.`,{name:r.name}):u?N(`{inviter} invited you to work on {papers}. You will appear as {name}.`,{inviter:r.inviter,papers:u,name:r.name}):N(`{inviter} invited you to Papilot. You will appear as {name}.`,{inviter:r.inviter,name:r.name})}),r&&(mt()?(0,A.jsxs)(`button`,{className:`button primary`,disabled:a,"aria-busy":a,onClick:()=>void l(),children:[(0,A.jsx)(j,{name:`key`,size:16}),N(a?`Waiting for your passkey…`:`Create a passkey`)]}):(0,A.jsx)(`p`,{className:`home-copy`,children:N(`This browser cannot use passkeys. Open this page in a current version of Safari, Chrome, Edge or Firefox.`)})),!r&&!s&&(0,A.jsx)(`p`,{className:`home-copy`,role:`status`,children:(0,A.jsx)(`span`,{className:`spinner`})}),s&&(0,A.jsx)(`p`,{className:`inline-error home-error`,role:`alert`,children:s}),r&&(0,A.jsx)(`p`,{className:`home-copy muted sign-in-help`,children:N(`A passkey signs you in with Face ID, Touch ID, Windows Hello or your phone. Papilot never sees a password.`)})]})})}var Pt=!1,Ft=new Set;function It(e){if(Pt!==e){Pt=e;for(let e of Ft)e()}}var Lt=()=>Pt;function Rt(){return(0,v.useSyncExternalStore)(e=>(Ft.add(e),()=>Ft.delete(e)),()=>Pt)}function zt(){try{for(let e of Object.keys(localStorage))(e.startsWith(`papilot:`)||e.startsWith(`latex-review:`))&&e!==`papilot:theme`&&e!==`papilot:language`&&M.removeItem(e)}catch{}}function Bt(){}function Vt(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Ht(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var I=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ut=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,L={};function Wt(e,t){return((t||L).jsx?Ut:I).test(e)}var Gt=/[ \t\n\f\r]/g;function Kt(e){return typeof e==`object`?e.type===`text`&&R(e.value):R(e)}function R(e){return e.replace(Gt,``)===``}var qt=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};qt.prototype.normal={},qt.prototype.property={},qt.prototype.space=void 0;function Jt(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new qt(n,r,t)}function Yt(e){return e.toLowerCase()}var Xt=class{constructor(e,t){this.attribute=t,this.property=e}};Xt.prototype.attribute=``,Xt.prototype.booleanish=!1,Xt.prototype.boolean=!1,Xt.prototype.commaOrSpaceSeparated=!1,Xt.prototype.commaSeparated=!1,Xt.prototype.defined=!1,Xt.prototype.mustUseProperty=!1,Xt.prototype.number=!1,Xt.prototype.overloadedBoolean=!1,Xt.prototype.property=``,Xt.prototype.spaceSeparated=!1,Xt.prototype.space=void 0;var Zt=s({boolean:()=>z,booleanish:()=>$t,commaOrSpaceSeparated:()=>nn,commaSeparated:()=>tn,number:()=>B,overloadedBoolean:()=>en,spaceSeparated:()=>V}),Qt=0,z=rn(),$t=rn(),en=rn(),B=rn(),V=rn(),tn=rn(),nn=rn();function rn(){return 2**++Qt}var an=Object.keys(Zt),on=class extends Xt{constructor(e,t,n,r){let i=-1;if(super(e,t),sn(this,`space`,r),typeof n==`number`)for(;++i<an.length;){let e=an[i];sn(this,an[i],(n&Zt[e])===Zt[e])}}};on.prototype.defined=!0;function sn(e,t,n){n&&(e[t]=n)}function cn(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new on(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Yt(r)]=r,n[Yt(a.attribute)]=r}return new qt(t,n,e.space)}var ln=cn({properties:{ariaActiveDescendant:null,ariaAtomic:$t,ariaAutoComplete:null,ariaBusy:$t,ariaChecked:$t,ariaColCount:B,ariaColIndex:B,ariaColSpan:B,ariaControls:V,ariaCurrent:null,ariaDescribedBy:V,ariaDetails:null,ariaDisabled:$t,ariaDropEffect:V,ariaErrorMessage:null,ariaExpanded:$t,ariaFlowTo:V,ariaGrabbed:$t,ariaHasPopup:null,ariaHidden:$t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:V,ariaLevel:B,ariaLive:null,ariaModal:$t,ariaMultiLine:$t,ariaMultiSelectable:$t,ariaOrientation:null,ariaOwns:V,ariaPlaceholder:null,ariaPosInSet:B,ariaPressed:$t,ariaReadOnly:$t,ariaRelevant:null,ariaRequired:$t,ariaRoleDescription:V,ariaRowCount:B,ariaRowIndex:B,ariaRowSpan:B,ariaSelected:$t,ariaSetSize:B,ariaSort:null,ariaValueMax:B,ariaValueMin:B,ariaValueNow:B,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function un(e,t){return t in e?e[t]:t}function dn(e,t){return un(e,t.toLowerCase())}var fn=cn({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:tn,acceptCharset:V,accessKey:V,action:null,allow:null,allowFullScreen:z,allowPaymentRequest:z,allowUserMedia:z,alpha:z,alt:null,as:null,async:z,autoCapitalize:null,autoComplete:V,autoFocus:z,autoPlay:z,blocking:V,capture:null,charSet:null,checked:z,cite:null,className:V,closedBy:null,colorSpace:null,cols:B,colSpan:B,command:null,commandFor:null,content:null,contentEditable:$t,controls:z,controlsList:V,coords:B|tn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:z,defer:z,dir:null,dirName:null,disabled:z,download:en,draggable:$t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:z,formTarget:null,headers:V,height:B,hidden:en,high:B,href:null,hrefLang:null,htmlFor:V,httpEquiv:V,id:null,imageSizes:null,imageSrcSet:null,inert:z,inputMode:null,integrity:null,is:null,isMap:z,itemId:null,itemProp:V,itemRef:V,itemScope:z,itemType:V,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:z,low:B,manifest:null,max:null,maxLength:B,media:null,method:null,min:null,minLength:B,multiple:z,muted:z,name:null,nonce:null,noModule:z,noValidate:z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:z,optimum:B,pattern:null,ping:V,placeholder:null,playsInline:z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:z,referrerPolicy:null,rel:V,required:z,reversed:z,rows:B,rowSpan:B,sandbox:V,scope:null,scoped:z,seamless:z,selected:z,shadowRootClonable:z,shadowRootCustomElementRegistry:z,shadowRootDelegatesFocus:z,shadowRootMode:null,shadowRootSerializable:z,shape:null,size:B,sizes:null,slot:null,span:B,spellCheck:$t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:B,step:null,style:null,tabIndex:B,target:null,title:null,translate:null,type:null,typeMustMatch:z,useMap:null,value:$t,width:B,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:V,axis:null,background:null,bgColor:null,border:B,borderColor:null,bottomMargin:B,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:z,declare:z,event:null,face:null,frame:null,frameBorder:null,hSpace:B,leftMargin:B,link:null,longDesc:null,lowSrc:null,marginHeight:B,marginWidth:B,noResize:z,noHref:z,noShade:z,noWrap:z,object:null,profile:null,prompt:null,rev:null,rightMargin:B,rules:null,scheme:null,scrolling:$t,standby:null,summary:null,text:null,topMargin:B,valueType:null,version:null,vAlign:null,vLink:null,vSpace:B,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:z,disablePictureInPicture:z,disableRemotePlayback:z,exportParts:tn,part:V,prefix:null,property:null,results:B,security:null,unselectable:null},space:`html`,transform:dn}),pn=cn({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:nn,accentHeight:B,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:B,amplitude:B,arabicForm:null,ascent:B,attributeName:null,attributeType:null,azimuth:B,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:B,by:null,calcMode:null,capHeight:B,className:V,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:B,diffuseConstant:B,direction:null,display:null,dur:null,divisor:B,dominantBaseline:null,download:z,dx:null,dy:null,edgeMode:null,editable:null,elevation:B,enableBackground:null,end:null,event:null,exponent:B,externalResourcesRequired:null,fill:null,fillOpacity:B,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:tn,g2:tn,glyphName:tn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:B,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:B,horizOriginX:B,horizOriginY:B,id:null,ideographic:B,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:B,k:B,k1:B,k2:B,k3:B,k4:B,kernelMatrix:nn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:B,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:B,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:B,overlineThickness:B,paintOrder:null,panose1:null,path:null,pathLength:B,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:V,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:B,pointsAtY:B,pointsAtZ:B,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:nn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:nn,rev:nn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:nn,requiredFeatures:nn,requiredFonts:nn,requiredFormats:nn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:B,specularExponent:B,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:B,strikethroughThickness:B,string:null,stroke:null,strokeDashArray:nn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:B,strokeOpacity:B,strokeWidth:null,style:null,surfaceScale:B,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:nn,tabIndex:B,tableValues:null,target:null,targetX:B,targetY:B,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:nn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:B,underlineThickness:B,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:B,values:null,vAlphabetic:B,vMathematical:B,vectorEffect:null,vHanging:B,vIdeographic:B,version:null,vertAdvY:B,vertOriginX:B,vertOriginY:B,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:B,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:un}),mn=cn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),hn=cn({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:dn}),gn=cn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),_n={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},vn=/[A-Z]/g,yn=/-[a-z]/g,bn=/^data[-\w.:]+$/i;function xn(e,t){let n=Yt(t),r=t,i=Xt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&bn.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(yn,Cn);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!yn.test(e)){let n=e.replace(vn,Sn);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=on}return new i(r,t)}function Sn(e){return`-`+e.toLowerCase()}function Cn(e){return e.charAt(1).toUpperCase()}var wn=Jt([ln,fn,mn,hn,gn],`html`),Tn=Jt([ln,pn,mn,hn,gn],`svg`);function En(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Dn(e){return e.join(` `).trim()}var On=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
175
+ `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),kn=o(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(On());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),An=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),jn=o(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(kn()),i=An();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),Mn=Pn(`end`),Nn=Pn(`start`);function Pn(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Fn(e){let t=Nn(e),n=Mn(e);if(t&&n)return{start:t,end:n}}function In(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Rn(e.position):`start`in e||`end`in e?Rn(e):`line`in e||`column`in e?Ln(e):``}function Ln(e){return zn(e&&e.line)+`:`+zn(e&&e.column)}function Rn(e){return Ln(e&&e.start)+`-`+Ln(e&&e.end)}function zn(e){return e&&typeof e==`number`?e:1}var Bn=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=In(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Bn.prototype.file=``,Bn.prototype.name=``,Bn.prototype.reason=``,Bn.prototype.message=``,Bn.prototype.stack=``,Bn.prototype.column=void 0,Bn.prototype.line=void 0,Bn.prototype.ancestors=void 0,Bn.prototype.cause=void 0,Bn.prototype.fatal=void 0,Bn.prototype.place=void 0,Bn.prototype.ruleId=void 0,Bn.prototype.source=void 0;var Vn=l(jn(),1),Hn={}.hasOwnProperty,Un=new Map,Wn=/[A-Z]/g,Gn=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Kn=new Set([`td`,`th`]),qn=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Jn(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=ar(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=ir(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Tn:wn,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Yn(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Yn(e,t,n){if(t.type===`element`)return Xn(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Zn(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return $n(e,t,n);if(t.type===`mdxjsEsm`)return Qn(e,t);if(t.type===`root`)return er(e,t,n);if(t.type===`text`)return tr(e,t)}function Xn(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Tn,e.schema=i),e.ancestors.push(t);let a=dr(e,t.tagName,!1),o=or(e,t),s=cr(e,t);return Gn.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Kt(e)})),nr(e,o,a,t),rr(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Zn(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}fr(e,t.position)}function Qn(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);fr(e,t.position)}function $n(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Tn,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:dr(e,t.name,!0),o=sr(e,t),s=cr(e,t);return nr(e,o,a,t),rr(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function er(e,t,n){let r={};return rr(r,cr(e,t)),e.create(t,e.Fragment,r,n)}function tr(e,t){return t.value}function nr(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function rr(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function ir(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function ar(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Nn(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function or(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Hn.call(t.properties,i)){let a=lr(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Kn.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function sr(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else fr(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else fr(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function cr(e,t){let n=[],r=-1,i=e.passKeys?new Map:Un;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Yn(e,a,o);s!==void 0&&n.push(s)}return n}function lr(e,t,n){let r=xn(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ht(n):Dn(n)),r.property===`style`){let t=typeof n==`object`?n:ur(e,String(n));return e.stylePropertyNameCase===`css`&&(t=pr(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?_n[r.property]||r.property:r.attribute,n]}}function ur(e,t){try{return(0,Vn.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Bn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=qn+`#cannot-parse-style-attribute`,r}}function dr(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Wt(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Wt(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Hn.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);fr(e)}function fr(e,t){let n=new Bn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=qn+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function pr(e){let t={},n;for(n in e)Hn.call(e,n)&&(t[mr(n)]=e[n]);return t}function mr(e){let t=e.replace(Wn,hr);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function hr(e){return`-`+e.toLowerCase()}var gr={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},_r={};function vr(e,t){let n=t||_r;return yr(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function yr(e,t,n){if(xr(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return br(e.children,t,n)}return Array.isArray(e)?br(e,t,n):``}function br(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=yr(e[i],t,n);return r.join(``)}function xr(e){return!!(e&&typeof e==`object`)}var Sr=document.createElement(`i`);function Cr(e){let t=`&`+e+`;`;Sr.innerHTML=t;let n=Sr.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function wr(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Tr(e,t){return e.length>0?(wr(e,e.length,0,t),e):t}var Er={}.hasOwnProperty;function Dr(e){let t={},n=-1;for(;++n<e.length;)Or(t,e[n]);return t}function Or(e,t){let n;for(n in t){let r=(Er.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Er.call(r,a)||(r[a]=[]);let e=i[a];kr(r[a],Array.isArray(e)?e:e?[e]:[])}}}function kr(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);wr(e,0,0,r)}function Ar(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function jr(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Mr=Vr(/[A-Za-z]/),Nr=Vr(/[\dA-Za-z]/),Pr=Vr(/[#-'*+\--9=?A-Z^-~]/);function Fr(e){return e!==null&&(e<32||e===127)}var Ir=Vr(/\d/),Lr=Vr(/[\dA-Fa-f]/),Rr=Vr(/[!-/:-@[-`{-~]/);function H(e){return e!==null&&e<-2}function U(e){return e!==null&&(e<0||e===32)}function W(e){return e===-2||e===-1||e===32}var zr=Vr(/\p{P}|\p{S}/u),Br=Vr(/\s/);function Vr(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Hr(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Nr(e.charCodeAt(n+1))&&Nr(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function G(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return W(r)?(e.enter(n),s(r)):t(r)}function s(r){return W(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function Ur(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&W(t)?(e.enter(r),c(t)):l(t)}function c(t){return W(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var Wr={tokenize:Gr};function Gr(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),G(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return H(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Kr=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){qr(this,e,t,n,!1)}addBefore(e,t,n){qr(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function qr(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var Jr={tokenize:Xr},Yr={tokenize:Zr};function Xr(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new Kr;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Yr,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Yr,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return H(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new Kr;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Zr(e,t,n){return G(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Qr(e){if(e===null||U(e)||Br(e))return 1;if(zr(e))return 2}function $r(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var ei={name:`attention`,resolveAll:ti,tokenize:ni};function ti(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};ri(o,-a),ri(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=Tr(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=Tr(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=Tr(r,$r(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=Tr(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=Tr(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),wr(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function ni(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Qr(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Qr(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function ri(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ii={name:`autolink`,tokenize:ai};function ai(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Mr(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Nr(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Nr(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Fr(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Pr(t)?(e.consume(t),l):n(t)}function u(e){return Nr(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Nr(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var oi={partial:!0,tokenize:si};function si(e,t,n){return r;function r(t){return W(t)?G(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||H(e)?t(e):n(e)}}var ci={continuation:{tokenize:ui},exit:di,name:`blockQuote`,tokenize:li};function li(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return W(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function ui(e,t,n){let r=this;return i;function i(t){return W(t)?G(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(ci,t,n)(r)}}function di(e){e.exit(`blockQuote`)}var fi={name:`characterEscape`,tokenize:pi};function pi(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Rr(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var mi={name:`characterReference`,tokenize:hi};function hi(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Nr,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Lr,u):(e.enter(`characterReferenceValue`),a=7,o=Ir,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Nr&&!Cr(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var gi={partial:!0,tokenize:_i};function _i(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var vi={concrete:!0,name:`codeFenced`,tokenize:yi};function yi(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),W(t)?G(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||H(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(gi,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||H(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):W(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),G(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||H(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||H(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&W(t)?G(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||H(t)?e.check(gi,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||H(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),W(t)?G(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),W(t)?G(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||H(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var bi={name:`codeIndented`,tokenize:Si},xi={partial:!0,tokenize:Ci};function Si(e,t,n){return r;function r(t){return e.enter(`codeIndented`),Ur(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):H(t)?e.attempt(xi,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||H(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function Ci(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):H(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):Ur(e,t,a,`linePrefix`,4,4)(o)}function a(e){return H(e)?i(e):n(e)}}var wi={name:`codeText`,previous:Ei,resolve:Ti,tokenize:Di};function Ti(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Ei(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Di(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):H(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||H(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Oi=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&ki(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),ki(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ki(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);ki(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);ki(this.left,t.reverse())}}}};function ki(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ai(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Oi(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,ji(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return wr(e,0,1/0,u.slice(0)),!l}function ji(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Mi={resolve:Pi,tokenize:Fi},Ni={partial:!0,tokenize:Ii};function Pi(e){return Ai(e),e}function Fi(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):H(t)?e.check(Ni,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Ii(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),G(e,a,`linePrefix`)}function a(i){if(i===null||H(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Li(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Fr(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||H(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||U(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Fr(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Ri(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):H(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||H(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!W(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function zi(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):H(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),G(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||H(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Bi(e,t){let n;return r;function r(i){return H(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):W(i)?G(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Vi={name:`definition`,tokenize:Ui},Hi={partial:!0,tokenize:Wi};function Ui(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Ri.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=jr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return U(t)?Bi(e,l)(t):l(t)}function l(t){return Li(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Hi,d,d)(t)}function d(t){return W(t)?G(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||H(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Wi(e,t,n){return r;function r(t){return U(t)?Bi(e,i)(t):n(t)}function i(t){return zi(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return W(t)?G(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||H(e)?t(e):n(e)}}var Gi={name:`hardBreakEscape`,tokenize:Ki};function Ki(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return H(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var qi={name:`headingAtx`,resolve:Ji,tokenize:Yi};function Ji(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};wr(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function Yi(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||U(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||H(n)?(e.exit(`atxHeading`),t(n)):W(n)?G(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||U(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Xi=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Zi=[`pre`,`script`,`style`,`textarea`],Qi={concrete:!0,name:`htmlFlow`,resolveTo:$i,tokenize:ea},K={partial:!0,tokenize:ta};function $i(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function ea(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:re):Mr(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Mr(a)?(e.consume(a),i=4,r.interrupt?t:re):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:re):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Mr(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||U(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Zi.includes(l)?(i=1,r.interrupt?t(s):O(s)):Xi.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Nr(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return W(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Mr(t)?(e.consume(t),b):W(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Nr(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):W(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):W(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||H(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||U(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||W(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||H(t)?O(t):W(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),te):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),ie):t===63&&i===3?(e.consume(t),re):t===93&&i===5?(e.consume(t),M):H(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(K,ae,k)(t)):t===null||H(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(gi,ee,ae)(t)}function ee(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),A}function A(t){return t===null||H(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function te(t){return t===45?(e.consume(t),re):O(t)}function j(t){return t===47?(e.consume(t),o=``,ne):O(t)}function ne(t){if(t===62){let n=o.toLowerCase();return Zi.includes(n)?(e.consume(t),ie):O(t)}return Mr(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ne):O(t)}function M(t){return t===93?(e.consume(t),re):O(t)}function re(t){return t===62?(e.consume(t),ie):t===45&&i===2?(e.consume(t),re):O(t)}function ie(t){return t===null||H(t)?(e.exit(`htmlFlowData`),ae(t)):(e.consume(t),ie)}function ae(n){return e.exit(`htmlFlow`),t(n)}}function ta(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(oi,t,n)}}var na={name:`htmlText`,tokenize:ra};function ra(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Mr(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Mr(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):H(t)?(o=d,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?te(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):H(t)?(o=h,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?te(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?te(t):H(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):H(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?te(e):y(e)}function x(t){return Mr(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Nr(t)?(e.consume(t),S):C(t)}function C(t){return H(t)?(o=C,j(t)):W(t)?(e.consume(t),C):te(t)}function w(t){return t===45||Nr(t)?(e.consume(t),w):t===47||t===62||U(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),te):t===58||t===95||Mr(t)?(e.consume(t),E):H(t)?(o=T,j(t)):W(t)?(e.consume(t),T):te(t)}function E(t){return t===45||t===46||t===58||t===95||Nr(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):H(t)?(o=D,j(t)):W(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):H(t)?(o=O,j(t)):W(t)?(e.consume(t),O):(e.consume(t),ee)}function k(t){return t===i?(e.consume(t),i=void 0,A):t===null?n(t):H(t)?(o=k,j(t)):(e.consume(t),k)}function ee(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||U(t)?T(t):(e.consume(t),ee)}function A(e){return e===47||e===62||U(e)?T(e):n(e)}function te(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return W(t)?G(e,M,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):M(t)}function M(t){return e.enter(`htmlTextData`),o(t)}}var ia={name:`labelEnd`,resolveAll:ca,resolveTo:la,tokenize:ua},aa={tokenize:da},oa={tokenize:fa},sa={tokenize:pa};function ca(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&wr(e,0,e.length,n),e}function la(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=Tr(o,e.slice(i+1,i+r+3)),o=Tr(o,[[`enter`,l,t]]),o=Tr(o,$r(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=Tr(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=Tr(o,e.slice(a+1)),o=Tr(o,[[`exit`,s,t]]),wr(e,i,e.length,o),e}function ua(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(jr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(aa,u,o?u:d)(t):t===91?e.attempt(oa,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(sa,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function da(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return U(t)?Bi(e,a)(t):a(t)}function a(t){return t===41?u(t):Li(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return U(t)?Bi(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?zi(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return U(t)?Bi(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function fa(e,t,n){let r=this;return i;function i(t){return Ri.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(jr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function pa(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var ma={name:`labelStartImage`,resolveAll:ia.resolveAll,tokenize:ha};function ha(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var ga={name:`labelStartLink`,resolveAll:ia.resolveAll,tokenize:_a};function _a(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var va={name:`lineEnding`,tokenize:ya};function ya(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),G(e,t,`linePrefix`)}}var ba={name:`thematicBreak`,tokenize:xa};function xa(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||H(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),W(t)?G(e,s,`whitespace`)(t):s(t))}}var Sa={continuation:{tokenize:Ea},exit:Oa,name:`list`,tokenize:Ta},Ca={partial:!0,tokenize:ka},wa={partial:!0,tokenize:Da};function Ta(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Ir(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(ba,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Ir(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(oi,r.interrupt?n:u,e.attempt(Ca,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return W(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Ea(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(oi,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,G(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!W(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(wa,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,G(e,e.attempt(Sa,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Da(e,t,n){let r=this;return G(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Oa(e){e.exit(this.containerState.type)}function ka(e,t,n){let r=this;return G(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!W(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Aa={name:`setextUnderline`,resolveTo:ja,tokenize:Ma};function ja(e,t){let n=new Kr,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function Ma(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),W(t)?G(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||H(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Na={tokenize:Pa};function Pa(e){let t=this,n=e.attempt(oi,r,e.attempt(this.parser.constructs.flowInitial,i,G(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Mi,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Fa={resolveAll:za()},Ia=Ra(`string`),La=Ra(`text`);function Ra(e){return{resolveAll:za(e===`text`?Ba:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function za(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Ba(e,t){let n=new Kr,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var Va=s({attentionMarkers:()=>Ya,contentInitial:()=>Ua,disable:()=>Xa,document:()=>Ha,flow:()=>Ga,flowInitial:()=>Wa,insideSpan:()=>Ja,string:()=>Ka,text:()=>qa}),Ha={42:Sa,43:Sa,45:Sa,48:Sa,49:Sa,50:Sa,51:Sa,52:Sa,53:Sa,54:Sa,55:Sa,56:Sa,57:Sa,62:ci},Ua={91:Vi},Wa={[-2]:bi,[-1]:bi,32:bi},Ga={35:qi,42:ba,45:[Aa,ba],60:Qi,61:Aa,95:ba,96:vi,126:vi},Ka={38:mi,92:fi},qa={[-5]:va,[-4]:va,[-3]:va,33:ma,38:mi,42:ei,60:[ii,na],91:ga,92:[Gi,fi],93:ia,95:ei,96:wi},Ja={null:[ei,Fa]},Ya={null:[42,95]},Xa={null:[]};function Za(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Tr(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=$r(a,l.events,l),l.events):[]}function f(e,t){return $a(p(e),t)}function p(e){return Qa(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){H(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&wr(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Qa(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function $a(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
176
+ `;break;case-3:o=`\r
177
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function eo(e){let t={constructs:Dr([Va,...(e||{}).extensions||[]]),content:n(Wr),defined:[],document:n(Jr),flow:n(Na),lazy:{},string:n(Ia),text:n(La)};return t;function n(e){return n;function n(n){return Za(t,e,n)}}}function to(e){for(;!Ai(e););return e}var no=/[\0\t\n\r]/g;function ro(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){no.lastIndex=c;let n=no.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var io=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ao(e){return e.replace(io,oo)}function oo(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Ar(n.slice(t?2:1),t?16:10)}return Cr(n)||e}var so={}.hasOwnProperty;function co(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),lo(n)(to(eo(n).document().write(ro()(e,t,!0))))}function lo(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(be),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(F),blockQuote:o(me),characterEscape:E,characterReference:E,codeFenced:o(he),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(he,s),codeText:o(N,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(ge),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(P),hardBreakEscape:o(_e),hardBreakTrailing:o(_e),htmlFlow:o(ve,s),htmlFlowData:E,htmlText:o(ve,s),htmlTextData:E,image:o(ye),label:s,link:o(be),listItem:o(Se),listItemValue:p,listOrdered:o(xe,f),listUnordered:o(xe),paragraph:o(Ce),reference:se,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(F),strong:o(we),thematicBreak:o(Ee)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:pe,autolinkProtocol:fe,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:ue,characterReference:de,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(te),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(ee),htmlFlowData:D,htmlText:l(A),htmlTextData:D,image:l(ne),label:re,labelText:M,lineEnding:O,link:l(j),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ce,resourceDestinationString:ie,resourceTitleString:ae,resource:oe,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};fo(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),so.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||mo).call(o,void 0,e[0])}for(r.position={start:uo(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:uo(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:uo(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+In({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||mo).call(this,e,r[0])),n.position.end=uo(e.end)}function d(){return vr(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=jr(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=Te(),n.position={start:uo(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=uo(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=uo(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ne(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=ao(t),n.identifier=jr(t).toLowerCase()}function re(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ae(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function oe(){this.data.inReference=void 0}function se(){this.data.referenceType=`collapsed`}function ce(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=jr(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function le(e){this.data.characterReferenceType=e.type}function ue(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Ar(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Cr(t);let i=this.stack[this.stack.length-1];i.value+=r}function de(e){let t=this.stack.pop();t.position.end=uo(e.end)}function fe(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function pe(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function me(){return{type:`blockquote`,children:[],position:void 0}}function he(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function N(){return{type:`inlineCode`,value:``,position:void 0}}function ge(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function P(){return{type:`emphasis`,children:[],position:void 0}}function F(){return{type:`heading`,depth:0,children:[],position:void 0}}function _e(){return{type:`break`,position:void 0}}function ve(){return{type:`html`,value:``,position:void 0}}function ye(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function be(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function xe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function Se(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function Ce(){return{type:`paragraph`,children:[],position:void 0}}function we(){return{type:`strong`,children:[],position:void 0}}function Te(){return{type:`text`,value:``,position:void 0}}function Ee(){return{type:`thematicBreak`,position:void 0}}}function uo(e){return{line:e.line,column:e.column,offset:e.offset}}function fo(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?fo(e,r):po(e,r)}}function po(e,t){let n;for(n in t)if(so.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function mo(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+In({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+In({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+In({start:t.start,end:t.end})+`) is still open`)}function ho(e){let t=this;t.parser=n;function n(n){return co(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function go(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function _o(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
178
+ `}]}function vo(e,t){let n=t.value?t.value+`
179
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function yo(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bo(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xo(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Hr(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function So(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Co(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function wo(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function To(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return wo(e,t);let i={src:Hr(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Eo(e,t){let n={src:Hr(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Do(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Oo(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return wo(e,t);let i={href:Hr(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function ko(e,t){let n={href:Hr(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ao(e,t,n){let r=e.all(t),i=n?jo(n):Mo(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
180
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
181
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function jo(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Mo(n[r])}return t}function Mo(e){return e.spread??e.children.length>1}function No(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Po(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fo(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Io(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function q(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Nn(t.children[1]),o=Mn(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Lo(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Ro(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var zo=9,Bo=32;function Vo(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Ho(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Ho(t.slice(i),i>0,!1)),a.join(``)}function Ho(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===zo||t===Bo;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===zo||t===Bo;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Uo(e,t){let n={type:`text`,value:Vo(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Wo(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Go={blockquote:go,break:_o,code:vo,delete:yo,emphasis:bo,footnoteReference:xo,heading:So,html:Co,imageReference:To,image:Eo,inlineCode:Do,linkReference:Oo,link:ko,listItem:Ao,list:No,paragraph:Po,root:Fo,strong:Io,table:q,tableCell:Ro,tableRow:Lo,text:Uo,thematicBreak:Wo,toml:Ko,yaml:Ko,definition:Ko,footnoteDefinition:Ko};function Ko(){}var{defineProperty:qo}=Object,Jo=typeof self==`object`?self:globalThis,Yo=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Jo[e](t)},Xo=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?qo(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Jo[e]==`function`?Yo(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(Yo(a,o),i)};return r},Zo=e=>Xo(new Map,e)(0),Qo=``,{toString:$o}={},{keys:es,is:ts}=Object,ns=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=$o.call(e).slice(8,-1);switch(n){case`Array`:return[1,Qo];case`Object`:return[2,Qo];case`Date`:return[3,Qo];case`RegExp`:return[4,Qo];case`Map`:return[5,Qo];case`Set`:return[6,Qo];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},rs=([e,t])=>e===0&&(t===`function`||t===`symbol`),is=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=ns(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&ts(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of es(o))(e||!rs(ns(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?Qo:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(rs(ns(n))||rs(ns(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!rs(ns(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},as=(e,{json:t,lossy:n}={})=>{let r=[];return is(!(t||n),!!t,new Map,r)(e),r},os=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Zo(as(e,t)):structuredClone(e):(e,t)=>Zo(as(e,t));function ss(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function cs(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function ls(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||ss,r=e.options.footnoteBackLabel||cs,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Hr(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...os(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
182
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
183
+ `}]}}var us=(function(e){if(e==null)return hs;if(typeof e==`function`)return ms(e);if(typeof e==`object`)return Array.isArray(e)?ds(e):fs(e);if(typeof e==`string`)return ps(e);throw Error(`Expected function, string, or object as test`)});function ds(e){let t=[],n=-1;for(;++n<e.length;)t[n]=us(e[n]);return ms(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function fs(e){let t=e;return ms(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function ps(e){return ms(t);function t(t){return t&&t.type===e}}function ms(e){return t;function t(t,n,r){return!!(gs(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function hs(){return!0}function gs(e){return typeof e==`object`&&!!e&&`type`in e}function _s(e){return e}var vs=[],ys=`skip`;function bs(e,t,n,r){if(!e||typeof e!=`object`)throw Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,c;if(typeof n==`function`||n&&typeof n==`object`?(a=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o==`function`)s=o;else if(o&&typeof o==`object`){if(o.enter!==null&&o.enter!==void 0){if(typeof o.enter==`function`)s=o.enter;else throw Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor")}if(typeof o.exit==`function`)c=o.exit;else throw Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let l=us(a),u=i?1:-1;d(e,void 0,[])();function d(e,t,n){let r=e&&typeof e==`object`?e:{};if(typeof r.type==`string`){let t=typeof r.tagName==`string`?r.tagName:typeof r.name==`string`?r.name:void 0;Object.defineProperty(o,"name",{value:`node (`+_s(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=vs;if(s&&r&&(o=xs(s(e,n,t)),o[0]===!1))return o;if(`children`in e&&e.children){let t=e;if(t.children&&o[0]!==`skip`){let e=(i?-1:t.children.length)+u,r=[...n,t];for(;e>-1&&e<t.children.length;){let n=t.children[e],i=d(n,e,r)();if(i[0]===!1)return i;e=typeof i[1]==`number`?i[1]:e+u}}}if(c&&r){let r=xs(c(e,n,t));if(r[0]===`skip`)throw Error("Unexpected value `"+r[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(r[0]===!1||typeof r[1]==`number`)return r}return o}}}function xs(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?vs:[e]}function Ss(e,t,n,r){let i,a,o;typeof n==`function`||n&&typeof n==`object`?(i=t,a=n,o=r):(a=t,o=n),typeof a==`function`?bs(e,i,ws(a),o):bs(e,i,Cs(a),o)}function Cs(e){return!e||typeof e!=`object`?e:{enter:typeof e.enter==`function`?ws(e.enter):e.enter,exit:typeof e.exit==`function`?ws(e.exit):e.exit}}function ws(e){return t;function t(t,n,r){return e(t,r,n[n.length-1])}}var Ts={}.hasOwnProperty,Es={};function Ds(e,t){let n=t||Es,r=new Map,i=new Map,a={all:s,applyData:ks,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Go,...n.handlers},one:o,options:n,patch:Os,wrap:js};return Ss(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Ts.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=os(n);return r.children=a.all(e),r}return os(e)}return(a.options.unknownHandler||As)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Ms(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Ms(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Os(e,t){e.position&&(t.position=Fn(e))}function ks(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,os(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function As(e,t){let n=t.data||{},r=`value`in t&&!(Ts.call(n,`hProperties`)||Ts.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function js(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
184
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
185
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
186
+ `}),n}function Ms(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ns(e,t){let n=Ds(e,t),r=n.one(e,void 0),i=ls(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
187
+ `},i)),a}function Ps(e,t){return e&&`run`in e?async function(n,r){let i=Ns(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ns(n,{file:r,...e||t})}}function Fs(e){if(e)throw e}var Is=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Ls(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Rs(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?zs(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function zs(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Bs={basename:Vs,dirname:Hs,extname:Us,join:Ws,sep:`/`};function Vs(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);qs(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Hs(e){if(qs(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Us(e){qs(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Ws(...e){let t=-1,n;for(;++t<e.length;)qs(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Gs(n)}function Gs(e){qs(e);let t=e.codePointAt(0)===47,n=Ks(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Ks(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function qs(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Js={cwd:Ys};function Ys(){return`/`}function Xs(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Zs(e){if(typeof e==`string`)e=new URL(e);else if(!Xs(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Qs(e)}function Qs(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var $s=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],ec=class{constructor(e){let t;t=e?Xs(e)?{path:e}:typeof e==`string`||ic(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Js.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<$s.length;){let e=$s[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)$s.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Bs.basename(this.path):void 0}set basename(e){nc(e,`basename`),tc(e,`basename`),this.path=Bs.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Bs.dirname(this.path):void 0}set dirname(e){rc(this.basename,`dirname`),this.path=Bs.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Bs.extname(this.path):void 0}set extname(e){if(tc(e,`extname`),rc(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Bs.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Xs(e)&&(e=Zs(e)),nc(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Bs.basename(this.path,this.extname):void 0}set stem(e){nc(e,`stem`),tc(e,`stem`),this.path=Bs.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Bn(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function tc(e,t){if(e&&e.includes(Bs.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Bs.sep+"`")}function nc(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function rc(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function ic(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var ac=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),oc=l(Is(),1),sc={}.hasOwnProperty,cc=new class e extends ac{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Rs()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,oc.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(dc(`data`,this.frozen),this.namespace[e]=t,this):sc.call(this.namespace,e)&&this.namespace[e]||void 0:e?(dc(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=mc(e),n=this.parser||this.Parser;return lc(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),lc(`process`,this.parser||this.Parser),uc(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=mc(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);gc(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),lc(`processSync`,this.parser||this.Parser),uc(`processSync`,this.compiler||this.Compiler),this.process(e,r),pc(`processSync`,`process`,t),n;function r(e,r){t=!0,Fs(e),n=r}}run(e,t,n){fc(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=mc(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),pc(`runSync`,`run`,n),r;function i(e,t){Fs(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=mc(t),r=this.compiler||this.Compiler;return uc(`stringify`,r),fc(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(dc(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,oc.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Ls(o)&&Ls(r)&&(r=(0,oc.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function lc(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function uc(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function dc(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function fc(e){if(!Ls(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function pc(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function mc(e){return hc(e)?e:new ec(e)}function hc(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function gc(e){return typeof e==`string`||_c(e)}function _c(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var vc=[],yc={allowDangerousHtml:!0},bc=/^(https?|ircs?|mailto|xmpp)$/i,xc=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Sc(e){let t=Cc(e),n=wc(e);return Tc(t.runSync(t.parse(n),n),e)}function Cc(e){let t=e.rehypePlugins||vc,n=e.remarkPlugins||vc,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...yc}:yc;return cc().use(ho).use(n).use(Ps,r).use(t)}function wc(e){let t=e.children||``,n=new ec;return typeof t==`string`?n.value=t:``+t,n}function Tc(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Ec;for(let e of xc)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Ss(e,l),Jn(e,{Fragment:A.Fragment,components:i,ignoreInvalidStyle:!0,jsx:A.jsx,jsxs:A.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in gr)if(Object.hasOwn(gr,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=gr[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Ec(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||bc.test(e.slice(0,t))?e:``}function Dc(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Oc(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function kc(e,t,n){let r=us((n||{}).ignore||[]),i=Ac(t),a=-1;for(;++a<i.length;)bs(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return ys}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function Ac(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([jc(e[0]),Mc(e[1])])}return t}function jc(e){return typeof e==`string`?new RegExp(Oc(e),`g`):e}function Mc(e){return typeof e==`function`?e:function(){return e}}var Nc=`phrasing`,Pc=[`autolink`,`link`,`image`,`label`];function Fc(){return{transforms:[Uc],enter:{literalAutolink:Lc,literalAutolinkEmail:Rc,literalAutolinkHttp:Rc,literalAutolinkWww:Rc},exit:{literalAutolink:Hc,literalAutolinkEmail:Vc,literalAutolinkHttp:zc,literalAutolinkWww:Bc}}}function Ic(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Nc,notInConstruct:Pc},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Nc,notInConstruct:Pc},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Nc,notInConstruct:Pc}]}}function Lc(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Rc(e){this.config.enter.autolinkProtocol.call(this,e)}function zc(e){this.config.exit.autolinkProtocol.call(this,e)}function Bc(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Vc(e){this.config.exit.autolinkEmail.call(this,e)}function Hc(e){this.exit(e)}function Uc(e){kc(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Wc],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Gc]],{ignore:[`link`,`linkReference`]})}function Wc(e,t,n,r,i){let a=``;if(!Jc(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Kc(n)))return!1;let o=qc(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Gc(e,t,n,r){return!Jc(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Kc(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function qc(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Dc(e,`(`),a=Dc(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Jc(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Br(n)||zr(n))&&(!t||n!==47)}il.peek=rl;function Yc(){this.buffer()}function Xc(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Zc(){this.buffer()}function Qc(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function $c(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function el(e){this.exit(e)}function tl(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function nl(e){this.exit(e)}function rl(){return`[`}function il(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function al(){return{enter:{gfmFootnoteCallString:Yc,gfmFootnoteCall:Xc,gfmFootnoteDefinitionLabelString:Zc,gfmFootnoteDefinition:Qc},exit:{gfmFootnoteCallString:$c,gfmFootnoteCall:el,gfmFootnoteDefinitionLabelString:tl,gfmFootnoteDefinition:nl}}}function ol(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:il},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
188
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?cl:sl))),s(),o}}function sl(e,t,n){return t===0?e:cl(e,t,n)}function cl(e,t,n){return(n?``:` `)+e}var ll=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];ml.attention=hl,ml.peek=gl;function ul(){return{canContainEols:[`delete`],enter:{strikethrough:fl},exit:{strikethrough:pl}}}function dl(){return{handlers:{delete:ml},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:ll}]}}function fl(e){this.enter({type:`delete`,children:[],position:void 0},e)}function pl(e){this.exit(e)}function ml(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function hl(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function gl(){return`~`}function _l(e){return e.length}function vl(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||_l,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=yl(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=bl(r[d]);else{let e=bl(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding===!1||n.alignDelimiters===!1&&i===``||n.delimiterStart===!1&&!d||r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
189
+ `)}function yl(e){return e==null?``:String(e)}function bl(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var xl=us([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Sl(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Cl);return i(),o}function Cl(e,t,n){return`>`+(n?``:` `)+e}function wl(e,t){return Tl(e,t.inConstruct,!0)&&!Tl(e,t.notInConstruct,!1)}function Tl(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function El(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
190
+ `&&!e.before&&!e.after&&wl(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
191
+ `}function Dl(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Ol(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function kl(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Al(e,t,n,r){let i=kl(n),a=e.value||``;if(Ol(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,jl);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(Dl(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
192
+ `,encode:["`"],...o.current()})),t()}return u+=o.move(`
193
+ `),a&&(u+=o.move(a+`
194
+ `)),u+=o.move(s),c(),u}function jl(e,t,n){return(n?``:` `)+e}function Ml(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Nl(e,t,n,r){let i=Ml(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
195
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Pl(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Fl(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function Il(e){let t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function Ll(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Rl(e,t,n){let r=Qr(e),i=Qr(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function zl(e){if(e.charCodeAt(0)!==60)return;let t=e.charCodeAt(1);if(t===33){let t=e.charCodeAt(2);return t===45?2:t===91?5:Mr(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!Mr(a))return;for(;a===45||Nr(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&Zi.includes(o)?1:Xi.includes(o)?6:7}var Bl=new Map([[`*`,!1],[`_`,!0]]);function Vl(e,t,n){let r=new Set;for(let i of e){let e=n.get(i);if(e&&i.attention&&t.some(e=>e.attention===i.attention))for(let t of e.tokens)r.add(t.attention)}let i=[];for(let t of e)t.attention&&r.delete(t.attention)&&i.push(t.attention);return i.reverse(),i}function Hl(e,t,n){let r=[],i=new Map,a=new Map,o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}let s=e[o].value.charAt(0),c=Bl.get(s),l=o+1;for(;l<e.length&&e[l].attention&&e[l].value.charAt(0)===s;)l++;let u=o?e[o-1].value:t,d=Qr(u.charCodeAt(u.length-1)),f=Qr((l<e.length?e[l].value:n).charCodeAt(0)),p=!f||f===2&&!!d,m=!d||d===2&&!!f,h={tokens:e.slice(o,l),markers:[],start:0,end:0,open:c?p&&(!!d||!m):p,close:c?m&&(!!f||!p):m,split:c!==void 0};for(let e of h.tokens){i.set(e,[...h.tokens]),a.set(e,h);let t=e.value.length;for(;t--;)h.markers.push(e)}h.end=h.markers.length,r.push(h),o=l}for(Gl(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:Vl(e,t,a),index:o}}}function Ul(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?Fl(n.value):Il(n.value),i=Ll(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let e=n.value.slice(0,n.value.length-r.length),t=0;for(;e.charCodeAt(e.length-1-t)===92;)t++;t%2&&(e+=`\\`),n.value=e+i}}function Wl(e,t,n,r,i){for(let a of n.attention){let o=t.get(a)||a.sequences[0];for(let s of a.sequences){if(s===o)continue;let c=new Map(t);c.set(a,s);let l=Yl(e,c,r,i),u=Hl(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function Gl(e,t){let n=new Map;for(let r of e){let e=r.tokens[0].value.charAt(0),i=n.get(e);i||(i=[],n.set(e,i));let a=r.close?i.length:0;for(;a--&&r.start<r.end;){let e=i[a],n=e.end-e.start,o=r.end-r.start;if(r.split?(e.close||r.open)&&o%3&&!((n+o)%3):n!==e.markers.length||n!==o)continue;let s=r.split?n>1&&o>1?2:1:o,c=e.markers.slice(e.end-s,e.end),l=r.markers.slice(r.start,r.start+s),u=c[0],d=l[0];if(u===c[s-1]&&u.value.length===s&&d===l[s-1]&&d.value.length===s&&u.attention===d.attention)t.delete(u),t.delete(d);else{let e=[...new Set([...c,...l])];for(let n of e){let r=t.get(n);r&&r.push(...e)}}e.end-=s,r.start+=s,e.start===e.end&&i.splice(a,1),a=i.length}r.open&&r.start<r.end&&i.push(r)}}function Kl(e,t,n){if(t.length===0)throw Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let t of n)if(!Number.isSafeInteger(t)||t<1)throw Error("Cannot serialize `"+e+"` as attention with `"+t+"` as size, expected positive integer");let r=[];for(let i of t){if(i.length!==1)throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!Rr(i.charCodeAt(0)))throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let e of n)r.push(i.repeat(e))}return r}function ql(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let c=t.createTracker(n);for(;++o<i.length;){let l=i[o],u;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),u=n?Fl(n(i[o+1],e,t,{before:``,after:``,...c.current()})):``}else u=n.after;let d=a[a.length-1];typeof d==`string`&&(s===`\r`||s===`
196
+ `)&&l.type===`html`&&zl(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move(Xl(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=Jl(l,f.attention,t,c);a.push(e),s=Il(e.sequences[0])}else{let n=t.handle(l,e,t,{...c.current(),after:u,before:s});if(!n)continue;c.move(n),a.push(n),s=Il(n)}}return r.pop(),a}function Jl(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=Kl(e.type,a,o),c=s[0],l=n.enter(i);r.move(c);let u=ql(e,n,{...r.current(),before:c,after:c});return r.move(Xl(u,c,c)),r.move(c),l(),{children:u,sequences:s}}function Yl(e,t,n,r){let i=[],a,o=Il(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===Fl(n)&&Ul([e],!0),a=void 0,i.push(e),e.value&&(o=Il(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=Fl(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=Yl(n.children,t,c,c),m=p.length>0?p[0].value:``,h=Rl(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&Ul(p,!0);let g=p.length>0?Il(p[p.length-1].value):``,_=Rl(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&Ul(p,!1),h.outside&&d!==`
197
+ `&&d!==`\r`&&Ul(i,!1),_.outside&&(a=f),i.push({value:c,attention:n},...p,{value:c,attention:n}),o=c.charAt(c.length-1)}return i}function Xl(e,t,n){let r=new Map,i=Yl(e,r,t,n),a=i,o=Hl(a,t,n);for(;o;){let s=Wl(e,r,o,t,n);if(!s){a=i;break}r=s.chosen,a=s.tokens,o=s.mistake}let s=``;for(let e of a)s+=e.value;return s}Zl.attention=Ql,Zl.peek=$l;function Zl(e,t,n,r){let i=n.enter(`phrasing`),a=Xl([Jl(e,Ql,n,n.createTracker(r))],r.before,r.after);return i(),a}function Ql(e,t){return{construct:`emphasis`,markers:Pl(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function $l(e,t,n){return n.options.emphasis||`*`}function eu(e,t){let n=!1;return Ss(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&vr(e)&&(t.options.setext||n))}function tu(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(eu(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
198
+ `,after:`
199
+ `});return r(),t(),o+`
200
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
201
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
202
+ `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=Ll(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}J.peek=nu;function J(e){return e.value||``}function nu(){return`<`}ru.peek=iu;function ru(e,t,n,r){let i=Ml(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function iu(){return`!`}au.peek=ou;function au(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function ou(){return`!`}su.peek=cu;function su(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function cu(){return"`"}function lu(e,t){let n=vr(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}uu.peek=du;function uu(e,t,n,r){let i=Ml(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(lu(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
203
+ `||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function du(e,t,n){return lu(e,n)?`<`:`[`}fu.peek=pu;function fu(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function pu(){return`[`}function mu(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function hu(e){let t=mu(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function gu(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function _u(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function vu(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?gu(n):mu(n),s=e.ordered?o===`.`?`)`:`.`:hu(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),_u(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function yu(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function bu(e,t,n,r){let i=yu(n),a=n.bulletCurrent||mu(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function xu(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function Su(e,t,n,r){if(!e.children.some(function(e){return xl(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function Cu(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}wu.attention=Tu,wu.peek=Eu;function wu(e,t,n,r){let i=n.enter(`phrasing`),a=Xl([Jl(e,Tu,n,n.createTracker(r))],r.before,r.after);return i(),a}function Tu(e,t){return{construct:`strong`,markers:Cu(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function Eu(e,t,n){return n.options.strong||`*`}function Du(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function Ou(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ku(e,t,n){let r=(_u(n)+(n.options.ruleSpaces?` `:``)).repeat(Ou(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Au={blockquote:Sl,break:El,code:Al,definition:Nl,emphasis:Zl,hardBreak:El,heading:tu,html:J,image:ru,imageReference:au,inlineCode:su,link:uu,linkReference:fu,list:vu,listItem:bu,paragraph:xu,root:Su,strong:wu,text:Du,thematicBreak:ku};function ju(){return{enter:{table:Mu,tableData:Iu,tableHeader:Iu,tableRow:Pu},exit:{codeText:Lu,table:Nu,tableData:Fu,tableHeader:Fu,tableRow:Fu}}}function Mu(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Nu(e){this.exit(e),this.data.inTable=void 0}function Pu(e){this.enter({type:`tableRow`,children:[]},e)}function Fu(e){this.exit(e)}function Iu(e){this.enter({type:`tableCell`,children:[]},e)}function Lu(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ru));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ru(e,t){return t===`|`?t:e}function zu(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
204
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
205
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return vl(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Au.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Bu(){return{exit:{taskListCheckValueChecked:Hu,taskListCheckValueUnchecked:Hu,paragraph:Uu}}}function Vu(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Wu}}}function Hu(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Uu(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Wu(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Au.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Gu(){return[Fc(),al(),ul(),ju(),Bu()]}function Ku(e){return{extensions:[Ic(),ol(e),dl(),zu(e),Vu()]}}var qu={tokenize:id,partial:!0},Ju={tokenize:ad,partial:!0},Yu={tokenize:od,partial:!0},Xu={tokenize:sd,partial:!0},Zu={tokenize:cd,partial:!0},Qu={name:`wwwAutolink`,tokenize:nd,previous:ld},Y={name:`protocolAutolink`,tokenize:rd,previous:ud},X={name:`emailAutolink`,tokenize:td,previous:dd},Z={};function $u(){return{text:Z}}for(var ed=48;ed<123;)Z[ed]=X,ed++,ed===58?ed=65:ed===91&&(ed=97);Z[43]=X,Z[45]=X,Z[46]=X,Z[95]=X,Z[72]=[X,Y],Z[104]=[X,Y],Z[87]=[X,Qu],Z[119]=[X,Qu];function td(e,t,n){let r=this,i,a;return o;function o(t){return!fd(t)||!dd.call(r,r.previous)||pd(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return fd(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Zu,u,l)(t):t===45||t===95||Nr(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Mr(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function nd(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!ld.call(r,r.previous)||pd(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(qu,e.attempt(Ju,e.attempt(Yu,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function rd(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&ud.call(r,r.previous)&&!pd(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Mr(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Fr(t)||U(t)||Br(t)||zr(t)?n(t):e.attempt(Ju,e.attempt(Yu,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function id(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function ad(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Xu,c,s)(t):t===null||U(t)||Br(t)||t!==45&&zr(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function od(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Xu,t,a)(o):o===null||U(o)||Br(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function sd(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||U(o)||Br(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||U(e)||Br(e)?t(e):r(e)}function a(e){return Mr(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Mr(t)?(e.consume(t),o):n(t)}}function cd(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Nr(e)?n(e):t(e)}}function ld(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||U(e)}function ud(e){return!Mr(e)}function dd(e){return!(e===47||fd(e))}function fd(e){return e===43||e===45||e===46||e===95||Nr(e)}function pd(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var md={tokenize:Sd,partial:!0};function hd(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:yd,continuation:{tokenize:bd},exit:xd}},text:{91:{name:`gfmFootnoteCall`,tokenize:vd},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:gd,resolveTo:_d}}}}function gd(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=jr(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function _d(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function vd(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||U(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(jr(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return U(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function yd(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||U(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=jr(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return U(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),G(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function bd(e,t,n){return e.check(oi,t,e.attempt(md,t,n))}function xd(e){e.exit(`gfmFootnoteDefinition`)}function Sd(e,t,n){let r=this;return G(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Cd(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&wr(o,o.length,0,$r(s,e.slice(r+1,n),t)),wr(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),wr(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Qr(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Qr(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var wd=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){Td(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Td(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Ed(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Dd(){return{flow:{null:{name:`table`,tokenize:Od,resolveAll:kd}}}}function Od(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):H(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):W(t)?G(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||U(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,W(t)?G(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return W(t)?G(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||H(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return W(t)?G(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||H(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||H(n)?(e.exit(`tableRow`),t(n)):W(n)?G(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||U(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function kd(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new wd;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(jd(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Ad(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Ad(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Ad(f,t,o,i,n,d)):(o[0]=o[1],d=Ad(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&jd(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Ed(t.events,n))}return e}function Ad(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Md(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Md(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Md(t.events,n[2]),a=Md(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Md(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function jd(e,t,n,r,i){let a=[],o=Md(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Md(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Nd={name:`tasklistCheck`,tokenize:Fd};function Pd(){return{text:{91:Nd}}}function Fd(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return U(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return H(r)?t(r):W(r)?e.check({tokenize:Id},t,n)(r):n(r)}}function Id(e,t,n){return G(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Ld(e){return Dr([$u(),hd(),Cd(e),Dd(),Pd()])}var Rd={};function zd(e){let t=this,n=e||Rd,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Ld(n)),a.push(Gu()),o.push(Ku(n))}var Bd=`modulepreload`,Vd=function(e){return`/`+e},Hd={},Ud=function(e){return e.pathname.endsWith(`.css`)},Wd=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Gd=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Vd(t,n);let r=s(t),i=Ud(r);return Wd(Hd,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Bd,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function Kd({path:e,children:t}){let[n,r]=(0,v.useState)(!1);async function i(){let t=e;try{t=decodeURI(e)}catch{}let n=!1;try{await navigator.clipboard.writeText(t),n=!0}catch{let e=document.createElement(`textarea`);e.value=t,e.style.position=`fixed`,e.style.opacity=`0`,document.body.append(e),e.select();try{n=document.execCommand(`copy`)}finally{e.remove()}}r(n)}return(0,A.jsx)(`button`,{type:`button`,className:`file-reference`,title:e,"aria-label":n?N(`Copied path`):N(`Copy path: {path}`,{path:e}),onClick:()=>void i(),children:t})}var qd=/(```[\s\S]*?(?:```|$)|~~~[\s\S]*?(?:~~~|$)|`[^`\n]+`)/,Jd=e=>e.split(qd).some((e,t)=>t%2==0&&/\$|\\\(|\\\[/.test(e));function Yd(e){return e.split(qd).map((e,t)=>t%2?e:Zd(e.replace(/(^|\n)([ \t]*)\\\[((?:(?!\\\]|\n[ \t]*\n)[\s\S])+?)\\\][ \t]*(?=\n|$)/g,(e,t,n,r)=>`${t}${n}$$\n${Xd(r,n)}\n${n}$$`).replace(/(?<!\\)\\\[((?:(?!\\\])[^\n])+?)\\\]/g,(e,t)=>`$$${t.trim()}$$`).replace(/(?<!\\)\\\(((?:(?!\\\))[^\n])+?)\\\)/g,(e,t)=>`$${t.trim()}$`))).join(``)}function Xd(e,t){let n=e.split(`
206
+ `);return n[0].trim()?n[0]=t+n[0].trim():n.shift(),n.length>1&&!n[n.length-1].trim()?n.pop():n[n.length-1]=n[n.length-1].trimEnd(),n.join(`
207
+ `)}function Zd(e){let t=``;for(let n=0;n<e.length;){if(e[n]===`\\`){t+=e.slice(n,n+2),n+=2;continue}if(e[n]!==`$`){t+=e[n++];continue}if(e[n+1]===`$`){let r=e.indexOf(`$$`,n+2);t+=e.slice(n,r<0?n+2:r+2),n=r<0?n+2:r+2;continue}let r=-1;if(/\S/.test(e[n+1]||``))for(let t=n+1;t<e.length;t++)if(e[t]===`\\`)t++;else{if(e.startsWith(`
208
+
209
+ `,t))break;if(e[t]===`$`){e[t+1]!==`$`&&/\S/.test(e[t-1])&&!/\d/.test(e[t+1]||``)&&(r=t);break}}r<0?(t+=`\\$`,n++):(t+=e.slice(n,r+1),n=r+1)}return t}var Qd=null,$d=null;function ef(e){let[t,n]=(0,v.useState)(Qd);return(0,v.useEffect)(()=>{if(!e||t)return;let r=!0;return $d??=Gd(()=>import(`./math-CUuXX16h.js`).then(e=>Qd=e.math),__vite__mapDeps([0,1])),$d.then(e=>{r&&n(e)},()=>{$d=null}),()=>{r=!1}},[e,t]),e?t:null}function tf({text:e,math:t}){return(0,A.jsx)(Sc,{remarkPlugins:[zd,...t?.remark||[]],rehypePlugins:t?.rehype,urlTransform:e=>/^(?:https?:\/\/|mailto:|#)/i.test(e)||!/^[a-z][a-z\d+.-]*:/i.test(e)&&!e.startsWith(`//`)?e:``,components:{h1:({children:e})=>(0,A.jsx)(`h3`,{children:e}),h2:({children:e})=>(0,A.jsx)(`h4`,{children:e}),h3:({children:e})=>(0,A.jsx)(`h5`,{children:e}),h4:({children:e})=>(0,A.jsx)(`h6`,{children:e}),h5:({children:e})=>(0,A.jsx)(`h6`,{children:e}),a:({href:e,children:t,title:n})=>e?/^(?:https?:\/\/|mailto:)/i.test(e)?(0,A.jsx)(`a`,{href:e,title:n,target:`_blank`,rel:`noreferrer`,children:t}):e.startsWith(`#`)?(0,A.jsx)(`a`,{href:e,children:t}):(0,A.jsx)(Kd,{path:e,children:t}):(0,A.jsx)(A.Fragment,{children:t}),table:({children:e})=>(0,A.jsx)(`div`,{className:`markdown-table`,children:(0,A.jsx)(`table`,{children:e})}),pre:({children:e})=>(0,A.jsx)(`pre`,{tabIndex:0,children:e}),img:({alt:e})=>(0,A.jsx)(`span`,{children:e})},children:t?Yd(e):e})}function nf({text:e}){return(0,A.jsx)(tf,{text:e,math:ef(Jd(e))})}var rf=()=>({none:N(`None`),minimal:N(`Minimal`),low:N(`Low`),medium:N(`Medium`),high:N(`High`),xhigh:N(`Extra high`),max:N(`Max`)}),af=e=>rf()[e]||e[0].toUpperCase()+e.slice(1);function of({step:e,steps:t}){let n=t>1?1+Math.round(e/(t-1)*3):4;return(0,A.jsx)(`svg`,{className:`effort-level`,width:`14`,height:`14`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[0,1,2,3].map(e=>(0,A.jsx)(`rect`,{x:2.5+e*5.5,y:20-(5+e*4.5),width:`3.5`,height:5+e*4.5,rx:`1.4`,fill:`currentColor`,opacity:e<n?1:.22},e))})}function sf({efforts:e,value:t,fallback:n,onChange:r,disabled:i}){let a=(0,v.useId)(),o=(0,v.useRef)(null),s=(0,v.useRef)(null),c=(0,v.useRef)(null),[l,u]=(0,v.useState)(!1);if((0,v.useEffect)(()=>{if(!l)return;let e=()=>s.current?.hidePopover();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[l]),!e.length)return null;let d=e.find(e=>e===t)||e.find(e=>e===n)||null,f=d?e.indexOf(d):Math.floor((e.length-1)/2),p=e.length>1?f/(e.length-1):1,m=d?af(d):N(`Default`),h=t=>`calc(15px + ${e.length>1?t/(e.length-1):1} * (100% - 30px))`;function g(){let e=s.current,t=o.current.getBoundingClientRect();e.showPopover(),e.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-e.offsetWidth-8))}px`;let n=t.bottom+8,r=t.top-e.offsetHeight-8;e.style.top=`${n+e.offsetHeight>window.innerHeight-8&&r>=8?r:n}px`,c.current?.focus()}return(0,A.jsxs)(`span`,{className:`menu-anchor`,children:[(0,A.jsxs)(`button`,{ref:o,type:`button`,className:`chip-select effort-chip`,title:N(`Reasoning effort`),"aria-label":N(`Reasoning effort: {label}`,{label:m}),"aria-haspopup":`dialog`,"aria-expanded":l,"aria-controls":a,disabled:i,onClick:()=>{s.current?.matches(`:popover-open`)?s.current.hidePopover():g()},children:[(0,A.jsx)(of,{step:f,steps:e.length}),(0,A.jsx)(`span`,{className:`chip-value`,children:m})]}),(0,A.jsxs)(`div`,{ref:s,id:a,popover:`auto`,role:`dialog`,"aria-label":N(`Reasoning effort`),className:`effort-panel`,onToggle:e=>{let t=e.nativeEvent.newState===`open`;u(t),t||document.activeElement&&document.activeElement!==document.body&&!s.current?.contains(document.activeElement)||o.current?.focus()},children:[(0,A.jsxs)(`div`,{className:`effort-head`,children:[(0,A.jsx)(`span`,{className:`effort-name`,children:d?m:N(`Model default`)}),d&&d===n&&(0,A.jsx)(`span`,{className:`effort-default`,children:N(`Default`)})]}),(0,A.jsxs)(`div`,{className:`effort-track`+(d?``:` unset`),children:[(0,A.jsx)(`span`,{className:`effort-fill`,style:{width:`calc(30px + ${p} * (100% - 30px))`}}),e.map((e,t)=>t!==f&&(0,A.jsx)(`span`,{className:`effort-stop`+(d&&t<f?` on`:``),style:{left:h(t)}},e)),(0,A.jsx)(`input`,{ref:c,type:`range`,min:0,max:e.length-1,step:1,value:f,"aria-label":N(`Reasoning effort`),"aria-valuetext":m,onChange:t=>r(e[Number(t.target.value)]),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),s.current?.hidePopover())}})]})]})]})}var cf={pro:`Pro`,plus:`Plus`,team:`Team`,business:`Business`,enterprise:`Enterprise`,edu:`Edu`,free:`Free`,go:`Go`};function lf(e){return e===10080?N(`Weekly limit`):e===1440?N(`Daily limit`):e&&e%1440==0?N(`{n}-day limit`,{n:e/1440}):e&&e%60==0?N(`{n}-hour limit`,{n:e/60}):e?N(`{n}-minute limit`,{n:e}):N(`Usage limit`)}function uf(e,t=Date.now()){let n=e-t;if(n<=6e4)return N(`resets now`);if(n<864e5){let e=Math.floor(n/36e5),t=Math.round(n%36e5/6e4);return e?N(`resets in {hours} h {minutes} min`,{hours:e,minutes:t}):N(`resets in {minutes} min`,{minutes:t})}let r=new Date(e);return N(`resets {time}`,{time:n<5184e5?r.toLocaleString(me(),{weekday:`short`,hour:`numeric`,minute:`2-digit`}):r.toLocaleDateString(me(),{month:`short`,day:`numeric`})})}function df({window:e,reached:t}){let n=Math.round(e.usedPercent),r=lf(e.minutes);return(0,A.jsxs)(`div`,{className:`usage-limit `+(t||n>=90?`critical`:n>=75?`warning`:``),children:[(0,A.jsx)(`span`,{className:`usage-name`,children:r}),(0,A.jsx)(`span`,{className:`usage-bar`,role:`meter`,"aria-label":N(`{name} used`,{name:r}),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,"aria-valuetext":N(`{used}% used`,{used:n}),children:(0,A.jsx)(`span`,{style:{width:`${n}%`}})}),(0,A.jsx)(`span`,{className:`usage-value`,children:t&&n>=100?N(`Limit reached`):N(`{used}% used`,{used:n})}),e.resetsAt&&(0,A.jsx)(`span`,{className:`usage-reset`,children:uf(e.resetsAt)})]})}function ff({usage:e,agent:t=`Codex`}){let n=e.credits;return(0,A.jsxs)(`section`,{className:`usage`,"aria-label":N(`{agent} usage`,{agent:t}),children:[(0,A.jsxs)(`span`,{className:`usage-account`,children:[t,e.plan&&(0,A.jsx)(`span`,{className:`usage-plan`,children:cf[e.plan]||e.plan})]}),e.windows.map((t,n)=>(0,A.jsx)(df,{window:t,reached:e.reached},n)),n&&(0,A.jsx)(`span`,{className:`usage-credits`,children:n.unlimited?N(`Unlimited credits`):n.balance===null?N(`Credits available`):N(`{n} credits`,{n:Math.floor(n.balance).toLocaleString(me())})})]})}var pf=(0,v.lazy)(()=>Gd(()=>import(`./pdf-view-CNYCI_LH.js`).then(e=>({default:e.PdfView})),[])),mf=``,hf=()=>crypto.randomUUID?.()||Array.from(crypto.getRandomValues(new Uint8Array(20)),e=>e.toString(16).padStart(2,`0`)).join(``);async function Q(e,t,n,r=t===void 0?15e3:3e4){let i=AbortSignal.timeout(r);try{let r=await fetch(`/api`+e,{method:t===void 0?`GET`:`POST`,headers:{"Content-Type":`application/json`,"X-Papilot-Token":mf},...t===void 0?{}:{body:JSON.stringify(t)},signal:n?AbortSignal.any([n,i]):i});if(r.status===401&&(!e.startsWith(`/auth/`)||e===`/auth/logout`))throw It(!0),Error(N(`Sign in to continue.`));let a=await r.json();if(!r.ok)throw Error(a.error||N(`Request failed. Please try again.`));return a}catch(e){throw i.aborted?Error(N(t===void 0?`The connection is taking too long. Check your network and try again.`:`The request timed out and may still be processing. Check the task status before retrying.`)):e}}var gf=[`codex`,`claude`,`antigravity`],_f={codex:`Codex`,claude:`Claude`,antigravity:`Antigravity`},vf=e=>_f[e.agent||`codex`]||`Codex`,yf=()=>({idle:N(`Ready`),queued:N(`Queued`),waiting_input:N(`Needs your reply`),building:N(`Building PDF review`),reviewing:N(`Ready for review`),interrupted:N(`Paused`),failed:N(`Needs attention`),uncertain:N(`Check task status`),deleting:N(`Deleting task`)}),bf=[`running`,`waiting_input`,`queued`];function xf({task:e}){let t=e.status===`reviewing`&&e.review?.state===`done`;return(0,A.jsxs)(`span`,{className:`status ${e.status}${t?` done`:``}`,children:[(0,A.jsx)(`i`,{}),t?N(`Review complete`):e.status===`running`?N(`{agent} is editing`,{agent:vf(e)}):yf()[e.status]||e.status]})}function Sf(e){return new Date(e).toLocaleTimeString(me(),{hour:`2-digit`,minute:`2-digit`})}function Cf(e){let t=Math.floor((Date.now()-e)/6e4);return t<1?N(`now`):t<60?N(`{n}m`,{n:t}):t<1440?N(`{n}h`,{n:Math.floor(t/60)}):t<10080?N(`{n}d`,{n:Math.floor(t/1440)}):new Date(e).toLocaleDateString(me(),{month:`short`,day:`numeric`})}var wf=e=>Date.now()-e<6e4?N(`just now`):N(`{time} ago`,{time:Cf(e)}),Tf=()=>window.matchMedia(`(pointer: coarse)`).matches;function Ef(e){let[t,n]=(0,v.useState)(()=>window.matchMedia(e).matches);return(0,v.useEffect)(()=>{let t=window.matchMedia(e),r=()=>n(t.matches);return t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e]),t}function Df({label:e,value:t,placeholder:n,onChange:r,onSubmit:i,readOnly:a,autoFocus:o,inputRef:s,footer:c,action:l,large:u,skills:d,skill:f,onSkill:p}){let m=(0,v.useRef)(null),h=s||m,g=(0,v.useId)(),[_,y]=(0,v.useState)(null),[b,x]=(0,v.useState)(0),S=d?.length&&p&&!a?P(t):null,C=S!==null&&_!==t,w=C?F(d,S):[];(0,v.useEffect)(()=>x(0),[S]),(0,v.useEffect)(()=>{_!==null&&t!==_&&y(null)},[t,_]),(0,v.useLayoutEffect)(()=>{let e=h.current;e&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)},[h,t]),(0,v.useEffect)(()=>{o&&!Tf()&&h.current?.focus()},[o,h]);function T(e){p?.(e),r(``),h.current?.focus()}function E(e){if(C&&!e.nativeEvent.isComposing&&e.keyCode!==229){if((e.key===`ArrowDown`||e.key===`ArrowUp`)&&w.length){e.preventDefault(),x(t=>(t+(e.key===`ArrowDown`?1:w.length-1))%w.length);return}if((e.key===`Enter`||e.key===`Tab`)&&!e.shiftKey&&w.length){e.preventDefault(),T(w[Math.min(b,w.length-1)]);return}if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),y(t);return}}e.key===`Backspace`&&f&&p&&!t&&!a?(e.preventDefault(),p(null)):Ce(e.nativeEvent,Tf())&&(e.preventDefault(),i())}return(0,A.jsxs)(`form`,{className:`composer`+(u?` large`:``),onSubmit:e=>{e.preventDefault(),i()},onPointerDown:e=>{e.target===e.currentTarget&&(e.preventDefault(),h.current?.focus())},children:[C&&(0,A.jsx)(_e,{id:g,skills:w,active:b,onActive:x,onPick:T}),f&&(0,A.jsxs)(`div`,{className:`composer-skill`,children:[(0,A.jsx)(ve,{skill:f,onRemove:p&&!a?()=>{p(null),h.current?.focus()}:void 0}),f.description&&(0,A.jsx)(`span`,{className:`composer-skill-description`,children:f.description})]}),(0,A.jsx)(`textarea`,{ref:h,rows:1,"aria-label":e,maxLength:2e4,placeholder:f?f.hint||N(`Add details, or send to run the skill`):n,value:t,readOnly:a,onChange:e=>r(e.target.value),onKeyDown:E,...p&&d?.length?{"aria-autocomplete":`list`,"aria-controls":C?g:void 0,"aria-activedescendant":C&&w.length?`${g}-${Math.min(b,w.length-1)}`:void 0}:{}}),(0,A.jsxs)(`div`,{className:`composer-footer`,children:[c,l]})]})}function Of({request:e,agent:t,answerDrafts:n,onDone:r}){let[i,a]=(0,v.useState)(()=>n.get(e.id)||{});function o(t){n.set(e.id,t),a(t)}let[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(``),d=e.method.endsWith(`requestUserInput`)&&e.params.questions||[];async function f(t){c(!0),u(``);try{await Q(`/requests/`+e.id,{decision:t,answers:i}),n.delete(e.id),r()}catch(e){u(e.message)}finally{c(!1)}}return(0,A.jsxs)(`div`,{className:`request-card`,children:[(0,A.jsxs)(`h3`,{children:[(0,A.jsx)(j,{name:d.length?`chat`:`alert`,size:16}),d.length?N(`{agent} needs your input`,{agent:t}):N(`Approve this action`)]}),d.map(e=>(0,A.jsxs)(`fieldset`,{className:`question`,children:[(0,A.jsx)(`legend`,{children:e.question||e.header}),e.options?.length>0&&(0,A.jsx)(`div`,{className:`answer-options`,children:e.options.map(t=>(0,A.jsxs)(`button`,{type:`button`,disabled:s,"aria-pressed":i[e.id]===t.label,className:i[e.id]===t.label?`selected`:``,onClick:()=>o({...i,[e.id]:t.label}),children:[t.label,t.description&&(0,A.jsx)(`small`,{children:t.description})]},t.label))}),(0,A.jsx)(`input`,{disabled:s,"aria-label":e.question||e.header,placeholder:N(`Or type your own answer`),value:i[e.id]||``,onChange:t=>o({...i,[e.id]:t.target.value})})]},e.id)),!d.length&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`p`,{children:e.params.reason||N(`{agent} is requesting permission for this action.`,{agent:t})}),(0,A.jsx)(`pre`,{children:e.params.command||(e.params.permissions?JSON.stringify(e.params.permissions,null,2):e.params.grantRoot||N(`Apply file changes`))})]}),l&&(0,A.jsx)(`p`,{className:`inline-error`,role:`alert`,children:l}),(0,A.jsxs)(`div`,{className:`button-row`,children:[!d.length&&(0,A.jsx)(`button`,{disabled:s,className:`button secondary`,onClick:()=>void f(`decline`),children:N(`Decline`)}),(0,A.jsx)(`button`,{disabled:s||d.some(e=>!i[e.id]?.trim()),className:`button primary`,onClick:()=>void f(d.length?void 0:`accept`),children:s?N(`Submitting…`):d.length?N(`Reply to {agent}`,{agent:t}):N(`Allow this action`)})]})]})}function kf({text:e}){let[t,n]=(0,v.useState)(!1);(0,v.useEffect)(()=>{if(!t)return;let e=setTimeout(()=>n(!1),1600);return()=>clearTimeout(e)},[t]);async function r(){try{await navigator.clipboard.writeText(e)}catch{let t=document.createElement(`textarea`);t.value=e,t.readOnly=!0,t.style.position=`fixed`,t.style.opacity=`0`,document.body.append(t),t.select(),document.execCommand(`copy`),t.remove()}n(!0)}return(0,A.jsxs)(`button`,{type:`button`,className:`message-action`,"aria-label":N(t?`Copied`:`Copy message`),onClick:()=>void r(),children:[(0,A.jsx)(j,{name:t?`check`:`copy`,size:14}),(0,A.jsx)(`span`,{children:N(t?`Copied`:`Copy`)})]})}var Af=e=>e.match(/^\/bin\/(?:ba|z)?sh -lc (['"])([\s\S]*)\1$/)?.[2]??e,jf=(e,t)=>t&&e.startsWith(t+`/`)?e.slice(t.length+1):e,Mf=(e,t)=>e.text.split(`
210
+ `).filter(Boolean).map(e=>jf(e,t)),Nf=e=>e.status===`inProgress`?`running`:e.status&&e.status!==`completed`?`failed`:``,Pf=(0,v.createContext)(null);function Ff(e){let t=(0,v.useContext)(Pf),n=!t||(e?e.id===t.id:t.role===`owner`);return{mine:n,name:n?``:e?.name||t?.owner||``}}var If=(e,t)=>e.mine?N(`You, {time}`,{time:Sf(t)}):N(`{name}, {time}`,{name:e.name,time:Sf(t)}),Lf=({sender:e})=>e.mine?null:(0,A.jsx)(`div`,{className:`message-author`,children:e.name});function Rf({item:e,notes:t}){let n=Ff(e.meta?.author);return(0,A.jsxs)(`article`,{className:`message user notes-message`,"aria-label":If(n,e.createdAt),children:[(0,A.jsx)(Lf,{sender:n}),(0,A.jsxs)(`div`,{className:`message-body`,title:Sf(e.createdAt),children:[(0,A.jsxs)(`div`,{className:`sent-notes-head`,children:[(0,A.jsx)(j,{name:`notes`,size:14}),ge(t.length,`Note on the PDF`,`{n} notes on the PDF`)]}),(0,A.jsx)(`ol`,{className:`sent-notes`,children:t.map((e,t)=>(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`span`,{className:`sent-note-where`,children:e.where}),e.quote?(0,A.jsx)(`blockquote`,{children:e.quote}):(0,A.jsx)(`span`,{className:`sent-note-region`,children:N(`Marked region`)}),(0,A.jsx)(`p`,{children:e.comment})]},t))})]})]})}function zf({feedback:e}){let t=[e.accepted&&[`accepted`,N(`{n} accepted`,{n:e.accepted})],e.rejected&&[`rejected`,N(`{n} rejected`,{n:e.rejected})],e.comments.length&&[`commented`,ge(e.comments.length,`{n} comment`,`{n} comments`)],e.undone&&[`undone`,N(`{n} undone`,{n:e.undone})],e.buildError&&[`failed`,N(`build error`)]].filter(Boolean);return(0,A.jsxs)(A.Fragment,{children:[t.length>0&&(0,A.jsx)(`div`,{className:`feedback-counts`,children:t.map(([e,t])=>(0,A.jsx)(`span`,{className:e,children:t},e))}),e.comments.length>0&&(0,A.jsx)(`ol`,{className:`sent-notes`,children:e.comments.map((e,t)=>(0,A.jsxs)(`li`,{children:[(0,A.jsx)(`span`,{className:`sent-note-where`,children:e.where}),(0,A.jsx)(`p`,{children:e.text})]},t))})]})}function Bf({item:e,agent:t}){let n=Ff(e.meta?.author),r=T(e.text);if(r)return(0,A.jsx)(Rf,{item:e,notes:r});let{skill:i,feedback:a,sendsFeedback:o,build:s}=e.meta||{};return s?(0,A.jsx)(`article`,{className:`message user notes-message build-message`,"aria-label":N(`Papilot sent the build error to {agent}, {time}`,{agent:t,time:Sf(e.createdAt)}),children:(0,A.jsxs)(`div`,{className:`message-body`,title:Sf(e.createdAt),children:[(0,A.jsxs)(`div`,{className:`sent-notes-head`,children:[(0,A.jsx)(j,{name:`alert`,size:14}),N(`Build failed · sent to {agent}`,{agent:t})]}),(0,A.jsx)(`p`,{className:`build-error`,children:[s.error,...s.details].join(`
211
+ `)})]})}):o||E(e.text)?(0,A.jsxs)(`article`,{className:`message user notes-message`,"aria-label":n.mine?N(`You sent review feedback, {time}`,{time:Sf(e.createdAt)}):N(`{name} sent review feedback, {time}`,{name:n.name,time:Sf(e.createdAt)}),children:[(0,A.jsx)(Lf,{sender:n}),(0,A.jsxs)(`div`,{className:`message-body`,title:Sf(e.createdAt),children:[(0,A.jsxs)(`div`,{className:`sent-notes-head`,children:[(0,A.jsx)(j,{name:`paper`,size:14}),a?.round?N(`Review feedback · Round {round}`,{round:a.round}):N(`Review feedback`)]}),a&&(0,A.jsx)(zf,{feedback:a})]})]}):(0,A.jsxs)(`article`,{className:`message user`,"aria-label":If(n,e.createdAt),children:[(0,A.jsx)(Lf,{sender:n}),(0,A.jsxs)(`div`,{className:`message-body`,title:Sf(e.createdAt),children:[i&&(0,A.jsx)(ve,{skill:i}),i&&e.text?`
212
+ `:``,e.text,a&&(0,A.jsxs)(`details`,{className:`feedback-attachment`,children:[(0,A.jsxs)(`summary`,{children:[(0,A.jsx)(j,{name:`paper`,size:13}),a.round?N(`With review feedback · Round {round}`,{round:a.round}):N(`With review feedback`)]}),(0,A.jsx)(zf,{feedback:a})]})]})]})}function $({item:e,agent:t,root:n}){if(e.type===`user`)return(0,A.jsx)(Bf,{item:e,agent:t});if(e.type===`assistant`)return(0,A.jsxs)(`article`,{className:`message assistant`,"aria-label":`${t}, ${Sf(e.createdAt)}`,children:[(0,A.jsx)(`div`,{className:`message-body markdown`,children:(0,A.jsx)(nf,{text:e.text})}),(0,A.jsxs)(`div`,{className:`message-actions`,children:[(0,A.jsx)(kf,{text:e.text}),(0,A.jsx)(`time`,{dateTime:new Date(e.createdAt).toISOString(),children:Sf(e.createdAt)})]})]});let r=e.type===`files`?Mf(e,n):[],i=e.type===`command`?Af(e.text)||N(`Run command`):e.type===`files`?r.length===1?N(`Edited {file}`,{file:r[0]}):N(`Edited {n} files`,{n:r.length}):e.text||N(`Run tool`),a=e.type===`files`?r.join(`
213
+ `):e.detail,o=Nf(e);return(0,A.jsxs)(`details`,{className:`tool-item `+o,children:[(0,A.jsxs)(`summary`,{children:[(0,A.jsx)(j,{name:e.type===`command`?`terminal`:e.type===`files`?`diff`:`tool`,size:14}),(0,A.jsx)(`span`,{className:`tool-label`,children:i}),o===`running`?(0,A.jsx)(`span`,{className:`spinner`,"aria-label":N(`Running`)}):o&&(0,A.jsx)(`span`,{className:`tool-status`,children:e.status===`declined`?N(`Declined`):N(`Failed`)})]}),a&&(0,A.jsx)(`pre`,{children:a})]})}function Vf({items:e,agent:t,root:n}){let r=e.filter(e=>e.type===`command`).length,i=e.filter(e=>e.type===`files`),a=[...new Set(i.flatMap(e=>Mf(e,n)))],o=e.length-r-i.length,s=e.some(e=>Nf(e)===`running`),c=e.filter(e=>Nf(e)===`failed`).length,l=[r?ge(r,`ran {n} command`,`ran {n} commands`):``,a.length?a.length===1?N(`edited {file}`,{file:a[0]}):N(`edited {n} files`,{n:a.length}):``,o?ge(o,`used {n} tool`,`used {n} tools`):``].filter(Boolean).join(N(`, `));return(0,A.jsxs)(`details`,{className:`tool-group`,children:[(0,A.jsxs)(`summary`,{children:[(0,A.jsx)(j,{name:r?`terminal`:a.length?`diff`:`tool`,size:14}),(0,A.jsx)(`span`,{className:`tool-group-label`,children:l[0].toUpperCase()+l.slice(1)}),s?(0,A.jsx)(`span`,{className:`spinner`,"aria-label":N(`Running`)}):c?(0,A.jsx)(`span`,{className:`tool-status`,children:N(`{n} failed`,{n:c})}):null,(0,A.jsx)(j,{name:`chevronDown`,size:13})]}),(0,A.jsx)(`div`,{className:`tool-group-items`,children:e.map(e=>(0,A.jsx)($,{item:e,agent:t,root:n},e.id))})]})}function Hf(e){let t=[];for(let n of e){let e=n.type!==`user`&&n.type!==`assistant`,r=t[t.length-1];e&&r&&r[0].type!==`user`&&r[0].type!==`assistant`?r.push(n):t.push([n])}return t}function Uf({task:e,models:t,skills:n,composer:r,answerDrafts:i,items:a,loading:o,loadError:s,retry:c,requests:l,refresh:u,reportError:d,pause:f,pausing:p,openReview:m,feedback:h}){let{text:g,sending:_,sendingSource:y}=(0,v.useSyncExternalStore)(r.subscribe,r.getSnapshot),[b,x]=(0,v.useState)(null),S=(0,v.useRef)(null),C=(0,v.useRef)(!0),[w,T]=(0,v.useState)(!0);function E(){C.current=!0,T(!0),S.current&&(S.current.scrollTop=S.current.scrollHeight)}(0,v.useEffect)(()=>{C.current&&E()},[a,l]),(0,v.useEffect)(()=>{if(!S.current)return;let e=new ResizeObserver(()=>{C.current&&E()});return e.observe(S.current),()=>e.disconnect()},[]);async function D(t){if(r.sending||[`uncertain`,`deleting`].includes(e.status))return;let n=t===`draft`?b:null,i=r.submit(t,t=>Q(`/tasks/`+e.id+`/messages`,t),n?.id);try{await i&&(C.current=!0,n&&x(e=>e===n?null:e),u())}catch(e){d(e)}}let O=bf.includes(e.status),k=[`uncertain`,`deleting`].includes(e.status),ee=be(e.review),te=e.status===`deleting`?N(`This task is being deleted`):e.status===`uncertain`?N(`Check task status before sending`):y===`feedback`?N(`Sending feedback…`):_?N(`Sending…`):ee?ge(ee,`{n} review update will be sent with this message`,`{n} review updates will be sent with this message`):O?N(`{agent} is working · new instructions run next`,{agent:vf(e)}):Tf()?``:n.length?N(`Enter to send · / for skills`):N(`Enter to send · Shift+Enter for a new line`),ne=t.find(t=>t.id===e.model)||(e.model?void 0:t.find(e=>e.isDefault)),M=ne?.name||e.model||N(`Default model`);return(0,A.jsxs)(`section`,{id:`conversation-panel`,className:`activity-panel`,"aria-label":N(`{agent} conversation`,{agent:vf(e)}),children:[(0,A.jsxs)(`div`,{className:`panel-heading`,children:[(0,A.jsx)(`span`,{className:`panel-title`,children:N(`Chat`)}),(0,A.jsxs)(`span`,{className:`model-chip`,title:`${vf(e)} · ${e.model?M:ne?N(`the default model on this host ({model})`,{model:ne.name}):N(`the default model on this host`)}`,children:[e.agent&&e.agent!==`codex`?`${vf(e)} · `:``,M,e.effort?` · ${af(e.effort)}`:``]})]}),(0,A.jsxs)(`div`,{className:`conversation-history`,children:[(0,A.jsx)(`div`,{className:`messages`,ref:S,onScroll:()=>{if(S.current){let e=S.current;C.current=e.scrollHeight-e.scrollTop-e.clientHeight<90,T(C.current)}},children:(0,A.jsxs)(`div`,{className:`thread`,children:[o&&(0,A.jsx)(`p`,{className:`muted`,role:`status`,children:N(`Loading conversation…`)}),s&&(0,A.jsxs)(`div`,{className:`conversation-error`,role:`alert`,children:[(0,A.jsx)(`p`,{children:s}),(0,A.jsx)(`button`,{className:`button secondary compact`,onClick:c,children:N(`Retry conversation`)})]}),Hf(a).map(t=>t.length>1?(0,A.jsx)(Vf,{items:t,agent:vf(e),root:e.worktree},t[0].id):(0,A.jsx)($,{item:t[0],agent:vf(e),root:e.worktree},t[0].id)),l.map(t=>(0,A.jsx)(Of,{request:t,agent:vf(e),answerDrafts:i,onDone:u},t.id)),e.status===`running`&&(0,A.jsxs)(`div`,{className:`working`,children:[(0,A.jsxs)(`span`,{className:`working-dots`,children:[(0,A.jsx)(`i`,{}),(0,A.jsx)(`i`,{}),(0,A.jsx)(`i`,{})]}),N(`{agent} is working on this task`,{agent:vf(e)})]}),e.status===`queued`&&(0,A.jsx)(`p`,{className:`muted`,children:N(`Task saved. Waiting for an available {agent} session.`,{agent:vf(e)})}),m&&e.status===`reviewing`&&e.review?.counts?.pending?(0,A.jsxs)(`div`,{className:`review-ready`,children:[(0,A.jsx)(j,{name:`paper`,size:16}),(0,A.jsx)(`span`,{children:ge(e.review.counts.pending,`Round {round} is ready · {n} change to decide`,`Round {round} is ready · {n} changes to decide`,{round:e.review.round??``})}),(0,A.jsx)(`button`,{className:`button secondary compact`,onClick:m,children:N(`Open review`)})]}):null,h,e.error&&(0,A.jsxs)(`div`,{className:`task-error`,children:[(0,A.jsx)(j,{name:`alert`,size:16}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`strong`,{children:N(`This step needs attention`)}),(0,A.jsx)(`p`,{children:e.error})]})]})]})}),!w&&(0,A.jsxs)(`button`,{className:`jump-latest`,onClick:E,children:[(0,A.jsx)(j,{name:`arrowDown`,size:14}),N(`Latest messages`)]})]}),(0,A.jsx)(`div`,{className:`composer-wrap`,children:(0,A.jsx)(Df,{label:N(`Instructions for {agent}`,{agent:vf(e)}),value:g,onChange:e=>r.edit(e),onSubmit:()=>void D(`draft`),placeholder:N(O?`Queue instructions for the next turn…`:`Ask for another revision…`),skills:n,skill:b,onSkill:x,footer:(0,A.jsx)(`span`,{className:`composer-hint`,children:te}),action:(0,A.jsxs)(`div`,{className:`composer-actions`,children:[O&&(0,A.jsx)(`button`,{type:`button`,className:`send-button stop`,"aria-label":N(`Pause task`),title:N(`Pause {agent}`,{agent:vf(e)}),disabled:p,"aria-busy":p,onClick:f,children:(0,A.jsx)(j,{name:`stop`,size:18})}),(!O||g.trim()||b||_)&&(0,A.jsx)(`button`,{"aria-label":N(`Send instructions`),title:N(`Send (Enter) · New line (Shift+Enter)`),disabled:!g.trim()&&!b||_||k,className:`send-button`,type:`submit`,children:(0,A.jsx)(j,{name:`arrowUp`,size:18})})]})})})]})}function Wf(e,t){if(!Array.isArray(t?.files)||t.merging||e.status!==`reviewing`||e.review?.counts?.pending)return[];let n=new Set(t.files.map(e=>e.path));return(e.review?.files||[]).filter(e=>n.has(e))}function Gf({task:e,composer:t,refresh:n,reportError:r,onSent:i,card:a}){let{sending:o,sendingSource:s}=(0,v.useSyncExternalStore)(t.subscribe,t.getSnapshot),c=be(e.review),l=e.review?.comments??c,u=e.status===`reviewing`&&!e.review?.counts?.pending,d=c||l;if(!(l>0||u&&c>0&&!e.review?.counts?.accepted)||e.status===`deleting`)return null;async function f(){if(e.status!==`uncertain`)try{await t.submit(`feedback`,t=>Q(`/tasks/`+e.id+`/messages`,t))&&(n(),i())}catch(e){r(e)}}return(0,A.jsxs)(`div`,{className:`review-feedback`+(a?` card`:``),children:[(0,A.jsxs)(`span`,{children:[(0,A.jsx)(j,{name:`chat`,size:15}),ge(d,`{n} review update not sent yet`,`{n} review updates not sent yet`)]}),(0,A.jsxs)(`button`,{className:`button primary compact`,title:N(`Send your review decisions and comments to the agent`),disabled:o||e.status===`uncertain`,onClick:()=>void f(),children:[N(s===`feedback`?`Sending feedback…`:`Send feedback`),(0,A.jsx)(j,{name:`arrowRight`,size:14})]})]})}function Kf(e){let t=e.split(`/`).filter(Boolean);return(t.length>2?`…/`:`/`)+t.slice(-2).join(`/`)}function qf(e){if(!Array.isArray(e?.files))return``;let t=[e.ahead?`↑${e.ahead}`:``,e.behind?`↓${e.behind}`:``].filter(Boolean).join(` `);return[e.branch||N(`detached`),e.files.length?N(`{n} changed`,{n:e.files.length}):N(`clean`),t].filter(Boolean).join(` · `)}var Jf=e=>e.status===`?`&&!!O(e.path),Yf=()=>({M:N(`Modified`),A:N(`Added`),D:N(`Deleted`),R:N(`Renamed`),C:N(`Copied`),U:N(`Conflict`),"?":N(`Untracked`),T:N(`Type changed`)});function Xf({diff:e}){let t=e.diff.split(`
214
+ `),n=t.findIndex(e=>e.startsWith(`@@`)),r=n<0?t.filter(e=>e.startsWith(`Binary`)):t.slice(n,n+3e3);return r.length?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`pre`,{className:`git-diff`,children:r.map((e,t)=>(0,A.jsxs)(`span`,{className:e.startsWith(`@@`)?`hunk`:e[0]===`+`?`add`:e[0]===`-`?`del`:e.startsWith(`\\`)?`note`:void 0,children:[e.startsWith(` `)?`\xA0`+e.slice(1):e||` `,`
215
+ `]},t))}),(e.truncated||t.length-n>3e3)&&(0,A.jsx)(`p`,{className:`git-diff-note`,children:N(`The diff is too long to show in full.`)})]}):(0,A.jsx)(`p`,{className:`git-diff-note`,children:N(`No textual changes.`)})}function Zf({projectId:e,git:t,onStatus:n,writer:r}){let i=`papilot:commit:${e}`,[a,o]=(0,v.useState)(()=>M.getItem(i)||``),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(``),[p,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(``),[_,y]=(0,v.useState)(null),b=t?.files||[],x=b.find(e=>e.path===h);if((0,v.useEffect)(()=>{if(!x){y(null);return}let t=!0;return y(e=>e?.path===h?e:{path:h,result:null,error:``}),Q(`/projects/${e}/git/diff?path=${encodeURIComponent(h)}`).then(e=>{t&&y({path:h,result:e,error:``})},e=>{t&&y({path:h,result:null,error:e instanceof Error?e.message:String(e)})}),()=>{t=!1}},[e,h,x?.status,x?.lines?.join()]),!t||!Array.isArray(t.files))return(0,A.jsx)(`section`,{className:`git-panel`,"aria-label":N(`Git status`),children:(0,A.jsx)(`p`,{className:`git-clean`,children:N(`Reading Git status…`)})});let S=b.filter(e=>e.staged),C=S.length?S:b.filter(e=>!Jf(e)),w=(t,n)=>{t.length&&k(`stage`,()=>Q(`/projects/${e}/git/stage`,{paths:t,stage:n}),()=>``)},T=b.reduce((e,t)=>e+(t.lines?.[0]||0),0),E=b.reduce((e,t)=>e+(t.lines?.[1]||0),0),D=e=>{o(e),e?M.setItem(i,e):M.removeItem(i)};async function k(e,t,r){if(!s){c(e),u(``),f(``);try{let e=await t();n(e.git),f(r(e))}catch(e){u(e instanceof Error?e.message:String(e))}finally{c(``)}}}let ee=()=>{let t=a.trim();t&&C.length&&k(`commit`,()=>Q(`/projects/${e}/git/commit`,S.length?{message:t,staged:!0}:{message:t,paths:C.map(e=>e.path)}),e=>(D(``),N(`Committed {hash}.`,{hash:e.commit??``})))};async function te(){if(!s&&C.length){c(`message`),u(``),f(``);try{D((await Q(`/projects/${e}/git/message`,{paths:C.map(e=>e.path),staged:S.length>0,agent:r.agent,fresh:!!a.trim()},void 0,13e4)).message)}catch(e){u(e instanceof Error?e.message:String(e))}finally{c(``)}}}let ne=b.filter(Jf),re=[...new Set(ne.map(e=>O(e.path)))],ie=()=>void k(`ignore`,()=>Q(`/projects/${e}/git/ignore`,{paths:ne.map(e=>e.path)}),()=>ge(re.length,`Added {n} pattern to .gitignore.`,`Added {n} patterns to .gitignore.`)),ae=n=>void k(n,()=>Q(`/projects/${e}/git/${n}`,{},void 0,13e4),e=>n===`fetch`?e.git.behind?ge(e.git.behind,`{n} new commit on {upstream}.`,`{n} new commits on {upstream}.`,{upstream:e.git.upstream??``}):N(`Up to date with the remote.`):n===`pull`?N(`Pulled the latest commits.`):n===`merge`?e.git.merging?N(`The merge stopped at conflicts.`):N(`Merged {upstream}.`,{upstream:t.upstream??``}):e.git.upstream?N(`Pushed to {upstream}.`,{upstream:e.git.upstream}):N(`Pushed to the remote.`)),oe=!t.upstream&&t.remote&&t.branch,se=t.merging,ce=!!(t.upstream&&t.ahead>0&&t.behind>0&&!se);return(0,A.jsxs)(`section`,{className:`git-panel`,"aria-label":N(`Git status`),"aria-busy":!!s,children:[(0,A.jsxs)(`div`,{className:`git-branch`,children:[(0,A.jsx)(j,{name:`branch`,size:16}),(0,A.jsx)(`code`,{children:t.branch||N(`detached HEAD`)}),t.upstream&&(0,A.jsx)(`span`,{className:`git-sync`,title:N(`Compared with {upstream}`,{upstream:t.upstream}),children:t.ahead||t.behind?(0,A.jsxs)(A.Fragment,{children:[t.ahead>0&&(0,A.jsxs)(`span`,{children:[`↑`,t.ahead]}),t.behind>0&&(0,A.jsxs)(`span`,{children:[`↓`,t.behind]})]}):N(`up to date`)}),t.remote&&(0,A.jsxs)(`span`,{className:`git-remote`,children:[!se&&t.upstream&&t.behind>0&&(ce?(0,A.jsx)(`button`,{type:`button`,className:`button secondary compact`,title:N(`{branch} and {upstream} have both changed. Merge brings in the remote commits.`,{branch:t.branch??``,upstream:t.upstream}),disabled:!!s,onClick:()=>ae(`merge`),children:N(s===`merge`?`Merging…`:`Merge`)}):(0,A.jsx)(`button`,{type:`button`,className:`button secondary compact`,disabled:!!s,onClick:()=>ae(`pull`),children:N(s===`pull`?`Pulling…`:`Pull`)})),!se&&(t.upstream?t.ahead>0:oe)&&(0,A.jsx)(`button`,{type:`button`,className:`button secondary compact`,disabled:!!s,onClick:()=>ae(`push`),children:s===`push`?N(`Pushing…`):t.upstream?N(`Push`):N(`Publish branch`)}),(0,A.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":N(`Fetch from the remote`),title:N(`Fetch from the remote`),disabled:!!s,onClick:()=>ae(`fetch`),children:s===`fetch`?(0,A.jsx)(`span`,{className:`spinner`}):(0,A.jsx)(j,{name:`refresh`,size:15})})]})]}),t.upstream&&(0,A.jsxs)(`p`,{className:`git-upstream`,children:[N(`Tracking`),` `,(0,A.jsx)(`code`,{children:t.upstream})]}),t.head&&(0,A.jsxs)(`div`,{className:`git-commit`,children:[(0,A.jsx)(j,{name:`commit`,size:16}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`p`,{children:t.head.subject}),(0,A.jsxs)(`small`,{children:[(0,A.jsx)(`code`,{children:t.head.hash}),` · `,wf(t.head.date)]})]})]}),l&&(0,A.jsx)(`p`,{className:`inline-error git-message`,role:`alert`,children:l}),d&&!l&&(0,A.jsxs)(`p`,{className:`git-message git-notice`,role:`status`,children:[(0,A.jsx)(j,{name:`check`,size:14}),d]}),se&&(0,A.jsxs)(`div`,{className:`git-merge`+(se.conflicts.length?``:` resolved`),role:`group`,"aria-label":N(`Merge in progress`),children:[(0,A.jsxs)(`p`,{children:[(0,A.jsx)(`strong`,{children:se.conflicts.length?ge(se.conflicts.length,`Merging: {n} file has conflicts`,`Merging: {n} files have conflicts`):N(`Merging: no conflicts left`)}),(0,A.jsx)(`span`,{children:se.message})]}),p&&(0,A.jsx)(`div`,{className:`git-merge-summary markdown`,"aria-label":N(`{agent} on the merge`,{agent:p.agent}),children:(0,A.jsx)(nf,{text:p.summary})}),(0,A.jsxs)(`div`,{className:`button-row`,children:[(0,A.jsx)(`button`,{type:`button`,className:`button secondary compact`,disabled:!!s,onClick:()=>void k(`abort`,()=>Q(`/projects/${e}/git/abort`,{}),()=>(m(null),N(`The merge was abandoned.`))),children:N(s===`abort`?`Aborting…`:`Abort merge`)}),se.conflicts.length?(0,A.jsx)(`button`,{type:`button`,className:`button primary compact`,disabled:!!s,onClick:()=>void k(`resolve`,()=>Q(`/projects/${e}/git/resolve`,{agent:r.agent,model:r.model||void 0},void 0,62e4),e=>(m({agent:_f[e.agent],summary:e.summary}),e.remaining.length?ge(e.remaining.length,`{n} file still has conflicts.`,`{n} files still have conflicts.`):N(`Conflicts resolved. Read the diffs, then commit the merge.`))),children:s===`resolve`?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`span`,{className:`spinner`}),N(`{agent} is resolving…`,{agent:_f[r.agent]})]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(j,{name:`spark`,size:14}),N(`Resolve with {agent}`,{agent:_f[r.agent]})]})}):(0,A.jsx)(`button`,{type:`button`,className:`button primary compact`,disabled:!!s,onClick:()=>void k(`finish`,()=>Q(`/projects/${e}/git/finish`,{}),e=>(m(null),N(`Committed {hash}.`,{hash:e.commit}))),children:N(s===`finish`?`Committing…`:`Commit merge`)})]})]}),(0,A.jsxs)(`h3`,{className:`git-section`,children:[b.length>0&&!se&&(0,A.jsx)(`input`,{type:`checkbox`,"aria-label":N(`Stage all changes`),title:N(`Stage or unstage every change`),disabled:!!s,checked:S.length===b.length&&!b.some(e=>e.unstaged),ref:e=>{e&&(e.indeterminate=S.length>0&&(S.length<b.length||b.some(e=>e.unstaged)))},onChange:e=>w(e.target.checked?b.filter(e=>!Jf(e)||e.staged).map(e=>e.path):S.map(e=>e.path),e.target.checked)}),(0,A.jsx)(`span`,{children:N(`Uncommitted changes`)}),b.length>0&&(0,A.jsx)(`span`,{className:`count`,children:b.length}),T||E?(0,A.jsxs)(`span`,{className:`git-total`,children:[(0,A.jsxs)(`ins`,{children:[`+`,T]}),` `,(0,A.jsxs)(`del`,{children:[`−`,E]})]}):null]}),b.length?(0,A.jsxs)(A.Fragment,{children:[ne.length>0&&!se&&(0,A.jsxs)(`div`,{className:`git-ignore`,title:N(`Untracked build output. Add to .gitignore adds:`)+`
216
+ `+re.join(`
217
+ `),children:[(0,A.jsx)(`span`,{children:ge(ne.length,`{n} build file`,`{n} build files`)}),(0,A.jsx)(`button`,{type:`button`,className:`button ghost compact`,disabled:!!s,onClick:ie,children:N(s===`ignore`?`Adding…`:`Add to .gitignore`)})]}),!se&&(0,A.jsxs)(`form`,{className:`git-commit-form`,onSubmit:e=>{e.preventDefault(),ee()},children:[(0,A.jsxs)(`div`,{className:`git-message-box`,children:[(0,A.jsx)(`textarea`,{"aria-label":N(`Commit message`),placeholder:s===`message`?N(`{agent} is writing a commit message…`,{agent:_f[r.agent]}):N(`Commit message`),rows:2,value:a,readOnly:s===`commit`||s===`message`,onChange:e=>D(e.target.value),onKeyDown:e=>{Ce(e.nativeEvent,Tf())&&(e.preventDefault(),ee())}}),(0,A.jsx)(`button`,{type:`button`,className:`icon-button git-generate`,"aria-label":N(`Generate commit message`),title:N(`Write a commit message for the chosen files with {agent}`,{agent:_f[r.agent]}),disabled:!!s||!C.length,onClick:()=>void te(),children:s===`message`?(0,A.jsx)(`span`,{className:`spinner`}):(0,A.jsx)(j,{name:`spark`,size:15})})]}),(0,A.jsx)(`button`,{className:`button primary`,disabled:!!s||!a.trim()||!C.length,children:s===`commit`?N(`Committing…`):S.length?ge(S.length,`Commit staged changes in 1 file`,`Commit staged changes in {n} files`):C.length===b.length?ge(b.length,`Commit 1 file`,`Commit all {n} files`):N(`Commit {chosen} of {n} files`,{chosen:C.length,n:b.length})})]}),(0,A.jsx)(`ul`,{className:`git-files`,children:b.map(e=>{let t=e.status===`U`&&se&&!se.conflicts.includes(e.path)?`M`:e.status,n=e.path.lastIndexOf(`/`),r=t===`?`?`U`:t===`U`?`!`:t,i=h===e.path;return(0,A.jsxs)(`li`,{className:i?`open`:void 0,children:[(0,A.jsxs)(`div`,{className:`git-row`,children:[!se&&(0,A.jsx)(`input`,{type:`checkbox`,"aria-label":N(`Stage {path}`,{path:e.path}),title:e.staged?e.unstaged?N(`Partly staged`):N(`Staged`):N(`Not staged`),disabled:!!s,checked:e.staged&&!e.unstaged,ref:t=>{t&&(t.indeterminate=e.staged&&e.unstaged)},onChange:t=>w([e.path],t.target.checked)}),(0,A.jsxs)(`button`,{type:`button`,className:`git-file`,"aria-expanded":i,title:`${Yf()[e.status]||e.status}: ${e.from?`${e.from} → `:``}${e.path}`,onClick:()=>g(i?``:e.path),children:[(0,A.jsx)(`span`,{className:`git-name`,children:e.path.slice(n+1)}),n>0&&(0,A.jsx)(`span`,{className:`git-dir`,children:e.path.slice(0,n)})]}),e.lines&&(0,A.jsxs)(`span`,{className:`git-lines`,children:[(0,A.jsxs)(`ins`,{children:[`+`,e.lines[0]]}),` `,(0,A.jsxs)(`del`,{children:[`−`,e.lines[1]]})]}),(0,A.jsx)(`span`,{className:`git-code s-`+(t===`?`?`u`:t===`U`?`conflict`:t.toLowerCase()),"aria-label":Yf()[t]||t,children:r})]}),i&&(0,A.jsx)(`div`,{className:`git-diff-wrap`,"aria-label":N(`Changes in {path}`,{path:e.path}),role:`region`,children:_?.path===e.path&&_.result?(0,A.jsx)(Xf,{diff:_.result}):_?.error?(0,A.jsx)(`p`,{className:`inline-error`,children:_.error}):(0,A.jsx)(`p`,{className:`git-diff-note`,children:N(`Loading the diff…`)})})]},e.path)})})]}):(0,A.jsxs)(`p`,{className:`git-clean`,children:[(0,A.jsx)(j,{name:`check`,size:15}),N(`No uncommitted changes`)]})]})}function Qf(e){return N(`Page {n}`,{n:e.page+1})+(e.source?` · ${e.source.file}:${e.source.lines[0]}${e.source.lines[1]===e.source.lines[0]?``:`–${e.source.lines[1]}`}`:``)}function $f({notes:e,currentKey:t,active:n,actions:r,onShow:i}){let a=(0,v.useRef)(null);return(0,v.useEffect)(()=>{n&&a.current?.querySelector(`[data-note="${n}"]`)?.scrollIntoView({block:`nearest`})},[n]),(0,A.jsxs)(`section`,{className:`notes-panel`,"aria-label":N(`PDF notes`),children:[e.length?(0,A.jsx)(`ol`,{ref:a,className:`note-list`,children:e.map((e,a)=>(0,A.jsxs)(`li`,{"data-note":e.id,className:(n===e.id?`active `:``)+(e.key===t?``:`stale`),children:[(0,A.jsxs)(`div`,{className:`note-head`,children:[(0,A.jsx)(`button`,{type:`button`,className:`note-number`,"aria-label":N(`Show note {n} on the page`,{n:a+1}),onClick:()=>i(e),children:a+1}),(0,A.jsxs)(`span`,{className:`note-where`,children:[Qf(e),e.author?` · `+N(`from {name}`,{name:e.author.name}):``]}),(0,A.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":N(`Delete note {n}`,{n:a+1}),title:N(`Delete note`),onClick:()=>r.remove(e),children:(0,A.jsx)(j,{name:`close`,size:14})})]}),e.source?.excerpt?(0,A.jsx)(`pre`,{className:`note-source`,title:N(`{file}, the LaTeX that produced the marked region`,{file:e.source.file}),children:e.source.excerpt}):e.quote&&(0,A.jsx)(`blockquote`,{children:e.quote}),(0,A.jsx)(`p`,{children:e.comment}),e.key!==t&&(0,A.jsx)(`small`,{className:`muted`,children:N(`Marked on an earlier version of the PDF.`)})]},e.id))}):(0,A.jsx)(`p`,{className:`muted notes-empty`,children:N(`Select text in the PDF and choose Add note, or use Mark region for a figure or equation. All notes go to the agent as one task.`)}),(0,A.jsxs)(`div`,{className:`notes-send`,children:[(0,A.jsx)(`div`,{className:`composer-options`,children:r.options}),(0,A.jsx)(`button`,{type:`button`,className:`button primary`,disabled:!e.length||r.sending,onClick:r.send,children:r.sending?N(`Sending…`):e.length?ge(e.length,`Send {n} note to the agent`,`Send {n} notes to the agent`):N(`Send notes to the agent`)})]})]})}function ep({mode:e,onMode:t}){return(0,A.jsxs)(`div`,{className:`pdf-modes`,role:`group`,"aria-label":N(`Show`),children:[(0,A.jsx)(`button`,{type:`button`,"aria-pressed":e===`pdf`,onClick:()=>t(`pdf`),children:`PDF`}),(0,A.jsx)(`button`,{type:`button`,"aria-pressed":e===`changes`,title:N(`What changed since the last commit, to stage, revert and commit change by change`),onClick:()=>t(`changes`),children:N(`Changes`)})]})}function tp({project:e,data:t,error:n,view:r,setView:i,region:a,setRegion:o,active:s,setActive:c,actions:l,onGit:u,writer:d,reportError:f}){let p=t?.build,m=t?.annotations||[],h=t?.git,g=(0,v.useRef)(null),[_,y]=(0,v.useState)(`pdf`),[b,x]=(0,v.useState)(!1),S=(0,A.jsx)(ep,{mode:_,onMode:y}),C=Array.isArray(h?.files)&&!h.merging?h.files.filter(e=>e.staged).map(e=>e.path):[],w=()=>void Q(`/projects/${e.id}/git`).then(u,()=>void 0),T=e=>C.length>0&&(e?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`span`,{className:`commit-state`,children:ge(C.length,`{n} file staged`,`{n} files staged`)}),(0,A.jsx)(`button`,{type:`button`,className:`commit-button`,onClick:()=>x(!0),children:N(`Commit…`)})]}):(0,A.jsxs)(`button`,{type:`button`,className:`button ghost compact commit-staged`,title:N(`Commit what is staged`),onClick:()=>x(!0),children:[(0,A.jsx)(j,{name:`commit`,size:14}),(0,A.jsx)(`span`,{children:N(`Commit…`)})]})),[E,D]=(0,v.useState)([]),[O,k]=(0,v.useState)(-1),ee=m.map((e,t)=>({note:e,number:t+1})),te=()=>window.matchMedia(`(max-width: 680px)`).matches,ne=r===`pdf`?`notes`:r;function M(e){te()&&i(`pdf`),requestAnimationFrame(()=>g.current?.goTo(e))}function re(e){c(e.id),te()&&i(`pdf`),requestAnimationFrame(()=>g.current?.goToNote(e))}return(0,A.jsxs)(`div`,{className:`manuscript show-`+r,children:[_===`changes`?(0,A.jsx)(`section`,{className:`manuscript-pages`,"aria-label":N(`Uncommitted changes in the PDF`),children:(0,A.jsx)(Be,{changesOf:e.id,lead:S,tools:T(!1),completion:T(!0),onDecided:w},`changes:`+e.id)}):(0,A.jsxs)(`section`,{className:`manuscript-pages`,"aria-label":N(`PDF preview`),"aria-busy":!p||p.status===`building`,children:[!p?.key&&(0,A.jsx)(`div`,{className:`manuscript-lead`,children:S}),n&&(0,A.jsx)(`div`,{className:`manuscript-note error`,role:`alert`,children:n}),p?.status===`failed`&&(0,A.jsxs)(`div`,{className:`manuscript-note error`,role:`alert`,children:[(0,A.jsx)(`strong`,{children:N(`The manuscript did not compile.`)}),(0,A.jsx)(`pre`,{children:p.error})]}),p?.status===`building`&&p.key&&(0,A.jsx)(`div`,{className:`manuscript-note`,children:N(`Compiling the latest changes…`)}),p?.key?(0,A.jsx)(v.Suspense,{fallback:(0,A.jsx)(`div`,{className:`review-loading`,children:(0,A.jsx)(`p`,{role:`status`,children:N(`Opening the PDF…`)})}),children:(0,A.jsx)(pf,{ref:g,url:`/api/projects/${e.id}/manuscript.pdf?key=${p.key}`,words:`/api/projects/${e.id}/manuscript/words?key=${p.key}`,notes:ee.filter(e=>e.note.key===p.key),active:s,region:a,setRegion:o,onCreate:l.add,onSelect:e=>{c(e.id),te()||i(`notes`)},outline:E,section:O,onOutline:D,onSection:k,lead:S})}):!n&&p?.status!==`failed`&&(0,A.jsxs)(`div`,{className:`review-placeholder`,children:[(0,A.jsx)(`div`,{className:`placeholder-icon`,children:(0,A.jsx)(`span`,{className:`spinner large`})}),(0,A.jsx)(`h2`,{children:N(`Compiling the PDF…`)}),(0,A.jsx)(`p`,{children:N(`The first build of a paper can take a minute.`)})]})]}),(0,A.jsxs)(`aside`,{className:`manuscript-side`,"aria-label":N(`Contents, Notes and Git`),children:[(0,A.jsxs)(`div`,{className:`side-tabs`,role:`tablist`,"aria-label":N(`PDF panels`),children:[(0,A.jsx)(`button`,{role:`tab`,"aria-selected":ne===`contents`,onClick:()=>i(`contents`),children:N(`Contents`)}),(0,A.jsxs)(`button`,{role:`tab`,"aria-selected":ne===`notes`,onClick:()=>i(`notes`),children:[N(`Notes`),m.length>0&&(0,A.jsx)(`span`,{className:`count`,children:m.length})]}),(0,A.jsxs)(`button`,{role:`tab`,"aria-selected":ne===`git`,onClick:()=>i(`git`),children:[`Git`,t?.git?.files?.length?(0,A.jsx)(`span`,{className:`count`,children:t.git.files.length}):null]})]}),ne===`contents`?(0,A.jsx)(`nav`,{className:`contents-panel`,"aria-label":N(`PDF contents`),children:E.length?(0,A.jsx)(`ol`,{children:E.map((e,t)=>(0,A.jsx)(`li`,{children:(0,A.jsxs)(`button`,{type:`button`,"aria-current":t===O?`location`:void 0,style:{paddingLeft:12+Math.min(e.level,4)*14},onClick:()=>M(e),children:[(0,A.jsx)(`span`,{children:e.title}),(0,A.jsx)(`span`,{className:`contents-page`,children:e.page})]})},t))}):(0,A.jsx)(`p`,{className:`muted`,children:p?.key?N(`This PDF has no bookmarks.`):N(`Contents will appear when the PDF is ready.`)})}):ne===`git`?(0,A.jsx)(Zf,{projectId:e.id,git:t?.git||null,onStatus:u,writer:d},e.id):(0,A.jsx)($f,{notes:m,currentKey:p?.key,active:s,actions:l,onShow:re})]}),b&&(0,A.jsx)(ut,{branch:h?.branch??null,files:C,staged:!0,remote:!!h?.remote,agent:_f[d.agent],onClose:()=>x(!1),generate:t=>Q(`/projects/${e.id}/git/message`,{paths:C,staged:!0,agent:d.agent,fresh:t},void 0,13e4).then(e=>e.message),commit:async(t,n)=>{let r=await Q(`/projects/${e.id}/git/commit`,{message:t,staged:!0,push:n},void 0,13e4);u(r.git),x(!1),r.pushError&&f(r.pushError)}})]})}function np(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(M.getItem(`papilot:task`)||``),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)({taskId:``,items:[]}),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)({taskId:``,message:``}),f=(0,v.useRef)(null),p=(0,v.useRef)(new Map),m=(0,v.useRef)(new Map),h=(0,v.useRef)(new Map),[g]=(0,v.useState)(()=>new we),[_]=(0,v.useState)(()=>new we),[y,b]=(0,v.useState)(!0),[x,S]=(0,v.useState)(``),[C,w]=(0,v.useState)(``),T=(0,v.useRef)(null),[E,D]=(0,v.useState)(null),[O,k]=(0,v.useState)(null),[ee,te]=(0,v.useState)(``),[ne,re]=(0,v.useState)({}),ie=(0,v.useRef)(null),ae=(0,v.useRef)(null),oe=(0,v.useRef)(hf()),se=(0,v.useRef)(null),[ce,le]=(0,v.useState)(()=>M.getItem(`papilot:new-task`)||``),[ue,de]=(0,v.useState)(null),[fe,pe]=(0,v.useState)({projectId:``,list:[]}),[me,P]=(0,v.useState)(()=>{let e=M.getItem(`papilot:agent`);return e===`claude`||e===`antigravity`?e:`codex`}),[F,_e]=(0,v.useState)(()=>Object.fromEntries(gf.map(e=>[e,{model:M.getItem(`papilot:model:${e}`)??(e===`codex`?M.getItem(`papilot:model`):null)??``,effort:M.getItem(`papilot:effort:${e}`)??(e===`codex`?M.getItem(`papilot:effort`):null)??``}]))),[ve,be]=(0,v.useState)(!1),[Ce,Ee]=(0,v.useState)(``),[De,Oe]=(0,v.useState)(!1),[ke,Ae]=(0,v.useState)(!1),je=(0,v.useRef)(new Set),[Me,Ne]=(0,v.useState)(new Set),[Pe,Fe]=(0,v.useState)(()=>M.getItem(`papilot:sidebar`)!==`hidden`),[Le,Re]=(0,v.useState)(()=>{let e=M.getItem(`papilot:layout`);return e===`review`||e===`conversation`?e:`split`}),ze=Ef(`(max-width: 900px)`),We=Ef(`(max-width: 680px)`),[Ge,Je]=(0,v.useState)(`review`),[Ye,Xe]=(0,v.useState)(``),Ze=(0,v.useRef)(``);(0,v.useEffect)(()=>{!Ye&&Ze.current&&(document.querySelector(`.task-row[data-task="${Ze.current}"] .task-link`)?.focus(),Ze.current=``)},[Ye]);let[Qe,$e]=(0,v.useState)(!1),nt=(0,v.useRef)(!1);(0,v.useEffect)(()=>{!Qe&&nt.current&&(document.querySelector(`.breadcrumb .project-name`)?.focus(),nt.current=!1)},[Qe]);let[rt,it]=(0,v.useState)(`home`),[ot,ct]=(0,v.useState)(()=>window.matchMedia(`(max-width: 680px)`).matches?`pdf`:`notes`),[ft,pt]=(0,v.useState)(!1),[mt,ht]=(0,v.useState)(``),[gt,_t]=(0,v.useState)(!1),vt=(0,v.useRef)(hf()),[yt,bt]=(0,v.useState)({projectId:``,data:null,error:``}),[xt,St]=(0,v.useState)({projectId:``,status:null}),Ct=(0,v.useRef)(!1),[wt,Tt]=(0,v.useState)(()=>Number(M.getItem(`papilot:chat-width`))||0),[Et,Dt]=(0,v.useState)({path:``,name:``}),Ot=Ke(),{language:At}=he(),[jt,Mt]=(0,v.useState)(!1),[Nt,Pt]=(0,v.useState)(!1),Ft=(0,v.useRef)(n);Ft.current=n;let Rt=(0,v.useRef)(!1);(0,v.useEffect)(()=>{let e=ie.current;if(O&&e)return e.open||e.showModal(),e.querySelector(`input`)?.focus(),()=>{e.close(),ae.current?.isConnected&&ae.current.focus()}},[O]),(0,v.useEffect)(()=>{if(!ze||!ke)return;let e=document.activeElement,t=T.current;return(t?.querySelector(`[aria-current="page"]`)||t?.querySelector(`button`))?.focus(),()=>{e?.isConnected&&e.getClientRects().length&&e.focus()}},[ze,ke]),(0,v.useEffect)(()=>{Ae(!1)},[ze]),(0,v.useEffect)(()=>{M.setItem(`papilot:sidebar`,Pe?`visible`:`hidden`)},[Pe]),(0,v.useEffect)(()=>{M.setItem(`papilot:layout`,Le)},[Le]),(0,v.useEffect)(()=>{wt?M.setItem(`papilot:chat-width`,String(wt)):M.removeItem(`papilot:chat-width`)},[wt]),(0,v.useEffect)(()=>{ce?M.setItem(`papilot:new-task`,ce):M.removeItem(`papilot:new-task`)},[ce]),(0,v.useEffect)(()=>{let e=window.visualViewport,t=()=>{let t=document.documentElement.style;e&&window.matchMedia(`(max-width: 680px)`).matches&&e.scale===1?(t.setProperty(`--viewport-height`,`${e.height}px`),t.setProperty(`--viewport-top`,`${e.offsetTop}px`)):(t.removeProperty(`--viewport-height`),t.removeProperty(`--viewport-top`))};return t(),e?.addEventListener(`resize`,t),e?.addEventListener(`scroll`,t),window.addEventListener(`resize`,t),()=>{e?.removeEventListener(`resize`,t),e?.removeEventListener(`scroll`,t),window.removeEventListener(`resize`,t),document.documentElement.style.removeProperty(`--viewport-height`),document.documentElement.style.removeProperty(`--viewport-top`)}},[]);let Bt=(0,v.useCallback)(e=>S(e instanceof Error?e.message:String(e)),[]),Vt=(0,v.useCallback)(async e=>{Ft.current===e&&!p.current.has(e)&&l(!0);try{await _.run(e,t=>Q(`/tasks/`+e+`/items`,void 0,t),t=>{p.current.delete(e),p.current.set(e,t.items),p.current.size>8&&p.current.delete(p.current.keys().next().value),Ft.current===e&&(s({taskId:e,items:t.items}),d({taskId:e,message:``}))})}catch(t){Ft.current===e&&d({taskId:e,message:t instanceof Error?t.message:String(t)})}finally{Ft.current===e&&l(!1)}},[_]),Ht=(0,v.useCallback)(async(e=!1)=>{try{e&&g.cancel(),await g.run(`state`,e=>Q(`/state`,void 0,e),e=>{let n=Ft.current,i=f.current,o=i?.tasks.find(t=>t.id===n&&!e.tasks.some(e=>e.id===n));if(o&&a(o.projectId),mf=e.csrf,f.current=e,t(e),b(!0),w(``),i&&et()&&(document.hidden||!document.hasFocus()))for(let t of at(i,e))st(t,e=>{r(e),Ae(!1)});for(let t of m.current.keys())e.tasks.some(e=>e.id===t)||(m.current.delete(t),p.current.delete(t),M.removeItem(`papilot:draft:`+t));D(t=>t&&!e.tasks.some(e=>e.id===t.id)?null:t);for(let t of h.current.keys())e.requests.some(e=>e.id===t)||h.current.delete(t);n&&!e.tasks.some(e=>e.id===n)&&r(``),Rt.current||(Rt.current=!0,!n&&e.tasks.length&&r(e.tasks[e.tasks.length-1].id))});let n=Ft.current;!document.hidden&&n&&f.current?.tasks.some(e=>e.id===n)&&await Vt(n)}catch(e){b(!1),w(e instanceof Error?e.message:String(e))}},[g,Vt]);(0,v.useEffect)(()=>{let e=0,t,n,r=performance.getEntriesByType(`navigation`)[0]?.nextHopProtocol||``;function i(){let i=++e;if(clearTimeout(t),n?.close(),n=void 0,document.hidden&&!et()||!navigator.onLine){g.cancel(),_.cancel(),navigator.onLine||(b(!1),w(N(`You are offline. Your draft is kept in this browser.`)));return}Te(r)&&(n=new EventSource(`/api/events`),n.addEventListener(`change`,()=>{i===e&&Ht()}));async function a(){if(await Ht(),i!==e)return;let r=f.current?.tasks.some(e=>[`running`,`waiting_input`,`queued`,`building`].includes(e.status));t=setTimeout(()=>void a(),n?.readyState===EventSource.OPEN?1e4:document.hidden?5e3:r?1e3:2500)}a()}i(),document.addEventListener(`visibilitychange`,i),window.addEventListener(`online`,i),window.addEventListener(`offline`,i);let a=tt(i);return()=>{e++,clearTimeout(t),n?.close(),g.cancel(),_.cancel(),a(),document.removeEventListener(`visibilitychange`,i),window.removeEventListener(`online`,i),window.removeEventListener(`offline`,i)}},[Ht,g,_]),(0,v.useEffect)(()=>(M.setItem(`papilot:task`,n),s({taskId:n,items:p.current.get(n)||[]}),l(!(!n||p.current.has(n))),n&&f.current?.tasks.some(e=>e.id===n)&&Vt(n),()=>_.cancel()),[n,Vt,_]),(0,v.useEffect)(()=>{!i&&e?.projects.length&&a(e.projects[0].id)},[e,i]);let I=e?.tasks.find(e=>e.id===n);(0,v.useEffect)(()=>{I?.projectId&&a(I.projectId)},[I?.projectId]),I&&!m.current.has(I.id)&&m.current.set(I.id,new xe(`papilot:draft:`+I.id,M,hf));let Ut=I?.status!==`deleting`&&I?.review?.round?`/api/tasks/${I.id}/pdf?round=${I.review.round}`:``,L=e?.projects.find(e=>e.id===(I?.projectId||i))||e?.projects[0],Wt=e?.viewer,Gt=!Wt||Wt.role===`owner`;async function Kt(){try{await Q(`/auth/logout`,{})}catch(e){if(!Lt()){Bt(e);return}}zt(),It(!0)}let R=e?.tasks.filter(e=>!L||e.projectId===L.id)||[],qt=e?.tasks.filter(e=>[`running`,`waiting_input`,`building`].includes(e.status)).length||0;function Jt(){ae.current=document.activeElement,S(``),Dt({path:``,name:``}),k(`project`)}function Yt(){r(``),it(`home`),Ae(!1),e?.projects.length?requestAnimationFrame(()=>se.current?.focus()):Jt()}async function Xt(e){e.preventDefault(),Oe(!0),S(``);try{let e=await Q(`/projects`,{path:Et.path,name:Et.name});a(e.id),r(``),k(null),Ae(!1),await Ht(!0)}catch(e){Bt(e)}finally{Oe(!1)}}let Zt=e?.runtimes||(e?{codex:e.runtime}:{}),Qt=e=>!(!Zt[e]?.error||Zt[e]?.connected&&Zt[e]?.authenticated),z=Zt[me]?.models||[],$t=F[me],en=z.length&&!z.some(e=>e.id===$t.model)?``:$t.model,B=z.find(e=>e.id===en)||z.find(e=>e.isDefault),V={agent:me,model:en,effort:B&&!B.efforts.includes($t.effort)?``:$t.effort},tn=e=>{_e(t=>({...t,[me]:{...t[me],...e}}));for(let[t,n]of Object.entries(e))M.setItem(`papilot:${t}:${me}`,n)},nn=e=>(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(qe,{label:N(`Agent`),disabled:e,value:me,onChange:e=>{P(e),M.setItem(`papilot:agent`,e)},options:gf.map(e=>({value:e,label:_f[e]+(Qt(e)?N(` · unavailable`):``)}))}),(0,A.jsx)(qe,{label:N(`Model`),disabled:e,value:V.model,onChange:e=>tn({model:e}),options:[{value:``,label:N(`Default model`)},...z.map(e=>({value:e.id,label:e.name}))]}),B&&(0,A.jsx)(sf,{efforts:B.efforts,value:V.effort,fallback:B.defaultEffort,disabled:e,onChange:e=>tn({effort:e})})]});async function rn(){let e=ce.trim(),t=L?.id||i,n=ue;if((e||n)&&!ve&&t){be(!0),Ee(``);try{let i=await Q(`/tasks`,{projectId:t,title:n?(e?`${n.name}: ${Se(e)}`:n.name).slice(0,120):Se(e),instructions:e,...n?{skill:n.id}:{},agent:V.agent,model:V.model,effort:V.effort,id:oe.current});oe.current=hf(),le(``),de(null),r(i.id),Je(`conversation`),Re(`split`),Ae(!1),await Ht(!0)}catch(e){Ee(e instanceof Error?e.message:String(e))}finally{be(!1)}}}async function an(e){let t=e.startsWith(`/tasks/`)?e.split(`/`).slice(0,3).join(`/`):e;if(!je.current.has(t)){je.current.add(t),Ne(new Set(je.current));try{await Q(e,{}),await Ht(!0)}catch(e){Bt(e)}finally{je.current.delete(t),Ne(new Set(je.current))}}}let on=!!(I&&Me.has(`/tasks/`+I.id)),sn=ze?ke:Pe;function cn(e){let n=f.current?.tasks.find(t=>t.id===e);n&&a(n.projectId),M.removeItem(`papilot:draft:`+e),m.current.delete(e),p.current.delete(e),D(null),Ft.current===e&&r(``),t(t=>t&&{...t,tasks:t.tasks.filter(t=>t.id!==e),requests:t.requests.filter(t=>t.taskId!==e)}),Ht(!0),requestAnimationFrame(()=>document.querySelector(sn?`.sidebar .new-task`:`.topbar .sidebar-toggle`)?.focus())}function ln(){ze?Ae(!1):(Fe(!1),requestAnimationFrame(()=>document.querySelector(`.topbar .sidebar-toggle`)?.focus()))}async function un(e,n){let r=n.trim().replace(/\s+/g,` `).slice(0,120);if(Xe(``),r&&r!==e.title){t(t=>t&&{...t,tasks:t.tasks.map(t=>t.id===e.id?{...t,title:r}:t)});try{await Q(`/tasks/`+e.id+`/rename`,{title:r})}catch(e){Bt(e)}await Ht(!0)}}async function dn(e,n){let r=n.trim().replace(/\s+/g,` `).slice(0,120);if($e(!1),r&&r!==e.name){t(t=>t&&{...t,projects:t.projects.map(t=>t.id===e.id?{...t,name:r}:t)});try{await Q(`/projects/`+e.id+`/rename`,{name:r})}catch(e){Bt(e)}await Ht(!0)}}function fn(e){if(e.button!==0)return;e.preventDefault();let t=e.currentTarget,n=t.parentElement.getBoundingClientRect();t.setPointerCapture(e.pointerId),document.body.classList.add(`resizing`);let r=e=>Tt(Math.round(Math.min(Math.max(n.right-e.clientX,300),n.width-360))),i=()=>{document.body.classList.remove(`resizing`),t.removeEventListener(`pointermove`,r),t.removeEventListener(`lostpointercapture`,i)};t.addEventListener(`pointermove`,r),t.addEventListener(`lostpointercapture`,i)}function pn(e){let t=e.currentTarget.parentElement.querySelector(`.activity-panel`)?.offsetWidth||400,n=e.currentTarget.parentElement.offsetWidth-360,r=e.key===`ArrowLeft`?t+24:e.key===`ArrowRight`?t-24:e.key===`Home`?n:e.key===`End`?300:null;e.key===`Enter`?(e.preventDefault(),Tt(0)):r!==null&&(e.preventDefault(),Tt(Math.min(Math.max(r,300),n)))}let mn=!I&&rt===`manuscript`&&!!L,hn=(0,v.useCallback)(async(e,t=!1)=>{try{let n=await Q(`/projects/${e}/manuscript`,t?{}:void 0);Ct.current=n.build.status===`building`,bt({projectId:e,data:n,error:``}),St({projectId:e,status:n.git})}catch(t){bt(n=>({projectId:e,data:n.projectId===e?n.data:null,error:t instanceof Error?t.message:String(t)}))}},[]);(0,v.useEffect)(()=>{if(!mn||!L)return;let e=!1,t,n=async()=>{await hn(L.id),e||(t=setTimeout(()=>void n(),Ct.current?1500:15e3))};n();let r=()=>void hn(L.id);return window.addEventListener(`focus`,r),()=>{e=!0,clearTimeout(t),window.removeEventListener(`focus`,r)}},[mn,L?.id,hn]);let gn=(e?.tasks||[]).filter(e=>e.projectId===L?.id).map(e=>`${e.review?.files?.join()}:${e.review?.counts?.accepted}`).join(`|`);(0,v.useEffect)(()=>{if(!L||mn)return;let e=()=>void Q(`/projects/${L.id}/git`).then(e=>St({projectId:L.id,status:e})).catch(()=>void 0);e();let t=setInterval(e,2e4);return()=>clearInterval(t)},[L?.id,mn,gn]),(0,v.useEffect)(()=>de(null),[L?.id]),(0,v.useEffect)(()=>{if(!L)return;let e=!0,t=()=>void Q(`/projects/${L.id}/skills`).then(t=>{e&&pe({projectId:L.id,list:Array.isArray(t.skills)?t.skills:[]})},()=>void 0);return t(),window.addEventListener(`focus`,t),()=>{e=!1,window.removeEventListener(`focus`,t)}},[L?.id]);let _n=xt.projectId===L?.id?xt.status:null,vn=fe.projectId===L?.id?fe.list:[],yn=(e,t)=>{St({projectId:e,status:t}),bt(n=>n.projectId===e&&n.data?{...n,data:{...n.data,git:t}}:n)},bn=yt.projectId===L?.id?yt:{data:null,error:``},xn=bn.data?.annotations||[],Sn=e=>bt(t=>t.data?{...t,data:{...t.data,annotations:e(t.data.annotations||[])}}:t),Cn={async add(e,t,n,r,i){if(!L||!bn.data?.build.key)throw Error(N(`Wait for the PDF to compile.`));let a=await Q(`/projects/${L.id}/annotations`,{key:bn.data.build.key,page:e,rect:t,...n.length?{rects:n,quote:r}:{},comment:i});Sn(e=>[...e,a]),ht(a.id),pt(!1),We||ct(`notes`)},remove(e){L&&(Sn(t=>t.filter(t=>t.id!==e.id)),Q(`/projects/${L.id}/annotations/${e.id}/delete`,{}).catch(e=>{Bt(e),hn(L.id)}))},async send(){if(L&&!gt){_t(!0);try{let e=await Q(`/projects/${L.id}/annotations/send`,{id:vt.current,agent:V.agent,model:V.model,effort:V.effort});vt.current=hf(),Sn(()=>[]),r(e.id),Je(`conversation`),Re(`split`),await Ht(!0)}catch(e){Bt(e)}finally{_t(!1)}}},sending:gt,options:nn(gt)},wn=e?.tasks.filter(e=>e.status===`waiting_input`).length||0,Tn=I?I.agent||`codex`:me,En=Zt[Tn];(0,v.useEffect)(()=>{document.title=(wn?`(${wn}) `:``)+(I?`${I.title} · Papilot`:mn&&L?`${L.name} · Papilot`:`Papilot`)},[wn,I?.title,mn,L?.name]);let Dn=!!(I&&e?.requests.some(e=>e.taskId===I.id)),On=I?.review?.counts?.pending||0,kn=!!(I&&bf.includes(I.status)),An=We?Ge===`conversation`:Le!==`review`,jn=()=>{I&&an(`/tasks/`+I.id+`/interrupt`)},Mn=We?Ge===`conversation`:Le===`conversation`,Nn=I?Wf(I,_n):[],Pn=I&&(Nn.length?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`span`,{className:`commit-state`,children:N(`Not committed yet`)}),(0,A.jsx)(`button`,{type:`button`,className:`commit-button`,onClick:()=>te(I.id),children:N(`Commit…`)})]}):ne[I.id]?(0,A.jsx)(`span`,{className:`commit-state`,children:ne[I.id]}):null),Fn=e=>I&&(0,A.jsx)(Gf,{card:e,task:I,composer:m.current.get(I.id),refresh:()=>void Ht(!0),reportError:Bt,onSent:()=>{Ft.current===I.id&&(Je(`conversation`),Re(e=>e===`review`?`split`:e))}},`review-feedback:`+I.id),In=I&&Ut?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`a`,{className:`button ghost compact full-pdf-link`,href:Ut,target:`_blank`,rel:`noreferrer`,"aria-label":N(`Full PDF`),title:N(`Open the full PDF after round {round}`,{round:I.review?.round??``}),children:[(0,A.jsx)(j,{name:`paper`,size:14}),(0,A.jsx)(`span`,{children:N(`Full PDF`)})]}),(0,A.jsx)(`button`,{type:`button`,className:`icon-button review-rebuild`,"aria-label":N(`Build review`),title:N(`Build the review again`),disabled:[`running`,`waiting_input`,`queued`,`building`,`uncertain`].includes(I.status)||on,onClick:()=>void an(`/tasks/`+I.id+`/publish`),children:(0,A.jsx)(j,{name:`refresh`,size:15})}),(0,A.jsx)(`a`,{className:`icon-button review-open`,href:Ie(I),target:`_blank`,rel:`noreferrer`,"aria-label":N(`Open review in new tab`),title:N(`Open review in new tab`),children:(0,A.jsx)(j,{name:`external`,size:15})})]}):null,Ln=L?Qe?(0,A.jsx)(`form`,{className:`paper-rename`,onSubmit:e=>{e.preventDefault(),nt.current=!0,e.currentTarget.querySelector(`input`)?.blur()},children:(0,A.jsx)(`input`,{name:`name`,"aria-label":N(`Rename {name}`,{name:L.name}),defaultValue:L.name,maxLength:120,size:Math.min(40,Math.max(12,L.name.length+2)),autoFocus:!0,onFocus:e=>e.currentTarget.select(),onBlur:e=>void dn(L,e.currentTarget.value),onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),nt.current=!0,e.currentTarget.value=L.name,e.currentTarget.blur())}})}):(0,A.jsx)(`button`,{className:`project-name`,"aria-label":N(`Rename paper: {name}`,{name:L.name}),title:N(`{name} · Click to rename`,{name:L.name}),onClick:()=>$e(!0),children:L.name}):(0,A.jsx)(`span`,{className:`project-name`,children:`Papilot`});return(0,A.jsx)(Pf.Provider,{value:Wt||null,children:(0,A.jsxs)(`div`,{className:`app-shell`+(Pe?``:` sidebar-collapsed`),children:[(0,A.jsxs)(`aside`,{ref:T,role:ze&&ke?`dialog`:void 0,"aria-modal":ze&&ke?!0:void 0,onKeyDown:e=>{ze&&ke&&!O&&(e.key===`Escape`?(e.preventDefault(),Ae(!1)):Ve(e))},id:`task-sidebar`,className:`sidebar `+(ke?`is-open`:``),"aria-label":N(`Papers and tasks`),children:[(0,A.jsxs)(`div`,{className:`sidebar-header`,children:[(0,A.jsxs)(`a`,{href:`/`,className:`brand`,onClick:e=>{e.preventDefault(),r(``),it(`home`),Ae(!1)},children:[(0,A.jsx)(`img`,{className:`brand-mark`,src:kt,alt:``}),(0,A.jsx)(`span`,{children:`Papilot`})]}),(0,A.jsx)(`button`,{className:`icon-button`,"aria-label":N(`Hide task list`),title:N(`Hide task list`),onClick:ln,children:(0,A.jsx)(j,{name:ze?`close`:`sidebar`,size:18})})]}),(0,A.jsx)(`div`,{className:`sidebar-section`,children:(0,A.jsx)(`span`,{children:N(`Paper`)})}),(0,A.jsxs)(`div`,{className:`sidebar-actions`,children:[e?.projects.length&&L?(0,A.jsxs)(Ue,{label:N(`Paper: {name}`,{name:L.name}),className:`project-switcher`,menuClassName:`paper-menu`,align:`start`,actions:[...e.projects.map(e=>({id:e.id,label:e.name,detail:Kf(e.path),checked:e.id===L.id,select:e.id===L.id?void 0:()=>{a(e.id),r(``)}})),...Gt?[{label:N(`Add paper…`),icon:`plus`,divider:!0,select:()=>Jt()}]:[]],children:[(0,A.jsx)(`span`,{className:`project-switcher-name`,children:L.name}),(0,A.jsx)(j,{name:`updown`,size:14})]}):Gt&&(0,A.jsxs)(`button`,{className:`add-project`,disabled:!e,onClick:()=>Jt(),children:[(0,A.jsx)(j,{name:`plus`,size:16}),N(`Add paper`)]}),L&&(0,A.jsxs)(`button`,{className:`nav-link manuscript-link`+(mn?` active`:``),"aria-current":mn?`page`:void 0,onClick:()=>{r(``),it(`manuscript`),We&&ct(`pdf`),Ae(!1)},children:[(0,A.jsx)(j,{name:`paper`,size:16}),(0,A.jsx)(`span`,{className:`nav-label`,children:`PDF`}),qf(_n)&&(0,A.jsx)(`span`,{className:`nav-meta`,title:N(`Git status of the manuscript`),children:qf(_n)})]}),(0,A.jsxs)(`button`,{className:`nav-link new-task`+(!I&&!mn&&L?` active`:``),"aria-current":!I&&!mn&&L?`page`:void 0,disabled:!e,onClick:()=>Yt(),children:[(0,A.jsx)(j,{name:`compose`,size:16}),(0,A.jsx)(`span`,{className:`nav-label`,children:N(`New task`)})]})]}),(0,A.jsxs)(`div`,{className:`sidebar-section`,children:[(0,A.jsx)(`span`,{children:N(`Tasks`)}),R.length>0&&(0,A.jsx)(`span`,{className:`count`,children:R.length})]}),(0,A.jsx)(`nav`,{className:`task-list`,"aria-label":N(`Task list`),children:R.length?[...R].reverse().map(e=>(0,A.jsxs)(`div`,{"data-task":e.id,className:`task-row `+(e.id===n?`active`:``),children:[Ye===e.id?(0,A.jsx)(`form`,{className:`task-rename`,onSubmit:t=>{t.preventDefault(),Ze.current=e.id,t.currentTarget.querySelector(`input`)?.blur()},children:(0,A.jsx)(`input`,{name:`title`,"aria-label":N(`Rename {name}`,{name:e.title}),defaultValue:e.title,maxLength:120,autoFocus:!0,onFocus:e=>e.currentTarget.select(),onBlur:t=>void un(e,t.currentTarget.value),onKeyDown:t=>{t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),Ze.current=e.id,t.currentTarget.value=e.title,t.currentTarget.blur())}})}):(0,A.jsxs)(`button`,{"aria-current":e.id===n?`page`:void 0,className:`task-link `+(e.id===n?`active`:``),onClick:()=>{r(e.id),Ae(!1)},onDoubleClick:()=>{e.status!==`deleting`&&Xe(e.id)},children:[(0,A.jsx)(`span`,{className:`task-title`,children:e.title}),(0,A.jsxs)(`span`,{className:`task-meta`,children:[(0,A.jsx)(xf,{task:e}),(0,A.jsx)(`span`,{className:`task-time`,children:Cf(e.updatedAt)})]})]}),e.review?.counts?.pending?(0,A.jsx)(`span`,{className:`task-badge`,title:ge(e.review.counts.pending,`{n} change to decide`,`{n} changes to decide`),children:e.review.counts.pending}):null,(0,A.jsx)(Ue,{label:N(`Task actions for {title}`,{title:e.title}),actions:[...e.status===`deleting`?[]:[{label:N(`Rename…`),icon:`pencil`,select:()=>Xe(e.id)}],...bf.includes(e.status)?[{label:N(`Pause task`),icon:`pause`,disabled:Me.has(`/tasks/`+e.id),select:()=>void an(`/tasks/`+e.id+`/interrupt`)}]:[],...e.status===`uncertain`?[{label:N(`Check status`),icon:`refresh`,disabled:Me.has(`/tasks/`+e.id),select:()=>void an(`/tasks/`+e.id+`/reconcile`)}]:[],{label:e.status===`deleting`?N(`Retry deletion…`):N(`Delete task…`),icon:`trash`,danger:!0,select:()=>D(e)}]})]},e.id)):(0,A.jsx)(`div`,{className:`task-list-empty`,children:e?.projects.length?N(`No tasks yet. Start one with New task.`):N(`Add a paper to get started.`)})}),(0,A.jsxs)(`div`,{className:`sidebar-preferences`,children:[Gt&&(0,A.jsxs)(`button`,{className:`nav-link settings-link`,"aria-haspopup":`dialog`,onClick:()=>Pt(!0),children:[(0,A.jsx)(j,{name:`people`,size:16}),(0,A.jsx)(`span`,{className:`nav-label`,children:N(`People`)})]}),(0,A.jsxs)(`button`,{className:`nav-link settings-link`,"aria-haspopup":`dialog`,onClick:()=>Mt(!0),children:[(0,A.jsx)(j,{name:`settings`,size:16}),(0,A.jsx)(`span`,{className:`nav-label`,children:N(`Settings`)})]}),Wt?.listener===`account`&&(0,A.jsxs)(`button`,{className:`nav-link settings-link`,onClick:()=>void Kt(),children:[(0,A.jsx)(j,{name:`signOut`,size:16}),(0,A.jsx)(`span`,{className:`nav-label`,children:N(`Sign out`)}),(0,A.jsx)(`span`,{className:`nav-meta`,children:Wt.name})]})]}),e&&(!y||qt>0)&&(0,A.jsxs)(`div`,{className:`sidebar-footer`,children:[(0,A.jsxs)(`div`,{className:`host-status`,children:[(0,A.jsx)(`span`,{className:`connection-dot `+(y?`connected`:``)}),(0,A.jsx)(`span`,{children:N(`Host`)}),(0,A.jsx)(`span`,{className:`host-state`,children:N(y?`Connected`:`Reconnecting`)})]}),qt>0&&(0,A.jsx)(`div`,{className:`host-caption`,children:ge(qt,`{n} active task`,`{n} active tasks`)})]})]}),ke&&ze&&(0,A.jsx)(`button`,{tabIndex:-1,className:`sidebar-scrim`,"aria-label":N(`Close task list`),onClick:()=>Ae(!1)}),(0,A.jsxs)(`main`,{className:`main`,inert:ze&&ke,children:[(0,A.jsxs)(`header`,{className:`topbar`,children:[(ze||!Pe)&&(0,A.jsx)(`button`,{className:`icon-button sidebar-toggle`,"aria-label":N(`Show task list`),title:N(`Show task list`),"aria-expanded":sn,"aria-controls":`task-sidebar`,onClick:()=>ze?Ae(!0):Fe(!0),children:(0,A.jsx)(j,{name:ze?`menu`:`sidebar`,size:20})}),(0,A.jsxs)(`div`,{className:`breadcrumb`,children:[!We&&(0,A.jsxs)(A.Fragment,{children:[Ln,(I||mn)&&(0,A.jsx)(`span`,{className:`slash`,children:`/`})]}),I?(0,A.jsxs)(`div`,{className:`task-identity`,children:[(0,A.jsx)(`h1`,{title:I.title,children:I.title}),(0,A.jsx)(xf,{task:I})]}):mn?(0,A.jsxs)(`div`,{className:`task-identity`,children:[(0,A.jsx)(`h1`,{children:`PDF`}),(0,A.jsxs)(`span`,{className:`status `+(bn.data?.build.status===`failed`?`failed`:bn.data?.build.status===`ready`?`idle`:`building`),children:[(0,A.jsx)(`i`,{}),bn.data?bn.data.build.status===`building`?N(`Compiling`):bn.data.build.status===`failed`?N(`Build failed`):N(`Compiled {time}`,{time:wf(bn.data.build.builtAt||Date.now())}):N(`Loading`)]})]}):We&&Ln]}),mn&&L&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`div`,{className:`task-state-actions`,children:We?(0,A.jsx)(Ue,{label:N(`PDF options`),actions:[{label:N(`Recompile`),icon:`refresh`,select:()=>void hn(L.id,!0)},...bn.data?.build.key?[{label:N(`Open the PDF file`),icon:`external`,href:`/api/projects/${L.id}/manuscript.pdf?key=${bn.data.build.key}`}]:[]]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`button`,{className:`button ghost compact`,title:N(`Compile the PDF again`),onClick:()=>void hn(L.id,!0),children:[(0,A.jsx)(j,{name:`refresh`,size:14}),N(`Recompile`)]}),bn.data?.build.key&&(0,A.jsxs)(`a`,{className:`button ghost compact`,href:`/api/projects/${L.id}/manuscript.pdf?key=${bn.data.build.key}`,target:`_blank`,rel:`noreferrer`,title:N(`Open the PDF file in a new tab`),children:[(0,A.jsx)(j,{name:`external`,size:14}),N(`Open PDF`)]})]})}),We&&(0,A.jsxs)(`div`,{className:`view-selector`,role:`group`,"aria-label":N(`PDF view`),children:[(0,A.jsxs)(`button`,{"aria-label":`PDF`,"aria-pressed":ot===`pdf`,onClick:()=>ct(`pdf`),children:[(0,A.jsx)(j,{name:`paper`,size:16}),(0,A.jsx)(`span`,{children:`PDF`})]}),(0,A.jsxs)(`button`,{"aria-label":N(`Contents`),"aria-pressed":ot===`contents`,onClick:()=>{ct(`contents`),pt(!1)},children:[(0,A.jsx)(j,{name:`list`,size:16}),(0,A.jsx)(`span`,{children:N(`Contents`)})]}),(0,A.jsxs)(`button`,{"aria-label":xn.length?N(`Notes, {n}`,{n:xn.length}):N(`Notes`),"aria-pressed":ot===`notes`,onClick:()=>{ct(`notes`),pt(!1)},children:[(0,A.jsx)(j,{name:`notes`,size:16}),(0,A.jsx)(`span`,{children:N(`Notes`)}),xn.length?(0,A.jsx)(`b`,{className:`view-count`,"aria-hidden":`true`,children:xn.length}):null]}),(0,A.jsxs)(`button`,{"aria-label":_n?.files?.length?N(`Git, {n} changed`,{n:_n.files.length}):`Git`,"aria-pressed":ot===`git`,onClick:()=>{ct(`git`),pt(!1)},children:[(0,A.jsx)(j,{name:`diff`,size:16}),(0,A.jsx)(`span`,{children:`Git`}),_n?.files?.length?(0,A.jsx)(`b`,{className:`view-count`,"aria-hidden":`true`,children:_n.files.length}):null]})]})]}),I&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`div`,{className:`task-state-actions`,children:I.status===`deleting`?(0,A.jsx)(`button`,{className:`button secondary compact`,onClick:()=>D(I),children:N(`Retry deletion`)}):I.status===`uncertain`?(0,A.jsxs)(`button`,{className:`button secondary compact`,disabled:on,"aria-busy":on,onClick:()=>void an(`/tasks/`+I.id+`/reconcile`),children:[(0,A.jsx)(j,{name:`refresh`,size:14}),N(`Check status`)]}):kn&&!An?(0,A.jsxs)(`button`,{className:`button secondary compact`,"aria-label":N(`Pause task`),title:N(`Pause {agent}`,{agent:vf(I)}),disabled:on,"aria-busy":on,onClick:jn,children:[(0,A.jsx)(j,{name:`pause`,size:14}),(0,A.jsx)(`span`,{className:`button-label`,children:N(`Pause`)})]}):I.error?(0,A.jsx)(`button`,{className:`button secondary compact`,onClick:()=>{Je(`conversation`),Re(`conversation`)},children:N(`View details`)}):null}),(0,A.jsx)(`div`,{className:`view-selector`,role:`group`,"aria-label":N(`Workspace view`),children:We?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`button`,{"aria-label":On?N(`Review, {n} to decide`,{n:On}):N(`Review`),"aria-pressed":Ge===`review`,onClick:()=>Je(`review`),children:[(0,A.jsx)(j,{name:`paper`,size:16}),(0,A.jsx)(`span`,{children:N(`Review`)}),On>0&&(0,A.jsx)(`b`,{className:`view-count`,"aria-hidden":`true`,children:On})]}),(0,A.jsxs)(`button`,{"aria-label":N(Dn?`Chat (reply needed)`:`Chat`),"aria-pressed":Ge===`conversation`,onClick:()=>Je(`conversation`),children:[(0,A.jsx)(j,{name:`chat`,size:16}),(0,A.jsx)(`span`,{children:N(`Chat`)}),Dn&&(0,A.jsx)(`i`,{className:`attention-dot`,"aria-hidden":`true`})]})]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`button`,{"aria-label":N(`Review`),title:N(`PDF review only`),"aria-pressed":Le===`review`,onClick:()=>{Re(`review`),Je(`review`)},children:[(0,A.jsx)(j,{name:`paper`,size:16}),(0,A.jsx)(`span`,{children:N(`Review`)})]}),(0,A.jsxs)(`button`,{"aria-label":N(`Split`),title:N(`Review and chat side by side`),"aria-pressed":Le===`split`,onClick:()=>Re(`split`),children:[(0,A.jsx)(j,{name:`split`,size:16}),(0,A.jsx)(`span`,{children:N(`Split`)})]}),(0,A.jsxs)(`button`,{"aria-label":N(Dn?`Chat (reply needed)`:`Chat`),title:N(`Chat only`),"aria-pressed":Le===`conversation`,onClick:()=>{Re(`conversation`),Je(`conversation`)},children:[(0,A.jsx)(j,{name:`chat`,size:16}),(0,A.jsx)(`span`,{children:N(`Chat`)}),Dn&&(0,A.jsx)(`i`,{className:`attention-dot`,"aria-hidden":`true`})]})]})})]})]}),e&&!y&&(0,A.jsxs)(`div`,{className:`connection-banner`,role:`status`,children:[(0,A.jsx)(j,{name:`alert`,size:15}),(0,A.jsx)(`span`,{children:N(`Connection lost. Showing the last update; your draft is kept.`)}),(0,A.jsx)(`button`,{onClick:()=>void Ht(!0),children:N(`Retry connection`)})]}),e&&En&&(!En.connected||!En.authenticated)&&(0,A.jsxs)(`div`,{className:`runtime-banner`,children:[(0,A.jsx)(j,{name:`alert`,size:15}),(0,A.jsx)(`span`,{children:En.error||N(`Connecting to {agent}…`,{agent:_f[Tn]})}),(0,A.jsx)(`button`,{disabled:Me.has(`/reconnect`),onClick:()=>void an(`/reconnect`),children:Me.has(`/reconnect`)?N(`Connecting…`):N(`Reconnect`)})]}),I?(0,A.jsxs)(`div`,{className:`task-grid layout-${Le} show-${Ge}`,style:wt?{"--chat-width":`${wt}px`}:void 0,children:[!We&&Le===`split`&&(0,A.jsx)(`div`,{className:`panel-resizer`,role:`separator`,"aria-orientation":`vertical`,"aria-label":N(`Resize chat panel`),"aria-valuenow":wt||void 0,"aria-valuemin":300,tabIndex:0,title:N(`Drag to resize · Double-click to reset`),onPointerDown:fn,onDoubleClick:()=>Tt(0),onKeyDown:pn}),(0,A.jsxs)(`section`,{id:`review-panel`,className:`review-panel`,"aria-label":N(`PDF review`),children:[I.status===`failed`&&I.review?.job?.status===`failed`&&(0,A.jsxs)(`div`,{className:`review-build-error`,role:`status`,children:[(0,A.jsx)(j,{name:`alert`,size:15}),(0,A.jsx)(`span`,{children:N(`The latest review build failed.`)}),(0,A.jsx)(`button`,{className:`button secondary compact`,disabled:on,onClick:()=>void an(`/tasks/`+I.id+`/publish`),children:N(`Retry build`)})]}),I.status===`deleting`?(0,A.jsxs)(`div`,{className:`review-placeholder`,children:[(0,A.jsx)(`div`,{className:`placeholder-icon`,children:(0,A.jsx)(j,{name:`trash`,size:22})}),(0,A.jsx)(`h2`,{children:N(`Deletion is in progress`)}),(0,A.jsx)(`p`,{children:N(`This task is reserved until its worktree cleanup is confirmed. Use Retry deletion if the connection was interrupted.`)})]}):I.review?.round?(0,A.jsx)(Be,{task:I,tools:In,completion:Pn,onSendNotes:async e=>{await Q(`/tasks/`+I.id+`/messages`,e),Ht(!0),Ft.current===I.id&&(Je(`conversation`),Re(`split`))}},I.id):(0,A.jsxs)(`div`,{className:`review-placeholder`,children:[(0,A.jsx)(`div`,{className:`placeholder-icon`,children:I.status===`building`?(0,A.jsx)(`span`,{className:`spinner large`}):(0,A.jsx)(j,{name:`paper`,size:22})}),(0,A.jsx)(`h2`,{children:I.status===`building`?N(`Building PDF review…`):N(`No review yet`)}),(0,A.jsx)(`p`,{children:I.status===`building`?N(`The review will appear when the build finishes.`):N(`PDF changes will appear here after {agent} finishes editing.`,{agent:vf(I)})}),[`idle`,`interrupted`,`failed`,`reviewing`].includes(I.status)&&(0,A.jsx)(`button`,{className:`button secondary`,disabled:on,onClick:()=>void an(`/tasks/`+I.id+`/publish`),children:N(`Build review`)})]}),!Mn&&Fn(!1)]}),(0,A.jsx)(Uf,{task:I,models:Zt[I.agent||`codex`]?.models||[],composer:m.current.get(I.id),answerDrafts:h.current,items:o.taskId===I.id?o.items:p.current.get(I.id)||[],loading:o.taskId===I.id?c:!p.current.has(I.id),loadError:u.taskId===I.id?u.message:``,retry:()=>void Vt(I.id),requests:e?.requests.filter(e=>e.taskId===I.id)||[],refresh:()=>void Ht(!0),reportError:Bt,pause:jn,pausing:on,skills:vn,feedback:Mn?(0,A.jsxs)(A.Fragment,{children:[Fn(!0),Nn.length>0&&(0,A.jsxs)(`div`,{className:`review-feedback card commit-card`,children:[(0,A.jsxs)(`span`,{children:[(0,A.jsx)(j,{name:`commit`,size:15}),N(`Accepted changes are not committed yet`)]}),(0,A.jsx)(`button`,{className:`button secondary compact`,onClick:()=>te(I.id),children:N(`Commit…`)})]})]}):null,openReview:Mn?()=>{Je(`review`),Re(e=>e===`conversation`?`split`:e)}:void 0},I.id)]}):mn&&L?(0,A.jsx)(tp,{project:L,data:bn.data,error:bn.error,view:ot,setView:ct,region:ft,setRegion:pt,active:mt,setActive:ht,actions:Cn,onGit:e=>yn(L.id,e),writer:{agent:V.agent,model:V.model},reportError:Bt}):e?L?(0,A.jsx)(`div`,{className:`home`,children:(0,A.jsxs)(`div`,{className:`home-inner compose`,children:[(0,A.jsx)(`img`,{className:`home-logo`,src:kt,alt:``}),(0,A.jsx)(`h1`,{children:N(`What are we revising next?`)}),(0,A.jsx)(Df,{large:!0,autoFocus:!0,inputRef:se,label:N(`Describe the revision`),value:ce,onChange:le,readOnly:ve,onSubmit:()=>void rn(),placeholder:vn.length?N(`Describe the revision, or type / for a skill…`):N(`Describe the revision, what to preserve, and how to judge the result…`),skills:vn,skill:ue,onSkill:de,footer:(0,A.jsx)(`div`,{className:`composer-options`,children:nn(ve)}),action:(0,A.jsx)(`button`,{className:`send-button`,type:`submit`,"aria-label":N(`Start task`),title:N(`Start task (Enter)`),disabled:ve||!ce.trim()&&!ue,"aria-busy":ve,children:ve?(0,A.jsx)(`span`,{className:`spinner light`}):(0,A.jsx)(j,{name:`arrowUp`,size:18})})}),(0,A.jsx)(ye,{skills:vn,selected:ue,disabled:ve,onPick:e=>{de(e),se.current?.focus()}}),Ce&&(0,A.jsx)(`p`,{className:`inline-error home-error`,role:`alert`,children:Ce}),Qt(me)&&(0,A.jsx)(`p`,{className:`inline-error home-error`,role:`status`,children:N(`{agent} is unavailable on this host: {error}`,{agent:_f[me],error:Zt[me]?.error??``})}),Zt[me]?.usage&&(0,A.jsx)(ff,{agent:_f[me],usage:Zt[me].usage})]})}):Gt?(0,A.jsx)(`div`,{className:`home`,children:(0,A.jsxs)(`div`,{className:`home-inner`,children:[(0,A.jsx)(`img`,{className:`home-logo`,src:kt,alt:``}),(0,A.jsx)(`h1`,{children:N(`Add your first paper`)}),(0,A.jsx)(`p`,{className:`home-copy`,children:N(`Connect a LaTeX Git repository on this host. An agent edits it in isolated worktrees, and you review every change as a PDF diff.`)}),(0,A.jsxs)(`button`,{className:`button primary`,onClick:()=>Jt(),children:[(0,A.jsx)(j,{name:`plus`,size:16}),N(`Add paper`)]})]})}):(0,A.jsx)(`div`,{className:`home`,children:(0,A.jsxs)(`div`,{className:`home-inner`,children:[(0,A.jsx)(`img`,{className:`home-logo`,src:kt,alt:``}),(0,A.jsx)(`h1`,{children:N(`No papers yet`)}),(0,A.jsx)(`p`,{className:`home-copy`,children:N(`No papers have been shared with you yet. Papers appear here as soon as {name} shares them.`,{name:Wt?.owner||``})})]})}):(0,A.jsx)(`div`,{className:`home`,children:(0,A.jsxs)(`div`,{className:`home-inner`,children:[(0,A.jsx)(`div`,{className:`home-mark`,children:(0,A.jsx)(`span`,{className:`spinner`})}),(0,A.jsx)(`h1`,{children:N(`Opening your workspace`)}),(0,A.jsx)(`p`,{className:`home-copy`,role:`status`,children:C||N(`Connecting to your papers and tasks…`)}),C&&(0,A.jsx)(`button`,{className:`button secondary`,onClick:()=>void Ht(!0),children:N(`Retry connection`)})]})})]}),x&&!O&&(0,A.jsxs)(`div`,{role:`alert`,className:`toast`,children:[(0,A.jsx)(j,{name:`alert`,size:16}),(0,A.jsx)(`span`,{children:x}),(0,A.jsx)(`button`,{className:`icon-button`,"aria-label":N(`Dismiss error`),onClick:()=>S(``),children:(0,A.jsx)(j,{name:`close`,size:14})})]}),jt&&(0,A.jsx)(lt,{theme:Ot.theme,onTheme:Ot.setTheme,onClose:()=>Mt(!1)}),Nt&&(0,A.jsx)(dt,{api:Q,projects:e?.projects||[],ago:wf,onClose:()=>Pt(!1)}),I&&ee===I.id&&(0,A.jsx)(ut,{branch:_n?.branch??null,files:Nn,remote:!!_n?.remote,agent:vf(I),onClose:()=>te(``),generate:e=>Q(`/projects/${I.projectId}/git/message`,{paths:Nn,agent:I.agent||`codex`,fresh:e},void 0,13e4).then(e=>e.message),commit:async(e,t)=>{let n=await Q(`/tasks/${I.id}/commit`,{message:e,push:t},void 0,13e4);yn(I.projectId,n.git),re(e=>({...e,[I.id]:t&&!n.pushError?N(`Committed {hash} and pushed.`,{hash:n.commit}):N(`Committed {hash}.`,{hash:n.commit})})),te(``),n.pushError&&Bt(n.pushError),Ht(!0)}}),E&&(0,A.jsx)(He,{task:e?.tasks.find(e=>e.id===E.id)||E,submit:()=>Q(`/tasks/`+E.id+`/delete`,{confirm:!0}),onClose:()=>D(null),onDeleted:()=>cn(E.id),refresh:()=>void Ht(!0)}),O&&(0,A.jsx)(`dialog`,{ref:ie,onKeyDown:Ve,className:`modal-backdrop`,"aria-labelledby":`modal-title`,onCancel:e=>{e.preventDefault(),De||k(null)},onClick:e=>{e.target===e.currentTarget&&!De&&k(null)},children:(0,A.jsxs)(`section`,{className:`modal`,children:[(0,A.jsx)(`button`,{className:`modal-close icon-button`,"aria-label":N(`Close`),disabled:De,onClick:()=>k(null),children:(0,A.jsx)(j,{name:`close`})}),(0,A.jsx)(`h2`,{id:`modal-title`,children:N(`Add a paper`)}),(0,A.jsx)(`p`,{className:`modal-description`,children:N(`Choose an existing LaTeX Git repository on this host. It needs at least one commit and must compile with latexmk.`)}),(0,A.jsxs)(`form`,{onSubmit:e=>void Xt(e),children:[(0,A.jsxs)(`label`,{children:[N(`Repository path`),(0,A.jsx)(`input`,{required:!0,maxLength:4e3,value:Et.path,onChange:e=>Dt({...Et,path:e.target.value}),placeholder:N(`/Users/you/papers/my-paper`),autoComplete:`off`,spellCheck:!1})]}),(0,A.jsxs)(`label`,{children:[N(`Display name (optional)`),(0,A.jsx)(`input`,{maxLength:120,value:Et.name,onChange:e=>Dt({...Et,name:e.target.value}),placeholder:N(`My research paper`)})]}),x&&(0,A.jsx)(`p`,{className:`inline-error`,role:`alert`,children:x}),(0,A.jsxs)(`div`,{className:`button-row`,children:[(0,A.jsx)(`button`,{type:`button`,className:`button secondary`,disabled:De,onClick:()=>k(null),children:N(`Cancel`)}),(0,A.jsx)(`button`,{disabled:De,className:`button primary`,type:`submit`,children:N(De?`Adding…`:`Add paper`)})]})]})]})})]})})}function rp(){let e=Rt(),[t,n]=(0,v.useState)(location.pathname===`/invite`),r=()=>{n(!1),It(!1)};return t?(0,A.jsx)(Nt,{api:Q,onDone:r}):e?(0,A.jsx)(Mt,{api:Q,onSignedIn:r}):(0,A.jsx)(np,{})}(0,y.createRoot)(document.getElementById(`root`)).render((0,A.jsx)(v.StrictMode,{children:(0,A.jsx)(rp,{})}));export{M as _,H as a,h as b,Tn as c,Vt as d,Bt as f,N as g,Ce as h,G as i,xn as l,De as m,ys as n,En as o,qe as p,bs as r,wn as s,Dl as t,Yt as u,j as v,d as x,ee as y};